![]() |
Morse Micro IoT SDK
2.10.4
|
This provide an abstraction layer for hardware specific functionality used by the Morse Micro Operating System Abstraction Layer (mmosal) API.
Enumerations | |
| enum | mmhal_sleep_state { MMHAL_SLEEP_DISABLED , MMHAL_SLEEP_SHALLOW , MMHAL_SLEEP_DEEP } |
| Enumeration of MCU sleep state. More... | |
| enum | mmhal_isr_state { MMHAL_NOT_IN_ISR , MMHAL_IN_ISR , MMHAL_ISR_STATE_UNKNOWN } |
| Enumeration of ISR states (i.e., whether in ISR or not). More... | |
Functions | |
| void | mmhal_early_init (void) |
| Initialization before RTOS scheduler starts. | |
| void | mmhal_init (void) |
| Initialization after RTOS scheduler started. | |
| void | mmhal_reset (void) |
| Reset the microcontroller. | |
| enum mmhal_sleep_state | mmhal_sleep_prepare (uint32_t expected_idle_time_ms) |
| Function to prepare MCU to enter sleep. More... | |
| uint32_t | mmhal_sleep (enum mmhal_sleep_state sleep_state, uint32_t expected_idle_time_ms) |
| Function to enter MCU sleep. More... | |
| void | mmhal_sleep_abort (enum mmhal_sleep_state sleep_state) |
| Function to abort the MCU sleep state. More... | |
| void | mmhal_sleep_cleanup (void) |
| Function to cleanup on exit from the MCU sleep state. | |
| enum mmhal_isr_state | mmhal_get_isr_state (void) |
| Get the current ISR state (i.e., whether in ISR or not). More... | |
| void | mmhal_log_write (const uint8_t *data, size_t len) |
| Write to the debug log. More... | |
| void | mmhal_log_flush (void) |
| Flush the debug log before returning. More... | |
| enum mmhal_isr_state |
Enumeration of ISR states (i.e., whether in ISR or not).
Definition at line 83 of file mmhal_os.h.
| enum mmhal_sleep_state |
Enumeration of MCU sleep state.
| Enumerator | |
|---|---|
| MMHAL_SLEEP_DISABLED | Disable MCU sleep. |
| MMHAL_SLEEP_SHALLOW | MCU to enter shallow sleep. |
| MMHAL_SLEEP_DEEP | MCU can enter deep sleep. |
Definition at line 40 of file mmhal_os.h.
| enum mmhal_isr_state mmhal_get_isr_state | ( | void | ) |
Get the current ISR state (i.e., whether in ISR or not).
MMHAL_ISR_STATE_UNKNOWN if the HAL does not support checking ISR state. | void mmhal_log_flush | ( | void | ) |
Flush the debug log before returning.
| void mmhal_log_write | ( | const uint8_t * | data, |
| size_t | len | ||
| ) |
Write to the debug log.
It is assumed the caller will have mechanisms in place to prevent concurrent access.
| data | Buffer containing data to write. |
| len | Length of data in buffer. |
| uint32_t mmhal_sleep | ( | enum mmhal_sleep_state | sleep_state, |
| uint32_t | expected_idle_time_ms | ||
| ) |
Function to enter MCU sleep.
| sleep_state | Sleep state to enter into. |
| expected_idle_time_ms | Expected time to sleep in milliseconds. |
| void mmhal_sleep_abort | ( | enum mmhal_sleep_state | sleep_state | ) |
Function to abort the MCU sleep state.
| sleep_state | Sleep state to abort. |
| enum mmhal_sleep_state mmhal_sleep_prepare | ( | uint32_t | expected_idle_time_ms | ) |
Function to prepare MCU to enter sleep.
This will halt the timer that generates the RTOS tick.
| expected_idle_time_ms | Expected time to sleep in milliseconds. |