LibDriver APDS9960
Loading...
Searching...
No Matches
driver_apds9960_interface_template.c
Go to the documentation of this file.
1
36
38
47{
48 return 0;
49}
50
59{
60 return 0;
61}
62
74uint8_t apds9960_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
75{
76 return 0;
77}
78
90uint8_t apds9960_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
91{
92 return 0;
93}
94
101{
102
103}
104
110void apds9960_interface_debug_print(const char *const fmt, ...)
111{
112
113}
114
121{
122 switch (type)
123 {
125 {
126 apds9960_interface_debug_print("apds9960: irq gesture left.\n");
127
128 break;
129 }
131 {
132 apds9960_interface_debug_print("apds9960: irq gesture right.\n");
133
134 break;
135 }
137 {
138 apds9960_interface_debug_print("apds9960: irq gesture up.\n");
139
140 break;
141 }
143 {
144 apds9960_interface_debug_print("apds9960: irq gesture down.\n");
145
146 break;
147 }
149 {
150 apds9960_interface_debug_print("apds9960: irq gesture near.\n");
151
152 break;
153 }
155 {
156 apds9960_interface_debug_print("apds9960: irq gesture far.\n");
157
158 break;
159 }
161 {
162 apds9960_interface_debug_print("apds9960: irq gesture fifo overflow.\n");
163
164 break;
165 }
167 {
168 apds9960_interface_debug_print("apds9960: irq gesture fifo data.\n");
169
170 break;
171 }
173 {
174 apds9960_interface_debug_print("apds9960: irq clear photo diode saturation.\n");
175
176 break;
177 }
179 {
180 apds9960_interface_debug_print("apds9960: irq analog saturation.\n");
181
182 break;
183 }
185 {
186 apds9960_interface_debug_print("apds9960: irq proximity interrupt.\n");
187
188 break;
189 }
191 {
192 apds9960_interface_debug_print("apds9960: irq als interrupt.\n");
193
194 break;
195 }
197 {
198 apds9960_interface_debug_print("apds9960: irq gesture interrupt.\n");
199
200 break;
201 }
203 {
204 apds9960_interface_debug_print("apds9960: irq proximity valid.\n");
205
206 break;
207 }
209 {
210 apds9960_interface_debug_print("apds9960: irq als valid.\n");
211
212 break;
213 }
214 default :
215 {
216 apds9960_interface_debug_print("apds9960: irq unknown.\n");
217
218 break;
219 }
220 }
221}
driver apds9960 interface header file
@ APDS9960_INTERRUPT_STATUS_CPSAT
@ APDS9960_INTERRUPT_STATUS_GESTURE_NEAR
@ APDS9960_INTERRUPT_STATUS_AVALID
@ APDS9960_INTERRUPT_STATUS_GVALID
@ APDS9960_INTERRUPT_STATUS_GESTURE_RIGHT
@ APDS9960_INTERRUPT_STATUS_GESTURE_LEFT
@ APDS9960_INTERRUPT_STATUS_GESTURE_DOWN
@ APDS9960_INTERRUPT_STATUS_AINT
@ APDS9960_INTERRUPT_STATUS_GINT
@ APDS9960_INTERRUPT_STATUS_PGSAT
@ APDS9960_INTERRUPT_STATUS_GESTURE_FAR
@ APDS9960_INTERRUPT_STATUS_PVALID
@ APDS9960_INTERRUPT_STATUS_GESTURE_UP
@ APDS9960_INTERRUPT_STATUS_PINT
@ APDS9960_INTERRUPT_STATUS_GFOV
uint8_t apds9960_interface_iic_init(void)
interface iic bus init
uint8_t apds9960_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
void apds9960_interface_receive_callback(uint8_t type)
interface receive callback
void apds9960_interface_delay_ms(uint32_t ms)
interface delay ms
uint8_t apds9960_interface_iic_deinit(void)
interface iic bus deinit
uint8_t apds9960_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
void apds9960_interface_debug_print(const char *const fmt,...)
interface print format data