Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New documentation system #1766

Merged
merged 41 commits into from
Jul 22, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
d60061e
Revise document build system
mikee47 Jul 17, 2019
538e1d6
Update main makefiles
mikee47 Jul 17, 2019
969131a
Add docs to travis build
mikee47 Jul 16, 2019
ce111e1
Import images, convert existing text (including Wiki) to reStructured…
mikee47 Jul 8, 2019
79e08f0
Home: Edit contents readme into index.rst
mikee47 Jul 15, 2019
b7ef281
Emulator: update with note on Windows requirements
mikee47 Jul 15, 2019
2fcdd38
Add `Information` section, pull in debug images
mikee47 Jul 15, 2019
dc716a6
Add upgrade notes
mikee47 Jul 16, 2019
bd1ed92
Add `experimental` section
mikee47 Jul 15, 2019
13734d5
Add `tools` section
mikee47 Jul 16, 2019
2f767fd
Add `troubleshooting` section
mikee47 Jul 15, 2019
207f75d
Add `contribute` section, include new page on documentation system
mikee47 Jul 15, 2019
1f51b62
Edit coding style guide
mikee47 Jul 16, 2019
de3d9e4
Add `Quick Start` section, update guides
mikee47 Jul 17, 2019
7244df1
Add `api` section (to be completed), update Doxygen config
mikee47 Jul 15, 2019
d5ef8e5
Fix most doxygen warnings in code comments
mikee47 Jul 16, 2019
c36c2ee
Components: Move content from `features` into README files
mikee47 Jul 15, 2019
d6b5bff
Components: Add README files
mikee47 Jul 15, 2019
5edb1f7
Libraries: Pull in README files and fix titles
mikee47 Jul 17, 2019
1edab00
Libraries: Track down missing README files
mikee47 Jul 14, 2019
3c9a319
Samples: Move images into sample directories
mikee47 Jul 15, 2019
2aba79c
Samples: About to convert .md into .rst
mikee47 Jul 11, 2019
3560875
Samples: .md -> .rst
mikee47 Jul 15, 2019
8e8d032
Samples: Update README.rst files
mikee47 Jul 15, 2019
4b34797
Samples: Add 'todo' readme files for remaining samples
mikee47 Jul 11, 2019
3ad7d64
Reorganization of the content. The goal is to be able to learn about …
slav-at-attachix Jul 18, 2019
01ac58d
Minor changes to the content.
slav-at-attachix Jul 19, 2019
dec2a2a
Revise `HttpClient` sample readme to reflect new build system.
mikee47 Jul 18, 2019
8c13954
Minor doc fixes
mikee47 Jul 18, 2019
8e9e442
Add logo
mikee47 Jul 19, 2019
9a6c809
Generate index file containing reference information
mikee47 Jul 19, 2019
5a5412b
Move `Yeelight` into `Libraries`
mikee47 Jul 20, 2019
033a42d
Update environment variable lists
mikee47 Jul 20, 2019
5e3b300
Add section on device configuration to Esp8266 getting-started page
mikee47 Jul 20, 2019
8789bc6
Update macos start
mikee47 Jul 20, 2019
7405a26
Move samples and libraries index into root source directory
mikee47 Jul 20, 2019
fd17b28
Update `Basic_Ssl`, `Echo_Ssl` and `HttpClient` sample readme.
mikee47 Jul 20, 2019
7889fe6
Removed unnecessary level and stale text.
slav-at-attachix Jul 20, 2019
6fe9e6a
Add 'about' page with license info.
mikee47 Jul 21, 2019
db311d6
Add doc comments to `Print` class
mikee47 Jul 21, 2019
a06d6ec
Replace `api` section with generated doxygen HTML, including graphs
mikee47 Jul 21, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix most doxygen warnings in code comments
  • Loading branch information
mikee47 committed Jul 21, 2019
commit d5ef8e59432b3425354806c1dbce662508c492df
4 changes: 2 additions & 2 deletions Sming/Arch/Esp8266/Components/gdbstub/GdbPacket.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ class GdbPacket

/** @brief Encode a value as hex characters, LSB first
* @param dst Location for output, will NOT be nul-terminated
* @param srcData Data bytes to encode
* @param src Data bytes to encode
* @param size Size of source data in bytes
* @Note destination buffer must have enough space for (size * 2) chars
* @note destination buffer must have enough space for (size * 2) chars
*/
static void encodeHexBlock(char* dst, const void* src, size_t size);

Expand Down
72 changes: 37 additions & 35 deletions Sming/Arch/Esp8266/Components/spi_flash/include/esp_spi_flash.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ extern "C" {

#include <user_config.h>

// Flash memory access must be aligned and in multiples of 4-byte words
/// Flash memory access must be aligned and in multiples of 4-byte words
#define INTERNAL_FLASH_WRITE_UNIT_SIZE 4
#define INTERNAL_FLASH_READ_UNIT_SIZE 4

#define FLASH_TOTAL_SEC_COUNT (flashmem_get_size_sectors())

/// Number of flash sectors reserved for system parameters at start
#define SYS_PARAM_SEC_COUNT 4
#define FLASH_WORK_SEC_COUNT (FLASH_TOTAL_SEC_COUNT - SYS_PARAM_SEC_COUNT)

Expand Down Expand Up @@ -61,10 +62,10 @@ typedef struct
} size : 4;
} STORE_TYPEDEF_ATTR SPIFlashInfo;

/** @brief obtain the flash memory address for a memory pointer
/** @brief Obtain the flash memory address for a memory pointer
* @param memptr
* @retval uint32_t offset from start of flash memory
* @note if memptr is not in valid flash memory it will return an offset which exceeds
* @retval uint32_t Offset from start of flash memory
* @note If memptr is not in valid flash memory it will return an offset which exceeds
* the internal flash memory size. This is caught by constructors using getMaxSize()
* to provide a zero-length extent.
*/
Expand All @@ -73,20 +74,20 @@ static inline uint32_t flashmem_get_address(const void* memptr)
return (uint32_t)memptr - INTERNAL_FLASH_START_ADDRESS;
}

/** @brief write a block of data to flash
* @param from buffer to obtain data from
* @param toaddr flash location to start writing
* @param size number of bytes to write
* @retval uint32_t number of bytes written
* @note none of the parameters need to be aligned
/** @brief Write a block of data to flash
* @param from Buffer to obtain data from
* @param toaddr Flash location to start writing
* @param size Number of bytes to write
* @retval uint32_t Number of bytes written
* @note None of the parameters need to be aligned
*/
uint32_t flashmem_write(const void* from, uint32_t toaddr, uint32_t size);

/** @brief read a block of data from flash
* @param to buffer to store data
* @param fromaddr flash location to start reading
* @param size number of bytes to read
* @retval uint32_t number of bytes written
/** @brief Read a block of data from flash
* @param to Buffer to store data
* @param fromaddr Flash location to start reading
* @param size Number of bytes to read
* @retval uint32_t Number of bytes written
* @note none of the parameters need to be aligned
*/
uint32_t flashmem_read(void* to, uint32_t fromaddr, uint32_t size);
Expand All @@ -97,61 +98,62 @@ uint32_t flashmem_read(void* to, uint32_t fromaddr, uint32_t size);
*/
bool flashmem_erase_sector(uint32_t sector_id);

/** @brief get flash memory information block
* @retval SPIFlashInfo information block
/** @brief Get flash memory information block
* @retval SPIFlashInfo Information block
*/
SPIFlashInfo flashmem_get_info();

/** @brief Returns a number indicating the size of flash memory chip
* @retval see SpiFlashInfo.size field for possible values
* @retval uint8_t See SpiFlashInfo.size field for possible values
*/
uint8_t flashmem_get_size_type();

/** @brief get the total flash memory size
* @retval uint32_t size in bytes
* @retval uint32_t Size in bytes
*/
uint32_t flashmem_get_size_bytes();

/** @brief get the total number of flash sectors
* @retval uint16_t sector count
/** @brief Get the total number of flash sectors
* @retval uint16_t Sector count
*/
uint16_t flashmem_get_size_sectors();

/** @brief Helper function: find the flash sector in which an address resides
* @param address
* @param pstart OUT/OPTIONAL: start of sector containing the given address
* @param pend OUT/OPTIONAL: last address in sector
* @retval uint32_t sector number for the given address
* @note optional parameters may be null
* @param pstart OUT/OPTIONAL: Start of sector containing the given address
* @param pend OUT/OPTIONAL: Last address in sector
* @retval uint32_t Sector number for the given address
* @note Optional parameters may be null
*/
uint32_t flashmem_find_sector(uint32_t address, uint32_t* pstart, uint32_t* pend);

/** @brief Get sector number containing the given address
* @param addr
* @retval uint32_t sector number
*/
uint32_t flashmem_get_sector_of_address(uint32_t addr);

/** @brief write to flash memory
* @param to buffer to read data from - MUST be word-aligned
* @param toaddr flash address (offset) to write to - MUST be word-aligned
* @param size number of bytes to write - MUST be word-aligned
* @retval number of bytes actually written
* @param from Buffer to read data from - MUST be word-aligned
* @param toaddr Flash address (offset) to write to - MUST be word-aligned
* @param size Number of bytes to write - MUST be word-aligned
* @retval uint32_t Number of bytes actually written
* @note All parameters MUST be aligned to 4-byte word boundaries, **including** the RAM pointer
*/
uint32_t flashmem_write_internal(const void* from, uint32_t toaddr, uint32_t size);

/** @brief read from flash memory
* @param to buffer to store data - MUST be word-aligned
* @param fromaddr flash address (offset) to read from - MUST be word-aligned
* @param size number of bytes to read - MUST be word-aligned
* @retval number of bytes actually read
/** @brief Read from flash memory
* @param to Buffer to store data - MUST be word-aligned
* @param fromaddr Flash address (offset) to read from - MUST be word-aligned
* @param size Number of bytes to read - MUST be word-aligned
* @retval uint32_t Number of bytes actually read
* @note All parameters MUST be aligned to 4-byte word boundaries, **including** the RAM pointer
*/
uint32_t flashmem_read_internal(void* to, uint32_t fromaddr, uint32_t size);

/*
* @brief Returns the address of the first free block on flash
* @retval uint32_t the actual address on flash
* @retval uint32_t The actual address on flash
*/
uint32_t flashmem_get_first_free_block_address();

Expand Down
32 changes: 16 additions & 16 deletions Sming/Core/AtClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
*
****/

/** @defgroup serial AtCommand serial
* @brief Asynchronous AT command client
/** @ingroup serial
* @brief Asynchronous AT command client
* @{
*/

Expand Down Expand Up @@ -59,29 +59,29 @@ class AtClient

/**
* @brief Sends AT command
* @param text String The actual AT command text. For example AT+CAMSTOP
* @param altResponse String Expected response on success in addition to the default one which is OK
* @param timeoutMs uint32_t Time in milliseconds to wait for response
* @param retries unsigned Retries on error
* @param text The actual AT command text. For example AT+CAMSTOP
* @param altResponse Expected response on success in addition to the default one which is OK
* @param timeoutMs Time in milliseconds to wait for response
* @param retries Retries on error
*/
void send(const String& text, const String& altResponse = nullptr, uint32_t timeoutMs = AT_TIMEOUT,
unsigned retries = 0);

/**
* @brief Sends AT command
* @param text String The actual AT command text. For example AT+CAMSTOP
* @param AtReceiveCallback onReceive
* @param timeoutMs uint32_t Time in milliseconds to wait for response
* @param retries int Retries on error
* @param text The actual AT command text. For example AT+CAMSTOP
* @param onReceive
* @param timeoutMs Time in milliseconds to wait for response
* @param retries Retries on error
*/
void send(const String& text, AtReceiveCallback onReceive, uint32_t timeoutMs = AT_TIMEOUT, unsigned retries = 0);

/**
* @brief Sends AT command
* @param text String The actual AT command text. For example AT+CAMSTOP
* @param AtCompleteCallback onComplete
* @param timeoutMs uint32_t Time in milliseconds to wait for response
* @param retries int Retries on error
* @param onComplete
* @param timeoutMs Time in milliseconds to wait for response
* @param retries Retries on error
*/
void send(const String& text, AtCompleteCallback onComplete, uint32_t timeoutMs = AT_TIMEOUT, unsigned retries = 0);

Expand All @@ -91,19 +91,19 @@ class AtClient
* @brief Adds a command to the queue.
* If you need all the flexibility then use that command
* and manually set your AtCommand arguments.
* @param command AtCommand
* @param command
*/
void send(AtCommand command);

/**
* @brief Executes directly (does not queue it) a command
* @param command AtCommand
* @param command
*/
void sendDirect(AtCommand command);

/**
* @brief Returns the current state
* @return AtState
* @retval AtState
*/
AtState getState()
{
Expand Down
2 changes: 1 addition & 1 deletion Sming/Core/Data/Buffer/CircularBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class CircularBuffer : public ReadWriteStream
size_t write(uint8_t charToWrite) override;

/** @brief Write chars to stream
* @param buffer Pointer to buffer to write to the stream
* @param data Pointer to buffer to write to the stream
* @param size Quantity of chars to writen
* @retval size_t Quantity of chars written to stream
*/
Expand Down
30 changes: 26 additions & 4 deletions Sming/Core/Data/MailMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,36 +38,58 @@ class MailMessage
String subject;
String cc;

/**
* @brief Set a header value
* @param name
* @param value
* @retval MailMessage&
*/
MailMessage& setHeader(const String& name, const String& value);

/**
* @brief Get a reference to the current set of headers
* @retval HttpHeaders&
*/
HttpHeaders& getHeaders();

/**
* @brief Sets the body of the email
* @param String body
* @param MimeType mime
* @param body
* @param mime
* @retval MailMessage&
*/
MailMessage& setBody(const String& body, MimeType mime = MIME_TEXT);

/**
* @brief Sets the body of the email
* @param Stream& stream
* @param MimeType mime
* @param stream
* @param mime
* @retval MailMessage&
*/
MailMessage& setBody(IDataSourceStream* stream, MimeType mime = MIME_TEXT);

/**
* @brief Adds attachment to the email
* @param stream
* @retval MailMessage&
*/
MailMessage& addAttachment(FileStream* stream);

/**
* @brief Adds attachment to the email
* @param stream
* @param mime
* @param filename
* @retval MailMessage&
*/
MailMessage& addAttachment(IDataSourceStream* stream, MimeType mime, const String& filename = "");

/**
* @brief Adds attachment to the email
* @param stream
* @param mime
* @param filename
* @retval MailMessage&
*/
MailMessage& addAttachment(IDataSourceStream* stream, const String& mime, const String& filename = "");

Expand Down
1 change: 1 addition & 0 deletions Sming/Core/Data/Stream/FileStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class FileStream : public ReadWriteStream

/** @brief Create a file stream
* @param fileName Name of file to open
* @param openFlags
*/
FileStream(const String& fileName, FileOpenFlags openFlags = eFO_ReadOnly)
{
Expand Down
1 change: 1 addition & 0 deletions Sming/Core/Data/Stream/GdbFileStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class GdbFileStream : public ReadWriteStream

/** @brief Create a file stream
* @param fileName Name of file to open
* @param openFlags
*/
GdbFileStream(const String& fileName, FileOpenFlags openFlags = eFO_ReadOnly)
{
Expand Down
2 changes: 1 addition & 1 deletion Sming/Core/Data/Stream/TemplateFileStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class TemplateFileStream : public TemplateStream
{
public:
/** @brief Create a template file stream
* @param templateFileName Template filename
* @param fileName Template filename
*/
TemplateFileStream(const String& fileName) : TemplateStream(new FileStream(fileName))
{
Expand Down
10 changes: 5 additions & 5 deletions Sming/Core/Data/StreamTransformer.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/**
* @brief Callback specification for the stream transformers
* @note See StreamTransformer::transform() method for details
* @see See `StreamTransformer::transform()` method for details
*/
typedef Delegate<size_t(const uint8_t* in, size_t inLength, uint8_t* out, size_t outLength)> StreamTransformerCallback;

Expand Down Expand Up @@ -92,10 +92,10 @@ class StreamTransformer : public IDataSourceStream
protected:
/**
* @brief Inherited class implements this method to transform a block of data
* @param const uint8_t* in source data
* @param size_t inLength source data length
* @param uint8_t* out output buffer
* @param size_t outLength size of output buffer
* @param in source data
* @param inLength source data length
* @param out output buffer
* @param outLength size of output buffer
* @retval size_t number of output bytes written
* @note Called with `in = nullptr` and `inLength = 0` at end of input stream
*/
Expand Down
1 change: 1 addition & 0 deletions Sming/Core/DateTime.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ class DateTime
/** @brief Set time using time and date component values
* @param sec Seconds
* @param min Minutes
* @param hour Hour
* @param day Day of month
* @param month Month (0=Jan, 11=Dec)
* @param year Year
Expand Down
2 changes: 1 addition & 1 deletion Sming/Core/HardwarePWM.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class HardwarePWM
}

/** @brief Set PWM duty cycle for a channel
* @param channel Channel to set
* @param chan Channel to set
* @param duty Value of duty cycle to set channel to
* @param update Update PWM output
* @retval bool True on success
Expand Down
Loading