I2C 接続の LCD AQM1602XA-RN-GBW 用のライブラリ. Library for LCD 1602XA-RN-GBW connected using I2C interface.
Dependents: UIT2_MovingAv_Intr UIT2_VariableFIR UIT2_VowelSynthesizer UIT2_ALE_LeakyLMS ... more
Diff: AQM1602.hpp
- Revision:
- 5:c44a3beb21f2
- Parent:
- 4:c943f05b7843
- Child:
- 6:01336babcccd
--- a/AQM1602.hpp Mon Jul 06 08:15:38 2015 +0000 +++ b/AQM1602.hpp Fri Sep 04 06:50:54 2015 +0000 @@ -1,17 +1,11 @@ //------------------------------------------------------- // Class for LCD, AQM1602XA-RN-GBW (Header) // -// Default pin assignments +// Default pin assignments for Nucleo // D14 SDA ---- to pin4 of LCD module // D15 SCL ---- to pin3 of LCD module // -// Assignment of I2C ports -// SDA SCL -// I2C1 PB_7 or PB_9(D14) PB_6(D10) or PB_8(D15) -// I2C2 PB_3(D3) PB_10(D6) -// I2C3 PB_4(D5) or PC_9 PA_8(D7) -// -// 2015/07/06, Copyright (c) 2015 MIKAMI, Naoki +// 2015/09/04, Copyright (c) 2015 MIKAMI, Naoki //------------------------------------------------------- #ifndef AQM1602I2C_HPP @@ -26,12 +20,20 @@ { public: // Constructor +#if defined(STM32F4) || defined(STM32L0) Aqm1602(PinName sda = D14, // SDA PinName scl = D15, // SCL uint32_t clock = 100000, // clock: 100 kHz bool cursor = false, // cursor: off bool blink = false); // blink: off - +// Default constructor is defined for only Nucleo +#else + Aqm1602(PinName sda, // SDA + PinName scl, // SCL + uint32_t clock = 100000, // clock: 100 kHz + bool cursor = false, // cursor: off + bool blink = false); // blink: off +#endif // Return false if LCD is not connected bool IsConnected() { return connected_; }