Merge pull request #3405 from opentx/kilrah/extratrims
[Horus] Extra trims support
This commit is contained in:
@@ -64,7 +64,7 @@ uint32_t readTrims()
|
||||
result |= 0x40;
|
||||
if (~TRIMS_GPIO_REG_RHR & TRIMS_GPIO_PIN_RHR)
|
||||
result |= 0x80;
|
||||
#if 0
|
||||
#if !defined(SIMU)
|
||||
if (~TRIMS_GPIO_REG_LSD & TRIMS_GPIO_PIN_LSD)
|
||||
result |= 0x100;
|
||||
if (~TRIMS_GPIO_REG_LSU & TRIMS_GPIO_PIN_LSU)
|
||||
@@ -79,7 +79,7 @@ uint32_t readTrims()
|
||||
return result;
|
||||
}
|
||||
|
||||
uint8_t trimDown(uint8_t idx)
|
||||
uint16_t trimDown(uint16_t idx)
|
||||
{
|
||||
return readTrims() & (1 << idx);
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ void simuSetTrim(uint8_t trim, bool state)
|
||||
TRIM_CASE(5, TRIMS_GPIO_REG_RVU, TRIMS_GPIO_PIN_RVU)
|
||||
TRIM_CASE(6, TRIMS_GPIO_REG_RHL, TRIMS_GPIO_PIN_RHL)
|
||||
TRIM_CASE(7, TRIMS_GPIO_REG_RHR, TRIMS_GPIO_PIN_RHR)
|
||||
#if defined(HORUS)
|
||||
#if defined(PCBHORUS)
|
||||
TRIM_CASE(8, TRIMS_GPIO_REG_LSU, TRIMS_GPIO_PIN_LSU)
|
||||
TRIM_CASE(9, TRIMS_GPIO_REG_LSD, TRIMS_GPIO_PIN_RVU)
|
||||
TRIM_CASE(10, TRIMS_GPIO_REG_RSU, TRIMS_GPIO_PIN_RHL)
|
||||
|
||||
Reference in New Issue
Block a user