CompileDES  3.13
Executable-Code Generation from Synchronised libFAUDES Automata
cgp_atmega.h
Go to the documentation of this file.
1 
3 /*
4  FAU Discrete Event Systems Library (libFAUDES)
5 
6  Copyright (C) 2016 Thomas Moor
7 
8 */
9 
10 
11 
12 #ifndef FAUDES_ATMEGA_H
13 #define FAUDES_ATMEGA_H
14 
15 #include "libfaudes.h"
16 #include "cgp_embeddedc.h"
17 
18 using namespace faudes;
19 
20 
21 
117 
118 public:
119 
120  /*****************************************
121  *****************************************
122  *****************************************
123  *****************************************/
124 
130  ATmegaCodeGenerator(void);
131 
135  virtual ~ATmegaCodeGenerator(void);
136 
141  virtual void Clear(void);
142 
143 
146 protected:
147 
150 
153 
156 
158  std::string mATmegaPgmReadWord;
159 
161  void DoCompile(void);
162 
164  void DoGenerate(void);
165 
167  virtual void InitialisePorts(void);
168 
171  virtual AX TargetExpression(const AA& address);
172  virtual std::string TargetAddress(const AA& address);
173  void CintarrayDeclare(const AA& address, int offset, const std::vector<int>& val);
174  AA CintarrayAccess(const AA& address, int index);
175  AA CintarrayAccess(const AA& address, const AA& indexaddr);
176  void CwordarrayDeclare(const AA& address, int offset, const std::vector<word_t>& val);
177  AA CwordarrayAccess(const AA& address, int index);
178  AA CwordarrayAccess(const AA& address, const AA& indexaddr);
179  void CstrarrayDeclare(const AA& address, int offset, const std::vector<std::string>& val);
180  AA CstrarrayAccess(const AA& address, int index);
181  AA CstrarrayAccess(const AA& address, const AA& indexaddr);
182  void RunActionSet(const std::string& address);
183  void RunActionClr(const std::string& address);
184  AX ReadInputLine(const std::string& address);
199  virtual void DoReadTargetConfiguration(TokenReader& rTr);
200 
212  virtual void DoWriteTargetConfiguration(TokenWriter& rTw) const;
213 
214 };
215 
216 
217 #endif
218 
Code-generator for target C.
Target ATmega micro-controller (AVR8)
Definition: cgp_atmega.h:116
bool mATmegaProgmem
ATmega code options.
Definition: cgp_atmega.h:149
std::string mATmegaPgmReadInteger
ATmega code options.
Definition: cgp_atmega.h:155
bool mATmegaPullups
ATmega code options.
Definition: cgp_atmega.h:152
std::string mATmegaPgmReadWord
ATmega code options.
Definition: cgp_atmega.h:158
Abstract address; see also Absstract_Addresses.
Abstract expression; see also Absstract_Addresses.
Implementation of code primitives by generic C-code.
Definition: cgp_embeddedc.h:71