Junichi Katsu
/
ChuckChoroQ
ヌンチャクでコントロールするチョロQ機能に限定した物です。
Fork of StarBoardOrangeExample3 by
extlib/WiiNunchuck/I2CConfig.h@2:1d9c1cd90695, 2012-08-18 (annotated)
- Committer:
- jksoft
- Date:
- Sat Aug 18 13:21:50 2012 +0000
- Revision:
- 2:1d9c1cd90695
- Parent:
- 0:127b9ca59547
Rev1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shintamainjp | 0:127b9ca59547 | 1 | /* |
shintamainjp | 0:127b9ca59547 | 2 | * WiiNunchuckReader. A program allowing the output of one or two |
shintamainjp | 0:127b9ca59547 | 3 | * Wii Nunchucks to be read via I2C and decoded for use, using the mbed |
shintamainjp | 0:127b9ca59547 | 4 | * microcontroller and its associated libraries. |
shintamainjp | 0:127b9ca59547 | 5 | * |
shintamainjp | 0:127b9ca59547 | 6 | * Copyright (C) <2009> Petras Saduikis <petras@petras.co.uk> |
shintamainjp | 0:127b9ca59547 | 7 | * |
shintamainjp | 0:127b9ca59547 | 8 | * This file is part of WiiNunchuckReader. |
shintamainjp | 0:127b9ca59547 | 9 | * |
shintamainjp | 0:127b9ca59547 | 10 | * WiiNunchuckReader is free software: you can redistribute it and/or modify |
shintamainjp | 0:127b9ca59547 | 11 | * it under the terms of the GNU General Public License as published by |
shintamainjp | 0:127b9ca59547 | 12 | * the Free Software Foundation, either version 3 of the License, or |
shintamainjp | 0:127b9ca59547 | 13 | * (at your option) any later version. |
shintamainjp | 0:127b9ca59547 | 14 | * |
shintamainjp | 0:127b9ca59547 | 15 | * WiiNunchuckReader is distributed in the hope that it will be useful, |
shintamainjp | 0:127b9ca59547 | 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
shintamainjp | 0:127b9ca59547 | 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
shintamainjp | 0:127b9ca59547 | 18 | * GNU General Public License for more details. |
shintamainjp | 0:127b9ca59547 | 19 | * |
shintamainjp | 0:127b9ca59547 | 20 | * You should have received a copy of the GNU General Public License |
shintamainjp | 0:127b9ca59547 | 21 | * along with WiiNunchuckReader. If not, see <http://www.gnu.org/licenses/>. |
shintamainjp | 0:127b9ca59547 | 22 | */ |
shintamainjp | 0:127b9ca59547 | 23 | |
shintamainjp | 0:127b9ca59547 | 24 | #ifndef SNATCH59_I2CCONFIG_H |
shintamainjp | 0:127b9ca59547 | 25 | #define SNATCH59_I2CCONFIG_H |
shintamainjp | 0:127b9ca59547 | 26 | |
shintamainjp | 0:127b9ca59547 | 27 | #include <mbed.h> |
shintamainjp | 0:127b9ca59547 | 28 | |
shintamainjp | 0:127b9ca59547 | 29 | class I2CPort_A { |
shintamainjp | 0:127b9ca59547 | 30 | public: |
shintamainjp | 0:127b9ca59547 | 31 | static const PinName SDA; |
shintamainjp | 0:127b9ca59547 | 32 | static const PinName SCL; |
shintamainjp | 0:127b9ca59547 | 33 | }; |
shintamainjp | 0:127b9ca59547 | 34 | |
shintamainjp | 0:127b9ca59547 | 35 | |
shintamainjp | 0:127b9ca59547 | 36 | class I2CPort_B { |
shintamainjp | 0:127b9ca59547 | 37 | public: |
shintamainjp | 0:127b9ca59547 | 38 | static const PinName SDA; |
shintamainjp | 0:127b9ca59547 | 39 | static const PinName SCL; |
shintamainjp | 0:127b9ca59547 | 40 | }; |
shintamainjp | 0:127b9ca59547 | 41 | |
shintamainjp | 0:127b9ca59547 | 42 | const PinName I2CPort_A::SDA = p9; |
shintamainjp | 0:127b9ca59547 | 43 | const PinName I2CPort_A::SCL = p10; |
shintamainjp | 0:127b9ca59547 | 44 | |
shintamainjp | 0:127b9ca59547 | 45 | const PinName I2CPort_B::SDA = p28; |
shintamainjp | 0:127b9ca59547 | 46 | const PinName I2CPort_B::SCL = p27; |
shintamainjp | 0:127b9ca59547 | 47 | |
shintamainjp | 0:127b9ca59547 | 48 | #endif |