Change scope of propagate_event for use in io_mac.m

-propagate_event was static in events.c
-io_mac.m uses propagate_event when receiving data before finishing the handshake
This commit is contained in:
Juan Sebastian Casallas
2011-11-21 00:04:15 +01:00
parent 257b94659d
commit d9e72fe730
2 changed files with 3 additions and 2 deletions

View File

@@ -59,7 +59,6 @@
static void idle_cycle(struct wiimote_t* wm); static void idle_cycle(struct wiimote_t* wm);
static void clear_dirty_reads(struct wiimote_t* wm); static void clear_dirty_reads(struct wiimote_t* wm);
static void propagate_event(struct wiimote_t* wm, byte event, byte* msg);
static void event_data_read(struct wiimote_t* wm, byte* msg); static void event_data_read(struct wiimote_t* wm, byte* msg);
static void event_data_write(struct wiimote_t *wm, byte *msg); static void event_data_write(struct wiimote_t *wm, byte *msg);
static void event_status(struct wiimote_t* wm, byte* msg); static void event_status(struct wiimote_t* wm, byte* msg);
@@ -305,7 +304,7 @@ static void clear_dirty_reads(struct wiimote_t* wm) {
* *
* Pass the event to the registered event callback. * Pass the event to the registered event callback.
*/ */
static void propagate_event(struct wiimote_t* wm, byte event, byte* msg) { void propagate_event(struct wiimote_t* wm, byte event, byte* msg) {
save_state(wm); save_state(wm);
switch (event) { switch (event) {

View File

@@ -54,6 +54,8 @@ void wiiuse_pressed_buttons(struct wiimote_t* wm, byte* msg);
void handshake_expansion(struct wiimote_t* wm, byte* data, uint16_t len); void handshake_expansion(struct wiimote_t* wm, byte* data, uint16_t len);
void disable_expansion(struct wiimote_t* wm); void disable_expansion(struct wiimote_t* wm);
void propagate_event(struct wiimote_t* wm, byte event, byte* msg);
/** @} */ /** @} */
#endif /* EVENTS_H_INCLUDED */ #endif /* EVENTS_H_INCLUDED */