Use constants instead of #define for parameters

Avoids name conflicts.
It will properly be better to use uint8_t instead of int here. Also why not use enums instead? This would prevent people calling the functions with the wrong argument.