forked from Imagelibrary/rtems
2006-01-08 Joel Sherrill <joel@OARcorp.com>
* libchip/i2c/i2c-2b-eeprom.c, libchip/i2c/i2c-ds1621.c: Eliminate warnings.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2006-01-08 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
|
* libchip/i2c/i2c-2b-eeprom.c, libchip/i2c/i2c-ds1621.c: Eliminate
|
||||||
|
warnings.
|
||||||
|
|
||||||
2005-11-20 Ralf Corsepius <ralf.corsepius@rtems.org>
|
2005-11-20 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
* aclocal/prog-cc.m4: Remove RTEMS_USE_GCC.
|
* aclocal/prog-cc.m4: Remove RTEMS_USE_GCC.
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ i2c_2b_eeprom_write (rtems_device_major_number major,
|
|||||||
rtems_libio_rw_args_t *rwargs = arg;
|
rtems_libio_rw_args_t *rwargs = arg;
|
||||||
unsigned off = rwargs->offset;
|
unsigned off = rwargs->offset;
|
||||||
int cnt = rwargs->count;
|
int cnt = rwargs->count;
|
||||||
char *buf = rwargs->buffer;
|
unsigned char *buf = (unsigned char *)rwargs->buffer;
|
||||||
int sc;
|
int sc;
|
||||||
unsigned end;
|
unsigned end;
|
||||||
int l;
|
int l;
|
||||||
@@ -96,7 +96,11 @@ i2c_2b_eeprom_read (rtems_device_major_number major,
|
|||||||
if (RTEMS_SUCCESSFUL != (sc = send_file_ptr (minor, rwargs->offset, 0)))
|
if (RTEMS_SUCCESSFUL != (sc = send_file_ptr (minor, rwargs->offset, 0)))
|
||||||
return -sc;
|
return -sc;
|
||||||
|
|
||||||
sc = rtems_libi2c_start_read_bytes (minor, rwargs->buffer, rwargs->count);
|
sc = rtems_libi2c_start_read_bytes(
|
||||||
|
minor,
|
||||||
|
(unsigned char *)rwargs->buffer,
|
||||||
|
rwargs->count
|
||||||
|
);
|
||||||
|
|
||||||
if (sc < 0) {
|
if (sc < 0) {
|
||||||
rwargs->bytes_moved = 0;
|
rwargs->bytes_moved = 0;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ ds1621_init (rtems_device_major_number major, rtems_device_minor_number minor,
|
|||||||
void *arg)
|
void *arg)
|
||||||
{
|
{
|
||||||
int sc;
|
int sc;
|
||||||
char csr[2] = { DS1621_CMD_CSR_ACCESS, 0 }, cmd;
|
unsigned char csr[2] = { DS1621_CMD_CSR_ACCESS, 0 }, cmd;
|
||||||
|
|
||||||
/* First start command acquires a lock for the bus */
|
/* First start command acquires a lock for the bus */
|
||||||
|
|
||||||
@@ -58,14 +58,14 @@ ds1621_read (rtems_device_major_number major, rtems_device_minor_number minor,
|
|||||||
{
|
{
|
||||||
int sc;
|
int sc;
|
||||||
rtems_libio_rw_args_t *rwargs = arg;
|
rtems_libio_rw_args_t *rwargs = arg;
|
||||||
char cmd = DS1621_CMD_READ_TEMP;
|
unsigned char cmd = DS1621_CMD_READ_TEMP;
|
||||||
|
|
||||||
sc = rtems_libi2c_start_write_bytes (minor, &cmd, 1);
|
sc = rtems_libi2c_start_write_bytes (minor, &cmd, 1);
|
||||||
if (sc < 0)
|
if (sc < 0)
|
||||||
return -sc;
|
return -sc;
|
||||||
if (sc < 1)
|
if (sc < 1)
|
||||||
return RTEMS_IO_ERROR;
|
return RTEMS_IO_ERROR;
|
||||||
sc = rtems_libi2c_start_read_bytes (minor, rwargs->buffer, 1);
|
sc = rtems_libi2c_start_read_bytes(minor, (unsigned char *)rwargs->buffer, 1);
|
||||||
if (sc < 0) {
|
if (sc < 0) {
|
||||||
rwargs->bytes_moved = 0;
|
rwargs->bytes_moved = 0;
|
||||||
return -sc;
|
return -sc;
|
||||||
|
|||||||
Reference in New Issue
Block a user