I'm trying to generate signals using an AD9833 and a raspberry pi 3 model B+ but each time I build my programme I have this error message:
ad9833.c:36:2: warning: implicit declaration of function ‘bcm2835_gpio_fseL’ [-Wimplicit-function-declaration] "
Can somebody help me to solve this problem, please.
This is my code:
void shiftOut(uint8_t dataPin, uint8_t clockPin, char bitOrder, uint8_t value){
uint8_t i;
for(i = 0 ; i < 8 ; i++){
if(bitOrder == 'm')
bcm2835_gpio_write(dataPin, !!(value & (1 << (7 - i))));
else if(bitOrder == 'l')
bcm2835_gpio_write(dataPin, !!(value & (1 << i)));
bcm2835_gpio_write(clockPin, HIGH);
bcm2835_gpio_write(clockPin, LOW);
}
}
int main (int argc, char **argv){
if(!bcm2835_init())
return 1;
bcm2835_gpio_set(FSYNC);
bcm2835_gpio_set(SCLK);
//bcm2835_gpio_fsel(uint8_t pin, uint8_t mode);
bcm2835_gpio_fseL(FSYNC, BCM2835_GPIO_FSEL_OUTP);
bcm2835_gpio_fseL(SCLK, BCM2835_GPIO_FSEL_OUTP);
bcm2835_gpio_fseL(SDATA, BCM2835_GPIO_FSEL_OUTP);
while(1){
bcm2835_gpio_write(SCLK, HIGH);
bcm2835_gpio_write(FSYNC, LOW);
shiftOut(SDATA, SCLK, 'm',0x00);
shiftOut(SDATA, SCLK, 'm',0x00);
bcm2835_gpio_write(FSYNC, HIGH);
}
}