YAHAL
Yet Another Hardware Abstraction Library
Loading...
Searching...
No Matches
boostxl_eduMKII.cpp
1/*
2 * boostxleduMKII.cpp
3 *
4 * Created on: 23.11.2022
5 * Author: andreas
6 */
7
8#include "boostxl_eduMKII.h"
9#include "gpio_rp2350.h"
10#include "spi_rp2350.h"
11
12boostxl_eduMKII::boostxl_eduMKII() {
13}
14
15void boostxl_eduMKII::inject() {
16 if (need_buttons) {
17 _button1 = new gpio_rp2350(BUTTON1);
18 _button2 = new gpio_rp2350(BUTTON2);
19 }
20 if (need_led_rgb) {
21 _led_red = new gpio_rp2350(RGB_LED_RED);
22 _led_green = new gpio_rp2350(RGB_LED_GREEN);
23 _led_blue = new gpio_rp2350(RGB_LED_BLUE);
24 }
25 if (need_buzzer) {
26 _buzzer = new gpio_rp2350(BUZZER);
27 }
28 if (need_gator) {
29 _gator = new gpio_rp2350(GATOR);
30 }
31 if (need_servo) {
32 _servo = new gpio_rp2350(SERVO);
33 }
34 if (need_lcd) {
35 _lcd_cs = new gpio_rp2350(LCD_CS);
36 _lcd_rst = new gpio_rp2350(LCD_RST);
37 _lcd_dc = new gpio_rp2350(LCD_DC);
38 _lcd_spi = new spi_rp2350(0, LCD_MISO, LCD_MOSI, LCD_SCLK, lcd_cs());
39 }
40 if (need_i2c) {
41 _opt3001_int = new gpio_rp2350(OPT3001_INT);
42 _tmp006_int = new gpio_rp2350(TMP006_INT);
43 }
44 if (need_joystick) {
45
46 }
47 if (need_microphone) {
48
49 }
50 if (need_accelerometer) {
51
52 }
53}