Electronics and Software
Engineering Innovation
ArmsysApi  0.12.18
ArmsysApi Documentation
Author
Dr Terry Barnaby
Version
0.12.18
Date
2019-06-15

Introduction

This document covers the Armsys real-time embedded system API. The Armsys system provides a real-time system for embedded ARM based hardware platforms using a C++ object orientated API.

Overview

Examples

There are some examples of simple Armsys applications in the examples directory of the installation. Some simple client examples are listed below:

/*******************************************************************************
* Main.cpp ArmSys example
* T.Barnaby, Beam Ltd, 2012-11-12
* Copyright (c) 2013 All Right Reserved, Beam Ltd, http://www.beam.ltd.uk
*******************************************************************************
*
* Simple test of flashing an LED.
*/
#include <BConfig.h>
// Board configuration
BUInt32 armSysCrystal = CrystalFreq; // The system crystal frequency
BUInt32 armSysPinLed0 = PinLed0; // The first system LED
BUInt32 armSysPinLed1 = PinLed1; // The second system LED
BSys sys; // The system
BGpio gpio; // The GPIO (pins) interface
// Initialise the system
void init(){
// Initialise the system
sys.init();
// Pin configuration
}
// The main program loop
void run(){
while(1){
// Flash a LED
gpio.setPin(PinLed0, On);
delayMs(1000);
gpio.setPin(PinLed0, Off);
delayMs(1000);
}
}
int main(){
init();
sys.run(run);
return 0;
}