Morse Micro IoT SDK  2.10.4
mmhal_core.h
1/*
2 * Copyright 2025 Morse Micro
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
16#pragma once
17
18#include <stdbool.h>
19#include <stdint.h>
20
21#ifdef __cplusplus
22extern "C"
23{
24#endif
25
34uint32_t mmhal_random_u32(uint32_t min, uint32_t max);
35
39{
62};
63
76void mmhal_set_deep_sleep_veto(uint8_t veto_id);
77
86void mmhal_clear_deep_sleep_veto(uint8_t veto_id);
87
88#ifdef __cplusplus
89}
90#endif
91
void mmhal_set_deep_sleep_veto(uint8_t veto_id)
Sets a deep sleep veto that will prevent the device from entering deep sleep.
mmhal_veto_id
Enumeration of veto_id ranges for use with mmhal_set_deep_sleep_veto() and mmhal_clear_deep_sleep_vet...
Definition: mmhal_core.h:39
uint32_t mmhal_random_u32(uint32_t min, uint32_t max)
Generate a random 32 bit integer within the given range.
void mmhal_clear_deep_sleep_veto(uint8_t veto_id)
Clears a deep sleep veto that was preventing the device from entering deep sleep (see mmhal_set_deep_...
@ MMHAL_VETO_ID_MORSELIB_MAX
End of deep sleep veto ID range that is allocated for morselib use.
Definition: mmhal_core.h:53
@ MMHAL_VETO_ID_APP_MAX
End of deep sleep veto ID range that is available for application use.
Definition: mmhal_core.h:43
@ MMHAL_VETO_ID_HAL_MAX
End of deep sleep veto ID range that is available for HAL use.
Definition: mmhal_core.h:47
@ MMHAL_VETO_ID_MMCONFIG
Deep sleep veto ID allocated to Morse Micro Persistent Configuration Store.
Definition: mmhal_core.h:57
@ MMHAL_VETO_ID_RESERVED_MIN
Start of deep sleep veto ID range reserved for future use.
Definition: mmhal_core.h:59
@ MMHAL_VETO_ID_DATALINK
Deep sleep veto ID for data-link subsystem.
Definition: mmhal_core.h:55
@ MMHAL_VETO_ID_MORSELIB_MIN
Start of deep sleep veto ID range that is allocated for morselib use.
Definition: mmhal_core.h:50
@ MMHAL_VETO_ID_RESERVED_MAX
End of deep sleep veto ID range reserved for future use.
Definition: mmhal_core.h:61
@ MMHAL_VETO_ID_HAL_MIN
Start of deep sleep veto ID range that is available for HAL use.
Definition: mmhal_core.h:45
@ MMHAL_VETO_ID_APP_MIN
Start of deep sleep veto ID range that is available for application use.
Definition: mmhal_core.h:41