From 5a8da163c842b08c6dbf1df6921507ec2fd5a534 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Mon, 2 Jan 2012 18:32:35 +0000 Subject: i.MX31 - Dethreading operations continue Dispense with "pmic" thread and process PMIC events directly within ISR. Add sense bit reading as part of the handling. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31528 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/config/gigabeats.h | 2 +- firmware/export/mc13783.h | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'firmware/export') diff --git a/firmware/export/config/gigabeats.h b/firmware/export/config/gigabeats.h index 481a666b4b..685076bfa3 100644 --- a/firmware/export/config/gigabeats.h +++ b/firmware/export/config/gigabeats.h @@ -164,7 +164,7 @@ #define GPIO_EVENT_MASK (USE_GPIO1_EVENTS) /* Define this if target has an additional number of threads specific to it */ -#define TARGET_EXTRA_THREADS 2 +#define TARGET_EXTRA_THREADS 1 /* Type of mobile power - check this out */ #define BATTERY_CAPACITY_DEFAULT 700 /* default battery capacity */ diff --git a/firmware/export/mc13783.h b/firmware/export/mc13783.h index 99fd004420..4324d06df5 100644 --- a/firmware/export/mc13783.h +++ b/firmware/export/mc13783.h @@ -1333,7 +1333,8 @@ enum mc13783_int_ids struct mc13783_event { - enum mc13783_int_ids int_id; + enum mc13783_int_ids int_id : 8; + uint32_t sense : 24; void (*callback)(void); }; @@ -1343,7 +1344,9 @@ struct mc13783_event_list const struct mc13783_event *events; }; -bool mc13783_enable_event(enum mc13783_event_ids event); -void mc13783_disable_event(enum mc13783_event_ids event); +void mc13783_enable_event(enum mc13783_event_ids id, bool enable); + +/* Read the sense bit if one exists - valid only within event handlers */ +uint32_t mc13783_event_sense(enum mc13783_event_ids id); #endif /* _MC13783_H_ */ -- cgit v1.2.3