remove debug hedder and macros
prepare function using for SPI