mirror of https://github.com/joan2937/pigpio
Misc plus fix for #373
This commit is contained in:
parent
7154e302e3
commit
ad83b33426
3
pigpio.c
3
pigpio.c
|
@ -1572,6 +1572,9 @@ int myPathBad(char *name)
|
||||||
in_part = 0;
|
in_part = 0;
|
||||||
last_char_dot = 0;
|
last_char_dot = 0;
|
||||||
|
|
||||||
|
if (strstr(name, "..")) return 1;
|
||||||
|
if (strstr(name, "\\.")) return 1;
|
||||||
|
|
||||||
len = strlen(name);
|
len = strlen(name);
|
||||||
|
|
||||||
for (i=0; i<len; i++)
|
for (i=0; i<len; i++)
|
||||||
|
|
|
@ -1064,7 +1064,7 @@ int i2c_process_call(unsigned handle, unsigned reg, uint32_t val)
|
||||||
ext[0].ptr = &val;
|
ext[0].ptr = &val;
|
||||||
|
|
||||||
return pigpio_command_ext
|
return pigpio_command_ext
|
||||||
(gPigCommand, PI_CMD_I2CPK, handle, reg, 4, 1, ext, 1);
|
(gPigCommand, PI_CMD_I2CPC, handle, reg, 4, 1, ext, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int i2c_write_block_data(
|
int i2c_write_block_data(
|
||||||
|
|
|
@ -1288,7 +1288,7 @@ int i2c_process_call(int pi, unsigned handle, unsigned reg, uint32_t val)
|
||||||
ext[0].ptr = &val;
|
ext[0].ptr = &val;
|
||||||
|
|
||||||
return pigpio_command_ext
|
return pigpio_command_ext
|
||||||
(pi, PI_CMD_I2CPK, handle, reg, 4, 1, ext, 1);
|
(pi, PI_CMD_I2CPC, handle, reg, 4, 1, ext, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int i2c_write_block_data(
|
int i2c_write_block_data(
|
||||||
|
|
Loading…
Reference in New Issue