Giter VIP home page Giter VIP logo

stm_projects's Introduction

STM_Projects

New Usart Lib created by Deepak kumar

stm_uart.h and stm_uart.c

It works for Transmission of the data from the USART2

----------------For using USART----------------------- --location of Include file STM_Projects/Drivers/Device/New_Lib/Include --source file STM_Projects/Drivers/Device/New_Lib/src

(1) define the USART varible in main file of type
--var Usart_Handle_Type --var uint8_t

(2) function declaration and initialization

Example:-

void USART_Config() { usart2.Instance = USART2; usart2.init.Data_Word_length = DATA_WORD_8_BIT; usart2.init.Stop_Bit = STOP_BIT_ONE; usart2.init.Baud_Rate = 9600; usart2.init.Parity_Bit = PARITY_NONE; usart2.init.Usart_Mode = UART_MODE_TX_RX; usart2.init.Oversampling = OVERSAMPLING_BY_16;

if(Stm_Usart_Init(&usart2) != Success)
{
	/* add code for error handling*/
}

}

(3) fuction for transmission

	Stm_Usart_Receive(&usart2, &data, sizeof(data));                 *****for receiving  @note it will block the process due to 																								while loop
	Stm_Usart_Transmitt(&usart2, &data, sizeof(data));				 *****for sending    	



	Use handle var in place of "usart2"
	Use data   var in place of "data"

for more information look into "main.c" and "stm_uart.h" files

stm_projects's People

Contributors

deepak9k avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.