* @brief Reads EipUint64 from *pa_buf and converts little endian to host. * @param pa_buf pointer where data should be reed. * @return EipUint64 value */
| 150 | * @return EipUint64 value |
| 151 | */ |
| 152 | EipUint64 GetLintFromMessage(const EipUint8 **const buffer) { |
| 153 | const EipUint8 *buffer_address = *buffer; |
| 154 | EipUint64 data = ( ( ( (EipUint64) buffer_address[0] ) << 56 ) |
| 155 | & 0xFF00000000000000LL ) |
| 156 | + ( ( ( (EipUint64) buffer_address[1] ) << 48 ) & |
| 157 | 0x00FF000000000000LL ) |
| 158 | + ( ( ( (EipUint64) buffer_address[2] ) << 40 ) & |
| 159 | 0x0000FF0000000000LL ) |
| 160 | + ( ( ( (EipUint64) buffer_address[3] ) << 32 ) & |
| 161 | 0x000000FF00000000LL ) |
| 162 | + ( ( ( (EipUint64) buffer_address[4] ) << 24 ) & |
| 163 | 0x00000000FF000000 ) |
| 164 | + ( ( ( (EipUint64) buffer_address[5] ) << 16 ) & |
| 165 | 0x0000000000FF0000 ) |
| 166 | + ( ( ( (EipUint64) buffer_address[6] ) << 8 ) & |
| 167 | 0x000000000000FF00 ) |
| 168 | + ( ( (EipUint64) buffer_address[7] ) & 0x00000000000000FF ); |
| 169 | *buffer += 8; |
| 170 | return data; |
| 171 | } |
| 172 | |
| 173 | /** |
| 174 | * @brief Converts EipUint64 data from host to little endian and writes it to buffer. |
no outgoing calls