1 /* 2 * Copyright 2017, NXP 3 * All rights reserved. 4 * 5 * 6 * SPDX-License-Identifier: BSD-3-Clause 7 */ 8 9 #include <assert.h> 10 11 #include "srtm_channel.h" 12 #include "srtm_channel_struct.h" 13 14 /******************************************************************************* 15 * Definitions 16 ******************************************************************************/ 17 18 /******************************************************************************* 19 * Prototypes 20 ******************************************************************************/ 21 22 /******************************************************************************* 23 * Variables 24 ******************************************************************************/ 25 26 /******************************************************************************* 27 * Code 28 ******************************************************************************/ SRTM_Channel_Destroy(srtm_channel_t channel)29void SRTM_Channel_Destroy(srtm_channel_t channel) 30 { 31 assert(channel); 32 assert(channel->destroy); 33 34 channel->destroy(channel); 35 } 36 SRTM_Channel_Start(srtm_channel_t channel)37srtm_status_t SRTM_Channel_Start(srtm_channel_t channel) 38 { 39 assert(channel); 40 assert(channel->start); 41 42 return channel->start(channel); 43 } 44 SRTM_Channel_Stop(srtm_channel_t channel)45srtm_status_t SRTM_Channel_Stop(srtm_channel_t channel) 46 { 47 assert(channel); 48 assert(channel->stop); 49 50 return channel->stop(channel); 51 } 52 SRTM_Channel_SendData(srtm_channel_t channel,void * data,uint32_t len)53srtm_status_t SRTM_Channel_SendData(srtm_channel_t channel, void *data, uint32_t len) 54 { 55 assert(channel); 56 assert(channel->sendData); 57 58 return channel->sendData(channel, data, len); 59 } 60