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: mbed mbed-rtos ShiftReg2 TextLCD
Interface.cpp
00001 #include "Interface.hpp" 00002 //Define the variables here 00003 Serial PC(PB_10, PB_11); //TX, RX 00004 Serial Board(PB_6, PB_7); //TX, RX 00005 //TextLCD Lcd(PB_12, PB_13, PB_14, PB_15, PA_8, PA_9); // rs, e, d4-d7 00006 TextLCD Lcd(PB_12, PB_13, PB_14, PB_15, PA_8, PA_9); // rs, e, d4-d7 00007 DigitalOut On_board_led(PC_13);//Onborad LED needs no pass in parameter 00008 00009 INTERFACE::INTERFACE(PinName N1, PinName N2, PinName N3, PinName N4,PinName N5, PinName N6, PinName N7, PinName N8,PinName N9, PinName N10, PinName N11): _Rotary_Encoder_A(N1),_Rotary_Encoder_B(N2),_Rotary_Encoder_Button(N3),_Button_1(N4), _Button_2(N5), _Button_3(N6), _MOSFET_Safety(N7), _Shift_SCLK(N8),_Shift_Latch(N9), _Shift_Enable(N10), _Shift_Data(N11) 00010 { 00011 00012 } 00013 00014 INTERFACE::~INTERFACE(){} 00015 void INTERFACE::Init(){} 00016 int INTERFACE::Post() 00017 { 00018 return 1;//Success 00019 } 00020 void INTERFACE::On_board_LED_Flash() 00021 { 00022 while(1) 00023 { 00024 On_board_led = !On_board_led; 00025 Thread::wait(1000); 00026 } 00027 } 00028 void INTERFACE::Serial() 00029 { 00030 while(1) 00031 { 00032 PC.printf("Testing Serial\n"); 00033 Thread::wait(1000); 00034 } 00035 } 00036 void INTERFACE::LCD() 00037 { 00038 while(1) 00039 { 00040 Lcd.printf("Testing\nINTERFACE"); 00041 Thread::wait(1000); 00042 } 00043 } 00044
Generated on Sun Jul 17 2022 08:28:43 by
1.7.2