AVRly - AVR Development Resources
filename.c File Reference

The brief description goes here, keep it relatively short and to the point. More...

#include <stdint.h>
#include <util/delay.h>
#include "pin_defines.h"
#include "filename.h"

Go to the source code of this file.

Macros

#define DECIMAL_MACRO   855U
 Next come #define statements/macros. More...
 

Functions

void do_some_helpful_stuff (void)
 Helper function definitions come last, though their declarations are at the top of the file. More...
 
void init_object (uint16_t value)
 This is a Javadoc autobrief style comment. More...
 
uint16_t get_value (void)
 Other public function declarations come afterwards. More...
 

Detailed Description

The brief description goes here, keep it relatively short and to the point.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Author
Your Name Here.
Date
15th March 2022

After the brief comes the detailed description. Add an explanation of the purpose and limitations of the module, along with any other notes that may be useful to others using it.

See also
"See also" links go here https://www.doxygen.nl/manual/docblocks.html

Definition in file filename.c.

Macro Definition Documentation

◆ DECIMAL_MACRO

#define DECIMAL_MACRO   855U

Next come #define statements/macros.

Append integer values with a 'U' to make them unsigned, as the default type is signed integer.

Definition at line 56 of file filename.c.

Function Documentation

◆ do_some_helpful_stuff()

void do_some_helpful_stuff ( void  )

Helper function definitions come last, though their declarations are at the top of the file.

Definition at line 97 of file filename.c.

98{
99 // Body of function definition goes here.
100}

◆ init_object()

void init_object ( uint16_t  value)

This is a Javadoc autobrief style comment.

After the first full stop the text becomes a detailed description. Explain how to use the function here. Initialisation function names should start with 'init' and appear first.

Parameters
Listthe parameters here.
Returns
Declare the return type here (not needed for void return type).

Definition at line 74 of file filename.c.

75{
76 OBJECT_DDR |= (1 << OBJECT_GPIO); // Set object gpio as output.
77
78 OBJECT_PORT |= (1 << OBJECT_GPIO); // Set level of OBJECT_GPIO high.
79
80 // Do some other stuff with the parameters
81}
#define OBJECT_PORT
Defines the AVR port we have wired our peripheral to.
Definition: pin_defines.h:43
#define OBJECT_GPIO
Defines the GPIO number the peripheral is wired to.
Definition: pin_defines.h:53
#define OBJECT_DDR
Defines the Data Direction Register for the GPIO connected to our peripheral.
Definition: pin_defines.h:48

◆ get_value()

uint16_t get_value ( void  )

Other public function declarations come afterwards.

Returns
Returns a 16 bit unsigned integer. Returns are documented like this.

Definition at line 87 of file filename.c.

88{
89 return file_scope_variable;
90}