Merge pull request #3405 from opentx/kilrah/extratrims

[Horus] Extra trims support
This commit is contained in:
Bertrand Songis
2016-04-09 22:59:43 +02:00
30 changed files with 272 additions and 65 deletions
+2 -2
View File
@@ -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);
}
+1 -1
View File
@@ -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)