1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #include "ch.h"
- #include "hal.h"
- #include "oslib_test_root.h"
- static THD_WORKING_AREA(waThread1, 32);
- static THD_FUNCTION(Thread1, arg) {
- (void)arg;
- chRegSetThreadName("Blinker");
- while (true) {
- palTogglePad(IOPORT2, PORTB_LED1);
- chThdSleepMilliseconds(1000);
- }
- }
- int main(void) {
-
- halInit();
- chSysInit();
-
- sdStart(&SD1, NULL);
-
- chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
-
- test_execute((BaseSequentialStream *)&SD1, &oslib_test_suite);
- while (true) {
- chThdSleepMilliseconds(1000);
- }
- }
|