
Pt. 4 | Encryption encrypt program
Dependencies: mbed 4DGL-uLCD-SE SDFileSystem PinDetect
Shiftbrite.h@0:72aeef60e1fc, 2019-01-03 (annotated)
- Committer:
- sralph3
- Date:
- Thu Jan 03 22:40:26 2019 +0000
- Revision:
- 0:72aeef60e1fc
Pt. 4 | Encryption encrypt program
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sralph3 | 0:72aeef60e1fc | 1 | #include "mbed.h" |
sralph3 | 0:72aeef60e1fc | 2 | |
sralph3 | 0:72aeef60e1fc | 3 | //Setup a new class for a Shiftbrite RGB LED module |
sralph3 | 0:72aeef60e1fc | 4 | class Shiftbrite |
sralph3 | 0:72aeef60e1fc | 5 | { |
sralph3 | 0:72aeef60e1fc | 6 | public: |
sralph3 | 0:72aeef60e1fc | 7 | Shiftbrite(PinName pin_e, PinName pin_l, PinName pin_do, PinName pin_di, PinName pin_clk); |
sralph3 | 0:72aeef60e1fc | 8 | void write(int red, int green, int blue); |
sralph3 | 0:72aeef60e1fc | 9 | |
sralph3 | 0:72aeef60e1fc | 10 | private: |
sralph3 | 0:72aeef60e1fc | 11 | //class sets up the pins |
sralph3 | 0:72aeef60e1fc | 12 | DigitalOut _pin_e; |
sralph3 | 0:72aeef60e1fc | 13 | DigitalOut _pin_l; |
sralph3 | 0:72aeef60e1fc | 14 | SPI _spi; |
sralph3 | 0:72aeef60e1fc | 15 | }; |
sralph3 | 0:72aeef60e1fc | 16 | |
sralph3 | 0:72aeef60e1fc | 17 | Shiftbrite::Shiftbrite(PinName pin_e, PinName pin_l, PinName pin_do, PinName pin_di, PinName pin_clk) |
sralph3 | 0:72aeef60e1fc | 18 | : _pin_e(pin_e), _pin_l(pin_l), _spi(pin_do, pin_di, pin_clk) |
sralph3 | 0:72aeef60e1fc | 19 | { |
sralph3 | 0:72aeef60e1fc | 20 | // ADD CODE HERE |
sralph3 | 0:72aeef60e1fc | 21 | } |
sralph3 | 0:72aeef60e1fc | 22 | |
sralph3 | 0:72aeef60e1fc | 23 | void Shiftbrite::write(int red, int green, int blue) |
sralph3 | 0:72aeef60e1fc | 24 | { |
sralph3 | 0:72aeef60e1fc | 25 | // ADD CODE HERE |
sralph3 | 0:72aeef60e1fc | 26 | } |