Fixed bugs that were preventing NVR and Flash files from behind saved;

A lot of clean ups from waltje;
Start of a directory structure for the code, thanks to waltje.
This commit is contained in:
OBattler
2017-05-06 17:48:33 +02:00
parent e2a717deae
commit f6612fb33b
344 changed files with 2011 additions and 1870 deletions

View File

@@ -85,9 +85,13 @@ sermouse_init(void)
memset(ms, 0x00, sizeof(mouse_serial_t));
/* Attach a serial port to the mouse. */
ms->serial = &serial1;
serial1.rcr_callback = sermouse_rcr;
serial1.rcr_callback_p = ms;
#if 1
ms->serial = serial_attach(0, sermouse_rcr, ms);
#else
ms->serial = &serial1;
serial1.rcr_callback = sermouse_rcr;
serial1.rcr_callback_p = ms;
#endif
timer_add(sermouse_timer, &ms->delay, &ms->delay, ms);
@@ -101,7 +105,11 @@ sermouse_close(void *priv)
mouse_serial_t *ms = (mouse_serial_t *)priv;
/* Detach serial port from the mouse. */
#if 1
serial_attach(0, NULL, NULL);
#else
serial1.rcr_callback = NULL;
#endif
free(ms);
}