코드 정리
This commit is contained in:
@@ -74,7 +74,8 @@ int device_sleep_mode(void)
|
||||
*
|
||||
* @return 0 (always succeeds)
|
||||
*/
|
||||
int device_activated(void){
|
||||
int device_activated(void)
|
||||
{
|
||||
int rc = 0;
|
||||
p_order = 0; /* State machine start step (Step 0: I2C init) */
|
||||
lock_check =true; /* Lock: power sequence in progress */
|
||||
@@ -117,10 +118,13 @@ void power_loop(void *p_context)
|
||||
|
||||
/* Advance to next step or finish */
|
||||
/* Advance to next step or finish sequence */
|
||||
if (p_order < 2) {
|
||||
if (p_order < 2)
|
||||
{
|
||||
p_order++; /* Move to next step */
|
||||
power_timer_start(); /* Execute next step after 20ms */
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Power sequence fully complete */
|
||||
DBG_PRINTF("[PWR] Device Activated OK!\r\n");
|
||||
}
|
||||
@@ -135,7 +139,8 @@ void power_loop(void *p_context)
|
||||
*
|
||||
* @return 0 (always succeeds)
|
||||
*/
|
||||
int device_reactivated(void){
|
||||
int device_reactivated(void)
|
||||
{
|
||||
int rc = 0;
|
||||
sw_i2c_init_once(); /* Re-initialize I2C bus */
|
||||
nrf_delay_ms(10); /* Stabilization delay */
|
||||
|
||||
Reference in New Issue
Block a user