add mcu flash detect
This commit is contained in:
16
Src/main.c
16
Src/main.c
@@ -49,23 +49,17 @@ OF SUCH DAMAGE.
|
||||
*/
|
||||
int main(void)
|
||||
{
|
||||
led_init();
|
||||
mcu_detect_and_config();
|
||||
|
||||
setbuf(stdout, NULL);
|
||||
systick_config();
|
||||
rs485_init();
|
||||
|
||||
led_init();
|
||||
printf("Flash size: %d Kbytes\n", get_flash_size());
|
||||
|
||||
#ifdef DEBUG_VERBOSE
|
||||
char hello_world[] = {"Hello World!\r\n"};
|
||||
|
||||
for (uint8_t i = 0; i < sizeof(hello_world); i++)
|
||||
{
|
||||
while (usart_flag_get(RS485_PHY, USART_FLAG_TBE) == RESET) {}
|
||||
usart_data_transmit(RS485_PHY, hello_world[i]);
|
||||
}
|
||||
|
||||
while (usart_flag_get(RS485_PHY, USART_FLAG_TC) == RESET) {}
|
||||
printf("Hello World!\r\n");
|
||||
#endif
|
||||
|
||||
i2c_config();
|
||||
@@ -78,6 +72,6 @@ int main(void)
|
||||
|
||||
while(1){
|
||||
command_process();
|
||||
delay_ms(10);
|
||||
delay_ms(10);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user