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 BusIn API, please see BusIn.

The BusIn interface is used to create a number of DigitalIn pins that can be read as one value.

Any of the numbered mbed pins can be used as a DigitalIn in the BusIn.

Hello World!

Import program

00001 #include "mbed.h"
00003 BusIn nibble(p5, p6, p18, p11);
00005 int main() {
00006     while(1) {
00007         switch(nibble) {
00008             case 0x3: printf("Hello!\n"); break; // p5 and p6 are 1
00009             case 0x8: printf("World!\n"); break; // p11 is 1
00010         }
00011     }
00012 }


API summary

[Not found]


The BusIn Interface can use any pins with a blue label.

See the Pinout page for more details