File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2035,16 +2035,16 @@ static pika_dev* find_uart_from_handle(UART_HandleTypeDef* handle){
20352035 return NULL ;
20362036}
20372037
2038- // void HAL_UART_RxCpltCallback(UART_HandleTypeDef* huart) {
2039- // pika_dev* uart = find_uart_from_handle(huart);
2040- // platform_UART* pika_uart = uart->platform_data;
2038+ void HAL_UART_RxCpltCallback (UART_HandleTypeDef * huart ) {
2039+ pika_dev * uart = find_uart_from_handle (huart );
2040+ platform_UART * pika_uart = uart -> platform_data ;
20412041
2042- // // Increment writePointer, wrap around if needed
2043- // pika_uart->writePointer = (pika_uart->writePointer + 1) % RX_BUFF_LENGTH;
2042+ // Increment writePointer, wrap around if needed
2043+ pika_uart -> writePointer = (pika_uart -> writePointer + 1 ) % RX_BUFF_LENGTH ;
20442044
2045- // // Start receiving next character
2046- // UART_Start_Receive_IT(huart, (uint8_t*)(pika_uart->rxBuff + pika_uart->writePointer), 1);
2047- // }
2045+ // Start receiving next character
2046+ UART_Start_Receive_IT (huart , (uint8_t * )(pika_uart -> rxBuff + pika_uart -> writePointer ), 1 );
2047+ }
20482048
20492049int pika_hal_platform_UART_read (pika_dev * dev , void * buf , size_t count ) {
20502050 platform_UART * pika_uart = (platform_UART * )dev -> platform_data ;
You can’t perform that action at this time.
0 commit comments