[SOLVED]Function Naming

Thread Starter

Pushkar1

Joined Apr 5, 2021
416
As we send data from microcontroller to any device or receive data from any device.

I found that read-write naming is used at some places and send receive is used at some places in c code.

For example if I want to send to PC & receive data from PC through Uart protocol

Which function name will you suggest? Read/ Write or Send/Receive or Transfer/ Receive?

I know function names can be anything of choice but I want advice, what do you prefer in your code
 
Last edited:

click_here

Joined Sep 22, 2020
548
What compiler do you use?

The reason that I ask is that some compilers have advantages to using a certain name.

For example, calling your USART send function "putch()" with the XC8 compiler allows you to utilise the stdio functions for stdout
 
Top