pri EXTEND.fth . pri IMMEDIATE pri ok ; pri Published BEGIN KEY $0D = UNTIL CR ; pri ... ; pub .INDEX CR I .WORD . pub SPACES ( cnt -- ) FOR SPACE NEXT ; pub U@ ( addr -- long ) \ Fetch an non-aligned long pub PFA>NFA ( pfa -- nfa ) pub CLKFREQ ( -- freq ) pub COGREG! ( dat ix -- ) pub COGREG@ ( ix -- dat ) pub COGREGS ( cnt miso mosi clk -- ) pub COGINIT ( cog code par -- ) pub TASK? ( -- task ) pub RUN ( pfa cog -- ) pub ATN? \ alias for newer command ATN@ pub ATN@ ( -- cmd ) pub ENQ! ( data -- ) pub ATN! ( cmd cog -- ) pub ENQ@ ( cog -- data ) pub TASKS pub ALIGN ( n align -- n1 ) pub TYPE ( str cnt -- ) pub PINSET ( pin -- ) pub PINCLR ( pin -- ) pub PININP ( pin -- ) pub MASKS ( pin cnt -- mask ) pub LBIT! ( mask addr state -- ) pub LONGFILL ( addr cnt longval -- ) pub MOD ( n1 mod -- rem ) pub second ( n1 - ) pub seconds ( n1 -- ) pub |< ( bit -- mask ) pub >| ( mask -- bit ) pub => ( n1 n2 -- flg ) 1- > ; pub <= ( n1 n2 -- flg ) SWAP => ; pub ++ ( addr -- ) 1 SWAP +! ; pub -- ( addr -- ) -1 SWAP +! ; pub W++ ( addr -- ) 1 SWAP W+! ; pub W-- ( addr -- ) -1 SWAP W+! ; pub C++ ( addr -- ) 1 SWAP C+! ; pub C-- ( addr -- ) -1 SWAP C+! ; pub ~ ( addr -- ) 0 SWAP ! ; pub ~~ ( addr -- ) -1 SWAP ! ; pub W~ ( addr -- ) 0 SWAP W! ; pub W~~ ( addr -- ) -1 SWAP W! ; pub C~ ( addr -- ) 0 SWAP C! ; pub C~~ ( addr -- ) -1 SWAP C! ; pub @. ( addr -- ) @ U. ; pri LISTKEY ( flg -- flg ) pub QWORDS pub .ATRS pub WORDS pub MODULES pub SERBAUD ( baud -- ) pub SEROUT ( data pin -- ) pub SERIN ( pin -- data ) pub CON pri (SEP) pri InitSep ( digits base -- digits base ) pub .NUM ( sign+sep+digits;base -- ) pub .LAP pri REG$ ( index -- addr ) 2 SHL pub SPRS pri .PIN MASK AND 0<> 1 AND IF . pub PINS? pri CTR ( -- addr ) pri CTR! ( val -- ) pri CTR@ ( -- val ) pub A ctr C~ ; pub B 1 ctr C! ; pub NCO 4 pub CTRMODE ( n -- ) pub DUTY pub PLL pub PLLDIV ( n -- ) pub APIN ( pin -- ) \ Set the APIN of the current CTR pub BPIN ( pin -- ) \ Set the BPIN of the current CTR pub FRQ ( n -- ) \ Set the value of the current FRQ (A or B) pub DAC! ( byte pin -- ) pub MHZ ( MHz -- ) pub KHZ ( khz -- ) pub HZ ( hz -- ) pub MUTE pub TIMER ( channel -- addr ) pub TIMEOUT ( ms channel -- ) pub TIMEOUT? ( channel -- flg ) pub ALARM ( pfa channel -- ) pri TIMERTASK pub RUNTIMERS ( table cnt -- ) pri PWMCOG pub RUNPWM ( pin channels table -- ) pub PWM! ( duty8 channel -- ) pub PWM! ( duty8 channel -- ) pub % ( %duty -- dutyval ) pri SCL scl @ ; pri SDA sda @ ; pub EEPROM pub I2CPINS ( sda scl -- ) pub I2CSTART pub I2CSTOP pub I2C!? ( data -- flg ) \ write a byte to the I2C bus and return with the ack (0=ack) pub I2C! ( data -- ) \ write a byte to the I2C bus pub I2C@ ( ack -- data ) pub SI2C!? ( data -- ) \ write a byte to the I2C bus and return with the ack (0=ack) pub SI2C! SI2C!? DROP ; pub SI2C@ ( ack -- data ) pub I2CBUS pri @EE ( addr -- flg ) pri EERD ( -- flg ) pub EE! ( byte addr -- ) pub EE@ ( addr -- byte ) pri ENDRD ( -- ) pub EDUMP ( addr cnt -- ) pub ESAVE ( ram eeprom cnt -- ) pub ESAVEB ( ram eeprom cnt -- ) pub ELOAD ( eeprom ram cnt -- ) pub EECOPY ( eesrc eedst cnt -- ) pub EFILL ( src cnt ch -- ) pub EVERIFY ( ram cnt -- ) pub 64K? ( -- flg ) pub BACKUP pub ?BACKUP pub RESTORE pub CONBAUD ( baud -- ) VER 8 + SWAP OVER ! 4 ADO I C@ I EE! #10 ms LOOP ; pub FIXCKSUM ( src cnt -- ) pub BINARYDUMP pub .RUNTIME pub .VECTORS pri .added pri .free pub END pub STATS pub INFO pub BOOT pub COLD