mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-08-17 16:51:44 +08:00
Added missing const specifier to ecrt_read_real() / ecrt_read_lreal().
This commit is contained in:
+2
-2
@@ -2200,7 +2200,7 @@ void ecrt_reg_request_read(
|
||||
* \param data EtherCAT data pointer
|
||||
* \return EtherCAT data value
|
||||
*/
|
||||
float ecrt_read_real(void *data);
|
||||
float ecrt_read_real(const void *data);
|
||||
|
||||
/** Read a 32-bit floating-point value from EtherCAT data.
|
||||
*
|
||||
@@ -2214,7 +2214,7 @@ float ecrt_read_real(void *data);
|
||||
* \param data EtherCAT data pointer
|
||||
* \return EtherCAT data value
|
||||
*/
|
||||
double ecrt_read_lreal(void *data);
|
||||
double ecrt_read_lreal(const void *data);
|
||||
|
||||
/** Read a 64-bit floating-point value from EtherCAT data.
|
||||
*
|
||||
|
||||
+2
-2
@@ -138,7 +138,7 @@ void ecrt_release_master(ec_master_t *master)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
float ecrt_read_real(void *data)
|
||||
float ecrt_read_real(const void *data)
|
||||
{
|
||||
uint32_t raw = EC_READ_U32(data);
|
||||
return *(float *) (const void *) &raw;
|
||||
@@ -146,7 +146,7 @@ float ecrt_read_real(void *data)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
double ecrt_read_lreal(void *data)
|
||||
double ecrt_read_lreal(const void *data)
|
||||
{
|
||||
uint64_t raw = EC_READ_U64(data);
|
||||
return *(double *) (const void *) &raw;
|
||||
|
||||
Reference in New Issue
Block a user