add nrf52 series common macros NRF52_SERIES

This commit is contained in:
hathach committed 2018-04-17 17:20:22 +07:00
1 parent 6106bdfc82
commit 313705e15c
8 files changed
+13 -12

No files matched your search

+4 -4
View File
@@ -34,13 +34,13 @@
class TwoWire : public Stream
{
public:
#ifdef NRF52
#if defined(NRF52) || defined(NRF52_SERIES)
TwoWire(NRF_TWIM_Type * p_twim, NRF_TWIS_Type * p_twis, IRQn_Type IRQn, uint8_t pinSDA, uint8_t pinSCL);
#else
TwoWire(NRF_TWI_Type * p_twi, uint8_t pinSDA, uint8_t pinSCL);
#endif
void begin();
#ifdef NRF52
#if defined(NRF52) || defined(NRF52_SERIES)
void begin(uint8_t);
#endif
void end();
@@ -60,7 +60,7 @@ class TwoWire : public Stream
virtual int read(void);
virtual int peek(void);
virtual void flush(void);
#ifdef NRF52
#if defined(NRF52) || defined(NRF52_SERIES)
void onReceive(void(*)(int));
void onRequest(void(*)(void));
void onService(void);
@@ -69,7 +69,7 @@ class TwoWire : public Stream
using Print::write;
private:
#ifdef NRF52
#if defined(NRF52) || defined(NRF52_SERIES)
NRF_TWIM_Type * _p_twim;
NRF_TWIS_Type * _p_twis;
#else
+1 -1
View File
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifdef NRF52
#if defined(NRF52) || defined(NRF52_SERIES)
extern "C" {
#include <string.h>