|
enum | osal_cr_t {
OSAL_CR4_5 = 0,
OSAL_CR4_6 = 1,
OSAL_CR4_7 = 2,
OSAL_CR4_8 = 3
} |
|
enum | osal_sf_t {
OSAL_SF6 = 0,
OSAL_SF7 = 1,
OSAL_SF8 = 2,
OSAL_SF9 = 3,
OSAL_SF10 = 4,
OSAL_SF11 = 5,
OSAL_SF12 = 6
} |
|
enum | osal_bw_t {
OSAL_BW62_5 = 0,
OSAL_BW125 = 1,
OSAL_BW250 = 2,
OSAL_BW500 = 3
} |
|
enum | osal_crc_t { OSAL_CRC_OFF = 0,
OSAL_CRC_ON = 1
} |
|
enum | osal_iq_t { OSAL_IQ_NORMAL = 0,
OSAL_IQ_INVERTED = 1
} |
|
enum | osal_crc_ok_t { OSAL_CRC_NOK = 0,
OSAL_CRC_OK = 1
} |
|
enum | osal_radio_state_t {
OSAL_RADIO_STOP = 0,
OSAL_RADIO_START_TX = 1,
OSAL_RADIO_START_RX_SINGLE = 2,
OSAL_RADIO_START_RX = 3
} |
|
|
osal_time_t | osal_get_time (void) |
| Returns the elapsed time since the device has been powered-up. More...
|
|
osal_time_t | osal_get_radio_wakeup_latency (void) |
| Returns the maximum time the radio can take before being actually receiving (usually sleep to RX transition). More...
|
|
osal_time_t | osal_get_additional_cpu_wakeup_latency (void) |
| Returns an offset that will be removed to the deadlines of timing critical tasks in case the OS scheduler is not able to start the tasks on-time (for instance, in case of wakeup latency from a low power state). More...
|
|
void | osal_post_job (osal_job_t *job, void(*cb)(osal_job_t *)) |
| Queue a job for immediate execution (but after any other job already in the queue). More...
|
|
void | osal_post_delayed_job (osal_job_t *job, osal_time_t time, void(*cb)(osal_job_t *)) |
| Queue a job for scheduled execution. More...
|
|
void | osal_cancel_job (osal_job_t *job) |
| Cancel a queued job. More...
|
|
void | osal_lowpower_sleep_lock (void) |
| Prevents the device from going to lowpower and/or sleep mode (if the device supports a lowpower and/or a sleep mode inducing a latency). More...
|
|
void | osal_lowpower_sleep_unlock (void) |
| Allows the device to go to lowpower and/or sleep mode (if the device supports a lowpower and/or a sleep mode inducing a latency). More...
|
|
void | osal_memcpy (void *dst, const void *src, uint16_t size) |
| Copies a memory area. More...
|
|
void | osal_memcpy_reverse (void *dst, const void *src, uint16_t size) |
| Copies a memory area in reverse order (last byte of the source area copied to the first byte of the destination area). More...
|
|
void | osal_memset (void *dst, uint8_t byte, uint16_t size) |
| Fills a memory area with a constant value. More...
|
|
uint8_t | osal_rand8 (void) |
| Returns a random byte. More...
|
|
uint16_t | osal_rand16 (void) |
| Returns a random half-word. More...
|
|
void | osal_aes_setkey (const uint8_t *key) |
| Sets the AES key to use for encryption and decryption. More...
|
|
void | osal_aes_encrypt (const uint8_t *in, uint8_t *out, uint32_t len) |
| Encrypts a buffer using the AES algorithm (ECB mode). More...
|
|
void | osal_aes_decrypt (const uint8_t *in, uint8_t *out, uint32_t len) |
| Decrypts a buffer using the AES algorithm (ECB mode). More...
|
|
void | osal_set_radio_params (osal_radio_params_t *params) |
| Sets the radio parameters. More...
|
|
void | osal_set_radio_callback (void(*cb)(void)) |
| Sets a radio callback that will be called once the radio has received or transmitted a buffer. More...
|
|
void | osal_clear_radio_callback (void) |
| Clears the radio callback. More...
|
|
int8_t | osal_get_max_power (void) |
| Returns the maximum available power. More...
|
|
int8_t | osal_get_min_power (void) |
| Returns the minimum available power. More...
|
|
int8_t | osal_get_antenna_gain (void) |
| Returns the antenna gain in dBi. More...
|
|
int8_t | osal_radio_SF_supported (enum osal_sf_t sf) |
| Checks if a given SF is supported. More...
|
|
int8_t | osal_is_freq_calibration_enabled (void) |
| Tells if frequency calibration should be used. More...
|
|
void | osal_get_radio_status (osal_radio_status_t *status) |
| Retrieves the radio status related to the last reception or transmission. More...
|
|
uint8_t * | osal_get_radio_buffer (void) |
| Retrieves the pointer to the radio buffer. More...
|
|
uint8_t | osal_get_radio_buffer_length (void) |
| Retrieves the length of the data inside the radio buffer. More...
|
|
void | osal_write_radio_buffer (uint8_t *src, uint8_t length) |
| Fills the radio buffer with data to transmit. More...
|
|
int16_t | osal_read_radio_rssi (void) |
| Returns the RSSI currently perceived by the radio. More...
|
|
void | osal_radio (enum osal_radio_state_t state) |
| Sets the new state of the radio. More...
|
|
void | osal_printf (const char *fmt,...) |
| Formats and prints data. More...
|
|
uint16_t | osal_read16_le (const uint8_t *buf) |
| Reads data as little-endian half-word. More...
|
|
uint32_t | osal_read32_le (const uint8_t *buf) |
| Reads data as little-endian word. More...
|
|
uint32_t | osal_read32_be (const uint8_t *buf) |
| Reads data as big-endian word. More...
|
|
void | osal_write16_le (uint8_t *buf, uint16_t v) |
| Writes data as little-endian half-word. More...
|
|
void | osal_write32_le (uint8_t *buf, uint32_t v) |
| Writes data as little-endian word. More...
|
|
void | osal_write32_be (uint8_t *buf, uint32_t v) |
| Writes data as big-endian word. More...
|
|
OS abstraction layer for Libmultimac.
Copyright (c) 2018, Archos S.A. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Archos nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND AND EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARCHOS S.A. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.