nrf5/boards: Adding support for SPI, I2C, ADC, and Temp in machine modules in micro:bit target. Also activating hal drivers for the peripherals.
This commit is contained in:
parent
f2a7e198d2
commit
80c9c2e3c0
|
@ -30,10 +30,13 @@
|
|||
#define MICROPY_HW_MCU_NAME "NRF51822"
|
||||
#define MICROPY_PY_SYS_PLATFORM "nrf51"
|
||||
|
||||
#define MICROPY_PY_MACHINE_HW_SPI (0)
|
||||
#define MICROPY_PY_MACHINE_HW_SPI (1)
|
||||
#define MICROPY_PY_MACHINE_PWM (0)
|
||||
#define MICROPY_PY_MACHINE_TIMER (0)
|
||||
#define MICROPY_PY_MACHINE_RTC (0)
|
||||
#define MICROPY_PY_MACHINE_TIMER (1)
|
||||
#define MICROPY_PY_MACHINE_RTC (1)
|
||||
#define MICROPY_PY_MACHINE_I2C (1)
|
||||
#define MICROPY_PY_MACHINE_ADC (1)
|
||||
#define MICROPY_PY_MACHINE_TEMP (1)
|
||||
|
||||
#define MICROPY_PY_USOCKET (0)
|
||||
#define MICROPY_PY_NETWORK (0)
|
||||
|
@ -63,4 +66,10 @@
|
|||
#define MICROPY_HW_UART1_TX (pin_A24)
|
||||
#define MICROPY_HW_UART1_HWFC (0)
|
||||
|
||||
// SPI0 config
|
||||
#define MICROPY_HW_SPI0_NAME "SPI0"
|
||||
#define MICROPY_HW_SPI0_SCK (pin_A13)
|
||||
#define MICROPY_HW_SPI0_MOSI (pin_A15)
|
||||
#define MICROPY_HW_SPI0_MISO (pin_A14)
|
||||
|
||||
#define HELP_TEXT_BOARD_LED "1,2,3,4"
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
#define NRF51_HAL_CONF_H__
|
||||
|
||||
#define HAL_UART_MODULE_ENABLED
|
||||
// #define HAL_SPI_MODULE_ENABLED
|
||||
#define HAL_SPI_MODULE_ENABLED
|
||||
#define HAL_TIME_MODULE_ENABLED
|
||||
// #define HAL_RTC_MODULE_ENABLED
|
||||
// #define HAL_TIMER_MODULE_ENABLED
|
||||
#define HAL_RTC_MODULE_ENABLED
|
||||
#define HAL_TIMER_MODULE_ENABLED
|
||||
#define HAL_TWI_MODULE_ENABLED
|
||||
#define HAL_ADC_MODULE_ENABLED
|
||||
#define HAL_TEMP_MODULE_ENABLED
|
||||
|
||||
#endif // NRF51_HAL_CONF_H__
|
||||
|
|
Loading…
Reference in New Issue