-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
library mcu according to e4thcom convention
- Loading branch information
Showing
10 changed files
with
61 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
\ STM8S assembly words | ||
\ (c) TG9541, refer to license at github.com/TG9541/stm8ef | ||
|
||
: bit! ( b a c -- ) | ||
rot 0= 1 and swap 2* $10 + + $72 c, c, , | ||
; immediate | ||
|
||
: bres ( a c -- ) [ 0 ] [compile] bit! ; immediate | ||
|
||
: bset ( a c -- ) [ 1 ] [compile] bit! ; immediate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
\ STM8S103 AWU register words - immediate | ||
\ (c) TG9541, refer to license at github.com/TG9541/stm8ef/ | ||
|
||
: AWU_CSR1 $50F0 ; IMMEDIATE \ AWU control/status1 (0x00) | ||
: AWU_APR $50F1 ; IMMEDIATE \ AWU asynch. prescaler buf. (0x3F) | ||
: AWU_TBR $50F2 ; IMMEDIATE \ AWU timebase selection (0x00) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
\ STM8S option register words - immediate | ||
\ (c) TG9541, refer to license at github.com/TG9541/stm8ef | ||
|
||
: OPT0 $4800 ; IMMEDIATE | ||
: OPT1 $4801 ; IMMEDIATE | ||
: OPT2 $4803 ; IMMEDIATE | ||
: OPT3 $4805 ; IMMEDIATE | ||
: OPT4 $4807 ; IMMEDIATE | ||
: OPT5 $4809 ; IMMEDIATE | ||
: FLASH_CR2 $505B ; IMMEDIATE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
\ STM8S103 PORTC register words - immediate | ||
\ (c) TG9541, refer to license at github.com/TG9541/stm8ef/ | ||
|
||
: PC_ODR $500A ; IMMEDIATE \ Port C data output latch (0x00) | ||
: PC_IDR $500B ; IMMEDIATE \ Port C input pin value (0xXX) | ||
: PC_DDR $500C ; IMMEDIATE \ Port C data direction (0x00) | ||
: PC_CR1 $500D ; IMMEDIATE \ Port C control 1 (0x00) | ||
: PC_CR2 $500E ; IMMEDIATE \ Port C control 2 (0x00) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
\ STM8S103 SPI register words - immediate | ||
\ (c) TG9541, refer to license at github.com/TG9541/stm8ef/ | ||
|
||
: SPI_CR1 $5200 ; IMMEDIATE \ ($00) | ||
: SPI_CR2 $5201 ; IMMEDIATE \ ($00) | ||
: SPI_ICR $5202 ; IMMEDIATE \ ($00) | ||
: SPI_SR $5203 ; IMMEDIATE \ ($02) | ||
: SPI_DR $5204 ; IMMEDIATE \ ($00) | ||
: SPI_CRCPR $5205 ; IMMEDIATE \ ($07) | ||
: SPI_RXCRCR $5206 ; IMMEDIATE \ ($00) | ||
: SPI_TXCRCR $5207 ; IMMEDIATE \ ($00) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
\ STM8S103 Timer1 register words - immediate | ||
\ (c) TG9541, refer to license at github.com/TG9541/stm8ef/ | ||
|
||
: TIM1_CR1 $5250 ; IMMEDIATE | ||
: TIM1_CCMR1 $5258 ; IMMEDIATE | ||
: TIM1_CCMR2 $5259 ; IMMEDIATE | ||
: TIM1_CCMR3 $525A ; IMMEDIATE | ||
: TIM1_CCER1 $525C ; IMMEDIATE | ||
: TIM1_CCER2 $525D ; IMMEDIATE | ||
: TIM1_PSCRH $5260 ; IMMEDIATE | ||
: TIM1_ARRH $5262 ; IMMEDIATE | ||
: TIM1_CCR1H $5265 ; IMMEDIATE | ||
: TIM1_CCR2H $5267 ; IMMEDIATE | ||
: TIM1_CCR3H $5269 ; IMMEDIATE | ||
: TIM1_BKR $526D ; IMMEDIATE |