NIT Fukui / CERICA_2

Dependencies:   ST7032 QEI PS4Serial

Committer:
Suzutomo
Date:
Thu May 09 07:42:21 2019 +0000
Revision:
13:91a699eae3ea
Parent:
12:9d099f3d2a3b
Child:
14:ea348a58cdf6
use minomuratakuma

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