Alicia Friedrich / Mbed OS PushPull

Dependencies:   LCD_i2c_GSOE

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 /* mbed Microcontroller Library
00002  * Copyright (c) 2019 ARM Limited
00003  * SPDX-License-Identifier: Apache-2.0
00004  */
00005  
00006 #include "mbed.h"
00007 #include "platform/mbed_thread.h"
00008 
00009 
00010 DigitalInOut se1InOut(PB_6);
00011 DigitalIn   se1In(PB_6);
00012 
00013 DigitalInOut se2InOut(PB_7);
00014 DigitalIn    se2In(PB_7);
00015 
00016 DigitalIn    eingabeTaste(PA_1);
00017 DigitalIn    eingabeTaste2(PA_10);
00018 DigitalOut  testSE1(PC_0);
00019 DigitalOut  testSE2(PC_1);
00020 
00021 int main()
00022 {
00023 se1InOut.output();
00024 se1InOut.mode(OpenDrain);
00025 se1In.mode(PullUp);
00026 
00027  
00028 se2InOut.output();
00029 se2InOut.mode(OpenDrain);   
00030 se2In.mode(PullUp);
00031 
00032 eingabeTaste.mode(PullDown);
00033 eingabeTaste2.mode(PullDown);
00034 
00035     while(true)
00036     {
00037     se1InOut = eingabeTaste;
00038     se2InOut = eingabeTaste2;
00039     testSE1 =  se1In;
00040     testSE2 =  se2In;
00041     }
00042 }