aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src
diff options
context:
space:
mode:
authorUladzimir Pylinski <barthess@yandex.ru>2016-11-10 20:38:24 +0300
committerGitHub <noreply@github.com>2016-11-10 20:38:24 +0300
commita9bd529ab54f0e74f73cf08cbb96752274e28d2c (patch)
tree4059c8d865832e8ce5a10bc391c3a8e1204fae9e /os/hal/src
parent8f00b3af4d9ce8d711f07551d77d0d923c615b19 (diff)
parentff515eec71d277d8beac2a0a608990508ce83ff1 (diff)
downloadChibiOS-Contrib-a9bd529ab54f0e74f73cf08cbb96752274e28d2c.tar.gz
ChibiOS-Contrib-a9bd529ab54f0e74f73cf08cbb96752274e28d2c.tar.bz2
ChibiOS-Contrib-a9bd529ab54f0e74f73cf08cbb96752274e28d2c.zip
Merge pull request #99 from pl4nkton/stm32_fixes
Stm32 fixes
Diffstat (limited to 'os/hal/src')
-rw-r--r--os/hal/src/usbh/hal_usbh_debug.c22
-rw-r--r--os/hal/src/usbh/hal_usbh_hub.c1
2 files changed, 12 insertions, 11 deletions
diff --git a/os/hal/src/usbh/hal_usbh_debug.c b/os/hal/src/usbh/hal_usbh_debug.c
index 9f17189..51ca166 100644
--- a/os/hal/src/usbh/hal_usbh_debug.c
+++ b/os/hal/src/usbh/hal_usbh_debug.c
@@ -111,7 +111,7 @@ static char *ftoa(char *p, double num, unsigned long precision, bool dot) {
static inline void _put(char c) {
input_queue_t *iqp = &USBH_DEBUG_USBHD.iq;
- if (chIQIsFullI(iqp))
+ if (iqIsFullI(iqp))
return;
iqp->q_counter++;
@@ -407,8 +407,8 @@ void usbDbgReset(void) {
const char *msg = "\r\n\r\n==== DEBUG OUTPUT RESET ====\r\n";
syssts_t sts = chSysGetStatusAndLockX();
- chIQResetI(&USBH_DEBUG_USBHD.iq);
- chOQResetI(&USBH_DEBUG_SD.oqueue);
+ iqResetI(&USBH_DEBUG_USBHD.iq);
+ oqResetI(&USBH_DEBUG_SD.oqueue);
while (*msg) {
*USBH_DEBUG_SD.oqueue.q_wrptr++ = *msg++;
USBH_DEBUG_SD.oqueue.q_counter--;
@@ -478,7 +478,7 @@ static void usb_debug_thread(void *p) {
chRegSetThreadName("USBH_DBG");
while (true) {
- msg_t c = chIQGet(&host->iq);
+ msg_t c = iqGet(&host->iq);
if (c < 0) goto reset;
if (state == 0) {
@@ -491,16 +491,16 @@ static void usb_debug_thread(void *p) {
uint32_t hfnum;
hfir = c;
- c = chIQGet(&host->iq); if (c < 0) goto reset;
+ c = iqGet(&host->iq); if (c < 0) goto reset;
hfir |= c << 8;
- c = chIQGet(&host->iq); if (c < 0) goto reset;
+ c = iqGet(&host->iq); if (c < 0) goto reset;
hfnum = c;
- c = chIQGet(&host->iq); if (c < 0) goto reset;
+ c = iqGet(&host->iq); if (c < 0) goto reset;
hfnum |= c << 8;
- c = chIQGet(&host->iq); if (c < 0) goto reset;
+ c = iqGet(&host->iq); if (c < 0) goto reset;
hfnum |= c << 16;
- c = chIQGet(&host->iq); if (c < 0) goto reset;
+ c = iqGet(&host->iq); if (c < 0) goto reset;
hfnum |= c << 24;
uint32_t f = hfnum & 0xffff;
@@ -508,7 +508,7 @@ static void usb_debug_thread(void *p) {
chprintf((BaseSequentialStream *)&USBH_DEBUG_SD, "%05d.%03d ", f, p);
while (true) {
- c = chIQGet(&host->iq); if (c < 0) goto reset;
+ c = iqGet(&host->iq); if (c < 0) goto reset;
if (!c) {
sdPut(&USBH_DEBUG_SD, '\r');
sdPut(&USBH_DEBUG_SD, '\n');
@@ -528,7 +528,7 @@ reset:
void usbDbgInit(USBHDriver *host) {
if (host != &USBH_DEBUG_USBHD)
return;
- chIQObjectInit(&USBH_DEBUG_USBHD.iq, USBH_DEBUG_USBHD.dbg_buff, sizeof(USBH_DEBUG_USBHD.dbg_buff), 0, 0);
+ iqObjectInit(&USBH_DEBUG_USBHD.iq, USBH_DEBUG_USBHD.dbg_buff, sizeof(USBH_DEBUG_USBHD.dbg_buff), 0, 0);
chThdCreateStatic(USBH_DEBUG_USBHD.waDebug, sizeof(USBH_DEBUG_USBHD.waDebug), NORMALPRIO, usb_debug_thread, &USBH_DEBUG_USBHD);
}
#endif
diff --git a/os/hal/src/usbh/hal_usbh_hub.c b/os/hal/src/usbh/hal_usbh_hub.c
index 7fdcef1..56257b2 100644
--- a/os/hal/src/usbh/hal_usbh_hub.c
+++ b/os/hal/src/usbh/hal_usbh_hub.c
@@ -15,6 +15,7 @@
limitations under the License.
*/
+#include <string.h>
#include "hal.h"
#include "hal_usbh.h"
#include "usbh/internal.h"