snickerdoodle Platform Controller
firmware for STM32F0 platform controller
sd_led.h File Reference

LED Control Functions. More...

Go to the source code of this file.

Data Structures

struct  sd_led
 LED pattern configuration structure. More...
 

Enumerations

enum  sd_led_err {
  SD_LED_SUCCESS, SD_LED_IDLE, SD_LED_NULL_HANDLE_ERROR, SD_LED_NULL_TIMER_ERROR,
  SD_LED_ERROR
}
 LED error status enumeration. More...
 
enum  sd_led_state { SD_LED_NOT_READY, SD_LED_INITIALIZED, SD_LED_RUNNING }
 LED state.
 

Functions

enum sd_led_err sd_led_init (struct sd_led *led, TIM_HandleTypeDef *tim, uint32_t chan, uint32_t *pattern, uint32_t len, TIM_HandleTypeDef *up_tim)
 LED initialization Initialize an LED configuration on a timer peripheral with a pattern. More...
 
enum sd_led_err sd_led_set_pattern (struct sd_led *led, uint32_t *pattern, uint32_t len, uint8_t repeat)
 LED set pattern Set pattern for LED output. More...
 
enum sd_led_err sd_led_enable (struct sd_led *led, uint8_t en)
 LED Enable.
 
enum sd_led_err sd_led_reset (struct sd_led *led)
 LED reset Reset the LED configuration and clear the pattern. More...
 
enum sd_led_err sd_led_queuehandler (struct sd_led *led)
 LED queue handler Execute the LED pattern state machine. More...
 

Detailed Description

LED Control Functions.

LED Patterns and Functions.

Author
R. Bush bush@.nosp@m.krtk.nosp@m.l.com
Version
v1.0
Date
2016 March 28

Copyright (c) 2016, krtkl inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the FreeBSD Project.