mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
New timer implementation
This is first part of new softserial code. Main timer code is changed, changes to rest of code are kept to minimum. macros for BASEPRI based synchronization are added to project (atomic.h) TIMER_PERIOD fixed in pwm_rx.c
This commit is contained in:
parent
2c8b3af88d
commit
aa7f5c4a1e
17 changed files with 953 additions and 249 deletions
|
@ -32,7 +32,7 @@ typedef struct softSerial_s {
|
|||
|
||||
const timerHardware_t *txTimerHardware;
|
||||
volatile uint8_t txBuffer[SOFTSERIAL_BUFFER_SIZE];
|
||||
|
||||
|
||||
uint8_t isSearchingForStartBit;
|
||||
uint8_t rxBitIndex;
|
||||
uint8_t rxLastLeadingEdgeAtBitIndex;
|
||||
|
@ -48,6 +48,9 @@ typedef struct softSerial_s {
|
|||
uint16_t receiveErrors;
|
||||
|
||||
uint8_t softSerialPortIndex;
|
||||
|
||||
timerCCHandlerRec_t timerCb;
|
||||
timerCCHandlerRec_t edgeCb;
|
||||
} softSerial_t;
|
||||
|
||||
extern timerHardware_t* serialTimerHardware;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue