Abstract class for 'constant current (CC)' LED driver component. Including "LedPwmOutCC API" class.
CompLedDvrCC.h@0:6d2f6c0fcc40, 2015-03-04 (annotated)
- Committer:
- nxp_ip
- Date:
- Wed Mar 04 10:14:02 2015 +0000
- Revision:
- 0:6d2f6c0fcc40
- Child:
- 1:877856770b37
Initial version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nxp_ip | 0:6d2f6c0fcc40 | 1 | /** Abstract class for 'constant-current (CC)' LED driver component |
nxp_ip | 0:6d2f6c0fcc40 | 2 | * |
nxp_ip | 0:6d2f6c0fcc40 | 3 | * Abstract class for CC-LED driver family |
nxp_ip | 0:6d2f6c0fcc40 | 4 | * No instance can be made from this class |
nxp_ip | 0:6d2f6c0fcc40 | 5 | * |
nxp_ip | 0:6d2f6c0fcc40 | 6 | * @author Akifumi (Tedd) OKANO, NXP Semiconductors |
nxp_ip | 0:6d2f6c0fcc40 | 7 | * @version 0.5 |
nxp_ip | 0:6d2f6c0fcc40 | 8 | * @date 04-Mar-2015 |
nxp_ip | 0:6d2f6c0fcc40 | 9 | * |
nxp_ip | 0:6d2f6c0fcc40 | 10 | * Released under the Apache 2 license License |
nxp_ip | 0:6d2f6c0fcc40 | 11 | */ |
nxp_ip | 0:6d2f6c0fcc40 | 12 | |
nxp_ip | 0:6d2f6c0fcc40 | 13 | #ifndef MBED_CompLedDvrCC |
nxp_ip | 0:6d2f6c0fcc40 | 14 | #define MBED_CompLedDvrCC |
nxp_ip | 0:6d2f6c0fcc40 | 15 | |
nxp_ip | 0:6d2f6c0fcc40 | 16 | #include "mbed.h" |
nxp_ip | 0:6d2f6c0fcc40 | 17 | |
nxp_ip | 0:6d2f6c0fcc40 | 18 | typedef enum { |
nxp_ip | 0:6d2f6c0fcc40 | 19 | /** Pin names of LED driver. Those are L0 .. L3, not like "LED0" to avoid mbed board LED names */ |
nxp_ip | 0:6d2f6c0fcc40 | 20 | L0, /**< LED0 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 21 | L1, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 22 | L2, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 23 | L3, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 24 | L4, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 25 | L5, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 26 | L6, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 27 | L7, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 28 | L8, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 29 | L9, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 30 | L10, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 31 | L11, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 32 | L12, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 33 | L13, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 34 | L14, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 35 | L15, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 36 | L16, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 37 | L17, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 38 | L18, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 39 | L19, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 40 | L20, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 41 | L21, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 42 | L22, /**< LED2 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 43 | L23, /**< LED23 pin */ |
nxp_ip | 0:6d2f6c0fcc40 | 44 | L_NC = ~0x0L /**< for when the pin is left no-connection */ |
nxp_ip | 0:6d2f6c0fcc40 | 45 | } LedPinName; |
nxp_ip | 0:6d2f6c0fcc40 | 46 | |
nxp_ip | 0:6d2f6c0fcc40 | 47 | |
nxp_ip | 0:6d2f6c0fcc40 | 48 | /** Abstract class for CC-LED driver component |
nxp_ip | 0:6d2f6c0fcc40 | 49 | * |
nxp_ip | 0:6d2f6c0fcc40 | 50 | * @class CompLedDvrCC |
nxp_ip | 0:6d2f6c0fcc40 | 51 | * |
nxp_ip | 0:6d2f6c0fcc40 | 52 | * Abstract class for LED driver family |
nxp_ip | 0:6d2f6c0fcc40 | 53 | * No instance can be made from this class |
nxp_ip | 0:6d2f6c0fcc40 | 54 | */ |
nxp_ip | 0:6d2f6c0fcc40 | 55 | class CompLedDvrCC |
nxp_ip | 0:6d2f6c0fcc40 | 56 | { |
nxp_ip | 0:6d2f6c0fcc40 | 57 | public: |
nxp_ip | 0:6d2f6c0fcc40 | 58 | /** Default constructor */ |
nxp_ip | 0:6d2f6c0fcc40 | 59 | CompLedDvrCC(); |
nxp_ip | 0:6d2f6c0fcc40 | 60 | |
nxp_ip | 0:6d2f6c0fcc40 | 61 | /** Destructor */ |
nxp_ip | 0:6d2f6c0fcc40 | 62 | virtual ~CompLedDvrCC(); |
nxp_ip | 0:6d2f6c0fcc40 | 63 | |
nxp_ip | 0:6d2f6c0fcc40 | 64 | /** Virtual function to define standard function of the component */ |
nxp_ip | 0:6d2f6c0fcc40 | 65 | virtual void pwm( int port, float v ) = 0; |
nxp_ip | 0:6d2f6c0fcc40 | 66 | |
nxp_ip | 0:6d2f6c0fcc40 | 67 | /** Virtual function to define standard function of the component */ |
nxp_ip | 0:6d2f6c0fcc40 | 68 | virtual void current( int port, float v ) = 0; |
nxp_ip | 0:6d2f6c0fcc40 | 69 | } |
nxp_ip | 0:6d2f6c0fcc40 | 70 | ; |
nxp_ip | 0:6d2f6c0fcc40 | 71 | |
nxp_ip | 0:6d2f6c0fcc40 | 72 | #endif // MBED_CompLedDvrCC |
nxp_ip | 0:6d2f6c0fcc40 | 73 | |
nxp_ip | 0:6d2f6c0fcc40 | 74 |