dev_beta_Servo (#3)
Добавлена библиотека Servo
This commit was merged in pull request #3.
This commit is contained in:
1 parent
63217147e5
commit
a7468870fc
11 files changed
+938
No files matched your search
@@ -8,6 +8,10 @@ void __attribute__((weak)) wire_handler_wrapper(void)
|
||||
{
|
||||
// dummy function for case when wire library is not in use
|
||||
}
|
||||
void __attribute__((weak)) servo_handler_wrapper(void)
|
||||
{
|
||||
// dummy function for case when wire library is not in use
|
||||
}
|
||||
|
||||
// ---------------------------------------------- //
|
||||
void trap_handler(void)
|
||||
@@ -16,6 +20,10 @@ void trap_handler(void)
|
||||
if (EPIC_CHECK_TIMER16_1())
|
||||
tone_interrupt_handler();
|
||||
|
||||
// servo timer interrupt
|
||||
if (EPIC_CHECK_TIMER16_2())
|
||||
servo_handler_wrapper();
|
||||
|
||||
// uart0 interrupt
|
||||
if (EPIC_CHECK_UART_0())
|
||||
serial_handler_wrapper(0);
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define clockCyclesPerMicrosecond() (F_CPU / 1000000L)
|
||||
#define clockCyclesToMicroseconds(a) ((a) / clockCyclesPerMicrosecond())
|
||||
#define microsecondsToClockCycles(a) ((a) * clockCyclesPerMicrosecond())
|
||||
|
||||
/**
|
||||
* \brief Initialize timer for creating delays
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user