Gerhard Neumaier
/
Nucleo_Port_out
16bit zu PORT_B
Fork of Nucleo_Port_out by
mainPort_out.cpp
- Committer:
- schlaumaier54
- Date:
- 2015-08-20
- Revision:
- 1:6453ab1bd49e
- Parent:
- 0:209723876d8b
File content as of revision 1:6453ab1bd49e:
/* German: Hardware: Nucleo F103RB Test Ausgabe an einen Port mit 16Pin Ziel: Verschiedene digitale Werte ausgeben Aufgaben: Pinbezeichnungen testen, Ports verändern Konkret: LEDs an die entsprechenden PINs anschliessen, Funktion testen und Ports ändern Aug 2015 G. Neumaier Gewerblich-Technische Schule Offenburg Germany */ #include "mbed.h" #define LED_MASK 0xffff //PortB has 16bit, therefore 4digit mask // 1=Ausgang 0=Eingang PortOut leds(PortB, LED_MASK); int main() { while(1) { leds = 0x700B; //Output PortB: 0111 0000 0000 1011 wait(1); //wait 1sec leds = 0; //Reset all pins of PORT_B wait(1); } }