File tree Expand file tree Collapse file tree 4 files changed +639
-473
lines changed
targets/TARGET_NORDIC/TARGET_NRF5x
TARGET_MCU_NRF52832/config
TARGET_MCU_NRF52840/config Expand file tree Collapse file tree 4 files changed +639
-473
lines changed Original file line number Diff line number Diff line change 2666
2666
2667
2667
2668
2668
#ifndef SPI0_USE_EASY_DMA
2669
- #define SPI0_USE_EASY_DMA 1
2669
+ #define SPI0_USE_EASY_DMA 0
2670
2670
#endif
2671
2671
2672
2672
// <o> SPI0_DEFAULT_FREQUENCY - SPI frequency
2688
2688
// <e> SPI1_ENABLED - Enable SPI1 instance
2689
2689
//==========================================================
2690
2690
#ifndef SPI1_ENABLED
2691
- #define SPI1_ENABLED 0
2691
+ #define SPI1_ENABLED 1
2692
2692
#endif
2693
2693
// <q> SPI1_USE_EASY_DMA - Use EasyDMA
2694
2694
2695
2695
2696
2696
#ifndef SPI1_USE_EASY_DMA
2697
- #define SPI1_USE_EASY_DMA 1
2697
+ #define SPI1_USE_EASY_DMA 0
2698
2698
#endif
2699
2699
2700
2700
// <o> SPI1_DEFAULT_FREQUENCY - SPI frequency
2716
2716
// <e> SPI2_ENABLED - Enable SPI2 instance
2717
2717
//==========================================================
2718
2718
#ifndef SPI2_ENABLED
2719
- #define SPI2_ENABLED 0
2719
+ #define SPI2_ENABLED 1
2720
2720
#endif
2721
2721
// <q> SPI2_USE_EASY_DMA - Use EasyDMA
2722
2722
2723
2723
2724
2724
#ifndef SPI2_USE_EASY_DMA
2725
- #define SPI2_USE_EASY_DMA 1
2725
+ #define SPI2_USE_EASY_DMA 0
2726
2726
#endif
2727
2727
2728
2728
// <o> SPI2_DEFAULT_FREQUENCY - SPI frequency
2928
2928
// <e> TWI_ENABLED - nrf_drv_twi - TWI/TWIM peripheral driver
2929
2929
//==========================================================
2930
2930
#ifndef TWI_ENABLED
2931
- #define TWI_ENABLED 0
2931
+ #define TWI_ENABLED 1
2932
2932
#endif
2933
2933
// <o> TWI_DEFAULT_CONFIG_FREQUENCY - Frequency
2934
2934
2988
2988
// <e> TWI1_ENABLED - Enable TWI1 instance
2989
2989
//==========================================================
2990
2990
#ifndef TWI1_ENABLED
2991
- #define TWI1_ENABLED 0
2991
+ #define TWI1_ENABLED 1
2992
2992
#endif
2993
2993
// <q> TWI1_USE_EASY_DMA - Use EasyDMA (if present)
2994
2994
Original file line number Diff line number Diff line change 2666
2666
2667
2667
2668
2668
#ifndef SPI0_USE_EASY_DMA
2669
- #define SPI0_USE_EASY_DMA 1
2669
+ #define SPI0_USE_EASY_DMA 0
2670
2670
#endif
2671
2671
2672
2672
// <o> SPI0_DEFAULT_FREQUENCY - SPI frequency
2688
2688
// <e> SPI1_ENABLED - Enable SPI1 instance
2689
2689
//==========================================================
2690
2690
#ifndef SPI1_ENABLED
2691
- #define SPI1_ENABLED 0
2691
+ #define SPI1_ENABLED 1
2692
2692
#endif
2693
2693
// <q> SPI1_USE_EASY_DMA - Use EasyDMA
2694
2694
2695
2695
2696
2696
#ifndef SPI1_USE_EASY_DMA
2697
- #define SPI1_USE_EASY_DMA 1
2697
+ #define SPI1_USE_EASY_DMA 0
2698
2698
#endif
2699
2699
2700
2700
// <o> SPI1_DEFAULT_FREQUENCY - SPI frequency
2716
2716
// <e> SPI2_ENABLED - Enable SPI2 instance
2717
2717
//==========================================================
2718
2718
#ifndef SPI2_ENABLED
2719
- #define SPI2_ENABLED 0
2719
+ #define SPI2_ENABLED 1
2720
2720
#endif
2721
2721
// <q> SPI2_USE_EASY_DMA - Use EasyDMA
2722
2722
2723
2723
2724
2724
#ifndef SPI2_USE_EASY_DMA
2725
- #define SPI2_USE_EASY_DMA 1
2725
+ #define SPI2_USE_EASY_DMA 0
2726
2726
#endif
2727
2727
2728
2728
// <o> SPI2_DEFAULT_FREQUENCY - SPI frequency
2928
2928
// <e> TWI_ENABLED - nrf_drv_twi - TWI/TWIM peripheral driver
2929
2929
//==========================================================
2930
2930
#ifndef TWI_ENABLED
2931
- #define TWI_ENABLED 0
2931
+ #define TWI_ENABLED 1
2932
2932
#endif
2933
2933
// <o> TWI_DEFAULT_CONFIG_FREQUENCY - Frequency
2934
2934
2988
2988
// <e> TWI1_ENABLED - Enable TWI1 instance
2989
2989
//==========================================================
2990
2990
#ifndef TWI1_ENABLED
2991
- #define TWI1_ENABLED 0
2991
+ #define TWI1_ENABLED 1
2992
2992
#endif
2993
2993
// <q> TWI1_USE_EASY_DMA - Use EasyDMA (if present)
2994
2994
Original file line number Diff line number Diff line change 43
43
#include "PortNames.h"
44
44
#include "PeripheralNames.h"
45
45
#include "PinNames.h"
46
+ #include "nrf_drv_spi.h"
47
+ #include "nrf_twi.h"
46
48
47
49
#include "nrf_pwm.h"
48
50
@@ -55,7 +57,16 @@ struct serial_s {
55
57
}; // but it must be not empty (required by strict compiler - IAR)
56
58
57
59
struct spi_s {
58
- uint8_t spi_idx ;
60
+ int instance ;
61
+ PinName cs ;
62
+ nrf_drv_spi_config_t config ;
63
+ bool update ;
64
+
65
+ #if DEVICE_SPI_ASYNCH
66
+ uint32_t handler ;
67
+ uint32_t mask ;
68
+ uint32_t event ;
69
+ #endif
59
70
};
60
71
61
72
struct port_s {
@@ -73,7 +84,19 @@ struct pwmout_s {
73
84
};
74
85
75
86
struct i2c_s {
76
- uint8_t twi_idx ;
87
+ int instance ;
88
+ PinName sda ;
89
+ PinName scl ;
90
+ nrf_twi_frequency_t frequency ;
91
+ int state ;
92
+ int mode ;
93
+ bool update ;
94
+
95
+ #if DEVICE_I2C_ASYNCH
96
+ uint32_t handler ;
97
+ uint32_t mask ;
98
+ uint32_t event ;
99
+ #endif
77
100
};
78
101
79
102
struct analogin_s {
You can’t perform that action at this time.
0 commit comments