Miscellaneous
Miscellaneous system functions. More...
Functions |
|
gos_result_t | gos_system_reboot (void) |
Reboot the device.
More...
|
|
char * | gos_system_get_version_str (char *version_str_buffer) |
Return the current firmware version as a string.
More...
|
|
gos_result_t | gos_system_get_version_details ( gos_version_details_t *details, char *version_str_buffer) |
Return details about the current firmware version.
More...
|
|
char * | gos_system_get_uuid_str (char *uuid_str_buffer) |
Return the device's UUID as a string.
More...
|
|
void | gos_system_set_irq_callback (gos_platform_irq_t irq, gos_handler_noarg_t callback) |
Register an interrupt callback.
More...
|
|
void | gos_system_set_system_tick_callback ( gos_handler_noarg_t callback) |
Register a system tick callback.
More...
|
|
void | gos_system_reset_faults (void) |
Clear all system faults.
More...
|
|
gos_result_t | gos_system_retrieve_faults (char *buffer) |
Populate the given buffer with the current system faults string.
More...
|
|
uint32_t | gos_system_get_faults_count (void) |
Return the number of system faults.
More...
|
|
void | gos_system_reset_safemode_app_counters (uint32_t mask) |
Clear a safemode app counter.
More...
|
|
uint32_t | gos_system_get_safemode_app_counters (void) |
Get the current safemode app counters.
More...
|
|
void | gos_system_kick_watchdog (void) |
Kick the watchdog timer.
|
|
Detailed Description
Miscellaneous system functions.
Function Documentation
◆ gos_system_get_faults_count()
uint32_t gos_system_get_faults_count | ( | void |
|
) |
Return the number of system faults.
See Gecko OS Command API documentation: faults_reset
◆ gos_system_get_safemode_app_counters()
uint32_t gos_system_get_safemode_app_counters | ( | void |
|
) |
Get the current safemode app counters.
See the Safemode app documentation for more details: Safemode App
◆ gos_system_get_uuid_str()
char* gos_system_get_uuid_str | ( | char * |
uuid_str_buffer
|
) |
Return the device's UUID as a string.
This returns the device's UUID as a string.
The supplied
uuid_str_buffer
should be a buffer of at least 41 bytes.
- Parameters
-
[out] uuid_str_buffer
Buffer to hold UUID string
- Returns
-
Device's UUID string (this is the same pointer as the supplied
uuid_str_buffer
argument)
- Examples:
- dms/telemetry/main.c .
◆ gos_system_get_version_details()
gos_result_t gos_system_get_version_details | ( | gos_version_details_t * |
details,
|
char * |
version_str_buffer
|
||
) |
Return details about the current firmware version.
This populates gos_version_details_t based on the current version string. See Gecko OS Command API documentation: version .
- Note
-
If
version_str_buffer
is NULL then only thekernel.version
andbundle.version
fields are populated.
- Parameters
-
[out] details
Populated details about the current firmware version [in] version_str_buffer
String buffer to hold parsed version string, must be at least 96 bytes
◆ gos_system_get_version_str()
char* gos_system_get_version_str | ( | char * |
version_str_buffer
|
) |
Return the current firmware version as a string.
This returns the current firmware version as a string. See Gecko OS Command API documentation: version .
The supplied
version_str_buffer
should be a buffer of at least 96 bytes.
- Parameters
-
[out] version_str_buffer
Buffer to hold version string
- Returns
-
Current firmware version string (this is the same pointer as the supplied
version_str_buffer
argument)
- Examples:
- dms/messages/main.c .
◆ gos_system_reboot()
gos_result_t gos_system_reboot | ( | void |
|
) |
Reboot the device.
See Gecko OS Command API documentation: reboot .
- Examples:
- wifi/device_setup/main.c .
◆ gos_system_reset_faults()
void gos_system_reset_faults | ( | void |
|
) |
Clear all system faults.
See Gecko OS Command API documentation: faults_reset
◆ gos_system_reset_safemode_app_counters()
void gos_system_reset_safemode_app_counters | ( | uint32_t |
mask
|
) |
Clear a safemode app counter.
See the Safemode app documentation for more details: Safemode App
- Note
- Extreme caution should be used with this API!
To clear all counters, use the mask: GOS_SAFEMODE_COUNTER_ALL,e.g.
◆ gos_system_retrieve_faults()
gos_result_t gos_system_retrieve_faults | ( | char * |
buffer
|
) |
Populate the given buffer with the current system faults string.
- Parameters
-
buffer
Buffer to hold faults string, this buffer but be at least 512 bytes
- Returns
- The result of the API, see gos_result_t
◆ gos_system_set_irq_callback()
void gos_system_set_irq_callback | ( | gos_platform_irq_t |
irq,
|
gos_handler_noarg_t |
callback
|
||
) |
Register an interrupt callback.
This registers an interrupt handler for the specificied interrupt vector.
The corresponding interrupt must be enabled using the appropriate MCU registers before the callback is triggered.
- Note
- Extreme care should be taken when registering an irq callback. The stability of the OS cannot be guaranteed with this is used.
◆ gos_system_set_system_tick_callback()
void gos_system_set_system_tick_callback | ( | gos_handler_noarg_t |
callback
|
) |
Register a system tick callback.
Register a callback to be called every system tick = 1 millisecond.
- Note
- The callback MUST be extremely simple as the system tick is used by the RTOS scheduler.