ADD info, time
This commit is contained in:
@ -68,7 +68,7 @@
|
||||
#define configTICK_RATE_HZ ((TickType_t)1000)
|
||||
#define configMAX_PRIORITIES ( 56 )
|
||||
#define configMINIMAL_STACK_SIZE ((uint16_t)128)
|
||||
#define configTOTAL_HEAP_SIZE ((size_t)30000)
|
||||
#define configTOTAL_HEAP_SIZE ((size_t)50000)
|
||||
#define configMAX_TASK_NAME_LEN ( 16 )
|
||||
#define configUSE_TRACE_FACILITY 1
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
@ -76,6 +76,7 @@
|
||||
#define configQUEUE_REGISTRY_SIZE 8
|
||||
#define configUSE_RECURSIVE_MUTEXES 1
|
||||
#define configUSE_COUNTING_SEMAPHORES 1
|
||||
#define configENABLE_BACKWARD_COMPATIBILITY 0
|
||||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
|
||||
/* USER CODE BEGIN MESSAGE_BUFFER_LENGTH_TYPE */
|
||||
/* Defaults to size_t for backward compatibility, but can be changed
|
||||
|
@ -7,8 +7,8 @@
|
||||
*/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef AT1_DEFINES_H
|
||||
#define AT1_DEFINES_H
|
||||
#ifndef _AT1_DEFINES_H_
|
||||
#define _AT1_DEFINES_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -26,14 +26,33 @@ extern "C" {
|
||||
#define STR(x) STR_HELPER(x)
|
||||
#endif
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 2
|
||||
#define VERSION_MINOR 3
|
||||
#define PROGRAM_ID "f0x.at1 Version " STR(VERSION_MAJOR) "." STR(VERSION_MINOR)
|
||||
#define VERSION_STRING STR(VERSION_MAJOR) "." STR(VERION_MINOR)
|
||||
//#define DATE __DATE__
|
||||
/*#define DATE __DATE__ */
|
||||
#define AUTHOR_STRING "Tom Kuschel KW4NZ"
|
||||
// From SI5351 datasheet:
|
||||
/* From SI5351 datasheet: */
|
||||
#define SI5351_I2C_ADDR (0x60 << 1)
|
||||
|
||||
/* #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 -----------------------------------------------------------*/
|
||||
@ -44,4 +63,4 @@ extern "C" {
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* AT1_DEFINES_H */
|
||||
#endif /* _AT1_DEFINES_H_ */
|
||||
|
@ -22,6 +22,7 @@ extern RTC_HandleTypeDef hrtc;
|
||||
/* function prototypes */
|
||||
int do_help(char *args);
|
||||
int do_devid(char *args);
|
||||
int do_info(char *args);
|
||||
int do_test(/*command_inst_t inst,*/ char *args);
|
||||
int do_time(char *args);
|
||||
|
||||
|
@ -8,8 +8,21 @@
|
||||
#ifndef INC_HELPER_H_
|
||||
#define INC_HELPER_H_
|
||||
|
||||
struct _tm_ { /* compare to ctime(3) */
|
||||
uint16_t year;
|
||||
uint16_t mon;
|
||||
uint16_t day;
|
||||
uint16_t hour;
|
||||
uint16_t min;
|
||||
uint16_t sec;
|
||||
};
|
||||
|
||||
char *ltrim(char *s);
|
||||
char *rtrim(char *s);
|
||||
char *trim(char *s);
|
||||
|
||||
int strtotime (char *s, struct _tm_ *tp);
|
||||
// uint8_t dayofweek(uint8_t century, uint8_t y, uint8_t m, uint8_t d);
|
||||
|
||||
|
||||
#endif /* INC_HELPER_H_ */
|
||||
|
@ -53,6 +53,7 @@ extern "C" {
|
||||
void Error_Handler(void);
|
||||
|
||||
/* USER CODE BEGIN EFP */
|
||||
void print_system_info(void);
|
||||
|
||||
/* USER CODE END EFP */
|
||||
|
||||
|
@ -10,14 +10,14 @@
|
||||
|
||||
#define RING_STATISTICS_ENABLED 1
|
||||
|
||||
#define RINGBUF_MAX_READ_LEN 20
|
||||
#define RINGBUF_MAX_READ_LEN 80
|
||||
|
||||
typedef enum {
|
||||
RINGBUF_PARAM_NONE = 0x00,
|
||||
RINGBUF_ALLOWOVERWRITE= 0x01,
|
||||
} ringbuf_param_t;
|
||||
|
||||
#if !defined _SYS_ERRNO_H_ && !defined __ERRNO_H__ && !defined _STM32_SI5351_H_
|
||||
#if !defined _SYS_ERRNO_H_ && !defined __ERRNO_H__ && !defined __AT1_ERROR_NUMBERS__
|
||||
typedef enum {
|
||||
EPERM = 1, /*!< Operation not permitted */
|
||||
EIO = 5, /*!< I/O error */
|
||||
|
@ -92,9 +92,9 @@ extern "C" {
|
||||
typedef struct __SI5351_HandleTypeDef *si5351_inst_t;
|
||||
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/** @enum errno_t Error Number Constants, @TODO could also errno.h included!!
|
||||
/** @enum errno_t Error Number Constants, @TODO you can also include <errno.h>
|
||||
*/
|
||||
#if !defined _SYS_ERRNO_H_ && !defined __ERRNO_H__
|
||||
#if !defined _SYS_ERRNO_H_ && !defined __ERRNO_H__ && !defined __AT1_ERROR_NUMBERS__
|
||||
typedef enum {
|
||||
EPERM = 1, /*!< Operation not permitted */
|
||||
EIO = 5, /*!< I/O error */
|
||||
|
Reference in New Issue
Block a user