Production Test Program (PTP) for the LPC4088 Experiment Base Board

Dependencies:   EALib I2S LM75B SDFileSystem mbed

Committer:
embeddedartists
Date:
Wed Oct 01 11:16:38 2014 +0000
Revision:
9:eb6086159020
Parent:
2:2f4b7535ceb3
Updated used libraries

Who changed what in which revision?

UserRevisionLine numberNew contents of line
embeddedartists 2:2f4b7535ceb3 1 /*
embeddedartists 2:2f4b7535ceb3 2 * Copyright 2013 Embedded Artists AB
embeddedartists 2:2f4b7535ceb3 3 *
embeddedartists 2:2f4b7535ceb3 4 * Licensed under the Apache License, Version 2.0 (the "License");
embeddedartists 2:2f4b7535ceb3 5 * you may not use this file except in compliance with the License.
embeddedartists 2:2f4b7535ceb3 6 * You may obtain a copy of the License at
embeddedartists 2:2f4b7535ceb3 7 *
embeddedartists 2:2f4b7535ceb3 8 * http://www.apache.org/licenses/LICENSE-2.0
embeddedartists 2:2f4b7535ceb3 9 *
embeddedartists 2:2f4b7535ceb3 10 * Unless required by applicable law or agreed to in writing, software
embeddedartists 2:2f4b7535ceb3 11 * distributed under the License is distributed on an "AS IS" BASIS,
embeddedartists 2:2f4b7535ceb3 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
embeddedartists 2:2f4b7535ceb3 13 * See the License for the specific language governing permissions and
embeddedartists 2:2f4b7535ceb3 14 * limitations under the License.
embeddedartists 2:2f4b7535ceb3 15 */
embeddedartists 2:2f4b7535ceb3 16
embeddedartists 2:2f4b7535ceb3 17 #ifndef TESTRGBLED_H
embeddedartists 2:2f4b7535ceb3 18 #define TESTRGBLED_H
embeddedartists 2:2f4b7535ceb3 19
embeddedartists 2:2f4b7535ceb3 20
embeddedartists 2:2f4b7535ceb3 21 /**
embeddedartists 2:2f4b7535ceb3 22 * Test the RGB LED on the LPC4088 Experiment Base Board
embeddedartists 2:2f4b7535ceb3 23 */
embeddedartists 2:2f4b7535ceb3 24 class TestRGBLed {
embeddedartists 2:2f4b7535ceb3 25 public:
embeddedartists 2:2f4b7535ceb3 26
embeddedartists 2:2f4b7535ceb3 27 /**
embeddedartists 2:2f4b7535ceb3 28 * Create an interface to the RGB LED
embeddedartists 2:2f4b7535ceb3 29 *
embeddedartists 2:2f4b7535ceb3 30 * @param red Pin for the RED LED
embeddedartists 2:2f4b7535ceb3 31 * @param green Pin for the GREEN LED
embeddedartists 2:2f4b7535ceb3 32 * @param blue Pin for the BLUE LED
embeddedartists 2:2f4b7535ceb3 33 * @param button Pin for the User Button on the LPC4088 QuickStart Board
embeddedartists 2:2f4b7535ceb3 34 */
embeddedartists 2:2f4b7535ceb3 35 TestRGBLed(PinName red=p25, PinName green=p28, PinName blue=p26, PinName button=p23);
embeddedartists 2:2f4b7535ceb3 36
embeddedartists 2:2f4b7535ceb3 37 /**
embeddedartists 2:2f4b7535ceb3 38 * Blink in pattern to show test start
embeddedartists 2:2f4b7535ceb3 39 */
embeddedartists 2:2f4b7535ceb3 40 void showStartupPattern();
embeddedartists 2:2f4b7535ceb3 41
embeddedartists 2:2f4b7535ceb3 42 /**
embeddedartists 2:2f4b7535ceb3 43 * Use the RED or GREEN LEDs to signal failure/success
embeddedartists 2:2f4b7535ceb3 44 */
embeddedartists 2:2f4b7535ceb3 45 void showStatus(bool success);
embeddedartists 2:2f4b7535ceb3 46
embeddedartists 2:2f4b7535ceb3 47 /**
embeddedartists 2:2f4b7535ceb3 48 * Wait for the user to press and release the User Button on the
embeddedartists 2:2f4b7535ceb3 49 * LPC4088 QuickStart Board.
embeddedartists 2:2f4b7535ceb3 50 */
embeddedartists 2:2f4b7535ceb3 51 void waitForButtonClick();
embeddedartists 2:2f4b7535ceb3 52
embeddedartists 2:2f4b7535ceb3 53 /**
embeddedartists 2:2f4b7535ceb3 54 * Test the RGB LEDs
embeddedartists 2:2f4b7535ceb3 55 *
embeddedartists 2:2f4b7535ceb3 56 * @return true if the test was successful; otherwise false
embeddedartists 2:2f4b7535ceb3 57 */
embeddedartists 2:2f4b7535ceb3 58 bool runTest();
embeddedartists 2:2f4b7535ceb3 59
embeddedartists 2:2f4b7535ceb3 60 private:
embeddedartists 2:2f4b7535ceb3 61
embeddedartists 2:2f4b7535ceb3 62 PinName _redPin;
embeddedartists 2:2f4b7535ceb3 63 PinName _greenPin;
embeddedartists 2:2f4b7535ceb3 64 PinName _bluePin;
embeddedartists 2:2f4b7535ceb3 65 DigitalIn _button;
embeddedartists 2:2f4b7535ceb3 66 };
embeddedartists 2:2f4b7535ceb3 67
embeddedartists 2:2f4b7535ceb3 68 #endif
embeddedartists 2:2f4b7535ceb3 69