define data and clock pins in one object then pass that as one argument to 2-wire objects
Dependents: Nucleo_read_button_interrupt_copy Seeed_Grove_4_Digit_Display_Clock
DataClockPair.h@1:a288ae0fdd74, 2017-05-21 (annotated)
- Committer:
- tulanthoar
- Date:
- Sun May 21 13:45:39 2017 -0600
- Revision:
- 1:a288ae0fdd74
- Parent:
- 0:6d9fab76ca5b
Add default constructor
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tulanthoar | 0:6d9fab76ca5b | 1 | #ifndef DATA_CLOCK_PAIR_H |
tulanthoar | 0:6d9fab76ca5b | 2 | #define DATA_CLOCK_PAIR_H |
tulanthoar | 0:6d9fab76ca5b | 3 | #include "mbed.h" |
tulanthoar | 0:6d9fab76ca5b | 4 | struct DataClockPair{ |
tulanthoar | 0:6d9fab76ca5b | 5 | PinName dataPin; |
tulanthoar | 0:6d9fab76ca5b | 6 | PinName clockPin; |
tulanthoar | 0:6d9fab76ca5b | 7 | DataClockPair(PinName clk, PinName dat):dataPin(dat), clockPin(clk){}; |
tulanthoar | 1:a288ae0fdd74 | 8 | DataClockPair(){}; |
tulanthoar | 0:6d9fab76ca5b | 9 | }; |
tulanthoar | 0:6d9fab76ca5b | 10 | #endif |