#include <protocol/cs_Typedefs.h>
#include <protocol/cs_UicrPacket.h>
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
|
enum | GainIndex {
GAIN_LOW = 0
, GAIN_MIDDLE = 1
, GAIN_HIGH = 2
, GAIN_COUNT = 3
,
GAIN_SINGLE = 0
} |
|
enum | ButtonIndex {
BUTTON0 = 0
, BUTTON1 = 1
, BUTTON2 = 2
, BUTTON3 = 3
,
BUTTON_COUNT = 4
} |
|
enum | GpioIndex {
GPIO_INDEX0 = 0
, GPIO_INDEX1 = 1
, GPIO_INDEX2 = 2
, GPIO_INDEX3 = 3
,
GPIO_INDEX4 = 4
, GPIO_INDEX5 = 5
, GPIO_INDEX6 = 6
, GPIO_INDEX7 = 7
,
GPIO_INDEX8 = 8
, GPIO_INDEX9 = 9
, GPIO_INDEX_COUNT = 10
} |
|
enum | LedIndex {
LED0 = 0
, LED1 = 1
, LED2 = 2
, LED3 = 3
,
LED_COUNT = 4
, LED_RED = 0
, LED_GREEN = 1
} |
|
enum | Chipset { CHIPSET_NRF52832 = 0
, CHIPSET_NRF52833 = 1
, CHIPSET_NRF52840 = 2
} |
|
◆ ACR01B10B
◆ ACR01B10D
◆ ACR01B11A
◆ ACR01B13B
◆ ACR01B15A
◆ ACR01B1A
◆ ACR01B1B
◆ ACR01B1C
◆ ACR01B1D
◆ ACR01B1E
◆ ACR01B2A
◆ ACR01B2B
◆ ACR01B2C
◆ ACR01B2E
◆ ACR01B2G
◆ CR01R02v4
◆ CS_USB_DONGLE
#define CS_USB_DONGLE 200 |
◆ GUIDESTONE
◆ PCA10036
We use part of the UICR to store information about the hardware board.
So the firmware is independent on the hardware board (we don't need to know the board at compile time). Instead the firmware reads the hardware board type at runtime from the UICR and assigns the
◆ PCA10040
◆ PCA10056
◆ PCA10100
◆ PIN_NONE
◆ ButtonIndex
Enumerator |
---|
BUTTON0 | |
BUTTON1 | |
BUTTON2 | |
BUTTON3 | |
BUTTON_COUNT | |
◆ Chipset
Enumerator |
---|
CHIPSET_NRF52832 | |
CHIPSET_NRF52833 | |
CHIPSET_NRF52840 | |
◆ GainIndex
Enumerator |
---|
GAIN_LOW | |
GAIN_MIDDLE | |
GAIN_HIGH | |
GAIN_COUNT | |
GAIN_SINGLE | |
◆ GpioIndex
Enumerator |
---|
GPIO_INDEX0 | |
GPIO_INDEX1 | |
GPIO_INDEX2 | |
GPIO_INDEX3 | |
GPIO_INDEX4 | |
GPIO_INDEX5 | |
GPIO_INDEX6 | |
GPIO_INDEX7 | |
GPIO_INDEX8 | |
GPIO_INDEX9 | |
GPIO_INDEX_COUNT | |
◆ LedIndex
Enumerator |
---|
LED0 | |
LED1 | |
LED2 | |
LED3 | |
LED_COUNT | |
LED_RED | |
LED_GREEN | |
◆ configure_board()
Configure board.
This function reads a board type id from UICR. This is a dedicated part in memory that is preserved across firmware updates and set only once in the factory. Using this board type id, the p_config parameter is filled with the relevant values. If the UICR has not been written before it will read 0xFFFFFFFF and a default board is chosen, see implementation.
- Parameters
-
p_config | configuration to be populated |
- Returns
- error value (NRF_SUCCESS or NRF_ERROR_INVALID_PARAM)
◆ configure_board_from_hardware_board()
◆ configure_board_from_uicr()
◆ GetGpioPin()
uint8_t GetGpioPin |
( |
uint8_t |
major, |
|
|
uint8_t |
minor |
|
) |
| |
◆ GpioToAin()
uint8_t GpioToAin |
( |
uint8_t |
gpio | ) |
|
◆ GpioToAinOnChipset()
uint8_t GpioToAinOnChipset |
( |
uint8_t |
gpio, |
|
|
uint8_t |
chipset |
|
) |
| |
Maps GPIO pins to AIN pins.
nRF52832
◆ init()
initializes a board config to default values.