Skip to content

Commit

Permalink
pw_status: Consolidate Status docs
Browse files Browse the repository at this point in the history
- Move the status description from C++ to the docs so there is a single
  description of the status codes that applies to all languages. This
  also allows anywhere in the docs / Doxygen comments to link to the
  status codes.
- Document using status codes in all supported languages.
- Link to the status descriptions in Pigweed's docs from C++, Python,
  and TypeScript.
- Introduce Doxygen alias so status codes can be referenced with
  @pw_status{CODE} in Doxygen comments.

Change-Id: I7a59bc90da9cec09a08376952cf8472e02c67f03
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/136732
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Kayce Basques <kayce@google.com>
  • Loading branch information
255 authored and CQ Bot Account committed Apr 8, 2023
1 parent 26ced97 commit 0a2c6ba
Show file tree
Hide file tree
Showing 6 changed files with 438 additions and 351 deletions.
1 change: 1 addition & 0 deletions docs/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ _doxygen_input_files = [
"$dir_pw_sync/public/pw_sync/borrow.h",
"$dir_pw_sync/public/pw_sync/counting_semaphore.h",
"$dir_pw_sync/public/pw_sync/inline_borrowable.h",
"$dir_pw_status/public/pw_status/status.h",
"$dir_pw_sync/public/pw_sync/interrupt_spin_lock.h",
"$dir_pw_sync/public/pw_sync/lock_annotations.h",
"$dir_pw_sync/public/pw_sync/mutex.h",
Expand Down
5 changes: 3 additions & 2 deletions docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ ALIASES = "rst=^^\verbatim embed:rst:leading-asterisk^^" \
"c_macro{1}=@crossref{c,macro,\1}" \
"cpp_class{1}=@crossref{cpp,class,\1}" \
"cpp_func{1}=@crossref{cpp,func,\1}" \
"cpp_type{1}=@crossref{cpp,type,\1}"
"cpp_type{1}=@crossref{cpp,type,\1}" \
"pw_status{1}=@crossref{c,enumerator,\1}"

# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C. For
Expand Down Expand Up @@ -2390,7 +2391,7 @@ PREDEFINED = __cplusplus \
PW_EXTERN_C_START= \
PW_LOCKS_EXCLUDED(...)= \
PW_EXCLUSIVE_LOCKS_REQUIRED(...)= \
PW_GUARDED_BY(...)= \
PW_GUARDED_BY(...)=

# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
Expand Down
Loading

0 comments on commit 0a2c6ba

Please sign in to comment.