2023-06-22 12:50:03 -04:00
|
|
|
#pragma once
|
|
|
|
//
|
|
|
|
// FILE: integer24.h
|
|
|
|
// AUTHOR: Rob Tillaart
|
2023-06-27 12:28:02 -04:00
|
|
|
// VERSION: 0.1.1
|
2023-06-22 12:50:03 -04:00
|
|
|
// DATE: 2023-06-22
|
|
|
|
// PURPOSE: Arduino library for the uint24_t and int24_t
|
|
|
|
// URL: https://github.com/RobTillaart/integer24
|
|
|
|
//
|
|
|
|
// uses a simple typedef
|
2023-06-27 12:28:02 -04:00
|
|
|
// only tested on AVR for now
|
2023-06-22 12:50:03 -04:00
|
|
|
|
|
|
|
|
2023-06-27 12:28:02 -04:00
|
|
|
#define INTEGER24_LIB_VERSION (F("0.1.1"))
|
2023-06-22 12:50:03 -04:00
|
|
|
|
|
|
|
|
|
|
|
#include "Arduino.h"
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR)
|
|
|
|
|
|
|
|
// supports a true 3 byte data type
|
|
|
|
|
|
|
|
typedef __uint24 uint24_t;
|
|
|
|
typedef __int24 int24_t;
|
|
|
|
|
|
|
|
#else
|
2023-06-27 12:28:02 -04:00
|
|
|
|
2023-06-22 12:50:03 -04:00
|
|
|
// use 32 bits (4 byte) for now
|
|
|
|
|
|
|
|
typedef uint32_t uint24_t;
|
|
|
|
typedef int32_t int24_t;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2023-06-27 12:28:02 -04:00
|
|
|
|
|
|
|
|
2023-06-22 12:50:03 -04:00
|
|
|
// -- END OF FILE --
|
|
|
|
|