-
C Programmer’s Guide
1
-
Welcome
3
-
Audience
3
-
Related Documentation
4
-
Table of Contents
7
-
What Is Neuron C?
14
-
Unique Aspects of Neuron C
15
-
Neuron C Integer Constants
16
-
Neuron C Variables
17
-
Neuron C Variable Types
17
-
Neuron C Storage Classes
18
-
Variable Initialization
19
-
Neuron C Declarations
19
-
Configuration Properties
21
-
Driven Protocols
23
-
Low-Level Messaging
23
-
I/O Devices
23
-
Functions
25
-
Focusing on a Single Device
27
-
When Clauses
28
-
When Statement
29
-
Predefined Events
30
-
Event Processing
32
-
Reset Event
33
-
User-Defined Events
34
-
Scheduling of When Clauses
34
-
Priority When Clauses
35
-
Function Prototypes
36
-
Declaring Timers
37
-
Examples
38
-
The timer_expires Event
38
-
Input/Output
39
-
I/O Object Types
40
-
Device Self-Documentation
42
-
Dimmer Switch
46
-
Fixed Timers
48
-
With a 10 MHz Input Clock
49
-
With Other Clock Speeds
50
-
Repeating Timers
51
-
Accuracy of Second Timers
52
-
Delay Functions
52
-
EEPROM Write Timer
53
-
Network Variables
55
-
Major Topics
56
-
When Updates Occur
59
-
Declaring Network Variables
59
-
Connecting Network Variables
61
-
Network Variable Events
63
-
The nv_update_occurs Event
63
-
Neuron C Reference
64
-
Preemption Mode
65
-
Variables
67
-
Tradeoffs
68
-
Polling Network Variables
68
-
Monitoring Network Variables
77
-
Authentication
78
-
How Authentication Works
79
-
Validating a Type Change
84
-
Processing a Type Change
85
-
Processing a Size Change
86
-
Rejecting a Type Change
87
-
Changeable-Type Example
87
-
// for details
93
-
} // bConversionOK
93
-
} // SetCurrent()
93
-
Configure Device Behavior
95
-
ONWORKS file transfer
97
-
Device Property Lists
101
-
Neuron C Reference Guide
102
-
Device Interface
104
-
Sharing of Configuration
104
-
Properties
104
-
Instantiation
107
-
Using Functional Blocks to
113
-
Implement a Device Interface
113
-
Overview
114
-
Technical
115
-
Resources
115
-
The Director Function
118
-
Scope Rules
121
-
Behavior
127
-
Application Messages
129
-
ONWORKS
130
-
Layers of Neuron Software
131
-
Constructing a Message
132
-
Message Tags
133
-
Message Codes
133
-
Management
133
-
Block Transfers of Data
136
-
Sending a Message
137
-
Receiving a Message
138
-
The msg_arrives Event
138
-
The msg_receive( ) Function
139
-
Application Message Examples
141
-
Lamp Program
141
-
Switch Program
141
-
Connecting Message Tags
142
-
Explicit Addressing
142
-
Service
143
-
Message Completion Events
143
-
Messages
145
-
Preemption Mode and Messages
146
-
Constructing a Response
149
-
Sending a Response
150
-
Receiving a Response
150
-
The resp_arrives Event
150
-
The resp_receive( ) Function
151
-
Format of a Response
151
-
Request/Response Examples
152
-
Application Buffers
154
-
Memory Management
155
-
Neuron C
155
-
Reference Guide
155
-
Additional Features
157
-
The Scheduler
158
-
Scheduler Reset Mechanism
158
-
Interrupts
159
-
Scheduler Example
160
-
Bypass Mode
161
-
The post_events( ) Function
161
-
Watchdog Timer
162
-
Additional Predefined Events
163
-
Wink Event
164
-
Interrupt Sources
165
-
I/O Interrupts
166
-
Timer/Counter Interrupts
166
-
Defining an Interrupt Task
167
-
)]',255min(,0max[ Zn =
171
-
Interrupt Latency
174
-
Debugging Interrupt Tasks
176
-
Sleep Mode
177
-
Putting the Device to Sleep
178
-
Forced Sleep
179
-
Error Handling
180
-
Resetting the Device
181
-
Restarting the Application
181
-
Disabling a Functional Block
182
-
Logging Application Errors
183
-
System Errors
183
-
Memory Use
186
-
RAM Use
186
-
EEPROM Use
186
-
Using Neuron Chip Memory
188
-
Chips with Off-Chip Memory
188
-
Memory Regions
189
-
Memory Areas
190
-
Default Memory Usage
192
-
Declarations)
193
-
Compiler Directives
196
-
When the Program Is Relinked
196
-
Use of Flash Memory
196
-
Reallocating On-Chip EEPROM
200
-
Address Table
200
-
Alias Table
201
-
Domain Table
202
-
Allocating Buffers
202
-
Application Buffer Size
203
-
Buffer Size
203
-
Network Buffer Size
204
-
Buffer Counts
204
-
Outgoing Application Buffers
206
-
Outgoing Network Buffers
206
-
Incoming Network Buffers
207
-
Incoming Application Buffers
207
-
(20, 21, 22, 24, 26, 30, 34)
208
-
(20, 21, 22, 24, 26, 30, 34
208
-
(20, 21, 22, 24, 26, 30)
209
-
Neuron Chip
211
-
Template File
212
-
Initialization Actions
214
-
Be Aware of Library Usage
215
-
Observe Declaration Order
216
-
Use Function Calls Liberally
218
-
Use C Operators Effectively
219
-
Using the Link Map
221
-
Stand-Alone Tools
224
-
Common Stand-Alone Tool Use
224
-
Common Syntax
224
-
Common Set of Basic Commands
226
-
Neuron C Compiler
227
-
Neuron Assembler
228
-
Neuron Linker
228
-
Neuron Exporter
229
-
Neuron Librarian
231
-
Neuron C Function Libraries
232
-
Definitions
234
-
Advantages of a Library
235
-
Disadvantages of a Library
235
-
Providing a Large RAM Space
246
-
Neuron C Language
249
-
Characteristics
250
-
Translation (J.3.1)
250
-
Environment (J.3.2)
251
-
Identifiers (J.3.3)
251
-
Characters (J.3.4)
252
-
Integers (J.3.5)
253
-
Floating Point (J.3.6)
254
-
Arrays and Pointers (J.3.7)
254
-
Standard)
254
-
Hints (J.3.8)
255
-
(J.3.9)
255
-
Qualifiers (J.3.10)
256
-
Library Functions (J.3.12)
257
-
248 Index
260
-
250 Index
262
-
ONWORKS messages, 9
263
-
252 Index
264
-
254 Index
266
Comentarios a estos manuales