TELEMETRY_MOD=14051_SWAPPED
TELEMETRY_MOD=14051 (by gerardv @ forum.turnigy9xr.com) makes USART0 available by reallocating AIL and THR onto pins 14 and 15 of the 14051 multiplexer. TELEMETRY_MOD=14051_SWAPPED is based on TELEMETRY_MOD=14051, but uses USART1 instead of USART0, freeing USART0 for other purposes (debugging, interfacing via AVRISP port). USART1 is freed up by reallocating LVert Trim Dn/Up onto 14051's 12 and 1 pins respectively. Additionally, this commit cleans a few things up: * moves AVR ADC-related code to adc_driver.cpp, * provides #defines to have a convenient way to access either USART0 or USART1 registers depending on static (build-time) configuration * moves code related to this telemetry mod to board_stock * replaces a few magic numbers with enums. Thanks to Bernard Songis for review and suggestions!
This commit is contained in:
@@ -604,7 +604,7 @@ void checkSwitches()
|
||||
#if !defined(MODULE_ALWAYS_SEND_PULSES)
|
||||
while (1) {
|
||||
|
||||
#if defined(TELEMETRY_MOD_14051) || defined(PCBTARANIS)
|
||||
#if defined(TELEMETRY_MOD_14051) || defined(TELEMETRY_MOD_14051_SWAPPED) || defined(PCBTARANIS)
|
||||
getADC();
|
||||
#endif
|
||||
#endif // !defined(MODULE_ALWAYS_SEND_PULSES)
|
||||
|
||||
Reference in New Issue
Block a user