Skip to content

Commit

Permalink
Add pin power shutdown on reset
Browse files Browse the repository at this point in the history
  • Loading branch information
pulkin committed Jan 5, 2020
1 parent 5d0492b commit c45bfd6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions ports/gprs_a9/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ void MicroPyTask(void *pData) {
moduos_init0();
modcellular_init0();
modgps_init0();
modmachine_init0();
mp_obj_list_init(mp_sys_path, 0);
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_)); // current dir (or base dir of the script)
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib));
Expand Down
4 changes: 4 additions & 0 deletions ports/gprs_a9/modmachine.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
#include "api_hal_watchdog.h"
#include "api_hal_adc.h"

void modmachine_init0(void) {
modmachine_pin_init0();
}

// ------
// Notify
// ------
Expand Down
1 change: 1 addition & 0 deletions ports/gprs_a9/modmachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ extern const mp_obj_type_t machine_adc_type;
extern Power_On_Cause_t powerOnCause;

void modmachine_pin_init0(void);
void modmachine_init0(void);

void modmachine_notify_power_on(API_Event_t* event);

0 comments on commit c45bfd6

Please sign in to comment.