diff --git a/templates/stm32g0-common/replace/STM32G0B/replace/STM32G0B1/board/board.c b/templates/stm32g0-common/replace/STM32G0B/replace/STM32G0B1/board/board.c index b1a6ed29e5b00f7977da11727b1cf7e8cfb9d990..461136822befc936ae283fb4c303ce01040cb2d5 100644 --- a/templates/stm32g0-common/replace/STM32G0B/replace/STM32G0B1/board/board.c +++ b/templates/stm32g0-common/replace/STM32G0B/replace/STM32G0B1/board/board.c @@ -40,8 +40,8 @@ const struct push_button key_table[] = { const int key_table_size = ARRAY_SIZE(key_table); #endif const int board_no_pin_tab[] = { - GET_PIN(B, 8), - GET_PIN(B, 15), + GET_PIN(B, 3), + GET_PIN(A, 15), GET_PIN(A, 12), GET_PIN(A, 11), GET_PIN(A, 3), @@ -55,7 +55,7 @@ const int board_no_pin_tab_size = ARRAY_SIZE(board_no_pin_tab); const int slot_no_pin_tab[] = { GET_PIN(B, 0), GET_PIN(B, 1), - GET_PIN(B, 9), + GET_PIN(B, 5), GET_PIN(B, 6), GET_PIN(B, 7), }; diff --git a/templates/stm32g0-common/replace/STM32G0B/replace/STM32G0B1/replace/TEMP_STM32G0B1KE/board/board.c b/templates/stm32g0-common/replace/STM32G0B/replace/STM32G0B1/replace/TEMP_STM32G0B1KE/board/board.c new file mode 100644 index 0000000000000000000000000000000000000000..b1a6ed29e5b00f7977da11727b1cf7e8cfb9d990 --- /dev/null +++ b/templates/stm32g0-common/replace/STM32G0B/replace/STM32G0B1/replace/TEMP_STM32G0B1KE/board/board.c @@ -0,0 +1,63 @@ +/** + *********************************************************************************************************************** + * Copyright (c) 2020, China Mobile Communications Group Co.,Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * + * @file board.c + * + * @brief Initializes the CPU, System clocks, and Peripheral device + * + * @revision + * Date Author Notes + * 2020-02-20 OneOS Team First Version + *********************************************************************************************************************** + */ + +#include "board.h" +#include + +#ifdef OS_USING_LED +const led_t led_table[] = { + {GET_PIN(A, 8), PIN_HIGH}, +}; + +const int led_table_size = ARRAY_SIZE(led_table); +#endif + +#ifdef OS_USING_PUSH_BUTTON +const struct push_button key_table[] = { + {GET_PIN(C, 13), PIN_IRQ_MODE_RISING}, +}; + +const int key_table_size = ARRAY_SIZE(key_table); +#endif +const int board_no_pin_tab[] = { + GET_PIN(B, 8), + GET_PIN(B, 15), + GET_PIN(A, 12), + GET_PIN(A, 11), + GET_PIN(A, 3), + GET_PIN(A, 2), + GET_PIN(A, 1), + GET_PIN(A, 0), +}; + +const int board_no_pin_tab_size = ARRAY_SIZE(board_no_pin_tab); + +const int slot_no_pin_tab[] = { + GET_PIN(B, 0), + GET_PIN(B, 1), + GET_PIN(B, 9), + GET_PIN(B, 6), + GET_PIN(B, 7), +}; + +const int slot_no_pin_tab_size = ARRAY_SIZE(slot_no_pin_tab);