This commit is contained in:
King Kévin 2018-03-21 23:20:05 +01:00
parent ed8ce665fc
commit 3bde5daecd
7 changed files with 14 additions and 10 deletions

View File

@ -56,7 +56,7 @@ bool i2c_master_check_signals(uint32_t i2c);
* @return I2C return code
*/
enum i2c_master_rc i2c_master_start(uint32_t i2c);
/** select slave device
/** select I2C slave device
* @warning a start condition should be sent before this operation
* @param[in] i2c I2C base address
* @param[in] slave I2C address of slave device to select
@ -65,17 +65,17 @@ enum i2c_master_rc i2c_master_start(uint32_t i2c);
* @return I2C return code
*/
enum i2c_master_rc i2c_master_select_slave(uint32_t i2c, uint16_t slave, bool address_10bit, bool write);
/** read data
/** read data over I2C
* @warning the slave device must be selected before this operation
* @param[in] address_10bit if the I2C slave address is 10 bits wide
* @param[in] i2c I2C base address
* @param[out] data array to store bytes read
* @param[in] data_size number of bytes to read
* @return I2C return code
*/
enum i2c_master_rc i2c_master_read(uint32_t i2c, uint8_t* data, size_t data_size);
/** write data
/** write data over I2C
* @warning the slave device must be selected before this operation
* @param[in] address_10bit if the I2C slave address is 10 bits wide
* @param[in] i2c I2C base address
* @param[in] data array of byte to write to slave
* @param[in] data_size number of bytes to write
* @return I2C return code

View File

@ -40,13 +40,13 @@ struct menu_command_t {
/** parse command from line and call corresponding command
* @param[in] line use input to parse
* @param[in] command_list list of available commands
* @prarm[in] command_list_length number of available commands
* @param[in] command_list_length number of available commands
* @return if an command corresponding to the line has been found and called
*/
bool menu_handle_command(const char* line, const struct menu_command_t* command_list, size_t command_list_length);
/** print the commands from the command list
* @param[in] command_list list of available commands
* @prarm[in] command_list_length number of available commands
* @param[in] command_list_length number of available commands
*/
void menu_print_commands(const struct menu_command_t* command_list, size_t command_list_length);

View File

@ -16,7 +16,7 @@
* @file oled_ssd1306.c
* @author King Kévin <kingkevin@cuvoodoo.info>
* @date 2018
* @note peripherals used: I2C @ref oled_ssd1306_i2c, timer @ref i2c_master_timer
* @note peripherals used: I2C @ref oled_ssd1306_i2c
*/
/* standard libraries */
#include <stdint.h> // standard integer types

View File

@ -16,7 +16,7 @@
* @file oled_ssd1306.h
* @author King Kévin <kingkevin@cuvoodoo.info>
* @date 2018
* @note peripherals used: I2C @ref i2c_master_i2c, timer @ref i2c_master_timer
* @note peripherals used: I2C @ref oled_ssd1306_i2c
*/
/** setup OLED display

View File

@ -136,6 +136,7 @@ static size_t print_signed(char** str, size_t* size, int64_t d, uint32_t padding
* @param[in,out] size size of string
* @param[in] f floating number to be printed
* @param[in] padding number of 0's to pad
* @param[in] fractional numbers of digits after the decimal point
* @param[in] sign if sign should be printed
* @return number of characters printed
**/

View File

@ -25,7 +25,9 @@ extern char* terminal_prefix;
/** initialize terminal prompt */
void terminal_setup(void);
/** send character to terminal */
/** send character to terminal
* @param[in] c character to send
*/
void terminal_send(char c);
/** called when a line is entered

View File

@ -105,6 +105,7 @@ static const struct usb_endpoint_descriptor usb_cdcacm_communication_endpoints[]
/** USB CDC ACM functional descriptor
* @note as defined in USB CDC specification section 5.2.3
* @return packed structure
*/
static const struct {
struct usb_cdc_header_descriptor header; /**< header */