esp_garden git · master
Distributed ESP sensor and actuator system (garden)
C++ 70.7% Markdown 18% C 10.7%git clone https://git.christianimmanuel.de/embedded/esp_garden.gitwget https://git.christianimmanuel.de/embedded/esp_garden/archive/esp_garden.tar.gzAdd new file
client_pump/main/asm.S | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/client_pump/main/asm.S b/client_pump/main/asm.S new file mode 100644 index 0000000..3ae1dd4 --- /dev/null +++ b/client_pump/main/asm.S @@ -0,0 +1,23 @@ +.section .text +.global set_gpio_output_level +.equ REG_GPIO_BASE, 0x60004000 + +set_gpio_output_level: + li t2,REG_GPIO_BASE //Basisadresse laden + li t1, 1 + sll t1,t1, a0 //Bitamske für GPIO a0 + + //GPIO als Output aktivieren(GPIO_ENABLE_W1TS_REG,Offset 0x20) + + sw t1,0x20(t2) + + //Pegel Setzen + beq a1,x0,gpio_low //Wenn a1==0 -> LOW + +gpio_high: + sw t1,0x8(t2) //GPIO HIGH + ret + +gpio_low: + sw t1,0xC(t2) //GPIO LOW + ret