Skip to content

Commit

Permalink
Move SI446X_INTERRUPTS #define
Browse files Browse the repository at this point in the history
Move SI446X_INTERRUPTS #define to Si446x_config.h, otherwise the SI446X_NO_INTERRUPT macro doesn't work.
  • Loading branch information
ZakKemble committed Sep 5, 2018
1 parent e0a07a9 commit b287bb8
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 28 deletions.
14 changes: 0 additions & 14 deletions Si446x/Si446x.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,6 @@

#include "radio_config.h"

// NOT PROPERLY TESTED, KEEP 1
// what happens if:
// 1. Si446x_SERVICE()
// 2. *new packet RX after service()*
// 3. Si446x_TX(blah)
// RX packet is lost, what are the interrupt pending statuses at?
//
// Use pin interrupt
// If this is 1 and you have other devices that use the SPI bus then you will need to wrap areas of code that communicate with those devices with SI446X_NO_INTERRUPT()
// If this is 0 make sure to call Si446x_SERVICE() as often as possible so that the library can process radio events
// 0 = Off, run callbacks from Si446x_SERVICE()
// 1 = On, run callbacks from interrupt
#define SI446X_INTERRUPTS 1

#define IDLE_STATE SI446X_IDLE_MODE

// When FIFOs are combined it becomes a 129 byte FiFO
Expand Down
17 changes: 17 additions & 0 deletions Si446x/Si446x_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,21 @@
#define SI446X_BIT_EXTERNAL_INT SI446X_INTCONCAT(SI446X_INTERRUPT_NUM)
#endif



// NOT PROPERLY TESTED, KEEP 1
// what happens if:
// 1. Si446x_SERVICE()
// 2. *new packet RX after service()*
// 3. Si446x_TX(blah)
// RX packet is lost, what are the interrupt pending statuses at?
//
// Use pin interrupt
// If this is 1 and you have other devices that use the SPI bus then you will need to wrap areas of code that communicate with those devices with SI446X_NO_INTERRUPT()
// If this is 0 make sure to call Si446x_SERVICE() as often as possible so that the library can process radio events
// 0 = Off, run callbacks from Si446x_SERVICE()
// 1 = On, run callbacks from interrupt
#define SI446X_INTERRUPTS 1 // DO NOT CHANGE


#endif /* SI443X_CONFIG_H_ */
14 changes: 0 additions & 14 deletions arduino/Si446x/src/Si446x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,6 @@

#include "radio_config.h"

// NOT PROPERLY TESTED, KEEP 1
// what happens if:
// 1. Si446x_SERVICE()
// 2. *new packet RX after service()*
// 3. Si446x_TX(blah)
// RX packet is lost, what are the interrupt pending statuses at?
//
// Use pin interrupt
// If this is 1 and you have other devices that use the SPI bus then you will need to wrap areas of code that communicate with those devices with SI446X_NO_INTERRUPT()
// If this is 0 make sure to call Si446x_SERVICE() as often as possible so that the library can process radio events
// 0 = Off, run callbacks from Si446x_SERVICE()
// 1 = On, run callbacks from interrupt
#define SI446X_INTERRUPTS 1

#define IDLE_STATE SI446X_IDLE_MODE

// When FIFOs are combined it becomes a 129 byte FiFO
Expand Down
17 changes: 17 additions & 0 deletions arduino/Si446x/src/Si446x_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,21 @@
#define SI446X_BIT_EXTERNAL_INT SI446X_INTCONCAT(SI446X_INTERRUPT_NUM)
#endif



// NOT PROPERLY TESTED, KEEP 1
// what happens if:
// 1. Si446x_SERVICE()
// 2. *new packet RX after service()*
// 3. Si446x_TX(blah)
// RX packet is lost, what are the interrupt pending statuses at?
//
// Use pin interrupt
// If this is 1 and you have other devices that use the SPI bus then you will need to wrap areas of code that communicate with those devices with SI446X_NO_INTERRUPT()
// If this is 0 make sure to call Si446x_SERVICE() as often as possible so that the library can process radio events
// 0 = Off, run callbacks from Si446x_SERVICE()
// 1 = On, run callbacks from interrupt
#define SI446X_INTERRUPTS 1 // DO NOT CHANGE


#endif /* SI443X_CONFIG_H_ */

0 comments on commit b287bb8

Please sign in to comment.