Fixes for STM32 ADC driver on the F4; LC17xx LED initial state

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4257 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2012-01-03 23:25:49 +00:00
parent 89af1d642b
commit ef4a60ab9e
4 changed files with 19 additions and 4 deletions

View File

@ -127,10 +127,13 @@
* -------------------------------- ---- --------------
* P1[25]/MC1A/MAT1[1] 39 LED1
* P0[4]/I2SRX_CLK/RD2/CAP2[0] 81 LED2/ACC IRQ
*
* LEDs are connected to +3.3V through a diode on one side and must be pulled
* low (through a resistor) on the LPC17xx side in order to illuminuate them.
*/
#define LPC1766STK_LED1 (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT1 | GPIO_PIN25)
#define LPC1766STK_LED2 (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT0 | GPIO_PIN4)
#define LPC1766STK_LED1 (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT1 | GPIO_PIN25)
#define LPC1766STK_LED2 (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT0 | GPIO_PIN4)
/* Buttons GPIO PIN SIGNAL NAME
* -------------------------------- ---- --------------

View File

@ -603,7 +603,9 @@ Where <subdir> is one of the following:
CONFIG_ADC=y : Enable the generic ADC infrastructure
CONFIG_STM32_ADC3=y : Enable ADC3
CONFIG_STM32_TIM1=y : Enable Timer 1
CONFIG_STM32_TIM1_ADC3=y : Assign timer 1 to driver ADC3 sampling
CONFIG_STM32_ADC3_SAMPLE_FREQUENCY=100 : Select a sampling frequency
See also apps/examples/README.txt

View File

@ -40,6 +40,7 @@
#include <nuttx/config.h>
#include <errno.h>
#include <debug.h>
#include <nuttx/analog/adc.h>
@ -136,7 +137,7 @@ int adc_devinit(void)
/* Call stm32_adcinitialize() to get an instance of the ADC interface */
adc = stm32_adcinitialize(1, g_chanlist, ADC3_NCHANNELS);
adc = stm32_adcinitialize(3, g_chanlist, ADC3_NCHANNELS);
if (adc == NULL)
{
adbg("ERROR: Failed to get ADC interface\n");

View File

@ -329,7 +329,6 @@ PIC32MX Configuration Options
CONFIG_PIC32MX_USBDEV - USB device
CONFIG_PIC32MX_USBHOST - USB host
PIC32MX Configuration Settings
DEVCFG0:
CONFIG_PIC32MX_DEBUGGER - Background Debugger Enable. Default 3 (disabled). The
@ -431,3 +430,13 @@ Where <subdir> is one of the following:
ostest:
This configuration directory, performs a simple OS test using
apps/examples/ostest.
nsh:
Configures the NuttShell (nsh) located at apps/examples/nsh. The
Configuration enables only the serial NSH interface.
The examples/usbterm program can be included as an NSH built-in
function by defined the following in your .config file:
CONFIG_USBEV=y : Enable basic USB device support
CONFIG_PIC32MX_USBDEV=y : Enable PIC32 USB device support