72 lines
2.3 KiB
C
72 lines
2.3 KiB
C
/******************************************************************************
|
|
* File Name : at1_defines.h
|
|
* Description : constants and defines for the project f0x.at1
|
|
******************************************************************************
|
|
* @author: Thomas Kuschel KW4NZ
|
|
******************************************************************************
|
|
*/
|
|
|
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
|
#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 6
|
|
#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)
|
|
/*#define DATE __DATE__ */
|
|
#define AUTHOR_STRING "Tom Kuschel KW4NZ"
|
|
/* From SI5351 datasheet: */
|
|
#define SI5351_I2C_ADDR (0x60 << 1)
|
|
|
|
/* #define COMPILE_YEAR (__DATE__ + 7) */
|
|
#define DATE_COMPILE_CENTURY (20)
|
|
#define DATE_COMPILE_YEAR (24)
|
|
|
|
#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
|
|
|
|
#endif /* _AT1_DEFINES_H_ */
|