Library for PAT9125 on L476RG platform
Fork of pat9125_mbed by
pat9125_i2c.cpp@1:4b7c15d9c864, 2018-02-01 (annotated)
- Committer:
- pixus_mbed
- Date:
- Thu Feb 01 02:21:50 2018 +0000
- Revision:
- 1:4b7c15d9c864
- Parent:
- 0:3459848530ee
Merge pixart_lcm to pat9125_mbed.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pixus_mbed | 0:3459848530ee | 1 | #include "pat9125_i2c.h" |
pixus_mbed | 0:3459848530ee | 2 | |
pixus_mbed | 0:3459848530ee | 3 | static pat9125_i2c *_self ; |
pixus_mbed | 0:3459848530ee | 4 | static PinName _sda ; |
pixus_mbed | 0:3459848530ee | 5 | static PinName _scl ; |
pixus_mbed | 0:3459848530ee | 6 | |
pixus_mbed | 0:3459848530ee | 7 | |
pixus_mbed | 0:3459848530ee | 8 | pat9125_i2c::pat9125_i2c(PinName sda, PinName scl) : I2C(sda, scl) |
pixus_mbed | 0:3459848530ee | 9 | { |
pixus_mbed | 0:3459848530ee | 10 | _self = this ; |
pixus_mbed | 0:3459848530ee | 11 | _sda = sda , |
pixus_mbed | 0:3459848530ee | 12 | _scl = scl ; |
pixus_mbed | 0:3459848530ee | 13 | } |
pixus_mbed | 0:3459848530ee | 14 | |
pixus_mbed | 0:3459848530ee | 15 | pat9125_i2c* pat9125_i2c::reset() |
pixus_mbed | 0:3459848530ee | 16 | { |
pixus_mbed | 0:3459848530ee | 17 | delete _self ; |
pixus_mbed | 0:3459848530ee | 18 | _self = new pat9125_i2c(_sda, _scl); |
pixus_mbed | 0:3459848530ee | 19 | return _self ; |
pixus_mbed | 0:3459848530ee | 20 | } |