anchor.diff:      uart-key? if uart-key emit then
       \ break out of terminal loop when ctrl-x is seen
       key? if key dup 24 = if drop exit then uart-emit then
  -    pause
  +\   pause
     again ;
   
   : x  RST ioc! 1 ms RST ios! ;
  
positive.code:   0 bit DMA1-CCR4 bis! ;
  
  : dma-setup
    0 bit RCC-AHBENR bis!  \ DMA1EN clock enable
  
    \ DMA1 channel 4: from SPI2 RX to fwrbuf, 1..516 bytes
  
negative.code: 
  : firq ( -- )
    12 bit EXTI-PR !
    0 DMA1-CCR5 !
    0 DMA1-CCR4 !
    SPI2-DR @ drop SPI2-SR @ drop  \ clear SPI2 buffers and errors
    0 SPI2-CR1 !  \ disable
    fwrbuf c@ if -1 freply ! disktask wake then
    spi2-setup
    freply @ SPI2-DR !  \ prime the SPI status reply
    dma-setup
    %11 SPI2-CR2 !  \ enable TX and RX DMA
  \ 6 bit SPI2-CR1 !  \ slave mode, enable
    LED iox!
  ;
  
  