commit 1e9a669f07cce881c2861dfbc330cc0c5a0115d3 tries to use TC0 for tone, and TC1 for Servo. However, the servo remain unchanged (keep using TC0) causing the resource conflict. This PR does
change servo to use TC1 in respect of the above commit intention
Make define Tone_Handler() as TC0_Handler so that it is a strong symbol. The issue with current weak alias is that we have multiple weak symbol for TC0_Handler: the Tone_Handler and Dummy_handler in startup file
It is kind of weird, the compiler could pick either Dummy_Handler or Tone_Handler in a rather random way. In my testing If using TC2 for tone, Tone_Handler is picked, however, using TC0 the Dummy_Handler is picked. It probably depends on the order of link file/archive etc .. It is hard to tell. So yeah, I think it is better to use strong symbol in this case.
@ladyada let's me know if you want to change the allocation of TC0/TC1 for tone/servo
fix #255
commit 1e9a669f07cce881c2861dfbc330cc0c5a0115d3 tries to use TC0 for tone, and TC1 for Servo. However, the servo remain unchanged (keep using TC0) causing the resource conflict. This PR does
Tone_Handler() as TC0_Handler
so that it is a strong symbol. The issue with current weak alias is that we have multiple weak symbol for TC0_Handler: the Tone_Handler and Dummy_handler in startup fileTone.cpp void TC0_Handler (void) attribute ((weak, alias("Tone_Handler")));