f0x.at1/Core/Inc/at1_defines.h

72 lines
2.3 KiB
C
Raw Normal View History

/******************************************************************************
* File Name : at1_defines.h
* Description : constants and defines for the project f0x.at1
******************************************************************************
* @author: Thomas Kuschel KW4NZ
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
2022-07-16 00:30:23 +02:00
#ifndef _AT1_DEFINES_H_
#define _AT1_DEFINES_H_
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
/* Private includes ----------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
#ifndef STR_HELPER
#define STR_HELPER(x) #x
#define STR(x) STR_HELPER(x)
#endif
#define VERSION_MAJOR 0
#define VERSION_MINOR 4
#ifdef DEBUG
#define VERSION_DEBUG ".D"
#else
#define VERSION_DEBUG
#endif
#define PROGRAM_ID "f0x.at1 Version " STR(VERSION_MAJOR) "." STR(VERSION_MINOR) VERSION_DEBUG
#define VERSION_STRING STR(VERSION_MAJOR) "." STR(VERION_MINOR)
2022-07-16 00:30:23 +02:00
/*#define DATE __DATE__ */
#define AUTHOR_STRING "Tom Kuschel KW4NZ"
2022-07-16 00:30:23 +02:00
/* From SI5351 datasheet: */
#define SI5351_I2C_ADDR (0x60 << 1)
2022-07-16 00:30:23 +02:00
/* #define COMPILE_YEAR (__DATE__ + 7) */
#define DATE_COMPILE_CENTURY (20)
#define DATE_COMPILE_YEAR (22)
#if !defined _SYS_ERRNO_H_ && !defined __ERRNO_H__ && !defined __AT1_ERROR_NUMBERS__
#define __AT1_ERROR_NUMBERS__
typedef enum {
EPERM = 1, /*!< Operation not permitted */
EIO = 5, /*!< I/O error */
ENOMEM = 12, /*!< Out of memory */
EFAULT = 14, /*!< Bad address */
EBUSY = 16, /*!< Device or resource busy */
ENODEV = 19, /*!< No such device */
EINVAL = 22, /*!< Invalid argument */
EADDRINUSE = 98,/*!< Address already in use */
ETIMEDOUT = 116,/*!< Connection timed out */
} at1_errno_t;
#endif
/* Exported variables --------------------------------------------------------*/
/* Exported macros -----------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
#ifdef __cplusplus
} /* extern "C" */
#endif
2022-07-16 00:30:23 +02:00
#endif /* _AT1_DEFINES_H_ */