Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu/mips32r2_common: use periph_common timer_set #8720

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions cpu/mips32r2_common/periph/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,23 +121,6 @@ int timer_init(tim_t dev, unsigned long freq, timer_cb_t cb, void *arg)
return 0;
}

int timer_set(tim_t dev, int channel, unsigned int timeout)
{
assert(dev == 0);
assert(channel < CHANNELS);

(void)dev;

timeout >>= TIMER_ACCURACY_SHIFT;
timeout <<= TIMER_ACCURACY_SHIFT;

uint32_t status = irq_disable();
compares[channel] = counter + timeout;
irq_restore(status);

return channel;
}

int timer_set_absolute(tim_t dev, int channel, unsigned int value)
{
assert(dev == 0);
Expand Down
5 changes: 0 additions & 5 deletions cpu/mips_pic32_common/include/periph_cpu_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ enum {
PORT_G = 6, /**< port G */
};

/**
* @brief Prevent shared timer functions from being used
*/
#define PERIPH_TIMER_PROVIDES_SET

#ifdef __cplusplus
}
#endif
Expand Down