Skip to content

Commit 7ecaf6c

Browse files
author
Jakub Smejkal
committed
Update Docs
1 parent adec763 commit 7ecaf6c

File tree

5 files changed

+68
-27
lines changed

5 files changed

+68
-27
lines changed

.github/workflows/docs.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,24 @@ on:
33
push:
44
branches:
55
- main
6-
workflow_dispatch:
76
jobs:
87
build:
98
runs-on: ubuntu-latest
109
steps:
1110
- uses: actions/checkout@v2
11+
with:
12+
path: 'chester-sdk'
1213
- uses: actions/checkout@v2
1314
with:
1415
repository: 'jothepro/doxygen-awesome-css'
15-
path: 'doc/doxygen-awesome-css'
16+
path: 'doxygen-awesome-css'
1617
- name: Build docs
1718
uses: mattnotmitt/[email protected]
19+
with:
20+
working-directory: 'chester-sdk'
1821
- name: Deploy
1922
uses: peaceiris/actions-gh-pages@v3
2023
with:
2124
github_token: ${{ secrets.GITHUB_TOKEN }}
22-
publish_dir: ./doc/html
25+
publish_dir: ./chester-sdk/doc/html
2326

Doxyfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ EXTRACT_PACKAGE = NO
440440
# included in the documentation.
441441
# The default value is: NO.
442442

443-
EXTRACT_STATIC = NO
443+
EXTRACT_STATIC = YES
444444

445445
# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
446446
# locally in source files will be included in the documentation. If set to NO,
@@ -1172,8 +1172,8 @@ HTML_STYLESHEET =
11721172
# list). For an example see the documentation.
11731173
# This tag requires that the tag GENERATE_HTML is set to YES.
11741174

1175-
HTML_EXTRA_STYLESHEET = doc/doxygen-awesome-css/doxygen-awesome.css \
1176-
doc/doxygen-awesome-css/doxygen-awesome-sidebar-only.css \
1175+
HTML_EXTRA_STYLESHEET = ../doxygen-awesome-css/doxygen-awesome.css \
1176+
../doxygen-awesome-css/doxygen-awesome-sidebar-only.css \
11771177
doc/custom.css
11781178
HTML_COLORSTYLE = LIGHT
11791179

include/chester/drivers/ctr_x0.h

+25
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,21 @@
1515
extern "C" {
1616
#endif
1717

18+
/**
19+
* @addtogroup ctr_x0 ctr_x0
20+
* @brief Driver for CHESTER X0
21+
* @{
22+
*/
23+
24+
/** @brief Channels */
1825
enum ctr_x0_channel {
1926
CTR_X0_CHANNEL_1 = 0,
2027
CTR_X0_CHANNEL_2 = 1,
2128
CTR_X0_CHANNEL_3 = 2,
2229
CTR_X0_CHANNEL_4 = 3,
2330
};
2431

32+
/** @brief Modes */
2533
enum ctr_x0_mode {
2634
CTR_X0_MODE_DEFAULT = 0,
2735
CTR_X0_MODE_NPN_INPUT = 1,
@@ -31,16 +39,25 @@ enum ctr_x0_mode {
3139
CTR_X0_MODE_PWR_SOURCE = 5,
3240
};
3341

42+
/** @private */
3443
typedef int (*ctr_x0_api_set_mode)(const struct device *dev, enum ctr_x0_channel channel,
3544
enum ctr_x0_mode mode);
45+
/** @private */
3646
typedef int (*ctr_x0_api_get_spec)(const struct device *dev, enum ctr_x0_channel channel,
3747
const struct gpio_dt_spec **spec);
3848

49+
/** @private */
3950
struct ctr_x0_driver_api {
4051
ctr_x0_api_set_mode set_mode;
4152
ctr_x0_api_get_spec get_spec;
4253
};
4354

55+
/**
56+
* @brief Set mode
57+
* @param[in] dev
58+
* @param[in] channel Channel to modify
59+
* @param[in] mode
60+
*/
4461
static inline int ctr_x0_set_mode(const struct device *dev, enum ctr_x0_channel channel,
4562
enum ctr_x0_mode mode)
4663
{
@@ -49,6 +66,12 @@ static inline int ctr_x0_set_mode(const struct device *dev, enum ctr_x0_channel
4966
return api->set_mode(dev, channel, mode);
5067
}
5168

69+
/**
70+
* @brief Get channel's GPIO device tree spec
71+
* @param[in] dev
72+
* @param[in] channel
73+
* @param[out] spec
74+
*/
5275
static inline int ctr_x0_get_spec(const struct device *dev, enum ctr_x0_channel channel,
5376
const struct gpio_dt_spec **spec)
5477
{
@@ -57,6 +80,8 @@ static inline int ctr_x0_get_spec(const struct device *dev, enum ctr_x0_channel
5780
return api->get_spec(dev, channel, spec);
5881
}
5982

83+
/** @} */
84+
6085
#ifdef __cplusplus
6186
}
6287
#endif

scripts/gen-msg-key.py

+31-21
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,37 @@
1414
import sys
1515

1616
def main():
17-
decoder = yaml.load(open(sys.argv[1]), Loader=yaml.FullLoader)
18-
19-
with open(sys.argv[2], 'w') as f:
20-
f.write('#ifndef MSG_KEY_H_\n')
21-
f.write('#define MSG_KEY_H_\n\n')
22-
f.write('/* This file has been generated using the script gen-msg-key.py */\n\n')
23-
f.write('#ifdef __cplusplus\n')
24-
f.write('extern "C" {\n')
25-
f.write('#endif\n\n')
26-
f.write('enum msg_key {\n')
27-
28-
for i, item in enumerate(decoder):
29-
key, _ = item.popitem()
30-
f.write(f'\tMSG_KEY_{key.upper()} = {i},\n')
31-
32-
f.write('};\n\n')
33-
f.write('#ifdef __cplusplus\n')
34-
f.write('}\n')
35-
f.write('#endif\n\n')
36-
37-
f.write('#endif /* MSG_KEY_H_ */\n')
17+
inp = sys.stdin
18+
out = sys.stdout
19+
if len(sys.argv) == 3:
20+
inp = open(sys.argv[1])
21+
out = open(sys.argv[2], 'w')
22+
23+
decoder = yaml.load(inp, Loader=yaml.FullLoader)
24+
25+
out.write('#ifndef MSG_KEY_H_\n')
26+
out.write('#define MSG_KEY_H_\n\n')
27+
out.write('/* This file has been generated using the script gen-msg-key.py */\n\n')
28+
out.write('#ifdef __cplusplus\n')
29+
out.write('extern "C" {\n')
30+
out.write('#endif\n\n')
31+
out.write('enum msg_key {\n')
32+
33+
for i, item in enumerate(decoder):
34+
key, _ = item.popitem()
35+
out.write(f'\tMSG_KEY_{key.upper()} = {i},\n')
36+
37+
out.write('};\n\n')
38+
out.write('#ifdef __cplusplus\n')
39+
out.write('}\n')
40+
out.write('#endif\n\n')
41+
42+
out.write('#endif /* MSG_KEY_H_ */\n')
43+
44+
if len(sys.argv) == 3:
45+
inp.close()
46+
out.close()
47+
3848

3949
if __name__ == '__main__':
4050
main()

west.yml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ manifest:
99
repo-path: ncs.git
1010
revision: v2.5-chester-branch
1111
import: true
12+
- name: doxygen-awesome-css
13+
url: https://github.com/jothepro/doxygen-awesome-css
14+
revision: main
1215
self:
1316
path: chester
1417
west-commands: scripts/west-commands.yml

0 commit comments

Comments
 (0)