InfraLib was a library that I started to decode and encode infra-red signals, of the kind used in TV remote controls. As well as implementing raw IR protocols, it also supports transmitter and receiver drivers, allow you to actually control a TV or other device.

I have only used the library with an STM32 discovery board, but it should work on any micro-controller with a decent capture compare and PWM output unit.