git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1313 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2009-11-17 22:09:04 +00:00
parent ea7ffbbbc0
commit 1dd5442c8c
5 changed files with 13 additions and 8 deletions

View File

@ -66,7 +66,7 @@ uint8_t fbuff[1024];
/*
* Red LEDs blinker thread, times are in milliseconds.
*/
static WORKING_AREA(waThread1, 512);
static WORKING_AREA(waThread1, 128);
static msg_t Thread1(void *arg) {
(void)arg;

View File

@ -83,6 +83,9 @@
* IO pins assignments.
*/
#define GPIOA_BUTTON 0
#define GPIOA_SPI1NSS 4
#define GPIOB_SPI2NSS 12
#define GPIOC_MMCWP 6
#define GPIOC_MMCCP 7

View File

@ -28,7 +28,7 @@
/*
* Red LEDs blinker thread, times are in milliseconds.
*/
static WORKING_AREA(waThread1, 512);
static WORKING_AREA(waThread1, 128);
static msg_t Thread1(void *arg) {
(void)arg;

View File

@ -51,7 +51,7 @@ CH_IRQ_HANDLER(Vector6C) {
CH_IRQ_PROLOGUE();
if ((DMA1->ISR & DMA_ISR_TEIF1) != 0)
chEvtBroadcastI(&ADCD1.ad_dmaerror);
STM32_ADC1_DMA_ERROR_HOOK();
else {
/* */
}
@ -76,7 +76,6 @@ void adc_lld_init(void) {
ADCD1.ad_adc = ADC1;
ADCD1.ad_dma = DMA1_Channel1;
ADCD1.ad_dmaprio = STM32_ADC1_DMA_PRIORITY << 12;
chEvtInit(&ADCD1.ad_dmaerror);
#endif
}

View File

@ -61,6 +61,13 @@
#define STM32_ADC1_IRQ_PRIORITY 0x70
#endif
/**
* @brief ADC1 DMA error hook.
*/
#if !defined(STM32_ADC1_DMA_ERROR_HOOK) || defined(__DOXYGEN__)
#define STM32_ADC1_DMA_ERROR_HOOK() chSysHalt()
#endif
/*===========================================================================*/
/* Driver constants. */
/*===========================================================================*/
@ -177,10 +184,6 @@ typedef struct {
* @brief DMA priority bit mask.
*/
uint32_t ad_dmaprio;
/**
* @brief DMA error event.
*/
EventSource ad_dmaerror;
} ADCDriver;
/*===========================================================================*/