Re: Source Code and Examples
Posted:
Sun Sep 21, 2014 8:22 pm
by RichardS
My guess is gpio_init() is already called for you, I would think its done already higher up in code....
OR make a at+gpioinit AT command that only does the init(), then try the set and clrs
I need to read the code again in sample to know....
R.
Re: Source Code and Examples
Posted:
Sun Sep 21, 2014 11:51 pm
by RichardS
Try:
#define GPIO_SET(pin) gpio_output_set(1<<pin,0,1<<pin,0);
#define GPIO_CLR(pin) gpio_output_set(0,1<<pin,1<<pin,0);
void gpio_output_set(uint32 set_mask,uint32 clear_mask,uint32 enable_mask,uint32 disable_mask);
Richard.
Re: Source Code and Examples
Posted:
Mon Sep 22, 2014 12:22 am
by rudi
admin wrote:Try:
#define GPIO_SET(pin) gpio_output_set(1<<pin,0,1<<pin,0);
#define GPIO_CLR(pin) gpio_output_set(0,1<<pin,1<<pin,0);
void gpio_output_set(uint32 set_mask,uint32 clear_mask,uint32 enable_mask,uint32 disable_mask);
Richard.
Hi Richard, txs for help.
for pin i will try..
pin GPIO0 : BIT0
pin GPIO1 : BIT1
pin GPIO2 : BIT2
Code: Select all#define GPIO_SET(BIT2) gpio_output_set(1<<BIT2,0,1<<BIT2,0);
#define GPIO_CLR(BIT2) gpio_output_set(0,1<<BIT2,1<<BIT2,0);
do i mean corect?
Do i need to set the PIN_FUNCTION_SELECT too?
Do you know this too?
best thank in advance - giĀ“ve them all a try at evening.
Best wishes!
rudi