Toggle GPIO from S32G2 linux image

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Toggle GPIO from S32G2 linux image

Jump to solution
1,036 Views
Vishnu3
Contributor III

Hi all,

 

I am using the fsl-auto-image and i would like to write a c file which can be used to toggle the LED pins (using libgpiod) on my S32G-VNP development board. Any resources are also fine. I am looking for a basic template snippet, I don't need the whole code as I am fairly new to embedded linux.

I have already taken a look at the GPIO section in the NXP linux BSP 33 pdf but those only show the library APIs that needs to be called from the terminal.

Also, is it just the code or do I have to also make changes in the dts?

 

@chenyin_h  tagging you because you have been always so very helpful.

Best,

Vishnu

Tags (2)
0 Kudos
Reply
1 Solution
1,005 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @Vishnu3 

Thanks for your reply.

On BSP, the libgpiod-tools is supported, which could be used to control the GPIO from user space. directly execute the command from shell could display and control the GPIO status.

If these commands could not fully fulfill your requirements, I suggest reference the code of libgpiod,  to  apply your own modification on it if needed.

https://github.com/brgl/libgpiod

 

BR

Chenyin

 

View solution in original post

0 Kudos
Reply
3 Replies
1,006 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @Vishnu3 

Thanks for your reply.

On BSP, the libgpiod-tools is supported, which could be used to control the GPIO from user space. directly execute the command from shell could display and control the GPIO status.

If these commands could not fully fulfill your requirements, I suggest reference the code of libgpiod,  to  apply your own modification on it if needed.

https://github.com/brgl/libgpiod

 

BR

Chenyin

 

0 Kudos
Reply
1,022 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @Vishnu3 

Thanks for your post.

May I know which version BSP you are working with? based on BSP33?

 

BR

Chenyin

0 Kudos
Reply
1,017 Views
Vishnu3
Contributor III

Hi Chenyin,

The BSP image I'm using is version 42. I've been referring to the document version 33, since I couldn't find the document for the latest version.

 

Best,

 

Vishnu

0 Kudos
Reply