update pca10056, clean files

This commit is contained in:
hathach
2018-12-03 23:39:34 +07:00
parent a39516e03d
commit 3a573fdd89
75 changed files with 5 additions and 60191 deletions
+5 -11
View File
@@ -46,6 +46,7 @@
/*------------------------------------------------------------------*/
/* MACRO TYPEDEF CONSTANT ENUM
*------------------------------------------------------------------*/
#define LED_PIN 13
#define LED_STATE_ON 0
uint8_t _button_pins[] = { 11, 12, 24, 25 };
@@ -92,15 +93,8 @@ void board_init(void)
NRF_CLOCK->TASKS_LFCLKSTART = 1UL;
// LEDs
nrf_gpio_cfg_output(BOARD_LED0);
nrf_gpio_cfg_output(BOARD_LED1);
nrf_gpio_cfg_output(BOARD_LED2);
nrf_gpio_cfg_output(BOARD_LED3);
board_led_control(BOARD_LED0, false);
board_led_control(BOARD_LED1, false);
board_led_control(BOARD_LED2, false);
board_led_control(BOARD_LED3, false);
nrf_gpio_cfg_output(LED_PIN);
board_led_control(false);
// Button
for(uint8_t i=0; i<BOARD_BUTTON_COUNT; i++) nrf_gpio_cfg_input(_button_pins[i], NRF_GPIO_PIN_PULLUP);
@@ -223,9 +217,9 @@ void board_init(void)
}
}
void board_led_control(uint32_t led_id, bool state)
void board_led_control(bool state)
{
nrf_gpio_pin_write(led_id, state ? LED_STATE_ON : (1-LED_STATE_ON));
nrf_gpio_pin_write(LED_PIN, state ? LED_STATE_ON : (1-LED_STATE_ON));
}
uint32_t board_buttons(void)
-6
View File
@@ -45,12 +45,6 @@
extern "C" {
#endif
#define BOARD_LED_NUM 4
#define BOARD_LED0 13
#define BOARD_LED1 14
#define BOARD_LED2 15
#define BOARD_LED3 16
// Flash type used for MSC example
#define BOARD_MSC_FLASH_QSPI
#define BOARD_MSC_FLASH_SIZE (8*1024*1024)