SIO init now works from VM.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15737 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
bb4ca5e19c
commit
c275fbeee7
|
@ -46,6 +46,11 @@ int main(void) {
|
||||||
halInit();
|
halInit();
|
||||||
chSysInit();
|
chSysInit();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Activates the Serial or SIO driver using the default configuration.
|
||||||
|
*/
|
||||||
|
sioStart(&SIOD1, NULL);
|
||||||
|
|
||||||
/* Creating a blinker thread.*/
|
/* Creating a blinker thread.*/
|
||||||
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO+10, Thread1, NULL);
|
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO+10, Thread1, NULL);
|
||||||
|
|
||||||
|
|
|
@ -60,10 +60,10 @@ static void vuart_cb(SIODriver *siop) {
|
||||||
|
|
||||||
void sb_api_vio_uart(struct port_extctx *ectxp) {
|
void sb_api_vio_uart(struct port_extctx *ectxp) {
|
||||||
sb_class_t *sbp = (sb_class_t *)chThdGetSelfX()->ctx.syscall.p;
|
sb_class_t *sbp = (sb_class_t *)chThdGetSelfX()->ctx.syscall.p;
|
||||||
|
uint32_t sub = ectxp->r0;
|
||||||
|
uint32_t unit = ectxp->r1;
|
||||||
ectxp->r0 = (uint32_t)CH_RET_INNER_ERROR;
|
ectxp->r0 = (uint32_t)CH_RET_INNER_ERROR;
|
||||||
ectxp->r1 = (uint32_t)0;
|
ectxp->r1 = (uint32_t)0;
|
||||||
uint32_t sub = ectxp->r0;
|
|
||||||
uint32_t unit = ectxp->r1;
|
|
||||||
const vio_uart_unit_t *unitp;
|
const vio_uart_unit_t *unitp;
|
||||||
|
|
||||||
if (unit >= sbp->config->vioconf->uarts->n) {
|
if (unit >= sbp->config->vioconf->uarts->n) {
|
||||||
|
|
Loading…
Reference in New Issue