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:
iabdalkader
2024-07-17 17:43:38 +03:00
committed by Damien George
parent 8f82089bd0
commit 6b4d46569b
11 changed files with 50 additions and 10 deletions

View 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())