AnsweredAssumed Answered

How to write  HAL_GPIO_Writebit? 

Question asked by mahir on Oct 1, 2017
Latest reply on Oct 1, 2017 by john doe

Hi.
How to write  HAL_GPIO_Writebit ? 

how to write MOSI_PIN = sa value?

 

void Write_Cmd_Data (unsigned char sa)
{
unsigned int i;
DC_SET;
delayms(10);
CS_RESET;
delayms(10);
for (i = 0; i < 8; i++, sa >>= 1) {
//HAL_GPIO_WritePin(GPIOA,MOSI_PIN, (sa>>i)&0x01);// ????????
delayms(10);
SCLK_SET //clk=1;
delayms(10);
SCLK_RESET //clk=0;
}
CS_SET //=1;
delayms(10);

}

 

it gives a warning.

 

.. \ Src \ main.c (186): warning: # 188-D: enumerated type mixed with another type
Thank you.

Outcomes