git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5520 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
320f18b7af
commit
2d67b2382e
|
@ -1078,8 +1078,7 @@ void pwm_lld_start(PWMDriver *pwmp) {
|
||||||
* If this is the first FlexPWM0 submodule
|
* If this is the first FlexPWM0 submodule
|
||||||
* activated then the FlexPWM0 is enabled.
|
* activated then the FlexPWM0 is enabled.
|
||||||
*/
|
*/
|
||||||
#if SPC5_PWM_USE_SMOD0 || SPC5_PWM_USE_SMOD1 || \
|
#if SPC5_PWM_USE_FLEXPWM0
|
||||||
SPC5_PWM_USE_SMOD2 || SPC5_PWM_USE_SMOD3
|
|
||||||
/* Set Peripheral Clock.*/
|
/* Set Peripheral Clock.*/
|
||||||
if (flexpwm_active_submodules0 == 1) {
|
if (flexpwm_active_submodules0 == 1) {
|
||||||
halSPCSetPeripheralClockMode(SPC5_FLEXPWM0_PCTL,
|
halSPCSetPeripheralClockMode(SPC5_FLEXPWM0_PCTL,
|
||||||
|
@ -1087,8 +1086,7 @@ void pwm_lld_start(PWMDriver *pwmp) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SPC5_PWM_USE_SMOD4 || SPC5_PWM_USE_SMOD5 || \
|
#if SPC5_PWM_USE_FLEXPWM1
|
||||||
SPC5_PWM_USE_SMOD6 || SPC5_PWM_USE_SMOD7
|
|
||||||
/* Set Peripheral Clock.*/
|
/* Set Peripheral Clock.*/
|
||||||
if (flexpwm_active_submodules1 == 1) {
|
if (flexpwm_active_submodules1 == 1) {
|
||||||
halSPCSetPeripheralClockMode(SPC5_FLEXPWM1_PCTL,
|
halSPCSetPeripheralClockMode(SPC5_FLEXPWM1_PCTL,
|
||||||
|
@ -1448,8 +1446,7 @@ void pwm_lld_stop(PWMDriver *pwmp) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SPC5_PWM_USE_SMOD0 || SPC5_PWM_USE_SMOD1 || \
|
#if SPC5_PWM_USE_FLEXPWM0
|
||||||
SPC5_PWM_USE_SMOD2 || SPC5_PWM_USE_SMOD3
|
|
||||||
/* Disable peripheral clock if there is not an activated module.*/
|
/* Disable peripheral clock if there is not an activated module.*/
|
||||||
if (flexpwm_active_submodules0 == 0) {
|
if (flexpwm_active_submodules0 == 0) {
|
||||||
halSPCSetPeripheralClockMode(SPC5_FLEXPWM0_PCTL,
|
halSPCSetPeripheralClockMode(SPC5_FLEXPWM0_PCTL,
|
||||||
|
@ -1457,8 +1454,7 @@ void pwm_lld_stop(PWMDriver *pwmp) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SPC5_PWM_USE_SMOD4 || SPC5_PWM_USE_SMOD5 || \
|
#if SPC5_PWM_USE_FLEXPWM1
|
||||||
SPC5_PWM_USE_SMOD6 || SPC5_PWM_USE_SMOD7
|
|
||||||
/* Disable peripheral clock if there is not an activated module.*/
|
/* Disable peripheral clock if there is not an activated module.*/
|
||||||
if (flexpwm_active_submodules1 == 0) {
|
if (flexpwm_active_submodules1 == 0) {
|
||||||
halSPCSetPeripheralClockMode(SPC5_FLEXPWM1_PCTL,
|
halSPCSetPeripheralClockMode(SPC5_FLEXPWM1_PCTL,
|
||||||
|
|
|
@ -891,9 +891,7 @@ void icu_lld_init(void) {
|
||||||
ICUD18.smod_number = 5U;
|
ICUD18.smod_number = 5U;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SPC5_ICU_USE_SMOD0 || SPC5_ICU_USE_SMOD1 || \
|
#if SPC5_ICU_USE_ETIMER0
|
||||||
SPC5_ICU_USE_SMOD2 || SPC5_ICU_USE_SMOD3 || \
|
|
||||||
SPC5_ICU_USE_SMOD4 || SPC5_ICU_USE_SMOD5
|
|
||||||
|
|
||||||
INTC.PSR[SPC5_ETIMER0_TC0IR_NUMBER].R = SPC5_ICU_ETIMER0_PRIORITY;
|
INTC.PSR[SPC5_ETIMER0_TC0IR_NUMBER].R = SPC5_ICU_ETIMER0_PRIORITY;
|
||||||
INTC.PSR[SPC5_ETIMER0_TC1IR_NUMBER].R = SPC5_ICU_ETIMER0_PRIORITY;
|
INTC.PSR[SPC5_ETIMER0_TC1IR_NUMBER].R = SPC5_ICU_ETIMER0_PRIORITY;
|
||||||
|
@ -906,9 +904,7 @@ void icu_lld_init(void) {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SPC5_ICU_USE_SMOD6 || SPC5_ICU_USE_SMOD7 || \
|
#if SPC5_ICU_USE_ETIMER1
|
||||||
SPC5_ICU_USE_SMOD8 || SPC5_ICU_USE_SMOD9 || \
|
|
||||||
SPC5_ICU_USE_SMOD10 || SPC5_ICU_USE_SMOD11
|
|
||||||
|
|
||||||
INTC.PSR[SPC5_ETIMER1_TC0IR_NUMBER].R = SPC5_ICU_ETIMER1_PRIORITY;
|
INTC.PSR[SPC5_ETIMER1_TC0IR_NUMBER].R = SPC5_ICU_ETIMER1_PRIORITY;
|
||||||
INTC.PSR[SPC5_ETIMER1_TC1IR_NUMBER].R = SPC5_ICU_ETIMER1_PRIORITY;
|
INTC.PSR[SPC5_ETIMER1_TC1IR_NUMBER].R = SPC5_ICU_ETIMER1_PRIORITY;
|
||||||
|
@ -920,9 +916,7 @@ void icu_lld_init(void) {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SPC5_ICU_USE_SMOD12 || SPC5_ICU_USE_SMOD13 || \
|
#if SPC5_ICU_USE_ETIMER2
|
||||||
SPC5_ICU_USE_SMOD14 || SPC5_ICU_USE_SMOD15 || \
|
|
||||||
SPC5_ICU_USE_SMOD16 || SPC5_ICU_USE_SMOD17
|
|
||||||
|
|
||||||
INTC.PSR[SPC5_ETIMER2_TC0IR_NUMBER].R = SPC5_ICU_ETIMER2_PRIORITY;
|
INTC.PSR[SPC5_ETIMER2_TC0IR_NUMBER].R = SPC5_ICU_ETIMER2_PRIORITY;
|
||||||
INTC.PSR[SPC5_ETIMER2_TC1IR_NUMBER].R = SPC5_ICU_ETIMER2_PRIORITY;
|
INTC.PSR[SPC5_ETIMER2_TC1IR_NUMBER].R = SPC5_ICU_ETIMER2_PRIORITY;
|
||||||
|
@ -1034,8 +1028,7 @@ void icu_lld_start(ICUDriver *icup) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Set eTimer0 Clock.*/
|
/* Set eTimer0 Clock.*/
|
||||||
#if SPC5_ICU_USE_SMOD0 || SPC5_ICU_USE_SMOD1 || SPC5_ICU_USE_SMOD2 || \
|
#if SPC5_ICU_USE_ETIMER0
|
||||||
SPC5_ICU_USE_SMOD3 || SPC5_ICU_USE_SMOD4 || SPC5_ICU_USE_SMOD5
|
|
||||||
|
|
||||||
/* If this is the first Submodule activated then the eTimer0 is enabled.*/
|
/* If this is the first Submodule activated then the eTimer0 is enabled.*/
|
||||||
if (icu_active_submodules0 == 1) {
|
if (icu_active_submodules0 == 1) {
|
||||||
|
@ -1045,8 +1038,7 @@ void icu_lld_start(ICUDriver *icup) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Set eTimer1 Clock.*/
|
/* Set eTimer1 Clock.*/
|
||||||
#if SPC5_ICU_USE_SMOD6 || SPC5_ICU_USE_SMOD7 || SPC5_ICU_USE_SMOD8 || \
|
#if SPC5_ICU_USE_ETIMER1
|
||||||
SPC5_ICU_USE_SMOD9 || SPC5_ICU_USE_SMOD10 || SPC5_ICU_USE_SMOD11
|
|
||||||
/* If this is the first Submodule activated then the eTimer1 is enabled.*/
|
/* If this is the first Submodule activated then the eTimer1 is enabled.*/
|
||||||
if (icu_active_submodules1 == 1) {
|
if (icu_active_submodules1 == 1) {
|
||||||
halSPCSetPeripheralClockMode(SPC5_ETIMER1_PCTL,
|
halSPCSetPeripheralClockMode(SPC5_ETIMER1_PCTL,
|
||||||
|
@ -1055,8 +1047,7 @@ void icu_lld_start(ICUDriver *icup) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Set eTimer2 Clock.*/
|
/* Set eTimer2 Clock.*/
|
||||||
#if SPC5_ICU_USE_SMOD12 || SPC5_ICU_USE_SMOD13 || SPC5_ICU_USE_SMOD14 || \
|
#if SPC5_ICU_USE_ETIMER2
|
||||||
SPC5_ICU_USE_SMOD15 || SPC5_ICU_USE_SMOD16 || SPC5_ICU_USE_SMOD17
|
|
||||||
/* If this is the first Submodule activated then the eTimer2 is enabled.*/
|
/* If this is the first Submodule activated then the eTimer2 is enabled.*/
|
||||||
if (icu_active_submodules2 == 1) {
|
if (icu_active_submodules2 == 1) {
|
||||||
halSPCSetPeripheralClockMode(SPC5_ETIMER2_PCTL,
|
halSPCSetPeripheralClockMode(SPC5_ETIMER2_PCTL,
|
||||||
|
@ -1236,8 +1227,7 @@ void icu_lld_stop(ICUDriver *icup) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* eTimer0 clock deactivation.*/
|
/* eTimer0 clock deactivation.*/
|
||||||
#if SPC5_ICU_USE_SMOD0 || SPC5_ICU_USE_SMOD1 || SPC5_ICU_USE_SMOD2 || \
|
#if SPC5_ICU_USE_ETIMER0
|
||||||
SPC5_ICU_USE_SMOD3 || SPC5_ICU_USE_SMOD4 || SPC5_ICU_USE_SMOD5
|
|
||||||
/* If it is the last active submodules then the eTimer0 is disabled.*/
|
/* If it is the last active submodules then the eTimer0 is disabled.*/
|
||||||
if (icu_active_submodules0 == 0) {
|
if (icu_active_submodules0 == 0) {
|
||||||
if (icup->etimerp->ENBL.B.ENBL == 0) {
|
if (icup->etimerp->ENBL.B.ENBL == 0) {
|
||||||
|
@ -1248,8 +1238,7 @@ void icu_lld_stop(ICUDriver *icup) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* eTimer1 clock deactivation.*/
|
/* eTimer1 clock deactivation.*/
|
||||||
#if SPC5_ICU_USE_SMOD6 || SPC5_ICU_USE_SMOD7 || SPC5_ICU_USE_SMOD8 || \
|
#if SPC5_ICU_USE_ETIMER1
|
||||||
SPC5_ICU_USE_SMOD9 || SPC5_ICU_USE_SMOD10 || SPC5_ICU_USE_SMOD11
|
|
||||||
/* If it is the last active submodules then the eTimer1 is disabled.*/
|
/* If it is the last active submodules then the eTimer1 is disabled.*/
|
||||||
if (icu_active_submodules1 == 0) {
|
if (icu_active_submodules1 == 0) {
|
||||||
if (icup->etimerp->ENBL.B.ENBL == 0) {
|
if (icup->etimerp->ENBL.B.ENBL == 0) {
|
||||||
|
@ -1260,8 +1249,7 @@ void icu_lld_stop(ICUDriver *icup) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* eTimer2 clock deactivation.*/
|
/* eTimer2 clock deactivation.*/
|
||||||
#if SPC5_ICU_USE_SMOD12 || SPC5_ICU_USE_SMOD13 || SPC5_ICU_USE_SMOD14 || \
|
#if SPC5_ICU_USE_ETIMER2
|
||||||
SPC5_ICU_USE_SMOD15 || SPC5_ICU_USE_SMOD16 || SPC5_ICU_USE_SMOD17
|
|
||||||
/* If it is the last active submodules then the eTimer2 is disabled.*/
|
/* If it is the last active submodules then the eTimer2 is disabled.*/
|
||||||
if (icu_active_submodules2 == 0) {
|
if (icu_active_submodules2 == 0) {
|
||||||
if (icup->etimerp->ENBL.B.ENBL == 0) {
|
if (icup->etimerp->ENBL.B.ENBL == 0) {
|
||||||
|
|
Loading…
Reference in New Issue