MAX32665 SDK Documentation  0.2
Software Development Kit Overview and API Documentation
led.h
1 
5 /* ****************************************************************************
6  * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
7  *
8  * Permission is hereby granted, free of charge, to any person obtaining a
9  * copy of this software and associated documentation files (the "Software"),
10  * to deal in the Software without restriction, including without limitation
11  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12  * and/or sell copies of the Software, and to permit persons to whom the
13  * Software is furnished to do so, subject to the following conditions:
14  *
15  * The above copyright notice and this permission notice shall be included
16  * in all copies or substantial portions of the Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21  * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
22  * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
23  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24  * OTHER DEALINGS IN THE SOFTWARE.
25  *
26  * Except as contained in this notice, the name of Maxim Integrated
27  * Products, Inc. shall not be used except as stated in the Maxim Integrated
28  * Products, Inc. Branding Policy.
29  *
30  * The mere transfer of this software does not imply any licenses
31  * of trade secrets, proprietary technology, copyrights, patents,
32  * trademarks, maskwork rights, or any other form of intellectual
33  * property whatsoever. Maxim Integrated Products, Inc. retains all
34  * ownership rights.
35  *
36  * $Date: 2018-11-08 15:08:58 -0600 (Thu, 08 Nov 2018) $
37  * $Revision: 39056 $
38  *
39  *************************************************************************** */
40 
41 #ifndef _LED_H_
42 #define _LED_H_
43 
44 #include "mxc_assert.h"
45 #include "board.h"
46 #include "gpio.h"
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
56 /* **** Definitions **** */
57 #ifndef LED_OFF
58 #define LED_OFF 1
59 #endif
60 
61 #ifndef LED_ON
62 #define LED_ON 0
63 #endif
64 
65 /* **** Global Variables **** */
66 extern const gpio_cfg_t led_pin[];
67 extern const unsigned int num_leds;
68 
69 /* **** Function Prototypes **** */
70 
76 int LED_Init(void);
77 
82 void LED_On(unsigned int idx);;
83 
88 void LED_Off(unsigned int idx);
89 
94 void LED_Toggle(unsigned int idx);
95 
96 #ifdef __cplusplus
97 }
98 #endif
99 
100 #endif /* _LED_H_ */
Structure type for configuring a GPIO port.
Definition: gpio.h:138
void LED_Toggle(unsigned int idx)
Toggle the state of the specified LED.
void LED_On(unsigned int idx)
Turn the specified LED on.
int LED_Init(void)
Initialize all LED pins.
void LED_Off(unsigned int idx)
Turn the specified LED off.