BusInOut

Table of Contents

  1. Hello World!
  2. API
  3. Related

Mbed OS 2 and Mbed OS 5

This is the handbook for Mbed OS 2. If you’re working with Mbed OS 5, please see the new handbook. 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

[Not found]