This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can you use assembly to optimize this code for me?

Can you write this code in assembly?

If you can, please help me, if not, please help me optimize, thank you

# define RSP NRF_GPIO_PIN_MAP (0, 6)

# define RDP NRF_GPIO_PIN_MAP (0, 4)

static void SPI_WriteCmd8Bit( uint8_t CByte )

{

NRF_GPIO_Type *p_reg=NRF_P0;

uint32_t value=0;

Nrf_gpio_pin_clear (RSP);

Nrf_gpio_pin_set (RSP);

value = p_reg-> OUT; value &= ~(0xFF< < 24);

value |= (CByte< < 24); p_reg-> OUT = value;

Nrf_gpio_pin_clear (RDP);

Nrf_gpio_pin_set (RDP);

}

Thank you

Parents Reply Children
No Data
Related