Difference: TerminalIO (6 vs. 7)

Revision 72020-05-19 - PeterSchmid

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
%DASHBOARD{ section="banner" image="/twiki/pub/Cosmac/ForthSTM32WB/nucleo-header.jpg"
Changed:
<
<
title="USB-CDC for Serial Communication"
>
>
title="Terminal IO (Serial Communication)"
  titlestyle="color:#F00000;" }%
Intro
Line: 19 to 19
 

Terminal-IO

Added:
>
>
Default console is USB-CDC, but if you press button SW2 on reset, the console is redirected to the UART device, see mecrisp.s. If you press button SW1 on reset, the console is redirected to the Bluetooth LE Cable Replacement Service.
 
emit? 	     ( -- Flag ) 	Ready to send a character?
key? 	     ( -- Flag ) 	Checks if a key is waiting

Line: 24 to 25
 key? ( -- Flag ) Checks if a key is waiting key ( -- Char ) Waits for and fetches the pressed key emit ( Char -- ) Emits a character
Added:
>
>
 hook-emit? ( -- a-addr ) Hooks for redirecting terminal IO on the fly hook-key? hook-key hook-emit
Added:
>
>
uart ( -- ) redirect console to serial interface (UART) cdc ( -- ) redirect console to USB-CDC crs ( -- ) redirect console to BLE CRS
 


Line: 47 to 53
 
Changed:
<
<

USB-CDC Words (API)

>
>

USB-CDC Serial Communcation (API)

 
cdc-emit   ( c -- ) Emit one character
cdc-key    ( -- c ) Receive one character
cdc-emit?  ( -- ? ) Ready to send a character
cdc-key?   ( -- ? ) Is there a key press ?

Deleted:
<
<
uart ( -- ) redirect console to serial interface (UART) cdc ( -- ) redirect console to USB-CDC crs ( -- ) redirect console to BLE CRS
 
Deleted:
<
<
For console redirection see terminalhooks.s.

Default console is UART, but if you press button SW2 on reset, the console is redirected to the USB-CDC device, see mecrisp.s. Default console for the dongle is USB-CDC.

 
Changed:
<
<

UART (Serial) Words (API)

>
>

UART Serial Communcation (API)

 
serial-emit  ( c -- ) Emit one character

Line: 75 to 73
 serial-key? ( -- ? ) Is there a key press ?

baudrate ( u -- ) set baud rate (e.g. 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200)

Changed:
<
<
paritybit ( u -- ) set parity bit 0 none, 1 odd, 2 even
>
>
paritybit ( u -- ) set parity bit 0 none, 1 odd, 2 even, 3 mark, 4 space
 wordlength ( u -- ) set word length 7, 8, 9 (including parity)
Changed:
<
<
stopbits ( u -- ) set stop bits 1, 2

uart ( -- ) redirect console to serial interface (UART) cdc ( -- ) redirect console to USB-CDC crs ( -- ) redirect console to BLE CRS

>
>
stopbits ( u -- ) set stop bits 0 1 bit, 1 1.5 bit, 2 2 bit
 
Deleted:
<
<
For console redirection see terminalhooks.s.

Default console is UART, but if you press button SW2 on reset, the console is redirected to the USB-CDC device, see mecrisp.s. Default console for the dongle is USB-CDC.

 

Changed:
<
<

BLE Cable Replacement Words (API)

>
>

BLE Cable Replacement Serial Communcation (API)

 
crs-emit   ( c -- ) Emit one character
crs-key    ( -- c ) Receive one character
crs-emit?  ( -- ? ) Ready to send a character
crs-key?   ( -- ? ) Is there a key press ?

Deleted:
<
<
uart ( -- ) redirect console to serial interface (UART) cdc ( -- ) redirect console to USB-CDC crs ( -- ) redirect console to BLE CRS
 
Deleted:
<
<
For console redirection see terminalhooks.s.

Default console is UART, but if you press button SW2 on reset, the console is redirected to the USB-CDC device, see mecrisp.s. Default console for the dongle is USB-CDC.

 
Line: 119 to 101
 

Comments

<--/commentPlugin-->
Added:
>
>
META TOPICMOVED by="PeterSchmid" date="1589922814" from="MecrispCube.SerialCommunication" to="MecrispCube.TerminalIO"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback