2022-05-15 22:42:00 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* 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_
|
2022-05-15 22:42:00 +02:00
|
|
|
|
|
|
|
#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
|
2022-07-16 01:55:26 +02:00
|
|
|
#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
|
2022-05-15 22:42:00 +02:00
|
|
|
#define VERSION_STRING STR(VERSION_MAJOR) "." STR(VERION_MINOR)
|
2022-07-16 00:30:23 +02:00
|
|
|
/*#define DATE __DATE__ */
|
2022-05-15 22:42:00 +02:00
|
|
|
#define AUTHOR_STRING "Tom Kuschel KW4NZ"
|
2022-07-16 00:30:23 +02:00
|
|
|
/* From SI5351 datasheet: */
|
2022-05-15 22:42:00 +02:00
|
|
|
#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
|
|
|
|
|
2022-05-15 22:42:00 +02:00
|
|
|
/* Exported variables --------------------------------------------------------*/
|
|
|
|
|
|
|
|
/* Exported macros -----------------------------------------------------------*/
|
|
|
|
|
|
|
|
/* Exported functions --------------------------------------------------------*/
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern "C" */
|
|
|
|
#endif
|
|
|
|
|
2022-07-16 00:30:23 +02:00
|
|
|
#endif /* _AT1_DEFINES_H_ */
|