aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorStephen Caudle <stephen@caudle.info>2015-07-26 22:54:46 -0400
committerStephen Caudle <stephen@caudle.info>2015-07-26 22:54:46 -0400
commit91d82fc6313940d89c96e48ed6be044d3a5dd2e0 (patch)
treefb13dc9baca0f67d2857c10056742031dd4f543f /os
parentd1d6fa4bf8d160a13d734a0d3dc67790831c5858 (diff)
downloadChibiOS-Contrib-91d82fc6313940d89c96e48ed6be044d3a5dd2e0.tar.gz
ChibiOS-Contrib-91d82fc6313940d89c96e48ed6be044d3a5dd2e0.tar.bz2
ChibiOS-Contrib-91d82fc6313940d89c96e48ed6be044d3a5dd2e0.zip
nRF51: Remove unnecessary direction setting
Diffstat (limited to 'os')
-rw-r--r--os/hal/ports/NRF51/NRF51822/pal_lld.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/os/hal/ports/NRF51/NRF51822/pal_lld.c b/os/hal/ports/NRF51/NRF51822/pal_lld.c
index 5716498..69fc9fe 100644
--- a/os/hal/ports/NRF51/NRF51822/pal_lld.c
+++ b/os/hal/ports/NRF51/NRF51822/pal_lld.c
@@ -51,7 +51,6 @@ void _pal_lld_setpadmode(ioportid_t port, uint8_t pad, iomode_t mode)
switch (mode) {
case PAL_MODE_RESET:
case PAL_MODE_UNCONNECTED:
- NRF_GPIO->DIRSET = ((uint32_t) 1 << pad);
NRF_GPIO->PIN_CNF[pad] =
(GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) |
(GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) |
@@ -61,7 +60,6 @@ void _pal_lld_setpadmode(ioportid_t port, uint8_t pad, iomode_t mode)
break;
case PAL_MODE_INPUT:
case PAL_MODE_INPUT_ANALOG:
- NRF_GPIO->DIRCLR = ((uint32_t) 1 << pad);
NRF_GPIO->PIN_CNF[pad] =
(GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) |
(GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) |
@@ -70,7 +68,6 @@ void _pal_lld_setpadmode(ioportid_t port, uint8_t pad, iomode_t mode)
(GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos);
break;
case PAL_MODE_INPUT_PULLUP:
- NRF_GPIO->DIRCLR = ((uint32_t) 1 << pad);
NRF_GPIO->PIN_CNF[pad] =
(GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) |
(GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) |
@@ -79,7 +76,6 @@ void _pal_lld_setpadmode(ioportid_t port, uint8_t pad, iomode_t mode)
(GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos);
break;
case PAL_MODE_INPUT_PULLDOWN:
- NRF_GPIO->DIRCLR = ((uint32_t) 1 << pad);
NRF_GPIO->PIN_CNF[pad] =
(GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) |
(GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) |
@@ -88,7 +84,6 @@ void _pal_lld_setpadmode(ioportid_t port, uint8_t pad, iomode_t mode)
(GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos);
break;
case PAL_MODE_OUTPUT_PUSHPULL:
- NRF_GPIO->DIRSET = ((uint32_t) 1 << pad);
NRF_GPIO->PIN_CNF[pad] =
(GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) |
(GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) |
@@ -97,7 +92,6 @@ void _pal_lld_setpadmode(ioportid_t port, uint8_t pad, iomode_t mode)
(GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos);
break;
case PAL_MODE_OUTPUT_OPENDRAIN:
- NRF_GPIO->DIRSET = ((uint32_t) 1 << pad);
NRF_GPIO->PIN_CNF[pad] =
(GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) |
(GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) |