├── .cproject
├── .gitignore
├── .project
├── .settings
├── language.settings.xml
└── org.eclipse.cdt.codan.core.prefs
├── LICENSE
├── Makefile
├── README.rst
├── main
├── component.mk
├── font8x8_basic.h
├── main.c
└── ssd1366.h
└── sdkconfig
/.cproject:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | make
85 | -j8
86 | app-flash
87 | true
88 | true
89 | true
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | build/
2 | sdkconfig.old
3 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | ssd1306-esp-idf-i2c
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder
10 | clean,full,incremental,
11 |
12 |
13 |
14 |
15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
16 | full,incremental,
17 |
18 |
19 |
20 |
21 |
22 | org.eclipse.cdt.core.cnature
23 | org.eclipse.cdt.managedbuilder.core.managedBuildNature
24 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
25 | org.eclipse.cdt.core.ccnature
26 |
27 |
28 |
--------------------------------------------------------------------------------
/.settings/language.settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.cdt.codan.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.cdt.codan.checkers.errnoreturn=Warning
3 | org.eclipse.cdt.codan.checkers.errnoreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return\\")",implicit\=>false}
4 | org.eclipse.cdt.codan.checkers.errreturnvalue=Error
5 | org.eclipse.cdt.codan.checkers.errreturnvalue.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused return value\\")"}
6 | org.eclipse.cdt.codan.checkers.nocommentinside=-Error
7 | org.eclipse.cdt.codan.checkers.nocommentinside.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Nesting comments\\")"}
8 | org.eclipse.cdt.codan.checkers.nolinecomment=-Error
9 | org.eclipse.cdt.codan.checkers.nolinecomment.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Line comments\\")"}
10 | org.eclipse.cdt.codan.checkers.noreturn=Error
11 | org.eclipse.cdt.codan.checkers.noreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return value\\")",implicit\=>false}
12 | org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=Error
13 | org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Abstract class cannot be instantiated\\")"}
14 | org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=Error
15 | org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Ambiguous problem\\")"}
16 | org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=Warning
17 | org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment in condition\\")"}
18 | org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=Error
19 | org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment to itself\\")"}
20 | org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Warning
21 | org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No break at end of case\\")",no_break_comment\=>"no break",last_case_param\=>false,empty_case_param\=>false}
22 | org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning
23 | org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Catching by reference is recommended\\")",unknown\=>false,exceptions\=>()}
24 | org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=Error
25 | org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Circular inheritance\\")"}
26 | org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization=Warning
27 | org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class members should be properly initialized\\")",skip\=>true}
28 | org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=Error
29 | org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Field cannot be resolved\\")"}
30 | org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=Error
31 | org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Function cannot be resolved\\")"}
32 | org.eclipse.cdt.codan.internal.checkers.InvalidArguments=Error
33 | org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid arguments\\")"}
34 | org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=Error
35 | org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid template argument\\")"}
36 | org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=Error
37 | org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Label statement not found\\")"}
38 | org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=Error
39 | org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Member declaration not found\\")"}
40 | org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=Error
41 | org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Method cannot be resolved\\")"}
42 | org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=-Info
43 | org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Name convention for function\\")",pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
44 | org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=Warning
45 | org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class has a virtual method and non-virtual destructor\\")"}
46 | org.eclipse.cdt.codan.internal.checkers.OverloadProblem=Error
47 | org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid overload\\")"}
48 | org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=Error
49 | org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redeclaration\\")"}
50 | org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=Error
51 | org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redefinition\\")"}
52 | org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning
53 | org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Return with parenthesis\\")"}
54 | org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=-Warning
55 | org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Format String Vulnerability\\")"}
56 | org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=Warning
57 | org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Statement has no effect\\")",macro\=>true,exceptions\=>()}
58 | org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=Warning
59 | org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suggested parenthesis around expression\\")",paramNot\=>false}
60 | org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning
61 | org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suspicious semicolon\\")",else\=>false,afterelse\=>false}
62 | org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=Error
63 | org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Type cannot be resolved\\")"}
64 | org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning
65 | org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused function declaration\\")",macro\=>true}
66 | org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=Warning
67 | org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused static function\\")",macro\=>true}
68 | org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=Warning
69 | org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused variable declaration in file scope\\")",macro\=>true,exceptions\=>("@(\#)","$Id")}
70 | org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=Error
71 | org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Symbol is not resolved\\")"}
72 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | #
2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a
3 | # project subdirectory.
4 | #
5 |
6 | PROJECT_NAME := app-template
7 |
8 | include $(IDF_PATH)/make/project.mk
9 |
10 |
--------------------------------------------------------------------------------
/README.rst:
--------------------------------------------------------------------------------
1 | Sample code for driving 128x64 OLED display with SSD1306 driver via ESP-IDF's I2C master driver
2 | ====================
3 |
4 | See main code main.c_.
5 |
6 | ----------
7 | About
8 | ----------
9 |
10 | This sample code implement procedures to read values from 128x64 OLED display with SSD1306 driver via ESP-IDF's I2C master driver. It supports all features decribed in `Solomon Systech's SSD1306 datasheet`_.
11 |
12 | ----------
13 | For local setup
14 | ----------
15 |
16 | For your local setup, connect SDI pin to GPIO 15 pin and the SCK to GPIO 2 pin as they are default ports (I2C_SDA, I2C_SCL) for I2C master according to `ESP32 datasheet`_, C.4. IO_MUX, Page 49.
17 |
18 | Be aware about there are serveal models on 128x64 OLED display with SSD1306. Like one model with more pins works with both SPI/I2C, and another model with lesser pins works I2C only. This cample code is confirmed with a OLED model which have (GND, VDD, SCK, SDA) pins and it supports I2C only (no SPI available). Perhaps your model has slightly different pins, but it should works.
19 |
20 | In case it does not work, please check your circit. Consider insert 10k ohm pull-up registors on between 3.3v power supply and (SDA, SCK) pins respectively, as OLED display consumes larger current comparing with other tiny I2C sensors. In my case, 10k ohm pull-up registors stabilized voltage level for clock and SDA and the code worked correctly.
21 |
22 | .. _main.c: https://github.com/yanbe/ssd1306-esp-idf-i2c/blob/master/main/main.c
23 | .. _ESP32 datasheet: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf
24 | .. _Solomon Systech's SSD1306 datasheet: https://www.robot-r-us.com/e/986-ssd1306-datasheet-for-096-oled.html
25 |
--------------------------------------------------------------------------------
/main/component.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Main component makefile.
3 | #
4 | # This Makefile can be left empty. By default, it will take the sources in the
5 | # src/ directory, compile them and link them into lib(subdirectory_name).a
6 | # in the build directory. This behaviour is entirely configurable,
7 | # please read the ESP-IDF documents if you need to do this.
8 | #
9 |
--------------------------------------------------------------------------------
/main/font8x8_basic.h:
--------------------------------------------------------------------------------
1 | /*
2 | * font8x8_basic.h
3 | *
4 | * Created on: 2017/05/03
5 | * Author: yanbe
6 | */
7 |
8 | #ifndef MAIN_FONT8X8_BASIC_H_
9 | #define MAIN_FONT8X8_BASIC_H_
10 |
11 | /*
12 | Constant: font8x8_basic_tr
13 | Contains an 90 digree transposed 8x8 font map for unicode points
14 | U+0000 - U+007F (basic latin)
15 |
16 | To make it easy to use with SSD1306's GDDRAM mapping and API,
17 | this constant is an 90 degree transposed.
18 | The original version written by Marcel Sondaar is availble at:
19 | https://github.com/dhepper/font8x8/blob/master/font8x8_basic.h
20 |
21 | Conversion is done via following procedure:
22 |
23 | for (int code = 0; code < 128; code++) {
24 | uint8_t trans[8];
25 | for (int w = 0; w < 8; w++) {
26 | trans[w] = 0x00;
27 | for (int b = 0; b < 8; b++) {
28 | trans[w] |= ((font8x8_basic[code][b] & (1 << w)) >> w) << b;
29 | }
30 | }
31 |
32 | for (int w = 0; w < 8; w++) {
33 | if (w == 0) { printf(" { "); }
34 | printf("0x%.2X", trans[w]);
35 | if (w < 7) { printf(", "); }
36 | if (w == 7) { printf(" }, // U+00%.2X (%c)\n", code, code); }
37 | }
38 | }
39 | */
40 |
41 | uint8_t font8x8_basic_tr[128][8] = {
42 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0000 (nul)
43 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0001
44 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0002
45 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0003
46 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0004
47 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0005
48 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0006
49 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0007
50 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0008
51 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0009
52 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+000A
53 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+000B
54 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+000C
55 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+000D
56 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+000E
57 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+000F
58 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0010
59 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0011
60 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0012
61 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0013
62 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0014
63 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0015
64 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0016
65 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0017
66 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0018
67 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0019
68 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+001A
69 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+001B
70 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+001C
71 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+001D
72 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+001E
73 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+001F
74 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0020 (space)
75 | { 0x00, 0x00, 0x06, 0x5F, 0x5F, 0x06, 0x00, 0x00 }, // U+0021 (!)
76 | { 0x00, 0x03, 0x03, 0x00, 0x03, 0x03, 0x00, 0x00 }, // U+0022 (")
77 | { 0x14, 0x7F, 0x7F, 0x14, 0x7F, 0x7F, 0x14, 0x00 }, // U+0023 (#)
78 | { 0x24, 0x2E, 0x6B, 0x6B, 0x3A, 0x12, 0x00, 0x00 }, // U+0024 ($)
79 | { 0x46, 0x66, 0x30, 0x18, 0x0C, 0x66, 0x62, 0x00 }, // U+0025 (%)
80 | { 0x30, 0x7A, 0x4F, 0x5D, 0x37, 0x7A, 0x48, 0x00 }, // U+0026 (&)
81 | { 0x04, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 }, // U+0027 (')
82 | { 0x00, 0x1C, 0x3E, 0x63, 0x41, 0x00, 0x00, 0x00 }, // U+0028 (()
83 | { 0x00, 0x41, 0x63, 0x3E, 0x1C, 0x00, 0x00, 0x00 }, // U+0029 ())
84 | { 0x08, 0x2A, 0x3E, 0x1C, 0x1C, 0x3E, 0x2A, 0x08 }, // U+002A (*)
85 | { 0x08, 0x08, 0x3E, 0x3E, 0x08, 0x08, 0x00, 0x00 }, // U+002B (+)
86 | { 0x00, 0x80, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00 }, // U+002C (,)
87 | { 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00 }, // U+002D (-)
88 | { 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00 }, // U+002E (.)
89 | { 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x00 }, // U+002F (/)
90 | { 0x3E, 0x7F, 0x71, 0x59, 0x4D, 0x7F, 0x3E, 0x00 }, // U+0030 (0)
91 | { 0x40, 0x42, 0x7F, 0x7F, 0x40, 0x40, 0x00, 0x00 }, // U+0031 (1)
92 | { 0x62, 0x73, 0x59, 0x49, 0x6F, 0x66, 0x00, 0x00 }, // U+0032 (2)
93 | { 0x22, 0x63, 0x49, 0x49, 0x7F, 0x36, 0x00, 0x00 }, // U+0033 (3)
94 | { 0x18, 0x1C, 0x16, 0x53, 0x7F, 0x7F, 0x50, 0x00 }, // U+0034 (4)
95 | { 0x27, 0x67, 0x45, 0x45, 0x7D, 0x39, 0x00, 0x00 }, // U+0035 (5)
96 | { 0x3C, 0x7E, 0x4B, 0x49, 0x79, 0x30, 0x00, 0x00 }, // U+0036 (6)
97 | { 0x03, 0x03, 0x71, 0x79, 0x0F, 0x07, 0x00, 0x00 }, // U+0037 (7)
98 | { 0x36, 0x7F, 0x49, 0x49, 0x7F, 0x36, 0x00, 0x00 }, // U+0038 (8)
99 | { 0x06, 0x4F, 0x49, 0x69, 0x3F, 0x1E, 0x00, 0x00 }, // U+0039 (9)
100 | { 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00 }, // U+003A (:)
101 | { 0x00, 0x80, 0xE6, 0x66, 0x00, 0x00, 0x00, 0x00 }, // U+003B (;)
102 | { 0x08, 0x1C, 0x36, 0x63, 0x41, 0x00, 0x00, 0x00 }, // U+003C (<)
103 | { 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x00, 0x00 }, // U+003D (=)
104 | { 0x00, 0x41, 0x63, 0x36, 0x1C, 0x08, 0x00, 0x00 }, // U+003E (>)
105 | { 0x02, 0x03, 0x51, 0x59, 0x0F, 0x06, 0x00, 0x00 }, // U+003F (?)
106 | { 0x3E, 0x7F, 0x41, 0x5D, 0x5D, 0x1F, 0x1E, 0x00 }, // U+0040 (@)
107 | { 0x7C, 0x7E, 0x13, 0x13, 0x7E, 0x7C, 0x00, 0x00 }, // U+0041 (A)
108 | { 0x41, 0x7F, 0x7F, 0x49, 0x49, 0x7F, 0x36, 0x00 }, // U+0042 (B)
109 | { 0x1C, 0x3E, 0x63, 0x41, 0x41, 0x63, 0x22, 0x00 }, // U+0043 (C)
110 | { 0x41, 0x7F, 0x7F, 0x41, 0x63, 0x3E, 0x1C, 0x00 }, // U+0044 (D)
111 | { 0x41, 0x7F, 0x7F, 0x49, 0x5D, 0x41, 0x63, 0x00 }, // U+0045 (E)
112 | { 0x41, 0x7F, 0x7F, 0x49, 0x1D, 0x01, 0x03, 0x00 }, // U+0046 (F)
113 | { 0x1C, 0x3E, 0x63, 0x41, 0x51, 0x73, 0x72, 0x00 }, // U+0047 (G)
114 | { 0x7F, 0x7F, 0x08, 0x08, 0x7F, 0x7F, 0x00, 0x00 }, // U+0048 (H)
115 | { 0x00, 0x41, 0x7F, 0x7F, 0x41, 0x00, 0x00, 0x00 }, // U+0049 (I)
116 | { 0x30, 0x70, 0x40, 0x41, 0x7F, 0x3F, 0x01, 0x00 }, // U+004A (J)
117 | { 0x41, 0x7F, 0x7F, 0x08, 0x1C, 0x77, 0x63, 0x00 }, // U+004B (K)
118 | { 0x41, 0x7F, 0x7F, 0x41, 0x40, 0x60, 0x70, 0x00 }, // U+004C (L)
119 | { 0x7F, 0x7F, 0x0E, 0x1C, 0x0E, 0x7F, 0x7F, 0x00 }, // U+004D (M)
120 | { 0x7F, 0x7F, 0x06, 0x0C, 0x18, 0x7F, 0x7F, 0x00 }, // U+004E (N)
121 | { 0x1C, 0x3E, 0x63, 0x41, 0x63, 0x3E, 0x1C, 0x00 }, // U+004F (O)
122 | { 0x41, 0x7F, 0x7F, 0x49, 0x09, 0x0F, 0x06, 0x00 }, // U+0050 (P)
123 | { 0x1E, 0x3F, 0x21, 0x71, 0x7F, 0x5E, 0x00, 0x00 }, // U+0051 (Q)
124 | { 0x41, 0x7F, 0x7F, 0x09, 0x19, 0x7F, 0x66, 0x00 }, // U+0052 (R)
125 | { 0x26, 0x6F, 0x4D, 0x59, 0x73, 0x32, 0x00, 0x00 }, // U+0053 (S)
126 | { 0x03, 0x41, 0x7F, 0x7F, 0x41, 0x03, 0x00, 0x00 }, // U+0054 (T)
127 | { 0x7F, 0x7F, 0x40, 0x40, 0x7F, 0x7F, 0x00, 0x00 }, // U+0055 (U)
128 | { 0x1F, 0x3F, 0x60, 0x60, 0x3F, 0x1F, 0x00, 0x00 }, // U+0056 (V)
129 | { 0x7F, 0x7F, 0x30, 0x18, 0x30, 0x7F, 0x7F, 0x00 }, // U+0057 (W)
130 | { 0x43, 0x67, 0x3C, 0x18, 0x3C, 0x67, 0x43, 0x00 }, // U+0058 (X)
131 | { 0x07, 0x4F, 0x78, 0x78, 0x4F, 0x07, 0x00, 0x00 }, // U+0059 (Y)
132 | { 0x47, 0x63, 0x71, 0x59, 0x4D, 0x67, 0x73, 0x00 }, // U+005A (Z)
133 | { 0x00, 0x7F, 0x7F, 0x41, 0x41, 0x00, 0x00, 0x00 }, // U+005B ([)
134 | { 0x01, 0x03, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x00 }, // U+005C (\)
135 | { 0x00, 0x41, 0x41, 0x7F, 0x7F, 0x00, 0x00, 0x00 }, // U+005D (])
136 | { 0x08, 0x0C, 0x06, 0x03, 0x06, 0x0C, 0x08, 0x00 }, // U+005E (^)
137 | { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 }, // U+005F (_)
138 | { 0x00, 0x00, 0x03, 0x07, 0x04, 0x00, 0x00, 0x00 }, // U+0060 (`)
139 | { 0x20, 0x74, 0x54, 0x54, 0x3C, 0x78, 0x40, 0x00 }, // U+0061 (a)
140 | { 0x41, 0x7F, 0x3F, 0x48, 0x48, 0x78, 0x30, 0x00 }, // U+0062 (b)
141 | { 0x38, 0x7C, 0x44, 0x44, 0x6C, 0x28, 0x00, 0x00 }, // U+0063 (c)
142 | { 0x30, 0x78, 0x48, 0x49, 0x3F, 0x7F, 0x40, 0x00 }, // U+0064 (d)
143 | { 0x38, 0x7C, 0x54, 0x54, 0x5C, 0x18, 0x00, 0x00 }, // U+0065 (e)
144 | { 0x48, 0x7E, 0x7F, 0x49, 0x03, 0x02, 0x00, 0x00 }, // U+0066 (f)
145 | { 0x98, 0xBC, 0xA4, 0xA4, 0xF8, 0x7C, 0x04, 0x00 }, // U+0067 (g)
146 | { 0x41, 0x7F, 0x7F, 0x08, 0x04, 0x7C, 0x78, 0x00 }, // U+0068 (h)
147 | { 0x00, 0x44, 0x7D, 0x7D, 0x40, 0x00, 0x00, 0x00 }, // U+0069 (i)
148 | { 0x60, 0xE0, 0x80, 0x80, 0xFD, 0x7D, 0x00, 0x00 }, // U+006A (j)
149 | { 0x41, 0x7F, 0x7F, 0x10, 0x38, 0x6C, 0x44, 0x00 }, // U+006B (k)
150 | { 0x00, 0x41, 0x7F, 0x7F, 0x40, 0x00, 0x00, 0x00 }, // U+006C (l)
151 | { 0x7C, 0x7C, 0x18, 0x38, 0x1C, 0x7C, 0x78, 0x00 }, // U+006D (m)
152 | { 0x7C, 0x7C, 0x04, 0x04, 0x7C, 0x78, 0x00, 0x00 }, // U+006E (n)
153 | { 0x38, 0x7C, 0x44, 0x44, 0x7C, 0x38, 0x00, 0x00 }, // U+006F (o)
154 | { 0x84, 0xFC, 0xF8, 0xA4, 0x24, 0x3C, 0x18, 0x00 }, // U+0070 (p)
155 | { 0x18, 0x3C, 0x24, 0xA4, 0xF8, 0xFC, 0x84, 0x00 }, // U+0071 (q)
156 | { 0x44, 0x7C, 0x78, 0x4C, 0x04, 0x1C, 0x18, 0x00 }, // U+0072 (r)
157 | { 0x48, 0x5C, 0x54, 0x54, 0x74, 0x24, 0x00, 0x00 }, // U+0073 (s)
158 | { 0x00, 0x04, 0x3E, 0x7F, 0x44, 0x24, 0x00, 0x00 }, // U+0074 (t)
159 | { 0x3C, 0x7C, 0x40, 0x40, 0x3C, 0x7C, 0x40, 0x00 }, // U+0075 (u)
160 | { 0x1C, 0x3C, 0x60, 0x60, 0x3C, 0x1C, 0x00, 0x00 }, // U+0076 (v)
161 | { 0x3C, 0x7C, 0x70, 0x38, 0x70, 0x7C, 0x3C, 0x00 }, // U+0077 (w)
162 | { 0x44, 0x6C, 0x38, 0x10, 0x38, 0x6C, 0x44, 0x00 }, // U+0078 (x)
163 | { 0x9C, 0xBC, 0xA0, 0xA0, 0xFC, 0x7C, 0x00, 0x00 }, // U+0079 (y)
164 | { 0x4C, 0x64, 0x74, 0x5C, 0x4C, 0x64, 0x00, 0x00 }, // U+007A (z)
165 | { 0x08, 0x08, 0x3E, 0x77, 0x41, 0x41, 0x00, 0x00 }, // U+007B ({)
166 | { 0x00, 0x00, 0x00, 0x77, 0x77, 0x00, 0x00, 0x00 }, // U+007C (|)
167 | { 0x41, 0x41, 0x77, 0x3E, 0x08, 0x08, 0x00, 0x00 }, // U+007D (})
168 | { 0x02, 0x03, 0x01, 0x03, 0x02, 0x03, 0x01, 0x00 }, // U+007E (~)
169 | { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } // U+007F
170 | };
171 |
172 | #endif /* MAIN_FONT8X8_BASIC_H_ */
173 |
174 |
175 |
--------------------------------------------------------------------------------
/main/main.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "driver/gpio.h"
4 | #include "driver/i2c.h"
5 | #include "esp_err.h"
6 | #include "esp_log.h"
7 | #include "freertos/task.h"
8 |
9 | #include "sdkconfig.h" // generated by "make menuconfig"
10 |
11 | #include "ssd1366.h"
12 | #include "font8x8_basic.h"
13 |
14 | #define SDA_PIN GPIO_NUM_15
15 | #define SCL_PIN GPIO_NUM_2
16 |
17 | #define tag "SSD1306"
18 |
19 | void i2c_master_init()
20 | {
21 | i2c_config_t i2c_config = {
22 | .mode = I2C_MODE_MASTER,
23 | .sda_io_num = SDA_PIN,
24 | .scl_io_num = SCL_PIN,
25 | .sda_pullup_en = GPIO_PULLUP_ENABLE,
26 | .scl_pullup_en = GPIO_PULLUP_ENABLE,
27 | .master.clk_speed = 1000000
28 | };
29 | i2c_param_config(I2C_NUM_0, &i2c_config);
30 | i2c_driver_install(I2C_NUM_0, I2C_MODE_MASTER, 0, 0, 0);
31 | }
32 |
33 | void ssd1306_init() {
34 | esp_err_t espRc;
35 |
36 | i2c_cmd_handle_t cmd = i2c_cmd_link_create();
37 |
38 | i2c_master_start(cmd);
39 | i2c_master_write_byte(cmd, (OLED_I2C_ADDRESS << 1) | I2C_MASTER_WRITE, true);
40 | i2c_master_write_byte(cmd, OLED_CONTROL_BYTE_CMD_STREAM, true);
41 |
42 | i2c_master_write_byte(cmd, OLED_CMD_SET_CHARGE_PUMP, true);
43 | i2c_master_write_byte(cmd, 0x14, true);
44 |
45 | i2c_master_write_byte(cmd, OLED_CMD_SET_SEGMENT_REMAP, true); // reverse left-right mapping
46 | i2c_master_write_byte(cmd, OLED_CMD_SET_COM_SCAN_MODE, true); // reverse up-bottom mapping
47 |
48 | i2c_master_write_byte(cmd, OLED_CMD_DISPLAY_ON, true);
49 | i2c_master_stop(cmd);
50 |
51 | espRc = i2c_master_cmd_begin(I2C_NUM_0, cmd, 10/portTICK_PERIOD_MS);
52 | if (espRc == ESP_OK) {
53 | ESP_LOGI(tag, "OLED configured successfully");
54 | } else {
55 | ESP_LOGE(tag, "OLED configuration failed. code: 0x%.2X", espRc);
56 | }
57 | i2c_cmd_link_delete(cmd);
58 | }
59 |
60 | void task_ssd1306_display_pattern(void *ignore) {
61 | i2c_cmd_handle_t cmd;
62 |
63 | for (uint8_t i = 0; i < 8; i++) {
64 | cmd = i2c_cmd_link_create();
65 | i2c_master_start(cmd);
66 | i2c_master_write_byte(cmd, (OLED_I2C_ADDRESS << 1) | I2C_MASTER_WRITE, true);
67 | i2c_master_write_byte(cmd, OLED_CONTROL_BYTE_CMD_SINGLE, true);
68 | i2c_master_write_byte(cmd, 0xB0 | i, true);
69 | i2c_master_write_byte(cmd, OLED_CONTROL_BYTE_DATA_STREAM, true);
70 | for (uint8_t j = 0; j < 128; j++) {
71 | i2c_master_write_byte(cmd, 0xFF >> (j % 8), true);
72 | }
73 | i2c_master_stop(cmd);
74 | i2c_master_cmd_begin(I2C_NUM_0, cmd, 10/portTICK_PERIOD_MS);
75 | i2c_cmd_link_delete(cmd);
76 | }
77 |
78 | vTaskDelete(NULL);
79 | }
80 |
81 | void task_ssd1306_display_clear(void *ignore) {
82 | i2c_cmd_handle_t cmd;
83 |
84 | uint8_t zero[128];
85 | for (uint8_t i = 0; i < 8; i++) {
86 | cmd = i2c_cmd_link_create();
87 | i2c_master_start(cmd);
88 | i2c_master_write_byte(cmd, (OLED_I2C_ADDRESS << 1) | I2C_MASTER_WRITE, true);
89 | i2c_master_write_byte(cmd, OLED_CONTROL_BYTE_CMD_SINGLE, true);
90 | i2c_master_write_byte(cmd, 0xB0 | i, true);
91 |
92 | i2c_master_write_byte(cmd, OLED_CONTROL_BYTE_DATA_STREAM, true);
93 | i2c_master_write(cmd, zero, 128, true);
94 | i2c_master_stop(cmd);
95 | i2c_master_cmd_begin(I2C_NUM_0, cmd, 10/portTICK_PERIOD_MS);
96 | i2c_cmd_link_delete(cmd);
97 | }
98 |
99 | vTaskDelete(NULL);
100 | }
101 |
102 |
103 | void task_ssd1306_contrast(void *ignore) {
104 | i2c_cmd_handle_t cmd;
105 |
106 | uint8_t contrast = 0;
107 | uint8_t direction = 1;
108 | while (true) {
109 | cmd = i2c_cmd_link_create();
110 | i2c_master_start(cmd);
111 | i2c_master_write_byte(cmd, (OLED_I2C_ADDRESS << 1) | I2C_MASTER_WRITE, true);
112 | i2c_master_write_byte(cmd, OLED_CONTROL_BYTE_CMD_STREAM, true);
113 | i2c_master_write_byte(cmd, OLED_CMD_SET_CONTRAST, true);
114 | i2c_master_write_byte(cmd, contrast, true);
115 | i2c_master_stop(cmd);
116 | i2c_master_cmd_begin(I2C_NUM_0, cmd, 10/portTICK_PERIOD_MS);
117 | i2c_cmd_link_delete(cmd);
118 | vTaskDelay(1/portTICK_PERIOD_MS);
119 |
120 | contrast += direction;
121 | if (contrast == 0xFF) { direction = -1; }
122 | if (contrast == 0x0) { direction = 1; }
123 | }
124 | vTaskDelete(NULL);
125 | }
126 |
127 | void task_ssd1306_scroll(void *ignore) {
128 | esp_err_t espRc;
129 |
130 | i2c_cmd_handle_t cmd = i2c_cmd_link_create();
131 | i2c_master_start(cmd);
132 |
133 | i2c_master_write_byte(cmd, (OLED_I2C_ADDRESS << 1) | I2C_MASTER_WRITE, true);
134 | i2c_master_write_byte(cmd, OLED_CONTROL_BYTE_CMD_STREAM, true);
135 |
136 | i2c_master_write_byte(cmd, 0x29, true); // vertical and horizontal scroll (p29)
137 | i2c_master_write_byte(cmd, 0x00, true);
138 | i2c_master_write_byte(cmd, 0x00, true);
139 | i2c_master_write_byte(cmd, 0x07, true);
140 | i2c_master_write_byte(cmd, 0x01, true);
141 | i2c_master_write_byte(cmd, 0x3F, true);
142 |
143 | i2c_master_write_byte(cmd, 0xA3, true); // set vertical scroll area (p30)
144 | i2c_master_write_byte(cmd, 0x20, true);
145 | i2c_master_write_byte(cmd, 0x40, true);
146 |
147 | i2c_master_write_byte(cmd, 0x2F, true); // activate scroll (p29)
148 |
149 | i2c_master_stop(cmd);
150 | espRc = i2c_master_cmd_begin(I2C_NUM_0, cmd, 10/portTICK_PERIOD_MS);
151 | if (espRc == ESP_OK) {
152 | ESP_LOGI(tag, "Scroll command succeeded");
153 | } else {
154 | ESP_LOGE(tag, "Scroll command failed. code: 0x%.2X", espRc);
155 | }
156 |
157 | i2c_cmd_link_delete(cmd);
158 |
159 | vTaskDelete(NULL);
160 | }
161 |
162 | void task_ssd1306_display_text(const void *arg_text) {
163 | char *text = (char*)arg_text;
164 | uint8_t text_len = strlen(text);
165 |
166 | i2c_cmd_handle_t cmd;
167 |
168 | uint8_t cur_page = 0;
169 |
170 | cmd = i2c_cmd_link_create();
171 | i2c_master_start(cmd);
172 | i2c_master_write_byte(cmd, (OLED_I2C_ADDRESS << 1) | I2C_MASTER_WRITE, true);
173 |
174 | i2c_master_write_byte(cmd, OLED_CONTROL_BYTE_CMD_STREAM, true);
175 | i2c_master_write_byte(cmd, 0x00, true); // reset column
176 | i2c_master_write_byte(cmd, 0x10, true);
177 | i2c_master_write_byte(cmd, 0xB0 | cur_page, true); // reset page
178 |
179 | i2c_master_stop(cmd);
180 | i2c_master_cmd_begin(I2C_NUM_0, cmd, 10/portTICK_PERIOD_MS);
181 | i2c_cmd_link_delete(cmd);
182 |
183 | for (uint8_t i = 0; i < text_len; i++) {
184 | if (text[i] == '\n') {
185 | cmd = i2c_cmd_link_create();
186 | i2c_master_start(cmd);
187 | i2c_master_write_byte(cmd, (OLED_I2C_ADDRESS << 1) | I2C_MASTER_WRITE, true);
188 |
189 | i2c_master_write_byte(cmd, OLED_CONTROL_BYTE_CMD_STREAM, true);
190 | i2c_master_write_byte(cmd, 0x00, true); // reset column
191 | i2c_master_write_byte(cmd, 0x10, true);
192 | i2c_master_write_byte(cmd, 0xB0 | ++cur_page, true); // increment page
193 |
194 | i2c_master_stop(cmd);
195 | i2c_master_cmd_begin(I2C_NUM_0, cmd, 10/portTICK_PERIOD_MS);
196 | i2c_cmd_link_delete(cmd);
197 | } else {
198 | cmd = i2c_cmd_link_create();
199 | i2c_master_start(cmd);
200 | i2c_master_write_byte(cmd, (OLED_I2C_ADDRESS << 1) | I2C_MASTER_WRITE, true);
201 |
202 | i2c_master_write_byte(cmd, OLED_CONTROL_BYTE_DATA_STREAM, true);
203 | i2c_master_write(cmd, font8x8_basic_tr[(uint8_t)text[i]], 8, true);
204 |
205 | i2c_master_stop(cmd);
206 | i2c_master_cmd_begin(I2C_NUM_0, cmd, 10/portTICK_PERIOD_MS);
207 | i2c_cmd_link_delete(cmd);
208 | }
209 | }
210 |
211 | vTaskDelete(NULL);
212 | }
213 |
214 | void app_main(void)
215 | {
216 | i2c_master_init();
217 | ssd1306_init();
218 |
219 | //xTaskCreate(&task_ssd1306_display_pattern, "ssd1306_display_pattern", 2048, NULL, 6, NULL);
220 | xTaskCreate(&task_ssd1306_display_clear, "ssd1306_display_clear", 2048, NULL, 6, NULL);
221 | vTaskDelay(100/portTICK_PERIOD_MS);
222 | xTaskCreate(&task_ssd1306_display_text, "ssd1306_display_text", 2048,
223 | (void *)"Hello world!\nMulitine is OK!\nAnother line", 6, NULL);
224 | xTaskCreate(&task_ssd1306_contrast, "ssid1306_contrast", 2048, NULL, 6, NULL);
225 | xTaskCreate(&task_ssd1306_scroll, "ssid1306_scroll", 2048, NULL, 6, NULL);
226 | }
227 |
--------------------------------------------------------------------------------
/main/ssd1366.h:
--------------------------------------------------------------------------------
1 | #ifndef MAIN_SSD1366_H_
2 | #define MAIN_SSD1366_H_
3 |
4 | // Following definitions are bollowed from
5 | // http://robotcantalk.blogspot.com/2015/03/interfacing-arduino-with-ssd1306-driven.html
6 |
7 | // SLA (0x3C) + WRITE_MODE (0x00) = 0x78 (0b01111000)
8 | #define OLED_I2C_ADDRESS 0x3C
9 |
10 | // Control byte
11 | #define OLED_CONTROL_BYTE_CMD_SINGLE 0x80
12 | #define OLED_CONTROL_BYTE_CMD_STREAM 0x00
13 | #define OLED_CONTROL_BYTE_DATA_STREAM 0x40
14 |
15 | // Fundamental commands (pg.28)
16 | #define OLED_CMD_SET_CONTRAST 0x81 // follow with 0x7F
17 | #define OLED_CMD_DISPLAY_RAM 0xA4
18 | #define OLED_CMD_DISPLAY_ALLON 0xA5
19 | #define OLED_CMD_DISPLAY_NORMAL 0xA6
20 | #define OLED_CMD_DISPLAY_INVERTED 0xA7
21 | #define OLED_CMD_DISPLAY_OFF 0xAE
22 | #define OLED_CMD_DISPLAY_ON 0xAF
23 |
24 | // Addressing Command Table (pg.30)
25 | #define OLED_CMD_SET_MEMORY_ADDR_MODE 0x20 // follow with 0x00 = HORZ mode = Behave like a KS108 graphic LCD
26 | #define OLED_CMD_SET_COLUMN_RANGE 0x21 // can be used only in HORZ/VERT mode - follow with 0x00 and 0x7F = COL127
27 | #define OLED_CMD_SET_PAGE_RANGE 0x22 // can be used only in HORZ/VERT mode - follow with 0x00 and 0x07 = PAGE7
28 |
29 | // Hardware Config (pg.31)
30 | #define OLED_CMD_SET_DISPLAY_START_LINE 0x40
31 | #define OLED_CMD_SET_SEGMENT_REMAP 0xA1
32 | #define OLED_CMD_SET_MUX_RATIO 0xA8 // follow with 0x3F = 64 MUX
33 | #define OLED_CMD_SET_COM_SCAN_MODE 0xC8
34 | #define OLED_CMD_SET_DISPLAY_OFFSET 0xD3 // follow with 0x00
35 | #define OLED_CMD_SET_COM_PIN_MAP 0xDA // follow with 0x12
36 | #define OLED_CMD_NOP 0xE3 // NOP
37 |
38 | // Timing and Driving Scheme (pg.32)
39 | #define OLED_CMD_SET_DISPLAY_CLK_DIV 0xD5 // follow with 0x80
40 | #define OLED_CMD_SET_PRECHARGE 0xD9 // follow with 0xF1
41 | #define OLED_CMD_SET_VCOMH_DESELCT 0xDB // follow with 0x30
42 |
43 | // Charge Pump (pg.62)
44 | #define OLED_CMD_SET_CHARGE_PUMP 0x8D // follow with 0x14
45 |
46 | #endif /* MAIN_SSD1366_H_ */
--------------------------------------------------------------------------------
/sdkconfig:
--------------------------------------------------------------------------------
1 | #
2 | # Automatically generated file; DO NOT EDIT.
3 | # Espressif IoT Development Framework Configuration
4 | #
5 |
6 | #
7 | # SDK tool configuration
8 | #
9 | CONFIG_TOOLPREFIX="xtensa-esp32-elf-"
10 | CONFIG_PYTHON="python"
11 |
12 | #
13 | # Bootloader config
14 | #
15 | # CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set
16 | # CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set
17 | CONFIG_LOG_BOOTLOADER_LEVEL_WARN=y
18 | # CONFIG_LOG_BOOTLOADER_LEVEL_INFO is not set
19 | # CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set
20 | # CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set
21 | CONFIG_LOG_BOOTLOADER_LEVEL=2
22 |
23 | #
24 | # Security features
25 | #
26 | # CONFIG_SECURE_BOOT_ENABLED is not set
27 | # CONFIG_FLASH_ENCRYPTION_ENABLED is not set
28 |
29 | #
30 | # Serial flasher config
31 | #
32 | CONFIG_ESPTOOLPY_PORT="COM2"
33 | CONFIG_ESPTOOLPY_BAUD_115200B=y
34 | # CONFIG_ESPTOOLPY_BAUD_230400B is not set
35 | # CONFIG_ESPTOOLPY_BAUD_921600B is not set
36 | # CONFIG_ESPTOOLPY_BAUD_2MB is not set
37 | # CONFIG_ESPTOOLPY_BAUD_OTHER is not set
38 | CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
39 | CONFIG_ESPTOOLPY_BAUD=115200
40 | CONFIG_ESPTOOLPY_COMPRESSED=y
41 | # CONFIG_FLASHMODE_QIO is not set
42 | # CONFIG_FLASHMODE_QOUT is not set
43 | CONFIG_FLASHMODE_DIO=y
44 | # CONFIG_FLASHMODE_DOUT is not set
45 | CONFIG_ESPTOOLPY_FLASHMODE="dio"
46 | CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
47 | # CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set
48 | # CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set
49 | # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set
50 | CONFIG_ESPTOOLPY_FLASHFREQ="80m"
51 | # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
52 | CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
53 | # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set
54 | # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
55 | # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
56 | CONFIG_ESPTOOLPY_FLASHSIZE="2MB"
57 | CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
58 | CONFIG_ESPTOOLPY_BEFORE_RESET=y
59 | # CONFIG_ESPTOOLPY_BEFORE_NORESET is not set
60 | CONFIG_ESPTOOLPY_BEFORE="default_reset"
61 | # CONFIG_ESPTOOLPY_AFTER_RESET is not set
62 | CONFIG_ESPTOOLPY_AFTER_NORESET=y
63 | CONFIG_ESPTOOLPY_AFTER="no_reset"
64 | # CONFIG_MONITOR_BAUD_9600B is not set
65 | # CONFIG_MONITOR_BAUD_57600B is not set
66 | CONFIG_MONITOR_BAUD_115200B=y
67 | # CONFIG_MONITOR_BAUD_230400B is not set
68 | # CONFIG_MONITOR_BAUD_921600B is not set
69 | # CONFIG_MONITOR_BAUD_2MB is not set
70 | # CONFIG_MONITOR_BAUD_OTHER is not set
71 | CONFIG_MONITOR_BAUD_OTHER_VAL=115200
72 | CONFIG_MONITOR_BAUD=115200
73 |
74 | #
75 | # Partition Table
76 | #
77 | CONFIG_PARTITION_TABLE_SINGLE_APP=y
78 | # CONFIG_PARTITION_TABLE_TWO_OTA is not set
79 | # CONFIG_PARTITION_TABLE_CUSTOM is not set
80 | CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
81 | CONFIG_PARTITION_TABLE_CUSTOM_APP_BIN_OFFSET=0x10000
82 | CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv"
83 | CONFIG_APP_OFFSET=0x10000
84 | CONFIG_PHY_DATA_OFFSET=0xf000
85 | CONFIG_OPTIMIZATION_LEVEL_DEBUG=y
86 | # CONFIG_OPTIMIZATION_LEVEL_RELEASE is not set
87 |
88 | #
89 | # Component config
90 | #
91 | # CONFIG_AWS_IOT_SDK is not set
92 | # CONFIG_BT_ENABLED is not set
93 | CONFIG_BT_RESERVE_DRAM=0
94 |
95 | #
96 | # ESP32-specific
97 | #
98 | # CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set
99 | # CONFIG_ESP32_DEFAULT_CPU_FREQ_160 is not set
100 | CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y
101 | CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240
102 | CONFIG_MEMMAP_SMP=y
103 | # CONFIG_MEMMAP_TRACEMEM is not set
104 | CONFIG_TRACEMEM_RESERVE_DRAM=0x0
105 | # CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set
106 | # CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set
107 | CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y
108 | # CONFIG_ESP32_ENABLE_COREDUMP is not set
109 | # CONFIG_TWO_MAC_ADDRESS_FROM_EFUSE is not set
110 | CONFIG_FOUR_MAC_ADDRESS_FROM_EFUSE=y
111 | CONFIG_NUMBER_OF_MAC_ADDRESS_GENERATED_FROM_EFUSE=4
112 | CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32
113 | CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2048
114 | CONFIG_MAIN_TASK_STACK_SIZE=4096
115 | CONFIG_NEWLIB_STDOUT_ADDCR=y
116 | # CONFIG_NEWLIB_NANO_FORMAT is not set
117 | CONFIG_CONSOLE_UART_DEFAULT=y
118 | # CONFIG_CONSOLE_UART_CUSTOM is not set
119 | # CONFIG_CONSOLE_UART_NONE is not set
120 | CONFIG_CONSOLE_UART_NUM=0
121 | CONFIG_CONSOLE_UART_BAUDRATE=115200
122 | # CONFIG_ULP_COPROC_ENABLED is not set
123 | CONFIG_ULP_COPROC_RESERVE_MEM=0
124 | # CONFIG_ESP32_PANIC_PRINT_HALT is not set
125 | CONFIG_ESP32_PANIC_PRINT_REBOOT=y
126 | # CONFIG_ESP32_PANIC_SILENT_REBOOT is not set
127 | # CONFIG_ESP32_PANIC_GDBSTUB is not set
128 | CONFIG_ESP32_DEBUG_OCDAWARE=y
129 | CONFIG_INT_WDT=y
130 | CONFIG_INT_WDT_TIMEOUT_MS=300
131 | CONFIG_TASK_WDT=y
132 | # CONFIG_TASK_WDT_PANIC is not set
133 | CONFIG_TASK_WDT_TIMEOUT_S=5
134 | CONFIG_TASK_WDT_CHECK_IDLE_TASK=y
135 | # CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set
136 | CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y
137 | # CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set
138 | # CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set
139 | CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y
140 | CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=0
141 | CONFIG_WIFI_ENABLED=y
142 | CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10
143 | CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=0
144 | # CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set
145 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y
146 | CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1
147 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32
148 | CONFIG_ESP32_WIFI_AMPDU_ENABLED=y
149 | CONFIG_ESP32_WIFI_NVS_ENABLED=y
150 | CONFIG_PHY_ENABLED=y
151 |
152 | #
153 | # PHY
154 | #
155 | CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y
156 | # CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set
157 | CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20
158 | CONFIG_ESP32_PHY_MAX_TX_POWER=20
159 | # CONFIG_ETHERNET is not set
160 |
161 | #
162 | # FAT Filesystem support
163 | #
164 | CONFIG_FATFS_CODEPAGE_ASCII=y
165 | # CONFIG_FATFS_CODEPAGE_437 is not set
166 | # CONFIG_FATFS_CODEPAGE_720 is not set
167 | # CONFIG_FATFS_CODEPAGE_737 is not set
168 | # CONFIG_FATFS_CODEPAGE_771 is not set
169 | # CONFIG_FATFS_CODEPAGE_775 is not set
170 | # CONFIG_FATFS_CODEPAGE_850 is not set
171 | # CONFIG_FATFS_CODEPAGE_852 is not set
172 | # CONFIG_FATFS_CODEPAGE_855 is not set
173 | # CONFIG_FATFS_CODEPAGE_857 is not set
174 | # CONFIG_FATFS_CODEPAGE_860 is not set
175 | # CONFIG_FATFS_CODEPAGE_861 is not set
176 | # CONFIG_FATFS_CODEPAGE_862 is not set
177 | # CONFIG_FATFS_CODEPAGE_863 is not set
178 | # CONFIG_FATFS_CODEPAGE_864 is not set
179 | # CONFIG_FATFS_CODEPAGE_865 is not set
180 | # CONFIG_FATFS_CODEPAGE_866 is not set
181 | # CONFIG_FATFS_CODEPAGE_869 is not set
182 | # CONFIG_FATFS_CODEPAGE_932 is not set
183 | # CONFIG_FATFS_CODEPAGE_936 is not set
184 | # CONFIG_FATFS_CODEPAGE_949 is not set
185 | # CONFIG_FATFS_CODEPAGE_950 is not set
186 | CONFIG_FATFS_CODEPAGE=1
187 | CONFIG_FATFS_MAX_LFN=255
188 |
189 | #
190 | # FreeRTOS
191 | #
192 | CONFIG_FREERTOS_UNICORE=y
193 | CONFIG_FREERTOS_CORETIMER_0=y
194 | # CONFIG_FREERTOS_CORETIMER_1 is not set
195 | CONFIG_FREERTOS_HZ=1000
196 | CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y
197 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set
198 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL=y
199 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY is not set
200 | # CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set
201 | CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=3
202 | CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y
203 | # CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set
204 | # CONFIG_FREERTOS_ASSERT_DISABLE is not set
205 | CONFIG_FREERTOS_BREAK_ON_SCHEDULER_START_JTAG=y
206 | # CONFIG_ENABLE_MEMORY_DEBUG is not set
207 | CONFIG_FREERTOS_ISR_STACKSIZE=1536
208 | # CONFIG_FREERTOS_LEGACY_HOOKS is not set
209 | CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16
210 | # CONFIG_SUPPORT_STATIC_ALLOCATION is not set
211 | CONFIG_TIMER_TASK_PRIORITY=1
212 | CONFIG_TIMER_TASK_STACK_DEPTH=2048
213 | CONFIG_TIMER_QUEUE_LENGTH=10
214 | # CONFIG_FREERTOS_DEBUG_INTERNALS is not set
215 |
216 | #
217 | # Log output
218 | #
219 | # CONFIG_LOG_DEFAULT_LEVEL_NONE is not set
220 | # CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set
221 | # CONFIG_LOG_DEFAULT_LEVEL_WARN is not set
222 | # CONFIG_LOG_DEFAULT_LEVEL_INFO is not set
223 | CONFIG_LOG_DEFAULT_LEVEL_DEBUG=y
224 | # CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set
225 | CONFIG_LOG_DEFAULT_LEVEL=4
226 | CONFIG_LOG_COLORS=y
227 |
228 | #
229 | # LWIP
230 | #
231 | # CONFIG_L2_TO_L3_COPY is not set
232 | CONFIG_LWIP_MAX_SOCKETS=4
233 | CONFIG_LWIP_THREAD_LOCAL_STORAGE_INDEX=0
234 | # CONFIG_LWIP_SO_REUSE is not set
235 | # CONFIG_LWIP_SO_RCVBUF is not set
236 | CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1
237 | # CONFIG_LWIP_IP_FRAG is not set
238 | # CONFIG_LWIP_IP_REASSEMBLY is not set
239 | CONFIG_TCP_MAXRTX=12
240 | CONFIG_TCP_SYNMAXRTX=6
241 | CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y
242 |
243 | #
244 | # mbedTLS
245 | #
246 | CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384
247 | # CONFIG_MBEDTLS_DEBUG is not set
248 | CONFIG_MBEDTLS_HARDWARE_AES=y
249 | CONFIG_MBEDTLS_HARDWARE_MPI=y
250 | CONFIG_MBEDTLS_MPI_USE_INTERRUPT=y
251 | CONFIG_MBEDTLS_HARDWARE_SHA=y
252 | CONFIG_MBEDTLS_HAVE_TIME=y
253 | # CONFIG_MBEDTLS_HAVE_TIME_DATE is not set
254 |
255 | #
256 | # OpenSSL
257 | #
258 | # CONFIG_OPENSSL_DEBUG is not set
259 | CONFIG_OPENSSL_ASSERT_DO_NOTHING=y
260 | # CONFIG_OPENSSL_ASSERT_EXIT is not set
261 |
262 | #
263 | # SPI Flash driver
264 | #
265 | # CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set
266 | CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y
267 |
--------------------------------------------------------------------------------