BusInOut

Table of Contents

  1. Hello World!
  2. API
  3. Related

This content relates to a deprecated version of Mbed

Mbed 2 is now deprecated. For the latest version please see the Mbed OS documentation.

For the latest BusInOut API, please see BusInOut.

The BusInOut interface is used as a bi-directional bus that collects together a number of DigitalInOut pins that can be read and written as one value.

Any of the numbered mbed pins can be used as a DigitalInOut.

Hello World!

Import program

00001 #include "mbed.h"
00002  
00003 BusInOut pins(p5, p10, p7);
00004  
00005 int main() {
00006     while(1) {
00007         pins.output();
00008         pins = 0x3;
00009         wait(1);
00010         pins.input();
00011         wait(1);
00012         if(pins == 0x6) {
00013             printf("Hello!\n");
00014         }
00015     }
00016 }

API

API summary

Import librarymbed

No documentation found.

All wikipages