kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Return errors as exceptions from *fe_read_data()
rodzic
ad231613db
commit
e78cfa750f
|
@ -580,12 +580,9 @@ void sanei_genesys_set_buffer_address(Genesys_Device* dev, uint32_t addr)
|
||||||
* @param data placeholder for the result
|
* @param data placeholder for the result
|
||||||
* @return SANE_STATUS_GOOD is OK, else the error code
|
* @return SANE_STATUS_GOOD is OK, else the error code
|
||||||
*/
|
*/
|
||||||
SANE_Status
|
void sanei_genesys_fe_read_data (Genesys_Device* dev, uint8_t addr, uint16_t* data)
|
||||||
sanei_genesys_fe_read_data (Genesys_Device * dev, uint8_t addr,
|
|
||||||
uint16_t *data)
|
|
||||||
{
|
{
|
||||||
DBG_HELPER(dbg);
|
DBG_HELPER(dbg);
|
||||||
SANE_Status status = SANE_STATUS_GOOD;
|
|
||||||
uint8_t value;
|
uint8_t value;
|
||||||
Genesys_Register_Set reg;
|
Genesys_Register_Set reg;
|
||||||
|
|
||||||
|
@ -601,8 +598,6 @@ sanei_genesys_fe_read_data (Genesys_Device * dev, uint8_t addr,
|
||||||
*data += value;
|
*data += value;
|
||||||
|
|
||||||
DBG(DBG_io, "%s (0x%02x, 0x%04x)\n", __func__, addr, *data);
|
DBG(DBG_io, "%s (0x%02x, 0x%04x)\n", __func__, addr, *data);
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@brief write data to analog frontend
|
/*@brief write data to analog frontend
|
||||||
|
|
|
@ -1786,9 +1786,7 @@ extern void sanei_genesys_set_buffer_address(Genesys_Device* dev, uint32_t addr)
|
||||||
* Reads data from the given frontend register. May be used to query
|
* Reads data from the given frontend register. May be used to query
|
||||||
* analog frontend status by reading the right register.
|
* analog frontend status by reading the right register.
|
||||||
*/
|
*/
|
||||||
extern SANE_Status
|
extern void sanei_genesys_fe_read_data(Genesys_Device* dev, uint8_t addr, uint16_t* data);
|
||||||
sanei_genesys_fe_read_data (Genesys_Device * dev, uint8_t addr,
|
|
||||||
uint16_t *data);
|
|
||||||
/** @brief Write data to frontend register.
|
/** @brief Write data to frontend register.
|
||||||
* Writes data to analog frontend register at the given address.
|
* Writes data to analog frontend register at the given address.
|
||||||
* The use and address of registers change from model to model.
|
* The use and address of registers change from model to model.
|
||||||
|
|
Ładowanie…
Reference in New Issue