soft/lpc122x/core
2 years agoCLKOUT support and test
Nathael Pajani [Mon, 21 Apr 2014 21:20:51 +0000 (23:20 +0200)]
CLKOUT support and test

2 years agoSome cleanup
Nathael Pajani [Mon, 21 Apr 2014 19:33:27 +0000 (21:33 +0200)]
Some cleanup

2 years agoUtility functions.
Nathael Pajani [Mon, 21 Apr 2014 19:30:06 +0000 (21:30 +0200)]
Utility functions.

2 years agoFix : call the ADC pin configuration ! Comments added, unused headers removed.
Nathael Pajani [Mon, 21 Apr 2014 11:32:53 +0000 (13:32 +0200)]
Fix : call the ADC pin configuration ! Comments added, unused headers removed.

2 years agoComments and typo
Nathael Pajani [Thu, 17 Apr 2014 21:57:12 +0000 (23:57 +0200)]
Comments and typo

2 years agoVery big commit for a big rewrite of the pins configuration process, making it easier...
Nathael Pajani [Thu, 17 Apr 2014 21:56:33 +0000 (23:56 +0200)]
Very big commit for a big rewrite of the pins configuration process, making it easier to select pins functions and configure the code according to the hardware. Some parts still have to be improved (dependent on pins being on port 0). At least the code compiles and runs on the target, and the parts I tested run fine.

2 years agoUse a dummy fault handler in core and move the "user defined" one to main.c
Nathael Pajani [Thu, 17 Apr 2014 09:19:26 +0000 (11:19 +0200)]
Use a dummy fault handler in core and move the "user defined" one to main.c

2 years agoThere are more than the division routines in ROM. Prepare for inclusion of the other...
Nathael Pajani [Thu, 17 Apr 2014 09:13:07 +0000 (11:13 +0200)]
There are more than the division routines in ROM. Prepare for inclusion of the other ones.

2 years agoSystick code review and fix of systick timer frequency.
Nathael Pajani [Thu, 17 Apr 2014 08:59:27 +0000 (10:59 +0200)]
Systick code review and fix of systick timer frequency.

2 years agoBit 14 is used in LPC12xx.
Nathael Pajani [Fri, 14 Mar 2014 09:20:20 +0000 (10:20 +0100)]
Bit 14 is used in LPC12xx.

2 years agoUsing concatenation in macro is confusing as it does not work with variables. Use...
Nathael Pajani [Mon, 3 Mar 2014 21:58:31 +0000 (22:58 +0100)]
Using concatenation in macro is confusing as it does not work with variables. Use a function instead. Adds some code, but not much. LPC_IO_FUNC_ALT() macro is still here for those who need small code.

2 years agoAdd RX callback for UARTs. (To be tested)
Nathael Pajani [Mon, 3 Mar 2014 21:06:45 +0000 (22:06 +0100)]
Add RX callback for UARTs. (To be tested)

2 years agoAdd an easy way to select the GPIO Function on a pin.
Nathael Pajani [Mon, 3 Mar 2014 21:01:32 +0000 (22:01 +0100)]
Add an easy way to select the GPIO Function on a pin.

2 years agoSPI and eeprom chip select fixes.
Nathael Pajani [Thu, 23 Jan 2014 10:22:27 +0000 (11:22 +0100)]
SPI and eeprom chip select fixes.

2 years agoSystem tick callback : the basics of OS implementation :)
Nathael Pajani [Sat, 4 Jan 2014 12:52:13 +0000 (13:52 +0100)]
System tick callback : the basics of OS implementation :)

2 years agoAdd comments
Nathael Pajani [Sat, 4 Jan 2014 12:50:42 +0000 (13:50 +0100)]
Add comments

2 years agoMake timer a parameter of the RGB led test function Remove RGB Led related code from...
Nathael Pajani [Sat, 4 Jan 2014 12:28:41 +0000 (13:28 +0100)]
Make timer a parameter of the RGB led test function Remove RGB Led related code from serial interrupt handler code, to be replaced by some callback mechanism.

2 years agoChange and use defines for ADC channels selection
Nathael Pajani [Sat, 4 Jan 2014 11:05:17 +0000 (12:05 +0100)]
Change and use defines for ADC channels selection

2 years agoUpdated readme
Nathael Pajani [Sun, 29 Dec 2013 21:21:59 +0000 (22:21 +0100)]
Updated readme

2 years agoGPIO interrupts configuration and handling.
Nathael Pajani [Sun, 29 Dec 2013 21:15:33 +0000 (22:15 +0100)]
GPIO interrupts configuration and handling.

2 years agoDo not change data dir for other pins !
Nathael Pajani [Sun, 29 Dec 2013 21:14:18 +0000 (22:14 +0100)]
Do not change data dir for other pins !

2 years agoComment and code for those with a LQFP64 or LQFP100 package.
Nathael Pajani [Sun, 29 Dec 2013 21:13:44 +0000 (22:13 +0100)]
Comment and code for those with a LQFP64 or LQFP100 package.

2 years agoMake use of config_gpio() function in all drivers. Remove unuseful calls to io_config...
Nathael Pajani [Sun, 29 Dec 2013 01:50:45 +0000 (02:50 +0100)]
Make use of config_gpio() function in all drivers. Remove unuseful calls to io_config_clk_*() functions.

2 years agoSPI code rewrite due to difficulties in handling slave select with previous code...
Nathael Pajani [Sun, 29 Dec 2013 01:15:36 +0000 (02:15 +0100)]
SPI code rewrite due to difficulties in handling slave select with previous code when acting as SPI  Partially tested only.

2 years agoImproved comments on error codes.
Nathael Pajani [Sun, 29 Dec 2013 00:35:03 +0000 (01:35 +0100)]
Improved comments on error codes.

2 years agoForgotten include gards
Nathael Pajani [Sun, 29 Dec 2013 00:34:14 +0000 (01:34 +0100)]
Forgotten include gards

2 years agoExport spi_transfer_single_frame() to "user" (code) space
Nathael Pajani [Fri, 13 Dec 2013 10:18:58 +0000 (11:18 +0100)]
Export spi_transfer_single_frame() to "user" (code) space

2 years agoAdding timer mode to timer support Some modification of the timer functions.
Nathael Pajani [Fri, 13 Dec 2013 10:18:06 +0000 (11:18 +0100)]
Adding timer mode to timer support Some modification of the timer functions.

2 years agoSystem tick support Used to implement precise sleeping functions. Adds msleep and...
Nathael Pajani [Fri, 13 Dec 2013 10:16:15 +0000 (11:16 +0100)]
System tick support Used to implement precise sleeping functions. Adds msleep and usleep functions

2 years agoFix some define names
Nathael Pajani [Fri, 13 Dec 2013 10:12:37 +0000 (11:12 +0100)]
Fix some define names

2 years agoFix : it's the port numbers, not the pin numbers.
Nathael Pajani [Tue, 19 Nov 2013 13:25:21 +0000 (14:25 +0100)]
Fix : it's the port numbers, not the pin numbers.

2 years agoMoved the eeprom select used when SPI driver is not present to the eeprom code.
Nathael Pajani [Wed, 13 Nov 2013 15:17:57 +0000 (16:17 +0100)]
Moved the eeprom select used when SPI driver is not present to the eeprom code.

2 years agoAdd SPI support
Nathael Pajani [Wed, 13 Nov 2013 15:17:07 +0000 (16:17 +0100)]
Add SPI support

2 years agoSimple PWM test : RGB Led The color changes according to the data received on serial...
Nathael Pajani [Thu, 7 Nov 2013 02:06:06 +0000 (03:06 +0100)]
Simple PWM test : RGB Led The color changes according to the data received on serial line Note that 0.0.0 is white while black is at 200.200.200

2 years agoAdd support for timers / PWM /Counter Most has not been tested yet.
Nathael Pajani [Thu, 7 Nov 2013 02:02:09 +0000 (03:02 +0100)]
Add support for timers / PWM /Counter Most has not been tested yet.

2 years agoUse config_gpio() to configure GPIO pins.
Nathael Pajani [Thu, 7 Nov 2013 01:03:34 +0000 (02:03 +0100)]
Use config_gpio() to configure GPIO pins.

2 years agoReplace EEPROM_WRITE switch by compile-time define from Makefile.
Nathael Pajani [Thu, 7 Nov 2013 00:47:35 +0000 (01:47 +0100)]
Replace EEPROM_WRITE switch by compile-time define from Makefile.

2 years agoChange to config_gpio function Use port number and pin number as args and get the...
Nathael Pajani [Thu, 7 Nov 2013 00:30:55 +0000 (01:30 +0100)]
Change to config_gpio function Use port number and pin number as args and get the right pointer from corresponding table.

2 years agoPerform config of all pins as GPIO first, then call config functions for pins used...
Nathael Pajani [Wed, 6 Nov 2013 17:41:38 +0000 (18:41 +0100)]
Perform config of all pins as GPIO first, then call config functions for pins used for special functions.

2 years agoAdd ADC support
Nathael Pajani [Wed, 6 Nov 2013 01:05:55 +0000 (02:05 +0100)]
Add ADC support

2 years agoAdd and use io_config_clk_on/off functions.
Nathael Pajani [Wed, 6 Nov 2013 01:03:10 +0000 (02:03 +0100)]
Add and use io_config_clk_on/off functions.

2 years ago"FIXME" is in capital letters.
Nathael Pajani [Wed, 6 Nov 2013 00:54:28 +0000 (01:54 +0100)]
"FIXME" is in capital letters.

2 years agoFix : GPIO is alternate function 6 for those pins (function 0 is debug)
Nathael Pajani [Wed, 6 Nov 2013 00:50:42 +0000 (01:50 +0100)]
Fix : GPIO is alternate function 6 for those pins (function 0 is debug)

2 years agoAdded PIO0_15 as GPIO for easy I2C access. Must be fixed when SPI support is added.
Nathael Pajani [Wed, 6 Nov 2013 00:49:53 +0000 (01:49 +0100)]
Added PIO0_15 as GPIO for easy I2C access. Must be fixed when SPI support is added.

2 years agoImproved README Updated with current lpcprog command line Added supported features
Nathael Pajani [Wed, 6 Nov 2013 00:36:51 +0000 (01:36 +0100)]
Improved README Updated with current lpcprog command line Added supported features

2 years agoChange the name, as the struct is not global, it holds our private information instead !
Nathael Pajani [Wed, 6 Nov 2013 00:34:47 +0000 (01:34 +0100)]
Change the name, as the struct is not global, it holds our private information instead !

2 years agoOups ...
Nathael Pajani [Wed, 6 Nov 2013 00:32:49 +0000 (01:32 +0100)]
Oups ...

2 years agoremove space at end of line
Nathael Pajani [Wed, 6 Nov 2013 00:32:24 +0000 (01:32 +0100)]
remove space at end of line

2 years agoTemp conversion was simpler, but not right for negativ values ... fixed
Nathael Pajani [Mon, 12 Aug 2013 19:49:10 +0000 (21:49 +0200)]
Temp conversion was simpler, but not right for negativ values ... fixed

2 years agoimplement subsystem_power() instead of a specific function in each subsystem
Nathael Pajani [Mon, 22 Jul 2013 23:29:36 +0000 (01:29 +0200)]
implement subsystem_power() instead of a specific function in each subsystem

2 years agomake temp conversion to decimal much more simple !
Nathael Pajani [Mon, 22 Jul 2013 15:22:01 +0000 (17:22 +0200)]
make temp conversion to decimal much more simple !

2 years agoBetter msleep function and adding usleep one.
Nathael Pajani [Sat, 15 Jun 2013 01:02:28 +0000 (03:02 +0200)]
Better msleep function and adding usleep one.

2 years agoUsing #define to define the pin numbers used for bicolor led.
Nathael Pajani [Sat, 15 Jun 2013 00:54:11 +0000 (02:54 +0200)]
Using #define to define the pin numbers used for bicolor led.

2 years agoAdd support for different modes and possible config of each uart in a different one.
Nathael Pajani [Sat, 15 Jun 2013 00:48:13 +0000 (02:48 +0200)]
Add support for different modes and possible config of each uart in a different one.

2 years agoChanged the readme file to reflect actual state of the development.
Nathael Pajani [Thu, 14 Mar 2013 00:53:17 +0000 (01:53 +0100)]
Changed the readme file to reflect actual state of the development.

2 years agoTMP101 temperature sensor support
Nathael Pajani [Wed, 13 Mar 2013 15:34:55 +0000 (16:34 +0100)]
TMP101 temperature sensor support

2 years agoAdding Byte swap instructions support.
Nathael Pajani [Wed, 13 Mar 2013 15:27:08 +0000 (16:27 +0100)]
Adding Byte swap instructions support.

2 years agoAdding ENODEV define
Nathael Pajani [Wed, 13 Mar 2013 15:26:44 +0000 (16:26 +0100)]
Adding ENODEV define

2 years agoAdding I2C_READ_BIT define
Nathael Pajani [Wed, 13 Mar 2013 15:26:26 +0000 (16:26 +0100)]
Adding I2C_READ_BIT define

2 years agoRe-init of read index in i2c structure in case i2c_read is called with only write...
Nathael Pajani [Wed, 13 Mar 2013 15:25:58 +0000 (16:25 +0100)]
Re-init of read index in i2c structure in case i2c_read is called with only write operations Comments and indentation

2 years agoOups, should have read every part of the documentation...
Nathael Pajani [Tue, 12 Mar 2013 21:18:09 +0000 (22:18 +0100)]
Oups, should have read every part of the documentation...

2 years agoUse an internal copy buffer, worst in terms of performances, but easier to use, preve...
Nathael Pajani [Tue, 12 Mar 2013 15:15:20 +0000 (16:15 +0100)]
Use an internal copy buffer, worst in terms of performances, but easier to use, prevents overwriting the buffer when it is declared locally in a function.

2 years agoFix of sync lock emulation for cortex-m0
Nathael Pajani [Mon, 11 Mar 2013 17:16:02 +0000 (18:16 +0100)]
Fix of sync lock emulation for cortex-m0

2 years agoDeclare sending buffer as constant.
Nathael Pajani [Mon, 11 Mar 2013 17:13:15 +0000 (18:13 +0100)]
Declare sending buffer as constant.

2 years agoRemove debug code replacing serial_write()
Nathael Pajani [Mon, 11 Mar 2013 16:57:41 +0000 (17:57 +0100)]
Remove debug code replacing serial_write()

2 years agoUse serial_write()
Nathael Pajani [Mon, 11 Mar 2013 16:56:20 +0000 (17:56 +0100)]
Use serial_write()

2 years agocomment fixed.
Nathael Pajani [Mon, 11 Mar 2013 16:30:33 +0000 (17:30 +0100)]
comment fixed.

2 years agoAdding module ID description header definition.
Nathael Pajani [Mon, 11 Mar 2013 16:26:37 +0000 (17:26 +0100)]
Adding module ID description header definition.

2 years agoMoving EEPROM_TYPE to an enum in i2c.h and rewrite of get_eeprom_type()
Nathael Pajani [Mon, 11 Mar 2013 16:26:05 +0000 (17:26 +0100)]
Moving EEPROM_TYPE to an enum in i2c.h and rewrite of get_eeprom_type()

2 years agoAdded comment for future FIXME
Nathael Pajani [Mon, 11 Mar 2013 16:22:37 +0000 (17:22 +0100)]
Added comment for future FIXME

2 years agoUse the defined flags instead of hardcoded values
Nathael Pajani [Mon, 11 Mar 2013 16:22:10 +0000 (17:22 +0100)]
Use the defined flags instead of hardcoded values

2 years agoRemoved locking : unusefull, badly implemented, and blocking I2C.
Nathael Pajani [Mon, 11 Mar 2013 16:21:37 +0000 (17:21 +0100)]
Removed locking : unusefull, badly implemented, and blocking I2C.

2 years agoOups, wrong name for I2C Handler
Nathael Pajani [Mon, 11 Mar 2013 16:16:49 +0000 (17:16 +0100)]
Oups, wrong name for I2C Handler

2 years agoThese are not only for I2C
Nathael Pajani [Mon, 11 Mar 2013 16:15:46 +0000 (17:15 +0100)]
These are not only for I2C

2 years agoCompilation OK
Nathael Pajani [Fri, 8 Mar 2013 08:08:23 +0000 (09:08 +0100)]
Compilation OK

2 years agofew modifications
nathael Pajani [Thu, 7 Mar 2013 23:48:06 +0000 (00:48 +0100)]
few modifications

2 years agocopy from dtplug code
Nathael Pajani [Thu, 7 Mar 2013 22:58:25 +0000 (23:58 +0100)]
copy from dtplug code

2 years agoeeprom support development ongoing
Nathael Pajani [Thu, 7 Mar 2013 11:00:49 +0000 (12:00 +0100)]
eeprom support development ongoing

2 years agoAdded comment
Nathael Pajani [Thu, 7 Mar 2013 11:00:21 +0000 (12:00 +0100)]
Added comment

2 years agoAdding GPLv3 licence text and Readme file.
Nathael Pajani [Thu, 7 Mar 2013 03:42:09 +0000 (04:42 +0100)]
Adding GPLv3 licence text and Readme file.

2 years agoInitial commit of code for GPIO demo / development module
Nathael Pajani [Thu, 7 Mar 2013 02:53:50 +0000 (03:53 +0100)]
Initial commit of code for GPIO demo / development module