Commit f1076ac4 authored by Dean Camera's avatar Dean Camera
Browse files

Added const modifiers to device mode class drivers.

Added parameter directions to function parameter documentation.

Added new experimental FAST_STREAM_FUNCTIONS compile time option to speed up stream transfers at the expense of a higher FLASH consumption (needs testing to verify improved throughput).
parent 3cbdcd36
......@@ -164,10 +164,10 @@ void ReadNextReport(void)
/** Writes a report to the attached device.
*
* \param ReportOUTData Buffer containing the report to send to the device
* \param ReportIndex Index of the report in the device (zero if the device does not use multiple reports)
* \param ReportType Type of report to send, either HID_REPORTTYPE_OUTPUT or HID_REPORTTYPE_FEATURE
* \param ReportLength Length of the report to send
* \param[in] ReportOUTData Buffer containing the report to send to the device
* \param[in] ReportIndex Index of the report in the device (zero if the device does not use multiple reports)
* \param[in] ReportType Type of report to send, either HID_REPORTTYPE_OUTPUT or HID_REPORTTYPE_FEATURE
* \param[in] ReportLength Length of the report to send
*/
void WriteNextReport(uint8_t* ReportOUTData, uint8_t ReportIndex, uint8_t ReportType, uint16_t ReportLength)
{
......
......@@ -224,7 +224,7 @@ void Keyboard_HID_Task(void)
/** Processes a read HID report from an attached keyboard, extracting out elements via the HID parser results
* as required and prints pressed characters to the serial port. Each time a key is typed, a board LED is toggled.
*
* \param KeyboardReport Pointer to a HID report from an attached keyboard device
* \param[in] KeyboardReport Pointer to a HID report from an attached keyboard device
*/
void ProcessKeyboardReport(uint8_t* KeyboardReport)
{
......
......@@ -170,7 +170,7 @@ static uint8_t MassStore_WaitForDataReceived(void)
/** Sends or receives the transaction's data stage to or from the attached device, reading or
* writing to the nominated buffer.
*
* \param BufferPtr Pointer to the data buffer to read from or write to
* \param[in,out] BufferPtr Pointer to the data buffer to read from or write to
*
* \return A value from the Pipe_Stream_RW_ErrorCodes_t enum
*/
......@@ -269,7 +269,7 @@ uint8_t MassStore_MassStorageReset(void)
/** Issues a Mass Storage class specific request to determine the index of the highest numbered Logical
* Unit in the attached device.
*
* \param MaxLUNIndex Pointer to the location that the maximum LUN index value should be stored
* \param[out] MaxLUNIndex Pointer to the location that the maximum LUN index value should be stored
*
* \return A value from the USB_Host_SendControlErrorCodes_t enum
*/
......@@ -304,8 +304,8 @@ uint8_t MassStore_GetMaxLUN(uint8_t* const MaxLUNIndex)
/** Issues a SCSI Inquiry command to the attached device, to determine the device's information. This
* gives information on the device's capabilities.
*
* \param LUNIndex Index of the LUN inside the device the command is being addressed to
* \param InquiryPtr Pointer to the inquiry data structure where the inquiry data from the device is to be stored
* \param[in] LUNIndex Index of the LUN inside the device the command is being addressed to
* \param[out] InquiryPtr Pointer to the inquiry data structure where the inquiry data from the device is to be stored
*
* \return A value from the Pipe_Stream_RW_ErrorCodes_t enum
*/
......@@ -367,8 +367,8 @@ uint8_t MassStore_Inquiry(const uint8_t LUNIndex, const SCSI_Inquiry_Response_t*
/** Issues a SCSI Request Sense command to the attached device, to determine the current SCSI sense information. This
* gives error codes for the last issued SCSI command to the device.
*
* \param LUNIndex Index of the LUN inside the device the command is being addressed to
* \param SensePtr Pointer to the sense data structure where the sense data from the device is to be stored
* \param[in] LUNIndex Index of the LUN inside the device the command is being addressed to
* \param[out] SensePtr Pointer to the sense data structure where the sense data from the device is to be stored
*
* \return A value from the Pipe_Stream_RW_ErrorCodes_t enum
*/
......@@ -430,11 +430,11 @@ uint8_t MassStore_RequestSense(const uint8_t LUNIndex, const SCSI_Request_Sense_
/** Issues a SCSI Device Block Read command to the attached device, to read in one or more data blocks from the
* storage medium into a buffer.
*
* \param LUNIndex Index of the LUN inside the device the command is being addressed to
* \param BlockAddress Start block address to read from
* \param Blocks Number of blocks to read from the device
* \param BlockSize Size in bytes of each block to read
* \param BufferPtr Pointer to the buffer where the read data is to be written to
* \param[in] LUNIndex Index of the LUN inside the device the command is being addressed to
* \param[in] BlockAddress Start block address to read from
* \param[in] Blocks Number of blocks to read from the device
* \param[in] BlockSize Size in bytes of each block to read
* \param[out] BufferPtr Pointer to the buffer where the read data is to be written to
*
* \return A value from the Pipe_Stream_RW_ErrorCodes_t enum
*/
......@@ -501,11 +501,11 @@ uint8_t MassStore_ReadDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockAd
/** Issues a SCSI Device Block Write command to the attached device, to write one or more data blocks to the
* storage medium from a buffer.
*
* \param LUNIndex Index of the LUN inside the device the command is being addressed to
* \param BlockAddress Start block address to write to
* \param Blocks Number of blocks to write to in the device
* \param BlockSize Size in bytes of each block to write
* \param BufferPtr Pointer to the buffer where the write data is to be sourced from
* \param[in] LUNIndex Index of the LUN inside the device the command is being addressed to
* \param[in] BlockAddress Start block address to write to
* \param[in] Blocks Number of blocks to write to in the device
* \param[in] BlockSize Size in bytes of each block to write
* \param[in] BufferPtr Pointer to the buffer where the write data is to be sourced from
*
* \return A value from the Pipe_Stream_RW_ErrorCodes_t enum
*/
......@@ -565,7 +565,7 @@ uint8_t MassStore_WriteDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockA
/** Issues a SCSI Device Test Unit Ready command to the attached device, to determine if the device is ready to accept
* other commands.
*
* \param LUNIndex Index of the LUN inside the device the command is being addressed to
* \param[in] LUNIndex Index of the LUN inside the device the command is being addressed to
*
* \return A value from the Pipe_Stream_RW_ErrorCodes_t enum
*/
......@@ -613,8 +613,8 @@ uint8_t MassStore_TestUnitReady(const uint8_t LUNIndex)
/** Issues a SCSI Device Read Capacity command to the attached device, to determine the capacity of the
* given Logical Unit within the device.
*
* \param LUNIndex Index of the LUN inside the device the command is being addressed to
* \param CapacityPtr Device capacity structure where the capacity data is to be stored
* \param[in] LUNIndex Index of the LUN inside the device the command is being addressed to
* \param[out] CapacityPtr Device capacity structure where the capacity data is to be stored
*
* \return A value from the Pipe_Stream_RW_ErrorCodes_t enum
*/
......@@ -685,8 +685,8 @@ uint8_t MassStore_ReadCapacity(const uint8_t LUNIndex, SCSI_Capacity_t* const Ca
* being removed. This is a legacy command for SCSI disks with removable storage (such as ZIP disks), but should still
* be issued before the first read or write command is sent.
*
* \param LUNIndex Index of the LUN inside the device the command is being addressed to
* \param PreventRemoval Whether or not the LUN media should be locked to prevent removal or not
* \param[in] LUNIndex Index of the LUN inside the device the command is being addressed to
* \param[in] PreventRemoval Whether or not the LUN media should be locked to prevent removal or not
*
* \return A value from the Pipe_Stream_RW_ErrorCodes_t enum
*/
......
......@@ -42,7 +42,7 @@
#include "MassStorageHost.h"
#include "SCSI_Codes.h"
#include <LUFA/Drivers/USB/USB.h> // USB Functionality
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
/** Class specific request to reset the Mass Storage interface of the attached device */
......
......@@ -349,9 +349,9 @@ void MassStorage_Task(void)
* printing error codes to the serial port and waiting until the device is removed before
* continuing.
*
* \param CommandString ASCII string located in PROGMEM space indicating what operation failed
* \param FailedAtSCSILayer Indicates if the command failed at the (logical) SCSI layer or at the physical USB layer
* \param ErrorCode Error code of the function which failed to complete successfully
* \param[in] CommandString ASCII string located in PROGMEM space indicating what operation failed
* \param[in] FailedAtSCSILayer Indicates if the command failed at the (logical) SCSI layer or at the physical USB layer
* \param[in] ErrorCode Error code of the function which failed to complete successfully
*/
void ShowDiskReadError(char* CommandString, bool FailedAtSCSILayer, uint8_t ErrorCode)
{
......
......@@ -49,12 +49,12 @@
#include "Lib/MassStoreCommands.h"
#include <LUFA/Version.h> // Library Version Information
#include <LUFA/Drivers/Misc/TerminalCodes.h> // ANSI Terminal Escape Codes
#include <LUFA/Drivers/USB/USB.h> // USB Functionality
#include <LUFA/Drivers/Peripheral/SerialStream.h> // Serial stream driver
#include <LUFA/Drivers/Board/LEDs.h> // LEDs driver
#include <LUFA/Drivers/Board/Buttons.h> // Board Buttons driver
#include <LUFA/Version.h>
#include <LUFA/Drivers/Misc/TerminalCodes.h>
#include <LUFA/Drivers/USB/USB.h>
#include <LUFA/Drivers/Peripheral/SerialStream.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/Board/Buttons.h>
/* Macros: */
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
......
......@@ -224,7 +224,7 @@ void Mouse_HID_Task(void)
/** Processes a read HID report from an attached mouse, extracting out elements via the HID parser results
* as required and displays movement and button presses on the board LEDs.
*
* \param MouseReport Pointer to a HID report from an attached mouse device
* \param[in] MouseReport Pointer to a HID report from an attached mouse device
*/
void ProcessMouseReport(uint8_t* MouseReport)
{
......
......@@ -190,8 +190,8 @@ uint8_t SImage_RecieveBlockHeader(void)
/** Function to send the given data to the device, after a command block has been issued.
*
* \param Buffer Source data buffer to send to the device
* \param Bytes Number of bytes to send
* \param[in] Buffer Source data buffer to send to the device
* \param[in] Bytes Number of bytes to send
*/
void SImage_SendData(void* Buffer, uint16_t Bytes)
{
......@@ -211,8 +211,8 @@ void SImage_SendData(void* Buffer, uint16_t Bytes)
/** Function to receive the given data to the device, after a response block has been received.
*
* \param Buffer Destination data buffer to put read bytes from the device
* \param Bytes Number of bytes to receive
* \param[out] Buffer Destination data buffer to put read bytes from the device
* \param[in] Bytes Number of bytes to receive
*
* \return A value from the Pipe_Stream_RW_ErrorCodes_t enum
*/
......@@ -257,7 +257,7 @@ bool SImage_IsEventReceived(void)
/** Clears the stall condition in the attached device on the nominated endpoint number.
*
* \param EndpointNum Endpoint number in the attached device whose stall condition is to be cleared
* \param[in] EndpointNum Endpoint number in the attached device whose stall condition is to be cleared
*
* \return A value from the USB_Host_SendControlErrorCodes_t enum
*/
......
......@@ -57,7 +57,7 @@
/** Used in the DataLength field of a PIMA container, to give the total container size in bytes for
* a command container.
*
* \param params Number of parameters which are to be sent in the Param field of the container
* \param[in] params Number of parameters which are to be sent in the Param field of the container
*/
#define PIMA_COMMAND_SIZE(params) ((sizeof(PIMA_SendBlock) - sizeof(PIMA_SendBlock.Params)) + \
(params * sizeof(PIMA_SendBlock.Params[0])))
......@@ -65,7 +65,7 @@
/** Used in the DataLength field of a PIMA container, to give the total container size in bytes for
* a data container.
*
* \param datalen Length in bytes of the data in the container
* \param[in] datalen Length in bytes of the data in the container
*/
#define PIMA_DATA_SIZE(datalen) ((sizeof(PIMA_SendBlock) - sizeof(PIMA_SendBlock.Params)) + datalen)
......
......@@ -327,8 +327,8 @@ void StillImage_Task(void)
/** Function to convert a given Unicode encoded string to ASCII. This function will only work correctly on Unicode
* strings which contain ASCII printable characters only.
*
* \param UnicodeString Pointer to a Unicode encoded input string
* \param Buffer Pointer to a buffer where the converted ASCII string should be stored
* \param[in] UnicodeString Pointer to a Unicode encoded input string
* \param[out] Buffer Pointer to a buffer where the converted ASCII string should be stored
*/
void UnicodeToASCII(uint8_t* UnicodeString, char* Buffer)
{
......@@ -351,8 +351,8 @@ void UnicodeToASCII(uint8_t* UnicodeString, char* Buffer)
/** Displays a PIMA command error via the device's serial port.
*
* \param ErrorCode Error code of the function which failed to complete successfully
* \param ResponseCodeError Indicates if the error is due to a command failed indication from the device, or a communication failure
* \param[in] ErrorCode Error code of the function which failed to complete successfully
* \param[in] ResponseCodeError Indicates if the error is due to a command failed indication from the device, or a communication failure
*/
void ShowCommandError(uint8_t ErrorCode, bool ResponseCodeError)
{
......
......@@ -121,7 +121,7 @@
*
* \ingroup Group_BitManip
*
* \param Byte Byte of data whose bits are to be reversed
* \param[in] Byte Byte of data whose bits are to be reversed
*/
static inline uint8_t BitReverse(uint8_t Byte) ATTR_WARN_UNUSED_RESULT ATTR_CONST;
static inline uint8_t BitReverse(uint8_t Byte)
......@@ -137,7 +137,7 @@
*
* \ingroup Group_BitManip
*
* \param Word Word of data whose bytes are to be swapped
* \param[in] Word Word of data whose bytes are to be swapped
*/
static inline uint16_t SwapEndian_16(uint16_t Word) ATTR_WARN_UNUSED_RESULT ATTR_CONST;
static inline uint16_t SwapEndian_16(uint16_t Word)
......@@ -149,7 +149,7 @@
*
* \ingroup Group_BitManip
*
* \param DWord Double word of data whose bytes are to be swapped
* \param[in] DWord Double word of data whose bytes are to be swapped
*/
static inline uint32_t SwapEndian_32(uint32_t DWord) ATTR_WARN_UNUSED_RESULT ATTR_CONST;
static inline uint32_t SwapEndian_32(uint32_t DWord)
......@@ -164,8 +164,8 @@
*
* \ingroup Group_BitManip
*
* \param Data Pointer to a number containing an even number of bytes to be reversed
* \param Bytes Length of the data in bytes
* \param[in,out] Data Pointer to a number containing an even number of bytes to be reversed
* \param[in] Bytes Length of the data in bytes
*/
static inline void SwapEndian_n(uint8_t* Data, uint8_t Bytes);
static inline void SwapEndian_n(uint8_t* Data, uint8_t Bytes)
......
......@@ -85,8 +85,8 @@
* the total number of pages contained in the boards dataflash ICs, all dataflash ICs
* are deselected.
*
* \param PageAddress Address of the page to manipulate, ranging from
* ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1).
* \param[in] PageAddress Address of the page to manipulate, ranging from
* ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1).
*/
static inline void Dataflash_SelectChipFromPage(const uint16_t PageAddress)
{
......@@ -102,8 +102,8 @@
/** Sends a set of page and buffer address bytes to the currently selected dataflash IC, for use with
* dataflash commands which require a complete 24-byte address.
*
* \param PageAddress Page address within the selected dataflash IC
* \param BufferByte Address within the dataflash's buffer
* \param[in] PageAddress Page address within the selected dataflash IC
* \param[in] BufferByte Address within the dataflash's buffer
*/
static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, const uint16_t BufferByte)
{
......
......@@ -86,8 +86,8 @@
/** Selects the given dataflash chip.
*
* \param ChipMask Mask of the Dataflash IC to select, in the form of DATAFLASH_CHIPn mask (where n is
* the chip number).
* \param[in] ChipMask Mask of the Dataflash IC to select, in the form of DATAFLASH_CHIPn mask (where n is
* the chip number).
*/
static inline void Dataflash_SelectChip(uint8_t ChipMask);
......@@ -105,7 +105,7 @@
/* Inline Functions: */
/** Sends a byte to the currently selected dataflash IC, and returns a byte from the dataflash.
*
* \param Byte of data to send to the dataflash
* \param[in] Byte of data to send to the dataflash
*
* \return Last response byte from the dataflash
*/
......@@ -117,7 +117,7 @@
/** Sends a byte to the currently selected dataflash IC, and ignores the next byte from the dataflash.
*
* \param Byte of data to send to the dataflash
* \param[in] Byte of data to send to the dataflash
*/
static inline void Dataflash_SendByte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
static inline void Dataflash_SendByte(const uint8_t Byte)
......@@ -154,7 +154,7 @@
/** Initializes the dataflash driver (including the SPI driver) so that commands and data may be
* sent to an attached dataflash IC.
*
* \param PrescalerMask SPI prescaler mask, see SPI.h documentation
* \param[in] PrescalerMask SPI prescaler mask, see SPI.h documentation
*/
static inline void Dataflash_Init(const uint8_t PrescalerMask)
{
......@@ -191,16 +191,16 @@
* the total number of pages contained in the boards dataflash ICs, all dataflash ICs
* are deselected.
*
* \param PageAddress Address of the page to manipulate, ranging from
* ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1).
* \param[in] PageAddress Address of the page to manipulate, ranging from
* ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1).
*/
static inline void Dataflash_SelectChipFromPage(const uint16_t PageAddress);
/** Sends a set of page and buffer address bytes to the currently selected dataflash IC, for use with
* dataflash commands which require a complete 24-byte address.
*
* \param PageAddress Page address within the selected dataflash IC
* \param BufferByte Address within the dataflash's buffer
* \param[in] PageAddress Page address within the selected dataflash IC
* \param[in] BufferByte Address within the dataflash's buffer
*/
static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, const uint16_t BufferByte);
......
......@@ -117,28 +117,28 @@
/** Turns on the LEDs specified in the given LED mask.
*
* \param LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file)
* \param[in] LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file)
*/
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask);
/** Turns off the LEDs specified in the given LED mask.
*
* \param LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file)
* \param[in] LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file)
*/
static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask);
/** Turns off all LEDs not specified in the given LED mask, and turns on all the LEDs in the given LED
* mask.
*
* \param LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file)
* \param[in] LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file)
*/
static inline void LEDs_SetAllLEDs(const uint8_t LEDMask);
/** Turns off all LEDs in the LED mask that are not set in the active mask, and turns on all the LEDs
* specified in both the LED and active masks.
*
* \param LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file)
* \param ActiveMask Mask of whether the LEDs in the LED mask should be turned on or off
* \param[in] LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file)
* \param[in] ActiveMask Mask of whether the LEDs in the LED mask should be turned on or off
*/
static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask);
......
......@@ -85,8 +85,8 @@
* the total number of pages contained in the boards dataflash ICs, all dataflash ICs
* are deselected.
*
* \param PageAddress Address of the page to manipulate, ranging from
* ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1).
* \param[in] PageAddress Address of the page to manipulate, ranging from
* ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1).
*/
static inline void Dataflash_SelectChipFromPage(const uint16_t PageAddress)
{
......@@ -101,8 +101,8 @@
/** Sends a set of page and buffer address bytes to the currently selected dataflash IC, for use with
* dataflash commands which require a complete 24-byte address.
*
* \param PageAddress Page address within the selected dataflash IC
* \param BufferByte Address within the dataflash's buffer
* \param[in] PageAddress Page address within the selected dataflash IC
* \param[in] BufferByte Address within the dataflash's buffer
*/
static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, const uint16_t BufferByte)
{
......
......@@ -85,8 +85,8 @@
* the total number of pages contained in the boards dataflash ICs, all dataflash ICs
* are deselected.
*
* \param PageAddress Address of the page to manipulate, ranging from
* ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1).
* \param[in] PageAddress Address of the page to manipulate, ranging from
* ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1).
*/
static inline void Dataflash_SelectChipFromPage(const uint16_t PageAddress)
{
......@@ -101,8 +101,8 @@
/** Sends a set of page and buffer address bytes to the currently selected dataflash IC, for use with
* dataflash commands which require a complete 24-byte address.
*
* \param PageAddress Page address within the selected dataflash IC
* \param BufferByte Address within the dataflash's buffer
* \param[in] PageAddress Page address within the selected dataflash IC
* \param[in] BufferByte Address within the dataflash's buffer
*/
static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, const uint16_t BufferByte)
{
......
......@@ -88,8 +88,8 @@
* the total number of pages contained in the boards dataflash ICs, all dataflash ICs
* are deselected.
*
* \param PageAddress Address of the page to manipulate, ranging from
* ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1).
* \param[in] PageAddress Address of the page to manipulate, ranging from
* ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1).
*/
static inline void Dataflash_SelectChipFromPage(const uint16_t PageAddress)
{
......@@ -107,8 +107,8 @@
/** Sends a set of page and buffer address bytes to the currently selected dataflash IC, for use with
* dataflash commands which require a complete 24-byte address.
*
* \param PageAddress Page address within the selected dataflash IC
* \param BufferByte Address within the dataflash's buffer
* \param[in] PageAddress Page address within the selected dataflash IC
* \param[in] BufferByte Address within the dataflash's buffer
*/
static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, const uint16_t BufferByte)
{
......
......@@ -115,7 +115,7 @@
* The "mode" parameter should be a mask comprised of a conversion mode (free running or single) and
* prescaler masks.
*
* \param Mode Mask of ADC settings, including adjustment, prescale, mode and reference
* \param[in] Mode Mask of ADC settings, including adjustment, prescale, mode and reference
*/
static inline void ADC_Init(uint8_t Mode);
......@@ -159,7 +159,7 @@
* associated port pin as an input and disables the digital portion of the I/O to reduce
* power consumption.
*
* \param Channel ADC channel number to set up for conversions
* \param[in] Channel ADC channel number to set up for conversions
*/
static inline void ADC_SetupChannel(const uint8_t Channel)
{
......@@ -196,7 +196,7 @@
* Once executed, the conversion status can be determined via the \ref ADC_IsReadingComplete() macro and
* the result read via the \ref ADC_GetResult() macro.
*
* \param MUXMask Mask comprising of an ADC channel number, reference mask and adjustment mask
* \param[in] MUXMask Mask comprising of an ADC channel number, reference mask and adjustment mask
*/
static inline void ADC_StartReading(const uint8_t MUXMask)
{
......@@ -208,7 +208,7 @@
/** Performs a complete single reading from channel, including a polling spinloop to wait for the
* conversion to complete, and the returning of the converted value.
*
* \param MUXMask Mask comprising of an ADC channel number, reference mask and adjustment mask
* \param[in] MUXMask Mask comprising of an ADC channel number, reference mask and adjustment mask
*/
static inline uint16_t ADC_GetChannelReading(const uint8_t MUXMask) ATTR_WARN_UNUSED_RESULT;
static inline uint16_t ADC_GetChannelReading(const uint8_t MUXMask)
......
......@@ -90,8 +90,8 @@
/** Initializes the SPI subsystem, ready for transfers. Must be called before calling any other
* SPI routines.
*
* \param PrescalerMask Prescaler mask to set the SPI clock speed
* \param Master If true, sets the SPI system to use master mode, slave if false
* \param[in] PrescalerMask Prescaler mask to set the SPI clock speed
* \param[in] Master If true, sets the SPI system to use master mode, slave if false
*/
static inline void SPI_Init(const uint8_t PrescalerMask, const bool Master)
{
......@@ -109,7 +109,7 @@
/** Sends and receives a byte through the SPI interface, blocking until the transfer is complete.
*
* \param Byte Byte to send through the SPI interface
* \param[in] Byte Byte to send through the SPI interface
*
* \return Response byte from the attached SPI device
*/
......@@ -124,7 +124,7 @@
/** Sends a byte through the SPI interface, blocking until the transfer is complete. The response
* byte sent to from the attached SPI device is ignored.
*
* \param Byte Byte to send through the SPI interface
* \param[in] Byte Byte to send through the SPI interface
*/
static inline void SPI_SendByte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
static inline void SPI_SendByte(const uint8_t Byte)
......
......@@ -88,13 +88,13 @@
/* Function Prototypes: */
/** Transmits a given string located in program space (FLASH) through the USART.
*
* \param FlashStringPtr Pointer to a string located in program space
* \param[in] FlashStringPtr Pointer to a string located in program space
*/
void Serial_TxString_P(const char *FlashStringPtr) ATTR_NON_NULL_PTR_ARG(1);
/** Transmits a given string located in SRAM memory through the USART.
*
* \param StringPtr Pointer to a string located in SRAM space
* \param[in] StringPtr Pointer to a string located in SRAM space
*/
void Serial_TxString(const char *StringPtr) ATTR_NON_NULL_PTR_ARG(1);
......@@ -102,8 +102,8 @@
/** Initializes the USART, ready for serial data transmission and reception. This initialises the interface to
* standard 8-bit, no parity, 1 stop bit settings suitable for most applications.
*
* \param BaudRate Serial baud rate, in bits per second
* \param DoubleSpeed Enables double speed mode when set, halving the sample time to double the baud rate
* \param[in] BaudRate Serial baud rate, in bits per second
* \param[in] DoubleSpeed Enables double speed mode when set, halving the sample time to double the baud rate
*/
static inline void Serial_Init(const uint32_t BaudRate, const bool DoubleSpeed)
{
......@@ -119,7 +119,7 @@
/** Transmits a given byte through the USART.
*
* \param DataByte Byte to transmit through the USART
* \param[in] DataByte Byte to transmit through the USART
*/
static inline void Serial_TxByte(const char DataByte)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment