Simple test application for the STMicroelectronics X-NUCLEO-LED61A1 LED Control Expansion Board.

Dependencies:   X_NUCLEO_LED61A1 mbed

Fork of HelloWorld_LED61A1 by ST Expansion SW Team

LED Control with the X-NUCLEO-LED61A1 Expansion Board

This application provides a simple example of usage of the X-NUCLEO-LED61A1 LED Control Expansion Board.
It shows how to control a LED stripe load connected to the board by means of a sinusoidal wave form injected into the PWM dimming control pin.

Committer:
Davidroid
Date:
Thu Dec 10 15:34:29 2015 +0000
Revision:
0:f5a41692e1fb
Child:
1:1c01b873ad45
Simple test application for the STMicrolectronics X-NUCLEO-LED61A1 LED Control Expansion Board.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Davidroid 0:f5a41692e1fb 1 /**
Davidroid 0:f5a41692e1fb 2 ******************************************************************************
Davidroid 0:f5a41692e1fb 3 * @file main.cpp
Davidroid 0:f5a41692e1fb 4 * @author Davide Aliprandi, STMicrolectronics
Davidroid 0:f5a41692e1fb 5 * @version V1.0.0
Davidroid 0:f5a41692e1fb 6 * @date December 9th, 2015
Davidroid 0:f5a41692e1fb 7 * @brief mbed test application for the STMicrolectronics X-NUCLEO-LED61A1
Davidroid 0:f5a41692e1fb 8 * LED expansion board.
Davidroid 0:f5a41692e1fb 9 ******************************************************************************
Davidroid 0:f5a41692e1fb 10 * @attention
Davidroid 0:f5a41692e1fb 11 *
Davidroid 0:f5a41692e1fb 12 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
Davidroid 0:f5a41692e1fb 13 *
Davidroid 0:f5a41692e1fb 14 * Redistribution and use in source and binary forms, with or without modification,
Davidroid 0:f5a41692e1fb 15 * are permitted provided that the following conditions are met:
Davidroid 0:f5a41692e1fb 16 * 1. Redistributions of source code must retain the above copyright notice,
Davidroid 0:f5a41692e1fb 17 * this list of conditions and the following disclaimer.
Davidroid 0:f5a41692e1fb 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
Davidroid 0:f5a41692e1fb 19 * this list of conditions and the following disclaimer in the documentation
Davidroid 0:f5a41692e1fb 20 * and/or other materials provided with the distribution.
Davidroid 0:f5a41692e1fb 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Davidroid 0:f5a41692e1fb 22 * may be used to endorse or promote products derived from this software
Davidroid 0:f5a41692e1fb 23 * without specific prior written permission.
Davidroid 0:f5a41692e1fb 24 *
Davidroid 0:f5a41692e1fb 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Davidroid 0:f5a41692e1fb 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Davidroid 0:f5a41692e1fb 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Davidroid 0:f5a41692e1fb 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Davidroid 0:f5a41692e1fb 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Davidroid 0:f5a41692e1fb 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Davidroid 0:f5a41692e1fb 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Davidroid 0:f5a41692e1fb 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Davidroid 0:f5a41692e1fb 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Davidroid 0:f5a41692e1fb 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Davidroid 0:f5a41692e1fb 35 *
Davidroid 0:f5a41692e1fb 36 ******************************************************************************
Davidroid 0:f5a41692e1fb 37 */
Davidroid 0:f5a41692e1fb 38
Davidroid 0:f5a41692e1fb 39
Davidroid 0:f5a41692e1fb 40 /* Includes ------------------------------------------------------------------*/
Davidroid 0:f5a41692e1fb 41
Davidroid 0:f5a41692e1fb 42 /* mbed specific header files. */
Davidroid 0:f5a41692e1fb 43 #include "mbed.h"
Davidroid 0:f5a41692e1fb 44
Davidroid 0:f5a41692e1fb 45 /* Expansion Board specific header files. */
Davidroid 0:f5a41692e1fb 46 #include "x_nucleo_led61a1_class.h"
Davidroid 0:f5a41692e1fb 47 #include "x_nucleo_led61a1_config.h"
Davidroid 0:f5a41692e1fb 48
Davidroid 0:f5a41692e1fb 49
Davidroid 0:f5a41692e1fb 50 /* Main ----------------------------------------------------------------------*/
Davidroid 0:f5a41692e1fb 51
Davidroid 0:f5a41692e1fb 52 int main()
Davidroid 0:f5a41692e1fb 53 {
Davidroid 0:f5a41692e1fb 54 /*----- Initialization. -----*/
Davidroid 0:f5a41692e1fb 55
Davidroid 0:f5a41692e1fb 56 /* Initializing LED Expansion Board. */
Davidroid 0:f5a41692e1fb 57 X_NUCLEO_LED61A1 *x_nucleo_led61a1 = new X_NUCLEO_LED61A1();
Davidroid 0:f5a41692e1fb 58
Davidroid 0:f5a41692e1fb 59 /* Printing to the console. */
Davidroid 0:f5a41692e1fb 60 printf("LED Control Application Example\r\n\n");
Davidroid 0:f5a41692e1fb 61
Davidroid 0:f5a41692e1fb 62
Davidroid 0:f5a41692e1fb 63 /*----- LED Control. -----*/
Davidroid 0:f5a41692e1fb 64 }