System cmds: Move to 0 based index

This commit is contained in:
Lorenz Meier
2015-02-09 22:56:22 +01:00
parent 2f4d820063
commit ac155b0fac
9 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -58,7 +58,7 @@
int test_adc(int argc, char *argv[])
{
int fd = open(ADC_DEVICE_PATH, O_RDONLY);
int fd = open(ADC0_DEVICE_PATH, O_RDONLY);
if (fd < 0) {
warnx("ERROR: can't open ADC device");
+2 -2
View File
@@ -124,10 +124,10 @@ int test_tone(int argc, char *argv[])
int fd, result;
unsigned long tone;
fd = open(TONEALARM_DEVICE_PATH, O_WRONLY);
fd = open(TONEALARM0_DEVICE_PATH, O_WRONLY);
if (fd < 0) {
printf("failed opening " TONEALARM_DEVICE_PATH "\n");
printf("failed opening " TONEALARM0_DEVICE_PATH "\n");
goto out;
}
+1 -1
View File
@@ -90,7 +90,7 @@
int test_jig_voltages(int argc, char *argv[])
{
int fd = open(ADC_DEVICE_PATH, O_RDONLY);
int fd = open(ADC0_DEVICE_PATH, O_RDONLY);
int ret = OK;
if (fd < 0) {
+1 -1
View File
@@ -91,7 +91,7 @@ int test_led(int argc, char *argv[])
int fd;
int ret = 0;
fd = open(LED_DEVICE_PATH, 0);
fd = open(LED0_DEVICE_PATH, 0);
if (fd < 0) {
printf("\tLED: open fail\n");
+1 -1
View File
@@ -67,7 +67,7 @@ int test_ppm_loopback(int argc, char *argv[])
int servo_fd, result;
servo_position_t pos;
servo_fd = open(PWM_OUTPUT_DEVICE_PATH, O_RDWR);
servo_fd = open(PWM_OUTPUT0_DEVICE_PATH, O_RDWR);
if (servo_fd < 0) {
printf("failed opening /dev/pwm_servo\n");
+1 -1
View File
@@ -63,7 +63,7 @@ int test_servo(int argc, char *argv[])
servo_position_t data[PWM_OUTPUT_MAX_CHANNELS];
servo_position_t pos;
fd = open(PWM_OUTPUT_DEVICE_PATH, O_RDWR);
fd = open(PWM_OUTPUT0_DEVICE_PATH, O_RDWR);
if (fd < 0) {
printf("failed opening /dev/pwm_servo\n");