GPIO write

All about Sub-20 Multi Interface USB Adapter USB to I2C, SPI, GPIO, RS232, RS485, Ir, LCD

Moderator: serg

Post Reply
soumajit
Posts: 12
Joined: Thu Feb 03, 2011 3:26 am

GPIO write

Post by soumajit »

I am using sub_gpio_write() for setting the values of pins. But how can I set the individual pins without affecting the status of other pins using this function?

xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

Re: GPIO write

Post by xol »

Use mask.
• mask - Bit in set parameter will take effect only if corresponding mask bit is "1". With mask=0 function will only read current GPIO output status.

soumajit
Posts: 12
Joined: Thu Feb 03, 2011 3:26 am

Re: GPIO write

Post by soumajit »

Thank you for the reply :) :)

Post Reply