mirror of https://github.com/rusefi/ChibiOS.git
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1313 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
ea7ffbbbc0
commit
1dd5442c8c
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
/*===========================================================================*/
|
||||
|
|
Loading…
Reference in New Issue