
\ -----------------------------------------------------------------------------
\   USB Initialisation
\ -----------------------------------------------------------------------------

: switch1? ( -- ) 1 GPIOA_IDR bit@ ; \ Button to quit emulated inner interpreter

: hw-init ( -- )
  168mhz
  init-cycles
  init-rng
  usb-init
  ['] usb-poll hook-pause !
  +usb

  %11 GPIOA_MODER bic! \ User button as input

  %11 SBWDAT-Pin 2* lshift
  %11 SBWCLK-Pin 2* lshift or JTAGDIR bic! \ Set JTAG wires to inputs
;
