BBBCSIO
A C# I/O Library for the Beaglebone Black

Example Code

 

Example Code

Sample code illustrating the use of some of the functionality in the PRU_Driver class of the BBBCSIO library. The source code for all classes in the BBBCSIO library are available online for download and also in browseable form.

How to use launch a compiled binary in the PRU and blink the USR3 LED.
A simple example of how to launch a compiled binary in a PRU which blinks the USR3 LED. Both the compiled binary and the PASM source code are available.

How to send and receive data to and from an executing PRU program.
An example of how to transfer data from a user space C# program to the PRU for processing and how to receive the returned data. Both the compiled binary and the PASM source code are available.

How to trigger interrupts in a PRU to send signals to a C# program
The PRU can send trigger interrupts to send signals to user space programs. This example illustrates how to process PRU generated interrupts as C# events. Both the compiled binary and the PASM source code are available.

How to use the PRU for direct I/O.
The PRU can directly read and write the state of certain pins on the Beaglebone Black's P8 and P9 headers. This example code demonstrates this process. Both the compiled binary, the PASM source code and sample are available.