ADD read and write wrapper function for i2c bus, start programming
procedure for si5351
This commit is contained in:
@ -81,7 +81,7 @@ extern "C" {
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
|
||||
#include <stm32_si5351_reg.h> /* register map of the Si5351 */
|
||||
/* Private includes ----------------------------------------------------------*/
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
@ -89,14 +89,17 @@ extern "C" {
|
||||
typedef struct __SI5351_HandleTypeDef *si5351_inst_t;
|
||||
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/** @enum errno_t Error Number Constants
|
||||
/** @enum errno_t Error Number Constants, @TODO could also errno.h included!!
|
||||
*/
|
||||
typedef enum {
|
||||
EPERM = 1, /*!< Operation not permitted */
|
||||
EIO = 5, /*!< I/O error */
|
||||
ENOMEM = 12, /*!< Out of memory */
|
||||
ENODEV = 19, /*!< No such device */
|
||||
EBUSY = 16, /*!< Device or resource busy */
|
||||
EINVAL = 22, /*!< Invalid argument */
|
||||
EADDRINUSE = 98 /*!< Address already in use */
|
||||
EADDRINUSE = 98,/*!< Address already in use */
|
||||
ETIMEDOUT = 116 /*!< Connection timed out */
|
||||
} si5351_errno_t;
|
||||
|
||||
/* Exported variables --------------------------------------------------------*/
|
||||
@ -107,6 +110,7 @@ typedef enum {
|
||||
si5351_inst_t si5351_init(void * i2c_handle, uint32_t xtal_frequency, uint8_t i2c_address);
|
||||
int si5351_deinit(si5351_inst_t si5351_handle);
|
||||
int si5351_isready(si5351_inst_t inst);
|
||||
int si5351_program(si5351_inst_t inst);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
1081
Core/Inc/stm32_si5351_reg.h
Normal file
1081
Core/Inc/stm32_si5351_reg.h
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user