aboutsummaryrefslogtreecommitdiff
path: root/example-fs-bb48/sample.c
diff options
context:
space:
mode:
Diffstat (limited to 'example-fs-bb48/sample.c')
-rw-r--r--example-fs-bb48/sample.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/example-fs-bb48/sample.c b/example-fs-bb48/sample.c
index 1738566..3041d7d 100644
--- a/example-fs-bb48/sample.c
+++ b/example-fs-bb48/sample.c
@@ -7,27 +7,7 @@
#include "tty.h"
#include "board.h"
#include "command.h"
-
-struct GPIO {
- volatile uint32_t PDOR; /* Port Data Output Register */
- volatile uint32_t PSOR; /* Port Set Output Register */
- volatile uint32_t PCOR; /* Port Clear Output Register */
- volatile uint32_t PTOR; /* Port Toggle Output Register */
- volatile uint32_t PDIR; /* Port Data Input Register */
- volatile uint32_t PDDR; /* Port Data Direction Register */
-};
-static struct GPIO *const GPIOB = (struct GPIO *const)0x400FF040;
-static struct GPIO *const GPIOD = (struct GPIO *const)0x400FF0C0;
-static struct GPIO *const GPIOE = (struct GPIO *const)0x400FF100;
-
-static void
-set_led (int on)
-{
- if (on)
- GPIOB->PCOR = (1 << 0); /* PTB0: Clear: Light on */
- else
- GPIOB->PSOR = (1 << 0); /* PTB0: Set : Light off */
-}
+#include <sys.h>
static chopstx_mutex_t mtx;
static chopstx_cond_t cnd0;