Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EALib I2S LM75B SDFileSystem mbed
TestRGBLed.h
00001 /* 00002 * Copyright 2013 Embedded Artists AB 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #ifndef TESTRGBLED_H 00018 #define TESTRGBLED_H 00019 00020 00021 /** 00022 * Test the RGB LED on the LPC4088 Experiment Base Board 00023 */ 00024 class TestRGBLed { 00025 public: 00026 00027 /** 00028 * Create an interface to the RGB LED 00029 * 00030 * @param red Pin for the RED LED 00031 * @param green Pin for the GREEN LED 00032 * @param blue Pin for the BLUE LED 00033 * @param button Pin for the User Button on the LPC4088 QuickStart Board 00034 */ 00035 TestRGBLed(PinName red=p25, PinName green=p28, PinName blue=p26, PinName button=p23); 00036 00037 /** 00038 * Blink in pattern to show test start 00039 */ 00040 void showStartupPattern(); 00041 00042 /** 00043 * Use the RED or GREEN LEDs to signal failure/success 00044 */ 00045 void showStatus(bool success); 00046 00047 /** 00048 * Wait for the user to press and release the User Button on the 00049 * LPC4088 QuickStart Board. 00050 */ 00051 void waitForButtonClick(); 00052 00053 /** 00054 * Test the RGB LEDs 00055 * 00056 * @return true if the test was successful; otherwise false 00057 */ 00058 bool runTest(); 00059 00060 private: 00061 00062 PinName _redPin; 00063 PinName _greenPin; 00064 PinName _bluePin; 00065 DigitalIn _button; 00066 }; 00067 00068 #endif 00069
Generated on Sun Jul 17 2022 08:29:10 by
1.7.2