balcony_weather_station/pms5003.h
2025-04-09 18:39:23 +02:00

20 lines
410 B
C

#ifndef PMS5003_H
#define PMS5003_H
#include "hardware/uart.h"
#include <stdint.h>
typedef struct {
float pm1;
float pm2_5;
float pm10;
} pms5003_reading;
typedef struct {
uart_inst_t *uart;
} pms5003_config;
void pms5003_init(pms5003_config *config, uart_inst_t *uart, uint8_t tx_pin,
uint8_t rx_pin);
pms5003_reading pms5003_read(pms5003_config *config);
#endif /* PMS5003_H */