mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 19:50:30 +01:00
alif: Support running the port on the HE core.
The same MicroPython firmware is built for the HE but with slightly different options, for example no USB. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This commit is contained in:
committed by
Damien George
parent
8f82089bd0
commit
6b4d46569b
21
ports/alif/modules/he/_boot.py
Normal file
21
ports/alif/modules/he/_boot.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import openamp
|
||||
import time
|
||||
from machine import Pin
|
||||
|
||||
|
||||
def ept_recv_callback(src_addr, data):
|
||||
print("Received message on endpoint", data)
|
||||
|
||||
|
||||
# Create a new RPMsg endpoint to communicate with main core.
|
||||
ept = openamp.Endpoint("vuart-channel", callback=ept_recv_callback)
|
||||
|
||||
pin = Pin("LED_BLUE", Pin.OUT)
|
||||
|
||||
count = 0
|
||||
while True:
|
||||
if ept.is_ready():
|
||||
ept.send("Hello from HE %d" % count, timeout=1000)
|
||||
count += 1
|
||||
time.sleep_ms(100)
|
||||
pin(not pin())
|
||||
Reference in New Issue
Block a user