OpenSwarm  0.16.1.2
An operating system for miniature robots
Modules | Files
I/O Management

I/O Management controls the input (e.g. sensors or camera), output (e.g. motors), and communication (e.g. UART, CAN, Bluetooth, ...) devices. For robots, I/O devices are important to interact with its environment, which is the main purpose in robotics. Consequently, this module provides functions and mechanisms to use these I/O devices. More...

+ Collaboration diagram for I/O Management:

Modules

 Camera Module
 The camera module is used to retrieve raw camera data, process the incoming frames, and emits the result as events.
 
 I2C interface
 Functions to read from and write on the I2C interface.
 
 Motor Control
 Functions to control the two stepper motors of the e-puck.
 
 Remote Control
 Functions to receive data from a remote control.
 
 UART 1&2
 Functions to control the message flow of the UART interface.
 

Files

file  io.c
 It defines functions to control the IO timer and to (un)register IO Handler.
 
file  io.h
 It declares functions to control the IO timer and to (un)register IO Handler.
 
file  io_clock.c
 It defines the system clock that provides a continuous time value (granulation of 1 ms).
 
file  io_clock.h
 It declares the system clock that provides a continuous time value (granulation of 1 ms).
 
file  io_HDI.c
 Hardware dependent implementations to control the IO timer and to (un)register IO Handler.
 
file  io_HDI.h
 Hardware dependent implementations to control the IO timer and to (un)register IO Handler.
 

Detailed Description

I/O Management controls the input (e.g. sensors or camera), output (e.g. motors), and communication (e.g. UART, CAN, Bluetooth, ...) devices. For robots, I/O devices are important to interact with its environment, which is the main purpose in robotics. Consequently, this module provides functions and mechanisms to use these I/O devices.

Author
Stefan M. Trenkwalder s.tre.nosp@m.nkwa.nosp@m.lder@.nosp@m.open.nosp@m.swarm.nosp@m..org

Introduction

The I/O Management is started by initialising & starting of the Kernel

I/O devices build the interface between environment and robot. In general, I/O devices can be divided into two sets:

Commonly used on robots, I/O devices might be a camera, motors, or gripper.

Usage

The I/O management is initialised with Sys_Init_IOManagement(), which initialises the System Timer (100us) and a list of I/O handlers that need to be executed periodically. After starting the timer with Sys_Start_IOManagement(void), it can be the stopped with Sys_Stop_IOManagement(void).

The I/O Timer can be manipulated as follows

New I/O devices can be added and removed during run-time by (un)registering with Sys_Register_IOHandler(pFunction func) and Sys_Unregister_IOHandler(pFunction func).

License

LICENSE: adapted FreeBSD License (see http://openswarm.org/license)
Copyright (c) 2015, Stefan M. Trenkwalder
All rights reserved.