… | |
… | |
854 | |
854 | |
855 | In C++ the following additional template functions are supported: |
855 | In C++ the following additional template functions are supported: |
856 | |
856 | |
857 | =over 4 |
857 | =over 4 |
858 | |
858 | |
859 | =item T ecb_peek (const void *ptr) |
859 | =item T ecb_peek<T> (const void *ptr) |
860 | |
860 | |
861 | =item T ecb_peek_be (const void *ptr) |
861 | =item T ecb_peek_be<T> (const void *ptr) |
862 | |
862 | |
863 | =item T ecb_peek_le (const void *ptr) |
863 | =item T ecb_peek_le<T> (const void *ptr) |
864 | |
864 | |
865 | =item T ecb_peek_u (const void *ptr) |
865 | =item T ecb_peek_u<T> (const void *ptr) |
866 | |
866 | |
867 | =item T ecb_peek_be_u (const void *ptr) |
867 | =item T ecb_peek_be_u<T> (const void *ptr) |
868 | |
868 | |
869 | =item T ecb_peek_le_u (const void *ptr) |
869 | =item T ecb_peek_le_u<T> (const void *ptr) |
870 | |
870 | |
871 | Similarly to their C counterparts, these functions load an unsigned 8, 16, |
871 | Similarly to their C counterparts, these functions load an unsigned 8, 16, |
872 | 32 or 64 bit value from memory, with optional conversion from big/little |
872 | 32 or 64 bit value from memory, with optional conversion from big/little |
873 | endian. |
873 | endian. |
874 | |
874 | |
875 | Since the type cannot be deduced, it has top be specified explicitly, e.g. |
875 | Since the type cannot be deduced, it has to be specified explicitly, e.g. |
876 | |
876 | |
877 | uint_fast16_t v = ecb_peek<uint16_t> (ptr); |
877 | uint_fast16_t v = ecb_peek<uint16_t> (ptr); |
878 | |
878 | |
879 | C<T> must be one of C<uint8_t>, C<uint16_t>, C<uint32_t> or C<uint64_t>. |
879 | C<T> must be one of C<uint8_t>, C<uint16_t>, C<uint32_t> or C<uint64_t>. |
880 | |
880 | |