O2S C Library 1.8.2
Provide high-level data-structures and other fundamental tools for C projects
Loading...
Searching...
No Matches
close.c
1/* ************************************************************************** */
2/* ____ _ _____ ____ _ _ _ _____ _ _ ____ ____ */
3/* / ___| / \ | ___| _ \ / \ | \ | | |_ _| || | | _ \/ ___| */
4/* \___ \ / _ \ | |_ | |_) | / _ \ | \| | | | | || |_| | | \___ \ */
5/* ___) / ___ \| _| | _ < / ___ \| |\ | | | |__ _| |_| |___) | */
6/* |____/_/ \_|_| |_| \_/_/ \_|_| \_| |_| |_| |____/|____/ */
7/* */
8/* Copyright 2023, SAFRAN T4DS, ALL RIGHTS RESERVED */
9/* */
10/* @file close.c */
11/* @author Antoine GAGNIERE */
12/* */
13/* ************************************************************************** */
14
16#include "o2s/serial.h"
17
18#include <stdlib.h> // free
19
21void serial_close(serial_port_t* port)
22{
23 file_close(&port->file);
24}
25
27void serial_free(serial_port_t** port)
28{
29 serial_close(*port);
30 free(*port);
31 *port = NULL;
32}
void file_close(ifstream_t *file)
Release resources to the system.
Definition close.c:30
Buffered file reader.
Configure and read from serial ports as buffered input streams.