led.h

Go to the documentation of this file.
00001 #ifndef _LED_H_
00002 #define _LED_H_
00003 
00004 /*
00005  * Copyright (C) 2009 by Rittal GmbH & Co. KG,
00006  * Ulrich Prinz <prinz.u@rittal.de> All rights reserved.
00007  *
00008  * Redistribution and use in source and binary forms, with or without
00009  * modification, are permitted provided that the following conditions
00010  * are met:
00011  *
00012  * 1. Redistributions of source code must retain the above copyright
00013  *    notice, this list of conditions and the following disclaimer.
00014  * 2. Redistributions in binary form must reproduce the above copyright
00015  *    notice, this list of conditions and the following disclaimer in the
00016  *    documentation and/or other materials provided with the distribution.
00017  * 3. Neither the name of the copyright holders nor the names of
00018  *    contributors may be used to endorse or promote products derived
00019  *    from this software without specific prior written permission.
00020  *
00021  * THIS SOFTWARE IS PROVIDED BY EMBEDDED IT AND CONTRIBUTORS
00022  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00023  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00024  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EMBEDDED IT
00025  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00026  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00027  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00028  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00029  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00030  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
00031  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00032  *
00033  * For additional information see http://www.ethernut.de/
00034  *
00035  */
00036 
00037 /*
00038  * $Log$
00039  *
00040  * Revision 0.2  2009/04/13 ulrichprinz
00041  * First checkin, led driver with extra functionality and variable io-access
00042  * (currently SAM7X256 is tested only)
00043  *
00044  */
00045 
00046 
00047 #include <stdint.h>
00048 //#include <sys/nut_types.h>
00049 
00050 #define LED_OFF     0
00051 #define LED_ON      1
00052 #define LED_FLIP    2
00053 #define LED_ONESHOT 3
00054 #define LED_BLINK   4
00055 
00056 __BEGIN_DECLS
00057 /* Prototypes */
00058 void NutSetLed( HANDLE ledh, uint8_t tim, uint8_t state);
00059 int NutRegisterLed( HANDLE * ledh, int port, int pin);
00060 void SetLedEvent( uint8_t led, uint32_t interval, uint32_t duration );
00061 __END_DECLS
00062 /* End of prototypes */
00063 #endif

© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/