Create a thread for the serial link
This commit is contained in:
parent
6873b17117
commit
36e4869531
3 changed files with 61 additions and 6 deletions
|
@ -25,18 +25,32 @@ SOFTWARE.
|
|||
#ifndef SERIAL_LINK_SYSTEM_H
|
||||
#define SERIAL_LINK_SYSTEM_H
|
||||
|
||||
|
||||
void init_serial_link(void);
|
||||
|
||||
#if defined(PROTOCOL_CHIBIOS)
|
||||
#include "ch.h"
|
||||
|
||||
static inline void serial_link_lock(void) {
|
||||
chSysLock();
|
||||
}
|
||||
|
||||
static inline void serial_link_unlock(void) {
|
||||
chSysUnlock();
|
||||
}
|
||||
|
||||
void signal_data_written(void);
|
||||
|
||||
#else
|
||||
|
||||
inline void serial_link_lock(void) {
|
||||
}
|
||||
|
||||
inline void serial_link_unlock(void) {
|
||||
}
|
||||
|
||||
void singal_data_written(void);
|
||||
void signal_data_written(void);
|
||||
|
||||
#if defined(PROTOCOL_CHIBIOS)
|
||||
|
||||
inline void signal_data_written(void) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue