git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15313 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
0a6a7da34b
commit
4a2094d06b
|
@ -111,8 +111,8 @@ static const sb_config_t sb_config2 = {
|
|||
/* Sandbox objects.*/
|
||||
sb_class_t sbx1, sbx2;
|
||||
|
||||
static THD_WORKING_AREA(waUnprivileged1, 512);
|
||||
static THD_WORKING_AREA(waUnprivileged2, 512);
|
||||
static THD_WORKING_AREA(waUnprivileged1, 1024);
|
||||
static THD_WORKING_AREA(waUnprivileged2, 1024);
|
||||
|
||||
static thread_t *sb1tp, *sb2tp;
|
||||
|
||||
|
@ -155,7 +155,7 @@ static void SBHandler(eventid_t id) {
|
|||
* Application entry point.
|
||||
*/
|
||||
int main(void) {
|
||||
event_listener_t el0, el1, el2;
|
||||
event_listener_t elsb;
|
||||
vfs_node_c *np;
|
||||
msg_t ret;
|
||||
static const evhandler_t evhndl[] = {
|
||||
|
@ -310,11 +310,9 @@ int main(void) {
|
|||
}
|
||||
|
||||
/*
|
||||
* Listening to sandbox and card events.
|
||||
* Listening to sandbox events.
|
||||
*/
|
||||
chEvtRegister(&sdmon_inserted_event, &el0, (eventid_t)0);
|
||||
chEvtRegister(&sdmon_removed_event, &el1, (eventid_t)1);
|
||||
chEvtRegister(&sb.termination_es, &el2, (eventid_t)2);
|
||||
chEvtRegister(&sb.termination_es, &elsb, (eventid_t)2);
|
||||
|
||||
/*
|
||||
* Normal main() thread activity, in this demo it monitors the user button
|
||||
|
|
|
@ -89,6 +89,7 @@ static void tmrfunc(virtual_timer_t *vtp, void *p) {
|
|||
* @notapi
|
||||
*/
|
||||
void sdmonInit(void) {
|
||||
static event_listener_t el0, el1;
|
||||
|
||||
/* Activates the SDC driver using default configuration.*/
|
||||
sdcStart(&SDCD1, NULL);
|
||||
|
@ -96,6 +97,9 @@ void sdmonInit(void) {
|
|||
chEvtObjectInit(&sdmon_inserted_event);
|
||||
chEvtObjectInit(&sdmon_removed_event);
|
||||
|
||||
chEvtRegister(&sdmon_inserted_event, &el0, (eventid_t)0);
|
||||
chEvtRegister(&sdmon_removed_event, &el1, (eventid_t)1);
|
||||
|
||||
sdmon_ready = false;
|
||||
cnt = POLLING_INTERVAL;
|
||||
chVTSet(&tmr, TIME_MS2I(POLLING_DELAY), tmrfunc, (void *)&SDCD1);
|
||||
|
|
Loading…
Reference in New Issue