Add multi-application support

This commit is contained in:
Thomas Klaehn
2020-03-10 13:31:33 +01:00
parent fe74ccd8e3
commit df2d84dee1
5 changed files with 41 additions and 9 deletions

View File

@@ -0,0 +1,26 @@
#include <stdbool.h>
#include <limits.h>
#include "nrf_delay.h"
#include "boards.h"
#include "platform/narf52/narf52_dk.h"
#include "driver.h"
int main(void)
{
drv_open(&led_1);
drv_open(&led_2);
drv_open(&led_3);
drv_open(&led_4);
while(true) {
for(unsigned int i = 0; i < UINT_MAX; i++) {
char x = 0x30 | (char)(1 & i);
drv_write(&led_1, &x, 1);
drv_write(&led_2, &x, 1);
drv_write(&led_3, &x, 1);
drv_write(&led_4, &x, 1);
nrf_delay_ms(500);
}
}
}