aboutsummaryrefslogtreecommitdiff
path: root/apps/systemcmds
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2012-08-20 17:26:59 +0200
committerLorenz Meier <lm@inf.ethz.ch>2012-08-20 17:26:59 +0200
commitd17bbc7a0bdc30302df0001ddad91733064d3d11 (patch)
treeab9d48990b34a465022b9436ba8fcde53154f8f5 /apps/systemcmds
parente3fffa23e0665f2e9ce58cdf9035134785124f62 (diff)
downloadpx4-firmware-d17bbc7a0bdc30302df0001ddad91733064d3d11.tar.gz
px4-firmware-d17bbc7a0bdc30302df0001ddad91733064d3d11.tar.bz2
px4-firmware-d17bbc7a0bdc30302df0001ddad91733064d3d11.zip
Minor fixes to EEPROM params
Diffstat (limited to 'apps/systemcmds')
-rw-r--r--apps/systemcmds/eeprom/eeprom.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/systemcmds/eeprom/eeprom.c b/apps/systemcmds/eeprom/eeprom.c
index fa1bcc8b4..90a8a5b9b 100644
--- a/apps/systemcmds/eeprom/eeprom.c
+++ b/apps/systemcmds/eeprom/eeprom.c
@@ -111,6 +111,8 @@ eeprom_start(void)
/* find the right I2C */
struct i2c_dev_s *i2c = up_i2cinitialize(PX4_I2C_BUS_ONBOARD);
+ /* this resets the I2C bus, set correct bus speed again */
+ I2C_SETFREQUENCY(i2c, 400000);
if (i2c == NULL)
errx(1, "failed to locate I2C bus");
@@ -158,7 +160,7 @@ eeprom_save(const char *name)
int fd = open(name, O_WRONLY | O_CREAT | O_EXCL);
if (fd < 0)
- err(1, "create '%s'", name);
+ err(1, "opening '%s' failed", name);
int result = param_export(fd, false);
close(fd);