Go to the documentation of this file.
50 #define REG_CHIP_ID 0x00
51 #define REG_REV_ID 0x01
52 #define REG_IOL_STAT 0x02
53 #define REG_DEV_STAT1 0x03
54 #define REG_DEV_STAT2 0x04
55 #define REG_ISDU_STAT 0x05
56 #define REG_IOL_ERR_CNT 0x06
57 #define REG_FRM_ERR_CNT 0x07
58 #define REG_IOL_INT 0x08
59 #define REG_DEV_INT 0x09
60 #define REG_ISDU_INT 0x0A
61 #define REG_IOL_INT_EN 0x0E
62 #define REG_DEV_INT_EN 0x0F
63 #define REG_ISDU_INT_EN 0x10
64 #define REG_IOL_CFG 0x14
65 #define REG_WATCHDOG 0x15
66 #define REG_WDGCLR 0x16
67 #define REG_MISC_CFG 0x17
68 #define REG_CLK_CFG 0x18
69 #define REG_CLK_TRIM 0x19
70 #define REG_PG1_MSTCMD 0x1A
71 #define REG_PG1_MSTCYCTM 0x1B
72 #define REG_PG1_MINCYCTM 0x1C
73 #define REG_PG1_MSEQCAP 0x1D
74 #define REG_PG1_REVID 0x1E
75 #define REG_PG1_PDIN 0x1F
76 #define REG_PG1_PDOUT 0x20
77 #define REG_PG1_VID1 0x21
78 #define REG_PG1_VID2 0x22
79 #define REG_PG1_DEVID1 0x23
80 #define REG_PG1_DEVID2 0x24
81 #define REG_PG1_DEVID3 0x25
82 #define REG_PG1_FUNCID1 0x26
83 #define REG_PG1_FUNCID2 0x27
84 #define REG_PG1_RES1 0x28
85 #define REG_PG1_RES2 0x29
86 #define REG_WDG_EVENT 0x2A
87 #define REG_STATUS_CODE_DEF 0x2B
88 #define REG_STATUS_CODE 0x2C
89 #define REG_EVENT_QUAL 0x2D
90 #define REG_EVENT_CODE_MSB 0x2E
91 #define REG_EVENT_CODE_LSB 0x2F
92 #define REG_EVENT_FLAG 0x30
93 #define REG_PDIN_FIFO 0x35
94 #define REG_PDIN_DATA_RDY 0x36
95 #define REG_PDOUT_FIFO 0x37
96 #define REG_ISDU_OFFSET 0x3F
97 #define REG_ISDU_INFIFO 0x40
98 #define REG_ISDU_DATARDY 0x41
99 #define REG_ISDU_OUTFIFO 0x42
100 #define REG_ISDU_LEVEL 0x43
101 #define REG_LED1_CTRL_MSB 0x50
102 #define REG_LED1_CTRL_LSB 0x51
103 #define REG_LED2_CTRL_MSB 0x52
104 #define REG_LED2_CTRL_LSB 0x53
105 #define REG_GPIO1_CTRL 0x54
106 #define REG_GPIO2_CTRL 0x55
107 #define REG_CQ_CTRL1 0x56
108 #define REG_CQ_CTRL2 0x57
109 #define REG_DO_CTRL1 0x58
110 #define REG_DO_CTRL2 0x59
111 #define REG_TX_CTRL 0x5A
112 #define REG_RX_CTRL 0x5B
113 #define REG_MISC_CTRL 0x5C
116 #define DEV_STAT2_SET_DOFAULT NO_OS_BIT(5)
117 #define DEV_STAT2_SET_CQFAULT NO_OS_BIT(4)
118 #define DEV_STAT2_SET_V24ERR NO_OS_BIT(3)
119 #define DEV_STAT2_SET_VMWERR NO_OS_BIT(2)
120 #define DEV_STAT2_SET_THWARN NO_OS_BIT(1)
121 #define DEV_STAT2_SET_TSHD NO_OS_BIT(0)
124 #define BIT_CQCTRL1_CQ_SLEW0 0x00
125 #define BIT_CQCTRL1_CQ_SLEW1 NO_OS_BIT(6)
126 #define BIT_CQCTRL1_CQ_SLEW2 NO_OS_BIT(7)
127 #define BIT_CQCTRL1_CQ_SLEW3 NO_OS_BIT(7, 6)
128 #define BIT_CQCTRL1_CQ_PD NO_OS_BIT(5)
129 #define BIT_CQCTRL1_CQ_PU NO_OS_BIT(4)
130 #define BIT_CQCTRL1_CQ_NPN NO_OS_BIT(3)
131 #define BIT_CQCTRL1_CQ_PP NO_OS_BIT(2)
132 #define BIT_CQCTRL1_CQ_INV NO_OS_BIT(1)
133 #define BIT_CQCTRL1_CQ_EN NO_OS_BIT(0)
136 #define BIT_CQ_CL_50MA 0x00
137 #define BIT_CQ_CL_100MA NO_OS_BIT(6)
138 #define BIT_CQ_CL_200MA NO_OS_BIT(7)
139 #define BIT_CQ_CL_250MA NO_OS_BIT(7, 6)
140 #define BIT_CQ_CLBL_128US 0x00
141 #define BIT_CQ_CLBL_500US NO_OS_BIT(3)
142 #define BIT_CQ_CLBL_1000US NO_OS_BIT(4)
143 #define BIT_CQ_CLBL_5000US NO_OS_BIT(4, 3)
144 #define BIT_CQ_AUTORTY_TIME_50MS 0x00
145 #define BIT_CQ_AUTORTY_TIME_100MS NO_OS_BIT(1)
146 #define BIT_CQ_AUTORTY_TIME_200MS NO_OS_BIT(2)
147 #define BIT_CQ_AUTORTY_TIME_500MS NO_OS_BIT(2, 1)
148 #define BIT_CQ_AUTORTY NO_OS_BIT(0)
151 #define BIT_DOCTRL1_DO_SLEW0 0x00
152 #define BIT_DOCTRL1_DO_SLEW1 NO_OS_BIT(6)
153 #define BIT_DOCTRL1_DO_SLEW2 NO_OS_BIT(7)
154 #define BIT_DOCTRL1_DO_SLEW3 NO_OS_BIT(7, 6)
155 #define BIT_DOCTRL1_DO_PD NO_OS_BIT(5)
156 #define BIT_DOCTRL1_DO_PU NO_OS_BIT(4)
157 #define BIT_DOCTRL1_DO_NPN NO_OS_BIT(3)
158 #define BIT_DOCTRL1_DO_PP NO_OS_BIT(2)
159 #define BIT_DOCTRL1_DO_INV NO_OS_BIT(1)
160 #define BIT_DOCTRL1_DO_EN NO_OS_BIT(0)
163 #define BIT_DO_CL_50MA 0x00
164 #define BIT_DO_CL_100MA NO_OS_BIT(6)
165 #define BIT_DO_CL_200MA NO_OS_BIT(7)
166 #define BIT_DO_CL_250MA NO_OS_BIT(7, 6)
167 #define BIT_DO_CLBL_128US 0x00
168 #define BIT_DO_CLBL_500US NO_OS_BIT(3)
169 #define BIT_DO_CLBL_1000US NO_OS_BIT(4)
170 #define BIT_DO_CLBL_5000US NO_OS_BIT(4, 3)
171 #define BIT_DO_AUTORTY_TIME_50MS 0x00
172 #define BIT_DO_AUTORTY_TIME_100MS NO_OS_BIT(1)
173 #define BIT_DO_AUTORTY_TIME_200MS NO_OS_BIT(2)
174 #define BIT_DO_AUTORTY_TIME_500MS NO_OS_BIT(2, 1)
175 #define BIT_DO_AUTORTY NO_OS_BIT(0)
178 #define BIT_TXC_CQTX NO_OS_BIT(7)
179 #define BIT_TXC_CQTXEN NO_OS_BIT(6)
180 #define BIT_TXC_CQDRVSEL NO_OS_BIT(5)
181 #define BIT_TXC_DOTX NO_OS_BIT(4)
182 #define BIT_TXC_DODRVSEL NO_OS_BIT(3)
183 #define BIT_TXC_CQDOPAR NO_OS_BIT(1)
184 #define BIT_TXC_DO_AV NO_OS_BIT(0)
187 #define DEV_STAT2_SET_V24ERR NO_OS_BIT(3)
188 #define DEV_STAT2_SET_VMERR NO_OS_BIT(2)
189 #define DEV_STAT2_SET_THWARN NO_OS_BIT(1)
190 #define DEV_STAT2_SET_TSHD NO_OS_BIT(0)
193 #define EVF_EVENT_FLG NO_OS_BIT(0)
196 #define REG_EVENT_CODE_MSB_MSK NO_OS_GENMASK(15, 8)
197 #define REG_EVENT_CODE_LSB_MSK NO_OS_GENMASK(7, 0)
200 #define PG1_VID1_MSK NO_OS_GENMASK(15, 8)
201 #define PG1_VID2_MSK NO_OS_GENMASK(7, 0)
204 #define PG1_DEVID1_MSK NO_OS_GENMASK(23, 16)
205 #define PG1_DEVID2_MSK NO_OS_GENMASK(15, 8)
206 #define PG1_DEVID3_MSK NO_OS_GENMASK(7, 0)
209 #define PG1_FUNCID1_MSB_MSK NO_OS_GENMASK(15, 8)
210 #define PG1_FUNCID1_LSB_MSK NO_OS_GENMASK(7, 0)
213 #define REG_LED1_CTRL_MSB_MSK NO_OS_GENMASK(15, 8)
214 #define REG_LED1_CTRL_LSB_MSK NO_OS_GENMASK(7, 0)
217 #define REG_LED2_CTRL_MSB_MSK NO_OS_GENMASK(15, 8)
218 #define REG_LED2_CTRL_LSB_MSK NO_OS_GENMASK(7, 0)
221 #define MAX22516_SPI_DUMMY_DATA 0x00
222 #define MAX22516_BUFF_SIZE_BYTES 64
223 #define MAX22516_SPI_READ_CMD NO_OS_BIT(7)
263 uint8_t mask, uint8_t data);
267 uint8_t count, uint8_t *data);
271 uint8_t count, uint8_t *data);
377 uint8_t wd_clr, uint8_t wd_event_en,
378 uint8_t wd_event_flag);
int max22516_set_cq(struct max22516_dev *dev, uint8_t lvl)
MAX22516 set cq.
Definition: max22516.c:554
int max22516_burst_read_register(struct max22516_dev *dev, uint8_t reg_addr, uint8_t count, uint8_t *data)
MAX22516 burst read.
Definition: max22516.c:138
int max22516_set_led1(struct max22516_dev *dev, uint16_t ltmr)
MAX22516 set led1.
Definition: max22516.c:361
int max22516_update(struct max22516_dev *dev, uint8_t reg_addr, uint8_t mask, uint8_t data)
Update MAX22516 register.
Definition: max22516.c:93
int max22516_setup_do_pnp(struct max22516_dev *dev)
MAX22516 setup do pnp.
Definition: max22516.c:671
int max22516_get_cq_stat(struct max22516_dev *dev, uint8_t *status3)
MAX22516 get cq stat.
Definition: max22516.c:622
#define MAX22516_SPI_READ_CMD
Definition: max22516.h:223
int max22516_setup_watchdog(struct max22516_dev *dev, uint8_t wd_timeout, uint8_t wd_clr, uint8_t wd_event_en, uint8_t wd_event_flag)
MAX22516 setup watchdog.
Definition: max22516.c:799
#define REG_LED1_CTRL_MSB_MSK
Definition: max22516.h:213
#define REG_EVENT_CODE_MSB
Definition: max22516.h:90
int max22516_remove(struct max22516_dev *dev)
Free resoulces allocated for MAX22516.
Definition: max22516.c:868
#define REG_FRM_ERR_CNT
Definition: max22516.h:57
#define MAX22516_SPI_DUMMY_DATA
Definition: max22516.h:221
int max22516_do_get(struct max22516_dev *dev, uint8_t *lvl)
MAX22516 do get.
Definition: max22516.c:723
int32_t no_os_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: no_os_spi.c:159
#define REG_LED2_CTRL_MSB
Definition: max22516.h:103
#define BIT_DOCTRL1_DO_EN
Definition: max22516.h:160
int max22516_set_id(struct max22516_dev *dev, uint16_t vid, uint32_t id, uint16_t fid)
MAX22516 set id.
Definition: max22516.c:221
Header file of SPI Interface.
int max22516_setup_do_pp(struct max22516_dev *dev)
MAX22516 setup do pp.
Definition: max22516.c:651
#define REG_PG1_MSTCYCTM
Definition: max22516.h:71
int max22516_burst_write_register(struct max22516_dev *dev, uint8_t reg_addr, uint8_t count, uint8_t *data)
MAX22516 burst write.
Definition: max22516.c:117
int max22516_setup_cq_pp(struct max22516_dev *dev)
MAX22516 setup cq pp.
Definition: max22516.c:458
int max22516_do_set(struct max22516_dev *dev, uint8_t lvl)
MAX22516 do set.
Definition: max22516.c:711
struct no_os_spi_desc * spi_desc
Definition: max22516.h:244
int max22516_clr_iol_err_cnt(struct max22516_dev *dev)
MAX22516 clr iol err cnt.
Definition: max22516.c:340
int max22516_get_cq(struct max22516_dev *dev, uint8_t *cq)
MAX22516 get cq.
Definition: max22516.c:599
#define BIT_DO_AUTORTY
Definition: max22516.h:175
int max22516_tx_set(struct max22516_dev *dev, uint8_t low_high)
MAX22516 tx set.
Definition: max22516.c:516
#define DEV_STAT2_SET_DOFAULT
Definition: max22516.h:116
int max22516_init(struct max22516_dev **device, struct max22516_init_param *init_param)
Initialize the MAX22516 device.
Definition: max22516.c:839
Header file of Delay functions.
struct no_os_spi_init_param * spi_init
Definition: max22516.h:235
#define DEV_STAT2_SET_TSHD
Definition: max22516.h:190
#define REG_IOL_ERR_CNT
Definition: max22516.h:56
int max22516_get_mst_ctmr(struct max22516_dev *dev, uint16_t min_t, int16_t *c_tmr)
MAX22516 get mst ctmr.
Definition: max22516.c:287
int max22516_write(struct max22516_dev *dev, uint8_t reg_addr, uint8_t data)
Writes data to max22516 over SPI.
Definition: max22516.c:54
Header file for max22516 Driver.
MAX22516 Initialization Parameters structure.
Definition: max22516.h:233
int max22516_set_min_ctmr(struct max22516_dev *dev, uint16_t min_t)
MAX22516 set min ctmr.
Definition: max22516.c:203
void max22516_rebuild_min_cyct_to_us(int16_t t, uint8_t *tmr)
MAX22516 rebuild min cyct to microseconds.
Definition: max22516.c:182
#define REG_LED1_CTRL_LSB_MSK
Definition: max22516.h:214
int max22516_burst_read_register(struct max22516_dev *dev, uint8_t reg_addr, uint8_t count, uint8_t *data)
MAX22516 burst read.
Definition: max22516.c:138
Definition: ad9361_util.h:69
int max22516_clr_frm_err_cnt(struct max22516_dev *dev)
MAX22516 clr frm err cnt.
Definition: max22516.c:350
MAX22516 Device Descriptor.
Definition: max22516.h:242
int max22516_get_dl_mode(struct max22516_dev *dev, uint8_t *mode)
MAX22516 get dl mode.
Definition: max22516.c:308
int max22516_read(struct max22516_dev *dev, uint8_t reg_addr, uint8_t *data)
Reads data from max22516 over SPI.
Definition: max22516.c:69
int max22516_get_iol_err_cnt(struct max22516_dev *dev, uint8_t *cnt)
MAX22516 get iol err cnt.
Definition: max22516.c:319
#define REG_LED1_CTRL_MSB
Definition: max22516.h:101
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
#define BIT_CQ_AUTORTY_TIME_200MS
Definition: max22516.h:146
#define BIT_TXC_CQTXEN
Definition: max22516.h:179
#define REG_WDGCLR
Definition: max22516.h:66
int max22516_get_thd(struct max22516_dev *dev, uint8_t *status3)
MAX22516 get THD.
Definition: max22516.c:424
int max22516_get_do_stat(struct max22516_dev *dev, uint8_t *status3)
MAX22516 get do stat.
Definition: max22516.c:743
int max22516_remove(struct max22516_dev *dev)
Free resoulces allocated for MAX22516.
Definition: max22516.c:868
int max22516_tx_get(struct max22516_dev *dev, uint8_t *low_high)
MAX22516 tx get.
Definition: max22516.c:579
int max22516_setup_cq_npn(struct max22516_dev *dev)
MAX22516 setup cq npn.
Definition: max22516.c:496
#define BIT_TXC_CQDRVSEL
Definition: max22516.h:180
#define REG_DEV_STAT2
Definition: max22516.h:54
int max22516_set_led2(struct max22516_dev *dev, uint16_t ltmr)
MAX22516 set led2.
Definition: max22516.c:380
int max22516_setup_do_pp(struct max22516_dev *dev)
MAX22516 setup do pp.
Definition: max22516.c:651
int max22516_burst_write_register(struct max22516_dev *dev, uint8_t reg_addr, uint8_t count, uint8_t *data)
MAX22516 burst write.
Definition: max22516.c:117
#define REG_CQ_CTRL2
Definition: max22516.h:108
int max22516_setup_cq_pp(struct max22516_dev *dev)
MAX22516 setup cq pp.
Definition: max22516.c:458
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
void max22516_build_tcyc(int16_t t, uint8_t *tmr)
MAX22516 build tcyc.
Definition: max22516.c:160
int max22516_set_event(struct max22516_dev *dev, uint8_t ev_qual, uint16_t ev_code)
MAX22516 set event.
Definition: max22516.c:764
#define REG_TX_CTRL
Definition: max22516.h:111
#define REG_LED2_CTRL_LSB
Definition: max22516.h:104
void max22516_decode_tcyc(uint8_t tmr, int16_t *t)
MAX22516 decode tcyc.
Definition: max22516.c:265
#define REG_EVENT_CODE_LSB_MSK
Definition: max22516.h:197
#define BIT_CQCTRL1_CQ_PP
Definition: max22516.h:131
#define REG_DO_CTRL2
Definition: max22516.h:110
#define PG1_DEVID2_MSK
Definition: max22516.h:205
int max22516_set_cq(struct max22516_dev *dev, uint8_t lvl)
MAX22516 set cq.
Definition: max22516.c:554
int max22516_set_led1(struct max22516_dev *dev, uint16_t ltmr)
MAX22516 set led1.
Definition: max22516.c:361
#define PG1_FUNCID1_LSB_MSK
Definition: max22516.h:210
int max22516_txen_set(struct max22516_dev *dev, uint8_t lvl)
MAX22516 txen set.
Definition: max22516.c:535
int max22516_write(struct max22516_dev *dev, uint8_t reg_addr, uint8_t data)
Writes data to max22516 over SPI.
Definition: max22516.c:54
#define REG_DO_CTRL1
Definition: max22516.h:109
int max22516_setup_watchdog(struct max22516_dev *dev, uint8_t wd_timeout, uint8_t wd_clr, uint8_t wd_event_en, uint8_t wd_event_flag)
MAX22516 setup watchdog.
Definition: max22516.c:799
int max22516_clr_frm_err_cnt(struct max22516_dev *dev)
MAX22516 clr frm err cnt.
Definition: max22516.c:350
#define DEV_STAT2_SET_VMERR
Definition: max22516.h:188
#define BIT_DO_CLBL_500US
Definition: max22516.h:168
int max22516_setup_cq_pnp(struct max22516_dev *dev)
MAX22516 setup cq pnp.
Definition: max22516.c:477
int max22516_do_get(struct max22516_dev *dev, uint8_t *lvl)
MAX22516 do get.
Definition: max22516.c:723
int max22516_setup_do_dis(struct max22516_dev *dev)
MAX22516 setup do dis.
Definition: max22516.c:641
#define REG_PG1_DEVID3
Definition: max22516.h:81
int max22516_setup_cq_dis(struct max22516_dev *dev)
MAX22516 setup cq dis.
Definition: max22516.c:448
#define REG_WDG_EVENT
Definition: max22516.h:86
int max22516_setup_cq_npn(struct max22516_dev *dev)
MAX22516 setup cq npn.
Definition: max22516.c:496
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
#define DEV_STAT2_SET_V24ERR
Definition: max22516.h:187
#define PG1_DEVID3_MSK
Definition: max22516.h:206
int max22516_clr_iol_err_cnt(struct max22516_dev *dev)
MAX22516 clr iol err cnt.
Definition: max22516.c:340
int max22516_get_cq(struct max22516_dev *dev, uint8_t *cq)
MAX22516 get cq.
Definition: max22516.c:599
#define BIT_CQ_AUTORTY
Definition: max22516.h:148
int max22516_setup_do_npn(struct max22516_dev *dev)
MAX22516 setup do npn.
Definition: max22516.c:690
#define BIT_DOCTRL1_DO_NPN
Definition: max22516.h:157
#define BIT_DO_CL_200MA
Definition: max22516.h:165
#define BIT_CQ_CL_200MA
Definition: max22516.h:138
#define BIT_TXC_CQTX
Definition: max22516.h:178
#define REG_LED2_CTRL_MSB_MSK
Definition: max22516.h:217
int max22516_set_event(struct max22516_dev *dev, uint8_t ev_qual, uint16_t ev_code)
MAX22516 set event.
Definition: max22516.c:764
int max22516_set_min_ctmr(struct max22516_dev *dev, uint16_t min_t)
MAX22516 set min ctmr.
Definition: max22516.c:203
void max22516_rebuild_min_cyct_to_us(int16_t t, uint8_t *tmr)
MAX22516 rebuild min cyct to microseconds.
Definition: max22516.c:182
#define REG_LED2_CTRL_LSB_MSK
Definition: max22516.h:218
#define MAX22516_BUFF_SIZE_BYTES
Definition: max22516.h:222
#define BIT_DOCTRL1_DO_PP
Definition: max22516.h:158
int max22516_setup_do_pnp(struct max22516_dev *dev)
MAX22516 setup do pnp.
Definition: max22516.c:671
#define REG_PG1_MINCYCTM
Definition: max22516.h:72
#define PG1_DEVID1_MSK
Definition: max22516.h:204
#define PG1_VID1_MSK
Definition: max22516.h:200
#define REG_CQ_CTRL1
Definition: max22516.h:107
int max22516_get_v24(struct max22516_dev *dev, uint8_t *status3)
MAX22516 get v24.
Definition: max22516.c:399
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
#define REG_PG1_VID1
Definition: max22516.h:77
#define PG1_FUNCID1_MSB_MSK
Definition: max22516.h:209
int max22516_get_do_stat(struct max22516_dev *dev, uint8_t *status3)
MAX22516 get do stat.
Definition: max22516.c:743
#define EVF_EVENT_FLG
Definition: max22516.h:193
int max22516_get_frm_err_cnt(struct max22516_dev *dev, uint8_t *cnt)
MAX22516 get frm err cnt.
Definition: max22516.c:330
#define REG_LED1_CTRL_LSB
Definition: max22516.h:102
int max22516_tx_get(struct max22516_dev *dev, uint8_t *low_high)
MAX22516 tx get.
Definition: max22516.c:579
int max22516_do_set(struct max22516_dev *dev, uint8_t lvl)
MAX22516 do set.
Definition: max22516.c:711
int max22516_setup_cq_dis(struct max22516_dev *dev)
MAX22516 setup cq dis.
Definition: max22516.c:448
#define REG_PG1_FUNCID1
Definition: max22516.h:82
#define BIT_DOCTRL1_DO_PD
Definition: max22516.h:155
int max22516_set_led2(struct max22516_dev *dev, uint16_t ltmr)
MAX22516 set led2.
Definition: max22516.c:380
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
#define REG_EVENT_QUAL
Definition: max22516.h:89
#define REG_STATUS_CODE
Definition: max22516.h:88
#define BIT_CQCTRL1_CQ_PD
Definition: max22516.h:128
#define DEV_STAT2_SET_CQFAULT
Definition: max22516.h:117
#define BIT_CQ_CLBL_500US
Definition: max22516.h:141
int max22516_update(struct max22516_dev *dev, uint8_t reg_addr, uint8_t mask, uint8_t data)
Update MAX22516 register.
Definition: max22516.c:93
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:116
int max22516_get_cq_stat(struct max22516_dev *dev, uint8_t *status3)
MAX22516 get cq stat.
Definition: max22516.c:622
#define BIT_CQCTRL1_CQ_EN
Definition: max22516.h:133
#define REG_EVENT_FLAG
Definition: max22516.h:92
Header file of GPIO Interface.
int max22516_txen_set(struct max22516_dev *dev, uint8_t lvl)
MAX22516 txen set.
Definition: max22516.c:535
int max22516_get_dl_mode(struct max22516_dev *dev, uint8_t *mode)
MAX22516 get dl mode.
Definition: max22516.c:308
#define PG1_VID2_MSK
Definition: max22516.h:201
int max22516_read(struct max22516_dev *dev, uint8_t reg_addr, uint8_t *data)
Reads data from max22516 over SPI.
Definition: max22516.c:69
#define REG_EVENT_CODE_MSB_MSK
Definition: max22516.h:196
int max22516_get_iol_err_cnt(struct max22516_dev *dev, uint8_t *cnt)
MAX22516 get iol err cnt.
Definition: max22516.c:319
#define DEV_STAT2_SET_THWARN
Definition: max22516.h:189
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:52
#define REG_PG1_DEVID2
Definition: max22516.h:80
#define REG_PG1_VID2
Definition: max22516.h:78
int max22516_set_id(struct max22516_dev *dev, uint16_t vid, uint32_t id, uint16_t fid)
MAX22516 set id.
Definition: max22516.c:221
int max22516_get_thd(struct max22516_dev *dev, uint8_t *status3)
MAX22516 get THD.
Definition: max22516.c:424
Header file of utility functions.
int max22516_get_v24(struct max22516_dev *dev, uint8_t *status3)
MAX22516 get v24.
Definition: max22516.c:399
int max22516_setup_cq_pnp(struct max22516_dev *dev)
MAX22516 setup cq pnp.
Definition: max22516.c:477
#define REG_EVENT_CODE_LSB
Definition: max22516.h:91
int max22516_setup_do_dis(struct max22516_dev *dev)
MAX22516 setup do dis.
Definition: max22516.c:641
enum no_os_spi_mode mode
Definition: no_os_spi.h:202
int max22516_get_frm_err_cnt(struct max22516_dev *dev, uint8_t *cnt)
MAX22516 get frm err cnt.
Definition: max22516.c:330
int max22516_tx_set(struct max22516_dev *dev, uint8_t low_high)
MAX22516 tx set.
Definition: max22516.c:516
int max22516_init(struct max22516_dev **device, struct max22516_init_param *init_param)
Initialize the MAX22516 device.
Definition: max22516.c:839
void max22516_build_tcyc(int16_t t, uint8_t *tmr)
MAX22516 build tcyc.
Definition: max22516.c:160
int max22516_get_mst_ctmr(struct max22516_dev *dev, uint16_t min_t, int16_t *c_tmr)
MAX22516 get mst ctmr.
Definition: max22516.c:287
#define BIT_TXC_DOTX
Definition: max22516.h:181
int max22516_setup_do_npn(struct max22516_dev *dev)
MAX22516 setup do npn.
Definition: max22516.c:690
#define BIT_DO_AUTORTY_TIME_200MS
Definition: max22516.h:173
void max22516_decode_tcyc(uint8_t tmr, int16_t *t)
MAX22516 decode tcyc.
Definition: max22516.c:265
#define REG_PG1_DEVID1
Definition: max22516.h:79
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
uint8_t comm_buff[MAX22516_BUFF_SIZE_BYTES]
Definition: max22516.h:246