Skip to content

Commit

Permalink
prepeare for r0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
epernia committed Jul 23, 2017
1 parent 8ac39bd commit 1538fef
Show file tree
Hide file tree
Showing 5,250 changed files with 9,682 additions and 1,589,181 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file not shown.
Binary file not shown.
778 changes: 0 additions & 778 deletions Documentation/Material/sAPI_modules_an_dependencies.graphml

This file was deleted.

Binary file not shown.
28 changes: 0 additions & 28 deletions Documentation/design-rules.md

This file was deleted.

Binary file removed Documentation/sAPI_paper_case2017/capas.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Documentation/sAPI_paper_case2017/sAPI Library.doc
Binary file not shown.
Binary file removed Documentation/sAPI_paper_case2017/sAPI Library.pdf
Binary file not shown.
Binary file removed Documentation/sAPI_paper_case2017/sapi_layers2.png
Binary file not shown.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ certain peripheral.

Every module includes an example.

### Software layers

![ "sapi-modulos-capas.png" image not found](docs/assets/img/sapi-modulos-capas.png "Modules an layers of sAPI library")

### Boards

Now available for boards:
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -95,26 +95,6 @@ int main(void){
/* Inicializar la placa */
boardConfig();

/* Inicializar el conteo de Ticks con resolución de 1ms, sin tickHook */
tickConfig( 1, 0 );

/* Inicializar GPIOs */
gpioConfig( 0, GPIO_ENABLE );

/* Configuración de pines de entrada para Teclas de la CIAA-NXP */
gpioConfig( TEC1, GPIO_INPUT );
gpioConfig( TEC2, GPIO_INPUT );
gpioConfig( TEC3, GPIO_INPUT );
gpioConfig( TEC4, GPIO_INPUT );

/* Configuración de pines de salida para Leds de la CIAA-NXP */
gpioConfig( LEDR, GPIO_OUTPUT );
gpioConfig( LEDG, GPIO_OUTPUT );
gpioConfig( LEDB, GPIO_OUTPUT );
gpioConfig( LED1, GPIO_OUTPUT );
gpioConfig( LED2, GPIO_OUTPUT );
gpioConfig( LED3, GPIO_OUTPUT );

/* Inicializar UART_USB a 115200 baudios */
uartConfig( UART_USB, 115200 );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,76 +70,27 @@ static tick_t task3Counter = 0;

/*==================[internal functions definition]==========================*/

/* ---------------- INICIALIZACIONES ---------------- */

/* FUNCION que inicializa la placa, teclas y leds. */
static void boardAndIOConfig(void){

/* Inicializar la placa */
boardConfig();

/* Inicializar GPIOs */
gpioConfig( 0, GPIO_ENABLE );

/* Configuración de pines de entrada para Teclas de la CIAA-NXP */
gpioConfig( TEC1, GPIO_INPUT );
gpioConfig( TEC2, GPIO_INPUT );
gpioConfig( TEC3, GPIO_INPUT );
gpioConfig( TEC4, GPIO_INPUT );

/* Configuración de pines de salida para Leds de la CIAA-NXP */
gpioConfig( LEDR, GPIO_OUTPUT );
gpioConfig( LEDG, GPIO_OUTPUT );
gpioConfig( LEDB, GPIO_OUTPUT );
gpioConfig( LED1, GPIO_OUTPUT );
gpioConfig( LED2, GPIO_OUTPUT );
gpioConfig( LED3, GPIO_OUTPUT );

}

/* ------- TAREAS, PLANIFICADOR y DESPACHADOR ------- */

/* FUNCION que realiza la tarea 1.
Esta tarea lee una tecla cada 40ms y escribe su valor
en LEDB */
static void task1(void){

gpioWrite( LEDB, !gpioRead(TEC1) );

}

/* FUNCION que realiza la tarea 2.
Esta tarea hace destellar el LED2 (blink) cada
250ms. */
static void task2(void){

static bool_t led2Status = OFF;

if(led2Status){
led2Status = OFF;
}
else{
led2Status = ON;
}
gpioWrite( LED2, led2Status );

gpioToggle( LED2 );
}

/* FUNCION que realiza la tarea 3.
Esta tarea hace destellar el LED3 (blink) cada
500ms. */
static void task3(void){

static bool_t led3Status = OFF;

if(led3Status){
led3Status = OFF;
}
else{
led3Status = ON;
}
gpioWrite( LED3, led3Status );

gpioToggle( LED3 );
}

/* FUNCION que contiene el planificador y despachador de tareas. */
Expand Down Expand Up @@ -190,8 +141,8 @@ int main(void){

/* ------------- INICIALIZACIONES ------------- */

/* Inicializa la placa, teclas y leds. */
boardAndIOConfig();
/* Inicializar la placa */
boardConfig();

/* Inicializar el conteo de Ticks con resolucion de 1ms (se ejecuta
periódicamente una interrupcón cada 1ms que incrementa un contador de
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,11 @@ void seosDispatchTask(void){
/* Resetea el flag de ejecucion de la tarea */
task3RunFlag = 0;
}

}

/* FUNCION que inicializa la interrupcion que ejecuta
el planificador de tareas. */
void seosInterruptInit( tick_t tickRateMs ){

/* Inicializar el conteo de Ticks con resolucion de tickRateMs ms (se
ejecuta periódicamente una interrupcón cada tickRateMs ms que
incrementa un contador de Ticks obteniendose una base de tiempos).
Expand All @@ -150,7 +148,6 @@ void seosInterruptInit( tick_t tickRateMs ){
con cada interrupción de Tick, este nombre se refiere a una función
"enganchada" a una interrupción */
tickConfig( tickRateMs, seosScheduleTasks );

}

/*==================[end of file]============================================*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/* Copyright 2016, Eric Pernia.
* All rights reserved.
*
* This file is part sAPI library for microcontrollers.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

/* Date: 2016-08-16 */

/*==================[inclusions]=============================================*/

#include "tasks.h" /* <= own header */

#include "sapi.h" /* <= sAPI header */

/*==================[macros and definitions]=================================*/

/*==================[internal data declaration]==============================*/

/*==================[internal functions declaration]=========================*/

/*==================[internal data definition]===============================*/

/*==================[external data definition]===============================*/

/*==================[internal functions definition]==========================*/

/*==================[external functions definition]==========================*/

/* ------------ INICIALIZACION DE TAREAS ------------ */

/* FUNCION que inicializa las tareas. */
void tasksInit(void){
/* Inicializar la placa */
boardConfig();
}

/* --------------------- TAREAS --------------------- */

/* FUNCION que realiza la tarea 1.
Esta tarea lee una tecla cada 40ms y escribe su valor
en LEDG */
void task1(void){
gpioWrite( LEDG, !gpioRead(TEC1) );
}

/* FUNCION que realiza la tarea 2.
Esta tarea hace destellar el LED1 (blink) cada
250ms. */
void task2(void){
gpioToggle( LED1 );
}

/* FUNCION que realiza la tarea 3.
Esta tarea hace destellar el LED2 (blink) cada
500ms. */
void task3(void){
gpioToggle( LED2 );
}

/*==================[end of file]============================================*/
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,6 @@ int main(void){
/* Inicializar la placa */
boardConfig();

/* Inicializar GPIOs */
gpioConfig( 0, GPIO_ENABLE );

/* Configuración de pines de entrada para Teclas de la CIAA-NXP */
gpioConfig( TEC1, GPIO_INPUT );
gpioConfig( TEC2, GPIO_INPUT );
gpioConfig( TEC3, GPIO_INPUT );
gpioConfig( TEC4, GPIO_INPUT );

/* Configuración de pines de salida para Leds de la CIAA-NXP */
gpioConfig( LEDR, GPIO_OUTPUT );
gpioConfig( LEDG, GPIO_OUTPUT );
gpioConfig( LEDB, GPIO_OUTPUT );
gpioConfig( LED1, GPIO_OUTPUT );
gpioConfig( LED2, GPIO_OUTPUT );
gpioConfig( LED3, GPIO_OUTPUT );

gpioConfig( GPIO0, GPIO_INPUT );

gpioConfig( GPIO1, GPIO_OUTPUT );
Expand Down
86 changes: 86 additions & 0 deletions examples/sapi_edu-ciaa-nxp/gpio_02_blinky/src/blinky.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/* Copyright 2016, Eric Pernia.
* All rights reserved.
*
* This file is part sAPI library for microcontrollers.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/

/*
* Date: 2016-04-26
*/

/*==================[inclusions]=============================================*/

#include "blinky.h" /* <= own header */

#include "sapi.h" /* <= sAPI header */

/*==================[macros and definitions]=================================*/

/*==================[internal data declaration]==============================*/

/*==================[internal functions declaration]=========================*/

/*==================[internal data definition]===============================*/

/*==================[external data definition]===============================*/

/*==================[internal functions definition]==========================*/

/*==================[external functions definition]==========================*/

/* FUNCION PRINCIPAL, PUNTO DE ENTRADA AL PROGRAMA LUEGO DE RESET. */
int main(void){

/* ------------- INICIALIZACIONES ------------- */

/* Inicializar la placa */
boardConfig();

/* ------------- REPETIR POR SIEMPRE ------------- */
while(1) {

/* Prendo el led azul */
gpioWrite( LEDB, ON );

delay(500);

/* Apago el led azul */
gpioWrite( LEDB, OFF );

delay(500);

}

/* NO DEBE LLEGAR NUNCA AQUI, debido a que a este programa no es llamado
por ningun S.O. */
return 0 ;
}

/*==================[end of file]============================================*/
Loading

0 comments on commit 1538fef

Please sign in to comment.