generated from atopile/project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathswoop.ato
46 lines (38 loc) · 1.04 KB
/
swoop.ato
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import Micro from "micro.ato"
import PowerSupply from "power-supply.ato"
import IMU from "imu.ato"
import Radio from "radio.ato"
import IOs from "ios.ato"
import Power from "generics/interfaces.ato"
module Swoop:
"""
Swoop is an opensource motion controller for FPV drones.
Compatable with ExpressLRS.
"""
power3v3 = new Power
# Create modules
micro = new Micro
power_supply = new PowerSupply
imu = new IMU
radio = new Radio
ios = new IOs
# Comms
micro.usb2 ~ ios.usb2
micro.power ~ power3v3
micro.uart ~ radio.uart
micro.i2c ~ imu.i2c
micro.i2c ~ ios.i2c
micro.interrupt ~ imu.interrupt
# GPIO
micro.led_dout ~ ios.led_din
micro.power_btn ~ ios.power_btn
micro.menu_btn ~ ios.menu_btn
micro.hall_sense ~ ios.hall_sense
micro.charge_status ~ power_supply.charge_status
# Regultators
ios.power5v ~ power_supply.power5v
power_supply.power3v3 ~ power3v3
# power connections
power3v3 ~ imu.power
power3v3 ~ radio.power
power3v3 ~ ios.power3v3