Llosa de Viango Tollos – tollosLED.c



Getting started



  Tollos libraries

  Device libraries





  Sample application


tollosLED.c – on-board LEDs

This is a special case of tollosBit for simplified access to on-board LEDs (if any). If any are available they should normally be numbered 1, 2, 3, 4, etc. If only one LED is defined then it is recommended that it should be available as LED 1 even if also available as other indices (e.g., 0).
 ledQuery   query the state of a LED
 ledSet   effect an action on a LED

ledQuery – query the state of a LED

int ledQuery(int num);

num – number of the LED (board-defined)

returns the state of the LED (0=Off or 1=On), or −1 if num is not valid

ledSet – effect an action on a LED

int ledSet(int num, uint action);

num – number of the LED (board-defined)

action – one of LED_ON, _OFF, _INVERT, _QUERY

returns the previous value of the LED (0=Off or 1=Off), or −1 if num or action is invalid

Tollos and these web pages were written by Mike Cowlishaw; Please send me any corrections, suggestions, etc.
All content © Mike Cowlishaw, 2010–2012, except where marked otherwise. All rights reserved. The pages here are for non-commercial use only (see the separate licence for Tollos source code). Privacy policy: the Speleotrove website records no personal information and sets no ‘cookies’. However, statistics, etc. might be recorded by the web hosting service.

This page was last updated on 2010-12-01 by c2wiki.