Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: nRF51822
Diff: Source/log.h
- Revision:
- 23:7ca590427f0e
- Child:
- 58:9b94a7caadba
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Source/log.h Tue Mar 19 19:25:39 2019 +0000 @@ -0,0 +1,32 @@ + +#ifndef LOG_H +#define LOG_H + +#include <stdint.h> + +typedef enum { + EVENT_POWER = 0, // RTC reset + EVENT_CAP_ON = 1, + EVENT_TEST_PASS = 2, + EVENT_TEST_FAIL = 3, + EVENT_EOL = 4, + EVENT_WAKE_FROM_SHIP = 5 +} event_t; + + +struct log_struct { + uint32_t time; /* 32 bit seconds count */ + char code; + char d0; + char d1; + char d2; +}; + +void log_show(void); +void log_add(event_t code, char d0, char d1, char d2); +void log_erase(void); +uint32_t log_code_count(event_t code); +uint32_t log_get_num_records(void); +void nv_clear(uint32_t addr); + +#endif // LOG_H \ No newline at end of file