PAT9125 on K64F
Dependencies: pat9125_mbed mbed
pat9125_mbed/pat9125_i2c.cpp@0:411244c71423, 2017-10-03 (annotated)
- Committer:
- pixus_mbed
- Date:
- Tue Oct 03 07:26:38 2017 +0000
- Revision:
- 0:411244c71423
1st version : OTS, LCM and Serial output are work.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pixus_mbed | 0:411244c71423 | 1 | #include "pat9125_i2c.h" |
pixus_mbed | 0:411244c71423 | 2 | |
pixus_mbed | 0:411244c71423 | 3 | static pat9125_i2c *_self ; |
pixus_mbed | 0:411244c71423 | 4 | static PinName _sda ; |
pixus_mbed | 0:411244c71423 | 5 | static PinName _scl ; |
pixus_mbed | 0:411244c71423 | 6 | |
pixus_mbed | 0:411244c71423 | 7 | |
pixus_mbed | 0:411244c71423 | 8 | pat9125_i2c::pat9125_i2c(PinName sda, PinName scl) : I2C(sda, scl) |
pixus_mbed | 0:411244c71423 | 9 | { |
pixus_mbed | 0:411244c71423 | 10 | _self = this ; |
pixus_mbed | 0:411244c71423 | 11 | _sda = sda , |
pixus_mbed | 0:411244c71423 | 12 | _scl = scl ; |
pixus_mbed | 0:411244c71423 | 13 | } |
pixus_mbed | 0:411244c71423 | 14 | |
pixus_mbed | 0:411244c71423 | 15 | pat9125_i2c* pat9125_i2c::reset() |
pixus_mbed | 0:411244c71423 | 16 | { |
pixus_mbed | 0:411244c71423 | 17 | delete _self ; |
pixus_mbed | 0:411244c71423 | 18 | _self = new pat9125_i2c(_sda, _scl); |
pixus_mbed | 0:411244c71423 | 19 | return _self ; |
pixus_mbed | 0:411244c71423 | 20 | } |