mbed library sources modified for open wear
Dependents: openwear-lifelogger-example
Fork of mbed-src by
Revision 309:1576dac518fb, committed 2014-09-08
- Comitter:
- janekm
- Date:
- Mon Sep 08 23:16:31 2014 +0000
- Parent:
- 308:61b24bcb4679
- Child:
- 310:6188e0254baa
- Commit message:
- N/A;
Changed in this revision
targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/i2c_api.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/i2c_api.c Thu Sep 04 21:18:39 2014 +0000 +++ b/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/i2c_api.c Mon Sep 08 23:16:31 2014 +0000 @@ -86,6 +86,18 @@ obj->i2c->EVENTS_ERROR = 0; obj->i2c->ENABLE = TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos; obj->i2c->POWER = 0; + NRF_GPIO->PIN_CNF[obj->scl] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) + | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) + | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) + | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) + | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); + NRF_GPIO->PIN_CNF[obj->sda] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) + | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) + | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) + | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) + | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); + NRF_GPIO->OUTCLR = (1UL << obj->scl); + NRF_GPIO->OUTSET = (1UL << obj->sda); for (int i = 0; i<100; i++) { }