[Snek] [keith-packard/snek] 1836ab: ports/playground: Fix timer usage

Keith Packard noreply at github.com
Fri Jun 12 09:44:56 PDT 2020


  Branch: refs/heads/main
  Home:   https://github.com/keith-packard/snek
  Commit: 1836ab7dbcab325f78d324f9c17934610b12ae98
      https://github.com/keith-packard/snek/commit/1836ab7dbcab325f78d324f9c17934610b12ae98
  Author: Keith Packard <keithp at keithp.com>
  Date:   2020-06-10 (Wed, 10 Jun 2020)

  Changed paths:
    M ports/playground/ao-pins.h

  Log Message:
  -----------
  ports/playground: Fix timer usage

The samd21g18a only has tcc0-2 and tc3-5, so don't try
to use hardware which doesn't exist.

This leaves us with PWM output on A1, A2, A3, A6, A7 and the LED.

Signed-off-by: Keith Packard <keithp at keithp.com>


  Commit: 9be47064484f8acc2e1422708be3d86cc88904c8
      https://github.com/keith-packard/snek/commit/9be47064484f8acc2e1422708be3d86cc88904c8
  Author: Keith Packard <keithp at keithp.com>
  Date:   2020-06-10 (Wed, 10 Jun 2020)

  Changed paths:
    M chips/samd21/samd21.h

  Log Message:
  -----------
  chips/samd21: Hide definitions of missing timers

samd21g18a, which is used by all of the current samd21 ports, doesn't
have tc6, tc7 or tcc3. Remove the definitions to keep ports from
trying to use them.

Signed-off-by: Keith Packard <keithp at keithp.com>


  Commit: e97370dc5ecea1a5c1131d35571afe618d8862eb
      https://github.com/keith-packard/snek/commit/e97370dc5ecea1a5c1131d35571afe618d8862eb
  Author: Keith Packard <keithp at keithp.com>
  Date:   2020-06-11 (Thu, 11 Jun 2020)

  Changed paths:
    M chips/samd21/ao-dma-samd21.c
    M chips/samd21/ao-dma-samd21.h
    M chips/samd21/samd21.h

  Log Message:
  -----------
  chips/samd21: Improve DMAC code a bit

This still doesn't quite work right, but it's closer.

Signed-off-by: Keith Packard <keithp at keithp.com>


  Commit: d05a3323d53a5bb51b9079f5e705ff16f0037731
      https://github.com/keith-packard/snek/commit/d05a3323d53a5bb51b9079f5e705ff16f0037731
  Author: Keith Packard <keithp at keithp.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    A chips/samd21/ao-dac-samd21.c
    A chips/samd21/ao-dac-samd21.h
    M chips/samd21/ao-snek.c
    M chips/samd21/ao-snek.h
    A chips/samd21/sine.h
    M chips/samd21/snek-gpio.c
    M chips/samd21/snek-samd21.defs
    M doc/snek-theme.yml
    M doc/snek.adoc
    M ports/playground/Makefile
    M ports/playground/ao-pins.h

  Log Message:
  -----------
  chips/samd21: Add DAC support and tone builtin

This enables the DAC output to provide an analog voltage output. On
the circuit playground express board, also add the 'tone' and
'tonefor' functions which output a sine wave at a specified frequency
on the DAC pin. Those functions depend on having a spare timer to time
the output.

Signed-off-by: Keith Packard <keithp at keithp.com>


Compare: https://github.com/keith-packard/snek/compare/bd68a86ecdf0...d05a3323d53a


More information about the Snek mailing list