|
| 1 | +#ifndef NRF52833DK_NRF52833_CONFIG_H__ |
| 2 | +#define NRF52833DK_NRF52833_CONFIG_H__ |
| 3 | + |
| 4 | +#define LOOPBACK_PIN_1A 3 |
| 5 | +#define LOOPBACK_PIN_1B 31 |
| 6 | +#define LOOPBACK_PIN_2A 4 |
| 7 | +#define LOOPBACK_PIN_2B 30 |
| 8 | +#define LOOPBACK_PIN_3A 28 |
| 9 | +#define LOOPBACK_PIN_3B 29 |
| 10 | +#define LOOPBACK_PIN_4A 26 |
| 11 | +#define LOOPBACK_PIN_4B 27 |
| 12 | + |
| 13 | +#define LED1_PIN 13 |
| 14 | +#define LED2_PIN 14 |
| 15 | +#define LED3_PIN 15 |
| 16 | +#define LED4_PIN 16 |
| 17 | + |
| 18 | +/** @brief Symbol specifying analog input associated with analog pin A0 on the Development Kit. */ |
| 19 | +#define ANALOG_INPUT_A0 1 |
| 20 | +/** @brief Symbol specifying analog input associated with analog pin A1 on the Development Kit. */ |
| 21 | +#define ANALOG_INPUT_A1 2 |
| 22 | +/** @brief Symbol specifying analog input associated with analog pin A2 on the Development Kit. */ |
| 23 | +#define ANALOG_INPUT_A2 4 |
| 24 | + |
| 25 | +/* EXAMPLE-SPECIFIC DEFINES: */ |
| 26 | + |
| 27 | +/* NRFX_EGU */ |
| 28 | +/** @brief Symbol specifying EGU instance to be used in the nrfx_egu example. */ |
| 29 | +#define EGU_INST_IDX 0 |
| 30 | + |
| 31 | +/* NRFX_GPPI */ |
| 32 | +/** @brief Symbol specifying TIMER instance to be used in the nrfx_gppi examples. */ |
| 33 | +#define GPPI_TIMER_INST_IDX 0 |
| 34 | + |
| 35 | +/** @brief Symbol specifying GPIOTE instance to be used in the nrfx_gppi examples. */ |
| 36 | +#define GPPI_GPIOTE_INST_IDX 0 |
| 37 | + |
| 38 | +/** @brief Symbol specifying output pin associated with primary task in the nrfx_gppi examples. */ |
| 39 | +#define GPPI_OUTPUT_PIN_PRIMARY LED1_PIN |
| 40 | + |
| 41 | +/** @brief Symbol specifying output pin associated with fork task in the nrfx_gppi examples. */ |
| 42 | +#define GPPI_OUTPUT_PIN_FORK LED2_PIN |
| 43 | + |
| 44 | +/* NRFX_PWM */ |
| 45 | +/** @brief Symbol specifying PWM instance to be used in the nrfx_pwm examples. */ |
| 46 | +#define PWM_INST_IDX 0 |
| 47 | + |
| 48 | +/** @brief Symbol specifying a pin connected to LED to be used in the nrfx_pwm examples. */ |
| 49 | +#define PWM_LED1_PIN LED1_PIN |
| 50 | +/** @brief Symbol specifying a pin connected to LED to be used in the nrfx_pwm examples. */ |
| 51 | +#define PWM_LED2_PIN LED2_PIN |
| 52 | +/** @brief Symbol specifying a pin connected to LED to be used in the nrfx_pwm examples. */ |
| 53 | +#define PWM_LED3_PIN LED3_PIN |
| 54 | +/** @brief Symbol specifying a pin connected to LED to be used in the nrfx_pwm examples. */ |
| 55 | +#define PWM_LED4_PIN LED4_PIN |
| 56 | + |
| 57 | +/* NRFX_SAADC */ |
| 58 | +/** @brief Symbol specifying GPIOTE instance to be used in the nrfx_saadc examples. */ |
| 59 | +#define SAADC_GPIOTE_INST_IDX 0 |
| 60 | + |
| 61 | +/** @brief Symbol specifying timer instance to be used in the nrfx_saadc examples. */ |
| 62 | +#define SAADC_TIMER_INST_IDX 0 |
| 63 | +/** |
| 64 | + * @brief Symbol specifying the maximum number of SAADC channels that can be used in the |
| 65 | + * nrfx_saadc examples. |
| 66 | + */ |
| 67 | +#define SAADC_MAX_CHANNELS 3 |
| 68 | + |
| 69 | +/** @brief Symbol specifying analog input to be observed by SAADC channel 0 in the nrfx_saadc examples. */ |
| 70 | +#define SAADC_CH0_AIN ANALOG_INPUT_TO_SAADC_AIN(ANALOG_INPUT_A0) |
| 71 | +/** @brief Symbol specifying analog input to be observed by SAADC channel 1 in the nrfx_saadc examples. */ |
| 72 | +#define SAADC_CH1_AIN ANALOG_INPUT_TO_SAADC_AIN(ANALOG_INPUT_A1) |
| 73 | +/** @brief Symbol specifying analog input to be observed by SAADC channel 2 in the nrfx_saadc examples. */ |
| 74 | +#define SAADC_CH2_AIN ANALOG_INPUT_TO_SAADC_AIN(ANALOG_INPUT_A2) |
| 75 | + |
| 76 | +/** @brief Symbol specifying GPIO pin connected to SAADC channel 0 in the nrfx_saadc examples. */ |
| 77 | +#define SAADC_CH0_LOOPBACK_PIN LOOPBACK_PIN_1B |
| 78 | +/** @brief Symbol specifying GPIO pin connected to SAADC channel 1 in the nrfx_saadc examples. */ |
| 79 | +#define SAADC_CH1_LOOPBACK_PIN LOOPBACK_PIN_2B |
| 80 | +/** @brief Symbol specifying GPIO pin connected to SAADC channel 2 in the nrfx_saadc examples. */ |
| 81 | +#define SAADC_CH2_LOOPBACK_PIN LOOPBACK_PIN_3B |
| 82 | + |
| 83 | +/* NRFX_SPIM */ |
| 84 | +/** @brief Symbol specifying SPIM instance to be used in nrfx_spim examples. */ |
| 85 | +#define SPIM_INST_IDX 1 |
| 86 | + |
| 87 | +/* NRFX_SPIM_SPIS */ |
| 88 | +/** @brief Symbol specifying SPIM instance to be used in nrfx_spim_spis examples. */ |
| 89 | +#define SPIM_SPIS_SPIM_INST_IDX 1 |
| 90 | +/** @brief Symbol specifying SPIS instance to be used in nrfx_spim_spis examples. */ |
| 91 | +#define SPIM_SPIS_SPIS_INST_IDX 2 |
| 92 | + |
| 93 | +/** @brief Symbol specifying master's pin number for MOSI in nrfx_spim_spis examples. */ |
| 94 | +#define SPIM_SPIS_MOSI_PIN_MASTER LOOPBACK_PIN_1A |
| 95 | +/** @brief Symbol specifying slave's pin number for MOSI in nrfx_spim_spis examples. */ |
| 96 | +#define SPIM_SPIS_MOSI_PIN_SLAVE LOOPBACK_PIN_1B |
| 97 | +/** @brief Symbol specifying master's pin number for MISO in nrfx_spim_spis examples. */ |
| 98 | +#define SPIM_SPIS_MISO_PIN_MASTER LOOPBACK_PIN_2A |
| 99 | +/** @brief Symbol specifying slave's pin number for MISO in nrfx_spim_spis examples. */ |
| 100 | +#define SPIM_SPIS_MISO_PIN_SLAVE LOOPBACK_PIN_2B |
| 101 | +/** @brief Symbol specifying master's pin number for SCK in nrfx_spim_spis examples. */ |
| 102 | +#define SPIM_SPIS_SCK_PIN_MASTER LOOPBACK_PIN_3A |
| 103 | +/** @brief Symbol specifying slave's pin number for SCK in nrfx_spim_spis examples. */ |
| 104 | +#define SPIM_SPIS_SCK_PIN_SLAVE LOOPBACK_PIN_3B |
| 105 | +/** @brief Symbol specifying master's pin number for SS in nrfx_spim_spis examples. */ |
| 106 | +#define SPIM_SPIS_SS_PIN_MASTER LOOPBACK_PIN_4A |
| 107 | +/** @brief Symbol specifying slave's pin number for CSN in nrfx_spim_spis examples. */ |
| 108 | +#define SPIM_SPIS_CSN_PIN_SLAVE LOOPBACK_PIN_4B |
| 109 | + |
| 110 | +/* NRFX_TIMER */ |
| 111 | +/** @brief Symbol specifying timer instance to be used in nrfx_timer/timer example. */ |
| 112 | +#define TIMER_INST_IDX 0 |
| 113 | + |
| 114 | +/** @brief Symbol specifying timer instance to be used in timer mode (T) in nrfx_timer/counter example. */ |
| 115 | +#define TIMER_T_INST_IDX 0 |
| 116 | +/** @brief Symbol specifying timer instance to be used in counter mode (C) in nrfx_timer/counter example. */ |
| 117 | +#define TIMER_C_INST_IDX 1 |
| 118 | + |
| 119 | +/* NRFX_TWIM_TWIS */ |
| 120 | +/** @brief Symbol specifying TWIM instance to be used in nrfx_twim_twis examples. */ |
| 121 | +#define TWIM_INST_IDX 0 |
| 122 | +/** @brief Symbol specifying TWIS instance to be used in nrfx_twim_twis examples. */ |
| 123 | +#define TWIS_INST_IDX 1 |
| 124 | + |
| 125 | +/** @brief Symbol specifying pin number of master SCL to be used in nrfx_twim_twis examples. */ |
| 126 | +#define TWIM_TWIS_MASTER_SCL_PIN LOOPBACK_PIN_1A |
| 127 | +/** @brief Symbol specifying pin number of slave SCL to be used in nrfx_twim_twis examples. */ |
| 128 | +#define TWIM_TWIS_SLAVE_SCL_PIN LOOPBACK_PIN_1B |
| 129 | +/** @brief Symbol specifying pin number of master SDA to be used in nrfx_twim_twis examples. */ |
| 130 | +#define TWIM_TWIS_MASTER_SDA_PIN LOOPBACK_PIN_2A |
| 131 | +/** @brief Symbol specifying pin number of slave SDA to be used in nrfx_twim_twis examples. */ |
| 132 | +#define TWIM_TWIS_SLAVE_SDA_PIN LOOPBACK_PIN_2B |
| 133 | + |
| 134 | +/* NRFX_UARTE */ |
| 135 | +/** @brief Symbol specifying UARTE instance to be used in nrfx_uarte examples. */ |
| 136 | +#define UARTE_INST_IDX 1 |
| 137 | + |
| 138 | +/** @brief Symbol specifying TX pin number of UARTE to be used in nrfx_uarte examples. */ |
| 139 | +#define UARTE_TX_PIN LOOPBACK_PIN_1A |
| 140 | +/** @brief Symbol specifying RX pin number of UARTE to be used in nrfx_uarte examples. */ |
| 141 | +#define UARTE_RX_PIN LOOPBACK_PIN_1B |
| 142 | + |
| 143 | +#endif // NRF52833DK_NRF52833_CONFIG_H__ |
0 commit comments