diff options
Diffstat (limited to 'firmware/export/mc13783.h')
-rw-r--r-- | firmware/export/mc13783.h | 54 |
1 files changed, 48 insertions, 6 deletions
diff --git a/firmware/export/mc13783.h b/firmware/export/mc13783.h index e513fa1717..99fd004420 100644 --- a/firmware/export/mc13783.h +++ b/firmware/export/mc13783.h | |||
@@ -1281,17 +1281,59 @@ bool mc13783_write_async(struct spi_transfer_desc *xfer, | |||
1281 | 1281 | ||
1282 | #define MC13783_DATA_ERROR UINT32_MAX | 1282 | #define MC13783_DATA_ERROR UINT32_MAX |
1283 | 1283 | ||
1284 | /* Statically-registered event enable/disable */ | 1284 | /* Statically-registered interrupt enable/disable */ |
1285 | enum mc13783_event_sets | 1285 | enum mc13783_int_ids |
1286 | { | 1286 | { |
1287 | MC13783_EVENT_SET0 = 0, /* *STATUS0/MASK0/SENSE0 */ | 1287 | /* *STATUS0/MASK0/SENSE0 */ |
1288 | MC13783_EVENT_SET1 = 1, /* *STATUS1/MASK1/SENSE1 */ | 1288 | MC13783_INT_ID_ADCDONE = 0, |
1289 | MC13783_INT_ID_ADCBISDONE = 1, | ||
1290 | MC13783_INT_ID_TS = 2, | ||
1291 | MC13783_INT_ID_WHIGH = 3, | ||
1292 | MC13783_INT_ID_WLOW = 4, | ||
1293 | MC13783_INT_ID_CHGDET = 6, | ||
1294 | MC13783_INT_ID_CHGOV = 7, | ||
1295 | MC13783_INT_ID_CHGREV = 8, | ||
1296 | MC13783_INT_ID_CHGSHORT = 9, | ||
1297 | MC13783_INT_ID_CCCV = 10, | ||
1298 | MC13783_INT_ID_CHGCURR = 11, | ||
1299 | MC13783_INT_ID_BPONI = 12, | ||
1300 | MC13783_INT_ID_LOBATL = 13, | ||
1301 | MC13783_INT_ID_LOBATH = 14, | ||
1302 | MC13783_INT_ID_UDP = 15, | ||
1303 | MC13783_INT_ID_USB = 16, | ||
1304 | MC13783_INT_ID_IDFLOAT = 19, | ||
1305 | MC13783_INT_ID_SE1 = 21, | ||
1306 | MC13783_INT_ID_CKDET = 22, | ||
1307 | MC13783_INT_ID_UDM = 23, | ||
1308 | /* *STATUS1/MASK1/SENSE1 */ | ||
1309 | MC13783_INT_ID_1HZ = 0 + 0x20, | ||
1310 | MC13783_INT_ID_TODA = 1 + 0x20, | ||
1311 | MC13783_INT_ID_ONOFD1 = 3 + 0x20, /* ON1B */ | ||
1312 | MC13783_INT_ID_ONOFD2 = 4 + 0x20, /* ON2B */ | ||
1313 | MC13783_INT_ID_ONOFD3 = 5 + 0x20, /* ON3B */ | ||
1314 | MC13783_INT_ID_SYSRST = 6 + 0x20, | ||
1315 | MC13783_INT_ID_RTCRST = 7 + 0x20, | ||
1316 | MC13783_INT_ID_PCI = 8 + 0x20, | ||
1317 | MC13783_INT_ID_WARM = 9 + 0x20, | ||
1318 | MC13783_INT_ID_MEMHLD = 10 + 0x20, | ||
1319 | MC13783_INT_ID_PWRRDY = 11 + 0x20, | ||
1320 | MC13783_INT_ID_THWARNL = 12 + 0x20, | ||
1321 | MC13783_INT_ID_THWARNH = 13 + 0x20, | ||
1322 | MC13783_INT_ID_CLK = 14 + 0x20, | ||
1323 | MC13783_INT_ID_SEMAF = 15 + 0x20, | ||
1324 | MC13783_INT_ID_MC2B = 17 + 0x20, | ||
1325 | MC13783_INT_ID_HSDET = 18 + 0x20, | ||
1326 | MC13783_INT_ID_HSL = 19 + 0x20, | ||
1327 | MC13783_INT_ID_ALSPTH = 20 + 0x20, | ||
1328 | MC13783_INT_ID_AHSSHORT = 21 + 0x20, | ||
1289 | }; | 1329 | }; |
1290 | 1330 | ||
1331 | #define MC13783_INT_ID_SET_DIV (0x20) | ||
1332 | #define MC13783_INT_ID_NUM_MASK (0x1f) | ||
1333 | |||
1291 | struct mc13783_event | 1334 | struct mc13783_event |
1292 | { | 1335 | { |
1293 | enum mc13783_event_sets set : 8; | 1336 | enum mc13783_int_ids int_id; |
1294 | uint32_t mask : 24; | ||
1295 | void (*callback)(void); | 1337 | void (*callback)(void); |
1296 | }; | 1338 | }; |
1297 | 1339 | ||