mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 11:37:45 +08:00
change all usart modules to have same api
This commit is contained in:
@@ -55,15 +55,16 @@ static void ReceiveCallback()
|
||||
sbus_to_rc(rc_usart_instance.recv_buff, &rc_ctrl);
|
||||
}
|
||||
|
||||
void RC_init(UART_HandleTypeDef *rc_usart_handle)
|
||||
RC_ctrl_t* RC_init(UART_HandleTypeDef *rc_usart_handle)
|
||||
{
|
||||
rc_usart_instance.module_callback = ReceiveCallback;
|
||||
rc_usart_instance.usart_handle = rc_usart_handle;
|
||||
rc_usart_instance.recv_buff_size = REMOTE_CONTROL_FRAME_SIZE;
|
||||
USARTRegister(&rc_usart_instance);
|
||||
return &rc_ctrl;
|
||||
}
|
||||
|
||||
const RC_ctrl_t *get_remote_control_point(void)
|
||||
const *get_remote_control_point(void)
|
||||
{
|
||||
return &rc_ctrl;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user