SparkFun Toolkit
v1.0.5-6-g34ffa30
Core Functionality Library
Loading...
Searching...
No Matches
sfToolkit.h
Go to the documentation of this file.
1
16
#pragma once
17
18
#include <stdint.h>
19
23
#include "
sfTkError.h
"
24
25
// byte order types/enum
26
enum class
sfTkByteOrder
: uint8_t
27
{
28
BigEndian
= 0x01,
29
LittleEndian
= 0x02
30
};
31
32
// Note - toolkit *functions* start with sftk_ to avoid name collisions
33
34
// Function to determine the byte order of the system
35
sfTkByteOrder
sftk_system_byteorder
(
void
);
36
37
uint8_t
sftk_byte_swap
(uint8_t i);
38
uint16_t
sftk_byte_swap
(uint16_t i);
39
uint32_t
sftk_byte_swap
(uint32_t i);
40
int16_t
sftk_byte_swap
(int16_t i);
41
int32_t
sftk_byte_swap
(int32_t i);
42
43
// Area for platform specific implementations. The interface/functions are
44
// defined here, with the expectation that the platform provides the implementation.
45
46
// delay in milliseconds
47
void
sftk_delay_ms
(uint32_t ms);
48
49
// ticks in milliseconds
50
uint32_t
sftk_ticks_ms
(
void
);
51
61
#define SFTK_CHECK_BITS_SET(__value__, __bitmask__) (((__value__) & (__bitmask__)) == __bitmask__)
62
72
#define SFTK_CHECK_BITS_CLEARED(__value__, __bitmask__) (((__value__) & (__bitmask__)) == 0)
sfTkError.h
Header file for the SparkFun Toolkit - Base Error Code defines.
sfTkByteOrder
sfTkByteOrder
Common include file for the core of the SparkFun Electronics Toolkit.
Definition:
sfToolkit.h:27
sfTkByteOrder::BigEndian
@ BigEndian
sfTkByteOrder::LittleEndian
@ LittleEndian
sftk_system_byteorder
sfTkByteOrder sftk_system_byteorder(void)
C function - Runtime check for system byte order.
Definition:
sfToolkit.cpp:24
sftk_delay_ms
void sftk_delay_ms(uint32_t ms)
Definition:
sfTkArduino.cpp:18
sftk_byte_swap
uint8_t sftk_byte_swap(uint8_t i)
to catch 8 bit calls for byte swap
Definition:
sfToolkit.cpp:35
sftk_ticks_ms
uint32_t sftk_ticks_ms(void)
Definition:
sfTkArduino.cpp:23
src
sfTk
sfToolkit.h
Generated by
1.9.5