mirror of
https://github.com/elua/elua.git
synced 2025-01-25 01:02:54 +08:00
Fix for LM3S6965 PWM1.
This commit is contained in:
parent
fca447cb12
commit
4ef76a03b9
@ -361,13 +361,17 @@ u32 platform_s_timer_op( unsigned id, int op, u32 data )
|
||||
|
||||
// ****************************************************************************
|
||||
// PWMs
|
||||
// Same on LM3S8962 and LM3S6965
|
||||
// Similar on LM3S8962 and LM3S6965
|
||||
|
||||
// SYSCTL div data and actual div factors
|
||||
const static u32 pwm_div_ctl[] = { SYSCTL_PWMDIV_1, SYSCTL_PWMDIV_2, SYSCTL_PWMDIV_4, SYSCTL_PWMDIV_8, SYSCTL_PWMDIV_16, SYSCTL_PWMDIV_32, SYSCTL_PWMDIV_64 };
|
||||
const static u8 pwm_div_data[] = { 1, 2, 4, 8, 16, 32, 64 };
|
||||
// Port/pin information for all channels
|
||||
const static u32 pwm_ports[] = { GPIO_PORTF_BASE, GPIO_PORTG_BASE, GPIO_PORTB_BASE, GPIO_PORTB_BASE, GPIO_PORTE_BASE, GPIO_PORTE_BASE };
|
||||
#ifdef FORLM3S6965
|
||||
const static u32 pwm_ports[] = { GPIO_PORTF_BASE, GPIO_PORTD_BASE, GPIO_PORTB_BASE, GPIO_PORTB_BASE, GPIO_PORTE_BASE, GPIO_PORTE_BASE };
|
||||
#else
|
||||
const static u32 pwm_ports[] = { GPIO_PORTF_BASE, GPIO_PORTG_BASE, GPIO_PORTB_BASE, GPIO_PORTB_BASE, GPIO_PORTE_BASE, GPIO_PORTE_BASE };
|
||||
#endif
|
||||
const static u8 pwm_pins[] = { GPIO_PIN_0, GPIO_PIN_1, GPIO_PIN_0, GPIO_PIN_1, GPIO_PIN_0, GPIO_PIN_1 };
|
||||
// PWM generators
|
||||
const static u16 pwm_gens[] = { PWM_GEN_0, PWM_GEN_1, PWM_GEN_2 };
|
||||
|
Loading…
x
Reference in New Issue
Block a user