Infrared port bpi m2

Hello. Is there a way to use the infrared port in android os? If yes, how to do it?