Robot
The embedded systems for UTRA's autonomous humanoid soccer-playing robot
|
Helper functions for StartTxTask() More...
![]() |
Functions | |
void | shiftNotificationMask (void) |
Shifts bits of NOTIFICATION_MASK. More... | |
void | copySensorDataToSend (void) |
Validates and copies sensor data to transmit. More... | |
void | transmitStatusFromPC (void) |
Makes calls to the UART module responsible for PC communication atomic. More... | |
void | waitForNotificationTX (void) |
Waits until notified from ISR. More... | |
Helper functions for StartTxTask()
void copySensorDataToSend | ( | void | ) |
Validates and copies sensor data to transmit.
This function receives two types of sensor data(motor and IMU) and updates to the according section of robotState.msg.
None |
Definition at line 72 of file tx_helper.cpp.
void shiftNotificationMask | ( | void | ) |
Shifts bits of NOTIFICATION_MASK.
None |
Definition at line 59 of file tx_helper.cpp.
void transmitStatusFromPC | ( | void | ) |
Makes calls to the UART module responsible for PC communication atomic.
This do-while loop with the mutex inside of it makes c This attempts to solve the following scenario: the TX thread is in the middle of executing the call to HAL_UART_Transmit when suddenly the RX thread is unblocked. The RX thread calls HAL_UART_Receive, and returns immediately when it detects that the uart module is already locked. Then the RX thread blocks itself and never wakes up since a RX transfer was never initialized.
None |
Definition at line 123 of file tx_helper.cpp.
void waitForNotificationTX | ( | void | ) |
Waits until notified from ISR.
Clear no bits on entry in case the notification came while a higher priority task was executing.
None |
Definition at line 139 of file tx_helper.cpp.