git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4246 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
90969496d3
commit
ac2e9f7ffc
|
@ -172,6 +172,7 @@ typedef void (*adccallback_t)(ADCDriver *adcp, adcsample_t *buffer, size_t n);
|
||||||
*
|
*
|
||||||
* @param[in] adcp pointer to the @p ADCDriver object triggering the
|
* @param[in] adcp pointer to the @p ADCDriver object triggering the
|
||||||
* callback
|
* callback
|
||||||
|
* @param[in] err ADC error code
|
||||||
*/
|
*/
|
||||||
typedef void (*adcerrorcallback_t)(ADCDriver *adcp, adcerror_t err);
|
typedef void (*adcerrorcallback_t)(ADCDriver *adcp, adcerror_t err);
|
||||||
|
|
||||||
|
|
|
@ -329,6 +329,7 @@ typedef void (*adccallback_t)(ADCDriver *adcp, adcsample_t *buffer, size_t n);
|
||||||
*
|
*
|
||||||
* @param[in] adcp pointer to the @p ADCDriver object triggering the
|
* @param[in] adcp pointer to the @p ADCDriver object triggering the
|
||||||
* callback
|
* callback
|
||||||
|
* @param[in] err ADC error code
|
||||||
*/
|
*/
|
||||||
typedef void (*adcerrorcallback_t)(ADCDriver *adcp, adcerror_t err);
|
typedef void (*adcerrorcallback_t)(ADCDriver *adcp, adcerror_t err);
|
||||||
|
|
||||||
|
|
|
@ -329,6 +329,7 @@ typedef void (*adccallback_t)(ADCDriver *adcp, adcsample_t *buffer, size_t n);
|
||||||
*
|
*
|
||||||
* @param[in] adcp pointer to the @p ADCDriver object triggering the
|
* @param[in] adcp pointer to the @p ADCDriver object triggering the
|
||||||
* callback
|
* callback
|
||||||
|
* @param[in] err ADC error code
|
||||||
*/
|
*/
|
||||||
typedef void (*adcerrorcallback_t)(ADCDriver *adcp, adcerror_t err);
|
typedef void (*adcerrorcallback_t)(ADCDriver *adcp, adcerror_t err);
|
||||||
|
|
||||||
|
|
|
@ -160,6 +160,21 @@
|
||||||
#error "ADC driver activated but no ADC peripheral assigned"
|
#error "ADC driver activated but no ADC peripheral assigned"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if STM32_ADC_USE_ADC1 && \
|
||||||
|
!CORTEX_IS_VALID_KERNEL_PRIORITY(STM32_ADC_IRQ_PRIORITY)
|
||||||
|
#error "Invalid IRQ priority assigned to ADC1"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if STM32_ADC_USE_ADC1 && \
|
||||||
|
!CORTEX_IS_VALID_KERNEL_PRIORITY(STM32_ADC_ADC1_DMA_IRQ_PRIORITY)
|
||||||
|
#error "Invalid IRQ priority assigned to ADC1 DMA"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if STM32_ADC_USE_ADC1 && \
|
||||||
|
!STM32_DMA_IS_VALID_PRIORITY(STM32_ADC_ADC1_DMA_PRIORITY)
|
||||||
|
#error "Invalid DMA priority assigned to ADC1"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(STM32_DMA_REQUIRED)
|
#if !defined(STM32_DMA_REQUIRED)
|
||||||
#define STM32_DMA_REQUIRED
|
#define STM32_DMA_REQUIRED
|
||||||
#endif
|
#endif
|
||||||
|
@ -208,6 +223,7 @@ typedef void (*adccallback_t)(ADCDriver *adcp, adcsample_t *buffer, size_t n);
|
||||||
*
|
*
|
||||||
* @param[in] adcp pointer to the @p ADCDriver object triggering the
|
* @param[in] adcp pointer to the @p ADCDriver object triggering the
|
||||||
* callback
|
* callback
|
||||||
|
* @param[in] err ADC error code
|
||||||
*/
|
*/
|
||||||
typedef void (*adcerrorcallback_t)(ADCDriver *adcp, adcerror_t err);
|
typedef void (*adcerrorcallback_t)(ADCDriver *adcp, adcerror_t err);
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ static size_t readt(void *ip, uint8_t *bp, size_t n, systime_t time) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static chnflags_t getflags(void *ip) {
|
static chnflags_t getflags(void *ip) {
|
||||||
_ch_get_and_clear_flags_impl(ip);
|
_chn_get_and_clear_flags_impl(ip);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct SerialUSBDriverVMT vmt = {
|
static const struct SerialUSBDriverVMT vmt = {
|
||||||
|
|
|
@ -317,7 +317,7 @@ static const SerialUSBConfig serusbcfg = {
|
||||||
#define SHELL_WA_SIZE THD_WA_SIZE(2048)
|
#define SHELL_WA_SIZE THD_WA_SIZE(2048)
|
||||||
#define TEST_WA_SIZE THD_WA_SIZE(256)
|
#define TEST_WA_SIZE THD_WA_SIZE(256)
|
||||||
|
|
||||||
static void cmd_mem(BaseChannel *chp, int argc, char *argv[]) {
|
static void cmd_mem(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
size_t n, size;
|
size_t n, size;
|
||||||
|
|
||||||
(void)argv;
|
(void)argv;
|
||||||
|
@ -331,7 +331,7 @@ static void cmd_mem(BaseChannel *chp, int argc, char *argv[]) {
|
||||||
chprintf(chp, "heap free total : %u bytes\r\n", size);
|
chprintf(chp, "heap free total : %u bytes\r\n", size);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cmd_threads(BaseChannel *chp, int argc, char *argv[]) {
|
static void cmd_threads(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
static const char *states[] = {THD_STATE_NAMES};
|
static const char *states[] = {THD_STATE_NAMES};
|
||||||
Thread *tp;
|
Thread *tp;
|
||||||
|
|
||||||
|
@ -351,7 +351,7 @@ static void cmd_threads(BaseChannel *chp, int argc, char *argv[]) {
|
||||||
} while (tp != NULL);
|
} while (tp != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cmd_test(BaseChannel *chp, int argc, char *argv[]) {
|
static void cmd_test(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
Thread *tp;
|
Thread *tp;
|
||||||
|
|
||||||
(void)argv;
|
(void)argv;
|
||||||
|
@ -376,7 +376,7 @@ static const ShellCommand commands[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const ShellConfig shell_cfg1 = {
|
static const ShellConfig shell_cfg1 = {
|
||||||
(BaseChannel *)&SDU1,
|
(BaseSequentialStream *)&SDU1,
|
||||||
commands
|
commands
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue