Easylab board and new dsPIC ERIKA Enterprise Driver API

From ErikaWiki

(Difference between revisions)
Jump to: navigation, search
(Board LEDs)
(Board LEDs)
Line 72: Line 72:
* ''void EE_led1_toggle(void); (x=1,...,8)''
* ''void EE_led1_toggle(void); (x=1,...,8)''
*: Description: Toggle the LED'''x''' present on the board (x=1,...,8).
*: Description: Toggle the LED'''x''' present on the board (x=1,...,8).
 +
 +
== '''Digital Pin I/O''' ===
 +
 +
The same pins connected to board LEDS can be used how general ''Digital Pin I/O''. These pins are exported on board connectors.
 +
 +
For their use on the board the developer have to specify the '''USE_DIO''' attribute as '''TRUE''', as in the following example (same ''OIL'' configuration of the '''DIO'''):
 +
 +
<pre>
 +
...
 +
BOARD_DATA = EE_EASYLAB {
 +
  USEDIO = TRUE;
 +
  ...
 +
}
 +
...
 +
</pre>
 +
 +
The ''API'' than uses the digital pins I/O (DIO) are the follow:

Revision as of 13:39, 31 January 2012

Contents

Introduction

During the development of Erika support for easylab some new API have created and other ones have been updated. Follow an overview of these changes, but to be sure that the information of this page are updated double check the code.

Easylab Board API

The EasyLab board is fully supported by Erika Rtos. This chapter describes the API support done in Erika Enterprise for the Evidence EasyLab Board. To configure the usage of the EasyLab Board, the user has to specify an appropriate BOARD_DATA in OIL file , as in the following example:

...
BOARD_DATA = EE_EASYLAB {
...
}
...

this OIL element enable the inclusion of pkg/board/ee_easylab/inc/ee_board.h as board header.


System LED

The Microstic Guest board has a system LED attached to a GPIO pin of the microcontroller. To use the system LED, the developer should specify the USELEDS attribute as TRUE, as in the following example:

...
BOARD_DATA = EE_EASYLAB {
  USELEDS = TRUE;
  ...
}
...

The following paragraphs will describe the functions available to control the easyLab System LED.

  • void EE_sys_led_init(void);
    Description: Initialize the system LED (the one on microstick). The LED starts turned off.
  • void EE_sys_led_on(void);
    Description: The function turns on the system LED (the one on microstick).
  • void EE_led_sys_off(void);
    Description: The function turns off the system LED (the one on microstick).

Board LEDs

The EasyLab includes 8 red LEDs. To use the board LEDs the developer have to specify the USELEDS attribute as TRUE, as in the following example (same OIL configuration of the System LED):

...
BOARD_DATA = EE_EASYLAB {
  USELEDS = TRUE;
  ...
}
...

The API for board LEDS control are the follow:

  • void EE_leds_init(void);
    Description: Initialize all LEDS present on the board. The LEDs starts turned off.
  • void EE_leds_enable(void);
    Description: Turn on all the LEDs present on the board (system LED too).
  • void EE_leds_disable(void);
    Description: Turn off all the LEDs present on the board (system LED too).
  • void EE_ledx_init(void); (x=1,...,8)
    Description: Initialize the LEDx present on the board (x=1,...,8). The LED starts turned off.
  • void EE_ledx_on(void); (x=1,...,8)
    Description: Turn on the LEDx present on the board (x=1,...,8).
  • void EE_led1_off(void); (x=1,...,8)
    Description: Turn off the LEDx present on the board (x=1,...,8).
  • void EE_led1_toggle(void); (x=1,...,8)
    Description: Toggle the LEDx present on the board (x=1,...,8).

Digital Pin I/O =

The same pins connected to board LEDS can be used how general Digital Pin I/O. These pins are exported on board connectors.

For their use on the board the developer have to specify the USE_DIO attribute as TRUE, as in the following example (same OIL configuration of the DIO):

...
BOARD_DATA = EE_EASYLAB {
  USEDIO = TRUE;
  ...
}
...

The API than uses the digital pins I/O (DIO) are the follow:

Personal tools