sync with nrf52 core repo
This commit is contained in:
1 parent
7249abe5af
commit
b193c9b03b
3 files changed
+9
-8
No files matched your search
@@ -31,7 +31,7 @@ extern "C" {
|
||||
static uint32_t saadcReference = SAADC_CH_CONFIG_REFSEL_Internal;
|
||||
static uint32_t saadcGain = SAADC_CH_CONFIG_GAIN_Gain1_6;
|
||||
|
||||
#if 0
|
||||
#if 0 // Note: Adafruit use seperated HardwarePWM class
|
||||
#define PWM_COUNT 3
|
||||
|
||||
static NRF_PWM_Type* pwms[PWM_COUNT] = {
|
||||
|
||||
@@ -248,3 +248,6 @@ void SPIClass::detachInterrupt() {
|
||||
#if SPI_INTERFACES_COUNT > 0
|
||||
SPIClass SPI (NRF_SPI0, PIN_SPI_MISO, PIN_SPI_SCK, PIN_SPI_MOSI);
|
||||
#endif
|
||||
#if SPI_INTERFACES_COUNT > 1
|
||||
SPIClass SPI1(NRF_SPI1, PIN_SPI1_MISO, PIN_SPI1_SCK, PIN_SPI1_MOSI);
|
||||
#endif
|
||||
@@ -28,9 +28,7 @@
|
||||
|
||||
#include "RingBuffer.h"
|
||||
|
||||
#define BUFFER_LENGTH 32
|
||||
|
||||
// WIRE_HAS_END means Wire has end()
|
||||
// WIRE_HAS_END means Wire has end()
|
||||
#define WIRE_HAS_END 1
|
||||
|
||||
class TwoWire : public Stream
|
||||
@@ -39,7 +37,7 @@ class TwoWire : public Stream
|
||||
#ifdef NRF52
|
||||
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, IRQn_Type IRQn, uint8_t pinSDA, uint8_t pinSCL);
|
||||
TwoWire(NRF_TWI_Type * p_twi, uint8_t pinSDA, uint8_t pinSCL);
|
||||
#endif
|
||||
void begin();
|
||||
#ifdef NRF52
|
||||
@@ -65,12 +63,11 @@ class TwoWire : public Stream
|
||||
#ifdef NRF52
|
||||
void onReceive(void(*)(int));
|
||||
void onRequest(void(*)(void));
|
||||
void onService(void);
|
||||
#endif
|
||||
|
||||
using Print::write;
|
||||
|
||||
void onService(void);
|
||||
|
||||
private:
|
||||
#ifdef NRF52
|
||||
NRF_TWIM_Type * _p_twim;
|
||||
@@ -87,11 +84,12 @@ class TwoWire : public Stream
|
||||
bool master;
|
||||
bool receiving;
|
||||
bool transmissionBegun;
|
||||
bool suspended;
|
||||
|
||||
// RX Buffer
|
||||
RingBuffer rxBuffer;
|
||||
|
||||
//TX buffer
|
||||
// TX buffer
|
||||
RingBuffer txBuffer;
|
||||
uint8_t txAddress;
|
||||
|
||||
|
||||
Reference in new issue
Block a user