IO Timer Changes for Capture

This commit is contained in:
David Sidrane
2016-02-01 10:10:35 +01:00
committed by Lorenz Meier
parent 0397537cf0
commit b3af469e80
+4 -4
View File
@@ -332,7 +332,7 @@ static inline int allocate_channel_resource(unsigned channel, io_timer_channel_m
static inline int free_channel_resource(unsigned channel)
{
int mode = get_channel_mode(channel);
int mode = io_timer_get_channel_mode(channel);
if (mode > IOTimerChanMode_NotUsed) {
io_timer_channel_allocation_t bit = 1 << channel;
@@ -349,7 +349,7 @@ int io_timer_free_channel(unsigned channel)
return -EINVAL;
}
int mode = get_channel_mode(channel);
int mode = io_timer_get_channel_mode(channel);
if (mode > IOTimerChanMode_NotUsed) {
io_timer_set_enable(false, mode, 1 << channel);
@@ -685,7 +685,7 @@ int io_timer_set_ccr(unsigned channel, uint16_t value)
int rv = io_timer_validate_channel_index(channel);
if (rv == 0) {
if (get_channel_mode(channel) != IOTimerChanMode_PWMOut) {
if (io_timer_get_channel_mode(channel) != IOTimerChanMode_PWMOut) {
rv = -EIO;
@@ -709,7 +709,7 @@ uint16_t io_channel_get_ccr(unsigned channel)
uint16_t value = 0;
if (io_timer_validate_channel_index(channel) == 0 &&
get_channel_mode(channel) == IOTimerChanMode_PWMOut) {
io_timer_get_channel_mode(channel) == IOTimerChanMode_PWMOut) {
value = REG(channels_timer(channel), timer_io_channels[channel].ccr_offset) + 1;
}