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