|
20 | 20 |
|
21 | 21 | #include "nrf.h" |
22 | 22 |
|
23 | | -#if defined(NRF52_SERIES) |
| 23 | +#if defined(NRF52_SERIES) || defined(NRF52805_XXAA) || defined(NRF52810_XXAA) || defined(NRF52811_XXAA) || defined(NRF52840_XXAA) |
24 | 24 |
|
25 | 25 | extern "C" { |
26 | 26 | #include <string.h> |
@@ -400,18 +400,59 @@ void TwoWire::onService(void) |
400 | 400 | _p_twis->TASKS_STOP = 0x1UL; |
401 | 401 | } |
402 | 402 | } |
| 403 | +#if defined(NRF52811_XXAA) |
| 404 | + TwoWire Wire(NRF_TWIM0, NRF_TWIS0, TWIM0_TWIS0_TWI0_SPIM1_SPIS1_SPI1_IRQn, PIN_WIRE_SDA, PIN_WIRE_SCL) |
| 405 | + #if WIRE_INTERFACES_COUNT > 0 |
| 406 | +extern "C" |
| 407 | +{ |
| 408 | + void TWIM0_TWIS0_TWI0_SPIM1_SPIS1_SPI1_IRQHandler(void) |
| 409 | + { |
| 410 | + Wire.onService(); |
| 411 | + } |
| 412 | +} |
| 413 | + #endif |
403 | 414 |
|
404 | | -TwoWire Wire(NRF_TWIM1, NRF_TWIS1, SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn, PIN_WIRE_SDA, PIN_WIRE_SCL); |
| 415 | +#elif defined(NRF52805_XXAA) |
405 | 416 |
|
406 | | -#if WIRE_INTERFACES_COUNT > 0 |
407 | | -extern "C" |
| 417 | + TwoWire Wire(NRF_TWIM0, NRF_TWIS0, TWIM0_TWIS0_TWI0_IRQn, PIN_WIRE_SDA, PIN_WIRE_SCL); |
| 418 | + |
| 419 | + #if WIRE_INTERFACES_COUNT > 0 |
| 420 | + extern "C" |
| 421 | + { |
| 422 | + void TWIM0_TWIS0_TWI0_IRQn_IRQHandler(void) |
| 423 | + { |
| 424 | + Wire.onService(); |
| 425 | + } |
| 426 | + } |
| 427 | + #endif |
| 428 | +#elif defined(NRF52810_XXAA) |
| 429 | + TwoWire Wire(NRF_TWIM0, NRF_TWIS0, TWIM0_TWIS0_TWI0_IRQn, PIN_WIRE_SDA, PIN_WIRE_SCL); |
| 430 | + #if WIRE_INTERFACES_COUNT > 0 |
| 431 | + extern "C" |
408 | 432 | { |
409 | | - void SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler(void) |
| 433 | + void TWIM0_TWIS0_TWI0_IRQHandler(void) |
410 | 434 | { |
411 | 435 | Wire.onService(); |
412 | 436 | } |
413 | 437 | } |
414 | | -#endif |
| 438 | + #endif |
| 439 | + |
| 440 | + |
| 441 | + |
| 442 | +#else |
| 443 | + |
| 444 | + TwoWire Wire(NRF_TWIM1, NRF_TWIS1, SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn, PIN_WIRE_SDA, PIN_WIRE_SCL); |
| 445 | + |
| 446 | + #if WIRE_INTERFACES_COUNT > 0 |
| 447 | + extern "C" |
| 448 | + { |
| 449 | + void SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler(void) |
| 450 | + { |
| 451 | + Wire.onService(); |
| 452 | + } |
| 453 | + } |
| 454 | + #endif |
| 455 | +#endif //defined(NRF52805_XXAA) |
415 | 456 |
|
416 | 457 | #if WIRE_INTERFACES_COUNT > 1 |
417 | 458 |
|
|
0 commit comments