From a2bc921383ad66bfa8fb93e04c2dd02802d231ef Mon Sep 17 00:00:00 2001 From: jhChun Date: Mon, 30 Mar 2026 18:00:38 +0900 Subject: [PATCH] =?UTF-8?q?LED=20=EC=A7=81=EC=A0=91=20=EC=A0=9C=EC=96=B4?= =?UTF-8?q?=20=EB=AA=A8=EB=93=88=20=EC=B6=94=EA=B0=80(BSP=20=EB=8C=80?= =?UTF-8?q?=EC=B2=B4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 전원 ON/OFF, 블루투스 스캐닝 초록 LED 적용 완료 --- .../ble_app_bladder_patch/led_control.c | 292 +++++++++++++++++ .../ble_app_bladder_patch/led_control.h | 52 ++++ .../ble_app_bladder_patch/main.c | 24 +- .../ble_app_bladder_patch_s140.uvoptx | 294 +++++++++--------- .../ble_app_bladder_patch_s140.uvprojx | 10 + 5 files changed, 520 insertions(+), 152 deletions(-) create mode 100644 project/ble_peripheral/ble_app_bladder_patch/led_control.c create mode 100644 project/ble_peripheral/ble_app_bladder_patch/led_control.h diff --git a/project/ble_peripheral/ble_app_bladder_patch/led_control.c b/project/ble_peripheral/ble_app_bladder_patch/led_control.c new file mode 100644 index 0000000..f543819 --- /dev/null +++ b/project/ble_peripheral/ble_app_bladder_patch/led_control.c @@ -0,0 +1,292 @@ +/******************************************************************************* + * @file led_control.c + * @brief LED 직접 제어 드라이버 (BSP 미사용) + * @date 2026-03-30 + * + * app_timer 1개로 2색 LED(녹색/주황)의 복합 blink 패턴 구현 + * 단순 on/off 상태는 타이머 없이 즉시 GPIO 제어 + * 복합 패턴(에러 등)은 phase 기반 state machine으로 처리 + ******************************************************************************/ + +#include "led_control.h" +#include "nrf_gpio.h" +#include "app_timer.h" + +/*============================================================================== + * 내부 상수 + *============================================================================*/ +#define MS_TO_TICKS(ms) APP_TIMER_TICKS(ms) + +/*============================================================================== + * 색상 + *============================================================================*/ +#define COLOR_NONE 0 +#define COLOR_GREEN 1 +#define COLOR_ORANGE 2 + +/*============================================================================== + * 에러 패턴 상수 (No.7) + * 3Hz 깜빡 3회 = 166ms on + 166ms off × 3 = ~1초, 이후 꺼짐 1초 + *============================================================================*/ +#define ERROR_BLINK_ON_MS 166 +#define ERROR_BLINK_OFF_MS 166 +#define ERROR_BLINK_COUNT 3 +#define ERROR_PAUSE_MS 1000 + +/*============================================================================== + * 패턴 테이블 (단순 blink 용) + *============================================================================*/ +typedef struct +{ + uint32_t on_ms; /* LED 켜짐 시간 (ms) */ + uint32_t off_ms; /* LED 꺼짐 시간 (ms) */ + uint8_t color; /* COLOR_GREEN 또는 COLOR_ORANGE */ + bool repeat; /* true: 무한 반복, false: 1회 후 OFF */ +} led_pattern_t; + +static const led_pattern_t m_patterns[LED_STATE_COUNT] = +{ + [LED_STATE_OFF] = { 0, 0, COLOR_NONE, false }, + [LED_STATE_POWER_ON] = { 2000, 0, COLOR_GREEN, false }, /* 초록 점등 2초 → 유지 */ + [LED_STATE_POWER_OFF] = { 2000, 0, COLOR_GREEN, false }, /* 초록 점등 2초 → OFF */ + [LED_STATE_ADVERTISING] = { 1000, 1000, COLOR_GREEN, true }, /* 초록 점멸 1초 */ + [LED_STATE_DETACH_WARNING] = { 1000, 3000, COLOR_GREEN, true }, /* 초록 1초 on / 3초 off */ + [LED_STATE_ALIGN_SEARCHING] = { 1000, 1000, COLOR_ORANGE, true }, /* 주황 점멸 1초 */ + [LED_STATE_ALIGN_COMPLETE] = { 3000, 1000, COLOR_GREEN, true }, /* 초록 3초 on / 1초 off */ + [LED_STATE_ERROR] = { 0, 0, COLOR_ORANGE, true } /* 별도 state machine */ +}; + +/*============================================================================== + * 모듈 변수 + *============================================================================*/ +APP_TIMER_DEF(m_led_timer); + +static led_state_t m_current_state = LED_STATE_OFF; +static bool m_phase_on; /* true: LED 켜진 구간, false: 꺼진 구간 */ + +/* 에러 패턴 전용 */ +static uint8_t m_error_blink_cnt; /* 현재까지 깜빡인 횟수 */ +static uint8_t m_error_phase; /* 0: blink-on, 1: blink-off, 2: pause */ + +/*============================================================================== + * GPIO 헬퍼 + *============================================================================*/ + +static inline void led_green_on(void) +{ +#if LED_ACTIVE_LOW + nrf_gpio_pin_clear(LED_PIN_GREEN); +#else + nrf_gpio_pin_set(LED_PIN_GREEN); +#endif +} + +static inline void led_green_off(void) +{ +#if LED_ACTIVE_LOW + nrf_gpio_pin_set(LED_PIN_GREEN); +#else + nrf_gpio_pin_clear(LED_PIN_GREEN); +#endif +} + +static inline void led_orange_on(void) +{ +#if LED_ACTIVE_LOW + nrf_gpio_pin_clear(LED_PIN_ORANGE); +#else + nrf_gpio_pin_set(LED_PIN_ORANGE); +#endif +} + +static inline void led_orange_off(void) +{ +#if LED_ACTIVE_LOW + nrf_gpio_pin_set(LED_PIN_ORANGE); +#else + nrf_gpio_pin_clear(LED_PIN_ORANGE); +#endif +} + +static void led_all_off(void) +{ + led_green_off(); + led_orange_off(); +} + +static void led_color_on(uint8_t color) +{ + led_all_off(); + if (color == COLOR_GREEN) led_green_on(); + else if (color == COLOR_ORANGE) led_orange_on(); +} + +/*============================================================================== + * 타이머 시작 헬퍼 + *============================================================================*/ +static void timer_start_ms(uint32_t ms) +{ + if (ms == 0) return; + app_timer_start(m_led_timer, MS_TO_TICKS(ms), NULL); +} + +/*============================================================================== + * 에러 패턴 state machine (No.7) + * phase 0: LED ON (166ms) → phase 1 + * phase 1: LED OFF (166ms) → cnt++ → cnt<3 ? phase 0 : phase 2 + * phase 2: PAUSE (1000ms) → cnt=0, phase 0 + *============================================================================*/ +static void error_pattern_start(void) +{ + m_error_blink_cnt = 0; + m_error_phase = 0; + led_color_on(COLOR_ORANGE); + timer_start_ms(ERROR_BLINK_ON_MS); +} + +static void error_pattern_tick(void) +{ + switch (m_error_phase) + { + case 0: /* ON 구간 끝 → OFF */ + led_all_off(); + m_error_phase = 1; + timer_start_ms(ERROR_BLINK_OFF_MS); + break; + + case 1: /* OFF 구간 끝 */ + m_error_blink_cnt++; + if (m_error_blink_cnt < ERROR_BLINK_COUNT) + { + /* 다시 ON */ + m_error_phase = 0; + led_color_on(COLOR_ORANGE); + timer_start_ms(ERROR_BLINK_ON_MS); + } + else + { + /* 3회 완료 → pause */ + m_error_phase = 2; + timer_start_ms(ERROR_PAUSE_MS); + } + break; + + case 2: /* pause 끝 → 처음부터 */ + m_error_blink_cnt = 0; + m_error_phase = 0; + led_color_on(COLOR_ORANGE); + timer_start_ms(ERROR_BLINK_ON_MS); + break; + + default: + break; + } +} + +/*============================================================================== + * 타이머 콜백 + *============================================================================*/ +static void led_timer_handler(void * p_context) +{ + (void)p_context; + + /* 에러 상태는 별도 처리 */ + if (m_current_state == LED_STATE_ERROR) + { + error_pattern_tick(); + return; + } + + const led_pattern_t * p = &m_patterns[m_current_state]; + + if (m_phase_on) + { + /* ON→OFF 전환 */ + led_all_off(); + m_phase_on = false; + + if (p->off_ms > 0) + { + timer_start_ms(p->off_ms); + } + else if (!p->repeat) + { + /* 1회성: off_ms == 0 이면 그냥 유지 (POWER_ON) 또는 끄기 (POWER_OFF) */ + if (m_current_state == LED_STATE_POWER_OFF) + { + led_all_off(); + m_current_state = LED_STATE_OFF; + } + /* POWER_ON: 점등 유지 상태 → 타이머 x */ + } + } + else + { + /* OFF → ON 전환 */ + if (p->repeat) + { + led_color_on(p->color); + m_phase_on = true; + timer_start_ms(p->on_ms); + } + /* repeat == false && off_ms > 0 인 경우는 현재 없음 */ + } +} + +/*============================================================================== + * 공개 함수 + *============================================================================*/ + +void led_init(void) +{ + /* GPIO 출력 설정 */ + nrf_gpio_cfg_output(LED_PIN_GREEN); + nrf_gpio_cfg_output(LED_PIN_ORANGE); + led_all_off(); + + /* 타이머 생성 (single-shot) */ + app_timer_create(&m_led_timer, APP_TIMER_MODE_SINGLE_SHOT, led_timer_handler); + + m_current_state = LED_STATE_OFF; +} + +void led_set_state(led_state_t state) +{ + if (state >= LED_STATE_COUNT) return; + + /* 이전 패턴 중단 */ + app_timer_stop(m_led_timer); + led_all_off(); + + m_current_state = state; + m_phase_on = false; + + const led_pattern_t * p = &m_patterns[state]; + + switch (state) + { + case LED_STATE_OFF: + /* 이미 all off */ + break; + + /* 에러 패턴: 별도 state machine */ + case LED_STATE_ERROR: + error_pattern_start(); + break; + + /* 그 외: on 구간부터 시작 */ + default: + led_color_on(p->color); + m_phase_on = true; + if (p->on_ms > 0) + { + timer_start_ms(p->on_ms); + } + break; + } +} + +led_state_t led_get_state(void) +{ + return m_current_state; +} diff --git a/project/ble_peripheral/ble_app_bladder_patch/led_control.h b/project/ble_peripheral/ble_app_bladder_patch/led_control.h new file mode 100644 index 0000000..a844466 --- /dev/null +++ b/project/ble_peripheral/ble_app_bladder_patch/led_control.h @@ -0,0 +1,52 @@ +/******************************************************************************* + * @file led_control.h + * @brief LED 직접 제어 드라이버 (BSP 미사용) + * @date 2026-03-30 + * + * 녹색(P0.12) + 주황(P0.29) 2색 LED를 app_timer 기반으로 제어 + * 각 상태별 on/off 시간, 색상, 반복 패턴을 테이블로 관리 + ******************************************************************************/ + +#ifndef LED_CONTROL_H__ +#define LED_CONTROL_H__ + +#include +#include + +/*============================================================================== + * LED 핀 정의 + *============================================================================*/ +#define LED_PIN_GREEN NRF_GPIO_PIN_MAP(0, 12) /* 녹색 LED */ +#define LED_PIN_ORANGE NRF_GPIO_PIN_MAP(0, 29) /* 주황 LED */ +#define LED_ACTIVE_LOW 1 /* 1 = Active Low (GPIO LOW에서 LED 켜짐) */ + +/*============================================================================== + * LED 상태 열거형 + *============================================================================*/ +typedef enum +{ + LED_STATE_OFF = 0, /* 모든 LED 소등 */ + LED_STATE_POWER_ON, /* 1: 전원 ON - 초록 소등 → 녹색 점등 2초 */ + LED_STATE_POWER_OFF, /* 2: 전원 OFF - 초록 점등 2초 → 소등 */ + LED_STATE_ADVERTISING, /* 3: 블루투스 스캐닝 - 초록 점멸 1초 간격(반복) */ + LED_STATE_DETACH_WARNING, /* 4: 정상 작동중(미부착 시) - 초록 점등 1초 / 소등 3초 (반복) */ + LED_STATE_ALIGN_SEARCHING, /* 5: 정렬모드(탐지중) - 주황 점멸 1초 간격 (반복) */ + LED_STATE_ALIGN_COMPLETE, /* 6: 정렬모드(탐지 완료) - 초록 점등 3초 / 소등 1초 */ + LED_STATE_ERROR, /* 7: 오류 발생 - 주황 3Hz 깜빡 3회 / 꺼짐 1초 (반복) */ + LED_STATE_COUNT /* 배열 크기 */ +} led_state_t; + +/*============================================================================== + * 공개 함수 + *============================================================================*/ + +/** @brief LED GPIO 초기화 + 타이머 생성 - main()에서 1회 호출 */ +void led_init(void); + +/** @brief LED 상태 변경 - 이전 패턴을 즉시 중단하고 새 패턴 시작 */ +void led_set_state(led_state_t state); + +/** @brief 현재 LED 상태 조회 */ +led_state_t led_get_state(void); + +#endif /* LED_CONTROL_H__ */ diff --git a/project/ble_peripheral/ble_app_bladder_patch/main.c b/project/ble_peripheral/ble_app_bladder_patch/main.c index a12a39d..b515df0 100644 --- a/project/ble_peripheral/ble_app_bladder_patch/main.c +++ b/project/ble_peripheral/ble_app_bladder_patch/main.c @@ -114,6 +114,7 @@ #include "debug_print.h" /* 디버그 출력 매크로 (DBG_PRINTF) */ #include "fstorage.h" /* Flash Storage 래퍼 (FDS 초기화/저장/로드) */ #include "dr_piezo.h" /* 피에조 초음파 드라이버 */ +#include "led_control.h" /* LED 직접 제어 드라이버 (BSP 미사용) */ @@ -439,7 +440,7 @@ static void t_power_off_timeout_handler(void * p_context) UNUSED_PARAMETER(p_context); APP_ERROR_CHECK(app_timer_stop(m_power_off_delay_timer_id)); DBG_PRINTF("[PWR] Off timeout\r\n"); - bsp_indication_set(BSP_INDICATE_USER_STATE_OFF); /* LED OFF */ + led_set_state(LED_STATE_OFF); /* LED OFF */ power_control_handler(OFF); /* P0.8 LOW → 전원 차단 */ } @@ -798,7 +799,7 @@ static void on_adv_evt(ble_adv_evt_t ble_adv_evt) switch (ble_adv_evt) { case BLE_ADV_EVT_FAST: - bsp_indication_set(BSP_INDICATE_ADVERTISING); + led_set_state(LED_STATE_ADVERTISING); DBG_PRINTF("[ADV] Fast\r\n"); break; case BLE_ADV_EVT_IDLE: @@ -1067,8 +1068,7 @@ static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context) APP_ERROR_CHECK(err_code); } - err_code = bsp_indication_set(BSP_INDICATE_CONNECTED); - APP_ERROR_CHECK(err_code); + led_set_state(LED_STATE_OFF); /* 연결 완료 → LED OFF */ break; @@ -1191,7 +1191,7 @@ void bsp_event_handler(bsp_event_t event) if (processing == false) { DBG_PRINTF("[BSP] Power\r\n"); - bsp_indication_set(BSP_INDICATE_USER_STATE_ON); + led_set_state(LED_STATE_POWER_OFF); go_device_power_off = true; main_timer_start(); } @@ -1206,14 +1206,16 @@ void bsp_event_handler(bsp_event_t event) * 유틸리티 함수 *============================================================================*/ -/** @brief BSP 버튼/LED 초기화 (부트 Phase 5) */ +/** @brief BSP 버튼 초기화 + LED 직접 초기화 (부트 Phase 5) */ static void buttons_leds_init(bool * p_erase_bonds) { bsp_event_t startup_event; - uint32_t err_code = bsp_init(BSP_INIT_LEDS | BSP_INIT_BUTTONS, bsp_event_handler); + uint32_t err_code = bsp_init(BSP_INIT_BUTTONS, bsp_event_handler); APP_ERROR_CHECK(err_code); + led_init(); + err_code = bsp_btn_ble_init(NULL, &startup_event); APP_ERROR_CHECK(err_code); @@ -1342,7 +1344,7 @@ void assert_nrf_callback(uint16_t line_num, const uint8_t * p_file_name) */ void sleep_mode_enter(void) { - bsp_indication_set(BSP_INDICATE_USER_STATE_ON); + led_set_state(LED_STATE_POWER_OFF); DBG_PRINTF("[SYS] Sleep\r\n"); APP_ERROR_CHECK(app_timer_start(m_power_off_delay_timer_id, APP_TIMER_TICKS(POWER_OFF_DELAY), NULL)); } @@ -1355,7 +1357,7 @@ void sleep_mode_enter(void) */ void device_power_off(void) { - bsp_indication_set(BSP_INDICATE_USER_STATE_ON); + led_set_state(LED_STATE_POWER_OFF); APP_ERROR_CHECK(app_timer_start(m_power_off_delay_timer_id, APP_TIMER_TICKS(POWER_OFF_DELAY), NULL)); } @@ -1612,7 +1614,7 @@ static void main_s(void * p_context) if ((cnt_s < 150) && (m_reset_status != 2)) { DBG_PRINTF("[BTN] Short->OFF\r\n"); - bsp_indication_set(BSP_INDICATE_USER_STATE_OFF); + led_set_state(LED_STATE_OFF); power_control_handler(OFF); cnt_s = 0; } @@ -1654,7 +1656,7 @@ static void main_s(void * p_context) device_reset = false; if (cnt_s == 150) { - bsp_indication_set(BSP_INDICATE_USER_STATE_ON); + led_set_state(LED_STATE_POWER_ON); DBG_PRINTF("[BTN] 1.5s\r\n"); } diff --git a/project/ble_peripheral/ble_app_bladder_patch/pca10056/s140/arm5_no_packs/ble_app_bladder_patch_s140.uvoptx b/project/ble_peripheral/ble_app_bladder_patch/pca10056/s140/arm5_no_packs/ble_app_bladder_patch_s140.uvoptx index f4b1073..d8f552b 100644 --- a/project/ble_peripheral/ble_app_bladder_patch/pca10056/s140/arm5_no_packs/ble_app_bladder_patch_s140.uvoptx +++ b/project/ble_peripheral/ble_app_bladder_patch/pca10056/s140/arm5_no_packs/ble_app_bladder_patch_s140.uvoptx @@ -1416,6 +1416,18 @@ 0 0 + + 1 + 23 + 1 + 0 + 0 + 0 + ..\..\..\led_control.c + led_control.c + 0 + 0 + @@ -1426,7 +1438,7 @@ 0 2 - 23 + 24 1 0 0 @@ -1446,7 +1458,7 @@ 0 3 - 24 + 25 1 0 0 @@ -1458,7 +1470,7 @@ 3 - 25 + 26 1 0 0 @@ -1478,7 +1490,7 @@ 0 4 - 26 + 27 1 0 0 @@ -1498,7 +1510,7 @@ 0 5 - 27 + 28 1 0 0 @@ -1510,7 +1522,7 @@ 5 - 28 + 29 1 0 0 @@ -1522,7 +1534,7 @@ 5 - 29 + 30 1 0 0 @@ -1534,7 +1546,7 @@ 5 - 30 + 31 1 0 0 @@ -1546,7 +1558,7 @@ 5 - 31 + 32 1 0 0 @@ -1558,7 +1570,7 @@ 5 - 32 + 33 1 0 0 @@ -1570,7 +1582,7 @@ 5 - 33 + 34 1 0 0 @@ -1582,7 +1594,7 @@ 5 - 34 + 35 1 0 0 @@ -1594,7 +1606,7 @@ 5 - 35 + 36 1 0 0 @@ -1606,7 +1618,7 @@ 5 - 36 + 37 1 0 0 @@ -1618,7 +1630,7 @@ 5 - 37 + 38 1 0 0 @@ -1630,7 +1642,7 @@ 5 - 38 + 39 1 0 0 @@ -1642,7 +1654,7 @@ 5 - 39 + 40 1 0 0 @@ -1654,7 +1666,7 @@ 5 - 40 + 41 1 0 0 @@ -1666,7 +1678,7 @@ 5 - 41 + 42 1 0 0 @@ -1678,7 +1690,7 @@ 5 - 42 + 43 1 0 0 @@ -1690,7 +1702,7 @@ 5 - 43 + 44 1 0 0 @@ -1702,7 +1714,7 @@ 5 - 44 + 45 1 0 0 @@ -1714,7 +1726,7 @@ 5 - 45 + 46 1 0 0 @@ -1726,7 +1738,7 @@ 5 - 46 + 47 1 0 0 @@ -1746,7 +1758,7 @@ 0 6 - 47 + 48 1 0 0 @@ -1766,7 +1778,7 @@ 0 7 - 48 + 49 1 0 0 @@ -1778,7 +1790,7 @@ 7 - 49 + 50 1 0 0 @@ -1790,7 +1802,7 @@ 7 - 50 + 51 1 0 0 @@ -1802,7 +1814,7 @@ 7 - 51 + 52 1 0 0 @@ -1814,7 +1826,7 @@ 7 - 52 + 53 1 0 0 @@ -1826,7 +1838,7 @@ 7 - 53 + 54 1 0 0 @@ -1838,7 +1850,7 @@ 7 - 54 + 55 1 0 0 @@ -1850,7 +1862,7 @@ 7 - 55 + 56 1 0 0 @@ -1862,7 +1874,7 @@ 7 - 56 + 57 1 0 0 @@ -1874,7 +1886,7 @@ 7 - 57 + 58 1 0 0 @@ -1886,7 +1898,7 @@ 7 - 58 + 59 1 0 0 @@ -1898,7 +1910,7 @@ 7 - 59 + 60 1 0 0 @@ -1910,7 +1922,7 @@ 7 - 60 + 61 1 0 0 @@ -1922,7 +1934,7 @@ 7 - 61 + 62 1 0 0 @@ -1934,7 +1946,7 @@ 7 - 62 + 63 1 0 0 @@ -1946,7 +1958,7 @@ 7 - 63 + 64 1 0 0 @@ -1958,7 +1970,7 @@ 7 - 64 + 65 1 0 0 @@ -1970,7 +1982,7 @@ 7 - 65 + 66 1 0 0 @@ -1982,7 +1994,7 @@ 7 - 66 + 67 1 0 0 @@ -1994,7 +2006,7 @@ 7 - 67 + 68 5 0 0 @@ -2014,7 +2026,7 @@ 0 8 - 68 + 69 1 0 0 @@ -2026,7 +2038,7 @@ 8 - 69 + 70 1 0 0 @@ -2038,7 +2050,7 @@ 8 - 70 + 71 1 0 0 @@ -2050,7 +2062,7 @@ 8 - 71 + 72 1 0 0 @@ -2062,7 +2074,7 @@ 8 - 72 + 73 1 0 0 @@ -2074,7 +2086,7 @@ 8 - 73 + 74 1 0 0 @@ -2086,7 +2098,7 @@ 8 - 74 + 75 1 0 0 @@ -2098,7 +2110,7 @@ 8 - 75 + 76 1 0 0 @@ -2110,7 +2122,7 @@ 8 - 76 + 77 1 0 0 @@ -2122,7 +2134,7 @@ 8 - 77 + 78 1 0 0 @@ -2134,7 +2146,7 @@ 8 - 78 + 79 1 0 0 @@ -2146,7 +2158,7 @@ 8 - 79 + 80 1 0 0 @@ -2158,7 +2170,7 @@ 8 - 80 + 81 1 0 0 @@ -2170,7 +2182,7 @@ 8 - 81 + 82 1 0 0 @@ -2182,7 +2194,7 @@ 8 - 82 + 83 1 0 0 @@ -2194,7 +2206,7 @@ 8 - 83 + 84 1 0 0 @@ -2206,7 +2218,7 @@ 8 - 84 + 85 1 0 0 @@ -2218,7 +2230,7 @@ 8 - 85 + 86 1 0 0 @@ -2230,7 +2242,7 @@ 8 - 86 + 87 1 0 0 @@ -2242,7 +2254,7 @@ 8 - 87 + 88 1 0 0 @@ -2254,7 +2266,7 @@ 8 - 88 + 89 1 0 0 @@ -2266,7 +2278,7 @@ 8 - 89 + 90 1 0 0 @@ -2278,7 +2290,7 @@ 8 - 90 + 91 1 0 0 @@ -2290,7 +2302,7 @@ 8 - 91 + 92 1 0 0 @@ -2302,7 +2314,7 @@ 8 - 92 + 93 1 0 0 @@ -2314,7 +2326,7 @@ 8 - 93 + 94 1 0 0 @@ -2326,7 +2338,7 @@ 8 - 94 + 95 1 0 0 @@ -2338,7 +2350,7 @@ 8 - 95 + 96 1 0 0 @@ -2350,7 +2362,7 @@ 8 - 96 + 97 1 0 0 @@ -2370,7 +2382,7 @@ 0 9 - 97 + 98 1 0 0 @@ -2382,7 +2394,7 @@ 9 - 98 + 99 1 0 0 @@ -2394,7 +2406,7 @@ 9 - 99 + 100 1 0 0 @@ -2406,7 +2418,7 @@ 9 - 100 + 101 1 0 0 @@ -2418,7 +2430,7 @@ 9 - 101 + 102 1 0 0 @@ -2438,7 +2450,7 @@ 0 10 - 102 + 103 1 0 0 @@ -2450,7 +2462,7 @@ 10 - 103 + 104 1 0 0 @@ -2462,7 +2474,7 @@ 10 - 104 + 105 1 0 0 @@ -2482,7 +2494,7 @@ 0 11 - 105 + 106 1 0 0 @@ -2494,7 +2506,7 @@ 11 - 106 + 107 1 0 0 @@ -2506,7 +2518,7 @@ 11 - 107 + 108 1 0 0 @@ -2526,7 +2538,7 @@ 0 12 - 108 + 109 1 0 0 @@ -2538,7 +2550,7 @@ 12 - 109 + 110 1 0 0 @@ -2550,7 +2562,7 @@ 12 - 110 + 111 1 0 0 @@ -2562,7 +2574,7 @@ 12 - 111 + 112 1 0 0 @@ -2582,7 +2594,7 @@ 0 13 - 112 + 113 1 0 0 @@ -2594,7 +2606,7 @@ 13 - 113 + 114 1 0 0 @@ -2606,7 +2618,7 @@ 13 - 114 + 115 1 0 0 @@ -2618,7 +2630,7 @@ 13 - 115 + 116 1 0 0 @@ -2630,7 +2642,7 @@ 13 - 116 + 117 1 0 0 @@ -2642,7 +2654,7 @@ 13 - 117 + 118 1 0 0 @@ -2654,7 +2666,7 @@ 13 - 118 + 119 1 0 0 @@ -2666,7 +2678,7 @@ 13 - 119 + 120 1 0 0 @@ -2678,7 +2690,7 @@ 13 - 120 + 121 1 0 0 @@ -2690,7 +2702,7 @@ 13 - 121 + 122 1 0 0 @@ -2702,7 +2714,7 @@ 13 - 122 + 123 1 0 0 @@ -2714,7 +2726,7 @@ 13 - 123 + 124 1 0 0 @@ -2726,7 +2738,7 @@ 13 - 124 + 125 1 0 0 @@ -2738,7 +2750,7 @@ 13 - 125 + 126 1 0 0 @@ -2758,7 +2770,7 @@ 0 14 - 126 + 127 1 0 0 @@ -2770,7 +2782,7 @@ 14 - 127 + 128 1 0 0 @@ -2782,7 +2794,7 @@ 14 - 128 + 129 1 0 0 @@ -2794,7 +2806,7 @@ 14 - 129 + 130 1 0 0 @@ -2806,7 +2818,7 @@ 14 - 130 + 131 1 0 0 @@ -2818,7 +2830,7 @@ 14 - 131 + 132 1 0 0 @@ -2830,7 +2842,7 @@ 14 - 132 + 133 1 0 0 @@ -2842,7 +2854,7 @@ 14 - 133 + 134 1 0 0 @@ -2854,7 +2866,7 @@ 14 - 134 + 135 1 0 0 @@ -2866,7 +2878,7 @@ 14 - 135 + 136 1 0 0 @@ -2878,7 +2890,7 @@ 14 - 136 + 137 1 0 0 @@ -2890,7 +2902,7 @@ 14 - 137 + 138 1 0 0 @@ -2902,7 +2914,7 @@ 14 - 138 + 139 1 0 0 @@ -2922,7 +2934,7 @@ 0 15 - 139 + 140 1 0 0 @@ -2934,7 +2946,7 @@ 15 - 140 + 141 1 0 0 @@ -2946,7 +2958,7 @@ 15 - 141 + 142 1 0 0 @@ -2958,7 +2970,7 @@ 15 - 142 + 143 1 0 0 @@ -2970,7 +2982,7 @@ 15 - 143 + 144 1 0 0 @@ -2982,7 +2994,7 @@ 15 - 144 + 145 1 0 0 @@ -2994,7 +3006,7 @@ 15 - 145 + 146 1 0 0 @@ -3014,7 +3026,7 @@ 0 16 - 146 + 147 1 0 0 @@ -3026,7 +3038,7 @@ 16 - 147 + 148 1 0 0 @@ -3038,7 +3050,7 @@ 16 - 148 + 149 1 0 0 @@ -3058,7 +3070,7 @@ 0 17 - 149 + 150 4 0 0 @@ -3078,7 +3090,7 @@ 0 18 - 150 + 151 1 0 0 @@ -3090,7 +3102,7 @@ 18 - 151 + 152 1 0 0 @@ -3102,7 +3114,7 @@ 18 - 152 + 153 1 0 0 @@ -3122,7 +3134,7 @@ 0 19 - 153 + 154 4 0 0 @@ -3142,7 +3154,7 @@ 0 20 - 154 + 155 1 0 0 @@ -3154,7 +3166,7 @@ 20 - 155 + 156 1 0 0 @@ -3166,7 +3178,7 @@ 20 - 156 + 157 1 0 0 @@ -3178,7 +3190,7 @@ 20 - 157 + 158 1 0 0 @@ -3190,7 +3202,7 @@ 20 - 158 + 159 1 0 0 @@ -3202,7 +3214,7 @@ 20 - 159 + 160 1 0 0 @@ -3214,7 +3226,7 @@ 20 - 160 + 161 1 0 0 @@ -3226,7 +3238,7 @@ 20 - 161 + 162 1 0 0 @@ -3238,7 +3250,7 @@ 20 - 162 + 163 1 0 0 @@ -3250,7 +3262,7 @@ 20 - 163 + 164 1 0 0 diff --git a/project/ble_peripheral/ble_app_bladder_patch/pca10056/s140/arm5_no_packs/ble_app_bladder_patch_s140.uvprojx b/project/ble_peripheral/ble_app_bladder_patch/pca10056/s140/arm5_no_packs/ble_app_bladder_patch_s140.uvprojx index 4bdfd40..177f07b 100644 --- a/project/ble_peripheral/ble_app_bladder_patch/pca10056/s140/arm5_no_packs/ble_app_bladder_patch_s140.uvprojx +++ b/project/ble_peripheral/ble_app_bladder_patch/pca10056/s140/arm5_no_packs/ble_app_bladder_patch_s140.uvprojx @@ -493,6 +493,11 @@ 5 ..\..\..\..\..\..\pc_firm\dr_w25q32\dr_w25q32.h + + led_control.c + 1 + ..\..\..\led_control.c + @@ -4696,6 +4701,11 @@ 5 ..\..\..\..\..\..\pc_firm\dr_w25q32\dr_w25q32.h + + led_control.c + 1 + ..\..\..\led_control.c +