![]() |
|
|||
File indexing completed on 2025-05-11 08:22:44
0001 /* ---------------------------------------------------------------------------- */ 0002 /* Atmel Microcontroller Software Support */ 0003 /* SAM Software Package License */ 0004 /* ---------------------------------------------------------------------------- */ 0005 /* Copyright (c) 2015, Atmel Corporation */ 0006 /* */ 0007 /* All rights reserved. */ 0008 /* */ 0009 /* Redistribution and use in source and binary forms, with or without */ 0010 /* modification, are permitted provided that the following condition is met: */ 0011 /* */ 0012 /* - Redistributions of source code must retain the above copyright notice, */ 0013 /* this list of conditions and the disclaimer below. */ 0014 /* */ 0015 /* Atmel's name may not be used to endorse or promote products derived from */ 0016 /* this software without specific prior written permission. */ 0017 /* */ 0018 /* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR */ 0019 /* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ 0020 /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE */ 0021 /* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, */ 0022 /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */ 0023 /* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ 0024 /* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ 0025 /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ 0026 /* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */ 0027 /* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 0028 /* ---------------------------------------------------------------------------- */ 0029 0030 /** 0031 * \file 0032 * 0033 * \section Purpose 0034 * 0035 * Small set of functions for simple and portable LED usage. 0036 * 0037 * \section Usage 0038 * 0039 * -# Configure one or more LEDs using LED_Configure and 0040 * LED_ConfigureAll. 0041 * -# Set, clear and toggle LEDs using LED_Set, LED_Clear and 0042 * LED_Toggle. 0043 * 0044 * LEDs are numbered starting from 0; the number of LEDs depend on the 0045 * board being used. All the functions defined here will compile properly 0046 * regardless of whether the LED is defined or not; they will simply 0047 * return 0 when a LED which does not exist is given as an argument. 0048 * Also, these functions take into account how each LED is connected on to 0049 * board; thus, \ref LED_Set might change the level on the corresponding pin 0050 * to 0 or 1, but it will always light the LED on; same thing for the other 0051 * methods. 0052 */ 0053 0054 #ifndef _LED_ 0055 #define _LED_ 0056 0057 #include <stdint.h> 0058 0059 /*---------------------------------------------------------------------------- 0060 * Exported functions 0061 *----------------------------------------------------------------------------*/ 0062 0063 extern uint32_t LED_Configure(uint32_t dwLed); 0064 0065 extern uint32_t LED_Set(uint32_t dwLed); 0066 0067 extern uint32_t LED_Clear(uint32_t dwLed); 0068 0069 extern uint32_t LED_Toggle(uint32_t dwLed); 0070 0071 #endif /* #ifndef LED_H */ 0072
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |