Looks to me as though you are trying to cast the addr value into a word16 value. Not sure you can do that via a typedef.
I use stdint.h
#include <stdint.h>
which defines types like uint16_t which is is an unsigned 16 bit quantity. There are 8, 16, 32, 64 bit values and unsigned for each one, plus 'fast' versions which use the machine word size.
You might be able to then use a dynamic_cast to achieve you casting goal. sorry I see it is a C program ( although you have it in a .cpp file)
Also
It looks like you want to cast a pointer to an 8 bit quantity to a pointer to a 16 bit quantity. Try dereferencing them first, then use unsigned short to cast.
Edit: try dereferencing them then assignment.
extern variable means the variable is declared in another file. Google it