[Snek] [keith-packard/snek] 323480: chips/atmega: Use BUILTIN defines to select tone code

Keith Packard noreply at github.com
Thu Feb 17 12:38:49 PST 2022


  Branch: refs/heads/lilypad
  Home:   https://github.com/keith-packard/snek
  Commit: 323480a205aeb646908088c1de78988950b9d621
      https://github.com/keith-packard/snek/commit/323480a205aeb646908088c1de78988950b9d621
  Author: Keith Packard <keithp at keithp.com>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M chips/atmega/snek-328p.c
    M ports/grove/snek-grove.builtin

  Log Message:
  -----------
  chips/atmega: Use BUILTIN defines to select tone code

Instead of requiring a separate SNEK_TONE define, use the existing
SNEK_BUILTIN_tone and SNEK_BUILTIN_tonefor defines to select whether
the tone code is included in the 328p io driver.

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


  Commit: 8e1641fbd6efe568e1eaad50ad52d3ef1cb39b34
      https://github.com/keith-packard/snek/commit/8e1641fbd6efe568e1eaad50ad52d3ef1cb39b34
  Author: Keith Packard <keithp at keithp.com>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M chips/atmega/snek-328p.c
    M ports/grove/snek-grove.builtin

  Log Message:
  -----------
  chips/atmega: Add tonefor builtin to 328p io driver

This adds a function for this chip that is part of the usual tone
support.

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


  Commit: d8ae7845063fef718b500c7c8f5b5415bfe03e19
      https://github.com/keith-packard/snek/commit/d8ae7845063fef718b500c7c8f5b5415bfe03e19
  Author: Keith Packard <keithp at keithp.com>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M chips/atmega/snek-atmega-serial.c

  Log Message:
  -----------
  chips/atmega: Echo '^T' in serial ISR

This lets the host perform automatic baud rate detection even if
snek is not reading input.

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


  Commit: a8b7900c8a57458f587d4f3ee51a01b584aad1b5
      https://github.com/keith-packard/snek/commit/a8b7900c8a57458f587d4f3ee51a01b584aad1b5
  Author: Keith Packard <keithp at keithp.com>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M chips/atmega/snek-328p.c

  Log Message:
  -----------
  chips/atmega: Fix digital reads from "analog" pins

When a pull-up value is applied to an analog pin, snek is supposed to
go into digital mode, however, the function responsible for returning
the correct pin register wasn't set to return PINC for the analog pins.

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


  Commit: c13d6f2890a02a46ada8f1d0379e9414fb075d86
      https://github.com/keith-packard/snek/commit/c13d6f2890a02a46ada8f1d0379e9414fb075d86
  Author: Keith Packard <keithp at keithp.com>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M chips/qemu/snek-qemu.c

  Log Message:
  -----------
  chips/qemu: Use semihost_elapsed for time values

QEMU returns processor time for sys_semihost_clock, so switch to
sys_semihost_elapsed(), which provides wall time instead.

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


  Commit: ff3200dd38869c85307696dde2e1f922f3a8e7cc
      https://github.com/keith-packard/snek/commit/ff3200dd38869c85307696dde2e1f922f3a8e7cc
  Author: Keith Packard <keithp at keithp.com>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M chips/samd21/ao-usb-samd21.c

  Log Message:
  -----------
  chips/samd21: Scan for ^C even if input is full

This lets the user interrupt the device even if some data
has been sent.

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


  Commit: eec7dbf73ce7c85d96cc9d1a4b67e7f82c51deb3
      https://github.com/keith-packard/snek/commit/eec7dbf73ce7c85d96cc9d1a4b67e7f82c51deb3
  Author: Keith Packard <keithp at keithp.com>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M README.md
    M snekde/snekde.py

  Log Message:
  -----------
  snekde: Support 57600 and 115200 baud

8MHz atmega devices cannot use 115200 baud because the clock
resolution isn't fine enough to get a close match in bit rate. So,
those devices will run at 57600 baud instead.

Support this by using the new ^T handling in the 328p chip code to
auto-detect the device baud rate when initially opening the device and
also adding a baud rate selection key (F8) which switches between
115200 and 57600 baud.

Display this in the status bar along with the device name.

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


  Commit: 1dab4486c708aa58e93a8b06c22cde71cd020f8b
      https://github.com/keith-packard/snek/commit/1dab4486c708aa58e93a8b06c22cde71cd020f8b
  Author: Keith Packard <keithp at keithp.com>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M ports/duemilanove-big/Makefile

  Log Message:
  -----------
  ports/duemilanove-big: Change Makefile extensions to optional

This lets ports using this as a base override the settings for extra
source and builtins.

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


  Commit: 59f59e8896b8b946ed0e5a362ea129d56b6e4c6b
      https://github.com/keith-packard/snek/commit/59f59e8896b8b946ed0e5a362ea129d56b6e4c6b
  Author: Keith Packard <keithp at keithp.com>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M ports/duemilanove/Makefile
    M ports/uno/Makefile

  Log Message:
  -----------
  ports/duemilanove: Move vpath from uno/Makefile to duemilanove/Makefile

This will let other ports share this bit.

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


  Commit: b7a3a5098b19b2e16900eb9efaf66077cf2d86a5
      https://github.com/keith-packard/snek/commit/b7a3a5098b19b2e16900eb9efaf66077cf2d86a5
  Author: Keith Packard <keithp at keithp.com>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M ports/duemilanove/Makefile
    M ports/duemilanove/snek-duemilanove-install.in

  Log Message:
  -----------
  ports/duemilanove: Make baud and clock configurable

This allows other 328 ports to have different values

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


  Commit: 69633377e7f6664ee357f97b9754efa4bc080b29
      https://github.com/keith-packard/snek/commit/69633377e7f6664ee357f97b9754efa4bc080b29
  Author: Keith Packard <keithp at keithp.com>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M ports/uno/Makefile

  Log Message:
  -----------
  ports/uno: Remove duplicate code to generate snek-uno-install

The duemilanove Makefile already has this bit

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


  Commit: 0f03e635fda00037936cf3b877b8af66d7ef16ad
      https://github.com/keith-packard/snek/commit/0f03e635fda00037936cf3b877b8af66d7ef16ad
  Author: Keith Packard <keithp at keithp.com>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M README.md
    M doc/snek.adoc
    A ports/lilypad/.gitignore
    A ports/lilypad/Makefile
    M snek-install.defs

  Log Message:
  -----------
  Add port to standard LilyPad

This is an ATMega 328P running at 8MHz because of the 3.3V power
supply.  This port includes the basic I/O code along with the 'tone'
builtins to support the LilyPad beeper when connected to pin 5. This
required leaving out dictionary and slice support to save flash.

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


  Commit: 85969257a308eea5b00a9056b048bd367dc7a08f
      https://github.com/keith-packard/snek/commit/85969257a308eea5b00a9056b048bd367dc7a08f
  Author: Keith Packard <keithp at keithp.com>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M doc/snek.adoc
    A ports/lilypad-big/.gitignore
    A ports/lilypad-big/Makefile
    M snek-install.defs

  Log Message:
  -----------
  Add 'big' port to standard LilyPad

Port to LilyPad that takes all available ROM instead of leaving space
for optiboot. This uses the duemilanove-big port as a template,
dropping dict and adding tone

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


Compare: https://github.com/keith-packard/snek/compare/b5fdd23cfa49...85969257a308


More information about the Snek mailing list