I am trying to clear bits using a C macro that gets m (clear bit start) and n (# bits to clear)
This macro needs to receive a reference to a 32-bit register and m and n.

For example:
I have a 32 bits value of: 0xFFFFFFFF
m = 5, n=2
so I would like my result to be: 0xFFFFFFAF

but I would like this function-macro to work with any m/n combimation

#define CLEAR_MN_BITS(reg_x, m, n) (??????????????)

Can anyone fill in the question marks?

Thanks!