From 5154fdecac5260ea3a2fd6416c1186eb4d609449 Mon Sep 17 00:00:00 2001 From: Aditya Naik Date: Mon, 3 Aug 2020 18:11:57 -0400 Subject: Added all functions into threads; cleaup --- include/main.h | 49 ++----------------------------------------------- include/stream.h | 7 ++++--- 2 files changed, 6 insertions(+), 50 deletions(-) (limited to 'include') diff --git a/include/main.h b/include/main.h index 6579484..60fe0a2 100644 --- a/include/main.h +++ b/include/main.h @@ -1,25 +1,11 @@ -/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.h * @brief : Header for main.c file. * This file contains the common defines of the application. ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** */ -/* USER CODE END Header */ -/* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __MAIN_H #define __MAIN_H @@ -27,43 +13,12 @@ extern "C" { #endif -/* Includes ------------------------------------------------------------------*/ #include "port.h" -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -/* Exported types ------------------------------------------------------------*/ -/* USER CODE BEGIN ET */ - -/* USER CODE END ET */ - -/* Exported constants --------------------------------------------------------*/ -/* USER CODE BEGIN EC */ - -/* USER CODE END EC */ - -/* Exported macro ------------------------------------------------------------*/ -/* USER CODE BEGIN EM */ - -/* USER CODE END EM */ - -/* Exported functions prototypes ---------------------------------------------*/ void Error_Handler(void); -/* USER CODE BEGIN EFP */ - -/* USER CODE END EFP */ - -/* Private defines -----------------------------------------------------------*/ -#define led_Pin GPIO_PIN_13 -#define led_GPIO_Port GPIOC -/* USER CODE BEGIN Private defines */ - -/* USER CODE END Private defines */ - +#define BUS_DEVICE_LIMIT 16 + #ifdef __cplusplus } #endif diff --git a/include/stream.h b/include/stream.h index 6bdc29e..96d9823 100644 --- a/include/stream.h +++ b/include/stream.h @@ -1,10 +1,11 @@ #include #include -typedef struct p_stream_s p_stream_t; +/* typedef struct p_stream_s p_stream_t; */ -struct p_stream_s { +typedef struct { int (*read)(uint8_t *buf, size_t len, void **vptr, void *sptr); int (*write)(uint8_t *buf, size_t len, void **vptr, void *sptr); + int (*init)(void **vptr, void *sptr); void **props; -}; +} p_stream_t; -- cgit v1.2.3