Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new config options for rpi IR in bootcfg.txt #13

Open
wants to merge 1 commit into
base: focal
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,22 @@ serial_ir_device: ttyS0
# Pin for the GPIO remote receiver
# rpi_ir_gpio_pin: 24

# Other example for the GPIO remote receiver that enables the pullup
# rpi_ir_gpio_pin: '22,gpio_in_pull=up'

# Pin for the GPIO remote sender (needs additional lirc configuration,
# which is at the moment beyond the scope of this playbook)
# rpi_ir_gpio_pin_tx: 13
# rpi_ir_gpio_pin_tx: '18'

# Alternative IR remote sender example using the PWM
# rpi_ir_pwm_pin_tx: '18'

# Add arbitrary lines to usercfg.txt
# rpi_user_config_line:
# - '# A line'
# - '# Another line'
# - '# even more line'


# Set the memory for the GPU core - rpihddevice needs 256 MB, which is the default value set by the playbook
# rpi_gpu_mem = 256
11 changes: 10 additions & 1 deletion roles/rpi/templates/usercfg.txt.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,14 @@ decode_WVC1={{ rpi_decode_wvc1 }}
dtoverlay=gpio-ir,gpio_pin={{ rpi_ir_gpio_pin }}
{% endif %}
{% if rpi_ir_gpio_pin_tx is defined %}
dtoverlay=gpio-ir-recv-tx,gpio_pin={{ rpi_ir_gpio_pin_tx }}
dtoverlay=gpio-ir-tx,gpio_pin={{ rpi_ir_gpio_pin_tx }}
{% endif %}
{% if rpi_ir_pwm_pin_tx is defined %}
dtoverlay=pwm-ir-tx,gpio_pin={{ rpi_ir_pwm_pin_tx }}
{% endif %}
{# Allow for arbitrary entries #}
{% if rpi_user_config_line is defined %}
{% for item in rpi_user_config_line %}
{{ item }}
{% endfor %}
{% endif %}