ECU/src/02- HAL/02- SIM800L/GSM_program.c
static Error_Status GSM_enumSendFTPCommand( const u8* pu8Command, const u8* parameter) {
	u8 buffer[9];	/* \r\nOK\r\n or \r\nERROR\r\n */
	vidClearBuffer(buffer, 9);
	USART_enumDMAReceive( GSM_u8USARTChannel, DMA_CHANNEL_5, (u32*) buffer, 9 );

	if( parameter != nullPointer ) {
		USART_voidSendString(GSM_u8USARTChannel, pu8Command);
		USART_voidSendString(GSM_u8USARTChannel, "=\"");
		USART_voidSendString(GSM_u8USARTChannel, parameter);
		USART_voidSendString(GSM_u8USARTChannel, "\"\r\n");
	} else {}

	while ( !u8CheckBufferTermination( buffer, 9, 2 ) );
	DMA_voidDisable(DMA_CHANNEL_5);

	if (enuFindString( buffer, "OK", 9 ) == NOK) {
		return NOK;
	}

	return OK;
}
/*
 * @brief it serves GSM_enumFTPRequest function only to send some commands
 * @param pu8Command: command to transmit
 * @param parameter: parameters included in the command
 * 					if parameter existed --> provide it
 * 					if not existed --> write NULL
 */
@brief it serves GSM_enumFTPRequest function only to send some commands
@param pu8Command: command to transmit
@param parameter: parameters included in the command
if parameter existed --> provide it
if not existed --> write NULL
@brief it serves GSM_enumFTPRequest function only to send some commands @param pu8Command : command to transmit @param parameter : parameters included in the command if parameter existed -- > provide it if not existed -- > write NULL
static Error_Status GSM_enumSendFTPCommand( const u8* pu8Command, const u8* parameter) {
	u8 buffer[9];	
	vidClearBuffer(buffer, 9);
	USART_enumDMAReceive( GSM_u8USARTChannel, DMA_CHANNEL_5, (u32*) buffer, 9 );
	if( parameter != nullPointer ) {
		USART_voidSendString(GSM_u8USARTChannel, pu8Command);
		USART_voidSendString(GSM_u8USARTChannel, "=\"");
		USART_voidSendString(GSM_u8USARTChannel, parameter);
		USART_voidSendString(GSM_u8USARTChannel, "\"\r\n");
	} else {}
	while ( !u8CheckBufferTermination( buffer, 9, 2 ) );
	DMA_voidDisable(DMA_CHANNEL_5);
	if (enuFindString( buffer, "OK", 9 ) == NOK) {
		return NOK;
	}
	return OK;
}
static Error_Status GSM_enumSendFTPCommand ( const u8 * pu8Command , const u8 * parameter ) { u8 buffer [ 9 ] ; vidClearBuffer ( buffer , 9 ) ; USART_enumDMAReceive ( GSM_u8USARTChannel , DMA_CHANNEL_5 , ( u32 * ) buffer , 9 ) ; if ( parameter != nullPointer ) { USART_voidSendString ( GSM_u8USARTChannel , pu8Command ) ; USART_voidSendString ( GSM_u8USARTChannel , " \" " ) ; USART_voidSendString ( GSM_u8USARTChannel , parameter ) ; USART_voidSendString ( GSM_u8USARTChannel , " \" \r \n " ) ; } else { } while ( ! u8CheckBufferTermination ( buffer , 9 , 2 ) ) ; DMA_voidDisable ( DMA_CHANNEL_5 ) ; if ( enuFindString ( buffer , " " , 9 ) == NOK ) { return NOK ; } return OK ; }
@brief it serves GSM_enumFTPRequest function only to send some commands
 @param pu8Command: command to transmit
 @param parameter: parameters included in the command
                                      if parameter existed --> provide it
                                      if not existed --> write NULL
@brief it serves GSM_enumFTPRequest function only to send some commands @param pu8Command : command to transmit @param parameter : parameters included in the command if parameter existed -- > provide it if not existed -- > write NULL
/* \r\nOK\r\n or \r\nERROR\r\n */