no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
adp5589.h
Go to the documentation of this file.
1/***************************************************************************/
33#ifndef __ADP5589_H__
34#define __ADP5589_H__
35
36#include <stdint.h>
37#include "no_os_i2c.h"
38
39#define PMOD_IOXP_J1 0 // J1 port of PmodIOXP
40#define PMOD_IOXP_J2 1 // J2 port of PmodIOXP
41#define ADP5589_ADDRESS 0x34 // I2C ADDRESS
42#define ADP5589_ID 0x10 // Manufacturer ID
43
44/* Register address definitions */
45#define ADP5589_ADR_ID 0x00
46#define ADP5589_ADR_INT_STATUS 0x01
47#define ADP5589_ADR_STATUS 0x02
48#define ADP5589_ADR_FIFO1 0x03
49#define ADP5589_ADR_FIFO2 0x04
50#define ADP5589_ADR_FIFO3 0x05
51#define ADP5589_ADR_FIFO4 0x06
52#define ADP5589_ADR_FIFO5 0x07
53#define ADP5589_ADR_FIFO6 0x08
54#define ADP5589_ADR_FIFO7 0x09
55#define ADP5589_ADR_FIFO8 0x0A
56#define ADP5589_ADR_FIFO9 0x0B
57#define ADP5589_ADR_FIFO10 0x0C
58#define ADP5589_ADR_FIFO11 0x0D
59#define ADP5589_ADR_FIFO12 0x0E
60#define ADP5589_ADR_FIFO13 0x0F
61#define ADP5589_ADR_FIFO14 0x10
62#define ADP5589_ADR_FIFO15 0x11
63#define ADP5589_ADR_FIFO16 0x12
64#define ADP5589_ADR_GPI_INT_STATUS_A 0x13
65#define ADP5589_ADR_GPI_INT_STATUS_B 0x14
66#define ADP5589_ADR_GPI_INT_STATUS_C 0x15
67#define ADP5589_ADR_GPI_STATUS_A 0x16
68#define ADP5589_ADR_GPI_STATUS_B 0x17
69#define ADP5589_ADR_GPI_STATUS_C 0x18
70#define ADP5589_ADR_RPULL_CONFIG_A 0x19
71#define ADP5589_ADR_RPULL_CONFIG_B 0x1A
72#define ADP5589_ADR_RPULL_CONFIG_C 0x1B
73#define ADP5589_ADR_RPULL_CONFIG_D 0x1C
74#define ADP5589_ADR_RPULL_CONFIG_E 0x1D
75#define ADP5589_ADR_GPI_INT_LEVEL_A 0x1E
76#define ADP5589_ADR_GPI_INT_LEVEL_B 0x1F
77#define ADP5589_ADR_GPI_INT_LEVEL_C 0x20
78#define ADP5589_ADR_GPI_EVENT_EN_A 0x21
79#define ADP5589_ADR_GPI_EVENT_EN_B 0x22
80#define ADP5589_ADR_GPI_EVENT_EN_C 0x23
81#define ADP5589_ADR_GPI_INTERRUPT_EN_A 0x24
82#define ADP5589_ADR_GPI_INTERRUPT_EN_B 0x25
83#define ADP5589_ADR_GPI_INTERRUPT_EN_C 0x26
84#define ADP5589_ADR_DEBOUNCE_DIS_A 0x27
85#define ADP5589_ADR_DEBOUNCE_DIS_B 0x28
86#define ADP5589_ADR_DEBOUNCE_DIS_C 0x29
87#define ADP5589_ADR_GPO_DATA_OUT_A 0x2A
88#define ADP5589_ADR_GPO_DATA_OUT_B 0x2B
89#define ADP5589_ADR_GPO_DATA_OUT_C 0x2C
90#define ADP5589_ADR_GPO_OUT_MODE_A 0x2D
91#define ADP5589_ADR_GPO_OUT_MODE_B 0x2E
92#define ADP5589_ADR_GPO_OUT_MODE_C 0x2F
93#define ADP5589_ADR_GPIO_DIRECTION_A 0x30
94#define ADP5589_ADR_GPIO_DIRECTION_B 0x31
95#define ADP5589_ADR_GPIO_DIRECTION_C 0x32
96#define ADP5589_ADR_UNLOCK1 0x33
97#define ADP5589_ADR_UNLOCK2 0x34
98#define ADP5589_ADR_EXT_LOCK_EVENT 0x35
99#define ADP5589_ADR_UNLOCK_TIMERS 0x36
100#define ADP5589_ADR_LOCK_CFG 0x37
101#define ADP5589_ADR_RESET1_EVENT_A 0x38
102#define ADP5589_ADR_RESET1_EVENT_B 0x39
103#define ADP5589_ADR_RESET1_EVENT_C 0x3A
104#define ADP5589_ADR_RESET2_EVENT_A 0x3B
105#define ADP5589_ADR_RESET2_EVENT_B 0x3C
106#define ADP5589_ADR_RESET_CFG 0x3D
107#define ADP5589_ADR_PWM_OFFT_LOW 0x3E
108#define ADP5589_ADR_PWM_OFFT_HIGH 0x3F
109#define ADP5589_ADR_PWM_ONT_LOW 0x40
110#define ADP5589_ADR_PWM_ONT_HIGH 0x41
111#define ADP5589_ADR_PWM_CFG 0x42
112#define ADP5589_ADR_CLOCK_DIV_CFG 0x43
113#define ADP5589_ADR_LOGIC_1_CFG 0x44
114#define ADP5589_ADR_LOGIC_2_CFG 0x45
115#define ADP5589_ADR_LOGIC_FF_CFG 0x46
116#define ADP5589_ADR_LOGIC_INT_EVENT 0x47
117#define ADP5589_ADR_POLL_TIME_CFG 0x48
118#define ADP5589_ADR_PIN_CONFIG_A 0x49
119#define ADP5589_ADR_PIN_CONFIG_B 0x4A
120#define ADP5589_ADR_PIN_CONFIG_C 0x4B
121#define ADP5589_ADR_PIN_CONFIG_D 0x4C
122#define ADP5589_ADR_GENERAL_CFG_B 0x4D
123#define ADP5589_ADR_INT_EN 0x4E
124
125
126/* Register Bit Mask Definitions. */
127/* ID Register bits 0x00. */
128#define ADP5589_ID_MAN_ID (0xF0)
129#define ADP5589_ID_REV_ID (0x0F)
130/* INT_STATUS Register bits 0x01. */
131#define ADP5589_INT_STATUS_EVENT_INT (1 << 0)
132#define ADP5589_INT_STATUS_GPI_INT (1 << 1)
133#define ADP5589_INT_STATUS_OVERFLOW_INT (1 << 2)
134#define ADP5589_INT_STATUS_LOCK_INT (1 << 3)
135#define ADP5589_INT_STATUS_LOGIC1_INT (1 << 4)
136#define ADP5589_INT_STATUS_LOGIC2_INT (1 << 5)
137/* STATUS Register bits 0x02. */
138#define ADP5589_STATUS_EC(x) (((x) & 0x1F) << 0)
139#define ADP5589_STATUS_LOCK_STAT (1 << 5)
140#define ADP5589_STATUS_LOGIC1_STAT (1 << 6)
141#define ADP5589_STATUS_LOGIC2_STAT (1 << 7)
142/* INT_EN Register bits 0x4E. */
143#define ADP5589_INT_EN_EVENT_IEN (1 << 0)
144#define ADP5589_INT_EN_GPI_IEN (1 << 1)
145#define ADP5589_INT_EN_OVERFLOW_IEN (1 << 2)
146#define ADP5589_INT_EN_LOCK_IEN (1 << 3)
147#define ADP5589_INT_EN_LOGIC1_INT (1 << 4)
148#define ADP5589_INT_EN_LOGIC2_INT (1 << 5)
149/* GENERAL_CFG_B Register bits 0x4D. */
150#define ADP5589_GENERAL_CFG_B_RST_CFG (1 << 0)
151#define ADP5589_GENERAL_CFG_B_INT_CFG (1 << 1)
152#define ADP5589_GENERAL_CFG_B_LCK_TRK_GPI (1 << 3)
153#define ADP5589_GENERAL_CFG_B_LCK_TRK_LOGIC (1 << 4)
154#define ADP5589_GENERAL_CFG_B_CORE_FREQ(x) (((x) & 0x03) << 5)
155#define ADP5589_GENERAL_CFG_B_OSC_EN (1 << 7)
156/* PIN_CONFIG_D Register bits 0x4C. */
157#define ADP5589_PIN_CONFIG_D_R0_EXTEND (1 << 0)
158#define ADP5589_PIN_CONFIG_D_C9_EXTEND (1 << 1)
159#define ADP5589_PIN_CONFIG_D_R3_EXTEND(x) (((x) & 0x03) << 2)
160#define ADP5589_PIN_CONFIG_D_C6_EXTEND (1 << 4)
161#define ADP5589_PIN_CONFIG_D_R4_EXTEND (1 << 5)
162#define ADP5589_PIN_CONFIG_D_C4_EXTEND (1 << 6)
163#define ADP5589_PIN_CONFIG_D_PULL_SELECT (1 << 7)
164/* GPI_STATUS_A Register bits 0x16. */
165#define ADP5589_GPI_STATUS_GPI_1_STAT (1 << 0)
166#define ADP5589_GPI_STATUS_GPI_2_STAT (1 << 1)
167#define ADP5589_GPI_STATUS_GPI_3_STAT (1 << 2)
168#define ADP5589_GPI_STATUS_GPI_4_STAT (1 << 3)
169#define ADP5589_GPI_STATUS_GPI_5_STAT (1 << 4)
170#define ADP5589_GPI_STATUS_GPI_6_STAT (1 << 5)
171#define ADP5589_GPI_STATUS_GPI_7_STAT (1 << 6)
172#define ADP5589_GPI_STATUS_GPI_8_STAT (1 << 7)
173/* GPI_STATUS_B Register bits 0x17. */
174#define ADP5589_GPI_STATUS_GPI_9_STAT (1 << 0)
175#define ADP5589_GPI_STATUS_GPI_10_STAT (1 << 1)
176#define ADP5589_GPI_STATUS_GPI_11_STAT (1 << 2)
177#define ADP5589_GPI_STATUS_GPI_12_STAT (1 << 3)
178#define ADP5589_GPI_STATUS_GPI_13_STAT (1 << 4)
179#define ADP5589_GPI_STATUS_GPI_14_STAT (1 << 5)
180#define ADP5589_GPI_STATUS_GPI_15_STAT (1 << 6)
181#define ADP5589_GPI_STATUS_GPI_16_STAT (1 << 7)
182/* GPI_STATUS_C Register bits 0x18. */
183#define ADP5589_GPI_STATUS_GPI_17_STAT (1 << 0)
184#define ADP5589_GPI_STATUS_GPI_18_STAT (1 << 1)
185#define ADP5589_GPI_STATUS_GPI_19_STAT (1 << 2)
186/* GPI_EVENT_EN_A Register bits 0x21. */
187#define ADP5589_GPI_EVENT_EN_GPI_1_STAT (1 << 0)
188#define ADP5589_GPI_EVENT_EN_GPI_2_STAT (1 << 1)
189#define ADP5589_GPI_EVENT_EN_GPI_3_STAT (1 << 2)
190#define ADP5589_GPI_EVENT_EN_GPI_4_STAT (1 << 3)
191#define ADP5589_GPI_EVENT_EN_GPI_5_STAT (1 << 4)
192#define ADP5589_GPI_EVENT_EN_GPI_6_STAT (1 << 5)
193#define ADP5589_GPI_EVENT_EN_GPI_7_STAT (1 << 6)
194#define ADP5589_GPI_EVENT_EN_GPI_8_STAT (1 << 7)
195/* GPI_EVENT_EN_B Register bits 0x22. */
196#define ADP5589_GPI_EVENT_EN_GPI_9_STAT (1 << 0)
197#define ADP5589_GPI_EVENT_EN_GPI_10_STAT (1 << 1)
198#define ADP5589_GPI_EVENT_EN_GPI_11_STAT (1 << 2)
199#define ADP5589_GPI_EVENT_EN_GPI_12_STAT (1 << 3)
200#define ADP5589_GPI_EVENT_EN_GPI_13_STAT (1 << 4)
201#define ADP5589_GPI_EVENT_EN_GPI_14_STAT (1 << 5)
202#define ADP5589_GPI_EVENT_EN_GPI_15_STAT (1 << 6)
203#define ADP5589_GPI_EVENT_EN_GPI_16_STAT (1 << 7)
204/* GPI_EVENT_EN_C Register bits 0x23. */
205#define ADP5589_GPI_EVENT_EN_GPI_17_STAT (1 << 0)
206#define ADP5589_GPI_EVENT_EN_GPI_18_STAT (1 << 1)
207#define ADP5589_GPI_EVENT_EN_GPI_19_STAT (1 << 2)
208
209/* UNLOCK1 Register bits 0x33. */
210#define ADP5589_UNLOCK1_UNLOCK1_STATE (1 << 7)
211#define ADP5589_UNLOCK1_UNLOCK1_UNLOCK1(x) (((x) & 0x7F) << 0)
212/* UNLOCK2 Register bits 0x34. */
213#define ADP5589_UNLOCK2_UNLOCK2_STATE (1 << 7)
214#define ADP5589_UNLOCK2_UNLOCK2_UNLOCK2(x) (((x) & 0x7F) << 0)
215/* EXT_LOCK_EVENT Register bits 0x35. */
216#define ADP5589_EXT_LOCK_EXT_LOCK_STATE (1 << 7)
217#define ADP5589_EXT_LOCK_EXT_LOCK_EVENT(x) (((x) & 0x7F) << 0)
218/* UNLOCK_TIMERS Register bits 0x36. */
219#define ADP5589_UNLOCK_TIMERS_INT_MASK_TIMER(x) (((x) & 0xF8) << 3)
220#define ADP5589_UNLOCK_TIMERS_UNLOCK_TIMER(x) (((x) & 0x07) << 0)
221/* UNLOCK_TIMER bits. */
222#define ADP5589_UNLOCK_TIMER_DIS 0
223#define ADP5589_UNLOCK_TIMER_1SEC 1
224#define ADP5589_UNLOCK_TIMER_2SEC 2
225#define ADP5589_UNLOCK_TIMER_3SEC 3
226#define ADP5589_UNLOCK_TIMER_4SEC 4
227#define ADP5589_UNLOCK_TIMER_5SEC 5
228#define ADP5589_UNLOCK_TIMER_6SEC 6
229#define ADP5589_UNLOCK_TIMER_7SEC 7
230/* INT_MASK_TIMER bits. */
231#define ADP5589_INT_MASTER_TIMER_DIS 0
232#define ADP5589_INT_MASTER_TIMER_1SEC 1
233#define ADP5589_INT_MASTER_TIMER_2SEC 2
234#define ADP5589_INT_MASTER_TIMER_30SEC (0X1E)
235#define ADP5589_INT_MASTER_TIMER_31SEC (0X1F)
236/* LOCK_CFG Register bits 0x37. */
237#define ADP5589_LOCK_CFG_LOCK_EN (1 << 0)
238/* RESET_CFG Register bits 0x3D. */
239#define ADP5589_RESET_CFG_RESET_PULSE_WIDTH(x) (((x) & 0x03) << 0)
240#define ADP5589_RESET_CFG_RESET_TRIGGER_TIME(x) (((x) & 0x07) << 2)
241#define ADP5589_RESET_CFG_RST_PASSTHRU_EN (1 << 5)
242#define ADP5589_RESET_CFG_RESET1_POL (1 << 6)
243#define ADP5589_RESET_CFG_RESET2_POL (1 << 7)
244/* RESET_TRIGGER_TIME bits. */
245#define ADP5589_RESET_CFG_RESET_TRIGGER_TIME_IMMED 0
246#define ADP5589_RESET_CFG_RESET_TRIGGER_TIME_1D0SEC 1
247#define ADP5589_RESET_CFG_RESET_TRIGGER_TIME_1D5SEC 2
248#define ADP5589_RESET_CFG_RESET_TRIGGER_TIME_2D0SEC 3
249#define ADP5589_RESET_CFG_RESET_TRIGGER_TIME_2D5SEC 4
250#define ADP5589_RESET_CFG_RESET_TRIGGER_TIME_3D0SEC 5
251#define ADP5589_RESET_CFG_RESET_TRIGGER_TIME_3D5SEC 6
252#define ADP5589_RESET_CFG_RESET_TRIGGER_TIME_4D0SEC 7
253/* RESET_PULSE_WIDTH bits. */
254#define ADP5589_RESET_CFG_RESET_PULSE_WIDTH_500US 0
255#define ADP5589_RESET_CFG_RESET_PULSE_WIDTH_1MS 1
256#define ADP5589_RESET_CFG_RESET_PULSE_WIDTH_2MS 2
257#define ADP5589_RESET_CFG_RESET_PULSE_WIDTH_10MS 3
258/* PWM_CFG Register bits 0x42. */
259#define ADP5589_PWM_CFG_PWM_EN (1 << 0)
260#define ADP5589_PWM_CFG_PWM_MODE (1 << 1)
261#define ADP5589_PWM_CFG_PWM_IN_AND (1 << 2)
262/* CLOCK_DIV_CFG Register bits 0x43. */
263#define ADP5589_CLOCK_DIV_CFG_CLK_INV (1 << 6)
264#define ADP5589_CLOCK_DIV_CFG_CLK_DIV(x) (((x) & 0x1F) << 1)
265#define ADP5589_CLOCK_DIV_CFG_CLK_DIV_EN (1 << 0)
266/* CLK_DIV bits. */
267#define ADP5589_CLOCK_DIV_CFG_CLK_DIV_DIV1 (0X00)
268#define ADP5589_CLOCK_DIV_CFG_CLK_DIV_DIV2 (0X01)
269#define ADP5589_CLOCK_DIV_CFG_CLK_DIV_DIV3 (0X02)
270#define ADP5589_CLOCK_DIV_CFG_CLK_DIV_DIV4 (0X03)
271#define ADP5589_CLOCK_DIV_CFG_CLK_DIV_DIV32 (0X1F)
272/* LOGIC_1_CFG Register bits 0x44. */
273#define ADP5589_LOGIC_1_CFG_LOGIC1_SEL(x) (((x) & 0x07) << 0)
274#define ADP5589_LOGIC_1_LA1_INV (1 << 3)
275#define ADP5589_LOGIC_1_LB1_INV (1 << 4)
276#define ADP5589_LOGIC_1_LC1_INV (1 << 5)
277#define ADP5589_LOGIC_1_LY1_INV (1 << 6)
278/* LOGIC1_SEL bits. */
279#define ADP5589_LOGIC_CFG_LOGIC_SEL_OFF (0x00)
280#define ADP5589_LOGIC_CFG_LOGIC_SEL_AND (0x01)
281#define ADP5589_LOGIC_CFG_LOGIC_SEL_OR (0x02)
282#define ADP5589_LOGIC_CFG_LOGIC_SEL_XOR (0x03)
283#define ADP5589_LOGIC_CFG_LOGIC_SEL_FF (0x04)
284#define ADP5589_LOGIC_CFG_LOGIC_SEL_IN_LA (0x05)
285#define ADP5589_LOGIC_CFG_LOGIC_SEL_IN_LB (0x06)
286#define ADP5589_LOGIC_CFG_LOGIC_SEL_IN_LC (0x07)
287/* LOGIC_2_CFG Register bits 0x45. */
288#define ADP5589_LOGIC_2_CFG_LOGIC2_SEL(x) (((x) & 0x07) << 0)
289#define ADP5589_LOGIC_2_LA2_INV (1 << 3)
290#define ADP5589_LOGIC_2_LB2_INV (1 << 4)
291#define ADP5589_LOGIC_2_LC2_INV (1 << 5)
292#define ADP5589_LOGIC_2_LY2_INV (1 << 6)
293#define ADP5589_LOGIC_2_LY1_CASCADE (1 << 7)
294/* LOGIC_FF_CFG Register bits 0x46. */
295#define ADP5589_LOGIC_FF_CFG_FF1_CLR (1 << 0)
296#define ADP5589_LOGIC_FF_CFG_FF1_SET (1 << 1)
297#define ADP5589_LOGIC_FF_CFG_FF2_CLR (1 << 2)
298#define ADP5589_LOGIC_FF_CFG_FF2_SET (1 << 3)
299/* LOGIC_INT_EVENT_EN Register bits 0x47. */
300#define ADP5589_LOGIC_INT_EVENT_EN_LOGIC1_INT_LEVEL (1 << 0)
301#define ADP5589_LOGIC_INT_EVENT_EN_LOGIC1_EVENT_EN (1 << 1)
302#define ADP5589_LOGIC_INT_EVENT_EN_LY1_DBNC_DIS (1 << 2)
303#define ADP5589_LOGIC_INT_EVENT_EN_LOGIC2_INT_LEVEL (1 << 3)
304#define ADP5589_LOGIC_INT_EVENT_EN_LOGIC2_EVENT_EN (1 << 4)
305#define ADP5589_LOGIC_INT_EVENT_EN_LY2_DBNC_DIS (1 << 5)
306/* POLL_TIME_CFG Register bits 0x48. */
307#define ADP5589_POLL_TIME_CFG_KEY_POLL_TIME(x) (((x) & 0x03) << 0)
308/* KEY_POLL_TIME bits. */
309#define ADP5589_POLL_TIME_CFG_KEY_POLL_TIME_10MS (0x00)
310#define ADP5589_POLL_TIME_CFG_KEY_POLL_TIME_20MS (0x01)
311#define ADP5589_POLL_TIME_CFG_KEY_POLL_TIME_30MS (0x02)
312#define ADP5589_POLL_TIME_CFG_KEY_POLL_TIME_40MS (0x03)
313
314#define ADP5589_EVENT_KEY_RELEASED 0
315#define ADP5589_EVENT_KEY_PRESSED 1
316
318 /* I2C */
320};
321
323 /* I2C */
325};
326
327
330 uint8_t register_address,
331 uint8_t register_value);
332
334uint8_t adp5589_get_register_value(struct adp5589_dev *dev,
335 uint8_t register_address);
336
339int8_t adp5589_init(struct adp5589_dev **device,
341
343int32_t adp5589_remove(struct adp5589_dev *dev);
344
346void adp5589_init_pwm(struct adp5589_dev *dev);
347
349void adp5589_set_pwm(struct adp5589_dev *dev,
350 uint16_t pwm_off_time,
351 uint16_t pwm_on_time);
352
354void adp5589_gpio_direction(struct adp5589_dev *dev,
355 uint8_t reg,
356 uint8_t val);
357
359uint8_t adp5589_get_pin_state(struct adp5589_dev *dev,
360 uint8_t reg);
361
363void adp5589_set_pin_state(struct adp5589_dev *dev,
364 uint8_t reg,
365 uint8_t state);
366
368void adp5589_init_key(struct adp5589_dev *dev,
369 uint8_t pmod_port);
370
372uint8_t adp5589_key_decode(uint8_t reg,
373 uint8_t event_type,
374 uint8_t pmod_port);
375
377void adp5589_key_lock(struct adp5589_dev *dev,
378 uint8_t first_event,
379 uint8_t second_event,
380 uint8_t pmod_port);
381
382#endif /* __ADP5589_H__ */
struct ad7616_init_param init_param
Definition ad7616_sdz.c:107
void adp5589_key_lock(struct adp5589_dev *dev, uint8_t first_event, uint8_t second_event, uint8_t pmod_port)
Locks the ADP5589 and requests Password for unlock.
Definition adp5589.c:355
int8_t adp5589_init(struct adp5589_dev **device, struct adp5589_init_param init_param)
Initializes the communication peripheral and checks if the ADP5589 part is present.
Definition adp5589.c:92
int32_t adp5589_remove(struct adp5589_dev *dev)
Free the resources allocated by adp5589_init().
Definition adp5589.c:125
void adp5589_set_pin_state(struct adp5589_dev *dev, uint8_t reg, uint8_t state)
Sets the state of the pins.
Definition adp5589.c:256
uint8_t adp5589_key_decode(uint8_t reg, uint8_t event_type, uint8_t pmod_port)
Decodes the key on the Pmod-KYPD.
Definition adp5589.c:278
void adp5589_set_register_value(struct adp5589_dev *dev, uint8_t register_address, uint8_t register_value)
Writes data into a register.
Definition adp5589.c:45
void adp5589_gpio_direction(struct adp5589_dev *dev, uint8_t reg, uint8_t val)
Sets the direction of the pins.
Definition adp5589.c:221
void adp5589_set_pwm(struct adp5589_dev *dev, uint16_t pwm_off_time, uint16_t pwm_on_time)
Sets the PWM On and Off times.
Definition adp5589.c:190
uint8_t adp5589_get_register_value(struct adp5589_dev *dev, uint8_t register_address)
Reads the value of a register.
Definition adp5589.c:64
void adp5589_init_pwm(struct adp5589_dev *dev)
Initializes the PWM generator in continuous mode.
Definition adp5589.c:141
void adp5589_init_key(struct adp5589_dev *dev, uint8_t pmod_port)
Initializes keyboard decoder.
Definition adp5589.c:159
uint8_t adp5589_get_pin_state(struct adp5589_dev *dev, uint8_t reg)
Reads the state of the pins.
Definition adp5589.c:237
Header file of I2C Interface.
Definition adp5589.h:317
struct no_os_i2c_desc * i2c_desc
Definition adp5589.h:319
Definition adp5589.h:322
struct no_os_i2c_init_param i2c_init
Definition adp5589.h:324
Definition ad9361_util.h:63
Structure holding I2C address descriptor.
Definition no_os_i2c.h:89
Structure holding the parameters for I2C initialization.
Definition no_os_i2c.h:52