*
*****************************************************************************/
+/* Default "fault" handlers, which catch the fault exceptions.
+ * These are defined as weak aliases of a dummy fault handler which enters an empty infinite
+ * loop and chould be overidden by user defined handlers.
+ */
+
#include "core/lpc_regs_12xx.h"
void fault_info(const char* name, uint32_t len) __attribute__ ((weak, alias ("Dummy_Fault_Handler")));
/* GPIOs */
/***************************************************************************** */
-/* Public access to Pins setup */
+/* Public access to Pins setup
+ * Refer to LPC1224 documentation (UM10441.pdf) for more information.
+ */
#include <stdint.h>
*
*************************************************************************** */
+/* ROM helpers are functions avalable for the user which do not use space in the
+ * internal reprogrammable flash.
+ * They are stored in the internal ROM memory and may be called using specific
+ * calls with defined parameters depending on the ROM call used.
+ * Refer to LPC1224 documentation (UM10441.pdf) for more information.
+ */
+
#include <stdint.h>
#include "core/system.h"
#include "core/lpc_core_cm0.h"
*
*************************************************************************** */
+/*
+ * This file holds some system wide initialisation functions and clock or sleep
+ * related functions.
+ */
+
#include <stdint.h>
#include "core/lpc_regs_12xx.h"
*************************************************************************** */
-
/***************************************************************************** */
/* System Tick Timer */
/***************************************************************************** */
+/* Driver for the internal systick timer of the LPC1224.
+ * Refer to the LPC1224 documentation (UM10441.pdf) for more information
+ */
+
#include <stdint.h>
#include "core/lpc_regs_12xx.h"
#include "core/lpc_core_cm0.h"
/* Analog to Digital Converter (ADC) */
/***************************************************************************** */
+/* ADC driver for the integrated ADC module of the LPC1224.
+ * Refer to LPC1224 documentation (UM10441.pdf) for more information.
+ */
+
#include <stdint.h>
#include "core/lpc_regs_12xx.h"
#include "core/lpc_core_cm0.h"
/* GPIOs and GPIO Interrupts */
/***************************************************************************** */
+/* Driver for GPIO configuration and access (including GPIO interrupts) on the LPC1224.
+ * Refer to LPC1224 documentation (UM10441.pdf) for more information.
+ */
#include <stdint.h>
/* I2C */
/**************************************************************************** */
+/* I2C driver for the I2C bus integrated module of the LPC1224.
+ * Refer to LPC1224 documentation (UM10441.pdf) for more information.
+ */
+
#include <stdint.h>
#include "core/lpc_regs_12xx.h"
/****************************************************************************
* drivers/rtc.c
*
- * Copyright 2012 Nathael Pajani <nathael.pajani@ed3l.fr>
+ * Copyright 2014 Nathael Pajani <nathael.pajani@ed3l.fr>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* RTC and RTC Interrupts */
/***************************************************************************** */
-
+/* The RTC is an integrated module of the LPC1224.
+ * Refer to LPC12xx documentation (UM10441.pdf) for more information
+ */
#include <stdint.h>
#include "core/lpc_regs_12xx.h"
/***************************************************************************** */
/* UARTs */
/***************************************************************************** */
+/* UART driver for the integrated UARTs of the LPC1224.
+ * Refer to LPC1224 documentation (UM10441.pdf) for more information.
+ */
+
/* Both UARTs are available, UART numbers are in the range 0 - 1 */
#include <stdint.h>
/* SSP */
/***************************************************************************** */
+/* SSP/SPI driver for the SSP bus integrated module of the LPC1224.
+ * Refer to LPC1224 documentation (UM10441.pdf) for more information.
+ */
+
#include <stdint.h>
#include "core/lpc_regs_12xx.h"
#include "core/lpc_core_cm0.h"
/* Timers */
/***************************************************************************** */
+/* Timers driver for the integrated timers of the LPC1224.
+ * The LPC1224 Has two 16bits timers and 2 32bits timers.
+ * Refer to LPC1224 documentation (UM10441.pdf) for more information.
+ */
+
#include <stdint.h>
#include "core/lpc_regs_12xx.h"
#include "core/lpc_core_cm0.h"
#include "drivers/gpio.h"
#include "extdrv/cc1101.h"
+/* Driver for the CC1101 Sub-1GHz RF transceiver from Texas Instrument.
+ * Refer to CC1101 documentation for more information (swrs061i.pdf)
+ */
+
/***************************************************************************** */
/* CC1101 */
/* Debug */
#include "lib/stdio.h"
+
+/* NCN5120 driver
+ * The NCN5120 chip is a KNX to serial transceiver made by On Semiconductor.
+ * Refer to the NCN5120 documentation or http://www.onsemi.com/ for more information.
+ */
+
+
static struct ncn5120_device ncn5120 = {
.serial_num = 1,
.current_state = NCN5120_STATE_NORMAL,
/****************************************************************************
* core/iap.h
*
- *
+ * Copyright 2015 Nathael Pajani <nathael.pajani@ed3l.fr>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* System Tick Timer */
/***************************************************************************** */
+/* Driver for the internal systick timer of the LPC1224.
+ * Refer to the LPC1224 documentation (UM10441.pdf) for more information
+ */
+
+
/* Start the system tick timer
* Starting the systick timer also resets the internal tick counters.
* If you need a value that goes beyond one start/stop cycle and accross resets,
*
*************************************************************************** */
+/* The user information block is persistant flash memory block which can be programmed
+ * and read by user code using IAP calls.
+ * It can provide the same functionnality as an EEPROM, though the reading access is
+ * much more simple.
+ * Writting to the user flash is slightly more complicated though, mainly because flash
+ * pages in the user information block are big 512 bytes blocks, much more than the
+ * usual small eeprom pages.
+ * One must erase a full page before modifying data in it, thus reading it first to RAM,
+ * modifying the RAM area, erasing the page, and then writting back.
+ * Reading/modify/write may be limited to the required size, but erase size will always
+ * be a full page.
+ */
+
+/* The user information block of the LPC1224 has three 512 bytes pages. */
+
+/* Actually, the only purpose of this code is to return the address of the begining
+ * of the user information block in flash, set by the linker from information in
+ * the liker script (lpc_link_lpc1224.ld).
+*/
+
#ifndef USER_INFORMATION_BLOCK_H
#define USER_INFORMATION_BLOCK_H
/* Analog to Digital Converter (ADC) */
/***************************************************************************** */
+/* ADC driver for the integrated ADC module of the LPC1224.
+ * Refer to LPC1224 documentation (UM10441.pdf) for more information.
+ */
+
enum adc_events {
/* CT32B0 */
ADC_CONV_ON_CT32B0_CAP0_RISING,
*
*************************************************************************** */
+/***************************************************************************** */
+/* GPIOs and GPIO Interrupts */
+/***************************************************************************** */
+
+/* Driver for GPIO configuration and access (including GPIO interrupts) on the LPC1224.
+ * Refer to LPC1224 documentation (UM10441.pdf) for more information.
+ */
+
#ifndef DRIVERS_GPIO_H
#define DRIVERS_GPIO_H
*
*************************************************************************** */
+/**************************************************************************** */
+/* I2C */
+/**************************************************************************** */
+
+/* I2C driver for the I2C bus integrated module of the LPC1224.
+ * Refer to LPC1224 documentation (UM10441.pdf) for more information.
+ */
+
#ifndef DRIVERS_I2C_H
#define DRIVERS_I2C_H
/****************************************************************************
* drivers/rtc.h
*
- * Copyright 2012 Nathael Pajani <nathael.pajani@ed3l.fr>
+ * Copyright 2014 Nathael Pajani <nathael.pajani@ed3l.fr>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* RTC and RTC Interrupts */
/***************************************************************************** */
+/* The RTC is an integrated module of the LPC1224.
+ * Refer to LPC12xx documentation (UM10441.pdf) for more information
+ */
+
#include <stdint.h>
*
*************************************************************************** */
+/***************************************************************************** */
+/* UARTs */
+/***************************************************************************** */
+/* UART driver for the integrated UARTs of the LPC1224.
+ * Refer to LPC1224 documentation (UM10441.pdf) for more information.
+ */
+
+/* Both UARTs are available, UART numbers are in the range 0 - 1 */
+
#ifndef DRIVERS_SERIAL_H
#define DRIVERS_SERIAL_H
/* SSP */
/***************************************************************************** */
+/* SSP/SPI driver for the SSP bus integrated module of the LPC1224.
+ * Refer to LPC1224 documentation (UM10441.pdf) for more information.
+ */
+
#include <stdint.h>
/***************************************************************************** */
/* Timers */
/***************************************************************************** */
-/* Four timers are available, Two 16 bits and two 32 bits
+/* Timers driver for the integrated timers of the LPC1224.
+ * Four timers are available, Two 16 bits and two 32 bits
* All timers have 4 channels though 32 bits timers have all 4 channels available
* on capture /match pins while 16bits ones have only two (channels 0 and 1).
+ * Refer to LPC1224 documentation (UM10441.pdf) for more information.
*/
#define NUM_TIMERS 4
#define NUM_CHANS 4
-/**
+/****************************************************************************
+ * extdrv/cc1101.h
+ *
+ * CC1101 Low-Power Sub-1 GHz RF Transceiver.
+ *
+ * Copyright 2013 Nathael Pajani <nathael.pajani@ed3l.fr>
+ */
+
+
+/*
* @author Athanassios Mavrogeorgiadis
- * @author TI CC1101 library developed by Athanassios Mavrogeorgiadis (tmav Electronics) as template based on TI C8051 SOURCE CODE swrc021f
+ * @author TI CC1101 library developed by Athanassios Mavrogeorgiadis (tmav Electronics)
+ * as template based on TI C8051 SOURCE CODE swrc021f
+ *
* @section LICENSE
*
* Copyright (c) 2010 ARM Limited
*
*************************************************************************** */
+/* This file holds the interface to the code used to handle LCD character displays that are
+ * compatible with the Hitachi HD44780 driver.
+ * There are many of them out there, and you can usually tell them by the 16-pin interface.
+ *
+ * Driver inspired by Arduino LiquidCrystal library code submited by
+ * David A. Mellis, Limor Fried (http://www.ladyada.net) and Tom Igoe.
+ *
+ * Refer to HD44780U documentation from Hitachi for more information.
+ */
+
#ifndef EXTDRV_LCD_CHAR_H
#define EXTDRV_LCD_CHAR_H
*
*************************************************************************** */
+/* NCN5120 driver
+ * The NCN5120 chip is a KNX to serial transceiver made by On Semiconductor.
+ * Refer to the NCN5120 documentation or http://www.onsemi.com/ for more information.
+ */
#ifndef EXTDRV_NCN5120_H
#define EXTDRV_NCN5120_H
/***************************************************************************** */
/* Status LED */
+/* The status led is a bicolor led found on all Techno-Innov modules.
+ * It could be any two leds found on your module if you are not using one of Techno-Innov's modules.
+ */
/* Configure the status led, giving the red and green pio structure */
void status_led_config(const struct pio* green, const struct pio* red);