From f09877921a31372f9c9cb778d5978dd4b5e7bcbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Mon, 24 Feb 2020 19:16:46 +0100 Subject: [PATCH] start onewire interface --- .../include/reflow-controller/onewire-if.h | 32 +++++++++++++++++++ stm-firmware/onewire-if.c | 21 ++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 stm-firmware/include/reflow-controller/onewire-if.h create mode 100644 stm-firmware/onewire-if.c diff --git a/stm-firmware/include/reflow-controller/onewire-if.h b/stm-firmware/include/reflow-controller/onewire-if.h new file mode 100644 index 0000000..07d4137 --- /dev/null +++ b/stm-firmware/include/reflow-controller/onewire-if.h @@ -0,0 +1,32 @@ +/* Reflow Oven Controller +* +* Copyright (C) 2020 Mario Hüttel +* +* This file is part of the Reflow Oven Controller Project. +* +* The reflow oven controller is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* The Reflow Oven Control Firmware is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with the reflow oven controller project. +* If not, see . +*/ + +#ifndef __ONEWIRE_IF_H__ +#define __ONEWIRE_IF_H__ + +#include + +int onewire_if_init_uart(struct stm_uart *uart); + +int onewire_if_send_byte(struct stm_uart *uart); + +int onewire_if_receive_byte(struct stm_uart *uart); + +#endif /* __ONEWIRE_IF_H__ */ diff --git a/stm-firmware/onewire-if.c b/stm-firmware/onewire-if.c new file mode 100644 index 0000000..67ebccc --- /dev/null +++ b/stm-firmware/onewire-if.c @@ -0,0 +1,21 @@ +/* Reflow Oven Controller +* +* Copyright (C) 2020 Mario Hüttel +* +* This file is part of the Reflow Oven Controller Project. +* +* The reflow oven controller is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* The Reflow Oven Control Firmware is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with the reflow oven controller project. +* If not, see . +*/ + +#include