rework of si5351 driver

This commit is contained in:
2022-07-16 23:24:59 +02:00
parent f3682d7103
commit 2c8881338d
6 changed files with 105 additions and 82 deletions

View File

@ -70,8 +70,6 @@ extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include <stdint.h>
#include <si5351_reg.h> /* register map of the Si5351 */
/* #include <errno.h> could also be included */
/* Private includes ----------------------------------------------------------*/
@ -105,7 +103,7 @@ typedef enum {
/* Exported macros -----------------------------------------------------------*/
#define __SI5351__ 1
#define __SI5351_MINOR__ 1
#define __SI5351_MINOR__ 2
#define __SI5351_PATCHLEVEL__ 0
#define SI5351_VERSION (__SI5351__ * 10000 \
@ -127,7 +125,6 @@ int si5351_deinitialize(void);
si5351_inst_t si5351_init(void * i2c_handle, uint8_t i2c_address, uint32_t xtal_frequency);
int si5351_deinit(si5351_inst_t si5351_handle);
int si5351_i2c_ready(si5351_inst_t inst);
int si5351_program(si5351_inst_t inst);
int si5351_enable_output(si5351_inst_t inst, uint8_t clk);
int si5351_disable_output(si5351_inst_t inst, uint8_t clk);
int si5351_set_clk0(si5351_inst_t inst, uint32_t frequency);
@ -136,7 +133,10 @@ int si5351_set_clk(si5351_inst_t inst, uint8_t clk, uint32_t frequency, si5351_p
char * si5351_read_debug_msg(si5351_inst_t inst);
char * si5351_read_register_debug(si5351_inst_t inst, char *buf, size_t bufsize, uint8_t regaddr);
/* some functions for getting information */
int si5351_get_instance(si5351_inst_t *inst);
int si5351_get_i2c_address(si5351_inst_t inst);
void* si5351_get_i2c_handle(si5351_inst_t inst);
/* under development */
int si5351_set_clk_phase(si5351_inst_t inst, uint8_t clk, uint32_t frequency, double phase, si5351_pll_t pll);