code sanitization
This commit is contained in:
parent
30d22aa896
commit
ae92bf377d
@ -3,7 +3,6 @@
|
||||
|
||||
#include "senddata.h"
|
||||
|
||||
void IRAM_ATTR ButtonIRQ();
|
||||
void readButton();
|
||||
|
||||
#endif
|
@ -5,7 +5,6 @@
|
||||
#include "senddata.h"
|
||||
|
||||
void doHousekeeping(void);
|
||||
void IRAM_ATTR homeCycleIRQ(void);
|
||||
uint64_t uptime(void);
|
||||
void reset_counters(void);
|
||||
int redirect_log(const char *fmt, va_list args);
|
||||
|
@ -9,6 +9,5 @@ extern HAS_DISPLAY u8x8;
|
||||
void init_display(const char *Productname, const char *Version);
|
||||
void refreshtheDisplay(void);
|
||||
void DisplayKey(const uint8_t *key, uint8_t len, bool lsb);
|
||||
void IRAM_ATTR DisplayIRQ(void);
|
||||
|
||||
#endif
|
@ -1,10 +1,10 @@
|
||||
#ifndef _IRQHANDLER_H
|
||||
#define _IRQHANDLER_H
|
||||
|
||||
#define DISPLAY_IRQ 0x01
|
||||
#define BUTTON_IRQ 0x02
|
||||
#define SENDPAYLOAD_IRQ 0x04
|
||||
#define CYCLIC_IRQ 0x08
|
||||
#define DISPLAY_IRQ 0x01
|
||||
#define BUTTON_IRQ 0x02
|
||||
#define SENDPAYLOAD_IRQ 0x04
|
||||
#define CYCLIC_IRQ 0x08
|
||||
|
||||
#include "globals.h"
|
||||
#include "cyclic.h"
|
||||
@ -14,5 +14,14 @@
|
||||
#include "senddata.h"
|
||||
|
||||
void irqHandler(void *pvParameters);
|
||||
void IRAM_ATTR ChannelSwitchIRQ();
|
||||
void IRAM_ATTR homeCycleIRQ();
|
||||
void IRAM_ATTR SendCycleIRQ();
|
||||
#ifdef HAS_DISPLAY
|
||||
void IRAM_ATTR DisplayIRQ();
|
||||
#endif
|
||||
#ifdef HAS_BUTTON
|
||||
void IRAM_ATTR ButtonIRQ();
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
11
src/main.cpp
11
src/main.cpp
@ -140,12 +140,10 @@ void setup() {
|
||||
strcat_P(features, "PU");
|
||||
// install button interrupt (pullup mode)
|
||||
pinMode(HAS_BUTTON, INPUT_PULLUP);
|
||||
attachInterrupt(digitalPinToInterrupt(HAS_BUTTON), ButtonIRQ, RISING);
|
||||
#else
|
||||
strcat_P(features, "PD");
|
||||
// install button interrupt (pulldown mode)
|
||||
pinMode(HAS_BUTTON, INPUT_PULLDOWN);
|
||||
attachInterrupt(digitalPinToInterrupt(HAS_BUTTON), ButtonIRQ, FALLING);
|
||||
#endif // BUTTON_PULLUP
|
||||
#endif // HAS_BUTTON
|
||||
|
||||
@ -346,6 +344,15 @@ void setup() {
|
||||
timerAlarmEnable(homeCycle);
|
||||
timerAlarmEnable(channelSwitch);
|
||||
|
||||
// start button interrupt
|
||||
#ifdef HAS_BUTTON
|
||||
#ifdef BUTTON_PULLUP
|
||||
attachInterrupt(digitalPinToInterrupt(HAS_BUTTON), ButtonIRQ, RISING);
|
||||
#else
|
||||
attachInterrupt(digitalPinToInterrupt(HAS_BUTTON), ButtonIRQ, FALLING);
|
||||
#endif
|
||||
#endif // HAS_BUTTON
|
||||
|
||||
} // setup()
|
||||
|
||||
void loop() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
void SendData(uint8_t port);
|
||||
void sendPayload(void);
|
||||
void IRAM_ATTR SendCycleIRQ(void);
|
||||
void checkSendQueues(void);
|
||||
void flushQueues();
|
||||
|
||||
|
@ -27,7 +27,6 @@ typedef struct {
|
||||
|
||||
void wifi_sniffer_init(void);
|
||||
void IRAM_ATTR wifi_sniffer_packet_handler(void *buff, wifi_promiscuous_pkt_type_t type);
|
||||
void IRAM_ATTR ChannelSwitchIRQ(void);
|
||||
void switchWifiChannel(void * parameter);
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user