NIT Fukui / CERICA_2

Dependencies:   ST7032 QEI PS4Serial

Committer:
Suzutomo
Date:
Thu Dec 06 09:09:02 2018 +0000
Revision:
12:9d099f3d2a3b
Parent:
11:8fa43cb31f9b
Child:
13:91a699eae3ea
wakarann

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Suzutomo 3:72c7158376db 1 #include "SB1602E.h"
Suzutomo 3:72c7158376db 2 #include "QEI.h"
Suzutomo 3:72c7158376db 3 #include "PS4Serial.h"
Suzutomo 5:434332dbbfc5 4 #include "cerica2.h"
Suzutomo 3:72c7158376db 5
Suzutomo 6:6c3c49d45b98 6 QEI Enc[2] = {QEI(PC_6, PC_5, PC_8, 360), QEI(PA_11, PB_12, PA_12, 360)};
Suzutomo 3:72c7158376db 7 I2C i2c(PB_9,PB_8);
Suzutomo 11:8fa43cb31f9b 8 SB1602E lcd(i2c,"CERICA2\nHello!");
Suzutomo 7:c46745e98264 9 PS4Serial PS4(PA_9,PA_10);
Suzutomo 3:72c7158376db 10
Suzutomo 3:72c7158376db 11 const PinName GPIO[13] = {
Suzutomo 3:72c7158376db 12 PC_9,
Suzutomo 3:72c7158376db 13 PA_5,
Suzutomo 3:72c7158376db 14 PA_6,
Suzutomo 3:72c7158376db 15 PA_7,
Suzutomo 3:72c7158376db 16 PB_6,
Suzutomo 3:72c7158376db 17 PC_7,
Suzutomo 3:72c7158376db 18 PA_8,
Suzutomo 3:72c7158376db 19 PB_10,
Suzutomo 3:72c7158376db 20 PB_13,
Suzutomo 3:72c7158376db 21 PB_14,
Suzutomo 3:72c7158376db 22 PB_15,
Suzutomo 3:72c7158376db 23 PB_1,
Suzutomo 3:72c7158376db 24 PB_2
Suzutomo 3:72c7158376db 25 };
Suzutomo 3:72c7158376db 26
Suzutomo 3:72c7158376db 27 DigitalOut LED[5] = {
Suzutomo 11:8fa43cb31f9b 28 PA_15, PB_7, PC_13, PC_2, PC_3
Suzutomo 3:72c7158376db 29 };
Suzutomo 3:72c7158376db 30
Suzutomo 3:72c7158376db 31 DigitalIn SW[4] {
Suzutomo 11:8fa43cb31f9b 32 PC_0, PC_1, PB_0,PA_4
Suzutomo 3:72c7158376db 33 };
Suzutomo 3:72c7158376db 34
Suzutomo 6:6c3c49d45b98 35 //DigitalOut DevRst(PC_12);
Suzutomo 3:72c7158376db 36
Suzutomo 3:72c7158376db 37 void boardInit()
Suzutomo 3:72c7158376db 38 {
Suzutomo 3:72c7158376db 39 for (int i = 0; i < 4; i++) SW[i].mode(PullUp);
Suzutomo 10:45cc90a9ec34 40 for (int i = 0; i < 5; i++) LED[i] = 1;
Suzutomo 10:45cc90a9ec34 41 wait(1);
Suzutomo 10:45cc90a9ec34 42 for (int i = 0; i < 5; i++) LED[i] = 0;
Suzutomo 3:72c7158376db 43 }