added priority control for lora and spi sendqueue
This commit is contained in:
1 parent
cd08335634
commit
06a1775779
12 files changed
+59
-32
No files matched your search
+7
-1
@@ -92,13 +92,15 @@ typedef struct {
|
||||
float gas; // raw gas sensor signal
|
||||
} bmeStatus_t;
|
||||
|
||||
enum sendprio_t { prio_low, prio_normal, prio_high };
|
||||
|
||||
// global variables
|
||||
extern configData_t cfg; // current device configuration
|
||||
extern char display_line6[], display_line7[]; // screen buffers
|
||||
extern uint8_t volatile channel; // wifi channel rotation counter
|
||||
extern uint16_t volatile macs_total, macs_wifi, macs_ble,
|
||||
batt_voltage; // display values
|
||||
extern hw_timer_t *channelSwitch, *sendCycle, *displaytimer;
|
||||
extern hw_timer_t *sendCycle, *displaytimer;
|
||||
extern SemaphoreHandle_t I2Caccess;
|
||||
|
||||
extern std::set<uint16_t, std::less<uint16_t>, Mallocator<uint16_t>> macs;
|
||||
@@ -150,4 +152,8 @@ extern Timezone myTZ;
|
||||
#include "if482.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAS_DCF77
|
||||
#include "dcf77.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+1
-1
@@ -33,7 +33,7 @@ void os_getDevEui(u1_t *buf);
|
||||
void showLoraKeys(void);
|
||||
void switch_lora(uint8_t sf, uint8_t tx);
|
||||
void lora_send(osjob_t *job);
|
||||
void lora_enqueuedata(MessageBuffer_t *message);
|
||||
void lora_enqueuedata(MessageBuffer_t *message, sendprio_t prio);
|
||||
void lora_queuereset(void);
|
||||
void lora_housekeeping(void);
|
||||
void user_request_network_time_callback(void *pVoidUserUTCTime,
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
#include "lorawan.h"
|
||||
#include "cyclic.h"
|
||||
|
||||
void SendPayload(uint8_t port);
|
||||
void SendPayload(uint8_t port, sendprio_t prio);
|
||||
void sendCounter(void);
|
||||
void checkSendQueues(void);
|
||||
void flushQueues();
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ licenses. Refer to LICENSE.txt file in repository for more details.
|
||||
|
||||
esp_err_t spi_init();
|
||||
|
||||
void spi_enqueuedata(MessageBuffer_t *message);
|
||||
void spi_enqueuedata(MessageBuffer_t *message, sendprio_t prio);
|
||||
void spi_queuereset();
|
||||
|
||||
void spi_housekeeping();
|
||||
|
||||
Reference in new issue
Block a user