[Mod] 支持发送ping命令控制跳转
This commit is contained in:
@ -32,10 +32,10 @@ extern uint8_t BufferPong[5];
|
||||
extern uint8_t Callback_isPingCheckReady;
|
||||
extern uint8_t PC_isConnected;
|
||||
extern uint8_t PcEchoBuffer[20];
|
||||
extern uint8_t is_jump_main;
|
||||
|
||||
/*==================================================================*/
|
||||
|
||||
|
||||
|
||||
/* !
|
||||
* @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɻص<C9BB><D8B5>ӿ<EFBFBD> <20>ɿͻ<C9BF>ʵ<EFBFBD><CAB5><EFBFBD>Լ<EFBFBD><D4BC>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*
|
||||
@ -113,6 +113,7 @@ void Ebyte_Port_ReceiveCallback( uint16_t state, uint8_t *buffer, uint8_t lengt
|
||||
Ebyte_BSP_LedControl( BSP_LED_1, ON );
|
||||
|
||||
if( ! PC_isConnected ) {
|
||||
is_jump_main = 1;
|
||||
snprintf(rx_data, sizeof(rx_data), "%s", buffer);
|
||||
EBYTE_LOG("\r\n Receive Data: %s", rx_data);
|
||||
}
|
||||
|
||||
@ -49,6 +49,8 @@ uint8_t Callback_isPingCheckReady = 0;
|
||||
/* <20>Լ<EFBFBD>ģʽ <20><>ʶ */
|
||||
uint8_t PC_isConnected = 0;
|
||||
|
||||
uint8_t is_jump_main = 0;
|
||||
|
||||
static BSP_BTN_EVENT_t BTN_Event;
|
||||
|
||||
/* !
|
||||
@ -70,7 +72,7 @@ int ebyte_main( void )
|
||||
EBYTE_LOG( "Start PingPong.....\r\n" );
|
||||
EBYTE_LOG( "Please push button1 or button2.....\r\n" );
|
||||
|
||||
while( 1 ) {
|
||||
while( !is_jump_main ) {
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD>Ӧ */
|
||||
Task_Button();
|
||||
|
||||
@ -82,6 +84,8 @@ int ebyte_main( void )
|
||||
|
||||
delay_1ms(100);
|
||||
}
|
||||
|
||||
Ebyte_BSP_GlobalIntDisable();
|
||||
}
|
||||
|
||||
/* !
|
||||
|
||||
@ -69,7 +69,6 @@ void Ebyte_E48x_SetSleep( uint8_t cmd )
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void Ebyte_E48x_IntOrPollTask( void )
|
||||
{
|
||||
radio_rece_data_flag = gpio_input_bit_get( BSP_GPIO_PORT_E48_GP4 , BSP_GPIO_PIN_E48_GP4);
|
||||
|
||||
@ -75,6 +75,7 @@ static void jump_to_main_image(uint32_t msp, uint32_t reset)
|
||||
|
||||
img_reset = (img_fptr_t)reset;
|
||||
|
||||
__disable_irq();
|
||||
#if defined(__ARM_ARCH_8M_MAIN__) || defined(__ARM_ARCH_8M_BASE__)
|
||||
/* Restore the Main Stack Pointer Limit register's reset value
|
||||
* before passing execution to runtime firmware to make the
|
||||
|
||||
Reference in New Issue
Block a user