![]() |
Choco OS
V.0.16.9.0
Join to the chocolate world
|
The file with interface for the LED driver. More...
Go to the source code of this file.
Data Structures | |
struct | oC_LED_Config_t |
LED driver configuration structure. More... | |
Typedefs | |
typedef struct Context_t * | oC_LED_Context_t |
The LED context structure. More... | |
Functions | |
oC_ErrorCode_t | oC_LED_Configure (const oC_LED_Config_t *Config, oC_LED_Context_t *outContext) |
configures LED pins to work More... | |
oC_ErrorCode_t | oC_LED_Unconfigure (const oC_LED_Config_t *Config, oC_LED_Context_t *outContext) |
Restores default state on pins. More... | |
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Definition in file oc_led.h.
typedef struct Context_t* oC_LED_Context_t |
This is the structure with dynamic allocated data for the LED. It stores a HANDLE for a driver and it can be used to identify the driver context. You should get this pointer from the oC_LED_Configure function, but note, that not all drivers use it. In many cases it is just not needed, and it just will store NULL then. You should keep this pointer as long as it is necessary for you, and when it will not be anymore, you should call oC_LED_Unconfigure function to destroy it.
oC_ErrorCode_t oC_LED_Configure | ( | const oC_LED_Config_t * | Config, |
oC_LED_Context_t * | outContext | ||
) |
The function is for configuration of the driver. Look at the oC_LED_Config_t structure description and fields list to get more info.
Config | Pointer to the configuration structure |
outContext | Destination for the driver context structure |
oC_ErrorCode_t oC_LED_Unconfigure | ( | const oC_LED_Config_t * | Config, |
oC_LED_Context_t * | outContext | ||
) |