Skip to content

Commit

Permalink
io done
Browse files Browse the repository at this point in the history
  • Loading branch information
pranay-o committed Jan 28, 2025
1 parent 8007594 commit 99ce970
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
9 changes: 7 additions & 2 deletions firmware/quintuna/RSM/src/io/io_fans.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
#pragma once
#include "hw_gpio.h"

#ifdef TARGET_EMBEDDED
#include "hw_gpio.h"

typedef struct
{
const Gpio *src;
} Fans;
#else
#include "app_utils.h"
EMPTY_STRUCT(Fans);
#endif

void io_fan_set(const Fans *fans, bool on);

// extern const Fans acc_fan;
extern const Fans rad_fan;

#endif
1 change: 1 addition & 0 deletions firmware/quintuna/RSM/src/io/io_leds.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "io_leds.h"
#include "hw_gpios.h"

const BinaryLed brake_light = { .gpio = &brake_light_en_pin };
const BinaryLed led = { .gpio = &led_pin };
1 change: 0 additions & 1 deletion firmware/quintuna/RSM/src/io/io_leds.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once
#include "io_led.h"
#include "hw_gpios.h"

extern const BinaryLed brake_light;
extern const BinaryLed led;
9 changes: 6 additions & 3 deletions firmware/quintuna/RSM/src/io/io_loadCell.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#pragma once
#include <stdio.h>
#include <stdbool.h>
#include "hw_adcs.h"

#ifdef TARGET_EMBEDDED
#include "hw_adcs.h"
typedef struct
{
const AdcChannel *src;

} LoadCell;
#else
#include "app_utils.h"
EMPTY_STRUCT(LoadCell);
#endif

bool io_loadCell_OCSC(const LoadCell *loadCell);
float io_loadCell_getMechanicalLoad(const LoadCell *loadCell);
Expand Down
8 changes: 7 additions & 1 deletion firmware/quintuna/RSM/src/io/io_suspension.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
#pragma once
#include <stdbool.h>
#include <hw_adcs.h>

#ifdef TARGET_EMBEDDED
#include "hw_adcs.h"

typedef struct
{
const AdcChannel *src;
} Suspension;
#else
#include "app_utils.h"
EMPTY_STRUCT(Suspension);
#endif

float io_suspension_getTravel(const Suspension *suspension);
bool io_suspension_OCSC(const Suspension *suspension);
Expand Down

0 comments on commit 99ce970

Please sign in to comment.