![]() |
SparkFun Toolkit
v1.0.5-6-g34ffa30
Core Functionality Library
|
Header file for the SparkFun Toolkit. More...
Go to the source code of this file.
Macros | |
#define | SFTK_CHECK_BITS_SET(__value__, __bitmask__) (((__value__) & (__bitmask__)) == __bitmask__) |
Check if specific bits are set in a value. More... | |
#define | SFTK_CHECK_BITS_CLEARED(__value__, __bitmask__) (((__value__) & (__bitmask__)) == 0) |
Check if specific bits are cleared in a value. More... | |
Enumerations | |
enum class | sfTkByteOrder : uint8_t { BigEndian = 0x01 , LittleEndian = 0x02 } |
Common include file for the core of the SparkFun Electronics Toolkit. More... | |
Functions | |
sfTkByteOrder | sftk_system_byteorder (void) |
C function - Runtime check for system byte order. More... | |
uint8_t | sftk_byte_swap (uint8_t i) |
to catch 8 bit calls for byte swap More... | |
uint16_t | sftk_byte_swap (uint16_t i) |
function - Byte swap a 16 bit value More... | |
uint32_t | sftk_byte_swap (uint32_t i) |
function - Byte swap a 32 bit value More... | |
int16_t | sftk_byte_swap (int16_t i) |
function - Byte swap an int 16 More... | |
int32_t | sftk_byte_swap (int32_t i) |
function - Byte swap an int 32 More... | |
void | sftk_delay_ms (uint32_t ms) |
uint32_t | sftk_ticks_ms (void) |
Header file for the SparkFun Toolkit.
This file contains the declarations of various utility functions and types for the SparkFun Toolkit library.
SPDX-License-Identifier: MIT
#define SFTK_CHECK_BITS_CLEARED | ( | __value__, | |
__bitmask__ | |||
) | (((__value__) & (__bitmask__)) == 0) |
Check if specific bits are cleared in a value.
This macro checks if the bits specified by the bitmask are cleared in the given value.
__value__ | The value to check. |
__bitmask__ | The bitmask specifying which bits to check. |
#define SFTK_CHECK_BITS_SET | ( | __value__, | |
__bitmask__ | |||
) | (((__value__) & (__bitmask__)) == __bitmask__) |
Check if specific bits are set in a value.
This macro checks if the bits specified by the bitmask are set in the given value.
__value__ | The value to check. |
__bitmask__ | The bitmask specifying which bits to check. |
|
strong |
int16_t sftk_byte_swap | ( | int16_t | i | ) |
function - Byte swap an int 16
int32_t sftk_byte_swap | ( | int32_t | i | ) |
function - Byte swap an int 32
uint16_t sftk_byte_swap | ( | uint16_t | i | ) |
function - Byte swap a 16 bit value
uint32_t sftk_byte_swap | ( | uint32_t | i | ) |
function - Byte swap a 32 bit value
uint8_t sftk_byte_swap | ( | uint8_t | i | ) |
to catch 8 bit calls for byte swap
void sftk_delay_ms | ( | uint32_t | ms | ) |
sfTkByteOrder sftk_system_byteorder | ( | void | ) |
C function - Runtime check for system byte order.
uint32_t sftk_ticks_ms | ( | void | ) |