전원 버튼 BSP 제거, GPIO 제어로 전환
- 전원 OFF 로직 추가(main_s) - processing 변수 삭제
This commit is contained in:
@@ -48,26 +48,20 @@ APP_TIMER_DEF(m_power_timer_id);
|
||||
/* Power sequence current step (0: I2C init, 1: reserved, 2: complete) */
|
||||
static uint8_t p_order;
|
||||
|
||||
/* Data processing flag (declared in external module) */
|
||||
extern volatile bool processing;
|
||||
|
||||
/* Power sequence lock flag (true = sequence in progress) */
|
||||
bool lock_check = false;
|
||||
|
||||
/**
|
||||
* @brief Enter device sleep mode
|
||||
*
|
||||
* Clears the processing flag so the main loop stops
|
||||
* processing sensor data.
|
||||
*
|
||||
* @return 0 (always succeeds)
|
||||
*/
|
||||
int device_sleep_mode(void){
|
||||
int device_sleep_mode(void)
|
||||
{
|
||||
int rc = 0;
|
||||
nrf_delay_ms(2);
|
||||
DBG_PRINTF("Device_Sleep_Mode OK!\r\n");
|
||||
nrf_delay_ms(10);
|
||||
processing = false; /* Clear processing flag -> stop sensor handling */
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user