These macros reverse bytes in variables of integral types: short, unsigned short, int, unsigned int, long long and unsigned long long (provided that they have correspondingly sizes of 16, 32, and 64 bits). For example if there is some variable of type unsigned short that has value 0x1234 then after applying the first macro, ES16( 0x1234), the result will be 0x3412.
That it would be more clear consider step by steap the action of the macro
((u16)_val) & 0xff00) will be equal to 0x1200 then
0x1200 >> 8 will be equal to 0x0012
((u16)_val) & 0x00ff) will be equal to 0x0034
then
0x0034 << 8 will be equal to 0x3400
And at last
0x0012 | 0x3400 will result in 0x3412