IchigoLatte FT ver 0.7.0 / GD32VF103 --- [reference] (IchigoLatte) - A OS. * ScrLock You can change NTSC mode when your TV monitor can't display well. You can also turn on the video when the video is off. * Ctrl+Alt+Del You can reboot the OS. (lash) - A latte shell. * .(no) Editable file io. no: 0~15 * uart UART serial io. * @(no) EEPROM file io. no: 0~63 (when 1Mbit) * _ Run the file '.' as FORTH or binary automatically. * ex. >cat . > uart >cat uart > .0 >cat @0 > .1 >cat .15 > @63 + '_' will be ran by pushing the button at the system booting. + it will switchs mode console<->uart mutually when btn is pushed or ctrl+d is received. (can't use 'vi' in uart mode.) (echo) - A argument printer. * ex. >echo Hello World. (skl) - A keyboard layout setter. (us/jp) * ex. >skl jp (video) - A video mode setter. (0-8) * ex. >video 3 (cat) - A input printer. * 'ESC' exit. * ex. >cat . >cat uart >cat -c 186 uart > . (ls) - A eeprom viewer. * ex. >ls (vi) - A text editor. * 'ESC' save and exit. * Ctrl+D exit.(NOT saved.) * Ctrl+X, Ctrl+C, Ctrl+V cut, copy and paste current line. * Shift+(arrow) select charactors. you can cut, copy and paste with Ctrl+X, Ctrl+C and Ctrl+V. * ex. >vi . >vi @0 (ts) - A simple FORTH engine. * ex. Interactive mode >ts * ex. Execution mode >ts . * spec length of word name: 7 - [standard words] BEGIN WHILE REPEAT IF ELSE THEN VARIABLE : ; ( S" DUP DROP SWAP OVER ROT @ ! + - * / = < > - [global words] . ( val -- ) \ print val. .s ( -- ) \ dump stack. type ( str len -- ) \ print string. led ( onoff -- ) \ on/off the LED. [onoff:0,1] btn ( -- onoff ) \ get the Button status. [onoff:0,1] in ( port -- onoff ) \ get from the GPIO-IN ports. [port:1,2,3,4] ana ( port -- val ) \ get from the GPIO-Analog input. [port:0,1,2,3,4] out ( bits -- ) \ set the GPIO-OUT ports. [bits:000000-111111](specify the 'bits' by digit) pwm ( port, usec -- ) \ set the PWM hi-time usec. pwmt ( usec -- ) \ set the PWM period usec. cls ( -- ) \ clear the screen lc ( x y -- ) \ locate the screen cursor. scr ( x y -- char ) \ get the screen charactor. sleep ( msec -- ) \ sleep msec. dsleep ( msec -- ) \ deep sleep msec. [msec:1000-] inkey ( -- key ) \ get key from the keyboard. rnd ( max -- val ) \ get a random number. tick ( -- msec ) \ get the timer count from system booted. scroll ( dir -- ) \ scroll the screen. [dir:0,1,2,3] rscroll ( dir -- ) \ scroll the screen rotately. [dir:0,1,2,3] video ( onoff -- ) \ set screen mode. [onoff:0,1,2,3,4,5,6,7,8] (!) before video on, turn off spi by 'spim'. input ( -- val ) \ get a number from user input. bps ( rate -- ) \ set the uart serial bps. (default:115,200) uartw ( char -- ) \ send 1 byte to uart. uartr ( -- char ) \ receive 1 byte from urat. exit ( code -- ) \ exit from this process. envw ( val -- ) \ set OS-env number. envr ( -- val ) \ get OS-env number. dac ( port, val -- ) \ set the DAC value. [port:2,3](in2,in3) [val:0-4095] (!) The port will be changed to out mode. Reboot to get it back. sin8 ( deg -- val ) \ get the sin value by integer(x256). spiw ( val -- ) \ send 1 byte to spi. (!) before spi on, turn off video by 'video'. spim ( mode -- ) \ set the spi mode. [mode:-1,0,1,2,3] mode==-1 : spi off mode==0 : spi on (CPOL:0, CPHA:0) mode==1 : spi on (CPOL:0, CPHA:1) mode==2 : spi on (CPOL:1, CPHA:0) mode==3 : spi on (CPOL:1, CPHA:1) (!) before this, turn on spi by 'spim'. --- NaturalStyle Co. Ltd. http://na-s.jp/