Local library
Dependencies: WakeUp PinDetect
Dependents: Inductive_Sensor Inductive_Sensor_Jasper Inductive_Sensor_3
Diff: Bob.h
- Revision:
- 7:0b23995256e7
- Parent:
- 6:0e7c0ad0508b
- Child:
- 9:3fe744aca1c0
--- a/Bob.h Wed Aug 24 10:30:41 2016 +0000 +++ b/Bob.h Wed Sep 07 09:58:19 2016 +0000 @@ -21,31 +21,39 @@ * @param process_led Pin connected to the green led, used for processing * @param error_led Pin connected to the red led, used for errors * @param button Pin connected to the I/O button + * @param enable Pin connected to the SD card system and the crystal * @param sd_present Pin connected to the SDCardDetect port * @param battery Pin connected to the battery */ - Bob(PinName process_led, PinName error_led, PinName button, PinName sd_present, PinName battery); + Bob(PinName process_led, PinName error_led, PinName button, PinName enable, PinName sd_present, PinName battery); ~Bob(); bool checkSD(void); - void wakeup(void); - void beforesleep(void); + void wakeup_periphery(void); + + /** shutdown_periphery + * Powers down the SD card system, the crystal and the LDC1614 + */ + void shutdown_periphery(void); void sleep(uint32_t ms); float battery(void); void flash(int n); - void ledon(void); - void ledoff(void); + void processing(void); + void no_processing(void); + void error(void); + void no_error(void); private: - DigitalOut _led_process; - DigitalOut _led_error; - // DigitalOut _sd_enable; + DigitalOut _led_process; // green led + DigitalOut _led_error; // red led + PinDetect _button; // button + DigitalOut _enable; // pin to power all periphery (SD, crystal, LDC1614) + DigitalIn *_sd_card_detect; - PinDetect _button; AnalogIn *_batt;