Skip to content

Commit b193c9b

Browse files
committed
sync with nrf52 core repo
1 parent 7249abe commit b193c9b

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

cores/nRF5/wiring_analog_nRF52.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ extern "C" {
3131
static uint32_t saadcReference = SAADC_CH_CONFIG_REFSEL_Internal;
3232
static uint32_t saadcGain = SAADC_CH_CONFIG_GAIN_Gain1_6;
3333

34-
#if 0
34+
#if 0 // Note: Adafruit use seperated HardwarePWM class
3535
#define PWM_COUNT 3
3636

3737
static NRF_PWM_Type* pwms[PWM_COUNT] = {

libraries/SPI/SPI.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,3 +248,6 @@ void SPIClass::detachInterrupt() {
248248
#if SPI_INTERFACES_COUNT > 0
249249
SPIClass SPI (NRF_SPI0, PIN_SPI_MISO, PIN_SPI_SCK, PIN_SPI_MOSI);
250250
#endif
251+
#if SPI_INTERFACES_COUNT > 1
252+
SPIClass SPI1(NRF_SPI1, PIN_SPI1_MISO, PIN_SPI1_SCK, PIN_SPI1_MOSI);
253+
#endif

libraries/Wire/Wire.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828

2929
#include "RingBuffer.h"
3030

31-
#define BUFFER_LENGTH 32
32-
33-
// WIRE_HAS_END means Wire has end()
31+
// WIRE_HAS_END means Wire has end()
3432
#define WIRE_HAS_END 1
3533

3634
class TwoWire : public Stream
@@ -39,7 +37,7 @@ class TwoWire : public Stream
3937
#ifdef NRF52
4038
TwoWire(NRF_TWIM_Type * p_twim, NRF_TWIS_Type * p_twis, IRQn_Type IRQn, uint8_t pinSDA, uint8_t pinSCL);
4139
#else
42-
TwoWire(NRF_TWI_Type * p_twi, IRQn_Type IRQn, uint8_t pinSDA, uint8_t pinSCL);
40+
TwoWire(NRF_TWI_Type * p_twi, uint8_t pinSDA, uint8_t pinSCL);
4341
#endif
4442
void begin();
4543
#ifdef NRF52
@@ -65,12 +63,11 @@ class TwoWire : public Stream
6563
#ifdef NRF52
6664
void onReceive(void(*)(int));
6765
void onRequest(void(*)(void));
66+
void onService(void);
6867
#endif
6968

7069
using Print::write;
7170

72-
void onService(void);
73-
7471
private:
7572
#ifdef NRF52
7673
NRF_TWIM_Type * _p_twim;
@@ -87,11 +84,12 @@ class TwoWire : public Stream
8784
bool master;
8885
bool receiving;
8986
bool transmissionBegun;
87+
bool suspended;
9088

9189
// RX Buffer
9290
RingBuffer rxBuffer;
9391

94-
//TX buffer
92+
// TX buffer
9593
RingBuffer txBuffer;
9694
uint8_t txAddress;
9795

0 commit comments

Comments
 (0)