OS-less HAL demo working.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7813 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
Giovanni Di Sirio 2015-03-26 14:09:20 +00:00
parent 168c39a1b2
commit feafc419f9
1 changed files with 7 additions and 0 deletions

View File

@ -28,6 +28,11 @@ int main(void) {
*/
halInit();
/*
* Enabling interrupts, initialization done.
*/
osalSysEnable();
/*
* Activates the serial driver 2 using the driver default configuration.
* PA2(TX) and PA3(RX) are routed to USART2.
@ -41,6 +46,8 @@ int main(void) {
* a shell respawn upon its termination.
*/
while (true) {
chnWriteTimeout(&SD2, (uint8_t *)"Hello World!\r\n", 14, TIME_INFINITE);
palSetPad(GPIOD, GPIOD_LED3); /* Orange. */
osalThreadSleepMilliseconds(500);
palClearPad(GPIOD, GPIOD_LED3); /* Orange. */