diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2016-06-30 16:16:39 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2016-06-30 16:16:39 +0900 |
commit | e7bd234a0daeff4c16ef80f1529aa1f9dd500697 (patch) | |
tree | 2430db3ff1a03eb62d61e0b64a99389e1a2c6a7d /example-fs-bb48/sample.c | |
parent | c71a24ddcb22b8ba5d1fb45d1393838d1110b1b5 (diff) |
Update for MKL27Z
Diffstat (limited to 'example-fs-bb48/sample.c')
-rw-r--r-- | example-fs-bb48/sample.c | 22 |
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; |