branch_name
stringclasses 149
values | text
stringlengths 23
89.3M
| directory_id
stringlengths 40
40
| languages
listlengths 1
19
| num_files
int64 1
11.8k
| repo_language
stringclasses 38
values | repo_name
stringlengths 6
114
| revision_id
stringlengths 40
40
| snapshot_id
stringlengths 40
40
|
|---|---|---|---|---|---|---|---|---|
refs/heads/master
|
<file_sep>package func.java;
import static func.java.controlflow.expressions.ExpressionHub.return_;
import java.util.Optional;
public class UnlessExpressionQuickTest
{
public static void main(String[] args)
{
Optional<String> output = return_(() -> "output").unless_(true);
System.out.println(output.orElse("no go"));
}
}
<file_sep>package func.java.controlflow.expressions.switches;
class ObjectCompareSwitchExpression<T, R> extends SwitchExpression<T, R>
{
ObjectCompareSwitchExpression(T switchObj)
{
this.switchObj = switchObj;
}
T getSwitchArgument()
{
return switchObj;
}
public ObjectCompareCase<T, R> case_(T caseStatement)
{
return new ObjectCompareCase<>(caseStatement, this);
}
private final T switchObj;
}
<file_sep>package func.java.controlflow.statements.switches;
//TODO: organize, document, and test all these.<file_sep>package func.java.tuples;
import java.util.function.Consumer;
final class TrioImpl<T1, T2, T3> implements Trio<T1, T2, T3>
{
public T1 one()
{
return one;
}
public Trio<T1, T2, T3> useOne(Consumer<? super T1> func)
{
if(func != null)
{
func.accept(one);
}
return this;
}
public T2 two()
{
return two;
}
public Trio<T1, T2, T3> useTwo(Consumer<? super T2> func)
{
if(func != null)
{
func.accept(two);
}
return this;
}
public T3 three()
{
return three;
}
public Trio<T1, T2, T3> useThree(Consumer<? super T3> func)
{
if(func != null)
{
func.accept(three);
}
return this;
}
public Trio<T3, T2, T1> swap()
{
return new SwappedTuple3<>(this);
}
public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append("(").append(one).append(", ").append(two).append(", ").append(three).append(")");
return sb.toString();
}
TrioImpl(T1 one, T2 two, T3 three)
{
this.one = one;
this.two = two;
this.three = three;
}
private final T1 one;
private final T2 two;
private final T3 three;
}
final class SwappedTuple3<T1, T2, T3> implements Trio<T1, T2, T3>
{
public T1 one()
{
return original.three();
}
public Trio<T1, T2, T3> useOne(Consumer<? super T1> func)
{
original.useThree(func);
return this;
}
public T2 two()
{
return original.two();
}
public Trio<T1, T2, T3> useTwo(Consumer<? super T2> func)
{
original.useTwo(func);
return this;
}
public T3 three()
{
return original.one();
}
public Trio<T1, T2, T3> useThree(Consumer<? super T3> func)
{
original.useOne(func);
return this;
}
public Trio<T3, T2, T1> swap()
{
return original;
}
public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append("(").append(one()).append(", ").append(two()).append(", ").append(three()).append(")");
return sb.toString();
}
SwappedTuple3(Trio<T3, T2, T1> original)
{
this.original = original;
}
private final Trio<T3, T2, T1> original;
}
<file_sep>package func.java.controlflow.expressions.ifexpr;
import java.util.function.Supplier;
public abstract class IfBlock<R>
{
//***************************************************************************
// Internal-use methods
//***************************************************************************
R getValue()
{
return giver.get();
}
abstract boolean isTrue();
//***************************************************************************
// Inherited-use constructor and fields
//***************************************************************************
protected IfBlock(IfExpression<R> if_)
{
this.if_ = if_;
}
protected final IfExpression<R> if_;
protected Supplier<R> giver;
}
<file_sep>package func.java.tuples;
import java.util.function.Consumer;
class QuartetImpl<T1, T2, T3, T4> implements Quartet<T1, T2, T3, T4>
{
public T1 one()
{
return one;
}
public Quartet<T1, T2, T3, T4> useOne(Consumer<? super T1> func)
{
if(func != null)
{
func.accept(one);
}
return this;
}
public T2 two()
{
return two;
}
public Quartet<T1, T2, T3, T4> useTwo(Consumer<? super T2> func)
{
if(func != null)
{
func.accept(two);
}
return this;
}
public T3 three()
{
return three;
}
public Quartet<T1, T2, T3, T4> useThree(Consumer<? super T3> func)
{
if(func != null)
{
func.accept(three);
}
return this;
}
public T4 four()
{
return four;
}
public Quartet<T1, T2, T3, T4> useFour(Consumer<? super T4> func)
{
if(func != null)
{
func.accept(four);
}
return this;
}
public Quartet<T4, T3, T2, T1> swap()
{
return new SwappedTuple4<>(this);
}
public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append("(").append(one).append(", ").append(two).append(", ").append(three).append(", ").append(four).append(")");
return sb.toString();
}
QuartetImpl(T1 one, T2 two, T3 three, T4 four)
{
this.one = one;
this.two = two;
this.three = three;
this.four = four;
}
private final T1 one;
private final T2 two;
private final T3 three;
private final T4 four;
}
class SwappedTuple4<T1, T2, T3, T4> implements Quartet<T1, T2, T3, T4>
{
public T1 one()
{
return normal.four();
}
public Quartet<T1, T2, T3, T4> useOne(Consumer<? super T1> func)
{
normal.useFour(func);
return this;
}
public T2 two()
{
return normal.three();
}
public Quartet<T1, T2, T3, T4> useTwo(Consumer<? super T2> func)
{
normal.useThree(func);
return this;
}
public T3 three()
{
return normal.two();
}
public Quartet<T1, T2, T3, T4> useThree(Consumer<? super T3> func)
{
normal.useTwo(func);
return this;
}
public T4 four()
{
return normal.one();
}
public Quartet<T1, T2, T3, T4> useFour(Consumer<? super T4> func)
{
normal.useOne(func);
return this;
}
public Quartet<T4, T3, T2, T1> swap()
{
return normal;
}
public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append("(").append(one()).append(", ").append(two()).append(", ").append(three()).append(", ").append(four()).append(")");
return sb.toString();
}
SwappedTuple4(Quartet<T4, T3, T2, T1> normal)
{
this.normal = normal;
}
private final Quartet<T4, T3, T2, T1> normal;
}
<file_sep>package func.java.controlflow.expressions.switches;
import java.util.function.Supplier;
class SupplierCompareCase<T, R> extends Case<SupplierCompareSwitchExpression<T, R>, Supplier<T>, R>
{
public SupplierCompareCase(Supplier<T> obj, SupplierCompareSwitchExpression<T, R> switch_)
{
super(obj, switch_);
}
boolean isTrue()
{
return caseStatement.get().equals(switch_.getSwitchArgument());
}
}
<file_sep>/**
* This package adds control flow expressions to Java.
* <p>
* If you don't want to learn so much <i>about</i> what's in the package, but
* more so how to use it, skip ahead to <a href="#using">Using the Expressions</a>.</p>
* <p>
* The only control flow <i>expression</i> in Java is the ternary operator (
* {@code __?__:__} ). The rest are just statements (meaning they don't "return"
* to a value). Functional programming languages often provide control flow expressions
* though, since functional programming is supposed to shun side-effects as much
* as possible, which statements are guaranteed to have. If Java is to become
* functional, we should make it at least as useful as a typical functional
* language with some control flow expressions.</p>
* <p>
* This package includes several different kinds of control flow expressions:
* <ul>
* <li><a href="#unless">Unless Expression</a> - similar to Ruby's
* {@code unless} statement, but returns a value</li>
* <li><a href="#if">If Expression</a> - essentially an expanded ternary
* operator that looks like an if statement. It provides additional branches
* through "else if" blocks like an if statement, but returns a value like the
* ternary operator</li>
* <li>Switch Expressions:
* <ul>
* <li><a href="#compare">Typical switch</a>, where is compares the value in
* the case to the one passed into the switch originally, but returns a
* value instead of defining a behavior. Because it returns a value, it's
* not possible for the flow to drop down to the next case, though.</li>
* <li><a href="#predicate">Predicate switch</a>, where the value you passed
* into the switch gets compared or checked however you want to do it. For
* example, you could check whether it's less than 3. And, obviously, the
* value it returns is dependent on which case is triggered first.</li>
* </ul>
* </li>
* </ul>
* <h2 id="using">Using the Expressions</h2>
* Every expression in this package can be started from one spot: the
* {@link ExpressionHub} class. They can all be started other ways, but going
* through {@code ExpressionHub} allows you to simply statically import its
* methods, making for more fluent usage and only one import.</p>
* <p>
* <i>A note on method names:</i><br>
* All of the relevant methods that you'll need to call have an underscore ( _ )
* suffix. This is largely due to the fact that most of the method names are
* also keywords in the java language. So, to prevent collision or any silly
* names, I used the underscore suffix throughout. This has an unintentional
* benefit of making it easier to find what methods you should use next. I tried
* using an underscore prefix, which would have the added benefit of placing all
* the methods at the top of the list, but it was somehow much harder to read
* that way.</p>
* <h3 id="unless">Unless Expression</h3>
* The {@code unless} statement in Ruby is an interesting creature. It defines
* a default behavior that happens unless the boolean expression after unless
* evaluates to true.</p>
* <p><code>
* <i>doThis</i> unless <i>thisIsTrue</i>
* </code></p>
* This is a very fluent, but limited control flow statement that is equivalent
* to<br>
* <p><code>
* if(!<i>thisIsTrue</i>)<br>
* <i>doThis</i>
* </code></p>
* <p>
* This is exceptionally handy as a statement, but I liked it so much that I
* decided to make an expression out of it too, which is decidedly more
* difficult, but still quite rewarding.</p>
* <p>
* The problem is that {@code unless} defines a default, but not an alternate.
* So it uses something else that's new to Java 8: {@code Optional}. When the
* boolean expression evaluates as true, then the {@code unless} expression
* returns an Empty {@code Optional}.</p>
* <b>Example Usage</b><br>
* <code>
* import static func.java.controlflow.expressions.ExpressionHub.*;<br><br>
* Optional<String> value = return_(() ->
*/
package func.java.controlflow.expressions;<file_sep>package func.java.controlflow.statements.switches;
public abstract class Case<S extends SwitchStatement<F>, F>
{
public Case(F caseStatement, S switch_)
{
this.caseStatement = caseStatement;
this.switch_ = switch_;
action = null;
continues = false;
}
final boolean continues()
{
return continues;
}
abstract boolean isTrue();
final void runAction()
{
action.run();
}
protected final F caseStatement;
protected final S switch_;
private Runnable action;
private boolean continues;
//***************************************************************************
// Public API methods
//***************************************************************************
public Case<S, F> then_(Runnable action)
{
if(this.action == null)
this.action = action;
else
{
//tack the new action on after the old one
final Runnable oldAction = this.action;
final Runnable newAction = action;
this.action = new Runnable() {
public void run()
{
oldAction.run();
newAction.run();
}
};
}
return this;
}
public Case<S, F> do_(Runnable action)
{
return then_(action);
}
public S continue_()
{
continues = true;
switch_.addCase(this);
return switch_;
}
public abstract Case<S, F> case_(F expr);
public Case<S ,F> if_(F expr)
{
return case_(expr);
}
public DefaultCase default_()
{
switch_.addCase(this);
return switch_.default_();
}
public DefaultCase else_()
{
return default_();
}
public DefaultCase otherwise_()
{
return default_();
}
public void go_()
{
if(action == null)
{
throw new IllegalStateException("Cannot finish a ParameterlessSwitch with a case that has no action to perform");
}
switch_.addCase(this);
switch_.go_();
}
}
<file_sep>package func.java.tuples;
import java.util.function.Consumer;
/**
* Represents a 2-part tuple, as seen in other programming languages, essentially
* allowing for multiple values to be passed around together (usually in a return
* statement) without being intrinsically related.
* <p>
* Its main purpose is to serve as a return object, allowing methods to, in effect,
* return more than one object.</p>
* <p>
* If one of the objects being returned is only sometimes returned, it is
* suggested that you return an {@link java.util.Optional Optional} of that type,
* forcing those that use your returned tuple to think about the possibility of
* the object containing no value.</p>
* @param <T1> the type of the first object in the tuple
* @param <T2> the type of the second object in the tuple
*/
public interface Duo<T1, T2>
{
/**
* @return the first object in the tuple
*/
T1 one();
/**
* Provide a function that uses the first object in the tuple. Returns the
* same tuple, allowing you to chain commands.
* <p>
* The primary purpose of this is to allow in-line assignment.</p>
* <p>
* For example:<br>
* <code>
* String foo;<br>
* String bar;<br>
* //the method, baz(), returns a Tuple2<String, String><br>
* baz().useOne((s) -> foo = s).useTwo((s) -> bar = s);
* </code>
* @param func - the function to "consume" the first object
* @return <code>this</code>, for method chaining.
*/
Duo<T1, T2> useOne(Consumer<? super T1> func);
/**
* @return the second object in the tuple
*/
T2 two();
/**
* Provide a function that uses the second object in the tuple. Returns the
* same tuple, allowing you to chain commands.
* @see {@link #useOne} for a fuller description of the purpose of this method
* @param func - the function to "consume" the second object
* @return <code>this</code>, for method chaining.
*/
Duo<T1, T2> useTwo(Consumer<? super T2> func);
/**
* @return the same tuple in reverse order
*/
Duo<T2, T1> swap();
//***************************************************************************
// Public static factories
//***************************************************************************
/**
* Creates and returns a Tuple2 containing the given objects
* @param one - the first object of the tuple
* @param two - the second object of the tuple
* @return the created Tuple2 containing the given objects
*/
public static <T1,T2> Duo<T1, T2> of(T1 one, T2 two)
{
return new DuoImpl<T1,T2>(one, two);
}
}
<file_sep>package func.java.controlflow.expressions.ifexpr;
import java.util.function.Supplier;
public class NormalIfBlock<R> extends IfBlock<R>
{
//***************************************************************************
// Public API methods
//***************************************************************************
public IfExpression<R> return_(Supplier<R> giver)
{
this.giver = giver;
if_.addIfBlock(this);
return if_;
}
public IfExpression<R> then_(Supplier<R> giver)
{
return return_(giver);
}
//***************************************************************************
// Internal-use static factories methods
//***************************************************************************
static <R> NormalIfBlock<R> if_(Supplier<Boolean> expr, IfExpression<R> if_)
{
return new NormalIfBlock<>(expr, if_);
}
boolean isTrue()
{
return expr.get();
}
//***************************************************************************
// Private constructors and fields
//***************************************************************************
private NormalIfBlock(Supplier<Boolean> expr, IfExpression<R> if_)
{
super(if_);
this.expr = expr;
}
private Supplier<Boolean> expr;
}
<file_sep>package func.java.controlflow.statements.switches;
import java.util.function.Predicate;
class PredicateSwitchStatement<T> extends SwitchStatement<Predicate<T>>
{
//***************************************************************************
// Public API methods
//***************************************************************************
public PredicateCase<T> case_(Predicate<T> expr)
{
return new PredicateCase<T>(expr, this);
}
T getSwitchArgument()
{
return switchObj;
}
//***************************************************************************
// Internal constructor
//***************************************************************************
PredicateSwitchStatement(T switchObj)
{
this.switchObj = switchObj;
}
//***************************************************************************
// private fields
//***************************************************************************
private final T switchObj;
}
<file_sep>package func.java.controlflow.expressions;
import java.util.function.Supplier;
import func.java.controlflow.expressions.ifexpr.IfExpression;
import func.java.controlflow.expressions.ifexpr.NormalIfBlock;
import func.java.controlflow.expressions.switches.SwitchExpressionHub;
/**
* {@code ExpressionHub} is a starting point for all the control flow expressions
* in the functional-java library.
* @param <R>
*/
public class ExpressionHub<R>
{
//***************************************************************************
// Public static factory methods
//***************************************************************************
public static <R> ExpressionHub<R> returns_(Class<R> clazz)
{
return new ExpressionHub<>();
}
public static <R> UnlessExpression<R> return_(Supplier<? extends R> giver)
{
return UnlessExpression.returns_(giver);
}
//***************************************************************************
// Public factory methods
//***************************************************************************
public <T> SwitchExpressionHub<T, ? extends R> switch_(T obj)
{
return SwitchExpressionHub.switch_(obj);
}
public NormalIfBlock<? extends R> if_(Supplier<Boolean> expr)
{
return IfExpression.if_(expr);
}
}
<file_sep>package func.java;
import java.util.function.Supplier;
import func.java.lazyinstantiator.LazilyInstantiate;
public class LazyInstanceQuickTest
{
public static void main(String[] args)
{
LazilyInstantiate<String> output = LazilyInstantiate.using(output());
System.out.println("instantiator created \ncalling get()");
System.out.println(output.get());
System.out.println(output.get());
}
public static Supplier<String> output()
{
return new Supplier<String>(){
public String get()
{
System.out.println("Supplier called...");
return "ready to go";
}
};
}
}
<file_sep>package func.java.controlflow.statements.switches;
import java.util.function.Predicate;
class PredicateCase<T> extends Case<PredicateSwitchStatement<T>, Predicate<T>>
{
public PredicateCase(Predicate<T> pred, PredicateSwitchStatement<T> switch_)
{
super(pred, switch_);
}
boolean isTrue()
{
return caseStatement.test(switch_.getSwitchArgument());
}
public Case<PredicateSwitchStatement<T>, Predicate<T>> case_(Predicate<T> expr)
{
switch_.addCase(this);
return switch_.case_(expr);
}
}
<file_sep>package func.java.controlflow.statements.switches;
import java.util.ArrayList;
public abstract class SwitchStatement<T>
{
//***************************************************************************
// Public API methods
//***************************************************************************
public abstract Case<?, T> case_(T caseStatement);
public final Case<?, T> if_(T caseStatement)
{
return case_(caseStatement);
}
public final DefaultCase default_()
{
return new DefaultCase(this);
}
public final DefaultCase else_()
{
return default_();
}
public final DefaultCase otherwise_()
{
return default_();
}
@SuppressWarnings("unchecked")
public final void go_()
{
Case<?, T>[] caseArr = new Case[cases.size()];
caseArr = cases.toArray(caseArr);
run(caseArr, 0);
}
//***************************************************************************
// Internal use methods
//***************************************************************************
final void addCase(Case<?, T> kase)
{
cases.add(kase);
}
final void setDefaultCase(DefaultCase deFault)
{
defCase = deFault;
}
// *** private helpers *******************************************************
private void run(Case<?, T>[] arr, int currIndex)
{
if(currIndex < arr.length)
{
Case<?, T> nCase = arr[currIndex];
if(nCase.isTrue())
{
nCase.runAction();
if(nCase.continues())
{
cuntinue(arr, currIndex + 1);
}
}
else
{
run(arr, currIndex + 1);
}
}
else if (defCase != null)
{
defCase.runAction();
}
}
private void cuntinue(Case<?, T>[] arr, int currIndex)
{
if(currIndex < arr.length)
{
Case<?, T> nCase = arr[currIndex];
nCase.runAction();
if(nCase.continues())
{
cuntinue(arr, currIndex + 1);
}
}
else if(defCase != null)
{
defCase.runAction();
}
}
//***************************************************************************
// Private fields
//***************************************************************************
private ArrayList<Case<?, T>> cases = new ArrayList<>();
private DefaultCase defCase = null;
}
<file_sep>package func.java.controlflow.expressions.switches;
//TODO: organize, document, and test all these.<file_sep>package func.java.controlflow.expressions.switches;
import java.util.function.Supplier;
// TODO document and test
public class DefaultCase<R>
{
//***************************************************************************
// Public constructor
//***************************************************************************
DefaultCase(SwitchExpression<?, R> switch_)
{
this.switch_ = switch_;
giver = null;
}
//***************************************************************************
// Public API methods
//***************************************************************************
public R then_(Supplier<R> giver)
{
this.giver = giver;
switch_.setDefaultCase(this);
return switch_.go_();
}
public R return_(Supplier<R> giver)
{
return then_(giver);
}
//***************************************************************************
// Internal use methods
//***************************************************************************
R runAction()
{
return giver.get();
}
//***************************************************************************
// Private fields
//***************************************************************************
private SwitchExpression<?, R> switch_;
private Supplier<R> giver;
}
<file_sep>package func.java.controlflow.expressions;
import java.util.Optional;
import java.util.function.Supplier;
public class UnlessExpression<R>
{
public static <R> UnlessExpression<R> returns_(Supplier<? extends R> giver)
{
return new UnlessExpression<>(giver);
}
/**
* @param expr - boolean expression to evaluate
* @return {@code Optional} of value supplied by given {@code Supplier} if
* {@code expr} is false, otherwise an empty {@code Optional}. An empty
* {@code Optional} will also be returned if the {@code Supplier} returns a
* {@code null}.
*/
public Optional<R> unless_(boolean expr)
{
if(!expr)
{
return Optional.ofNullable(giver.get());
}
else
{
return Optional.empty();
}
}
private UnlessExpression(Supplier<? extends R> giver)
{
this.giver = giver;
}
private final Supplier<? extends R> giver;
}
<file_sep>package func.java;
import static func.java.controlflow.expressions.ExpressionHub.*;
public class IfExpressionQuickTest
{
public static void main (String[] args)
{
String output = returns_(String.class)
.if_(() -> true)
.return_(() -> "expr one")
.otherwise_if_(() -> false)
.then_(() -> "expr two")
.otherwise_()
.return_(() -> "expr three");
System.out.println(output);
}
}
<file_sep>package func.java.tuples;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsNull.notNullValue;
import static org.hamcrest.core.IsNull.nullValue;
import static org.hamcrest.core.IsSame.sameInstance;
import static org.junit.Assert.assertThat;
import org.junit.Test;
public class TupleDuoTest
{
private static Duo<String, Exception> getTuple()
{
return Duo.of(string, exception);
}
private final static String string = "string";
private final static Exception exception= new IllegalArgumentException("message", new NullPointerException());
private final static Duo<String, Exception> tuple = getTuple();
// ***** test of() **********************************************************
@Test
public void shouldGetNonNullValuesFromOf()
{
Duo<String, Exception> tuple = Duo.of(string, exception);
assertThat(tuple.one(), is(notNullValue()));
}
@Test
public void shouldGetNullObjectsBackFromOf()
{
Duo<String, Exception> tuple = Duo.of(null, null);
assertThat(tuple.one(), is(nullValue()));
assertThat(tuple.two(), is(nullValue()));
}
// ***** test one() *********************************************************
@Test
public void shouldGetStringBackFromOne()
{
assertThat(tuple.one(), is(sameInstance(string)));
}
// ***** test two() *********************************************************
@Test
public void shouldGetExceptionBackFromTwo()
{
assertThat(tuple.two(), is(sameInstance(exception)));
}
// ***** test swap() ********************************************************
@Test
public void shouldGetReversedValuesFromSwap()
{
Duo<Exception, String> revTuple = tuple.swap();
assertThat(revTuple.one(), is(tuple.two()));
assertThat(revTuple.two(), is(tuple.one()));
}
@Test
public void shouldGetSameTupleBackWhenDoubleSwapped()
{
Duo<String, Exception> doubleSwapped = tuple.swap().swap();
assertThat(doubleSwapped, is(sameInstance(tuple)));
}
}
<file_sep>package func.java.tuples;
import java.util.function.Consumer;
/**
* Represents a 3-part tuple, as seen in other programming languages, essentially
* allowing for multiple values to be passed around together (usually in a return
* statement) without being intrinsically related.
* <p>
* @see {@link Duo} for more information on the purpose and use of these
* Tuples.</p>
* @param <T1> the type of the first object in the tuple
* @param <T2> the type of the second object in the tuple
* @param <T3> the type of the third object in the tuple
*/
public interface Trio<T1, T2, T3>
{
/**
* @return the first object in the tuple
*/
T1 one();
/**
* Provide a function that uses the first object in the tuple. Returns the
* same tuple, allowing you to chain commands.
* @see {@link Duo#useOne} for a fuller description of the purpose of this method
* @param func - the function to "consume" the first object
* @return <code>this</code>, for method chaining.
*/
Trio<T1, T2, T3> useOne(Consumer<? super T1> func);
/**
* @return the second object in the tuple
*/
T2 two();
/**
* Provide a function that uses the second object in the tuple. Returns the
* same tuple, allowing you to chain commands.
* @see {@link Duo#useOne} for a fuller description of the purpose of this method
* @param func - the function to "consume" the second object
* @return <code>this</code>, for method chaining.
*/
Trio<T1, T2, T3> useTwo(Consumer<? super T2> func);
/**
* @return the third object in the tuple
*/
T3 three();
/**
* Provide a function that uses the third object in the tuple. Returns the
* same tuple, allowing you to chain commands.
* @see {@link Duo#useOne} for a fuller description of the purpose of this method
* @param func - the function to "consume" the third object
* @return <code>this</code>, for method chaining.
*/
Trio<T1, T2, T3> useThree(Consumer<? super T3> func);
/**
* @return the same tuple in reverse order
*/
Trio<T3, T2, T1> swap();
//***************************************************************************
// Static factory method
//***************************************************************************
//hides the existance of Tuple3Impl
/**
* Creates and returns a new Tuple3 containing the given objects
* @param one - the first object of the tuple
* @param two - the second object of the tuple
* @param three - the third object of the tuple
* @return the created Tuple3 containing the given objects
*/
public static <T1, T2, T3> Trio<T1, T2, T3> of(T1 one, T2 two, T3 three)
{
return new TrioImpl<>(one, two, three);
}
}
<file_sep>package func.java.controlflow.statements.switches;
class ObjectCompareSwitchStatement<T> extends SwitchStatement<T>
{
ObjectCompareSwitchStatement(T switchObj)
{
this.switchObj = switchObj;
}
T getSwitchArgument()
{
return switchObj;
}
public ObjectCompareCase<T> case_(T caseStatement)
{
return new ObjectCompareCase<>(caseStatement, this);
}
private final T switchObj;
}
<file_sep>package func.java.interfaces;
import java.util.function.Supplier;
/**
* Strangely, and sadly, the Supplier functional interface doesn't have a nice
* static method for creating them for a specific object (i.e.
* {@code Supplier.of(objectToSupply)}). You can obviously do it with a lambda
* expression (i.e. {@code () -> objectToSupply}), but I'm not a fan of seeing
* lambdas in the front-facing code; I prefer descriptive names.
* With this interface, you put {@code Provider.of(objectToSupply)} which is
* more descriptive of its purpose.
* <p>
* I tried many different name and wording combinations, but I realized that
* "Supplier of _" just read the best. Unfortunately, I couldn't use the name
* as Supplier, so I used a word that is practically a synonym. Plus it's the
* name that the DIY-DI system suggested before Java 8 came out.
* @param <T> the type of object to return from the get() method
*/
@FunctionalInterface
public interface Provider<T> extends Supplier<T>
{
public static <T> Supplier<? super T> of(T obj)
{
return () -> obj;
}
}
<file_sep>A small library of helpful classes made possible and useful thanks to Java 8 functional programming.
Items included in the library:
+ A Connection helper that wraps (and extends) Connections in a way that makes it so you don't have to remember to close them. (func.java.connections.RunnableConnection)
+ An interface that allows Java to simulate tail recursion (func.java.tailrecursion.TailCall)
+ Tuples - Tuples that hold 2, 3, or 4 objects.
+ Custom control flow code - I've created some custom control flow systems. Unfortunately, there isn't much useful documentation, so consult the __QuickTest classes to see them in use to figure out how to use them
+ One similar to Ruby's unless statement
+ Several variations of how switches could be done.
+ There are also control flow EXPRESSIONS (a value is returned), like there are in a lot of functional languages.
+ There are a few switch expressions (since they return a value, they don't have the possibility to continue flow down the next case)
+ an if expression
+ an unless expression, which uses an Optional return value
+ ExpressionHub and StatementHub - a single place to do a static import to begin using any of the provided control flow expressions or statements (func.java.controlflow.expressions.ExpressionHub and func.java.controlflow.statements.StatementHub)
+ Provider interface - a nice little helpful interface that provides a clean and easy way to create a Supplier, especially for testing, without a lambda expression (func.java.interfaces.Supply)
+ Lazy Instantiator - a class to make lazily (and thread-safely) instantiating objects easy (func.java.lazyinstantiator.LazilyInstantiate)
Coming Soon:
+ Documentation for the custom control flow stuff
+ Lock helper, similar to the Connection helper in that it locks and unlocks for you
+ Collection wrapper, providing simple internal looping without Stream
+ "With" keyword - similar to "try with resources" but isn't a try-catch, and you can specify the closing method
+ Async Task - just creates a new thread and runs the given code - takes callbacks as well
<file_sep>package func.java.controlflow.expressions.switches;
class ObjectCompareCase<T, R> extends Case<ObjectCompareSwitchExpression<T, R>, T, R>
{
ObjectCompareCase(T caseStatement, ObjectCompareSwitchExpression<T, R> switch_)
{
super(caseStatement, switch_);
}
@Override
boolean isTrue()
{
return caseStatement.equals(switch_.getSwitchArgument());
}
}
|
f65cc48c10b714d81c730739d713240be1ec512f
|
[
"Markdown",
"Java"
] | 26
|
Java
|
EZGames/functional-java
|
bc7df7439e139eae66591827f2485f1908207ca7
|
00ea53a433ffad5632fc0cf2ae1401f31cd731fd
|
refs/heads/master
|
<file_sep>source :rubygems
gemspec
gem "httpclient", "~> 2.1.5"
gem 'httpi', git: 'git://github.com/davidlesches/httpi.git'
|
8a2c1919d9a314026f38000d5bf137a175817e09
|
[
"Ruby"
] | 1
|
Ruby
|
sdatinguinoo-stratpoint/savon
|
3964ca96aac29cbd1d9e7b259592bb3e3c51aec1
|
b257954ea6ba06024a52e027730dcee887934673
|
refs/heads/master
|
<file_sep>package ru.reimu.demo.reactor.more.dto;
import lombok.Data;
/**
* @Author: Tomonori
* @Date: 2019/7/25 16:23
* @Desc:
*/
@Data
public class ArticleDto {
private Integer id;
private Integer tag_id;
private String title;
private String description;
private String content;
private Long created_on;
private String created_by;
private Long modified_on;
private String modified_by;
private Integer state;
}
<file_sep>package ru.reimu.demo.springreactordemo.service;
import ru.reimu.demo.springreactordemo.pojo.dto.UserDto;
/**
* @Author: Tomonori
* @Date: 2019/7/25 15:40
* @Desc:
*/
public interface IUserService {
UserDto getUser(Integer uid);
}
<file_sep>package ru.reimu.demo.springreactordemo.reactor;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import reactor.core.Reactor;
import ru.reimu.demo.springreactordemo.reactor.handler.UserHandler;
import static reactor.event.selector.Selectors.$;
/**
* @Author: Tomonori
* @Date: 2019/7/25 15:14
* @Desc:
*/
@Component
public class ReactorListener implements InitializingBean {
@Autowired
Reactor reactor;
@Autowired
UserHandler userHandler;
@Override
public void afterPropertiesSet() throws Exception {
reactor.on($("userHandler"), userHandler);
}
}
<file_sep>### Simple
src
### New
reactor-more
### webhook
<file_sep>package ru.reimu.demo.springreactordemo.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.Reactor;
import reactor.event.Event;
import ru.reimu.demo.springreactordemo.pojo.dto.UserDto;
import ru.reimu.demo.springreactordemo.service.IUserService;
/**
* @Author: Tomonori
* @Date: 2019/7/25 14:21
* @Desc:
*/
@RestController
@RequestMapping("/user")
public class UserController {
@Autowired
Reactor reactor;
@Autowired
IUserService userService;
@PostMapping("/get")
public UserDto getUser(Integer uid) {
UserDto userDto = new UserDto();
userDto.setId(uid);
reactor.notify("userHandler", Event.wrap(userDto));
return userService.getUser(uid);
}
}
<file_sep>package ru.reimu.demo.springreactordemo;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Configuration;
@SpringBootApplication
@MapperScan("ru.reimu.demo.springreactordemo.pojo.mapper")
public class AppserverDemoApplication {
public static void main(String[] args) {
SpringApplication.run(AppserverDemoApplication.class, args);
}
}
|
dc0a675d5bfb1c33c27c5330ae7b31d8a339f19b
|
[
"Markdown",
"Java"
] | 6
|
Java
|
gutrse3321/spring-reactor-demo
|
ebaa412c61a8add2d7776738ec97abb1a5224d80
|
95525e49fc15c82b882eea3af598d99e47ed9ecd
|
refs/heads/main
|
<repo_name>bazinga183/Mapping_Earthquakes<file_sep>/Mapping_GeoJSON_Points/static/js/logics.js
// Add console.log to check to see if our code is working.
console.log("working");
// Create the map object with a center and a zoom level.
let map = L.map('mapid').setView([30, 30], 2);
// Tile layer
let streets = L.tileLayer('https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v9/tiles/{z}/{x}/{y}?access_token={accessToken}', {
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery (c) <a href="https://www.mapbox.com/">Mapbox</a>',
maxZoom: 18,
accessToken: API_KEY
}).addTo(map);
// Accessing the airport GeoJSON URL
let airportData = "https://raw.githubusercontent.com/bazinga183/Mapping_Earthquakes/main/majorAirports.json";
// Grabbing our GeoJSON data.
d3.json(airportData).then(function(data) {
console.log(data);
// Creaing a GeoJSON layer with the retreived data.
L.geoJSON(data)
.bindPopup("<h3>" + "Airport Code: " + data.faa + "<h3/><hr>" +
"Airport name: " + data.properties.airport)
.addTo(map);
});
// Grabbing our GeoJSON data.
d3.json(airportData).then(function(data) {
L.geoJSON(data, {
// We turn each feature into a marker on the map.
onEachFeature: function(feature,layer) {
console.log(layer);
layer.bindPopup("<h3>" + "Airport code: " + feature.properties.faa + "<h3/> <hr>"
+ "<h3>" + "Airport name: " + feature.properties.name + "</h3>");
}
}).addTo(map);
});
|
33cf1152b48e87628de37a6f88387862d3e56ee8
|
[
"JavaScript"
] | 1
|
JavaScript
|
bazinga183/Mapping_Earthquakes
|
1579cbde6c937632dab7dcc38f565a7c6f4af522
|
f4dc9b1d77cb274a0dcc5867132a4ab03ea63666
|
refs/heads/master
|
<repo_name>strategist922/saiku-reporting-core<file_sep>/src/main/java/org/saiku/reporting/component/IReportingComponent.java
package org.saiku.reporting.component;
public interface IReportingComponent {
}
//private void generateHtmlReport(MasterReport output, OutputStream stream,
// Map<String, Object> reportParameters, HtmlReport report, Integer acceptedPage) throws Exception{
//
// final SimpleReportingComponent pentahoReportingPlugin = prptProvider.getReportingComponent();
// pentahoReportingPlugin.setReport(output);
// pentahoReportingPlugin.setPaginateOutput(true);
// pentahoReportingPlugin.setInputs(reportParameters);
// pentahoReportingPlugin.setDefaultOutputTarget(HtmlTableModule.TABLE_HTML_PAGE_EXPORT_TYPE);
// pentahoReportingPlugin.setOutputTarget(HtmlTableModule.TABLE_HTML_PAGE_EXPORT_TYPE);
// pentahoReportingPlugin.setDashboardMode(true);
// pentahoReportingPlugin.setOutputStream(stream);
// pentahoReportingPlugin.setAcceptedPage(acceptedPage);
// pentahoReportingPlugin.validate();
// pentahoReportingPlugin.execute();
//
// report.setCurrentPage(pentahoReportingPlugin.getAcceptedPage());
// report.setPageCount(pentahoReportingPlugin.getPageCount());
//
//}<file_sep>/src/main/java/org/saiku/reporting/core/writer/SaikuReportSpecificationWriteHandler.java
package org.saiku.reporting.core.writer;
import java.io.IOException;
import org.pentaho.reporting.engine.classic.core.modules.parser.bundle.writer.BundleWriterException;
import org.pentaho.reporting.engine.classic.core.modules.parser.bundle.writer.BundleWriterHandler;
import org.pentaho.reporting.engine.classic.core.modules.parser.bundle.writer.BundleWriterState;
import org.pentaho.reporting.libraries.docbundle.WriteableDocumentBundle;
public class SaikuReportSpecificationWriteHandler implements
BundleWriterHandler {
@Override
public String writeReport(WriteableDocumentBundle bundle,
BundleWriterState state) throws IOException, BundleWriterException {
return null;
}
@Override
public int getProcessingOrder() {
return 100001;
}
}
<file_sep>/src/main/java/org/saiku/reporting/core/parser/SaikuReportSpecificationXmlFactoryModule.java
/**
*
*/
package org.saiku.reporting.core.parser;
import org.pentaho.reporting.libraries.xmlns.parser.XmlDocumentInfo;
import org.pentaho.reporting.libraries.xmlns.parser.XmlFactoryModule;
import org.pentaho.reporting.libraries.xmlns.parser.XmlReadHandler;
/**
* @author mg
*
*/
public class SaikuReportSpecificationXmlFactoryModule implements
XmlFactoryModule {
/* (non-Javadoc)
* @see org.pentaho.reporting.libraries.xmlns.parser.XmlFactoryModule#getDocumentSupport(org.pentaho.reporting.libraries.xmlns.parser.XmlDocumentInfo)
*/
@Override
public int getDocumentSupport(XmlDocumentInfo documentInfo) {
// TODO Auto-generated method stub
return 0;
}
/* (non-Javadoc)
* @see org.pentaho.reporting.libraries.xmlns.parser.XmlFactoryModule#createReadHandler(org.pentaho.reporting.libraries.xmlns.parser.XmlDocumentInfo)
*/
@Override
public XmlReadHandler createReadHandler(XmlDocumentInfo documentInfo) {
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.pentaho.reporting.libraries.xmlns.parser.XmlFactoryModule#getDefaultNamespace(org.pentaho.reporting.libraries.xmlns.parser.XmlDocumentInfo)
*/
@Override
public String getDefaultNamespace(XmlDocumentInfo documentInfo) {
// TODO Auto-generated method stub
return null;
}
}
|
98d03323aebdf08bdcd2ffeefe2c7ea2dd23658e
|
[
"Java"
] | 3
|
Java
|
strategist922/saiku-reporting-core
|
77446ce37aa83bffddc70e7b4b05d93dbbc1d496
|
9703e84a5095e06d47978e604d645ccc68033548
|
refs/heads/master
|
<repo_name>timkom10/AIclass<file_sep>/DotsandBoxes.py
import random#used for generating random scores
import time #used to time everything
import copy#used to make a different object so that the algorithm could try out different moves
class Dotbox(object):#the Dotbox game class
def __init__(self, size=5, position=[],papts=0, pbpts=0,turn=0):#initializing the game
self.size=size#the size of the puzzle
self.position=position#the current state of the game
self.pa=papts#player 1's points
self.pb=pbpts#player 2's points
self.turn=turn#current turn number
if not self.position or self.gameover():#if the game is not over or the position is not empty
for x in range(0,self.size):#amount of rows
self.position.append([])#makes a row
for y in range(0,self.size):#amount of columns
print(x,y)#prints going through
self.position[x].append(' ')#puts an empty spot
self.mknewgame()#calls the actual making switching some of the empty spots to dots or points
def gameover(self):#the check of whether the game is over
if not self.position:#if the list is empty
return True#returns the game is over
else:#or...
for x in self.position:#for each row
for y in x:#for each column
if y==' ':#if there is a space
return False# then the game is not over
if self.pa>self.pb:#if Player1 has more points thann Player2
print('Player 1 Wins! P1score:'+str(self.pa)+" ; P2score:"+str(self.pb))#prints that player1 wins
elif self.pb>self.pa:#if Player2 has more points than Player1
print("Player 2 Wins! P1score:"+str(self.pa)+" ; P2score:"+str(self.pb))#prints that Player2 wins
else:#or if there is a tie
print("IT WAS A TIE! SCORE: both players with "+str(self.pa)+" points")#prints that there is a tie
return True#returns that the game is over
def mknewgame(self):#makes a new game
if (not self.position) or self.gameover() or self.position[0][0]==' ':#if the position is empty or the game is over or the dots have not been put in yet
for x in range(0,self.size):#through the rows
for y in range(0,self.size):#through the columns
#print(x,y)#check print statement
if (x%2==0 and y%2==0):#if rows and colums are even
self.position[x][y]='.'#place dot
#print('.')#check print statement
elif (x%2==1 and y%2==1):#if rows and columns are odd
self.position[x][y]=(random.randint(1,5))#place value of box
#print('num')#check print statement
elif (x%2==0 and y%2==1):#if rows are even and columns are odd
self.position[x][y]=' '#empty space where horizontal lines will go
#print('-')#check print statement
elif (x%2==1 and y%2==0):#if rows are odd and columns are even
self.position[x][y]=' '#empty space where vertical lines will go
#print('|')#check print statemnt
print(self.position[x])#prints how the board looks in a nice matter
self.pa=0#resets the points for player 1(a)
self.pb=0#resets the points for player 2(b)
turn=0#resets what turn it is
def __str__(self):#for string representation
return str(self.position)#just returns the string of the position #I'll be honest looking back this is unneccessary but its two lines of code so ¯\_(ツ)_/¯
def move(self,x,y):#makes the move and switches between move of player 1 and player 2
self.turn+=1#increases the turn to show which player's turn it is
if self.gameover():#if the game is over
return "Game Over"#then print game over
if self.turn%2==1:#if the turn is odd
self.movepa(x,y)#then its player 1's turn
else:#else
self.movepb(x,y)#then its player2's turn
# for x in self.position:#used for printing out the position when playing against another player rather than the computer
# print(x)#commented out for computer because then the screen gets crowded too much
def movepa(self,x,y):#player1's move funciton
while True:#infinite loop so that players can't get away with stalling and making a bad move to try to get a box
try:#try except for ease
if(x%2==0 and y%2==1) and self.position[x][y]==' ':#if rows are even and columns are odd and there is an empty space
#print('here1')#check print statement
self.position[x][y]='-'#then put a horizontal
if x>0 and x<self.size-1:#if x is not on the top row or the bottom row
#print('here2')#check print statement
self.box(self.position[x-1][y],x-1,y,(x,y))#check the box above this horizontal line
self.box(self.position[x+1][y],x+1,y,(x,y))#check the box below this horizontal line
elif x==0:#or if its the top row
#print('here2.1')#check print statmeent
self.box(self.position[x+1][y],x+1,y,(x,y))#checks the box below the horiziontal line
#print('here2.3')#check print statement
elif x==self.size-1:#or if its the bottom row
#print('here2.2')#check print statement
self.box(self.position[x-1][y],x-1,y,(x,y))#checks the box above the horizontal line
#print('here3')#checks print statement
return#breaks out of loop
elif(x%2==1 and y%2==0) and self.position[x][y]==' ':#or if the rows are odd and the columns are even and there is an empty space
#print('here4')#check print statement
self.position[x][y]='|'#puts a single horizontal line
if y>0 and y<self.size-1:#if the line is not in the firs or last column
#print('here5')#check print statement
self.box(self.position[x][y-1],x,y-1,(x,y))#checks the box to the left of the line
self.box(self.position[x][y+1],x,y+1,(x,y))#checks the box to the right of this line
#print('here5.3')#check print statement
elif y==0:#or if the line is on the left column
#print('here5.1')#check print statement
self.box(self.position[x][y+1],x,y+1,(x,y))#checks the box to the right of this line
#print('here5.4')#check print statement
elif y==self.size-1:#cheks if the line is on the right column
#print('here5.2')#check print statement
self.box(self.position[x][y-1],x,y-1,(x,y))#checks the box to the left of the line
#print('here5.5')#check print statement
#print('here6')#check print statement
return#return breaks out of loops
else: #if its not a correct move to make a the moment
#print('hmmmm')#check print stateent
raise ValueError#raises error to loop until a value is found
except:#except spot
print('invalid move try again')#check print statement for chcekcing
x=int(input("input your new x"))#asks for the new x values
y=int(input("input your new y"))#asks for the new y values
def movepb(self,x,y):#player 2's move set
while True:#infiniteloop
try:#try block so it loops well
if(x%2==0 and y%2==1) and self.position[x][y]==' ':#if the rows are even and colums are odd
#print('here7')#print check statement
self.position[x][y]='='# then the spot becomes two horizontallines to differentiate from the singleline of player 1
if x>0 and x<self.size-1:#if the horiziontalline is not on top or on the bttom
#print('here9')#check print statemnt
self.box(self.position[x-1][y],x-1,y,(x,y))#checks the box below the line
self.box(self.position[x+1][y],x+1,y,(x,y))#checks the box above the line
#print('here9.3')#check print statement
elif x==0:#if the line is at the top
#print('here9.1')#checks print statement
self.box(self.position[x+1][y],x+1,y,(x,y))#checks the box below the line
#print('here9.4')#checks print statement
elif x==self.size-1:#or is the line is at the bottom
#print('here9.2')#checks print statement
self.box(self.position[x-1][y],x-1,y,(x,y))#checks the box above the line
#print('here9.5')#check print statement
#print('here11')#check print statement
return#breaks out of loop
elif(x%2==1 and y%2==0) and self.position[x][y]==' ':#if the rows are odd and the colmns are even.
#print('here8')#checks print statement
self.position[x][y]='||'#puts the veritacl double line to differetiate
if y>0 and y<self.size-1:#if the line is not on the left column or right column
#print('here10')#print check line
self.box(self.position[x][y-1],x,y-1,(x,y))#checks the box to the left of the line
self.box(self.position[x][y+1],x,y+1,(x,y))#checks teh box to the right of th eline.
#print('here10.3')$check print statement
elif y==0:#if the line is on the left column
#print('here10.1')#check print statement
self.box(self.position[x][y+1],x,y+1,(x,y))#checks the box to the right of th reline
#print('here.4')$check print statement
elif y==self.size-1:#or if the box is in the right column
#print('here10.2')#check print statement
self.box(self.position[x][y-1],x,y-1,(x,y))#hcksas====
#print('here10.5')
#print('here 12')
return#returns and breaks out of the loop
else: #or
raise ValueError # raise an error to try again
except:#excepvalue to loop
print('invalid move try again')#print used to tell user that they enterred a wrong value
x=int(input("input your new x"))#asks for new x coordinate
y=int(input("input your new y"))#asks for a new y coordinate
def copy(self):#copy used to make a new instance with the same positions so minimax can go through
position=copy.deepcopy(self.position)#makes a deepcopy so that it doesn't touch the memory value
return Dotbox(self.size,position,self.pa,self.pb,self.turn)#returns the copy instance
def box(self,value,x,y,last):#the check for points method and saves the last move made
#print('boxproblem')#check print statement
numlines=0#instantiates for how many lines are surronding it
available=[(x-1,y),(x+1,y),(x,y-1),(x,y+1)]#shows what is still open
if self.position[x-1][y] !=' ':#if the line above is filled
numlines+=1#the number of lines surrounding it goes up one
available.remove((x-1,y))#removes from available
if self.position[x+1][y] !=' ':#if the line below is filled
numlines+=1#the number of lines surrounding it goes up one
available.remove((x+1,y))#removes from available
if self.position[x][y-1] !=' ':#if the line to the left is filled
numlines+=1#the number of lines surrounding it goes up one
available.remove((x,y-1))#removes from available
if self.position[x][y+1] !=' ':#if the line to the right is filled
numlines+=1#the number of lines surrounding it goes up one
available.remove((x,y+1))#removes from available
if numlines==4:#if all lines are filled
if self.position[last[0]][last[1]]=='-' or self.position[last[0]][last[1]]=='|':#if the last move was a single vertical or horiziontal line
self.pa+=value#then player 1 gets points
print("Player 1 scores "+str(value)+" point(s)!")#print statement so player knows
self.gameover()#checks if the game is over
elif self.position[last[0]][last[1]]=='=' or self.position[last[0]][last[1]]=='||':#or if the last move was a double vertical or horiziontal line
self.pb+=value#then player 2 gets points
print("Player 2 scores "+str(value)+" point(s)!")#print statement so player knows
self.gameover()#checks if game is over
return#return to end method
def availablemoves(self):#method to show what coordinate moves are available
available=[]#instantiates a list
for x in range(0,self.size):#for all rows
for y in range(0,self.size):#for all columns
if self.position[x][y]==' ':#if the spot is empty
available.append((x,y))#then add the coordinates in a tuple to the list
#print('heres whats available')#check print statement
return available#retuns the list
def playvscpu(self):#for facing against a computer#self==dotbox() I tried to make this a method but gave up due to errors and the funciton works well
depth=0#starts out at a depth of 0 so that it takes shorter but minimax searches deeper each time
while self.gameover()!=True:#while the game is not over
for x in self.position:#for each row
print(x)#print each row so that you see it like a box
print(self.availablemoves())#prints the available moves
x=int(input("Player 1: Enter an x coordinate for your move: "))#player 1 x input
y=int(input("Player 1: Enter an y coordinate for your move: "))#player 1 y input
self.move(x,y)#moves for player 1
depth+=2#increases depth
aimove=dotVsAi(self,depth,-100000000000000000,10000000000000000, True)#calls the minimax algorithm w/ alpha beta pruning
print(self.position)#prints the position that the minimax picked
print(aimove)#prints the expected value and the move the computer will make
self.move(aimove[1][0],aimove[1][1])#actually makes the move
print("The score currently is Player1: "+str(self.pa)+" CPU: "+str(self.pb))#presents score
def dotVsAi(self,depth,a,b, maxplayer):#minimax algorithm with alpha beta pruning #self=dotbox#
#print('cputurn')#check print statement
if depth==0 or self.gameover():#if the game is over at a specific position or if it hits max depth
#print('depth = 0')#check print statement
return [self.pb-self.pa]#returns the cpu score - the player score
if maxplayer==True:#if it is going through the max part
#print('hit maxplayer if')#check print statement
maxeval=-100000000#makes the max eval very low so that it does not mess with data
move=[0,0]#makes a list for moves
ava=self.availablemoves()#shorter call for available moves
for x in ava:#for all available moves
#print('max'+str(x))#check print statement
self2=self.copy()#make a copy of the position
self2.move(x[0],x[1])#make the new position
evalu=dotVsAi(self2, depth-1,a,b,False)#and go deeper into the function recursively
print(evalu)#prints the value that the algorithm picks and what move comes from it
maxeval= max(maxeval,evalu[0])#compares the current best with the current move
a=max(a,evalu[0])#checks against alpha
if a>=b:#if alpha is greater then or equal to beta then we can prune everything else to save time
#print('PRUNEmax')#check print statment
break#actual pruning
if maxeval==evalu[0]:#if the value was just changed
#print('new max')#check print statemt
move[0]=x[0]#insert the new best x-coordinate
move[1]=x[1]#insert the new best y-coordinate
#print(move)#check print statement
print(maxeval)#prints the best move for this subtree
if move==[0,0]:#if there is no best move
#print(ava)#print check statmeent
rand=random.randint(0,len(ava)-1)#pick a random number that is in the list
#print(rand)#print check statemnt
move[0]=ava[rand][0]#picks the random selected x-coordinate
move[1]=ava[rand][1]#picks the random selected y-coordinate
print(move)#prints the move selected overall
return [maxeval,move]#returns the max value and the move that is associated with it
else:#if tis the mins player in searching
#print('hit minplayer if')#check print statement
mineval=100000000#makes the min very large so that it will get changed
move=[0,0]#makes a list for x and y coordinate
ava=self.availablemoves()#list of available moves
for x in ava:#iterates through available moves
self2=self.copy()#makes a copy of the position
#print('min'+str(x))#check print statement
self2.move(x[0],x[1])#makes the new posiiton
evalu=dotVsAi(self2,depth-1,a,b,True)#checks and goes deeper recursively into new posiiton
print(evalu)#prints new value
mineval=min(mineval,evalu[0])#compares the current with the best lowest number so far and picks the lower
b=min(b,evalu[0])#checks against beta
if a>=b:#if alpha is greater than or equal on a max move then opponnent will not pick any of these
#print('PRUNEmin')#chck print statment
break#actual pruning
if mineval==evalu[0]:#if the value was just changed
print('new min')#new check print statment
move[0]=x[0]#changes the x-coordinate value
move[1]=x[1]#changes the y-coordinate value
if move==[0,0]:#if there was no best decidable move
#print(ava)#check print statmeant
rand=random.randint(0,len(ava)-1)#picks random nymber that has an index in list
#print(rand)#prints the number
move[0]=ava[rand][0]#saves the selected x-coordinate
move[1]=ava[rand][1]#saves the selected y-coordinate
#print(move)#prints the move selected overall
return [mineval,move]#returns the min value and the move that is associated with it
x=Dotbox(5)#intiallizing the dotbox game at size =4 boxes
playvscpu(x)#starts the game
<file_sep>/EightPuzzle.py
#<NAME>
import copy#used for making new nodes
from queue import PriorityQueue#used for advanced functions that require a heuristic
import time#used for timing
from collections import Counter#used to count the number of things in a PriorityQueue
class Puzzlenode(object):#this is the class I made for a puzzlenode(I think it is incredibly inefficient but it took me way too long to just figure it out.
def __init__(self, position=None, parent=None,depth=0,lastaction=None, totalcost=0, misplacedtile=0):#the initialization of this class contains every single bit of information besides manhattan distances used for the searches
self.position= position#position is the current iteration of the puzzle
self.parent= parent #parent is the previous iteration useful for path tracing
self.depth=depth#keeps track of depth
self.action=lastaction#keeps track of the last action
self.tcost=totalcost#keeps track of the totalcost of every move
self.goal=[[1,2,3],[8,0,4],[7,6,5]]#goal state
self.movelist=[]#shows moves available, filled by self.moves()
self.miscount=misplacedtile#just gave it a cool name
self.miscount=self.pos_check(self.position)#I made this so that way that the tile count would be more automatic and so that I would not need to include this in the code at the beginning for greedy search and A*1
def __lt__(self,other):#this is used to make Puzzlenode comparable for some reason priorityqueue cannot just sort between misplaced tiles and total cost so this was used in order to satisfy the PriorityQueue
return self.depth<other.depth#I figured that organizing by depth at ties makes somewhat sense
def __gt__(self,other):#This is also used to make Puzzlenode comparable, I haven't coded enough in Python to really know if this was necessary
return self.depth>other.depth#organizing by depth because it seemed innocent enough without making greedy search an A* algo
def pos_check(self,pos):#this is the function used to find misplaced tiles#this is pretty good, and I like how I did this
count=0#initiates a count variable
for x in range(3):#iterates through 0 to 2 for rows
for y in range(3):#iterates through 0 to 2 for columns
if pos[x][y]!=self.goal[x][y]:#checks to see if the two are different #I did this because you said to count by number of misplaced tiles rather than tiles that are in the correct position
count+=1#adds one if the tile is misplaced
return count#returns the amount of misplaced tiles
#
def __str__(self):#if str(puzzlenode) is used this will return what is necessary
if self.parent==None:#if there is no parent then just set parent to a string that says none
parent='None'#string that says parent is none
else:#otherwise
parent=self.parent.position#parent is the list of the parent
return 'Puzzlenode( {}, {}, {}, {}, {}, {})'.format(self.position, parent, self.depth, self.action, self.tcost, self.miscount)#returns the function as it would be input for a move function, except for the parent function. Parent is done as a list because it is much easier to understand then explain it as a place in memory at least for me
def moves(self):#gives me move options
for row in range(3):#searching for zeros row
for col in range (3):#searching for zeros column
if self.position[row][col]==0:#if find zero
self.row0=row#save row of zero to row0
self.col0=col#save column of zero to col0
if self.row0>0:#if zero is not in the top row
self.movelist.append("Down")#appends that a Down move is available, and it appends the number that can go Down as a list
if self.row0<2:#if zero is not in the bottom row
self.movelist.append("Up")#appends that a Up move is available, and it appends the number that can do this move as a list
if self.col0>0:#if zero is not on the right column
self.movelist.append("Right")#appends that a Right move is available, and it appends the number that can do this move as a list
if self.col0<2:#if zero is not in the left column
self.movelist.append("Left")#appends that a Left move is available, and it appends the number that can do this move as a list
return self.movelist#returns the list of moves and what numbers move
def isGoal(self):#determines if the goal state has been acheived
if self.position==self.goal:# if the position is the same as the defined(hardcoded) goalstate
return True#return True
else:# if not
return False#return False
def moveDown(self):#move Down action method
position=copy.deepcopy(self.position)#making a copy of the original list/picture
position[self.row0][self.col0]=self.position[self.row0-1][self.col0]#moving the numbered picture that is not zero Down to zero's position
position[self.row0-1][self.col0]=0# zero is now in the old numbered space
#print(position)#print line used for checking
count=self.pos_check(position)#this is used to check the amount of misplaced tiles and shows why I have to pass a list to make this method work because I wanted to make it sortable from here
return Puzzlenode(position,self,self.depth+1,"Down",self.tcost+self.position[self.row0-1][self.col0],count)#returns the next Puzzlenode with every stat possible
def moveUp(self):#moves up number moves down 0 method
position=copy.deepcopy(self.position)#making a copy of the original list/picture
position[self.row0][self.col0]=self.position[self.row0+1][self.col0]#moving the numbered picture that is not zero Up to zero's position
position[self.row0+1][self.col0]=0#zero takes the spot of the numbered space
#print(position)#print line used for checking
count=self.pos_check(position)#this is used to get the amount of misplaced tiles also look at moveDown comment
return Puzzlenode(position,self,self.depth+1,"Up",self.tcost+self.position[self.row0+1][self.col0],count)#returns the next Puzzlenode
def moveRight(self):#move Right action method
position=copy.deepcopy(self.position)#making a copy of the list/picture
position[self.row0][self.col0]=self.position[self.row0][self.col0-1]#moving the numbered picture that is not zero Right to zero's position
position[self.row0][self.col0-1]=0#zero takes the spot of the moved number space
count=self.pos_check(position)#this is used to get the amount of misplaced tiles also look at moveDown comment
#print(position)#print line used for checking
return Puzzlenode(position,self,self.depth+1,"Right",self.tcost+self.position[self.row0][self.col0-1],count)#returns the next Puzzlenode
def moveLeft(self):#move Left action method
position=copy.deepcopy(self.position)#making a copy of the list/picture
position[self.row0][self.col0]=self.position[self.row0][self.col0+1]#moving the numbered picture that is not zero Left to zero's position
position[self.row0][self.col0+1]=0#moving the zero to the numbered position
count=self.pos_check(position)#this is used to get the amount of misplaced tiles also look at moveDown comment
#print(position)#print line used for checking to see behaviour
return Puzzlenode(position,self,self.depth+1,"Left",self.tcost+self.position[self.row0][self.col0+1],count)#returns next Puzzlenode
def goaltopath(self,path):#gathers a list of the previous nodes used to get to the goal state (recursively)
if self.parent==None:#if this is the original node
path.append(str(self))#appends self to the path list
return path#return the path
else:#otherwise
path.append(str(self))#appends self to the path list
return self.parent.goaltopath(path)#calls funcition with parent node so that it goes all the way to start node
def manhattan(self,pos):#this function calculates for the manhattan distance# this could probably be done more efficiently, I just would need to work through it with someone else or take more time on it
coorlist=[() for i in range(9)]#this is a list of tuples that I just wanted to populate based on each numbered tile
sum=0#this is the manhattan distance variable
for x in range(3):#iterates through 0th to 2nd row
for y in range(3):#iterates through 0th to 2nd column
for i in range(9):#this iterates from 0 to 8 to check what number tile it is
if pos[x][y]==i:#used to match the tile number to an index
coorlist[i]=(x,y)#this gives coordinates for where the index value is located on the current position of the puzzle
for i in range(3):#iterates through 0th to 2nd row
for j in range(3):#iterates through the 0th to 2nd column
sum+=(abs(coorlist[self.goal[i][j]][0]-i)+abs(coorlist[self.goal[i][j]][1]-j))#the magic function# this takes the absolute value of the difference of the current positions number as iterated through via the goal state's row and the row of the goal state plus the current position's number that the goal state is at's column and the number's goal state column #harder to explain then to see really
return sum#returns the manhattan distance
def bfs(p):#p for puzzlenode breadth first search
checked=set()#creates a state checker so that repeat states do not happen
queue=[]#creates a queue
queue.append(p)#puts the passed node into the queue
while True:#basically I want it to loop until it finds something
q=queue.pop(0)#takes the first thing in the queue
checked.add(str(q.position))#adds a string version of the position so it can be hashed into a set
#print(q)#used to track behaviour
if q.isGoal():#checks if the current state is the goal state
#print(len(queue))#originally I put this in the else loop to see how this works but then I figured that it was more efficient here and told me the max size of the queue
return q.goaltopath([])# return the list of how to get to the goal from the start node
else:#otherwise
q.moves()#makes the list of moves(I could probably do something to make this more efficient maybe, but for now its staying here)
if "Down" in q.movelist and str(q.moveDown().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
queue.append(q.moveDown()) #adds the iteration to the queue
if "Up" in q.movelist and str(q.moveUp().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
queue.append(q.moveUp())#adds the iteration to the queue
if "Right" in q.movelist and str(q.moveRight().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
queue.append(q.moveRight())#adds the iteration to the queue
if "Left" in q.movelist and str(q.moveLeft().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
queue.append(q.moveLeft())#adds the iteration to the queue
def dfs(p):#p for puzzlenode depth first search
checked=set()#creates a state checker so that repeat states do not happen
queue=[]#creates a queue
queue.append(p)#puts the passed node into the queue
while True:#I want to loop until the goal is reached
q=queue.pop()#removes the most recnt item added
checked.add(str(q.position))#adds iteration in string to set
print(q.position)#print statement to track behaviour
if q.isGoal():#checks if current iteration is the goal
return q.goaltopath([])#if goal is reached then it reaches back to show the path to the goaL
else:#otherwise
q.moves()#makes list of available moves (see bfs for extra note)
if "Down" in q.movelist and str(q.moveDown().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
queue.append(q.moveDown()) #adds iteration ot the queue
if "Up" in q.movelist and str(q.moveUp().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
queue.append(q.moveUp())#adds iteration to the queue\
if "Right" in q.movelist and str(q.moveRight().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
queue.append(q.moveRight())#adds iteration ot the queue
if "Left" in q.movelist and str(q.moveLeft().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
queue.append(q.moveLeft()) #adds the iteration to the queue
#print(len(checked))#this was used to check how many positions were checked until it took longer than five minutes for easy
def ucs(p):#p for puzzlenode uniform cost search
checked=set()#creates a state checker so that repeat states do not occur
pqueue=PriorityQueue()#a queue that is a heap, but functions like a queue, this sorts easily and returns what I need
pqueue.put((p.tcost,p))#entering g(n) and the node so that it can start the loop
while True:#I made this a while true because its easier to make it like this without making bad mistakes# in hindsight I could do while queue.isNotEmpty(), but I don't know if this will break it or just make it make more sense
q=pqueue.get()#gets the tuple that has the smallest total cost
z=q[1]#gets the actual Puzzlenode
checked.add(str(z.position))#adds the position into the state checker so that we don't see another one of these states
#print(q)#print statement for checking behaviour
if z.isGoal():#checks if current iteration is the goal
#print(Counter(priority for priority, _elem in pqueue.queue))#has a by each priority count it counts each number of puzzlenodes with the priority count
return z.goaltopath([])#if goal is reached then it reaches back to show the path to the goaL
else:#otherwise
z.moves()#makes the movelist which has all the possible moves
if "Down" in z.movelist and str(z.moveDown().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
pqueue.put((z.moveDown().tcost,z.moveDown())) #adds iteration ot the queue
#print("put down")#used to track which moves were added
if "Up" in z.movelist and str(z.moveUp().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
pqueue.put((z.moveUp().tcost,z.moveUp()))#adds iteration to the queue
#print("put Up")#used to track which moves were added
if "Right" in z.movelist and str(z.moveRight().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
pqueue.put((z.moveRight().tcost,z.moveRight()))#adds iteration ot the queue
#print("put Right")#used to track which moves were added
if "Left" in z.movelist and str(z.moveLeft().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
pqueue.put((z.moveLeft().tcost,z.moveLeft())) #adds the iteration to the queue
#print("put left")#used to track which moves were added
def greedy(p):#p for puzzlenode best-first search
checked=set()#creates a state checker so that repeat states do not occur
pqueue=PriorityQueue()#a sorting queue#more info at ucs function
pqueue.put((p.miscount,p))#entering h(n) which happens to be the amount of tiles that are misplaced and takes the puzzlenode
while True:#while true loop as explained for the past 3 times
q=pqueue.get()#gets the tuple that has the smallest h(n)
z=q[1]#gets the puzzle node from the tuple
checked.add(str(z.position))#adds the position into the state checker
#print(z)#prints the current puzzlenode
if z.isGoal():#checks to see if its the goalstate
#print(Counter(priority for priority, _elem in pqueue.queue))#counts number of puzzlenodes per h(n)
return z.goaltopath([])#returns the path from the goal node to the start node
else:#if goalstate not yet
z.moves()#makes the movelist that has all the possible moves
if "Down" in z.movelist and str(z.moveDown().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
pqueue.put((z.moveDown().miscount,z.moveDown())) #adds iteration ot the queue
#print("put down")#used to track which moves were added
if "Up" in z.movelist and str(z.moveUp().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
pqueue.put((z.moveUp().miscount,z.moveUp()))#adds iteration to the queue
#print("put Up")#used to track which moves were added
if "Right" in z.movelist and str(z.moveRight().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
pqueue.put((z.moveRight().miscount,z.moveRight()))#adds iteration ot the queue
#print("put Right")#used to track which moves were added
if "Left" in z.movelist and str(z.moveLeft().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
pqueue.put((z.moveLeft().miscount,z.moveLeft())) #adds the iteration to the queue
#print("put left")#used to track which moves were added
def aStar1(p):#p for puzzlenode A*1
checked=set()#creates a state checker so that repeat states do not occur
pqueue=PriorityQueue()#sorting queue# more info at ucs function
pqueue.put((p.miscount+p.tcost,p))#entering f(n)=h(n)+g(n) where h(n) is the amount of misplaced tiles and g(n) is the total cost of moves and the puzzle node as a tuple for the next queue
while True:# while true loop as explained above
q=pqueue.get()#gets the tuple that has the smallest f(n)
z=q[1]#gets the puzzlenode from the tuple
checked.add(str(z.position))#adds to the checked state set
#print(z)#used to display which puzzlenode the algo is at
if z.isGoal():#checks to see if z is the goal
#print(Counter(priority for priority, _elem in pqueue.queue))#counts each puzzlenode per f(n) value
return z.goaltopath([])#returns the path from the goal node to start node
else:#if not the goal state
z.moves()#makes the movelist that has all the possilbe moves
if "Down" in z.movelist and str(z.moveDown().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
pqueue.put((z.moveDown().tcost+z.moveDown().miscount,z.moveDown())) #adds iteration ot the queue
#print("put down")#used to track which moves were added
if "Up" in z.movelist and str(z.moveUp().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
pqueue.put((z.moveUp().tcost+z.moveUp().miscount,z.moveUp()))#adds iteration to the queue\
#print("put Up")#used to track which moves were added
if "Right" in z.movelist and str(z.moveRight().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
pqueue.put((z.moveRight().tcost+z.moveRight().miscount,z.moveRight()))#adds iteration ot the queue
#print("put Right")#used to track which moves were added
if "Left" in z.movelist and str(z.moveLeft().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
pqueue.put((z.moveLeft().tcost+z.moveLeft().miscount,z.moveLeft())) #adds the iteration to the queue
#print("put left")#used to track which moves were added
#print(Counter(priority for priority, _elem in pqueue.queue))#used to show how many iterations happened
def aStar2(p):#p for puzzlenode A*2
checked=set()#creates a state checker set
pqueue=PriorityQueue()#sorting queue# more info at ucs function
pqueue.put((p.manhattan(p.position)+p.tcost,p))#entering f(n)=h(n)+g(n) where h(n) is the manhattan distance and g(n) is the total cost of moves and the puzzle node as a tuple into the queue
while True:#while true again. yeah its lazy and I get it, but it took me way too long to get to this point so I guess I'll do better next time
q=pqueue.get()#gets the lowest f(n) tuple with its puzzlenode
z=q[1]#gets the puzzle node out of the tuple
checked.add(str(z.position))#adds the current node position to the checked set so that the state does not occur again
#print(z)#used to display which puzzlenode the algorithm is at
if z.isGoal():#checks to see if the current node is the goal
#print(Counter(priority for priority, _elem in pqueue.queue))#prints the amount of puzzlenodes per f(n) value
return z.goaltopath([])#returns the goal state
else:#if not the goal state
z.moves()#makes the movelist to see what moves are available
if "Down" in z.movelist and str(z.moveDown().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
pqueue.put((z.moveDown().tcost+z.moveDown().manhattan(z.moveDown().position),z.moveDown())) #adds iteration ot the queue
#print("put down")#used to track which moves were added
if "Up" in z.movelist and str(z.moveUp().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
pqueue.put((z.moveUp().tcost+z.moveUp().manhattan(z.moveUp().position),z.moveUp()))#adds iteration to the queue\
#print("put Up")#used to track which moves were added
if "Right" in z.movelist and str(z.moveRight().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
pqueue.put((z.moveRight().tcost+z.moveRight().manhattan(z.moveRight().position),z.moveRight()))#adds iteration ot the queue
#print("put Right")#used to track which moves were added
if "Left" in z.movelist and str(z.moveLeft().position) not in checked:#checks if the move is available and makes sure that this moves iteration is not in the checked set
pqueue.put((z.moveLeft().tcost+z.moveLeft().manhattan(z.moveLeft().position),z.moveLeft())) #adds the iteration to the queue
#print("put left")#used to track which moves were added
#print(Counter(priority for priority, _elem in pqueue.queue))#used to show how many iterations occurred
g=Puzzlenode([[1,2,3],[8,0,4],[7,6,5]])#the goal state
e=Puzzlenode([[1,3,4],[8,6,2],[7,0,5]])#the easy starting state
m=Puzzlenode([[2,8,1],[0,4,3],[7,6,5]])#the medium starting state
h=Puzzlenode([[5,6,7],[4,0,8],[3,2,1]])#the hard starting state
while True:
try:
d=str(input("which difficulty do you want solved? Enter g for goal state, e for easy state, m for medium state, or h for hard state: "))
u=g
if d=='g'or d=='G':
u=g
break
elif d=='e' or d=='E':
u=e
break
elif d=='m' or d=="M":
u=m
break
elif d=='h' or d=="H":
u=h
break
else:
raise ValueError
except ValueError:
print("I do not have that input")
continue
while True:
try:
x=str(input("What search algorithm would you like to use? Enter bfs for breadth first search, dfs for depth first search, ucs for uniform cost search, greedy for best first search, a*1 for A* search with h(n)=number of misplaced tiles, or a*2 for A* search with h(n)= manhattan distance of pieces: "))
if x=='bfs':
start=time.time()#starts timing
print(bfs(u))#the current
end=time.time()
print("It took {} seconds for bfs to search through the {} state".format(end-start,d))
break
elif x=='dfs':
start=time.time()#starts timing
print(dfs(u))#the current
end=time.time()
print("It took {} seconds for dfs to search through the {} state".format(end-start,d))
break
elif x=='ucs':
start=time.time()#starts timing
print(ucs(u))#the current
end=time.time()
print("It took {} seconds for ucs to search through the {} state".format(end-start,d))
break
elif x=='greedy':
start=time.time()#starts timing
print(greedy(u))#the current
end=time.time()
print("It took {} seconds for greedy search to search through the {} state".format(end-start,d))
break
elif x=='a*1':
start=time.time()#starts timing
print(aStar1(u))#the current
end=time.time()
print("It took {} seconds for A*1 to search through the {} state".format(end-start,d))
break
elif x=='a*2':
start=time.time()#starts timing
print(aStar2(u))#the current
end=time.time()
print("It took {} seconds for A*2 to search through the {} state".format(end-start,d))
break
else:
raise ValueError
except ValueError:
print("I do not have that algorithm")
continue
print('Run program again for another algorithm!')
<file_sep>/README.md
# AIclass
Code that I have made for my CSC 380 class
<file_sep>/nameBuildingWithMarkovChains.py
import random#importing random because randomness is needed
class names(object):#defining the class name
def __init__(self,fname,n=2):#only have the file name and markov order for this
self.lines=[]#where I store every line of code
self.n=n#the markov order saved for use
self.hashtable=dict()#dictionaries in python are hashtables # Who knew!
infile=open(fname)#grabbing the file
self.infile= infile.readlines()#reads all the lines of the file
for line in self.infile:#loop to get the initial n values to be hyphens so that we have somewhere to start
self.lines.append(('-'*n)+line.lower())#initial n values are now hyphens with the regular lowercase name afterwards, because it was easier this way
infile.close()#close the file becasue we dont need it anymore
for line in self.lines:#cycling through out list of lines
x=self.n#moving value to parse through each part of a name
while x<len(line):#so that it can check the whole name
self.hashtable[line[x-self.n:x]]=[0]*27#puts zeros in a list with a length of 27 where 26 are the alphabet and 27 is the '\n' becasuse that was already there
x+=1#plus one to go to the next one
def hash(self):#this puts values into the hashtable
for line in self.lines:#goes through our list of Names
x=self.n#moving value to parse through each part of a name
while x<len(line):#so that it checks the whole name
if line[x]=='\n':#because '\n' does not have a value that is exactly 27 above 'a'
self.hashtable[line[x-self.n:x]][26]+=1#increases value by one
else:#else
self.hashtable[line[x-self.n:x]][ord(line[x].lower())-ord('a')]+=1#increase the index based on how far it is away from 'a' which works really well
x+=1#increases the parse number
def probabilityBuild(self):#builds the probabilities from the values
for x in self.hashtable:#for every key in the hashdictionary
z=0#counter
for y in range(27):#becasue 27 different values that could appear
z+=self.hashtable[x][y]#counts how many appear
for y in range(27):#beacues 27 different values that could appear
a=self.hashtable[x][y]#the current value there
self.hashtable[x][y]=float(a)/z#the ratio from the total that are there so there will always be less than 1
def buildName(self, minlen, maxlen):#Builds names
name='-'*self.n#this is the start of the name in the same way as the others are in my list
while name[len(name)-1]!='\n':#keeps building name until it hits a end character
x=random.random()#random number
key=name[len(name)-self.n:len(name)]#the key from where we currently are
letter=0#how far in the alphabet are we?
while x>0:#while random number is above zero
x-=self.hashtable[key][letter]#subtract the current ratio from the random number
letter+=1#increase the index by 1
if letter==27:#if the index is the last one
name=name+'\n'#then put the newline character at the end of the name
else:#else
name=name+chr(96+letter)#add 96 to get the letter that matches
if len(name)>=minlen+self.n+1 and len(name)<=maxlen+self.n+1:#if the name fits into the min and max guidelines
if name not in self.lines:#if the name is not in our submitted list
name=name[self.n:len(name)-1]#chops off all the dashes because we dont care about those
name=name[0].capitalize()+name[1:len(name)]#capitalizes the first letter so its an actual name
return name#returns the name
else:#or else
return self.buildName(minlen,maxlen)#do it again
else:#or else
return self.buildName(minlen,maxlen)#or else
boys='C:\\Users\\timdk\\Downloads\\namesBoys.txt'#my path to the Boys names
girls='C:\\Users\\timdk\\Downloads\\namesGirls.txt'#my path to the Girls names
while True:
#male or female
while True:
try:
g=input("Would you like a list of boys names or girls names? Enter boys for boys' names, girls for girls' names, or manual if you have a file you would like to use instead: ")
if g=='boys' or g=='Boys':
s=boys
break
elif g=='girls' or g=='Girls':
s=girls
break
elif g=='manual' or g=='Manual':#reccomend you use this one because it is highly unlikely you have the same file path as I do
s=input('Enter the file path for your name list: ')
break
else:
raise ValueError
except:
print('That is an invalid answer for this input! Please try again!')
continue
#order of model
while True:
try:
n=int(input('What order of Markov Chain would you like? Please enter a positive integer: '))
if n>0:
break
else:
raise ValueError
except:
print('Thats not a valid number for this input! Please try again!')
continue
name=names(s,n)
name.hash()
name.probabilityBuild()
#min name length
while True:
try:
minName=int(input('What is the minimum length of the name(s) you want to create? Please enter a positive integer: '))
if minName>=1:
break
else:
raise ValueError
except:
print("That's not a valid number for this input! Please try again")
continue
#max name length
while True:
try:
maxName=int(input('What is the maximum length of the name(s) you want to create? Please enter a positive integer that is greater than or equal to the minimum length: '))
if maxName>=minName:
break
else:
raise ValueError
except:
print("That's not a valid number for this input! Please try again!")
continue
#number of names to generate
while True:
try:
number=int(input('How many name(s) do you want? Enter a positive integer: '))
if number>=1:
break
else:
raise ValueError
except:
print("That's not a valid number for this input! Please try again!")
continue
for x in range(number):
print(name.buildName(minName,maxName))
a=input('Would you like to go again? Enter Y for yes and N for no: ')
if a=='N' or a=='n':
break
else:
continue
|
5ba6a9f8d1fa1362eca9923ee48a9def1d6be834
|
[
"Markdown",
"Python"
] | 4
|
Python
|
timkom10/AIclass
|
0557b212f74ee7e855b94926a230c261dccf7a6a
|
892b2df6b61cea8f0bb26a824dff55cd020df1a8
|
refs/heads/master
|
<file_sep>from settings import APP_ID
import json
import requests
city_id = '524894'
answers = {
"привет": "И тебе привет!",
"как дела": "Лучше всех.",
"пока": "Увидимся?"
}
num_words = {
'один': 1,
'два': 2,
'три': 3,
'четыре': 4,
'пять': 5,
'шесть': 6,
'семь': 7,
'восемь': 8,
'девять': 9,
'десять': 10,
'ноль': 0
}
marks = ",!.?"
def get_answer(question, dialog):
question = question.strip()
question = question.lower()
for m in marks:
question = question.replace(m,"")
if question not in answers:
return 'Моя твоя не понимать'
return answers.get(question)
def count_word(word):
word = len(word.split(' '))
word -= 1
return word
def get_temp(city_id, app_id):
url = 'http://api.openweathermap.org/data/2.5/weather?id={}&APPID={}'.format(city_id, APP_ID)
r = requests.get(url)
data = json.loads(r.text)
#with open('test.json', 'r') as f:
# data = json.load(f)
k_to_c = data['main']['temp'] - 273.15
k_to_c_f = '{0:.1f}'.format(k_to_c)
return k_to_c_f
<file_sep>from timer import Timer
with Timer() as t:
a = ' 1321 '
b = a.__add__('321')
print(b)
print("=> elasped lpush: %s s" % t.secs)
with Timer() as t:
a = ' 1321 '
print(a + '321')
print("=> elasped lpush: %s s" % t.secs)
<file_sep>def calc_new(string):
string = string.lower().replace(' ', '')
parts = string.split('+')
for plus in range(len(parts)):
if '-' in parts[plus]:
parts
print(parts)
#10 + 2 + 4 / 2 * 3
if __name__ == '__main__':
calc_new('10 + 2 + 4 / 2 * 3')<file_sep>dialog = {"привет": "И тебе привет!", "как дела": "Лучше всех", "пока": "Увидимся"}
def get_answer(question, dialog):
return dialog.get(question)
def aks_user(dialog):
try:
while True:
user_question = input('Задайте вопрос: ')
answer = get_answer(user_question, dialog)
print(answer)
if user_question == 'пока':
break
except KeyboardInterrupt:
print('эй ты чаво')
if __name__ == "__main__":
aks_user(dialog)
<file_sep>from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
from bot_answers import get_answer, answers, count_word, num_words, get_temp, city_id
from settings import API_KEY, APP_ID
import ephem
from datetime import datetime
import csv
def start(bot, update):
print("Вызван /start")
bot.sendMessage(update.message.chat_id, text='Готов общаться')
def create_txt_log(result):
with open('log.txt', 'a', encoding='utf-8') as out:
out.write(result)
def create_csv_log(result):
with open('log.csv', 'w', encoding='utf-8') as out:
fields = ['date', 'username', 'content']
writer = csv.DictWriter(out, fields, delimiter=';')
writer.writeheader()
for i in result:
writer.writerow(i)
def new_year(bot, update):
list1 = [2, 3, 4]
list2 = [5, 6, 7, 8, 9, 0]
user_date = update.message.text.replace('/ng ', '')
# данные для log-файла
user_name = update.message.from_user.username
message_date = update.message.date
md = datetime.strftime(message_date, '%d.%m.%Y')
# запись в txt log
create_txt_log('#message_date: {}'.format(md) + '\t' + '#user_name: {}'.format(user_name) + '\t' +'#user_question: {}'.format(user_date) + '\t')
new_user_date = datetime.strptime(user_date, '%d.%m.%Y')
dt = datetime.now()
ng = '31.12.2016'
ng_date = datetime.strptime(ng, '%d.%m.%Y')
if new_user_date > dt:
delta = ng_date - new_user_date
res = list(str(delta.days))
for number in res.pop():
if int(number) in list1:
days = 'дня'
elif int(number) in list2:
days = 'дней'
elif int(number) == 1:
days = 'день'
res = str(delta.days)
bot.sendMessage(update.message.chat_id, text='До нового года осталось: {} {}'.format(res, days))
# запись в txt log
create_txt_log('#bot_answer: До нового года осталось: {} {}'.format(res, days) + '\n')
# словарь для csv log
res_dict = [{'date': md, 'username': user_name, 'content': user_date}]
# запись в csv log
create_csv_log(res_dict)
else:
bot.sendMessage(update.message.chat_id, text='Дата уже прошла')
# запись в txt log
create_txt_log('#bot_answer: Дата уже прошла' + '\n')
def operations(user_number):
if '-' in user_number:
input_str = user_number.split('-')
if not input_str[0] or not input_str[1]:
bot.sendMessage(update.message.chat_id, text='Ошибка ввода: Не хватает одного или двух чисел')
else:
result = int(input_str[0]) - int(input_str[1])
return result
elif '*' in user_number:
input_str = user_number.split('*')
if not input_str[0] or not input_str[1]:
bot.sendMessage(update.message.chat_id, text='Ошибка ввода: Не хватает одного или двух чисел')
else:
result = int(input_str[0]) * int(input_str[1])
return result
def count_words(bot, update):
print("Вызван /count")
bot.sendMessage(update.message.chat_id, count_word(update.message.text))
def full_moon(bot,update):
user_date = update.message.text.replace('/moon','')
moon_date = ephem.next_full_moon('{}'.format(user_date))
bot.sendMessage(update.message.chat_id, str(moon_date))
def temperature_is(bot,update):
user_t = update.message.text.replace('/t','')
bot.sendMessage(update.message.chat_id, get_temp(city_id, APP_ID))
def calculator(bot, update):
number = update.message.text.replace('/calc ','')
input_number = number.replace('=','')
if '+' in input_number:
sum_number = input_number.split('+')
if not sum_number[0] or not sum_number[1]:
bot.sendMessage(update.message.chat_id, text='Ошибка ввода: Не хватает одного или двух чисел')
else:
res = int(sum_number[0]) + int(sum_number[1]) #повторить обращение к строкам по индексу
elif '*' in input_number:
res = operations(input_number)
elif '-' in input_number:
res = operations(input_number)
elif '/' in input_number:
number_d = input_number.split('/')
if not number_d[0] or not number_d[1]:
bot.sendMessage(update.message.chat_id, text='Ошибка ввода: Не хватает одного или двух чисел')
else:
try:
res = int(number_d[0]) / int(number_d[1])
except ZeroDivisionError:
bot.sendMessage(update.message.chat_id, text='Ошибка ввода: На ноль делить нельзя')
elif 'плюс' in input_number:
word_list = input_number.split(' плюс ')
#обработка float
if ' и ' in input_number:
word_list = [items.split(' и ') for items in word_list]
word_list[0].insert(1,'.')
word_list[1].insert(1,'.')
if word_list[0][0] and word_list[0][2] and word_list[1][0] and word_list[1][2] in num_words:
num1 = str(num_words[word_list[0][0]]) + word_list[0][1] + str(num_words[word_list[0][2]])
num2 = str(num_words[word_list[1][0]]) + word_list[1][1] + str(num_words[word_list[1][2]])
res = float(num1) + float(num2)
#обработка чисел, которые введены словами
elif word_list[0] and word_list[1] in num_words:
print(word_list[0] + ' ' + word_list[1])
res = num_words[word_list[0]] + num_words[word_list[1]]
elif 'умножить' in input_number:
word_list = input_number.split(' умножить ')
#обработка float
if ' и ' in input_number:
word_list = [items.split(' и ') for items in word_list]
word_list[0].insert(1,'.')
word_list[1].insert(1,'.')
if word_list[0][0] and word_list[0][2] and word_list[1][0] and word_list[1][2] in num_words:
num1 = str(num_words[word_list[0][0]]) + word_list[0][1] + str(num_words[word_list[0][2]])
num2 = str(num_words[word_list[1][0]]) + word_list[1][1] + str(num_words[word_list[1][2]])
res = float(num1) * float(num2)
#обработка чисел, которые введены словами
elif word_list[0] and word_list[1] in num_words:
res = num_words[word_list[0]] * num_words[word_list[1]]
elif 'разделить' in input_number:
word_list = input_number.split(' разделить ')
#обработка float
if ' и ' in input_number:
word_list = [items.split(' и ') for items in word_list]
word_list[0].insert(1,'.')
word_list[1].insert(1,'.')
if word_list[0][0] and word_list[0][2] and word_list[1][0] and word_list[1][2] in num_words:
num1 = str(num_words[word_list[0][0]]) + word_list[0][1] + str(num_words[word_list[0][2]])
num2 = str(num_words[word_list[1][0]]) + word_list[1][1] + str(num_words[word_list[1][2]])
res = float(num1) / float(num2)
#обработка чисел, которые введены словами
elif word_list[0] and word_list[1] in num_words:
res = num_words[word_list[0]] / num_words[word_list[1]]
elif 'минус' in input_number:
word_list = input_number.split(' минус ')
#обработка float
if ' и ' in input_number:
word_list = [items.split(' и ') for items in word_list]
word_list[0].insert(1,'.')
word_list[1].insert(1,'.')
if word_list[0][0] and word_list[0][2] and word_list[1][0] and word_list[1][2] in num_words:
num1 = str(num_words[word_list[0][0]]) + word_list[0][1] + str(num_words[word_list[0][2]])
num2 = str(num_words[word_list[1][0]]) + word_list[1][1] + str(num_words[word_list[1][2]])
res = float(num1) - float(num2)
#обработка чисел, которые введены словами
elif word_list[0] and word_list[1] in num_words:
res = num_words[word_list[0]] - num_words[word_list[1]]
bot.sendMessage(update.message.chat_id, res)
def talk_to_me(bot, update):
print("Пришло сообщение: " + update.message.text)
user_answer = get_answer(update.message.text, answers)
def run_bot():
updater = Updater(API_KEY)
db = updater.dispatcher
db.add_handler(CommandHandler("start", start))
db.add_handler(CommandHandler("count", count_words))
db.add_handler(CommandHandler("calc", calculator))
db.add_handler(CommandHandler("moon", full_moon))
db.add_handler(CommandHandler("t", temperature_is))
db.add_handler(CommandHandler("ng", new_year))
db.add_handler(MessageHandler([Filters.text], talk_to_me))
updater.start_polling()
updater.idle()
if __name__ == "__main__":
run_bot()<file_sep>"""
user_age = int(input('Введите ваш возраст: '))
if user_age <= 7:
print('Детсад')
elif user_age <= 18:
print('Школа')
elif user_age <= 22:
print('ВУЗ')
elif user_age >= 22:
print('Работяга')
"""
"""
def str_comparse (str1, str2):
if str1 == str2:
return 1
elif (str1 != str2) and (len(str1) > len(str2)):
return 2
elif str1 != str2 and str2 == 'learn':
return 3
res = str_comparse('sd23','learn')
print (res)
"""
"""
name_list = ['Вася', 'Маша', 'Петя', 'Валера', 'Саша', 'Даша']
while True:
names = name_list.pop()
if names == 'Валера':
print('Валера нашелся')
break
"""
<file_sep>"""while True:
user_name = input('Назовите ваше имя: ')
if user_name == 'Антон':
print('Привет, %s' % user_name)
break
else:
print('Ты не Антон!')"""
"""name_list = ["Вася", "Маша", "Петя", "Валера", "Саша", "Даша"]
name = input('Введите ваше имя: ')
def find_person(name):
try:
while True:
name_list2 = name_list.pop()
if name_list2 == name:
print(name + " есть в списке")
break
except IndexError:
print('Такого имени нет в списке')
find_person(name)"""
"""question = ''
def aks_user(question):
while True:
question = input('Как дела?')
if question == 'Хорошо':
break
aks_user(question)"""
<file_sep>"""student_scores = [1, 2, 3, 4, 5]
for score in student_scores:
score += 1
print(score)"""
"""string = input('Введите строку: ')
for i in string:
print(i)"""
def mean(int_list):
s = 0
for i in int_list:
s += i
return s / len(int_list)
student_scores = [{'school_class': '4a', 'scores': [1, 3, 5, 4, 3, 2]},
{'school_class': '4b', 'scores': [2, 5, 3, 1, 1, 2]},
{'school_class': '4c', 'scores': [1, 4, 3, 5, 2, 3]}]
sum_school_score = []
for school_score in student_scores:
sum_school_score += school_score['scores']
print(mean(sum_school_score))
for class_score in student_scores:
print(mean(class_score['scores']))
|
c2494b20ca65fec5ca9ec384d0c5090185987d77
|
[
"Python"
] | 8
|
Python
|
kondyurin/learn_python
|
1aee4526c3df679c9d90357760d344938c970159
|
0f650817f0b6e97fb5881edd148a5ff36b168710
|
refs/heads/master
|
<repo_name>thorlund/rendering<file_sep>/raytrace/Triangle.cpp
// 02562 Rendering Framework
// Written by <NAME>, 2011
// Copyright (c) DTU Informatics 2011
#include <optix_world.h>
#include "HitInfo.h"
#include "Triangle.h"
#include <stdlib.h>
using namespace optix;
bool intersect_triangle(const Ray& ray,
const float3& v0,
const float3& v1,
const float3& v2,
float3& n,
float& t,
float& v,
float& w)
{
// Implement ray-triangle intersection here.
// Note that OptiX also has an implementation, so you can get away
// with not implementing this function. However, I recommend that
// you implement it for completeness.
optix::float3 u = v1 - v0;
optix::float3 v = v2-v0;
optix::float3 tri_normal = n;
optix::float3 origin = v0;
float D = -tri_normal.x*origin.x - tri_normal.y*origin.y - tri_normal.z*origin.y;
float Vd = optix::dot(tri_normal,r.direction);
if(Vd != 0){
float V0 = -(optix::dot(tri_normal,r.origin)+D);
float t = V0/Vd;
if(t> 0){
optix::float3 intersection_point = r.origin + (t * r.direction);
float uu,uv,vv,wu,wv;
uu = optix::dot(u,u);
uv = optix::dot(u,v);
vv = optix::dot(v,v);
optix::float3 w = intersection_point - v0;
wu = optix::dot(w,u);
wv = optix::dot(w,v);
d = uv*uv - uu *vv;
float s,float r;
s = (uv *wv - vv * wu) / d;
r = (uv * wu - uu*wv)/d;
if(s < 0.0 || s > 1.0 || t<0.0 || (s+t) > 1.0){
return false;
return true;
}
}
}
return false;
}
bool Triangle::intersect(const Ray& r, HitInfo& hit, unsigned int prim_idx) const
{
// Implement ray-triangle intersection here.
//
// Input: r (the ray to be checked for intersection)
// prim_idx (index of the primitive element in a collection, not used here)
//
// Output: hit.has_hit (true if the ray intersects the triangle, false otherwise)
// hit.dist (distance from the ray origin to the intersection point)
// hit.geometric_normal (the normalized normal of the triangle)
// hit.shading_normal (the normalized normal of the triangle)
// hit.material (pointer to the material of the triangle)
// (hit.texcoord) (texture coordinates of intersection point, not needed for Week 1)
//
// Return: True if the ray intersects the triangle, false otherwise
//
// Relevant data fields that are available (see Triangle.h)
// r (the ray)
// v0, v1, v2 (triangle vertices)
// (t0, t1, t2) (texture coordinates for each vertex, not needed for Week 1)
// material (material of the triangle)
//
// Hint: Use the function intersect_triangle(...) to get the hit info.
// Note that you need to do scope resolution (optix:: or just :: in front
// of the function name) to choose between the OptiX implementation and
// the function just above this one.
hit.has_hit = intersect_triangle(r,v0,v1,v2, compute_normal()
hit.dist = fabs(tri_normal.x*r.origin.x + tri_normal.y * r.origin.y + tri_normal.z*r.origin.z + D)/(
pow(tri_normal.x,2) + pow(tri_normal.y,2) + pow(tri_normal.z,2));
hit.geometric_normal = optix::normalize(tri_normal);
hit.shading_normal = optix::normalize(tri_normal);
hit.material = &get_material();
}
void Triangle::transform(const Matrix4x4& m)
{
v0 = make_float3(m*make_float4(v0, 1.0f));
v1 = make_float3(m*make_float4(v1, 1.0f));
v2 = make_float3(m*make_float4(v2, 1.0f));
}
Aabb Triangle::compute_bbox() const
{
Aabb bbox;
bbox.include(v0);
bbox.include(v1);
bbox.include(v2);
return bbox;
}
<file_sep>/raytrace/RayTracer.cpp
// 02562 Rendering Framework
// Written by <NAME>, 2011
// Copyright (c) DTU Informatics 2011
#include <optix_world.h>
#include "HitInfo.h"
#include "ObjMaterial.h"
#include "fresnel.h"
#include "RayTracer.h"
using namespace optix;
bool RayTracer::trace_reflected(const Ray& in, const HitInfo& in_hit, Ray& out, HitInfo& out_hit) const
{
// Initialize the reflected ray and trace it. Set out_hit.ray_ior and out_hit.trace_depth.
// Return true if the reflected ray hit anything.
return false;
}
bool RayTracer::trace_refracted(const Ray& in, const HitInfo& in_hit, Ray& out, HitInfo& out_hit) const
{
// Initialize the refracted ray and trace it. Set out_hit.ray_ior and out_hit.trace_depth.
// Return true if the refracted ray hit anything.
// Remember that the function must handle total internal reflection.
return false;
}
bool RayTracer::trace_refracted(const Ray& in, const HitInfo& in_hit, Ray& out, HitInfo& out_hit, float& R) const
{
// Initialize the refracted ray and trace it. Set out_hit.ray_ior and out_hit.trace_depth.
// Compute the Fresnel reflectance (see fresnel.h) and return it in R.
// Return true if the refracted ray hit anything.
// Remember that the function must handle total internal reflection.
return false;
}
float RayTracer::get_ior_out(const Ray& in, const HitInfo& in_hit, float3& dir, float3& normal, float& cos_theta_in) const
{
normal = in_hit.shading_normal;
dir = -in.direction;
cos_theta_in = dot(normal, dir);
if(cos_theta_in < 0.0)
{
normal = -normal;
cos_theta_in = -cos_theta_in;
return 1.0f;
}
const ObjMaterial* m = in_hit.material;
return m ? m->ior : 1.0f;
}
<file_sep>/CMakeFiles/SOIL.dir/DependInfo.cmake
# The set of languages for which implicit dependencies are needed:
SET(CMAKE_DEPENDS_LANGUAGES
"C"
)
# The set of files for implicit dependencies of each language:
SET(CMAKE_DEPENDS_CHECK_C
"/home/morten/uni/rendering_dtu/SOIL/SOIL.c" "/home/morten/uni/rendering_dtu/CMakeFiles/SOIL.dir/SOIL/SOIL.c.o"
"/home/morten/uni/rendering_dtu/SOIL/image_DXT.c" "/home/morten/uni/rendering_dtu/CMakeFiles/SOIL.dir/SOIL/image_DXT.c.o"
"/home/morten/uni/rendering_dtu/SOIL/image_helper.c" "/home/morten/uni/rendering_dtu/CMakeFiles/SOIL.dir/SOIL/image_helper.c.o"
"/home/morten/uni/rendering_dtu/SOIL/stb_image.c" "/home/morten/uni/rendering_dtu/CMakeFiles/SOIL.dir/SOIL/stb_image.c.o"
"/home/morten/uni/rendering_dtu/SOIL/stb_image_write.c" "/home/morten/uni/rendering_dtu/CMakeFiles/SOIL.dir/SOIL/stb_image_write.c.o"
)
SET(CMAKE_C_COMPILER_ID "GNU")
# Targets to which this target links.
SET(CMAKE_TARGET_LINKED_INFO_FILES
)
<file_sep>/CMakeFiles/raytrace.dir/cmake_clean.cmake
FILE(REMOVE_RECURSE
"CMakeFiles/raytrace.dir/raytrace/Randomizer.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/RayTracer.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/Gamma.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/BspTree.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/Volume.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/obj_load.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/TriMesh.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/Mirror.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/ParticleTracer.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/string_utils.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/AreaLight.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/InvSphereMap.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/Triangle.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/raytrace.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/HDRTexture.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/Scene.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/SphereTexture.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/Plane.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/PhotonCaustics.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/Phong.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/GlossyVolume.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/Lambertian.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/Textured.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/Glossy.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/RenderEngine.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/Transparent.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/RayCaster.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/Accelerator.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/Texture.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/Directional.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/PointLight.cpp.o"
"CMakeFiles/raytrace.dir/raytrace/Sphere.cpp.o"
"bin/raytrace.pdb"
"bin/raytrace"
)
# Per-language clean rules from dependency scanning.
FOREACH(lang CXX)
INCLUDE(CMakeFiles/raytrace.dir/cmake_clean_${lang}.cmake OPTIONAL)
ENDFOREACH(lang)
<file_sep>/Makefile
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canoncical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/morten/uni/rendering_dtu
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/morten/uni/rendering_dtu
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..."
/usr/bin/cmake -i .
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# The main all target
all: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start /home/morten/uni/rendering_dtu/CMakeFiles /home/morten/uni/rendering_dtu/CMakeFiles/progress.marks
$(MAKE) -f CMakeFiles/Makefile2 all
$(CMAKE_COMMAND) -E cmake_progress_start /home/morten/uni/rendering_dtu/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
$(MAKE) -f CMakeFiles/Makefile2 clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall/fast
# clear depends
depend:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
#=============================================================================
# Target rules for targets named SOIL
# Build rule for target.
SOIL: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 SOIL
.PHONY : SOIL
# fast build rule for target.
SOIL/fast:
$(MAKE) -f CMakeFiles/SOIL.dir/build.make CMakeFiles/SOIL.dir/build
.PHONY : SOIL/fast
#=============================================================================
# Target rules for targets named raytrace
# Build rule for target.
raytrace: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 raytrace
.PHONY : raytrace
# fast build rule for target.
raytrace/fast:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/build
.PHONY : raytrace/fast
SOIL/SOIL.o: SOIL/SOIL.c.o
.PHONY : SOIL/SOIL.o
# target to build an object file
SOIL/SOIL.c.o:
$(MAKE) -f CMakeFiles/SOIL.dir/build.make CMakeFiles/SOIL.dir/SOIL/SOIL.c.o
.PHONY : SOIL/SOIL.c.o
SOIL/SOIL.i: SOIL/SOIL.c.i
.PHONY : SOIL/SOIL.i
# target to preprocess a source file
SOIL/SOIL.c.i:
$(MAKE) -f CMakeFiles/SOIL.dir/build.make CMakeFiles/SOIL.dir/SOIL/SOIL.c.i
.PHONY : SOIL/SOIL.c.i
SOIL/SOIL.s: SOIL/SOIL.c.s
.PHONY : SOIL/SOIL.s
# target to generate assembly for a file
SOIL/SOIL.c.s:
$(MAKE) -f CMakeFiles/SOIL.dir/build.make CMakeFiles/SOIL.dir/SOIL/SOIL.c.s
.PHONY : SOIL/SOIL.c.s
SOIL/image_DXT.o: SOIL/image_DXT.c.o
.PHONY : SOIL/image_DXT.o
# target to build an object file
SOIL/image_DXT.c.o:
$(MAKE) -f CMakeFiles/SOIL.dir/build.make CMakeFiles/SOIL.dir/SOIL/image_DXT.c.o
.PHONY : SOIL/image_DXT.c.o
SOIL/image_DXT.i: SOIL/image_DXT.c.i
.PHONY : SOIL/image_DXT.i
# target to preprocess a source file
SOIL/image_DXT.c.i:
$(MAKE) -f CMakeFiles/SOIL.dir/build.make CMakeFiles/SOIL.dir/SOIL/image_DXT.c.i
.PHONY : SOIL/image_DXT.c.i
SOIL/image_DXT.s: SOIL/image_DXT.c.s
.PHONY : SOIL/image_DXT.s
# target to generate assembly for a file
SOIL/image_DXT.c.s:
$(MAKE) -f CMakeFiles/SOIL.dir/build.make CMakeFiles/SOIL.dir/SOIL/image_DXT.c.s
.PHONY : SOIL/image_DXT.c.s
SOIL/image_helper.o: SOIL/image_helper.c.o
.PHONY : SOIL/image_helper.o
# target to build an object file
SOIL/image_helper.c.o:
$(MAKE) -f CMakeFiles/SOIL.dir/build.make CMakeFiles/SOIL.dir/SOIL/image_helper.c.o
.PHONY : SOIL/image_helper.c.o
SOIL/image_helper.i: SOIL/image_helper.c.i
.PHONY : SOIL/image_helper.i
# target to preprocess a source file
SOIL/image_helper.c.i:
$(MAKE) -f CMakeFiles/SOIL.dir/build.make CMakeFiles/SOIL.dir/SOIL/image_helper.c.i
.PHONY : SOIL/image_helper.c.i
SOIL/image_helper.s: SOIL/image_helper.c.s
.PHONY : SOIL/image_helper.s
# target to generate assembly for a file
SOIL/image_helper.c.s:
$(MAKE) -f CMakeFiles/SOIL.dir/build.make CMakeFiles/SOIL.dir/SOIL/image_helper.c.s
.PHONY : SOIL/image_helper.c.s
SOIL/stb_image.o: SOIL/stb_image.c.o
.PHONY : SOIL/stb_image.o
# target to build an object file
SOIL/stb_image.c.o:
$(MAKE) -f CMakeFiles/SOIL.dir/build.make CMakeFiles/SOIL.dir/SOIL/stb_image.c.o
.PHONY : SOIL/stb_image.c.o
SOIL/stb_image.i: SOIL/stb_image.c.i
.PHONY : SOIL/stb_image.i
# target to preprocess a source file
SOIL/stb_image.c.i:
$(MAKE) -f CMakeFiles/SOIL.dir/build.make CMakeFiles/SOIL.dir/SOIL/stb_image.c.i
.PHONY : SOIL/stb_image.c.i
SOIL/stb_image.s: SOIL/stb_image.c.s
.PHONY : SOIL/stb_image.s
# target to generate assembly for a file
SOIL/stb_image.c.s:
$(MAKE) -f CMakeFiles/SOIL.dir/build.make CMakeFiles/SOIL.dir/SOIL/stb_image.c.s
.PHONY : SOIL/stb_image.c.s
SOIL/stb_image_write.o: SOIL/stb_image_write.c.o
.PHONY : SOIL/stb_image_write.o
# target to build an object file
SOIL/stb_image_write.c.o:
$(MAKE) -f CMakeFiles/SOIL.dir/build.make CMakeFiles/SOIL.dir/SOIL/stb_image_write.c.o
.PHONY : SOIL/stb_image_write.c.o
SOIL/stb_image_write.i: SOIL/stb_image_write.c.i
.PHONY : SOIL/stb_image_write.i
# target to preprocess a source file
SOIL/stb_image_write.c.i:
$(MAKE) -f CMakeFiles/SOIL.dir/build.make CMakeFiles/SOIL.dir/SOIL/stb_image_write.c.i
.PHONY : SOIL/stb_image_write.c.i
SOIL/stb_image_write.s: SOIL/stb_image_write.c.s
.PHONY : SOIL/stb_image_write.s
# target to generate assembly for a file
SOIL/stb_image_write.c.s:
$(MAKE) -f CMakeFiles/SOIL.dir/build.make CMakeFiles/SOIL.dir/SOIL/stb_image_write.c.s
.PHONY : SOIL/stb_image_write.c.s
raytrace/Accelerator.o: raytrace/Accelerator.cpp.o
.PHONY : raytrace/Accelerator.o
# target to build an object file
raytrace/Accelerator.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Accelerator.cpp.o
.PHONY : raytrace/Accelerator.cpp.o
raytrace/Accelerator.i: raytrace/Accelerator.cpp.i
.PHONY : raytrace/Accelerator.i
# target to preprocess a source file
raytrace/Accelerator.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Accelerator.cpp.i
.PHONY : raytrace/Accelerator.cpp.i
raytrace/Accelerator.s: raytrace/Accelerator.cpp.s
.PHONY : raytrace/Accelerator.s
# target to generate assembly for a file
raytrace/Accelerator.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Accelerator.cpp.s
.PHONY : raytrace/Accelerator.cpp.s
raytrace/AreaLight.o: raytrace/AreaLight.cpp.o
.PHONY : raytrace/AreaLight.o
# target to build an object file
raytrace/AreaLight.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/AreaLight.cpp.o
.PHONY : raytrace/AreaLight.cpp.o
raytrace/AreaLight.i: raytrace/AreaLight.cpp.i
.PHONY : raytrace/AreaLight.i
# target to preprocess a source file
raytrace/AreaLight.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/AreaLight.cpp.i
.PHONY : raytrace/AreaLight.cpp.i
raytrace/AreaLight.s: raytrace/AreaLight.cpp.s
.PHONY : raytrace/AreaLight.s
# target to generate assembly for a file
raytrace/AreaLight.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/AreaLight.cpp.s
.PHONY : raytrace/AreaLight.cpp.s
raytrace/BspTree.o: raytrace/BspTree.cpp.o
.PHONY : raytrace/BspTree.o
# target to build an object file
raytrace/BspTree.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/BspTree.cpp.o
.PHONY : raytrace/BspTree.cpp.o
raytrace/BspTree.i: raytrace/BspTree.cpp.i
.PHONY : raytrace/BspTree.i
# target to preprocess a source file
raytrace/BspTree.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/BspTree.cpp.i
.PHONY : raytrace/BspTree.cpp.i
raytrace/BspTree.s: raytrace/BspTree.cpp.s
.PHONY : raytrace/BspTree.s
# target to generate assembly for a file
raytrace/BspTree.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/BspTree.cpp.s
.PHONY : raytrace/BspTree.cpp.s
raytrace/Directional.o: raytrace/Directional.cpp.o
.PHONY : raytrace/Directional.o
# target to build an object file
raytrace/Directional.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Directional.cpp.o
.PHONY : raytrace/Directional.cpp.o
raytrace/Directional.i: raytrace/Directional.cpp.i
.PHONY : raytrace/Directional.i
# target to preprocess a source file
raytrace/Directional.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Directional.cpp.i
.PHONY : raytrace/Directional.cpp.i
raytrace/Directional.s: raytrace/Directional.cpp.s
.PHONY : raytrace/Directional.s
# target to generate assembly for a file
raytrace/Directional.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Directional.cpp.s
.PHONY : raytrace/Directional.cpp.s
raytrace/Gamma.o: raytrace/Gamma.cpp.o
.PHONY : raytrace/Gamma.o
# target to build an object file
raytrace/Gamma.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Gamma.cpp.o
.PHONY : raytrace/Gamma.cpp.o
raytrace/Gamma.i: raytrace/Gamma.cpp.i
.PHONY : raytrace/Gamma.i
# target to preprocess a source file
raytrace/Gamma.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Gamma.cpp.i
.PHONY : raytrace/Gamma.cpp.i
raytrace/Gamma.s: raytrace/Gamma.cpp.s
.PHONY : raytrace/Gamma.s
# target to generate assembly for a file
raytrace/Gamma.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Gamma.cpp.s
.PHONY : raytrace/Gamma.cpp.s
raytrace/Glossy.o: raytrace/Glossy.cpp.o
.PHONY : raytrace/Glossy.o
# target to build an object file
raytrace/Glossy.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Glossy.cpp.o
.PHONY : raytrace/Glossy.cpp.o
raytrace/Glossy.i: raytrace/Glossy.cpp.i
.PHONY : raytrace/Glossy.i
# target to preprocess a source file
raytrace/Glossy.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Glossy.cpp.i
.PHONY : raytrace/Glossy.cpp.i
raytrace/Glossy.s: raytrace/Glossy.cpp.s
.PHONY : raytrace/Glossy.s
# target to generate assembly for a file
raytrace/Glossy.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Glossy.cpp.s
.PHONY : raytrace/Glossy.cpp.s
raytrace/GlossyVolume.o: raytrace/GlossyVolume.cpp.o
.PHONY : raytrace/GlossyVolume.o
# target to build an object file
raytrace/GlossyVolume.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/GlossyVolume.cpp.o
.PHONY : raytrace/GlossyVolume.cpp.o
raytrace/GlossyVolume.i: raytrace/GlossyVolume.cpp.i
.PHONY : raytrace/GlossyVolume.i
# target to preprocess a source file
raytrace/GlossyVolume.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/GlossyVolume.cpp.i
.PHONY : raytrace/GlossyVolume.cpp.i
raytrace/GlossyVolume.s: raytrace/GlossyVolume.cpp.s
.PHONY : raytrace/GlossyVolume.s
# target to generate assembly for a file
raytrace/GlossyVolume.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/GlossyVolume.cpp.s
.PHONY : raytrace/GlossyVolume.cpp.s
raytrace/HDRTexture.o: raytrace/HDRTexture.cpp.o
.PHONY : raytrace/HDRTexture.o
# target to build an object file
raytrace/HDRTexture.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/HDRTexture.cpp.o
.PHONY : raytrace/HDRTexture.cpp.o
raytrace/HDRTexture.i: raytrace/HDRTexture.cpp.i
.PHONY : raytrace/HDRTexture.i
# target to preprocess a source file
raytrace/HDRTexture.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/HDRTexture.cpp.i
.PHONY : raytrace/HDRTexture.cpp.i
raytrace/HDRTexture.s: raytrace/HDRTexture.cpp.s
.PHONY : raytrace/HDRTexture.s
# target to generate assembly for a file
raytrace/HDRTexture.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/HDRTexture.cpp.s
.PHONY : raytrace/HDRTexture.cpp.s
raytrace/InvSphereMap.o: raytrace/InvSphereMap.cpp.o
.PHONY : raytrace/InvSphereMap.o
# target to build an object file
raytrace/InvSphereMap.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/InvSphereMap.cpp.o
.PHONY : raytrace/InvSphereMap.cpp.o
raytrace/InvSphereMap.i: raytrace/InvSphereMap.cpp.i
.PHONY : raytrace/InvSphereMap.i
# target to preprocess a source file
raytrace/InvSphereMap.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/InvSphereMap.cpp.i
.PHONY : raytrace/InvSphereMap.cpp.i
raytrace/InvSphereMap.s: raytrace/InvSphereMap.cpp.s
.PHONY : raytrace/InvSphereMap.s
# target to generate assembly for a file
raytrace/InvSphereMap.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/InvSphereMap.cpp.s
.PHONY : raytrace/InvSphereMap.cpp.s
raytrace/Lambertian.o: raytrace/Lambertian.cpp.o
.PHONY : raytrace/Lambertian.o
# target to build an object file
raytrace/Lambertian.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Lambertian.cpp.o
.PHONY : raytrace/Lambertian.cpp.o
raytrace/Lambertian.i: raytrace/Lambertian.cpp.i
.PHONY : raytrace/Lambertian.i
# target to preprocess a source file
raytrace/Lambertian.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Lambertian.cpp.i
.PHONY : raytrace/Lambertian.cpp.i
raytrace/Lambertian.s: raytrace/Lambertian.cpp.s
.PHONY : raytrace/Lambertian.s
# target to generate assembly for a file
raytrace/Lambertian.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Lambertian.cpp.s
.PHONY : raytrace/Lambertian.cpp.s
raytrace/Mirror.o: raytrace/Mirror.cpp.o
.PHONY : raytrace/Mirror.o
# target to build an object file
raytrace/Mirror.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Mirror.cpp.o
.PHONY : raytrace/Mirror.cpp.o
raytrace/Mirror.i: raytrace/Mirror.cpp.i
.PHONY : raytrace/Mirror.i
# target to preprocess a source file
raytrace/Mirror.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Mirror.cpp.i
.PHONY : raytrace/Mirror.cpp.i
raytrace/Mirror.s: raytrace/Mirror.cpp.s
.PHONY : raytrace/Mirror.s
# target to generate assembly for a file
raytrace/Mirror.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Mirror.cpp.s
.PHONY : raytrace/Mirror.cpp.s
raytrace/ParticleTracer.o: raytrace/ParticleTracer.cpp.o
.PHONY : raytrace/ParticleTracer.o
# target to build an object file
raytrace/ParticleTracer.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/ParticleTracer.cpp.o
.PHONY : raytrace/ParticleTracer.cpp.o
raytrace/ParticleTracer.i: raytrace/ParticleTracer.cpp.i
.PHONY : raytrace/ParticleTracer.i
# target to preprocess a source file
raytrace/ParticleTracer.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/ParticleTracer.cpp.i
.PHONY : raytrace/ParticleTracer.cpp.i
raytrace/ParticleTracer.s: raytrace/ParticleTracer.cpp.s
.PHONY : raytrace/ParticleTracer.s
# target to generate assembly for a file
raytrace/ParticleTracer.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/ParticleTracer.cpp.s
.PHONY : raytrace/ParticleTracer.cpp.s
raytrace/Phong.o: raytrace/Phong.cpp.o
.PHONY : raytrace/Phong.o
# target to build an object file
raytrace/Phong.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Phong.cpp.o
.PHONY : raytrace/Phong.cpp.o
raytrace/Phong.i: raytrace/Phong.cpp.i
.PHONY : raytrace/Phong.i
# target to preprocess a source file
raytrace/Phong.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Phong.cpp.i
.PHONY : raytrace/Phong.cpp.i
raytrace/Phong.s: raytrace/Phong.cpp.s
.PHONY : raytrace/Phong.s
# target to generate assembly for a file
raytrace/Phong.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Phong.cpp.s
.PHONY : raytrace/Phong.cpp.s
raytrace/PhotonCaustics.o: raytrace/PhotonCaustics.cpp.o
.PHONY : raytrace/PhotonCaustics.o
# target to build an object file
raytrace/PhotonCaustics.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/PhotonCaustics.cpp.o
.PHONY : raytrace/PhotonCaustics.cpp.o
raytrace/PhotonCaustics.i: raytrace/PhotonCaustics.cpp.i
.PHONY : raytrace/PhotonCaustics.i
# target to preprocess a source file
raytrace/PhotonCaustics.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/PhotonCaustics.cpp.i
.PHONY : raytrace/PhotonCaustics.cpp.i
raytrace/PhotonCaustics.s: raytrace/PhotonCaustics.cpp.s
.PHONY : raytrace/PhotonCaustics.s
# target to generate assembly for a file
raytrace/PhotonCaustics.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/PhotonCaustics.cpp.s
.PHONY : raytrace/PhotonCaustics.cpp.s
raytrace/Plane.o: raytrace/Plane.cpp.o
.PHONY : raytrace/Plane.o
# target to build an object file
raytrace/Plane.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Plane.cpp.o
.PHONY : raytrace/Plane.cpp.o
raytrace/Plane.i: raytrace/Plane.cpp.i
.PHONY : raytrace/Plane.i
# target to preprocess a source file
raytrace/Plane.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Plane.cpp.i
.PHONY : raytrace/Plane.cpp.i
raytrace/Plane.s: raytrace/Plane.cpp.s
.PHONY : raytrace/Plane.s
# target to generate assembly for a file
raytrace/Plane.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Plane.cpp.s
.PHONY : raytrace/Plane.cpp.s
raytrace/PointLight.o: raytrace/PointLight.cpp.o
.PHONY : raytrace/PointLight.o
# target to build an object file
raytrace/PointLight.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/PointLight.cpp.o
.PHONY : raytrace/PointLight.cpp.o
raytrace/PointLight.i: raytrace/PointLight.cpp.i
.PHONY : raytrace/PointLight.i
# target to preprocess a source file
raytrace/PointLight.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/PointLight.cpp.i
.PHONY : raytrace/PointLight.cpp.i
raytrace/PointLight.s: raytrace/PointLight.cpp.s
.PHONY : raytrace/PointLight.s
# target to generate assembly for a file
raytrace/PointLight.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/PointLight.cpp.s
.PHONY : raytrace/PointLight.cpp.s
raytrace/Randomizer.o: raytrace/Randomizer.cpp.o
.PHONY : raytrace/Randomizer.o
# target to build an object file
raytrace/Randomizer.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Randomizer.cpp.o
.PHONY : raytrace/Randomizer.cpp.o
raytrace/Randomizer.i: raytrace/Randomizer.cpp.i
.PHONY : raytrace/Randomizer.i
# target to preprocess a source file
raytrace/Randomizer.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Randomizer.cpp.i
.PHONY : raytrace/Randomizer.cpp.i
raytrace/Randomizer.s: raytrace/Randomizer.cpp.s
.PHONY : raytrace/Randomizer.s
# target to generate assembly for a file
raytrace/Randomizer.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Randomizer.cpp.s
.PHONY : raytrace/Randomizer.cpp.s
raytrace/RayCaster.o: raytrace/RayCaster.cpp.o
.PHONY : raytrace/RayCaster.o
# target to build an object file
raytrace/RayCaster.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/RayCaster.cpp.o
.PHONY : raytrace/RayCaster.cpp.o
raytrace/RayCaster.i: raytrace/RayCaster.cpp.i
.PHONY : raytrace/RayCaster.i
# target to preprocess a source file
raytrace/RayCaster.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/RayCaster.cpp.i
.PHONY : raytrace/RayCaster.cpp.i
raytrace/RayCaster.s: raytrace/RayCaster.cpp.s
.PHONY : raytrace/RayCaster.s
# target to generate assembly for a file
raytrace/RayCaster.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/RayCaster.cpp.s
.PHONY : raytrace/RayCaster.cpp.s
raytrace/RayTracer.o: raytrace/RayTracer.cpp.o
.PHONY : raytrace/RayTracer.o
# target to build an object file
raytrace/RayTracer.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/RayTracer.cpp.o
.PHONY : raytrace/RayTracer.cpp.o
raytrace/RayTracer.i: raytrace/RayTracer.cpp.i
.PHONY : raytrace/RayTracer.i
# target to preprocess a source file
raytrace/RayTracer.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/RayTracer.cpp.i
.PHONY : raytrace/RayTracer.cpp.i
raytrace/RayTracer.s: raytrace/RayTracer.cpp.s
.PHONY : raytrace/RayTracer.s
# target to generate assembly for a file
raytrace/RayTracer.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/RayTracer.cpp.s
.PHONY : raytrace/RayTracer.cpp.s
raytrace/RenderEngine.o: raytrace/RenderEngine.cpp.o
.PHONY : raytrace/RenderEngine.o
# target to build an object file
raytrace/RenderEngine.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/RenderEngine.cpp.o
.PHONY : raytrace/RenderEngine.cpp.o
raytrace/RenderEngine.i: raytrace/RenderEngine.cpp.i
.PHONY : raytrace/RenderEngine.i
# target to preprocess a source file
raytrace/RenderEngine.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/RenderEngine.cpp.i
.PHONY : raytrace/RenderEngine.cpp.i
raytrace/RenderEngine.s: raytrace/RenderEngine.cpp.s
.PHONY : raytrace/RenderEngine.s
# target to generate assembly for a file
raytrace/RenderEngine.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/RenderEngine.cpp.s
.PHONY : raytrace/RenderEngine.cpp.s
raytrace/Scene.o: raytrace/Scene.cpp.o
.PHONY : raytrace/Scene.o
# target to build an object file
raytrace/Scene.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Scene.cpp.o
.PHONY : raytrace/Scene.cpp.o
raytrace/Scene.i: raytrace/Scene.cpp.i
.PHONY : raytrace/Scene.i
# target to preprocess a source file
raytrace/Scene.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Scene.cpp.i
.PHONY : raytrace/Scene.cpp.i
raytrace/Scene.s: raytrace/Scene.cpp.s
.PHONY : raytrace/Scene.s
# target to generate assembly for a file
raytrace/Scene.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Scene.cpp.s
.PHONY : raytrace/Scene.cpp.s
raytrace/Sphere.o: raytrace/Sphere.cpp.o
.PHONY : raytrace/Sphere.o
# target to build an object file
raytrace/Sphere.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Sphere.cpp.o
.PHONY : raytrace/Sphere.cpp.o
raytrace/Sphere.i: raytrace/Sphere.cpp.i
.PHONY : raytrace/Sphere.i
# target to preprocess a source file
raytrace/Sphere.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Sphere.cpp.i
.PHONY : raytrace/Sphere.cpp.i
raytrace/Sphere.s: raytrace/Sphere.cpp.s
.PHONY : raytrace/Sphere.s
# target to generate assembly for a file
raytrace/Sphere.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Sphere.cpp.s
.PHONY : raytrace/Sphere.cpp.s
raytrace/SphereTexture.o: raytrace/SphereTexture.cpp.o
.PHONY : raytrace/SphereTexture.o
# target to build an object file
raytrace/SphereTexture.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/SphereTexture.cpp.o
.PHONY : raytrace/SphereTexture.cpp.o
raytrace/SphereTexture.i: raytrace/SphereTexture.cpp.i
.PHONY : raytrace/SphereTexture.i
# target to preprocess a source file
raytrace/SphereTexture.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/SphereTexture.cpp.i
.PHONY : raytrace/SphereTexture.cpp.i
raytrace/SphereTexture.s: raytrace/SphereTexture.cpp.s
.PHONY : raytrace/SphereTexture.s
# target to generate assembly for a file
raytrace/SphereTexture.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/SphereTexture.cpp.s
.PHONY : raytrace/SphereTexture.cpp.s
raytrace/Texture.o: raytrace/Texture.cpp.o
.PHONY : raytrace/Texture.o
# target to build an object file
raytrace/Texture.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Texture.cpp.o
.PHONY : raytrace/Texture.cpp.o
raytrace/Texture.i: raytrace/Texture.cpp.i
.PHONY : raytrace/Texture.i
# target to preprocess a source file
raytrace/Texture.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Texture.cpp.i
.PHONY : raytrace/Texture.cpp.i
raytrace/Texture.s: raytrace/Texture.cpp.s
.PHONY : raytrace/Texture.s
# target to generate assembly for a file
raytrace/Texture.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Texture.cpp.s
.PHONY : raytrace/Texture.cpp.s
raytrace/Textured.o: raytrace/Textured.cpp.o
.PHONY : raytrace/Textured.o
# target to build an object file
raytrace/Textured.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Textured.cpp.o
.PHONY : raytrace/Textured.cpp.o
raytrace/Textured.i: raytrace/Textured.cpp.i
.PHONY : raytrace/Textured.i
# target to preprocess a source file
raytrace/Textured.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Textured.cpp.i
.PHONY : raytrace/Textured.cpp.i
raytrace/Textured.s: raytrace/Textured.cpp.s
.PHONY : raytrace/Textured.s
# target to generate assembly for a file
raytrace/Textured.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Textured.cpp.s
.PHONY : raytrace/Textured.cpp.s
raytrace/Transparent.o: raytrace/Transparent.cpp.o
.PHONY : raytrace/Transparent.o
# target to build an object file
raytrace/Transparent.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Transparent.cpp.o
.PHONY : raytrace/Transparent.cpp.o
raytrace/Transparent.i: raytrace/Transparent.cpp.i
.PHONY : raytrace/Transparent.i
# target to preprocess a source file
raytrace/Transparent.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Transparent.cpp.i
.PHONY : raytrace/Transparent.cpp.i
raytrace/Transparent.s: raytrace/Transparent.cpp.s
.PHONY : raytrace/Transparent.s
# target to generate assembly for a file
raytrace/Transparent.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Transparent.cpp.s
.PHONY : raytrace/Transparent.cpp.s
raytrace/TriMesh.o: raytrace/TriMesh.cpp.o
.PHONY : raytrace/TriMesh.o
# target to build an object file
raytrace/TriMesh.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/TriMesh.cpp.o
.PHONY : raytrace/TriMesh.cpp.o
raytrace/TriMesh.i: raytrace/TriMesh.cpp.i
.PHONY : raytrace/TriMesh.i
# target to preprocess a source file
raytrace/TriMesh.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/TriMesh.cpp.i
.PHONY : raytrace/TriMesh.cpp.i
raytrace/TriMesh.s: raytrace/TriMesh.cpp.s
.PHONY : raytrace/TriMesh.s
# target to generate assembly for a file
raytrace/TriMesh.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/TriMesh.cpp.s
.PHONY : raytrace/TriMesh.cpp.s
raytrace/Triangle.o: raytrace/Triangle.cpp.o
.PHONY : raytrace/Triangle.o
# target to build an object file
raytrace/Triangle.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Triangle.cpp.o
.PHONY : raytrace/Triangle.cpp.o
raytrace/Triangle.i: raytrace/Triangle.cpp.i
.PHONY : raytrace/Triangle.i
# target to preprocess a source file
raytrace/Triangle.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Triangle.cpp.i
.PHONY : raytrace/Triangle.cpp.i
raytrace/Triangle.s: raytrace/Triangle.cpp.s
.PHONY : raytrace/Triangle.s
# target to generate assembly for a file
raytrace/Triangle.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Triangle.cpp.s
.PHONY : raytrace/Triangle.cpp.s
raytrace/Volume.o: raytrace/Volume.cpp.o
.PHONY : raytrace/Volume.o
# target to build an object file
raytrace/Volume.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Volume.cpp.o
.PHONY : raytrace/Volume.cpp.o
raytrace/Volume.i: raytrace/Volume.cpp.i
.PHONY : raytrace/Volume.i
# target to preprocess a source file
raytrace/Volume.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Volume.cpp.i
.PHONY : raytrace/Volume.cpp.i
raytrace/Volume.s: raytrace/Volume.cpp.s
.PHONY : raytrace/Volume.s
# target to generate assembly for a file
raytrace/Volume.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/Volume.cpp.s
.PHONY : raytrace/Volume.cpp.s
raytrace/obj_load.o: raytrace/obj_load.cpp.o
.PHONY : raytrace/obj_load.o
# target to build an object file
raytrace/obj_load.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/obj_load.cpp.o
.PHONY : raytrace/obj_load.cpp.o
raytrace/obj_load.i: raytrace/obj_load.cpp.i
.PHONY : raytrace/obj_load.i
# target to preprocess a source file
raytrace/obj_load.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/obj_load.cpp.i
.PHONY : raytrace/obj_load.cpp.i
raytrace/obj_load.s: raytrace/obj_load.cpp.s
.PHONY : raytrace/obj_load.s
# target to generate assembly for a file
raytrace/obj_load.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/obj_load.cpp.s
.PHONY : raytrace/obj_load.cpp.s
raytrace/raytrace.o: raytrace/raytrace.cpp.o
.PHONY : raytrace/raytrace.o
# target to build an object file
raytrace/raytrace.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/raytrace.cpp.o
.PHONY : raytrace/raytrace.cpp.o
raytrace/raytrace.i: raytrace/raytrace.cpp.i
.PHONY : raytrace/raytrace.i
# target to preprocess a source file
raytrace/raytrace.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/raytrace.cpp.i
.PHONY : raytrace/raytrace.cpp.i
raytrace/raytrace.s: raytrace/raytrace.cpp.s
.PHONY : raytrace/raytrace.s
# target to generate assembly for a file
raytrace/raytrace.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/raytrace.cpp.s
.PHONY : raytrace/raytrace.cpp.s
raytrace/string_utils.o: raytrace/string_utils.cpp.o
.PHONY : raytrace/string_utils.o
# target to build an object file
raytrace/string_utils.cpp.o:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/string_utils.cpp.o
.PHONY : raytrace/string_utils.cpp.o
raytrace/string_utils.i: raytrace/string_utils.cpp.i
.PHONY : raytrace/string_utils.i
# target to preprocess a source file
raytrace/string_utils.cpp.i:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/string_utils.cpp.i
.PHONY : raytrace/string_utils.cpp.i
raytrace/string_utils.s: raytrace/string_utils.cpp.s
.PHONY : raytrace/string_utils.s
# target to generate assembly for a file
raytrace/string_utils.cpp.s:
$(MAKE) -f CMakeFiles/raytrace.dir/build.make CMakeFiles/raytrace.dir/raytrace/string_utils.cpp.s
.PHONY : raytrace/string_utils.cpp.s
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... SOIL"
@echo "... edit_cache"
@echo "... raytrace"
@echo "... rebuild_cache"
@echo "... SOIL/SOIL.o"
@echo "... SOIL/SOIL.i"
@echo "... SOIL/SOIL.s"
@echo "... SOIL/image_DXT.o"
@echo "... SOIL/image_DXT.i"
@echo "... SOIL/image_DXT.s"
@echo "... SOIL/image_helper.o"
@echo "... SOIL/image_helper.i"
@echo "... SOIL/image_helper.s"
@echo "... SOIL/stb_image.o"
@echo "... SOIL/stb_image.i"
@echo "... SOIL/stb_image.s"
@echo "... SOIL/stb_image_write.o"
@echo "... SOIL/stb_image_write.i"
@echo "... SOIL/stb_image_write.s"
@echo "... raytrace/Accelerator.o"
@echo "... raytrace/Accelerator.i"
@echo "... raytrace/Accelerator.s"
@echo "... raytrace/AreaLight.o"
@echo "... raytrace/AreaLight.i"
@echo "... raytrace/AreaLight.s"
@echo "... raytrace/BspTree.o"
@echo "... raytrace/BspTree.i"
@echo "... raytrace/BspTree.s"
@echo "... raytrace/Directional.o"
@echo "... raytrace/Directional.i"
@echo "... raytrace/Directional.s"
@echo "... raytrace/Gamma.o"
@echo "... raytrace/Gamma.i"
@echo "... raytrace/Gamma.s"
@echo "... raytrace/Glossy.o"
@echo "... raytrace/Glossy.i"
@echo "... raytrace/Glossy.s"
@echo "... raytrace/GlossyVolume.o"
@echo "... raytrace/GlossyVolume.i"
@echo "... raytrace/GlossyVolume.s"
@echo "... raytrace/HDRTexture.o"
@echo "... raytrace/HDRTexture.i"
@echo "... raytrace/HDRTexture.s"
@echo "... raytrace/InvSphereMap.o"
@echo "... raytrace/InvSphereMap.i"
@echo "... raytrace/InvSphereMap.s"
@echo "... raytrace/Lambertian.o"
@echo "... raytrace/Lambertian.i"
@echo "... raytrace/Lambertian.s"
@echo "... raytrace/Mirror.o"
@echo "... raytrace/Mirror.i"
@echo "... raytrace/Mirror.s"
@echo "... raytrace/ParticleTracer.o"
@echo "... raytrace/ParticleTracer.i"
@echo "... raytrace/ParticleTracer.s"
@echo "... raytrace/Phong.o"
@echo "... raytrace/Phong.i"
@echo "... raytrace/Phong.s"
@echo "... raytrace/PhotonCaustics.o"
@echo "... raytrace/PhotonCaustics.i"
@echo "... raytrace/PhotonCaustics.s"
@echo "... raytrace/Plane.o"
@echo "... raytrace/Plane.i"
@echo "... raytrace/Plane.s"
@echo "... raytrace/PointLight.o"
@echo "... raytrace/PointLight.i"
@echo "... raytrace/PointLight.s"
@echo "... raytrace/Randomizer.o"
@echo "... raytrace/Randomizer.i"
@echo "... raytrace/Randomizer.s"
@echo "... raytrace/RayCaster.o"
@echo "... raytrace/RayCaster.i"
@echo "... raytrace/RayCaster.s"
@echo "... raytrace/RayTracer.o"
@echo "... raytrace/RayTracer.i"
@echo "... raytrace/RayTracer.s"
@echo "... raytrace/RenderEngine.o"
@echo "... raytrace/RenderEngine.i"
@echo "... raytrace/RenderEngine.s"
@echo "... raytrace/Scene.o"
@echo "... raytrace/Scene.i"
@echo "... raytrace/Scene.s"
@echo "... raytrace/Sphere.o"
@echo "... raytrace/Sphere.i"
@echo "... raytrace/Sphere.s"
@echo "... raytrace/SphereTexture.o"
@echo "... raytrace/SphereTexture.i"
@echo "... raytrace/SphereTexture.s"
@echo "... raytrace/Texture.o"
@echo "... raytrace/Texture.i"
@echo "... raytrace/Texture.s"
@echo "... raytrace/Textured.o"
@echo "... raytrace/Textured.i"
@echo "... raytrace/Textured.s"
@echo "... raytrace/Transparent.o"
@echo "... raytrace/Transparent.i"
@echo "... raytrace/Transparent.s"
@echo "... raytrace/TriMesh.o"
@echo "... raytrace/TriMesh.i"
@echo "... raytrace/TriMesh.s"
@echo "... raytrace/Triangle.o"
@echo "... raytrace/Triangle.i"
@echo "... raytrace/Triangle.s"
@echo "... raytrace/Volume.o"
@echo "... raytrace/Volume.i"
@echo "... raytrace/Volume.s"
@echo "... raytrace/obj_load.o"
@echo "... raytrace/obj_load.i"
@echo "... raytrace/obj_load.s"
@echo "... raytrace/raytrace.o"
@echo "... raytrace/raytrace.i"
@echo "... raytrace/raytrace.s"
@echo "... raytrace/string_utils.o"
@echo "... raytrace/string_utils.i"
@echo "... raytrace/string_utils.s"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system
<file_sep>/configuration.h
#ifndef CONFIGURATIOM_H
#define CONFIGURATIOM_H
#include <string>
std::string const models_path = "/home/morten/uni/rendering_dtu/models/";
//CONFIGURATIOM_H
#endif
|
6da3740464cfcc95b095d769974876eb8faf716d
|
[
"Makefile",
"CMake",
"C++"
] | 6
|
C++
|
thorlund/rendering
|
648633722d7685f4a2c939595e96d79d34cba344
|
8e46b9f11e6c88eb105dfaf9b35ce3c8ca9588f7
|
refs/heads/master
|
<repo_name>AlanSosaITT/Poo2019<file_sep>/Cambio/Cambio/Operaciones.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cambio
{
class Operaciones
{
public void Bienvenido()
{
Data d = new Data();
int total = 0;
int pesos = 0;
int centavos = 0;
d.Convertir(total, out pesos, out centavos);
Console.WriteLine("Pesos: {0}",pesos);
Console.WriteLine("Centavos: {0}",centavos);
}
}
}
<file_sep>/Sumar_Sobrecarga/Sumar_Sobrecarga/Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sumar_Sobrecarga
{
class Program
{
static void Main(string[] args)
{
Operaciones p = new Operaciones();
Datos o = new Datos();
p.Obtener_datos();
Console.ReadKey();
}
}
}
<file_sep>/Practica_25_09_19_2/Practica_25_09_19_2/Data.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_25_09_19_2
{
class Data
{
private double ladoa;
private double ladob;
private double ladoc;
public double Ladoa
{
get { return ladoa; }
set { ladoa = value; }
}
public double Ladob
{
get { return ladob; }
set { ladob = value; }
}
public double Ladoc
{
get { return ladoc; }
set { ladoc = value; }
}
public double Area(double x)
{
x *= x;
return x;
}
public double Area(double x,double y)
{
x = x * y;
return x;
}
public double Area(double x,double y, double z)
{
x = (x * y) / z;
return x;
}
}
}
<file_sep>/E03_Sosa_Lopez_Alan_Manuel_18_10_2019/E03_Sosa_Lopez_Alan_Manuel_18_10_2019/Usuario.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace E03_Sosa_Lopez_Alan_Manuel_18_10_2019
{
public class Usuario
{
//Declaracion e incapsulacion de variables
public int ID { get; set; }
public string Nombre { get; set; }
public List<Tarea> tareas = new List<Tarea>();
}
}
<file_sep>/Practica_14_11_2019_Exceptions/Practica_14_11_2019_Exceptions/Specialexception.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_14_11_2019_Exceptions
{
public class Specialexception:ApplicationException
{
public Specialexception()
{
}
public Specialexception(string msg):base(msg)
{
}
}
}
<file_sep>/Practica_10_10_2019_Geometricos_Vol2/Practica_10_10_2019_Geometricos_Vol2/Figura.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_10_10_2019_Geometricos_Vol2
{
public class Figura
{
public int Lado { get; set; }
public double CalcularArea(Cuadrado c)
{
double res = 0;
res = c.Lado*c.Lado;
return res;
}
public double CalcularArea(Rectangulo r,string msg)
{
double res = 0;
res = r.Lado*r.Altura;
return res;
}
}
}
<file_sep>/Practica_29_10_2019_Cocina/Practica_29_10_2019_Cocina/Platillo.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_29_10_2019_Cocina
{
public class Platillo
{
public int ID { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public double Price { get; set; }
}
interface Imenu
{
void Create_menu();
void List_menu();
void Details();
}
}
<file_sep>/Praxtica_04_11_2019_Autenticacion/Praxtica_04_11_2019_Autenticacion/Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Praxtica_04_11_2019_Autenticacion
{
class Program
{
static void Main(string[] args)
{
Register r = new Register();
Console.WriteLine("Bienvenido al Login!");
int ciclo = 1;
while (ciclo == 1)
{
Console.Write("Registrarse(1), Ingresar(2): ");
switch (Console.ReadLine())
{
case "1":
User p = new User();
Console.Write("Ingrese su nombre: ");
p.Name = Console.ReadLine();
Console.Write("Ingrese su nombre de usuario: ");
p.Username = Console.ReadLine();
Console.Write("Ingrese su Contraseña: ");
p.Password = Console.ReadLine();
string ruta = "Datos.txt";
r.Register_user(p, ruta);
break;
case "2":
int opcciclo = 1;
while (opcciclo == 1)
{
Console.Write("Ingrese su nombre de ususario: ");
string nameopc = Console.ReadLine();
foreach (var xdxd in r.users)
{
if (nameopc == xdxd.Username)
{
int opc = 1;
while (opc == 1)
{
Console.Write("Ingrese su contraseña: ");
if (Console.ReadLine() == xdxd.Password)
{
Console.WriteLine("Bienvenido {0}", xdxd.Name);
Console.ReadKey();
opc = 2;
}
else
{
Console.WriteLine("Incorrecto intente de nuevo");
}
}
opcciclo = 2;
break;
}
}
}
break;
}
Console.Write("Desea realizar otra operacion?, Si(1), No(2): ");
ciclo = Convert.ToInt32(Console.ReadLine());
}Console.ReadKey();
}
}
}
<file_sep>/E05_Sosa_lopez_Alan_Manuel_To_do_list/E05_Sosa_lopez_Alan_Manuel_To_do_list/Tarea.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace E05_Sosa_lopez_Alan_Manuel_To_do_list
{
public class Tarea
{
public Usuario usuario { get; set; }
public int ID { get; set; }
public string Nombre { get; set; }
public string Descripcion { get; set; }
public string Horario { get; set; }
public string Estatus { get; set; }
}
}
<file_sep>/Practica_08_10_2019_Conversor/Practica_08_10_2019_Conversor/Unidades.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_08_10_2019_Conversor
{
class Unidades
{
//Declaracion y encapsulado
public double Metro { get; set; }
//Metodos para conversion de cada unidad
public double Conversion_M_P(double x, out double total)
{
total = (x * 100)/2.54;
return total;
}
public double Conversion_M_C(double x, out double total)
{
total = x *100;
return total;
}
public double Pulgada { get; set; }
public double Conversion_P_M(double x, out double total)
{
total = x*.0254 ;
return total;
}
public double Conversion_P_C(double x, out double total)
{
total = x *2.54;
return total;
}
public double centimetro { get; set; }
public double Conversion_C_M(double x, out double total)
{
total = x /100;
return total;
}
public double Conversion_C_P(double x, out double total)
{
total = x / 2.54;
return total;
}
}
}
<file_sep>/E05_Sosa_lopez_Alan_Manuel_To_do_list/E05_Sosa_lopez_Alan_Manuel_To_do_list/Agregartarea.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace E05_Sosa_lopez_Alan_Manuel_To_do_list
{
public partial class Agregartarea : MetroFramework.Forms.MetroForm
{
public Form1 form1;
public Agregartarea()
{
InitializeComponent();
}
Usuario usuario;
public void Combobox()
{
}
private void Agregartarea_Load(object sender, EventArgs e)
{
MCBATusuario.DataSource = form1.repo.usuarios;
MCBATusuario.DisplayMember = "Nombre";
MCBATusuario.ValueMember = "ID";
}
private void MBAUcancelar_Click(object sender, EventArgs e)
{
form1.Show();
this.Hide();
}
private void MCBATusuario_SelectedValueChanged(object sender, EventArgs e)
{
}
private void MBAUA_Click(object sender, EventArgs e)
{
//Excepcion
try
{
int id = Convert.ToInt32(MTBATid.Text);
string nombre = MTBATnombre.Text;
string descripcion = MTBATdescripcion.Text;
string horario = MTBAThorario.Text;
//Metodo para agregado de una tarea
form1.repo.Agregar_tarea(usuario, id, nombre, descripcion, horario);
MTBATdescripcion.Text = "";
MTBAThorario.Text = "";
MTBATid.Text = "";
MTBATnombre.Text = "";
}
catch
{
MessageBox.Show("Verifique sus campos porfavor!");
}
}
private void MCBATusuario_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void MCBATusuario_SelectedIndexChanged_1(object sender, EventArgs e)
{
//Metodo para la seleccion del usuario a agregar tarea
string username = MCBATusuario.Text;
usuario = form1.repo.usuarios.FirstOrDefault(f => f.Nombre == username);
}
private void MetroLabel3_Click(object sender, EventArgs e)
{
}
}
}
<file_sep>/E05_Sosa_lopez_Alan_Manuel_To_do_list/E05_Sosa_lopez_Alan_Manuel_To_do_list/Agregar.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace E05_Sosa_lopez_Alan_Manuel_To_do_list
{
public partial class Agregar : MetroFramework.Forms.MetroForm
{
public Form1 form1;
public Agregar()
{
InitializeComponent();
}
private void Agregar_Load(object sender, EventArgs e)
{
}
private void MBAgregarcancelar_Click(object sender, EventArgs e)
{
//Abre la forma principal
form1.Comboagregar();
form1.Show();
this.Hide();
}
private void MBAgregaragregar_Click(object sender, EventArgs e)
{
//Excepcion
try
{
//Agregado de nuevo usuario
int id = Convert.ToInt32(MTBAgregarid.Text);
string nombre = MTBAgregarnombre.Text;
form1.repo.Agregar_usuario(id, nombre);
}
catch
{
MessageBox.Show("Verifique sus datos porfavor!");
}
}
}
}
<file_sep>/Praxtica_04_11_2019_Autenticacion/Praxtica_04_11_2019_Autenticacion/Register.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace Praxtica_04_11_2019_Autenticacion
{
public class Register
{
public List<User> users = new List<User>();
public void Register_user(User user, string Path)
{
users.Add(user);
int desea = 1;
Console.Write("Desea ver algun usuario?, Si(1), No(2): ");
desea = Convert.ToInt32(Console.ReadLine());
if (desea == 1)
{
Write_user(Path);
}
}
public void Write_user(string Path)
{
Console.Write("Que usuario desea ver?, ingrese su Nombre de usuario: ");
string deseado = Console.ReadLine();
foreach(var xdxd in users)
{
if (deseado == xdxd.Username)
{
var data = "Nombre: "+xdxd.Name + "\n" +"Contraseña: "+ xdxd.Password + "\n" +"Nombre de usuario: "+ xdxd.Username;
File.WriteAllText(Path, data);
}
}
}
}
}
<file_sep>/Practica_14_11_2019_Exceptions/Practica_14_11_2019_Exceptions/Form1.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Practica_14_11_2019_Exceptions
{
public partial class Form1 : Form
{
List<Alumno> alumnos = new List<Alumno>();
public Form1()
{
InitializeComponent();
}
private void Baceptar_Click(object sender, EventArgs e)
{
if (TBMatricula.Text == "")
{
EP.SetError(TBMatricula, "No ingreso matricula");
}
if (TBNombre.Text == "")
{
EP.SetError(TBNombre, "No ingreso nombre");
}
if (TBCarrera.Text == "")
{
EP.SetError(TBCarrera, "No ingreso carrera");
}
if (TBSemestre.Text == "")
{
EP.SetError(TBSemestre, "No ingreso semestre");
}
if (TBTelefono.Text == "")
{
EP.SetError(TBTelefono, "No ingreso telefono");
}
try
{
Alumno alumno = new Alumno();
alumno.Matricula = Convert.ToInt32(TBMatricula.Text);
alumno.Nombre = TBNombre.Text;
alumno.Semestre=Convert.ToInt32(TBSemestre.Text);
alumno.Carrera = TBCarrera.Text;
alumno.Telefono = Convert.ToInt32(TBTelefono.Text);
alumnos.Add(alumno);
throw new Specialexception("Su alumno se creo exitosamente");
}
catch(FormatException r)
{
MessageBox.Show("Error en registracion "+r.Message);
}
catch(Specialexception espr)
{
MessageBox.Show(espr.Message);
}
finally
{
EP.Clear();
}
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void TBCalificacion_TextChanged(object sender, EventArgs e)
{
}
private void TBCalificacion_Validating(object sender, CancelEventArgs e)
{
try
{
int cal = Convert.ToInt32(TBCalificacion.Text);
if (cal <1 || cal > 10)
{
MessageBox.Show("Ingrese una calificacion del 1 al 10");
}
}
catch (Exception r)
{
MessageBox.Show("Error en la entrada de datos","Error",MessageBoxButtons.YesNo, MessageBoxIcon.Error);
}
}
}
}
<file_sep>/Practica_21_11_2019_Errores/Practica_21_11_2019_Errores/Estudiante.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_21_11_2019_Errores
{
public class Estudiante
{
public int ID { get; set; }
public string Nombre { get; set; }
public string Carrera { get; set; }
public int Semestre { get; set; }
}
}
<file_sep>/Practica_25_09_19_2/Practica_25_09_19_2/Operaciones.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_25_09_19_2
{
class Operaciones
{
public void Bienvenido()
{
Data d = new Data();
Console.WriteLine("Bienvenido a mi programa!, que desea calculatr?, Cuadrado(1), Rectangulo(2), Triangulo (3)");
int opc = 0;
opc = Convert.ToInt16(Console.ReadLine());
if (opc == 1)
{
Console.WriteLine("Ingrese el lado del cuadrado: ");
double lado = 0;
double total = 0;
lado = Convert.ToDouble(Console.ReadLine());
total=(d.Area(lado));
Console.WriteLine("Area: {0}",total);
}
if (opc == 2)
{
Console.WriteLine("Ingrese el lado 1 del Rectangulo: ");
double lado = 0;
lado = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Ingrese el lado 2 del Rectangulo: ");
double lado2 = 0;
lado2 = Convert.ToDouble(Console.ReadLine());
double total = 0;
total = (d.Area(lado, lado2));
Console.WriteLine("Area: {0}", total);
}
if (opc == 3)
{
Console.WriteLine("Ingrese la base del Triangulo: ");
double lado = 0;
lado = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Ingrese la altura del Triangulo: ");
double lado2 = 0;
double division = 2;
lado2 = Convert.ToDouble(Console.ReadLine());
double total = 0;
total = (d.Area(lado, lado2,division));
Console.WriteLine("Area: {0}", total);
}
}
}
}
<file_sep>/Calculadora/Calculadora/Data.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Calculadora
{
class Data
{
private double num1;
private double num2;
private double num3;
public double Num1
{
get { return num1; }
set { num1 = value; }
}
public double Num2
{
get { return num2; }
set { num2 = value; }
}
public double Num3
{
get { return num3; }
set { num3 = value; }
}
}
}
<file_sep>/E03_Sosa_Lopez_Alan_Manuel_18_10_2019/E03_Sosa_Lopez_Alan_Manuel_18_10_2019/Dato.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace E03_Sosa_Lopez_Alan_Manuel_18_10_2019
{
public class Dato
{
public List<Usuario> usuarios = new List<Usuario>();
public void Agregar_usuario(int ID2, string Nombre2)
{
//Agregamos un objeto nuevo a la lista
usuarios.Add(new Usuario { ID = ID2, Nombre = Nombre2 });
}
//Declaracion del metodo a utilizar, recibe 6 parametros mismos con los que trabaja, la funcion find busca un objeto con el parametro que le a sido enviado posteriormente
public void Agregar_tarea(Usuario u,int ID1, string Nombre1, string Descripcion1, string Horario1, DateTime Vencimiento1)
{
usuarios.Find(f => f.ID == u.ID).tareas.Add(new Tarea { usuario = u, ID = ID1, Nombre = Nombre1, Descripcion = Descripcion1, Horario = Horario1, Vencimiento = Vencimiento1, Estatus="Pendiente"});
}
}
}
<file_sep>/E03_Sosa_Lopez_Alan_Manuel_18_10_2019/E03_Sosa_Lopez_Alan_Manuel_18_10_2019/Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace E03_Sosa_Lopez_Alan_Manuel_18_10_2019
{
class Program
{
static void Main(string[] args)
{
//Declaracion de cla clase para poner usar sus metodos.
RepoTarea repo = new RepoTarea();
repo.Bienvenido();
Console.WriteLine("Hasta la proximaaaaaaa");
Console.ReadKey();
}
}
}
<file_sep>/Practica_29_10_2019_Cocina/Practica_29_10_2019_Cocina/Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_29_10_2019_Cocina
{
class Program
{
static void Main(string[] args)
{
Menu m = new Menu();
m.Welcome();
Console.WriteLine("Hasta luego!");
Console.ReadKey();
}
public static void Bienvenida()
{
}
}
}
<file_sep>/Practica_29_10_2019_Cocina/Practica_29_10_2019_Cocina/Menu.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_29_10_2019_Cocina
{
public class Menu : Platillo, Imenu
{
List<Platillo> platillos = new List<Platillo>();
public void Welcome()
{
int seguir = 1;
Console.WriteLine("Bienvenido a la cocina!, Primero agreguemos platillos al menu");
Create_menu();
Console.Write("Excelente!, ");
while (seguir == 1)
{
Console.Write("Que desea realizar ahora?\n(1)Agregar platillo\n(2)Listar los platillos\n: ");
switch (Console.ReadLine())
{
case "1":
Create_menu();
break;
case "2":
List_menu();
break;
default:
break;
}
Console.Write("Desea reaizar otra accion?, Si(1), No(2): ");
seguir = Convert.ToInt32(Console.ReadLine());
}
}
public void Create_menu()
{
int add = 1;
while (add == 1)
{
Platillo p = new Platillo();
Console.Write("Ingrese el ID del platillo: ");
p.ID = Convert.ToInt32(Console.ReadLine());
Console.Write("Ingrese el Nombre del Platillo: ");
p.Name = Console.ReadLine();
Console.Write("Ingrese la descripcion del platillo: ");
p.Description = Console.ReadLine();
Console.Write("Ingrese el precio del platillo: ");
p.Price = Convert.ToDouble(Console.ReadLine());
platillos.Add(p);
Console.Write("Desea agregar otro platillo?, Si(1), No(2): ");
add = Convert.ToInt32(Console.ReadLine());
Console.Clear();
}
}
public void Details()
{
Console.Write("Ingrese el ID del platillo que desea observar: ");
int IDopcion = Convert.ToInt32(Console.ReadLine());
foreach(var opcion in platillos)
{
if (opcion.ID == IDopcion)
{
Console.WriteLine("ID: {0}",opcion.ID);
Console.WriteLine("Nombre: {0}", opcion.Name);
Console.WriteLine("Descripcion: {0}", opcion.Description);
Console.WriteLine("Precio: {0}", opcion.Price);
}
}
}
public void List_menu()
{
foreach(var cantidad in platillos)
{
Console.WriteLine("ID: {0}",cantidad.ID);
Console.WriteLine("Nombre: {0}",cantidad.Name);
}
Console.Write("Desea ver los detalles de un platillo?, Si(1), No(2)");
switch (Console.ReadLine())
{
case "1":
Details();
break;
case "2":
break;
}
}
}
}
<file_sep>/Practica_08_10_2019_Conversor/Practica_08_10_2019_Conversor/Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_08_10_2019_Conversor
{
class Program
{
static void Main(string[] args)
{
//Instasiado de la clase
Repo p = new Repo();
//Llamada del metodo de la clase ya declarada
p.Bienvenido();
Console.ReadKey();
}
}
}
<file_sep>/Practica_10_10_2019_Geometricos_Vol2/Practica_10_10_2019_Geometricos_Vol2/Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_10_10_2019_Geometricos_Vol2
{
class Program
{
static void Main(string[] args)
{
Cuadrado c = new Cuadrado();
Rectangulo r = new Rectangulo();
r.Altura = 25;
r.Lado = 10;
c.Lado = 35;
var cArea=c.CalcularArea(c);
var rArea = r.CalcularArea(r,"Osi Osi");
Console.WriteLine("Area del cuadrado: {0}",cArea);
Console.WriteLine("Area del rectangulo: {0}",rArea);
Console.ReadKey();
}
}
}
<file_sep>/Practica_26_11_2019_PractivaEvaluativa1/Practica_26_11_2019_PractivaEvaluativa1/Operacion.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace Practica_26_11_2019_PractivaEvaluativa1
{
public class Operacion
{
int id = 0;
List<Persona> personas = new List<Persona>();
public void ObtenerPersona()
{
int opc = 1;
while (opc == 1)
{
try
{
Persona p = new Persona();
id = id + 1;
p.ID = id;
Console.WriteLine("ID: " + id);
Console.Write("Ingrese su Nombre: ");
p.Nombre = Console.ReadLine();
Console.Write("Ingrese su Profesion: ");
p.Profesion = Console.ReadLine();
Console.Write("Ingrese su Edad: ");
p.Edad = Convert.ToInt32(Console.ReadLine());
personas.Add(p);
List<string> lineas = ObtenerLineas(p);
imprimir(p, lineas);
opc = 2;
}
catch
{
Console.WriteLine("Error, Formato incorrecto, ingrese los datos de nuevo porfavor");
}
}
}
public List<string> ObtenerLineas(Persona p)
{
List<string> lineas = new List<string>();
lineas.Add("ID: "+p.ID);
lineas.Add("Nombre: " + p.Nombre);
lineas.Add("Profesion: " + p.Profesion);
lineas.Add("Edad: " + p.Edad);
return lineas;
}
public void Menu()
{
int opcciclo = 1;
Console.WriteLine("Bienvenido!, Ingrese un Alumno porfavor");
ObtenerPersona();
while (opcciclo == 1)
{
Console.Write("Desea agregar otro usuario?, Si(1), No(2): ");
switch (Console.ReadLine())
{
case "1":
ObtenerPersona();
break;
case "2":
opcciclo = 2;
break;
}
}
Console.Write("Ingrese el ID del alumno que desea buscar: ");
int id = Convert.ToInt32(Console.ReadLine());
BuscarPersona(id);
}
public void BuscarPersona(int id)
{
Persona per = new Persona();
foreach(var elegido in personas)
{
if (id == elegido.ID)
{
per = elegido;
break;
}
}
var lineas=ObtenerLineas(per);
Console.WriteLine("Su formato se a impreso en Datos.txt");
imprimir(per, lineas);
}
public void imprimir(Persona p,List<string> lineas)
{
File.WriteAllLines("Datos.txt", lineas);
}
}
}
<file_sep>/Practica_24_09_2019_Sobrecarga1/Practica_24_09_2019_Sobrecarga1/Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_24_09_2019_Sobrecarga1
{
class Program
{
static void Main(string[] args)
{
//Instanciasion de la clase Datos, que contiene el Metodo
Datos o = new Datos();
//Llamada del metodo
o.Obtener_datos();
Console.ReadKey();
}
}
}
<file_sep>/Calculadora/Calculadora/Operaciones.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Calculadora
{
class Operaciones
{
public double Sumar(double nume1,double nume2)
{
double res = nume1+nume2;
return res;
}
public double Sumar(double nume1,double nume2, double nume3)
{
double res = nume1+nume2+nume3;
return res;
}
public double Restar(double nume1,double nume2)
{
double res = nume1-nume2;
return res;
}
public double Restar(double nume1,double nume2, double nume3)
{
double res = nume1-nume2-nume3;
return res;
}
public double Multiplicar(double nume1,double nume2)
{
double res = nume1*nume2;
return res;
}
public double Multiplicar(double nume1,double nume2, double nume3)
{
double res = nume1*nume2*nume3;
return res;
}
public double Dividir(double nume1,double nume2)
{
double res = nume1/nume2;
return res;
}
public double Dividir(double nume1,double nume2, double nume3)
{
double res = nume1/nume2/nume3;
return res;
}
public void Bienvebido()
{
Console.WriteLine("Bienvenido a la calculadora!, que operacion desea realizar?, Sumar(1), Restar(2), Multiplicar(3), Dividir(4): ");
int opc = 0;
opc = Convert.ToInt32(Console.ReadLine());
if (opc == 1)
{
Console.WriteLine("Cuantos numero desea sumar(Minimo 2, Maximo 3)?: ");
int opc1 = 0;
double nume1 = 0;
double nume2 = 0;
double nume3 = 0;
opc1 = Convert.ToInt32(Console.ReadLine());
if (opc1 == 2)
{
Console.WriteLine("Ingrese el valor del numero 1: ");
nume1 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Ingrese el valor del numero 2: ");
nume2 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine(Sumar(nume1, nume2));
}
else if (opc1 == 3)
{
Console.WriteLine("Ingrese el valor del numero 1: ");
nume1 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Ingrese el valor del numero 2: ");
nume2 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Ingrese el valor del numero 3: ");
nume3 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine(Sumar(nume1, nume2, nume3));
}
}
else if (opc == 2)
{
Console.WriteLine("Cuantos numero desea restar(Minimo 2, Maximo 3)?: ");
int opc1 = 0;
double nume1 = 0;
double nume2 = 0;
double nume3 = 0;
opc1 = Convert.ToInt32(Console.ReadLine());
if (opc1 == 2)
{
Console.WriteLine("Ingrese el valor del numero 1: ");
nume1 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Ingrese el valor del numero 2: ");
nume2 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine(Restar(nume1, nume2));
}
else if (opc1 == 3)
{
Console.WriteLine("Ingrese el valor del numero 1: ");
nume1 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Ingrese el valor del numero 2: ");
nume2 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Ingrese el valor del numero 3: ");
nume3 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine(Restar(nume1, nume2, nume3));
}
}
else if (opc == 3)
{
Console.WriteLine("Cuantos numero desea Multiplicar(Minimo 2, Maximo 3)?: ");
int opc1 = 0;
double nume1 = 0;
double nume2 = 0;
double nume3 = 0;
opc1 = Convert.ToInt32(Console.ReadLine());
if (opc1 == 2)
{
Console.WriteLine("Ingrese el valor del numero 1: ");
nume1 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Ingrese el valor del numero 2: ");
nume2 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine(Multiplicar(nume1, nume2));
}
else if (opc1 == 3)
{
Console.WriteLine("Ingrese el valor del numero 1: ");
nume1 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Ingrese el valor del numero 2: ");
nume2 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Ingrese el valor del numero 3: ");
nume3 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine(Multiplicar(nume1, nume2,nume3));
}
}
else if (opc == 4)
{
Console.WriteLine("Cuantos numero desea Dividir(Maximo 3)?: ");
int opc1 = 0;
double nume1 = 0;
double nume2 = 0;
double nume3 = 0;
opc1 = Convert.ToInt32(Console.ReadLine());
if (opc1 == 2)
{
Console.WriteLine("Ingrese el valor del numero 1: ");
nume1 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Ingrese el valor del numero 2: ");
nume2 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine(Dividir(nume1, nume2));
}
else if (opc1 == 3)
{
Console.WriteLine("Ingrese el valor del numero 1: ");
nume1 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Ingrese el valor del numero 2: ");
nume2 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Ingrese el valor del numero 3: ");
nume3 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine(Dividir(nume1, nume2, nume3));
}
}
}
}
}
<file_sep>/README.md
# Poo2019
tareas
<file_sep>/Practica_21_11_2019_Errores/Practica_21_11_2019_Errores/Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_21_11_2019_Errores
{
class Program
{
static void Main(string[] args)
{
var estudiante = new List<Estudiante>();
var agregar = true;
while (agregar==true)
{
int ciclo = 1;
while (ciclo == 1)
{
var e = new Estudiante();
try
{
int opc = 1;
Console.WriteLine("Ingrese su Matricula: ");
bool result;
int matricula = 0;
while (opc == 1)
{
result = int.TryParse(Console.ReadLine(), result: out matricula);
if (result == false)
{
Console.Write("Igrese un numero porfavor: ");
}
else if (result == true)
{
e.ID = matricula;
opc = 2;
}
}
Console.WriteLine("Matricula: " + e.ID);
Console.WriteLine("Ingrese su Nombre: ");
e.Nombre = Console.ReadLine();
Console.WriteLine("Ingrese su Carrera: ");
e.Carrera = Console.ReadLine();
Console.WriteLine("Ingrese su Semestre: ");
e.Semestre = Convert.ToInt32(Console.ReadLine());
estudiante.Add(e);
ciclo = 2;
}
catch
{
Console.WriteLine("Error agregando el usuario intente nuevamente xdxd");
}
}
Console.Write("Desea agregar otro usuario?, Si(1), No(2): ");
if (Console.ReadLine() == "2")
{
agregar = false;
}
}
Console.WriteLine("Hasta la proxima");
Console.ReadLine();
}
}
}
<file_sep>/Practica_25_09_19_2/Practica_25_09_19_2/Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_25_09_19_2
{
class Program
{
static void Main(string[] args)
{
Operaciones p = new Operaciones();
p.Bienvenido();
Console.ReadKey();
}
}
}
<file_sep>/Practica_08_10_2019_Conversor/Practica_08_10_2019_Conversor/Repo.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_08_10_2019_Conversor
{
class Repo
{
public void Bienvenido()
{
//declaracion de variables globales a usar
int opc1 = 0;
double total = 0;
//Instansiacion de la clase Unidades (Contenedora de los metodos y datos a usar
Unidades u = new Unidades();
int opc = 0;
int opcf = 1;
//Ciclo While para volver a usar el programa si asi de desea
while(opcf==1)
{
//Limpiado de consola para mejor vizualicacion despues de reultilizar
Console.Clear();
//Pedida de Unidad a convertit
Console.WriteLine("Bienvenido al conversor de unidades!, Que unidad Desea ingresar?, Metro(1), Pulgada(2), Centimetro(3): ");
opc = Convert.ToInt32(Console.ReadLine());
//Switch para el caso de unidad que desea convertir
switch (opc)
{
case 1:
Console.Write("Ingrese la cantidad de metros: ");
//Asignacion de valor a la Varibale de la clase Unidades
u.Metro = Convert.ToDouble(Console.ReadLine());
Console.Write("A que unidad desea convertir?, Pulgadas(1), Centimetros(2): ");
opc1 = Convert.ToInt32(Console.ReadLine());
if (opc1 == 1)
{
//Uso de metodos De la clase Unidades
u.Conversion_M_P(u.Metro, out total);
Console.WriteLine("{0} Metros= {1} Pulgadas", u.Metro, total);
Console.Write("Desea Convertir otra cantidad?, Si(1), No(2): ");
opcf = Convert.ToInt32(Console.ReadLine());
}
else if (opc1 == 2)
{
u.Conversion_M_C(u.Metro, out total);
Console.WriteLine("{0} Metros= {1} Centimetros", u.Metro, total);
Console.Write("Desea Convertir otra cantidad?, Si(1), No(2): ");
opcf = Convert.ToInt32(Console.ReadLine());
}
break;
case 2:
Console.Write("Ingrese la cantidad de Pulgadas: ");
u.Pulgada = Convert.ToDouble(Console.ReadLine());
Console.Write("A que unidad desea convertir?, Metros(1), Centimetros(2): ");
opc1 = Convert.ToInt32(Console.ReadLine());
if (opc1 == 1)
{
u.Conversion_P_M(u.Pulgada, out total);
Console.WriteLine("{0} Pulgadas= {1} Metros", u.Metro, total);
Console.Write("Desea Convertir otra cantidad?, Si(1), No(2): ");
opcf = Convert.ToInt32(Console.ReadLine());
}
else if (opc1 == 2)
{
u.Conversion_P_C(u.Pulgada, out total);
Console.WriteLine("{0} Pulgadas= {1} Centimetros", u.Metro, total);
Console.Write("Desea Convertir otra cantidad?, Si(1), No(2): ");
opcf = Convert.ToInt32(Console.ReadLine());
}
break;
case 3:
Console.Write("Ingrese la cantidad de Centimetros: ");
u.centimetro = Convert.ToDouble(Console.ReadLine());
Console.Write("A que unidad desea convertir?, Metros(1), Pulhgadas(2): ");
opc1 = Convert.ToInt32(Console.ReadLine());
if (opc1 == 1)
{
u.Conversion_C_M(u.centimetro, out total);
Console.WriteLine("{0} Centimetros= {1} Metros", u.Metro, total);
Console.Write("Desea Convertir otra cantidad?, Si(1), No(2): ");
opcf = Convert.ToInt32(Console.ReadLine());
}
else if (opc1 == 2)
{
u.Conversion_C_P(u.centimetro, out total);
Console.WriteLine("{0} Centimetros= {1} Pulgadas", u.Metro, total);
Console.Write("Desea Convertir otra cantidad?, Si(1), No(2): ");
opcf = Convert.ToInt32(Console.ReadLine());
}
break;
}
}
}
}
}
<file_sep>/E05_Sosa_lopez_Alan_Manuel_To_do_list/E05_Sosa_lopez_Alan_Manuel_To_do_list/Form1.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace E05_Sosa_lopez_Alan_Manuel_To_do_list
{
public partial class Form1 : MetroFramework.Forms.MetroForm
{
public Repo repo=new Repo();
Usuario usuario;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
public void Comboagregar()
{//metodo para agregar a la lista de combobox los usuarios
MCBusuario.DataSource = repo.usuarios;
MCBusuario.DisplayMember = "Nombre";
MCBusuario.ValueMember = "ID";
}
private void MetroComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void MBAgregarusuario_Click(object sender, EventArgs e)
{
//Llamado de la forma que contiene el formulario de agregar usuario
Agregar agregar = new Agregar();
agregar.form1 = this;
agregar.Show();
this.Hide();
}
private void MTAgregartarea_Click(object sender, EventArgs e)
{
//Llamado de la forma que contiene el formulario para agregar tarea
Agregartarea agregartarea = new Agregartarea();
agregartarea.form1 = this;
agregartarea.Show();
this.Hide();
}
private void LBUsuario_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void MCBusuario_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void MetroButton1_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void Form1_Shown(object sender, EventArgs e)
{
}
private void MBVer_Click(object sender, EventArgs e)
{
//Metodo para seleccionar al usuario a mostar tareas
string username = MCBusuario.Text;
usuario = repo.usuarios.FirstOrDefault(f => f.Nombre == username);
DGV.DataSource = usuario.tareas;
}
}
}
<file_sep>/E03_Sosa_Lopez_Alan_Manuel_18_10_2019/E03_Sosa_Lopez_Alan_Manuel_18_10_2019/RepoTarea.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace E03_Sosa_Lopez_Alan_Manuel_18_10_2019
{
public class RepoTarea
{
public RepoTarea()
{
}
//Instanciamos la clase dato para utilizar sus contenidos
Dato dato = new Dato();
//creamos el metodo de bienvenida, mismo donde llamamos a los metodos
public void Bienvenido()
{
Console.WriteLine("Bienvendio al administrador de Que hacer!, Agregue un usuario porfavor!");
Agregar_usuario();
Menu();
}
//creacion de metodo
public void Observar_usuario()
{
int opcc = 1;
while (opcc == 1)
{
//capturamos el ID de el usuario a buscar
Console.Write("Que usuario desea ver?, Ingrese su ID: ");
int opcU;
opcU = Convert.ToInt32(Console.ReadLine());
Usuario p = new Usuario();
//uso del foreach para comparar cada elemento con su ID
foreach (var usuarios in dato.usuarios)
{
if (opcU == usuarios.ID)
{
//Asignamos un objeto nuevo al anterior asignado
p = usuarios;
break;
}
}
//imprimimos los datos
Console.WriteLine("Nombre: {0}", p.Nombre);
Console.WriteLine("ID: {0}", p.ID);
Console.WriteLine("Desea ver a otro usuario?, Si(1), No(2)");
opcc = Convert.ToInt32(Console.ReadLine());
if (opcc == 1)
{
Console.Clear();
}
}
}
public void Agregar_usuario()
{
int opc = 1;
while (opc == 1)
{
//Pedimos datos para hacer el metodo, mismo que nos pide parametros para realizarse
Console.Write("ID: ");
int ID = Convert.ToInt32(Console.ReadLine());
Console.Write("Nombre: ");
string Nombre = Console.ReadLine();
dato.Agregar_usuario(ID, Nombre);
Console.Write("Desea agregar otro usuario?\nSi(1)\nNo(2)\n: ");
opc = Convert.ToInt32(Console.ReadLine());
Console.Clear();
}
}
public void Agregar_tarea()
{
int opcb = 1;
while (opcb == 1)
{
Console.Write("A que usuario desea agregar una tarea?, Ingrese su ID: ");
int opcU;
opcU = Convert.ToInt32(Console.ReadLine());
Usuario p = new Usuario();
foreach (var usuarios in dato.usuarios)
{
if (opcU == usuarios.ID)
{
p = usuarios;
break;
}
}
int opca = 1;
while (opca == 1)
{
//Pedimos los datos para llenar en nuestra lista de tareas
Console.WriteLine("Ingrese los detalles porfavor!");
Console.Write("ID: ");
int id = Convert.ToInt32(Console.ReadLine());
Console.Write("Nombre: ");
string nombre = Console.ReadLine();
Console.Write("Descripcion: ");
string descripcion = Console.ReadLine();
Console.Write("Horario: ");
string horario = Console.ReadLine();
Console.Write("Vencimiento(Dia / Mes / Año): ");
DateTime vencimiento = Convert.ToDateTime(Console.ReadLine());
dato.Agregar_tarea(p, id, nombre, descripcion, horario, vencimiento);
Console.Write("Desea agregar otra tarea a este usuario?, Si(1), No(2): ");
opca = Convert.ToInt32(Console.ReadLine());
}
Console.Write("Desea agregar una tarea a algun otro usuario?, Si(1), No(2): ");
opcb = Convert.ToInt32(Console.ReadLine());
if (opcb == 1)
{
Console.Clear();
}
}
}
public void Ver_tareas()
{
int opcd = 1;
while (opcd == 1)
{
//Pedimos un numero de id para comparar y mostrar
Console.Write("Que usuario desea ver?, Ingrese su ID: ");
int opcU;
opcU = Convert.ToInt32(Console.ReadLine());
Usuario p = new Usuario();
foreach (var usuarios in dato.usuarios)
{
if (opcU == usuarios.ID)
{
p = usuarios;
break;
}
}
Console.WriteLine("Nombre: {0}", p.Nombre);
Console.WriteLine("ID: {0}", p.ID);
foreach (var tarea in p.tareas)
{
Console.WriteLine("Nombre {0}, ID {1}",tarea.Nombre,tarea.ID);
}
Console.Write("Que tarea desea ver?, Ingrese su ID: ");
int opce=Convert.ToInt32(Console.ReadLine());
foreach (var tarea in p.tareas)
{
if (opce == tarea.ID)
{
Console.WriteLine(tarea.Nombre);
Console.WriteLine(tarea.Descripcion);
Console.WriteLine(tarea.Horario);
Console.WriteLine(tarea.Vencimiento);
Console.WriteLine(tarea.Estatus);
}
}
Console.WriteLine("Desea ver a otro usuario?, Si(1), No(2)");
opcd = Convert.ToInt32(Console.ReadLine());
if (opcd == 1)
{
Console.Clear();
}
}
}
//Creacion de metodo para cambiar el estatus de cada tarea
public void Cambiar_estatus()
{
int opcd = 1;
while (opcd == 1)
{
Console.Write("Que usuario desea modificar?, Ingrese su ID: ");
int opcU;
opcU = Convert.ToInt32(Console.ReadLine());
Usuario p = new Usuario();
foreach (var usuarios in dato.usuarios)
{
if (opcU == usuarios.ID)
{
p = usuarios;
break;
}
}
Console.WriteLine("Nombre: {0}", p.Nombre);
Console.WriteLine("ID: {0}", p.ID);
foreach (var tarea in p.tareas)
{
Console.WriteLine("Nombre {0}, ID {1}, Estatus {2}", tarea.Nombre, tarea.ID,tarea.Estatus);
}
Console.Write("Que tarea desea cambiar su estatus?, Ingrese su ID: ");
int opce = Convert.ToInt32(Console.ReadLine());
foreach (var tarea in p.tareas)
{
if (opce == tarea.ID)
{
Console.Write("Ingrese su nuevo estatus: ");
tarea.Estatus = Console.ReadLine();
}
}
Console.WriteLine("Desea modificar a otro usuario?, Si(1), No(2)");
opcd = Convert.ToInt32(Console.ReadLine());
if (opcd == 1)
{
Console.Clear();
}
}
}
//Metodo que da coneccion a todos los metodos, creando asi un menu.
public void Menu()
{
int opcf = 1;
while (opcf == 1)
{
Console.Write("Que desea realizar?\nAgregar usuario(1)\nRevisar usuario(2)\nAgregar tarea(3)\nVer tareas(4)\nCambiar estatus(5)\n: ");
switch (Console.ReadLine())
{
case "1":
Agregar_usuario();
Console.Write("Desea realizar algun operacion? Si(1), No(2): ");
opcf = Convert.ToInt32(Console.ReadLine());
break;
case "2":
Observar_usuario();
Console.Write("Desea realizar algun operacion? Si(1), No(2): ");
opcf = Convert.ToInt32(Console.ReadLine());
break;
case "3":
Agregar_tarea();
Console.Write("Desea realizar algun operacion? Si(1), No(2): ");
opcf = Convert.ToInt32(Console.ReadLine());
break;
case "4":
Ver_tareas();
Console.Write("Desea realizar algun operacion? Si(1), No(2): ");
opcf = Convert.ToInt32(Console.ReadLine());
break;
case "5":
Cambiar_estatus();
Console.Write("Desea realizar algun operacion? Si(1), No(2): ");
opcf = Convert.ToInt32(Console.ReadLine());
break;
default:
break;
}
}
}
}
}
<file_sep>/Practica_24_09_2019_Sobrecarga1/Practica_24_09_2019_Sobrecarga1/Datos.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_24_09_2019_Sobrecarga1
{
class Datos
{
public void Obtener_datos()
{
//Instanciacion de la clase Operaciones,para mandar a llamar a los metodos.
Operaciones o = new Operaciones();
//Declaracion de variables que nos serviran para almacenar los datos
double var1;
double var2;
Console.WriteLine("Bienvenido!");
Console.WriteLine("Ingrese un dato porfaviurs!: ");
double var5;
var5 = Convert.ToDouble(Console.ReadLine());
//Asiganmos una variable que guardara el resultado de la operacion mandada a llamar.
double res1 = o.Multiplicar(var5);
Console.WriteLine(res1);
Console.WriteLine("Ingrese dos datos porfaviurs!: ");
var1 = Convert.ToDouble(Console.ReadLine());
var2 = Convert.ToDouble(Console.ReadLine());
double res = o.Multiplicar(var1, var2);
Console.WriteLine(res);
Console.WriteLine("Ingrese tres datos porfaviurs!: ");
double var3;
double var4;
double var6;
var3 = Convert.ToDouble(Console.ReadLine());
var4 = Convert.ToDouble(Console.ReadLine());
var6 = Convert.ToDouble(Console.ReadLine());
double res2 = (o.Multiplicar(var3, var4, var6));
Console.WriteLine(res2);
}
}
}
<file_sep>/Practica_14_11_2019_Exceptions/Practica_14_11_2019_Exceptions/Alumno.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_14_11_2019_Exceptions
{
class Alumno
{
public int Matricula { get; set; }
public string Nombre { get; set; }
public int Semestre { get; set; }
public string Carrera { get; set; }
public int Telefono { get; set; }
}
}
<file_sep>/Practica_24_09_2019_Sobrecarga1/Practica_24_09_2019_Sobrecarga1/Operaciones.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_24_09_2019_Sobrecarga1
{
class Operaciones
{
//Declaracion del metodo por sobrecarga, cada uno con sus respectivas variables.
public double Multiplicar(double x, double y, double z)
{
double var = 0;
var = x * y * z;
return var;
}
public double Multiplicar(double x, double y)
{
double var = 0;
var = x * y;
return var;
}
public double Multiplicar(double x)
{
double var = 0;
var = x * 8;
return var;
}
}
}
<file_sep>/Sumar_Sobrecarga/Sumar_Sobrecarga/Datos.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sumar_Sobrecarga
{
class Datos
{
public double Sumar(double x, double y, double z)
{
double var = 0;
var = x + y + z;
return var;
}
public double Sumar(double x, double y)
{
double var = 0;
var = x + y;
return var;
}
public double Sumar(double x)
{
double var = 0;
var = x + 8;
return var;
}
}
}
<file_sep>/Cambio/Cambio/Data.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cambio
{
class Data
{
public void Convertir(int total, out int pesos, out int centavos)
{
Console.WriteLine("Ingrese la cantidad de centavos");
total = Convert.ToInt32(Console.ReadLine());
pesos = total / 100;
centavos = total % 100;
}
}
}
<file_sep>/E05_Sosa_lopez_Alan_Manuel_To_do_list/E05_Sosa_lopez_Alan_Manuel_To_do_list/Repo.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace E05_Sosa_lopez_Alan_Manuel_To_do_list
{
public class Repo
{
public List<Usuario> usuarios = new List<Usuario>();
public void Agregar_usuario(int ID2, string Nombre2)
{
usuarios.Add(new Usuario { ID = ID2, Nombre = Nombre2 });
}
public void Agregar_tarea(Usuario u, int ID1, string Nombre1, string Descripcion1, string Horario1)
{
usuarios.Find(f => f.ID == u.ID).tareas.Add(new Tarea { usuario = u, ID = ID1, Nombre = Nombre1, Descripcion = Descripcion1, Horario = Horario1, Estatus = "Pendiente" });
}
}
}
<file_sep>/Practica_10_10_2019_Geometricos_Vol2/Practica_10_10_2019_Geometricos_Vol2/Rectangulo.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica_10_10_2019_Geometricos_Vol2
{
public class Rectangulo:Figura
{
public double Altura { get; set; }
}
}
|
c3efbaa55f9208cc405563aabf32509a13a85321
|
[
"Markdown",
"C#"
] | 39
|
C#
|
AlanSosaITT/Poo2019
|
9c9e084266a67c7037ac94e7ff99321e77b7268c
|
a44fa229d2338a45d9321405e0c345a54d8861b0
|
refs/heads/master
|
<file_sep>#!/bin/bash
cd /var/www/app
exec bundle exec rake resque:work QUEUE=*
|
9dbc3d7cfacd46375e6d4f1b4d9adb4baf79bf41
|
[
"Shell"
] | 1
|
Shell
|
mariusz-blaszczak/hound
|
3df42935d92388849beec83eba0e43714a0686ab
|
c54b95c0511c2c0c59e197b3a3cbcbba81606b95
|
refs/heads/master
|
<file_sep>platform :ios, 9.0
use_frameworks!
target 'Example' do
pod 'Crashlytics'
end
|
5f22d9f59b317140623e0024fc3c1167d041012a
|
[
"Ruby"
] | 1
|
Ruby
|
wangko27/nexus3-cocoa
|
abeacb1fac1d0b1bfd318afd06edff762edbae84
|
20d8761b8f94533e5fbd074ccb40be929250d69c
|
refs/heads/master
|
<file_sep>import './assets/scss/index.scss' // Customize UI <---
import Vue from 'vue'
import App from './App.vue'
import router from './router'
/* eslint-disable-next-line no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
})
<file_sep># vueboilerplate
To start vue from scratch with sass
Vue Boiler Plate
It is the simple boiler plate which incorporates sass and it has its base with webpack.
Simply, clone the repo and change the directory and run npm install
Simple Hello world app using vue and sass is ready
<file_sep>return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders('less'),
sass: generateSassResourceLoader(), // <---
scss: generateSassResourceLoader(), // <---
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}
|
9fe94e74fdd3e43044363354af9a6c66b951cc3b
|
[
"JavaScript",
"Markdown"
] | 3
|
JavaScript
|
antony-andrus/vueboilerplate
|
9569ada5d554ec3ccc76e5fb31ca8622537262fa
|
cf6bfc20695258967c006bd19fe7af554f1e058f
|
refs/heads/master
|
<repo_name>parmar-gaurav/groovy<file_sep>/newSiteTemplate.sh
#!/bin/sh
if ls ${WORKSPACE}/exports/ecom-dw/sites/replacements* 1> /dev/null 2>&1; then
echo "files do exist"
if [ ! -z "$Export_Site_ID" ]
then
echo "NPM Installation is in progress... "
npm install
echo "Export site....."
if [ "$Site_Export" = "without_Catalog" ]
then
grunt exportUnits --build.project.name=adidas --webdav.server=${Export_Instance} --webdav.username=${Export_Instance_Username} --webdav.password=${Export_Instance_Password} --export-name=site_template --exportUnits.sites=${Export_Site_ID}
elif [ "$Site_Export" = "with_Catalog" ]
then
grunt exportUnits_withCatalog --build.project.name=adidas --webdav.server=${Export_Instance} --webdav.username=${Export_Instance_Username} --webdav.password=${Export_Instance_Password} --export-name=site_template --exportUnits.sites=${Export_Site_ID}
else
exit 1
fi
echo "create a New site template from export....."
find "${WORKSPACE}/output/" -name "*.zip" -type f -delete
npm -s run create_site_template -- -i --instance=${Import_Instance}
echo "Importing New site template....."
find "${WORKSPACE}/output/" -type f -iname "*.zip" -exec basename {} .zip \; > outfile.txt
file="$(cat ${WORKSPACE}/outfile.txt)"
grunt adi_newsitetemplateImport -build.project.name=adidas -build.project.version=0 -webdav.username=${Import_Instance_Username} -webdav.password=${Import_Instance_Password} -webdav.server=${Import_Instance} -jen_workspace=${WORKSPACE} --export_filename=${file}
else
echo " Site id not found"
exit 1
fi
else
echo "files do not exist"
fi
|
b140b6a3f268ef1c0776471089a334a6d842fc00
|
[
"Shell"
] | 1
|
Shell
|
parmar-gaurav/groovy
|
e3d8fea1ae41d81d0e4146b71f22d4b2090a4618
|
1fb3186d9b7173844ae905de94a5b0c706e023a0
|
refs/heads/master
|
<repo_name>denyamber/manager<file_sep>/src/main/java/com/example/demo/hr/manager/services/ExportSalariesService.java
package com.example.demo.hr.manager.services;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import com.example.demo.hr.manager.dao.export.ExportInterface;
@Service
public class ExportSalariesService {
private final ManagerService managerService;
private final ExportInterface exporter;
@Autowired
public ExportSalariesService(ManagerService managerService, @Qualifier("salaries") ExportInterface exporter) {
super();
this.managerService = managerService;
this.exporter = exporter;
}
public File export() throws IOException {
String convertedData = exporter.prepareDataForExport(managerService.listAlphabetically());
File fileToDownload = new File(ExportInterface.DOWNLOAD_FILE_NAME);
if (fileToDownload.exists()) {
fileToDownload.delete();
}
FileWriter fileWriter = new FileWriter(fileToDownload);
try {
fileWriter.write(convertedData);
} finally {
fileWriter.flush();
fileWriter.close();
}
return fileToDownload;
}
}
<file_sep>/src/main/java/com/example/demo/hr/manager/model/EmployeeData.java
package com.example.demo.hr.manager.model;
import java.util.UUID;
import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.validation.constraints.NotEmpty;
import org.hibernate.annotations.Table;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
@JsonIgnoreProperties
@EntityListeners(AuditingEntityListener.class)
@Table(appliesTo = "employees")
public class EmployeeData {
@NotEmpty
@JsonProperty("first_name")
@Column(name = "first_name")
private String firstName;
@NotEmpty
@JsonProperty("last_name")
@Column(name = "last_name")
private String lastName;
@JsonProperty("address")
@Column(name = "address")
private String address;
@JsonProperty("country")
@Column(name = "country")
private String country;
@JsonProperty("postal_code")
@Column(name = "postal_code")
private String postalCode;
@JsonProperty("phone_number")
@Column(name = "phone_number")
private String phoneNumber;
@NotEmpty
@JsonProperty("gross_salary")
@Column(name = "gross_salary")
private double grossSalary;
@NotEmpty
@JsonProperty("taxes")
@Column(name = "taxes")
private double percentOfTaxes;
@JsonProperty("net_salary")
@Column(name = "net_salary")
private double netSalary;
@JsonProperty("id")
@Column(name = "id", nullable = false, unique = true)
private UUID employeeID;
public String getFirstName() {
return firstName;
}
public UUID getEmployeeID() {
return employeeID;
}
public void setEmployeeID(UUID employeeID) {
this.employeeID = employeeID;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getPostalCode() {
return postalCode;
}
public void setPostalCode(String postalCode) {
this.postalCode = postalCode;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public double getGrossSalary() {
return grossSalary;
}
public void setGrossSalary(double grossSalary) {
this.grossSalary = grossSalary;
}
public double getPercentOfTaxes() {
return percentOfTaxes;
}
public void setPercentOfTaxes(double percentOfTaxes) {
this.percentOfTaxes = percentOfTaxes;
}
public void setNetSalary(double netSalary) {
this.netSalary = netSalary;
}
public double getNetSalary() {
return this.netSalary;
}
public void recalculateNetSalary() {
this.netSalary = calculateNetSalaryFromGrossSalary(this.grossSalary, this.percentOfTaxes);
}
public static double calculateNetSalaryFromGrossSalary(double fromGrossAmount, double withTaxPercentige) {
double moneyForTaxes = fromGrossAmount * withTaxPercentige / 100d;
return fromGrossAmount - moneyForTaxes;
}
public String getFullName() {
return firstName + " " + lastName;
}
}
<file_sep>/build.gradle
plugins {
id 'org.springframework.boot' version '2.2.6.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
}
group = 'com.example.demo.hr'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
repositories {
mavenCentral()
maven { url "https://maven.vaadin.com/vaadin-addons" }
maven { url "https://mvnrepository.com/artifact/org.vaadin.olli/file-download-wrapper"}
}
ext {
set('vaadinVersion', "14.1.23")
set('springCloudVersion', "Hoxton.SR3")
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'com.vaadin:vaadin-spring-boot-starter'
implementation group: 'org.vaadin.olli', name: 'file-download-wrapper', version: '3.0.1'
implementation 'org.flywaydb:flyway-core'
runtimeOnly 'org.postgresql:postgresql'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
dependencyManagement {
imports {
mavenBom "com.vaadin:vaadin-bom:${vaadinVersion}"
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
test {
useJUnitPlatform()
}
<file_sep>/src/main/java/com/example/demo/hr/manager/dao/InMemoryImplementation.java
package com.example.demo.hr.manager.dao;
import java.io.IOException;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.UUID;
import org.springframework.stereotype.Repository;
import com.example.demo.hr.manager.model.EmployeeData;
@Repository("inMemory")
public class InMemoryImplementation implements EmployeeDataManagementInterface {
private final Map<UUID, EmployeeData> inMemoryDB = Collections.synchronizedMap(new LinkedHashMap<>());
private final Set<String> employeeNames = new HashSet<>();
@Override
public UUID addEmployee(UUID id, EmployeeData employee) throws IOException {
if (id == null) {
id = addEmployee(employee);
}
String fullName = employee.getFullName();
if (employeeNames.contains(fullName)) {
throw new IOException("Employee with name " + employee.getFullName() + " already exists in the system.");
} else {
employeeNames.add(fullName);
}
employee.setEmployeeID(id);
inMemoryDB.put(id, employee);
return id;
}
@Override
public UUID editEmployee(UUID employeeID, EmployeeData employee) throws IOException {
employee.setEmployeeID(employeeID);
employee.recalculateNetSalary();
if (inMemoryDB.get(employeeID) != null) {
inMemoryDB.replace(employeeID, employee);
} else {
throw new IOException("Employee with id \"" + employeeID + "\" not found");
}
return employeeID;
}
@Override
public void deleteEmployee(UUID employeeID) throws IOException {
String fullName = inMemoryDB.get(employeeID).getFullName();
if (fullName != null) {
inMemoryDB.remove(employeeID);
employeeNames.remove(fullName);
}
}
@Override
public List<EmployeeData> fetchLatestEmployees(int count) {
int size = inMemoryDB.size();
List<EmployeeData> result = new LinkedList<>();
Iterator<EmployeeData> dbIterator = inMemoryDB.values().iterator();
if (size > count) {
LinkedList<EmployeeData> values = new LinkedList<>();
values.addAll(inMemoryDB.values());
dbIterator = values.subList(size - count - 1, size - 1).iterator();
}
while (dbIterator.hasNext()) {
result.add(dbIterator.next());
}
return result;
}
@Override
public SortedSet<EmployeeData> listAlphabetically() {
SortedSet<EmployeeData> sortedSet = new TreeSet<EmployeeData>(new Comparator<EmployeeData>() {
@Override
public int compare(EmployeeData o1, EmployeeData o2) {
int result = o1.getFullName().compareTo(o2.getFullName());
if (result == 0) {
result = o1.getEmployeeID().compareTo(o2.getEmployeeID());
}
return result;
}
});
sortedSet.addAll(inMemoryDB.values());
return sortedSet;
}
@Override
public EmployeeData findEmployee(UUID id) throws IOException {
if (!inMemoryDB.containsKey(id)) {
throw new IOException("Employee not found.");
}
return inMemoryDB.get(id);
}
}
<file_sep>/src/main/java/com/example/demo/hr/manager/dao/EmployeeDataManagementInterface.java
package com.example.demo.hr.manager.dao;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import java.util.SortedSet;
import java.util.UUID;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.example.demo.hr.manager.model.EmployeeData;
public interface EmployeeDataManagementInterface {
default public UUID addEmployee(@NotEmpty EmployeeData employee) throws IOException {
UUID id = UUID.randomUUID();
employee.setEmployeeID(id);
return addEmployee(id, employee);
}
// returns the employeeID of the added employee;
public UUID addEmployee(@NotEmpty UUID id, @NotEmpty EmployeeData employee) throws IOException;
// returns the employeeID of the added employee;
public UUID editEmployee(@NotEmpty UUID employeeID, @NotEmpty EmployeeData employee) throws IOException;
default public UUID editEmployee(@NotNull EmployeeData employee) throws IOException {
UUID id = employee.getEmployeeID();
if (id != null && findEmployee(id) != null) {
return editEmployee(id, employee);
} else {
return addEmployee(employee);
}
}
// returns the employeeID of the added employee;
public void deleteEmployee(@NotEmpty UUID employeeID) throws IOException;
// returns a list with the latest employees
public List<EmployeeData> fetchLatestEmployees(int count);
// returns all employees sorted
public SortedSet<EmployeeData> listAlphabetically();
public EmployeeData findEmployee(UUID id) throws IOException;
default public void calculateNetSalary() throws IOException {
Iterator<EmployeeData> allValues = listAlphabetically().iterator();
while (allValues.hasNext()) {
EmployeeData data = allValues.next();
data.recalculateNetSalary();
editEmployee(data);
}
}
}
<file_sep>/src/main/java/com/example/demo/hr/manager/services/ManagerService.java
package com.example.demo.hr.manager.services;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.SortedSet;
import java.util.UUID;
import javax.validation.constraints.NotEmpty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import com.example.demo.hr.manager.dao.EmployeeDataManagementInterface;
import com.example.demo.hr.manager.model.EmployeeData;
@Service
public class ManagerService {
private final EmployeeDataManagementInterface managerInterface;
@Autowired
public ManagerService(@Qualifier("postgress") EmployeeDataManagementInterface managerInterface) {
this.managerInterface = managerInterface;
}
public UUID addEmployee(EmployeeData employee) throws IOException {
return managerInterface.addEmployee(employee);
}
public UUID editEmployee(UUID employeeID, EmployeeData employee) throws IOException {
return managerInterface.editEmployee(employeeID, employee);
}
public void deleteEmployee(UUID employeeID) throws IOException {
managerInterface.deleteEmployee(employeeID);
}
public List<UUID> bulkEdit(@NotEmpty List<EmployeeData> employees) throws IOException {
List<UUID> updated = new ArrayList<>();
String errorMessage = "";
for (EmployeeData person : employees) {
try {
updated.add(editEmployee(person.getEmployeeID(), person));
} catch (IOException e) {
errorMessage += e.getMessage() + " ";
}
}
if (!errorMessage.isEmpty()) {
throw new IOException(errorMessage);
}
return updated;
}
public void bulkDelete(@NotEmpty List<UUID> ids) throws IOException {
String errorMessage = "";
for (UUID id : ids) {
try {
deleteEmployee(id);
} catch (IOException e) {
errorMessage += e.getMessage() + " ";
}
}
if (!errorMessage.isEmpty()) {
throw new IOException(errorMessage);
}
}
public List<UUID> bulkAdd(@NotEmpty List<EmployeeData> employees) throws IOException {
ArrayList<UUID> ids = new ArrayList<>();
String errorMessage = "";
for (EmployeeData person : employees) {
try {
ids.add(addEmployee(person));
} catch (IOException e) {
errorMessage += e.getMessage() + " ";
}
}
if (!errorMessage.isEmpty()) {
throw new IOException(errorMessage);
}
return ids;
}
public SortedSet<EmployeeData> listAlphabetically() {
return managerInterface.listAlphabetically();
}
public List<EmployeeData> fetchLatestEmployees(int count) {
return managerInterface.fetchLatestEmployees(count);
}
public EmployeeData findEmployee(UUID id) throws IOException {
return managerInterface.findEmployee(id);
}
public void recalculateNetSalaries() throws IOException {
managerInterface.calculateNetSalary();
}
}
<file_sep>/src/main/resources/db/migration/V1__EmployeesTable.sql
CREATE TABLE public.employees (
id UUID NOT NULL PRIMARY KEY,
first_name VARCHAR(100) NOT NULL,
last_name VARCHAR(100) NOT NULL,
address VARCHAR(256),
postal_code VARCHAR(35),
country VARCHAR(100),
phone_number VARCHAR(100),
gross_salary REAL,
taxes REAL,
net_salary REAL
)<file_sep>/src/main/java/com/example/demo/hr/manager/api/ManagementServiceController.java
package com.example.demo.hr.manager.api;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.List;
import java.util.SortedSet;
import java.util.UUID;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.InputStreamResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.example.demo.hr.manager.model.EmployeeData;
import com.example.demo.hr.manager.services.ExportSalariesService;
import com.example.demo.hr.manager.services.ManagerService;
@RequestMapping("/api/v1/manager")
@RestController
public class ManagementServiceController {
private final ManagerService managementService;
private final ExportSalariesService exportService;
@Autowired
public ManagementServiceController(ManagerService service, ExportSalariesService exportService) {
this.managementService = service;
this.exportService = exportService;
}
@PostMapping(path = "/add")
public UUID addEmployee(@RequestBody EmployeeData employee) throws IOException {
return managementService.addEmployee(employee);
}
@PostMapping(path = "/bulkAdd")
public List<UUID> bulkAdd(@RequestBody List<EmployeeData> employees) throws IOException {
return managementService.bulkAdd(employees);
}
@PostMapping(path = "/edit/{id}")
public UUID editEmployee(@PathVariable("id") UUID employeeID, @RequestBody EmployeeData employee)
throws IOException {
return managementService.editEmployee(employeeID, employee);
}
@PostMapping(path = "/bulkEdit")
public List<UUID> bulkEdit(@RequestBody List<EmployeeData> employees) throws IOException {
return managementService.bulkEdit(employees);
}
@DeleteMapping(path = "/delete/{id}")
public void deleteEmployee(@PathVariable("id") UUID employeeID) throws IOException {
managementService.deleteEmployee(employeeID);
}
@DeleteMapping(path = "/bulkDelete")
public void bulkDelete(@RequestBody List<UUID> ids) throws IOException {
managementService.bulkDelete(ids);
}
@GetMapping(path = "/sort")
public SortedSet<EmployeeData> listEmployees() {
return managementService.listAlphabetically();
}
@GetMapping(path = "/getlast/{count}")
public List<EmployeeData> fetchLatestEmployees(@PathVariable("count") int count) {
return managementService.fetchLatestEmployees(count);
}
@GetMapping(path = "/export")
public ResponseEntity<Object> exportSalariesData() {
FileInputStream resultFileInputStream = null;
ResponseEntity<Object> responseEntity = null;
try {
File resultFile = exportService.export();
resultFileInputStream = new FileInputStream(resultFile);
InputStreamResource resource = new InputStreamResource(resultFileInputStream);
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition", String.format("attachment; filename=\"%s\"", resultFile.getName()));
headers.add("Cache-Control", "no-cache, no-store, must-revalidate");
headers.add("Pragma", "no-cache");
headers.add("Expires", "0");
responseEntity = ResponseEntity.ok().headers(headers).contentLength(resultFile.length())
.contentType(MediaType.parseMediaType("application/txt")).body(resource);
} catch (Exception e) {
return new ResponseEntity<>("error occurred", HttpStatus.INTERNAL_SERVER_ERROR);
}
return responseEntity;
}
}
|
80bffc2e251c75d0a10654280607b675b9a51ec2
|
[
"Java",
"SQL",
"Gradle"
] | 8
|
Java
|
denyamber/manager
|
7d142666639d686af0c9e44bab4a7b2fd76b438d
|
d680964cc00066bde95893837bad33a64497b561
|
refs/heads/master
|
<repo_name>Segamegadrive/telemetry<file_sep>/dbconn.py
from influxdb import InfluxDBClient
client = InfluxDBClient(host='localhost', port='8086', database='metrics')
client.switch_database('metrics')
<file_sep>/README.md
"# telemetry"
<file_sep>/metric.py
import requests
import dbconn
#import datetime as dt
url = "http://aio-2521:8041/v1/metric/6ca53dea-a827-4205-9fcb-59b6da7c470e/measures"
headers = {
'X-Auth-Token': '<KEY>',
'Content-Type': 'application/json;charset=utf-8'
}
response = requests.get(url, headers=headers)
data = response.json()
if response.status_code != 200:
print('Error occurred to get the data from API call:', response.status_code)
else:
print('API call success. Metrics data sent to influxDB for storage, please check influxDB now.')
val = 0
for dataval in data:
# Formatting and conversion not required.
# ts = dt.datetime.strptime(dataval[0][0:19], '%Y-%m-%dT%H:%M:%S')
# ts_str = str(ts)
# print(ts_str)
# Converting into Dictionary
val = {
'timestamp': dataval[0],
'granularity': dataval[1],
'value': dataval[2]
}
# Calling influxDB client and writing into it for storage.
# Measurement and Fields are mandatory {tags are optional}
# https://docs.influxdata.com/influxdb/v1.8/concepts/key_concepts/#field-key
dbconn.client.write_points([{"measurement": "cpu", "fields": val}])
|
4f1744486f596ffc7e61ce4363e2aab972752073
|
[
"Markdown",
"Python"
] | 3
|
Python
|
Segamegadrive/telemetry
|
8671f442d1e40000f9fccbbdcea7c9af507dd7ab
|
2a8f5b0660fa0331bd110e92447d5ff1334babaa
|
refs/heads/master
|
<file_sep>Facebook-Module-Droid
=====================
Module of Integrating Facebook Graph API For Android
<file_sep>package com.module.facebook.activities;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;
import com.facebook.Response;
import com.facebook.model.GraphUser;
import com.module.facebook.FacebookActivity;
import com.module.facebook.R;
public class MyInfoActivity extends FacebookActivity implements OnClickListener {
@Override
public void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_myinfo);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
requestMe();
}
}, 100);
}
@Override
protected void onRequestMeCompleted(GraphUser user, Response response) {
// TODO Auto-generated method stub
super.onRequestMeCompleted(user, response);
if (user != null) {
Log.i("FBModule", "My First Name = " + user.getFirstName());
Log.i("FBModule", "My Email = " + user.getProperty("email"));
String sFullName = user.getFirstName() + "" + user.getLastName();
String sEmail = (String)user.getProperty("email");
String sBirthday = user.getBirthday();
((TextView) findViewById(R.id.myinfo_tv_name)).setText(sFullName);
((TextView) findViewById(R.id.myinfo_tv_email)).setText(sEmail);
((TextView) findViewById(R.id.myinfo_tv_birthday)).setText(sBirthday);
}
Log.i("FBModule", "Response = " + response);
}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
case R.id.myinfo_btn_friends_list:
break;
default:
break;
}
}
}
<file_sep>package com.module.facebook.activities;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import com.facebook.SessionState;
import com.module.facebook.FacebookActivity;
import com.module.facebook.R;
public class LoginActivity extends FacebookActivity implements OnClickListener {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
getHashKey(this);
Button btnLogin = (Button) findViewById(R.id.main_btn_fb_login);
btnLogin.setOnClickListener(this);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
protected void onSessionStateChange(SessionState state, Exception exception) {
// TODO Auto-generated method stub
super.onSessionStateChange(state, exception);
if (state.isOpened()) {
Log.i("FBModule", "Session is opended.");
startActivity(new Intent(getBaseContext(), MyInfoActivity.class));
finish();
}
}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
case R.id.main_btn_fb_login:
openSession();
break;
default:
break;
}
}
}
|
a16473831491b35636af99a85ef3b3cc0880987f
|
[
"Markdown",
"Java"
] | 3
|
Markdown
|
cooldreamer91/Facebook-Module-Droid
|
a5e8435358e3bf7c710029e269c3f5e8454f54b2
|
62400526bfbc7240c9244c76d72644ad4f1dffd9
|
refs/heads/main
|
<repo_name>mujtaba193/Document_Management_System<file_sep>/dbcon.py
import psycopg2
import sys, os
import numpy as np
import pandas as pd
from werkzeug.utils import find_modules
import credential__sql as creds
import pandas.io.sql as psql
from datetime import datetime
## ****** LOAD PSQL DATABASE ***** ##
class PostgresManagement:
def __init__(self):
# Set up a connection to the postgres server.
conn_string = "host="+ creds.PGHOST +" port="+ "5432" +" dbname="+ creds.PGDATABASE +" user=" + creds.PGUSER \
+" password="+ creds.PGPASSWORD
conn=psycopg2.connect(conn_string)
self.connection = conn
self.cursor = conn.cursor()
self.schema = 'public'
def findUsers(self):
sql_command = "SELECT * FROM person;"
data = pd.read_sql(sql_command, self.connection)
return (data)
def findUser(self, person):
sql_command = "SELECT * FROM person WHERE id_person = {};".format(person)
data = pd.read_sql(sql_command, self.connection)
return (data)
def findPatients(self):
sql_command = "SELECT *, patient.id_person as pa FROM patient INNER JOIN person on patient.id_person = person.id_person;"
data = pd.read_sql(sql_command, self.connection)
return (data)
def findDoctors(self):
sql_command = "select *, doctor.id_person as pa from doctor inner join person on doctor.id_person = person.id_person;"
data = pd.read_sql(sql_command, self.connection)
return (data)
def findNurse(self):
sql_command = "select *, nurse.id_person as pa from nurse inner join person on nurse.id_person = person.id_person;"
data = pd.read_sql(sql_command, self.connection)
return (data)
def findPharmacy(self):
sql_command = "select * from pharmacy;"
data = pd.read_sql(sql_command, self.connection)
return (data)
def findCountAll(self):
sql_command = "SELECT (SELECT COUNT(id_person) FROM person) AS person,(SELECT COUNT(id_doctor) FROM doctor) AS doctor,(SELECT COUNT(id_nurse) FROM nurse) AS nurse,(SELECT COUNT(id_product) FROM pharmacy) AS pharmacy, (SELECT COUNT(id_patient)FROM patient) AS patient;"
data = pd.read_sql(sql_command, self.connection)
return (data)
def findCashier(self):
sql_command = "select *, cashier.id_person as ca from cashier inner join person on cashier.id_person = person.id_person;"
data = pd.read_sql(sql_command, self.connection)
return (data)
def findTransactions(self):
sql_command = "select c.id_product,c.id_cashier,c.id_person,amount,date,total,p.name,p.surname, ph.name as pro, ph.price from cashregister as c inner join person as p on c.id_person = p.id_person inner join pharmacy as ph on c.id_product = ph.id_product;"
data = pd.read_sql(sql_command, self.connection)
return (data)
def findAllTransactions(self):
sql_command = "select * from cashregister;"
data = pd.read_sql(sql_command, self.connection)
return (data)
def getProductPrice(self,id_product):
sql_command = "select price from pharmacy where id_product = {};".format(id_product)
data = pd.read_sql(sql_command, self.connection)
return (data.price[0])
def findSpecDate(self):
sql_command = "select sum(total) as total from cashregister where date < (current_timestamp) and date > (current_timestamp -interval '1 day') "
today = pd.read_sql(sql_command, self.connection)
sql_command = "select sum(total) as total from cashregister where date < (current_timestamp) and date > (current_timestamp -interval '1 week') "
week = pd.read_sql(sql_command, self.connection)
sql_command = "select sum(total) as total from cashregister where date < (current_timestamp) and date > (current_timestamp -interval '1 month') "
month = pd.read_sql(sql_command, self.connection)
sql_command = "select sum(total) as total from cashregister where date < (current_timestamp) and date > (current_timestamp -interval '1 year') "
year = pd.read_sql(sql_command, self.connection)
return (today,week,month,year)
def addPerson(self, person):
sql_command = 'insert into person (name,surname,type,phone,pobox,email,home) values {}'.format(person)
print(sql_command)
try:
self.cursor.execute(sql_command)
self.connection.commit()
print('inserted')
except:
self.connection.rollback()
print('error')
def addDoctor(self,doctor):
sql_command = 'insert into doctor (id_person,speciality,hoursstart,hoursend) values {}'.format(doctor)
print(sql_command)
try:
self.cursor.execute(sql_command)
self.connection.commit()
print('inserted')
except:
self.connection.rollback()
print('error')
def addNurse(self,nurse):
sql_command = 'insert into nurse (id_person,hoursstart,hoursend) values {}'.format(nurse)
print(sql_command)
try:
self.cursor.execute(sql_command)
self.connection.commit()
print('inserted')
except:
self.connection.rollback()
print('error')
def addCashier(self,cashier):
sql_command = 'insert into cashier (id_person,password,hoursstart,hoursend) values {}'.format(cashier)
print(sql_command)
try:
self.cursor.execute(sql_command)
self.connection.commit()
print('inserted')
except:
self.connection.rollback()
print('error')
def addPatient(self,patient):
sql_command = 'insert into patient (id_person,date,roomnumber,checkout,diagnosis) values {}'.format(patient)
print(sql_command)
try:
self.cursor.execute(sql_command)
self.connection.commit()
print('inserted')
except:
self.connection.rollback()
print('error')
def addPharmacy(self,pharmacy):
sql_command = 'insert into pharmacy (name,price,stock) values {}'.format(pharmacy)
print(sql_command)
try:
self.cursor.execute(sql_command)
self.connection.commit()
print('inserted')
except:
self.connection.rollback()
print('error')
def addTransaction(self,transaction):
sql_command = 'insert into cashregister (id_cashier, id_product, id_person, amount, date, total) values {}'.format(transaction)
print(sql_command)
try:
self.cursor.execute(sql_command)
self.connection.commit()
print('inserted')
except:
self.connection.rollback()
print('error')
def getCredentials(self,username,password):
sql_command = 'select * from login where username = {} and password = {};'.format(username,password)
data = pd.read_sql(sql_command, self.connection)
return (data)
if __name__ == "__main__":
postgresDB = PostgresManagement()
#t,w,m,y = postgresDB.findSpecDate()
person = postgresDB.getCredentials('me','me')
print(person)<file_sep>/objectMDB/objdatabase/crebas.sql
/*==============================================================*/
/* Nom de SGBD : PostgreSQL 8 */
/* Date de cr�ation : 05/27/21 7:53:32 AM */
/*==============================================================*/
/*==============================================================*/
/* Table : CASHIER */
/*==============================================================*/
create table CASHIER (
ID_CASHIER SERIAL not null
constraint CKC_ID_CASHIER_CASHIER check (ID_CASHIER >= 0),
ID_PERSON INT4 not null
constraint CKC_ID_PERSON_CASHIER check (ID_PERSON >= 0),
PASSWORD VARCHAR(1024) not null,
HOURSSTART DATE null,
HOURSEND DATE null,
constraint PK_CASHIER primary key (ID_CASHIER)
);
/*==============================================================*/
/* Index : CASHIER_PK */
/*==============================================================*/
create unique index CASHIER_PK on CASHIER (
ID_CASHIER
);
/*==============================================================*/
/* Index : PERSON_CASHIER_FK */
/*==============================================================*/
create index PERSON_CASHIER_FK on CASHIER (
ID_PERSON
);
/*==============================================================*/
/* Table : CASHREGISTER */
/*==============================================================*/
create table CASHREGISTER (
ID_TRANSACTION SERIAL not null
constraint CKC_ID_TRANSACTION_CASHREGI check (ID_TRANSACTION >= 0),
ID_CASHIER INT4 not null
constraint CKC_ID_CASHIER_CASHREGI check (ID_CASHIER >= 0),
ID_PRODUCT INT4 not null
constraint CKC_ID_PRODUCT_CASHREGI check (ID_PRODUCT >= 0),
ID_PERSON INT4 not null
constraint CKC_ID_PERSON_CASHREGI check (ID_PERSON >= 0),
AMOUNT DECIMAL(8) null,
DATE DATE null,
TOTAL DECIMAL null,
constraint PK_CASHREGISTER primary key (ID_TRANSACTION)
);
/*==============================================================*/
/* Index : CASHREGISTER_PK */
/*==============================================================*/
create unique index CASHREGISTER_PK on CASHREGISTER (
ID_TRANSACTION
);
/*==============================================================*/
/* Index : CAHSIER_REGISTER_FK */
/*==============================================================*/
create index CAHSIER_REGISTER_FK on CASHREGISTER (
ID_CASHIER
);
/*==============================================================*/
/* Index : PERSON_REGISTER_FK */
/*==============================================================*/
create index PERSON_REGISTER_FK on CASHREGISTER (
ID_PERSON
);
/*==============================================================*/
/* Index : REGISTER_PHARMACY_FK */
/*==============================================================*/
create index REGISTER_PHARMACY_FK on CASHREGISTER (
ID_PRODUCT
);
/*==============================================================*/
/* Table : DOCTOR */
/*==============================================================*/
create table DOCTOR (
ID_DOCTOR SERIAL not null
constraint CKC_ID_DOCTOR_DOCTOR check (ID_DOCTOR >= 0),
ID_PERSON INT4 not null
constraint CKC_ID_PERSON_DOCTOR check (ID_PERSON >= 0),
SPECIALITY VARCHAR(1024) null,
HOURSSTART DATE null,
HOURSEND DATE null,
constraint PK_DOCTOR primary key (ID_DOCTOR)
);
/*==============================================================*/
/* Index : DOCTOR_PK */
/*==============================================================*/
create unique index DOCTOR_PK on DOCTOR (
ID_DOCTOR
);
/*==============================================================*/
/* Index : PRESON_DOC_FK */
/*==============================================================*/
create index PRESON_DOC_FK on DOCTOR (
ID_PERSON
);
/*==============================================================*/
/* Table : LOGIN */
/*==============================================================*/
create table LOGIN (
ID_LOGIN SERIAL not null
constraint CKC_ID_LOGIN_LOGIN check (ID_LOGIN >= 0),
ID_PERSON INT4 not null
constraint CKC_ID_PERSON_LOGIN check (ID_PERSON >= 0),
USERNAME VARCHAR(1) not null,
PASSWORD VARCHAR(1024) not null,
constraint PK_LOGIN primary key (ID_LOGIN)
);
/*==============================================================*/
/* Index : LOGIN_PK */
/*==============================================================*/
create unique index LOGIN_PK on LOGIN (
ID_LOGIN
);
/*==============================================================*/
/* Index : LOGIN_PERSON_FK */
/*==============================================================*/
create index LOGIN_PERSON_FK on LOGIN (
ID_PERSON
);
/*==============================================================*/
/* Table : NURSE */
/*==============================================================*/
create table NURSE (
ID_NURSE SERIAL not null
constraint CKC_ID_NURSE_NURSE check (ID_NURSE >= 0),
ID_PERSON INT4 not null
constraint CKC_ID_PERSON_NURSE check (ID_PERSON >= 0),
HOURSSTART DATE null,
HOURSEND DATE null,
constraint PK_NURSE primary key (ID_NURSE)
);
/*==============================================================*/
/* Index : NURSE_PK */
/*==============================================================*/
create unique index NURSE_PK on NURSE (
ID_NURSE
);
/*==============================================================*/
/* Index : ASSOCIATION_10_FK */
/*==============================================================*/
create index ASSOCIATION_10_FK on NURSE (
ID_PERSON
);
/*==============================================================*/
/* Table : PATIENT */
/*==============================================================*/
create table PATIENT (
ID_PATIENT SERIAL not null
constraint CKC_ID_PATIENT_PATIENT check (ID_PATIENT >= 0),
ID_PERSON INT4 not null
constraint CKC_ID_PERSON_PATIENT check (ID_PERSON >= 0),
DATE DATE null,
ROOMNUMBER INT4 null,
CHECKOUT DATE null,
DIAGNOSIS VARCHAR(1024) null,
constraint PK_PATIENT primary key (ID_PATIENT)
);
/*==============================================================*/
/* Index : PATIENT_PK */
/*==============================================================*/
create unique index PATIENT_PK on PATIENT (
ID_PATIENT
);
/*==============================================================*/
/* Index : PERSON_PATIENT_FK */
/*==============================================================*/
create index PERSON_PATIENT_FK on PATIENT (
ID_PERSON
);
/*==============================================================*/
/* Table : PATIENTBOOK */
/*==============================================================*/
create table PATIENTBOOK (
ID_PATIENTBOOK SERIAL not null
constraint CKC_ID_PATIENTBOOK_PATIENTB check (ID_PATIENTBOOK >= 0),
ID_PATIENT INT4 not null
constraint CKC_ID_PATIENT_PATIENTB check (ID_PATIENT >= 0),
DEPARTEMENT VARCHAR(1024) null,
DESCRIPTION VARCHAR(8000) null,
DATE DATE null,
RESULTATS VARCHAR(8000) null,
constraint PK_PATIENTBOOK primary key (ID_PATIENTBOOK)
);
/*==============================================================*/
/* Index : PATIENTBOOK_PK */
/*==============================================================*/
create unique index PATIENTBOOK_PK on PATIENTBOOK (
ID_PATIENTBOOK
);
/*==============================================================*/
/* Index : PATIENT_BOOK_FK */
/*==============================================================*/
create index PATIENT_BOOK_FK on PATIENTBOOK (
ID_PATIENT
);
/*==============================================================*/
/* Table : PERSON */
/*==============================================================*/
create table PERSON (
ID_PERSON SERIAL not null
constraint CKC_ID_PERSON_PERSON check (ID_PERSON >= 0),
NAME VARCHAR(1024) null,
SURNAME VARCHAR(1024) null,
TYPE CHAR(256) null,
PHONE VARCHAR(1024) null,
POBOX VARCHAR(1024) null,
EMAIL VARCHAR(1024) null,
HOME VARCHAR(1024) null,
PHOTO VARCHAR(1) null,
constraint PK_PERSON primary key (ID_PERSON)
);
/*==============================================================*/
/* Index : PERSON_PK */
/*==============================================================*/
create unique index PERSON_PK on PERSON (
ID_PERSON
);
/*==============================================================*/
/* Table : PHARMACY */
/*==============================================================*/
create table PHARMACY (
ID_PRODUCT SERIAL not null
constraint CKC_ID_PRODUCT_PHARMACY check (ID_PRODUCT >= 0),
NAME VARCHAR(1024) null,
PRICE DECIMAL null,
STOCK INT4 null,
constraint PK_PHARMACY primary key (ID_PRODUCT)
);
/*==============================================================*/
/* Index : PHARMACY_PK */
/*==============================================================*/
create unique index PHARMACY_PK on PHARMACY (
ID_PRODUCT
);
alter table CASHIER
add constraint FK_CASHIER_PERSON_CA_PERSON foreign key (ID_PERSON)
references PERSON (ID_PERSON)
on delete restrict on update restrict;
alter table CASHREGISTER
add constraint FK_CASHREGI_CAHSIER_R_CASHIER foreign key (ID_CASHIER)
references CASHIER (ID_CASHIER)
on delete restrict on update restrict;
alter table CASHREGISTER
add constraint FK_CASHREGI_PERSON_RE_PERSON foreign key (ID_PERSON)
references PERSON (ID_PERSON)
on delete restrict on update restrict;
alter table CASHREGISTER
add constraint FK_CASHREGI_REGISTER__PHARMACY foreign key (ID_PRODUCT)
references PHARMACY (ID_PRODUCT)
on delete restrict on update restrict;
alter table DOCTOR
add constraint FK_DOCTOR_PRESON_DO_PERSON foreign key (ID_PERSON)
references PERSON (ID_PERSON)
on delete restrict on update restrict;
alter table LOGIN
add constraint FK_LOGIN_LOGIN_PER_PERSON foreign key (ID_PERSON)
references PERSON (ID_PERSON)
on delete restrict on update restrict;
alter table NURSE
add constraint FK_NURSE_ASSOCIATI_PERSON foreign key (ID_PERSON)
references PERSON (ID_PERSON)
on delete restrict on update restrict;
alter table PATIENT
add constraint FK_PATIENT_PERSON_PA_PERSON foreign key (ID_PERSON)
references PERSON (ID_PERSON)
on delete restrict on update restrict;
alter table PATIENTBOOK
add constraint FK_PATIENTB_PATIENT_B_PATIENT foreign key (ID_PATIENT)
references PATIENT (ID_PATIENT)
on delete restrict on update restrict;
<file_sep>/templates/forms/new_patient.html
{%extends "layout.html"%} {%block content%}
<form method="POST">
{% include 'includes/_input_select.html'%}
<div class="form-group">
<label for="checkin">Check in:</label>
<input type="datetime-local" id="checkin" name="checkin"><br>
<label for="roomnumber">Room Number:</label>
<input type="number" class="form-control" id="roomnumber" name="roomnumber"><br>
<label for="checkout">Check out:</label>
<input type="datetime-local" id="checkout" name="checkout"><br>
<label for="diagnosis">Diagnosis:</label>
<textarea id="diagnosis" name="diagnosis" rows="4" cols="50"></textarea><br>
</div>
<p><input type=submit value=Add class="btn_1">
</form>
{%endblock content%}<file_sep>/program.py
from flask import Flask, render_template, url_for, request, redirect, flash, session
from dbcon import PostgresManagement
from src.forms import VariousForms
app = Flask(__name__)
app.secret_key = 'grimmteshco'
postgres = PostgresManagement()
forms = VariousForms()
login = False
@app.route('/login', methods=['GET', 'POST'])
def login():
error = None
if request.method == 'POST':
if request.form['username'] != 'admin' and \
request.form['password'] != '<PASSWORD>':
error = 'Invalid credentials'
else:
login = True
flash('You were successfully logged in')
return redirect(url_for('index'))
return render_template('pages/login.html', error=error)
@app.route('/')
def index():
patient = postgres.findPatients()
count = postgres.findCountAll()
t, w, m, y = postgres.findSpecDate()
return render_template('index.html', patient=patient, count=count, t=t, w=w, m=m, y=y)
@app.route('/people')
def people():
person = postgres.findUsers()
return render_template('pages/people.html', person=person)
@app.route('/patients')
def patients():
patient = postgres.findPatients()
return render_template('pages/patients.html', patient=patient)
@app.route('/doctors')
def doctors():
person = postgres.findDoctors()
return render_template('pages/doctors.html', person=person)
@app.route('/nurses')
def nurse():
person = postgres.findNurse()
return render_template('pages/nurse.html', person=person)
@app.route('/pharmacy')
def pharmacies():
pharmacy = postgres.findPharmacy()
return render_template('pages/pharmacy.html', pharmacy=pharmacy)
@app.route('/cashier')
def cashier():
person = postgres.findCashier()
return render_template('pages/cashier.html', person=person)
@app.route('/transactions')
def transactions():
transaction = postgres.findTransactions()
return render_template('pages/transactions.html', transaction=transaction)
@app.route('/new_person', methods=['GET', 'POST'])
def new_person():
if request.method == 'POST' and len(request.form) > 0:
forms.addNewPerson(request)
return redirect(url_for('people'))
return render_template('forms/new_person.html')
@app.route('/new_doctor', methods=['GET', 'POST'])
def new_doctor():
person = postgres.findUsers()
if request.method == 'POST' and len(request.form) > 0:
forms.addNewDoctor(request)
return redirect(url_for('doctors'))
return render_template('forms/new_doctor.html', person=person)
@app.route('/new_nurse', methods=['GET', 'POST'])
def new_nurse():
person = postgres.findUsers()
if request.method == 'POST' and len(request.form) > 0:
forms.addNewNurse(request)
return redirect(url_for('nurse'))
return render_template('forms/new_nurse.html', person=person)
@app.route('/new_cashier', methods=['GET', 'POST'])
def new_cashier():
person = postgres.findUsers()
if request.method == 'POST' and len(request.form) > 0:
forms.addNewCashier(request)
return redirect(url_for('cashier'))
return render_template('forms/new_cashier.html', person=person)
@app.route('/new_patient', methods=['GET', 'POST'])
def new_patient():
person = postgres.findUsers()
if request.method == 'POST' and len(request.form) > 0:
forms.addNewPatient(request)
return redirect(url_for('patients'))
return render_template('forms/new_patient.html', person=person)
@app.route('/new_pharmacy', methods=['GET', 'POST'])
def new_pharmacy():
if request.method == 'POST' and len(request.form) > 0:
forms.addNewPharmacy(request)
return redirect(url_for('new_pharmacy'))
return render_template('forms/new_pharmacy.html')
@app.route('/new_transaction', methods=['GET', 'POST'])
def new_transaction():
person = postgres.findUsers()
cashier = postgres.findCashier()
pharmacy = postgres.findPharmacy()
if request.method == 'POST' and len(request.form) > 0:
forms.addNewTransaction(request)
return redirect(url_for('transactions'))
return render_template('forms/new_transaction.html', person=person, cashier=cashier, pharmacy=pharmacy)
@app.route('/testSelect')
def tesSelect():
person = postgres.findUsers()
return render_template('forms/new_doctor.html', person=person)
if __name__ == '__main__':
app.run(debug=True)
<file_sep>/objectMDB/objdatabase/testdata.sql
delete from PATIENTBOOK;
delete from CASHREGISTER;
delete from NURSE;
delete from PATIENT;
delete from LOGIN;
delete from CASHIER;
delete from PHARMACY;
delete from DOCTOR;
delete from PERSON;
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (4, 'G42LqW', 'A0Lot2', 'WxKC8d', 'F1lnQE', 'FWOGMi', 'ADADMU', '6J6rie', 'H');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (13, 'S5l fs', 'J8 2sX', 'QgJq7s', 'Nhhdr9', 'Uewl2A', 'YEJ2hM', '3lm7tn', 'I');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (12, '7N7Nfk', 'CSw4KE', 'RaLqrO', 'Fi8iCX', 'I3YZ0O', 'Ka9Q0V', 'YPqsXa', ' ');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (10, 'S tk5L', '7DR6oG', 'G2VJ8p', 'JZXSeP', 'PWxI4i', 'Ts1L8p', '617 vc', '0');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (17, 'YPB1MH', 'SFXpag', 'QSR20u', 'O4vskn', 'Rv2neq', '7F2xMt', '6AODbF', '1');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (14, 'M1jkZ4', '1QlKhG', '293mGV', 'ET2I7C', 'OCnRen', 'W3yaJo', '4XHFMY', '2');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (7, '4pK7PI', 'OcP7xJ', '8HtDCJ', 'MKCYTY', 'DLAGOx', 'Lo qIt', 'E4ZhpT', '3');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (1, 'OKwERi', 'OUyKDq', 'JDnqmy', 'EJBXfr', 'ER9O9H', 'Wf9JfI', 'IH6eZn', '4');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (6, '<NAME>', 'LRVMRR', '3BNXkj', 'LeAhEY', 'Lx5vrs', 'CIhQ7q', 'Mv14dE', '5');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (11, '1UeZZs', 'Rermi3', 'DCRChZ', 'W6JMHb', 'VZ9xuI', 'Tt3K9Q', 'Xfccwx', '6');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (8, 'PVpb7E', 'FMvD 9', 'FhSOf5', '0CGF7X', 'Jytv3n', 'XWtedm', 'PfpfZv', '7');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (15, '7ZkUND', 'B1BeBt', 'Rorb7M', '4lFSGf', '1nGd7h', '07MVKi', 'DvPSNO', '8');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (19, 'BQ9Gae', '1mkiD ', '1HFckq', 'T4EFIZ', 'XZnkIq', 'Rg7jUp', 'NN 6QX', '9');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (16, 'OaptUC', 'J0oaJq', '91gTik', '2ci3Jj', 'EU9055', '971e3M', 'YK5IoY', 'A');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (18, 'ET2s1T', 'MgN4K1', 'Y4lCD ', 'JSQNJm', 'UM5Yfj', '9YrDSk', 'EYAvss', 'B');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (5, 'Ry1aob', 'UK2txR', 'KdNw0T', '1PW25t', 'SVjFti', 'EXjTLS', '7gOuPK', 'C');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (9, 'UTlEwU', 'DaukZS', 'Ey9g d', 'W9mXbx', 'Ow Jts', 'JkGKfD', '81vPBH', 'D');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (2, 'Rc1L8y', 'Y<NAME>', 'AuLhUf', '3BHqLb', 'B0Hmyl', 'IcguDw', 'ElBial', 'E');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (3, '1mNrTG', 'NgtguS', 'RZCc65', 'C4NKX6', 'VdcpeO', 'GpOoNb', 'KuWbd4', 'F');
insert into PERSON (ID_PERSON, NAME, SURNAME, TYPE, PHONE, POBOX, EMAIL, HOME, PHOTO) values (0, '77ESAE', 'CT4s1P', 'GjlDxg', 'R3aTw ', '56kFUt', 'Rxu7A ', 'GqSG4v', 'G');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (3, 4, 'P7djJ9', '2020-5-22 13:16:1', '2020-2-13 8:54:9');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (6, 7, '4AFKTT', '2019-6-28 0:59:4', '2020-5-7 12:30:0');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (4, 2, 'S1K4Xd', '2020-9-24 17:31:17', '2020-9-17 17:15:37');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (8, 19, ' jTTuX', '2020-1-24 8:7:0', '2019-6-24 0:57:29');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (16, 7, 'S yIy5', '2020-12-10 19:11:58', '2019-5-20 0:0:0');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (2, 12, 'EpOiAc', '2020-2-21 9:9:29', '2019-8-7 2:28:9');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (9, 17, 'D3bB40', '2020-7-8 14:52:16', '2019-10-26 5:11:42');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (18, 14, 'S0H7uI', '2020-11-6 18:33:9', '2020-8-5 15:40:47');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (19, 7, 'JsM19G', '2021-2-14 21:11:11', '2020-12-2 19:29:6');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (14, 2, 'WQmsU5', '2019-12-9 7:20:24', '2021-3-1 21:59:1');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (1, 9, 'UOHLCY', '2019-10-7 5:9:58', '2020-6-22 14:2:3');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (11, 4, '8gwd2w', '2019-5-20 0:0:0', '2019-9-13 3:58:0');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (10, 17, 'EVxJJD', '2019-7-22 2:20:12', '2020-1-8 7:55:6');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (13, 17, 'VPyApw', '2020-8-12 16:23:14', '2019-11-24 6:29:48');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (12, 1, 'E0k L5', '2021-1-23 20:25:40', '2020-3-28 10:54:1');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (15, 12, 'OCghUU', '2021-3-5 22:33:30', '2020-3-7 9:35:7');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (7, 9, 'WyB39a', '2019-8-25 3:34:26', '2021-1-8 20:49:56');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (17, 12, '0LiEhC', '2019-11-11 6:14:48', '2021-4-14 22:37:40');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (5, 19, 'VwiGNE', '2020-4-12 11:40:0', '2020-10-17 18:7:12');
insert into DOCTOR (ID_DOCTOR, ID_PERSON, SPECIALITY, HOURSSTART, HOURSEND) values (0, 12, 'V907aZ', '2020-3-11 10:45:58', '2020-2-13 8:54:9');
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (1, 'TPWSP0', 0, 7);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (12, 'MucTLU', 18, 12);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (7, 'WBSgEC', 2, 11);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (6, ' PuPZX', 4, 9);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (4, 'PYxGQX', 17, 6);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (17, 'PTfH93', 6, 10);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (13, 'NIs2V ', 5, 13);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (18, '6phZuX', 12, 0);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (19, '4ipEa8', 7, 15);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (3, 'IiNSws', 19, 1);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (0, 'C4KVLP', 16, 2);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (14, '5Bfmhk', 13, 14);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (9, 'LCAs7A', 8, 4);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (11, 'TEDFNs', 14, 8);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (10, 'Q6FK6i', 9, 19);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (15, 'SofoKL', 1, 3);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (16, 'L r3Cc', 15, 16);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (8, 'BMkxIT', 11, 18);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (5, 'XbonDn', 10, 17);
insert into PHARMACY (ID_PRODUCT, NAME, PRICE, STOCK) values (2, 'DlLbTZ', 3, 5);
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (7, 4, '4ttEQd', '2020-9-18 12:51:39', '2019-5-20 0:0:0');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (11, 5, 'LJqJOI', '2020-6-24 9:57:43', '2019-11-28 7:28:4');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (17, 11, '7hQWiC', '2019-8-11 1:56:36', '2019-9-23 4:39:7');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (14, 11, 'TLiwjj', '2019-11-28 4:32:25', '2020-2-7 11:56:3');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (0, 14, 'Q1b7RM', '2020-5-4 9:15:34', '2020-4-3 14:15:19');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (6, 18, '19xnMH', '2020-8-3 12:11:4', '2019-10-15 5:49:52');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (16, 11, 'W 3uXK', '2020-10-29 13:57:36', '2020-7-4 16:58:34');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (4, 4, 'XrU2ey', '2021-3-9 17:2:44', '2019-9-3 3:22:39');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (13, 11, 'D7OZcd', '2021-1-30 16:2:54', '2021-1-22 23:49:59');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (12, 13, 'BeEv7X', '2019-11-9 3:57:9', '2019-7-3 0:56:48');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (1, 17, 'U9Yi6u', '2020-2-2 6:30:14', '2020-10-4 19:13:15');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (19, 9, 'JldA87', '2020-3-20 7:56:44', '2020-1-16 10:18:20');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (9, 9, 'IPdFN4', '2021-4-21 18:11:4', '2020-3-14 12:58:2');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (15, 5, 'AR8MYa', '2019-9-26 3:7:55', '2020-11-18 19:55:56');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (10, 15, 'IKwskN', '2019-6-22 0:41:13', '2019-8-6 1:47:25');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (2, 13, 'GLOEkn', '2020-12-25 15:15:15', '2020-8-27 17:49:26');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (18, 8, 'FIi15T', '2020-7-12 10:31:26', '2021-1-4 22:19:38');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (3, 19, 'H8CgCO', '2019-5-20 0:0:0', '2020-12-13 20:50:1');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (8, 6, 'APa1dH', '2020-11-29 14:31:40', '2020-5-17 15:31:22');
insert into CASHIER (ID_CASHIER, ID_PERSON, PASSWORD, HOURSSTART, HOURSEND) values (5, 15, 'ALJPDc', '2020-1-3 5:21:17', '2019-12-27 8:41:47');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (1, 4, '1', '<PASSWORD>');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (17, 3, '2', '<PASSWORD>');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (8, 15, '3', '<PASSWORD>');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (7, 2, '4', ' <PASSWORD>');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (15, 6, '5', 'OFpGt ');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (2, 6, '6', '<PASSWORD>');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (10, 10, '7', '<PASSWORD>');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (19, 8, '8', '<PASSWORD>');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (14, 4, '9', '<PASSWORD>');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (18, 6, 'A', 'NK SZk');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (11, 10, 'B', '<PASSWORD>');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (9, 4, 'C', '<PASSWORD>');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (6, 19, 'D', '<PASSWORD>');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (4, 17, 'E', '<PASSWORD>');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (12, 16, 'F', '<PASSWORD>');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (13, 3, 'G', '<PASSWORD>');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (16, 14, 'H', '<PASSWORD>');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (5, 7, 'I', ' <PASSWORD>');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (3, 6, ' ', '<PASSWORD>');
insert into LOGIN (ID_LOGIN, ID_PERSON, USERNAME, PASSWORD) values (0, 2, '0', '<PASSWORD>');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (14, 4, '2020-6-11 13:5:59', 17, '12:53:30', 'AvJT1e');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (10, 6, '2020-12-8 18:14:18', 9, '18:8:25', 'QMg2Ea');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (7, 7, '2021-4-23 20:57:57', 7, '11:17:36', 'VhQMuR');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (8, 15, '2020-9-8 15:35:50', 14, '3:10:52', 'PKm3HC');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (6, 17, '2021-1-28 19:26:29', 1, '4:18:16', ' lNaXI');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (5, 19, '2020-5-18 12:24:4', 6, '0:0:0', 'NZ061n');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (1, 14, '2019-6-12 1:30:34', 5, '5:20:13', 'IGNRTq');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (18, 1, '2019-10-25 5:33:49', 10, '10:0:47', 'X0KJgp');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (15, 17, '2019-7-16 2:41:51', 0, '7:4:54', 'NofywC');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (13, 4, '2019-12-31 8:8:42', 11, '16:43:4', '3q457l');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (3, 18, '2020-1-28 9:47:52', 2, '6:13:58', 'PgVhEf');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (11, 6, '2021-3-18 20:13:22', 19, '0:51:17', 'ZfAxJr');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (2, 3, '2020-11-6 17:26:27', 3, '9:20:37', 'HfmqJm');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (12, 16, '2019-5-20 0:0:0', 4, '1:42:22', 'K5ZIsN');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (4, 17, '2019-11-18 6:42:10', 13, '8:12:44', 'E9rm1R');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (19, 11, '2019-9-5 4:14:39', 12, '19:23:40', 'ND6jUC');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (17, 3, '2020-2-22 10:58:55', 18, '14:18:53', 'Dhjasl');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (9, 4, '2020-8-1 14:40:43', 16, '12:6:4', 'ICGFn ');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (0, 12, '2020-10-12 16:32:46', 15, '2:23:4', 'De0bUG');
insert into PATIENT (ID_PATIENT, ID_PERSON, DATE, ROOMNUMBER, CHECKOUT, DIAGNOSIS) values (16, 15, '2020-3-30 11:45:46', 8, '15:49:39', 'R KFjB');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (18, 4, '2019-5-20 0:0:0', '2020-5-17 10:52:48');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (3, 15, '2020-9-27 16:27:42', '2020-10-10 15:3:25');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (8, 10, '2020-4-20 9:40:59', '2021-4-29 21:48:28');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (13, 6, '2020-2-28 7:28:2', '2019-9-25 3:58:45');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (9, 14, '2020-7-12 14:25:41', '2020-6-14 11:33:58');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (6, 4, '2021-1-22 20:59:24', '2019-9-5 3:3:54');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (7, 15, '2019-7-5 0:56:14', '2021-1-18 18:5:3');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (5, 6, '2020-5-8 11:8:0', '2021-2-10 19:13:3');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (10, 9, '2020-8-10 15:10:13', '2021-3-31 20:40:48');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (19, 2, '2020-3-26 8:23:49', '2019-12-17 5:50:50');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (11, 12, '2021-2-18 21:47:0', '2020-4-11 9:37:11');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (16, 16, '2019-8-21 1:29:45', '2020-12-3 16:29:21');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (0, 6, '2020-6-21 12:49:10', '2020-2-7 7:24:9');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (15, 10, '2019-12-25 5:7:49', '2019-5-20 0:0:0');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (17, 18, '2020-1-15 6:7:2', '2020-7-30 13:0:38');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (4, 10, '2020-12-7 18:45:34', '2019-10-28 4:57:28');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (2, 9, '2019-9-22 2:34:52', '2019-7-13 1:34:38');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (1, 4, '2020-11-1 17:45:12', '2020-8-20 13:35:10');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (12, 16, '2021-1-3 19:59:17', '2020-12-25 17:15:54');
insert into NURSE (ID_NURSE, ID_PERSON, HOURSSTART, HOURSEND) values (14, 12, '2019-11-12 4:9:37', '2020-3-19 8:25:41');
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (7, 1, 7, 4, 12, '2019-5-20 0:0:0', 5);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (5, 1, 13, 8, 15, '2020-7-1 10:22:6', 13);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (6, 14, 13, 1, 1, '2020-1-18 6:57:34', 19);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (11, 17, 4, 5, 0, '2019-9-8 3:21:6', 7);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (14, 12, 0, 19, 13, '2020-9-12 12:20:20', 8);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (3, 5, 14, 2, 6, '2021-2-24 17:1:9', 9);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (16, 16, 7, 12, 11, '2020-10-12 13:31:17', 6);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (18, 19, 15, 19, 8, '2019-11-14 4:37:6', 2);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (9, 4, 15, 11, 5, '2020-5-20 9:36:5', 18);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (10, 11, 15, 16, 16, '2019-12-16 5:39:14', 4);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (1, 19, 8, 11, 9, '2019-9-26 4:1:15', 10);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (2, 14, 17, 15, 7, '2020-4-7 8:59:33', 15);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (15, 1, 9, 6, 10, '2020-2-14 7:33:17', 11);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (13, 13, 3, 1, 2, '2021-3-29 17:57:1', 14);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (19, 10, 11, 4, 18, '2020-7-25 11:6:23', 0);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (8, 5, 17, 17, 14, '2020-12-1 14:40:26', 16);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (17, 16, 3, 2, 3, '2019-7-19 1:43:23', 3);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (0, 19, 2, 2, 4, '2019-6-17 1:5:59', 17);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (12, 8, 7, 6, 19, '2021-5-6 18:45:59', 12);
insert into CASHREGISTER (ID_TRANSACTION, ID_PRODUCT, ID_CASHIER, ID_PERSON, AMOUNT, DATE, TOTAL) values (4, 3, 2, 16, 17, '2021-1-2 16:9:34', 1);
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (13, 14, 'A44lZ7', 'Jcu0oR', '2020-5-17 9:3:24', 'NpxPBH');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (5, 11, '5N7wC2', 'I0fDHZ', '2019-12-30 6:6:20', 'IiwT7P');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (9, 11, '8MKEWu', 'B U7qP', '2020-3-26 8:24:12', 'Eq2yit');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (4, 14, 'Sqq jl', 'OOrR9u', '2020-7-4 10:20:6', 'K6xCi4');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (7, 12, 'WsBqmd', 'FtaNCD', '2019-11-25 5:26:57', 'QqpbdE');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (11, 3, 'ZfqeFm', 'WCT 9w', '2019-10-9 4:13:30', 'B1dEMw');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (14, 12, 'R4mD8U', '7EZPFP', '2021-2-13 16:11:47', 'YRmg3Z');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (18, 19, 'Ej9PYZ', '9xjOG2', '2019-8-19 2:36:43', '6bItmK');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (0, 9, '9nOShF', '7R6nNw', '2021-3-10 17:7:31', 'VU1G3L');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (16, 13, 'Y87e9Q', 'YHti7C', '2019-7-10 1:7:6', 'FOhJ X');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (12, 3, 'Ole sV', 'OxUZhR', '2020-8-21 10:54:27', 'JOMLru');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (2, 19, 'Fyx oU', 'HGhJPe', '2021-5-1 18:29:37', 'Rx0oqg');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (3, 6, '5sqCCh', 'TqQbMf', '2020-9-13 12:30:11', 'Crun9N');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (10, 19, 'V20cLX', ' lUl7a', '2021-1-11 14:46:17', '6YQ6mS');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (17, 4, 'HYBYVO', ' eovHL', '2019-5-20 0:0:0', 'SFLgoF');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (8, 7, '841hQa', 'PfZ6vL', '2020-11-23 14:7:26', 'MffkAx');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (19, 19, 'Z5rsXv', 'VtFvQS', '2020-10-8 13:8:42', 'REcWe8');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (15, 12, 'IhPdEH', 'E1Jorc', '2020-2-18 7:22:2', 'TP9NIL');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (6, 19, 'DwVq8m', 'PI2Obj', '2020-5-17 9:3:24', 'ZBno69');
insert into PATIENTBOOK (ID_PATIENTBOOK, ID_PATIENT, DEPARTEMENT, DESCRIPTION, DATE, RESULTATS) values (1, 2, 'BOBjWt', 'Kyb w6', '2019-12-30 6:6:20', '1VdOhZ');
<file_sep>/src/forms.py
from credential__sql import PGPASSWORD
from flask.globals import request
from dbcon import PostgresManagement
from datetime import datetime
postgres = PostgresManagement()
class VariousForms():
def __init__(self) -> None:
pass
def newPerson(self,request):
name = request.form['fname']
surname = request.form['lname']
type = request.form['type']
phone = request.form['phone']
pobox = request.form['pobox']
addresse = request.form['adresse']
email = request.form['email']
return name,surname, type, phone, pobox, email, addresse
def addNewPerson(self,request):
postgres.addPerson(self.newPerson(request))
def newDoctor(self,request):
id_person = request.form['person']
speciality = request.form['speciality']
hoursstart = request.form['hoursstart']
hoursend = request.form['hoursend']
return id_person, speciality, hoursstart, hoursend
def addNewDoctor(self,request):
postgres.addDoctor(self.newDoctor(request))
def newNurse(self,request):
id_person = request.form['person']
hoursstart = request.form['hoursstart']
hoursend = request.form['hoursend']
return id_person, hoursstart, hoursend
def addNewNurse(self,request):
postgres.addNurse(self.newNurse(request))
def newCashier(self,request):
id_person = request.form['person']
password = request.form['<PASSWORD>']
hoursstart = request.form['hoursstart']
hoursend = request.form['hoursend']
return id_person, password, hoursstart, hoursend
def addNewCashier(self,request):
postgres.addCashier(self.newCashier(request))
def newPatient(self,request):
id_person = request.form['person']
date = request.form['checkin']
room = request.form['roomnumber']
checkout = request.form['checkout']
diagnosis = request.form['diagnosis']
return id_person, date, room, checkout,diagnosis
def addNewPatient(self,request):
postgres.addPatient(self.newPatient(request))
def newPharmacy(self,request):
name = request.form['name']
price = request.form['price']
stock = request.form['stock']
return name, price, stock
def addNewPharmacy(self,request):
postgres.addPharmacy(self.newPharmacy(request))
def newTransaction(self,request):
id_cashier = request.form['cashier']
id_product = request.form['product']
id_person = request.form['person']
amount = request.form['amount']
date = datetime.now()
date = date.strftime("%d-%b-%Y (%H:%M:%S.%f)")
total = postgres.getProductPrice(id_product)*float(amount)
return id_cashier, id_product, id_person, amount, date, total
def addNewTransaction(self,request):
postgres.addTransaction(self.newTransaction(request)) <file_sep>/README.md
# List and steps for the Implementation of a document management system.
## Prerequisites
* Power AMC for database design (Must be downloaded)
* SQL (Must be Studied)
* Flask and Python 3.7 for the Backend (Must be downloaded and setup)
* Anaconda and env (Must be downloaded)
* Javascript, HTML, CSS for the front end
## Required
* Visual Studio Code (Downloaded)
* PostGreSQL as databse
* Github (Setup)
* Trello (Setup)
## Processes
* We will start by designing an SQL database able to manage and store various documents. This database must support all the necessary informations. The images will be stored in a folder accessible by the database through location links.
* We will set up flask and various project routes.
* Design the web interface according to a sample video found online.
* Test everything.
### Introduction
This project is the implementation of a document management system. This deals with the health care industry. This is used to manage the information of patients and to keep track of them using various information gathered on them. This information can be accompanied by various visual items like CT Scans, X-ray scans etc. This system is to help ease the work flow in the health care industry and speed up operations in order to reduce casualties like not enough resources or information to process someone through the system. This will ease check in and check out operations and can also track all the monetary information of a patient.
<file_sep>/templates/forms/new_doctor.html
{%extends "layout.html"%} {%block content%}
<form method="POST">
<div class="form-group">
{% include 'includes/_input_select.html'%}
<label for="speciality">Speciality:</label><br>
<input type="text" class="form-control" id="speciality" name="speciality"><br>
<label for="hoursstart">Shift Start:</label>
<input type="datetime-local" id="hoursstart" name="hoursstart">
<label for="hoursend">Shift Start:</label>
<input type="datetime-local" id="hoursend" name="hoursend">
</div>
<p><input type=submit value=Add class="btn_1">
</form>
{%endblock content%}<file_sep>/templates/pages/patients.html
{%extends "layout.html"%} {%block content%}
{%include 'pages/page_layout.html'%}
<div class="add_button ml-10">
<a href="new_patient" data-target="new_patient" class="btn_1">Add New</a>
</div>
</div>
</div>
<!--/ menu -->
<div class="QA_table ">
<!-- table-responsive -->
<table class="table lms_table_active2">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Check-in</th>
<th scope="col">Room No</th>
<th scope="col">Check-out</th>
<th scope="col">Description</th>
<th scope="col">Book</th>
</tr>
</thead>
<tbody>
{% for j in range(patient|length) %}
<tr>
<th scope="row">
<div class="patient_thumb d-flex align-items-center">
<div class="student_list_img mr_20">
<img src="{{ url_for('static', filename='images/pataint.png')}}" alt="" srcset="">
</div>
{{patient.name[j]}} {{patient.surname[j]}}
</div>
</th>
<td>{{patient.date[j]}}</td>
<td>{{patient.roomnumber[j]}}</td>
<td>{{patient.checkout[j]}}</td>
<td>{{patient.diagnosis[j]}}</td>
<td>
<div class="amoutn_action d-flex align-items-center">
<a href="#" class="status_btn">Active</a>
<div class="dropdown ml-4">
<a class=" dropdown-toggle hide_pils" href="#" role="button" id="dropdownMenuLink"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-ellipsis-v"></i>
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuLink">
<a class="dropdown-item" href="#">View</a>
<a class="dropdown-item" href="#">Edit</a>
<a class="dropdown-item" href="#">Delete</a>
</div>
</div>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{%endblock content%}<file_sep>/credential__sql.py
PGHOST='localhost'
PGDATABASE='Hospital'
PGUSER='postgres'
PGPASSWORD='<PASSWORD>'
<file_sep>/src/functions.py
from dbcon import PostgresManagement
class Functions:
def __init__(self):
table = ''
def totalIncome(self,transactions):
postgresDB = PostgresManagement()
t,w,m,y = postgresDB.findSpecDate()
|
ebd1f9126e07ce7c50ca103d1d6f327c74b9f670
|
[
"Markdown",
"SQL",
"Python",
"HTML"
] | 11
|
Python
|
mujtaba193/Document_Management_System
|
fbc56eaf91a5b3c8287400b942ff25c47eb319bb
|
732671bcfa46ea1b90242530a9617721d2df6005
|
refs/heads/master
|
<file_sep>'use strict';
var timeElm = document.getElementById('time');
var doc = document.documentElement;
var clientWidth = doc.clientWidth;
var clientHeight = doc.clientHeight;
var pad = function pad(val) {
return val < 10 ? '0' + val : val;
};
var time$ = Rx.Observable.interval(1000).map(function () {
var time = new Date();
return {
hours: time.getHours(),
minutes: time.getMinutes(),
seconds: time.getSeconds()
};
}).subscribe(function (_ref) {
var hours = _ref.hours;
var minutes = _ref.minutes;
var seconds = _ref.seconds;
timeElm.setAttribute('data-hours', pad(hours));
timeElm.setAttribute('data-minutes', pad(minutes));
timeElm.setAttribute('data-seconds', pad(seconds));
});
var mouse$ = Rx.Observable.fromEvent(document, 'mousemove').map(function (_ref2) {
var clientX = _ref2.clientX;
var clientY = _ref2.clientY;
return {
x: (clientWidth / 2 - clientX) / clientWidth,
y: (clientHeight / 2 - clientY) / clientHeight
};
});
RxCSS({
mouse: RxCSS.animationFrame.withLatestFrom(mouse$, function (_, m) {
return m;
}).scan(RxCSS.lerp(0.2))
}, timeElm);<file_sep>package com;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.ArrayList;
public class ImgPage{
public String title;
public ArrayList<Img> imgl= new ArrayList<Img>();
public static ArrayList<ImgPage> pgl= new ArrayList<ImgPage>();
public void Imgep(){
pgl.clear();
String path = "D:\\myEclipse\\Photo\\WebRoot\\blog\\images\\img";
File f = new File(path);
File [] fileArray = f.listFiles();
for(File fp:fileArray){
if(fp.isDirectory()){
//
int i = 1;
Object [] mesArray = null;
//
ImgPage page = new ImgPage();
Img ti = null;
for(File ft:fp.listFiles()){
//¿ªÊ¼
if(ft.getName().indexOf("txt")>-1){
mesArray = getMessage(ft);
continue;
}
//½áÊø
ti=new Img();
ti.setPicPath("images/img/"+fp.getName()+"/"+ft.getName());
page.imgl.add(ti);
}
page.title = mesArray[0].toString();
for(Img e :page.imgl){
e.setContent(mesArray[i++].toString());
}
pgl.add(page);
}
}
}
@SuppressWarnings("null")
public Object[] getMessage(File f){
ArrayList<String>sta = new ArrayList<String>();
String [] ST = null;
try{
@SuppressWarnings("resource")
BufferedReader reader = new BufferedReader(new FileReader(f));
String str = reader.readLine();
while(str !=null){
sta.add(str);
str = reader.readLine();
}
}catch (Exception e){
e.printStackTrace();
}
return sta.toArray();
}
}
<file_sep>package com;
public class Img {
private String picPath;
private String content;
public String getPicPath(){
return picPath;
}
public String getContent(){
return content;
}
public void setPicPath(String path){
this.picPath = path;
}
public void setContent(String cont){
this.content = cont;
}
}
|
00b9e5834d2dd9a7f50732a5b499e62162e85546
|
[
"JavaScript",
"Java"
] | 3
|
JavaScript
|
BooMiny/photo-js-java
|
9765b78292eaecdfb0b49a8438292c490bbd982c
|
c0b768ecebe888e63e509499b8c63b0e01267625
|
refs/heads/master
|
<repo_name>gor08001/CS-313<file_sep>/upload_file.php
<?php
session_start();
$con = new mysqli("localhost", "usr", "<PASSWORD>","<PASSWORD>");
//Check Connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$allowedExts = array("gif", "jpeg", "jpg", "png","mp3","mpeg");
$temp = explode(".", $_FILES["file"]["name"]);
$extension = end($temp);
if ((($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "image/jpg")
|| ($_FILES["file"]["type"] == "image/pjpeg")
|| ($_FILES["file"]["type"] == "image/x-png")
|| ($_FILES["file"]["type"] == "image/png")
|| ($_FILES["file"]["type"] == "audio/mp3")
|| ($_FILES["file"]["type"] == "audio/mpeg"))
&& ($_FILES["file"]["size"] < 100000000)
&& in_array($extension, $allowedExts))
{
if ($_FILES["file"]["error"] > 0)
{
echo "Return Code: " . $_FILES["file"]["error"] . "<br>";
}
else
{
echo "Upload: " . $_FILES["file"]["name"] . "<br>";
echo "Type: " . $_FILES["file"]["type"] . "<br>";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>";
echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br>";
if (file_exists("images" . $_FILES["file"]["name"]))
{
echo $_FILES["file"]["name"] . " already exists. ";
}
else
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"upload/" . $_FILES["file"]["name"]);
echo "Stored in: " . "upload/" . $_FILES["file"]["name"];
// echo $_SESSION["sess_username"];
}
}
}
else
{
echo "Invalid file";
}
$b = $_SESSION['sess_username'];
$sql = "SELECT l.lib_id FROM library AS l"
." JOIN user AS u ON l.user_id = u.user_id"
." WHERE u.username = '$b'";
$libId = mysqli_query($con,$sql);
$result = array();
while($row = mysqli_fetch_array($libId))
{
$result[] = $row['lib_id'];
}
echo gettype($result[0]);
$media = $_POST['vault'];
if ($media === '1')
{
$psql = "SELECT pv.pv_id FROM picture_vault AS pv"
. " JOIN library AS l on pv.lib_id = l.lib_id"
. " WHERE l.lib_id = '$result[0]'";
echo '</br>';
$pvId = mysqli_query($con,$psql);
$pvResult = array();
while($rows = mysqli_fetch_array($pvId))
{
$pvResult[] = $rows['pv_id'];
}
$url = "upload/".$_FILES["file"]["name"];
$name = $_FILES["file"]["name"];
mysqli_query($con,"INSERT INTO picture (picName,pv_id,url)"
. " VALUES ('$name','$pvResult[0]','$url')");
}
elseif ($media === '2')
{
$ssql = "SELECT sv.sv_id FROM sound_vault AS sv"
. " JOIN library AS l on sv.lib_id = l.lib_id"
. " WHERE l.lib_id = '$result[0]'";
echo '</br>';
$svId = mysqli_query($con,$ssql);
$svResult = array();
while($rows = mysqli_fetch_array($svId))
{
$svResult[] = $rows['sv_id'];
}
$url = "upload/".$_FILES["file"]["name"];
$name = $_FILES["file"]["name"];
mysqli_query($con,"INSERT INTO sound (name,sv_id,url)"
. " VALUES ('$name','$svResult[0]','$url')");
}
elseif($media === '3')
{
header('Location: upload_video.php');
}
mysqli_close($con);
header("Location: upload.php");
?><file_sep>/cookie.php
<html>
<head>
</head>
<body>
<?php
if(!isset($_COOKIE['count']))
{
$cookie=1;
setcookie("count",$cookie);
?> <meta http-equiv="refresh" content="0;URL=survey.html">
<?php
}
else
{
?><meta http-equiv="refresh" content="0;URL=survey.php">
<?php
}
?>
</body>
</html><file_sep>/submit.php
<html>
<head>
<title>Results</title>
<link rel="stylesheet" type="text/css" href="index.css"/>
</head>
<body>
<header>
<div id="topHat">
<h1 id="title">Survey Results</h1>
</div>
<div id ="top-menu">
<ul>
<li><a href="index.html" class="navagation">
HOME</a></li>
<li><a href="assignments.html" class="navagation">
CS 313 ASSIGNMENTS</a></li>
</ul>
</div>
</header>
<div id="survey">
<?php
$fname="/var/www/html/results.txt";
$lines=file($fname, FILE_IGNORE_NEW_LINES);
$newVal=array_values($_POST);
$qu = 0;
for($i = 0; $i < 4; $i++)
{
if($newVal[$i] == "No")
$lines[$qu + 1] += 1;
else if($newVal[$i] =="yes")
$lines[$qu] += 1;
$qu +=2;
}
$fp=fopen($fname, "w+");
foreach($lines as $key => $value)
{
fwrite($fp,$value."\r\n");
}
fclose($file);
echo("<h3>Here are the results!</h3><br/>");
$q = 1;
for($j = 0; $j < 7; $j)
{
echo("Question " . $q . ":<br/>Yes: " .
$lines[$j++] . " No: " . $lines[$j++]
. "<br/>");
$q++;
}
?>
</div>
</body>
</html><file_sep>/homeVault.php
<?php
session_start();
if ($_SESSION['sess_username'] == '')
{
header("Location: login.html");
}
?>
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="index.css"/>
<title><?php echo $_SESSION["sess_username"]."'s Vault"?></title>
</head>
<body>
<header>
<div id="topHat">
<h1 id="title">
<?php echo $_SESSION["sess_username"]."'s Vault"?>
</h1>
</div>
<div id ='top-menu'>
<ul>
<li><a href="homeVault.php" class="navagation" id="selected">
Home</a></li>
<li><a href="pic.php" class="navagation">
Pictures</a></li>
<li><a href="sound.php" class="navagation">
Audio</a></li>
<li><a href="upload.php" class="navagation">
Upload</a></li>
<li><a href="logout.php" class="navagation">
Logout</a></li>
</ul>
</div>
</header>
<div id="content">
<div id="brief">
<pre>Welcome User,
This site is for educational purposes
only. Please refrain from uploading
any copyrighted material. To get
started click on the Upload tab.
Once their select a file to upload
and then select the media type. Most
image formats are supported, however
only mp3 files can currently be loaded
into the audio section.The Picture and
dio tabs will take you to the content
you have loaded. We cannot support
downloads at this time.
</pre>
</div>
</div>
<footer>
© 2014 Gorewicz
</footer>
</body>
</html><file_sep>/login.php
<?php
ob_start();
session_start();
$username = mysql_real_escape_string($_POST['username']);
$userPassword = $_POST['<PASSWORD>'];
$con = new mysqli("localhost", "usr", "php-pass","root");
//Check Connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$pass = mysqli_query($con,"SELECT password FROM user "
. "WHERE username = '$username'");
$result = array();
while($row = mysqli_fetch_array($pass))
{
$result[] = $row['password'];
}
$passW = (string) $result[0];
if ($userPassword != $passW)
{
header('Location: login.html');
}
else
{
session_regenerate_id();
$_SESSION['sess_username'] = $username;
session_write_close();
header("Location: homeVault.php");
}
?>
<file_sep>/register.php
<?php
$con = new mysqli("localhost", "usr", "php-pass","root");
//Check Connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$username = mysql_real_escape_string($_POST['username']);
$password = mysql_real_escape_string($_POST['password']);
$sql = "INSERT INTO user (username,password)"
. "VALUES ('$username','$password')";
if (!mysqli_query($con,$sql))
{
die('Error: ' . mysqli_error($con));
}
// echo "alert('1 record added')";
$ssql = mysqli_query($con,"SELECT user_id FROM user WHERE username = '$username'");
$result = array();
while($rows = mysqli_fetch_array($ssql))
{
$result[] = $rows['user_id'];
}
// echo '</br>'.$result[0].'</br>';
$lsql = "INSERT INTO library (user_id,name)"
. "VALUES ('$result[0]','Media')";
if (!mysqli_query($con,$lsql))
{
die('Error: ' . mysqli_error($con));
}
// echo "alert('1 record added')";
$a = $result[0];
// echo $a;
$vsql = mysqli_query($con,"SELECT lib_id FROM library "
. "WHERE user_id = '$a'");
$libs = array();
while($ows = mysqli_fetch_array($vsql))
{
// echo "hear";
$libs[] = $ows['lib_id'];
}
// echo $libs[0];
if(!mysqli_query($con,"INSERT INTO picture_vault (name,lib_id)"
. "VALUES ('pics','$libs[0]')"))
{
die('Error: ' . mysqli_error($con));
}
// echo "alert('1 record added')";
if(mysqli_query($con,"INSERT INTO sound_vault (name,lib_id)"
. "VALUES ('sound','$libs[0]')"))
{
// die('Error: ' . mysqli_error($con));
}
// echo "alert('1 record added')";
/*
if(mysqli_query($con,"INSERT INTO videoa_vault (name,lib_id)"
. "VALUES ('video','$libs[0]')"))
{
die('Error: ' . mysqli_error($con));
}
// echo "alert('1 record added')";
//*/
mysqli_close($con);
header("Location: login.html");
?>
<file_sep>/cookieDemo.php
<?php
$key = "visits";
$visits = 0;
if (isset($_COOKIE[$key]))
{
$visits = $_COOKIE[$key];
}
else
{
$visits = 0;
}
$visits++;
setcookie($key,$visits,time()+600);
?>
<!DOCTYPE html>
<html>
<head>
<title>
cookies
</title>
</head>
<body>
Cookies
<br/>
<?php
echo "You have visited the page $visits times";
?>
</body>
</html>
<file_sep>/welcome.php
<html>
<body>
Name: <?php echo htmlspecialchars($_POST["name"]); ?><br/>
Mail to: <?php echo htmlspecialchars($_POST["email"]); ?><br/>
Major: <?php echo $_POST["major"]; ?><br/>
Places visited: <?php
$array = $_POST["visted"];
foreach ($array as $value)
{
echo "<li>$value</li>";
}
?><br/>
Comments: <br/> <?php echo htmlspecialchars($_POST["comments"]); ?><br/>
</body>
</html><file_sep>/sound.php
<?php
session_start();
if ($_SESSION['sess_username'] == '')
{
header("Location: login.html");
}
$con = new mysqli("localhost", "usr", "php-pass","root");
//Check Connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
function getSound($con)
{
$user = $_SESSION['sess_username'];
$sql = "SELECT s.* FROM sound AS s JOIN sound_vault AS sv ON s.sv_id = sv.sv_id JOIN library AS l ON sv.lib_id = l.lib_id JOIN user AS u ON l.user_id = u.user_id WHERE u.username = '$user'";
$sou = mysqli_query($con,$sql);
$souArray = array();
while ($row = mysqli_fetch_array($sou))
{
$souArray[] = $row;
}
return $souArray;
}
$sound = getSound($con);
?>
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="index.css"/>
<title>Audio</title>
</head>
<body>
<header>
<div id="topHat">
<h1 id="title">
Audio Vault
</h1>
</div>
<div id ='top-menu'>
<ul>
<li><a href="homeVault.php" class="navagation">
Home</a></li>
<li><a href="pic.php" class="navagation" >
Pictures</a></li>
<li><a href="sound.php" class="navagation" id="selected">
Audio</a></li>
<li><a href="upload.php" class="navagation">
Upload</a></li>
<li><a href="logout.php" class="navagation">
Logout</a></li>
</ul>
</div>
</header>
<div id="content">
<div id="sound">
<?php
$num = 0;
foreach($sound as $s)
{
echo '<h4 style="color:white;">'.$s['name'].'</h4>';
echo '<audio controls>'
. '<source src="'.$s['url'].'" type="audio/mpeg">'
. '</audio>';
echo '<br/>';
}
?>
</div>
</div>
<footer>
© 2014 Gorewicz
</footer>
</body>
</html><file_sep>/survey.php
<?php
session_start();
$timeout = 600;
if(isset($_SESSION['timeout'])) {
$duration = time() - (int)$_SESSION['timeout'];
if($duration > $timeout) {
session_destroy();
session_start();
}
else {
echo '<script type="text/javascript" language="javascript">window.open("submit.php","_self");</script>';
}
}
$_SESSION['timeout'] = time();
ini_set('display_errors', 1);
error_reporting(E_ALL);
?>
<!DOCTYPE html>
<html>
<head>
<title>
PHP Survey
</title>
<link rel="stylesheet" type="text/css" href="index.css"/>
</head>
<body>
<header>
<div id="topHat">
<h1 id="title">Survey</h1>
</div>
<div id ="top-menu">
<ul>
<li><a href="index.html" class="navagation">
HOME</a></li>
<li><a href="assignments.html" class="navagation">
CS 313 ASSIGNMENTS</a></li>
</ul>
</div>
</header>
<div id="content">
<a href="submit.php" class="link">Survey Results</a>
<form id ="survey" action="submit.php" method="post">
Do you like going to the pool?
<input type="radio" name="pool" value="yes">Yes
<input type="radio" name="pool" value="No">No<br/>
Do you like Pizza?
<input type="radio" name="pizza" value="yes">Yes
<input type="radio" name="pizza" value="No">No<br/>
Can you ride a unicycle?
<input type="radio" name="uni" value="yes">Yes
<input type="radio" name="uni" value="No">No<br/>
Have you served a mission?
<input type="radio" name="mission" value="yes">Yes
<input type="radio" name="mission" value="No">No<br/>
<input type="submit" value="Submit Poll">
</form>
</div>
<footer>
© 2014 Gorewicz
</footer>
</body>
</html><file_sep>/search.php
<?php
$con = new mysqli("localhost", "usr", "php-pass","<PASSWORD>");
//Check Connection
if (mysqli_connect_errno())
{ echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
function getUser($con,$table)
{
$sql = mysqli_query($con,"SELECT * FROM $table");
$result = array();
while($row = mysqli_fetch_array($sql))
{
$result[] = $row;
}
return $result;
}
function getLibrary($con,$username)
{
$sql = mysqli_query($con,"SELECT * FROM user AS u "
. "join library AS l on u.user_id = l.user_id "
. "WHERE u.user_id = ".$username);
$result = array();
while($row = mysqli_fetch_array($sql))
{
$result[] = $row;
}
return $result;
}
function getPic($con)
{
$pic = mysqli_query($con,"SELECT * FROM picture");
$result = array();
while($row = mysqli_fetch_array($pic))
{
$result[] = $row;
}
return $result;
}
function getVideo($con)
{
$vid = mysqli_query($con,"SELECT * FROM video");
$result = array();
while($row = mysqli_fetch_array($vid))
{
$result[] = $row;
}
return $result;
}
function getSound($con)
{
$sou = mysqli_query($con,"SELECT * FROM sound");
$result = array();
while($row = mysqli_fetch_array($sou))
{
$result[] = $row;
}
return $result;
}
$username = $_POST['user'];
$library = $_POST['library'];
$users = getUser($con,'user');
$lib = getLibrary($con,$username);
$pics = getPic($con);
$vid = getVideo($con);
$sou = getSound($con);
$val = $_POST['vaults'];
?>
<!doctype html>
<html>
<head>
<title> Database Search </title>
<link rel="stylesheet" type="text/css" href="index.css">
</head>
<body>
<header>
<div id="topHat">
<h1 id="title">Media Vault Search</h1>
</div>
<div id ='top-menu'>
<ul>
<li><a href="index.html" class="navagation">
HOME</a></li>
<li><a href="assignments.html" class="navagation">
CS 313 ASSIGNMENTS</a></li>
</ul>
</div>
</header>
<div id="content">
<form action="search.php" method="POST">
<div id="datauser">
<?php
echo '<select name="user">';
foreach ($users as $us)
{
echo '<option value="'.$us['user_id'].'">'.$us['username'].'</option>';
}
echo '</select>';
?>
</div>
<div>
<?php
echo '<select name="library">';
foreach ($lib as $l)
{
echo '<option value="'.$l['lib_id'].'">'.$l['name'].'</option>';
}
echo '</select>';
?>
</div>
<div>
<select name="vaults">
<option value="1">Picture Vault</option>
<option value="2">Sound Vault</option>
<option value="3">Video Vault</option>
</select>
</div>
<div>
<?php
if ($val == '1')
{
echo '<select name="picture">';
foreach ($pics as $p)
{
echo '<option value="'.$p['p_id'].'">'.$p['picName'].'</option>';
}
echo '</select>';
}
elseif ($val == '3')
{
echo '<select name="video">';
foreach ($vid as $v)
{
echo '<option value="'.$v['v_id'].'">'.$v['name'].'</option>';
}
echo '</select>';
}
elseif ($val == '2')
{
echo '<select name="video">';
foreach ($sou as $s)
{
echo '<option value="'.$s['s_id'].'">'.$s['name'].'</option>';
}
echo '</select>';
}
?>
</div>
<input type="submit"/>
</form>
</div>
<footer>
© 2014 Gorewicz
</footer>
</body>
</html><file_sep>/upload.php
<?php
session_start();
if ($_SESSION['sess_username'] == '')
{
header("Location: login.html");
}
?>
<!DOCTYPE html>
<html>
<head>
<title>
UPLOAD
</title>
<link rel="stylesheet" type="text/css" href="index.css"/>
</head>
<body>
<header>
<div id="topHat">
<h1 id="title">
UPLOAD
</h1>
</div>
<div id ='top-menu'>
<ul>
<li><a href="homeVault.php" class="navagation">
Home</a></li>
<li><a href="pic.php" class="navagation" >
Pictures</a></li>
<li><a href="sound.php" class="navagation">
Audio</a></li>
<li><a href="upload.html" class="navagation" id="selected">
Upload</a></li>
<li><a href="logout.php" class="navagation">
Logout</a></li>
</ul>
</div>
</header>
<div id="content">
<div id="info">
<form action="upload_file.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file"><br>
<label for="vault">Vault:</label>
<select name="vault">
<option value="1">Picture Vault</option>
<option value="2">Sound Vault</option>
<option value="3">Video Vault</option>
</select>
<input type="submit" name="submit" value="Submit">
</form>
</div>
</div>
<footer>
© 2014 Gorewicz
</footer>
</body>
</html><file_sep>/pic.php
<?php
session_start();
if ($_SESSION['sess_username'] == '')
{
header("Location: login.html");
}
$con = new mysqli("localhost", "usr", "php-pass","root");
//Check Connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
function getPics($con)
{
$user = $_SESSION['sess_username'];
$sql = "SELECT p.* FROM picture AS p JOIN picture_vault AS pv ON p.pv_id = pv.pv_id JOIN library AS l ON pv.lib_id = l.lib_id JOIN user AS u ON l.user_id = u.user_id WHERE u.username = '$user'";
$pics = mysqli_query($con,$sql);
$picsArray = array();
while ($row = mysqli_fetch_array($pics))
{
$picsArray[] = $row;
}
return $picsArray;
}
$picture = getPics($con);
?>
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="index.css"/>
<title>Pics</title>
</head>
<body>
<header>
<div id="topHat">
<h1 id="title">
Picture Vault
</h1>
</div>
<div id ='top-menu'>
<ul>
<li><a href="homeVault.php" class="navagation">
Home</a></li>
<li><a href="pic.php" class="navagation" id="selected">
Pictures</a></li>
<li><a href="sound.php" class="navagation">
Audio</a></li>
<li><a href="upload.php" class="navagation">
Upload</a></li>
<li><a href="logout.php" class="navagation">
Logout</a></li>
</ul>
</div>
</header>
<div id="content">
<div id="viewer">
<?php
$num = 0;
foreach($picture as $p)
{
echo '<img src="'.$p['url'].'" alt="'.$p['picName'].'" '
. ' class="picView">';
$num++;
if ($num > 4)
{
echo '<br/>';
$num = 0;
}
}
?>
</div>
</div>
<footer>
© 2014 Gorewicz
</footer>
</body>
</html>
|
d3383b2cf1bd0ff3f1b1e087e50121a6113b88ef
|
[
"PHP"
] | 13
|
PHP
|
gor08001/CS-313
|
46b00a978b439fa477e46ecbb38f6a6431ede904
|
26e95a6052eebf31cac899b5aa4455f41dc63395
|
refs/heads/master
|
<repo_name>nklnkl/csc326-lab3<file_sep>/polynomial.cpp
#include "polynomial.h"
Polynomial::Polynomial () {
size = 0;
coefficients = new int [size];
}
Polynomial::~Polynomial () {
delete [] coefficients;
}
bool Polynomial::add (int * addend, int addendSize) {
// To store the final answers.
int * sum;
int sumSize;
// If the current size does not exist or if the addend size is greater.
if ( !size || addendSize > size)
// Set the final size as such.
sumSize = addendSize;
// If the current size is greater.
else
// Set the final size as such.
sumSize = size;
// Allocate the new array with the appropriate size.
sum = new int [sumSize];
// Loop through the new array using the current size.
for (int i = 0; i < size; i++) {
*(sum + i) = 0;
*(sum + i) += *(coefficients + i);
}
// Loop through the new array using the addend's size.
for (int i = 0; i < addendSize; i++) {
*(sum + i) += *(addend + i);
}
delete [] coefficients;
size = sumSize;
coefficients = sum;
return true;
}
bool Polynomial::add (Polynomial * addend) {
return true;
}
int Polynomial::evaluate (int x) const {
int sum = 0;
for (int i = 0; i < size; i++) {
int coefficient = *(coefficients + i);
sum += coefficient * pow(x, i);
}
return sum;
}
string Polynomial::print () const {
// The string to be returned.
string str = "";
// Loop through the coefficients, backwards, since it goes from smallest to highest.
// and the general usage is usually to print them highest to smallest.
for (int i = size - 1; i > -1; i--) {
// If the current coefficient is not zero.
if (*(coefficients + i) != 0) {
// Append the coefficient's string version via ascii look up.
str += intToString( *(coefficients + i) );
// If the current index is not zero.
if (i != 0) {
str += "x";
// Append x ^ if not first degree.
if (i != 1)
str += "^" + intToString(i);
str += " + ";
}
}
}
return str;
}
int Polynomial::pow (int base, int exponent) const {
int total = 1;
for (int i = 0; i < exponent; i++)
total *= base;
return total;
}
int Polynomial::digitCount (int n) const {
if (n < 0) return -1;
if (n == 0) return 0;
if (n < 10) return 1;
if (n < 100) return 2;
if (n < 1000) return 3;
if (n < 10000) return 4;
if (n < 100000) return 5;
if (n < 1000000) return 6;
if (n < 10000000) return 7;
if (n < 100000000) return 8;
if (n < 1000000000) return 9;
return 10;
}
string Polynomial::intToString (int n) const {
// The length of the integer/digit count.
int count = digitCount (n);
// The string to return.
string str;
// Loop through the digit backwards to append the ascii char version to the string.
for (int i = 0; i < count; i++) {
str = ((char) (n % 10 + 48)) + str;
n = n / 10;
}
return str;
}
<file_sep>/reverse.cpp
#include "reverse.h"
Reverse::Reverse () {};
Reverse::~Reverse () {};
int Reverse::rev (int n, int m) {
switch (m) {
case 1:
return revI(n);
break;
case 2:
return revR(n, 0);
break;
default:
if (n > 0) return revI(n);
else return -1;
}
};
int Reverse::revI (int n) {
if (n == 0) return 0;
int r = 0;
for ( ; n != 0 ; ) {
r = r * 10;
r = r + n % 10;
n = n / 10;
}
return r;
};
int Reverse::revR (int n, int r) {
if (n == 0) return r;
r = r * 10;
r = r + n % 10;
n = n / 10;
revR(n, r);
}
<file_sep>/polynomial.h
#ifndef _POLYNOMIAL
#define _POLYNOMIAL
#include <string>
using namespace std;
class Polynomial {
public:
Polynomial ();
~Polynomial ();
bool add (int *, int);
bool add (Polynomial *);
int evaluate (int) const;
string print () const;
private:
int size;
int * coefficients;
int pow (int, int) const;
int digitCount (int) const;
string intToString (int) const;
};
#endif
<file_sep>/main.cpp
#include <iostream>
#include "reverse.cpp"
#include "polynomial.cpp"
using namespace std;
int reverse ();
int polynomials ();
int main () {
int command = 2;
while (command != 0) {
cout << "0) Exit" << endl << "1) Number reverse." << endl << "2) Polynomials" << endl;
cout << "Command: ";
cin >> command;
switch (command) {
case 0: {
cout << "Exiting." << endl;
break;
}
case 1: {
reverse();
break;
}
case 2: {
polynomials();
break;
}
default: {}
// Do nothing.
}
}
return 0;
};
int reverse () {
Reverse reverse;
int n = 0, m = 0;
cout << "Enter number: ";
cin >> n;
cout << "1) Interation." << endl << "2) Recursion." << endl << "Method: ";
cin >> m;
cout << "Reversed number: " << reverse.rev(n, m) << endl;
return 0;
}
int polynomials () {
// To hold command input for later usage.
int command;
// While command is greater than zero;
while (command > 0) {
cout << "0) Exit. " << endl << "1) Create 1 polynomial and evaluate it." << endl << "2) Create 2 polynomials and add them." << endl;
cout << "Command: ";
cin >> command;
// Handle command.
switch (command) {
// Create a polynomial, print it, and evaluate it.
case 1:
// Buffer for input.
int input;
// Get degree and coefficients.
cout << "Polynomial's highest degree: ";
cin >> input;
input += 1;
// Buffer for coefficients. input is currently the highest degree.
int * coefficients;
coefficients = new int [input];
cout << "From highest to lowest degree, enter the coefficients." << endl;
for (int i = input - 1; i > -1; i--) {
cout << "coefficient: ";
cin >> *(coefficients + i);
}
// Create the polynomial. input is currently the highest degree.
Polynomial * poly;
poly = new Polynomial ();
poly->add(coefficients, input);
// Print the poly.
cout << poly->print() << endl;
// Evaluate with x. input becomes the x for evaluation.
cout << "Evaluate for x." << endl;
cout << "x: ";
cin >> input;
cout << "Result: " << poly->evaluate(input) << endl;
// Clear buffer out of memory.
delete [] coefficients;
delete poly;
break;
case 2:
// Used for input.
int input1;
// The polynomial to be used for this case.
Polynomial * poly1;
poly1 = new Polynomial();
// Iteration for amount of polynomials to use.
for (int i = 0; i < 2; i++) {
// The buffer for the polynomial coefficients.
int * coeffs;
// Get highest degree for current polynomial and set array as so.
cout << "Polynomial " << i << "'s highest degree: ";
cin >> input1;
input1 +=1;
coeffs = new int [input1];
// Iterate to get coefficients.
for (int i = input1 - 1; i > -1; i--) {
cout << "coefficient: ";
cin >> *(coeffs + i);
}
poly1->add(coeffs, input1);
cout << poly1->print() << endl;
delete [] coeffs;
}
cout << poly1->print() << endl;
delete poly1;
break;
default:
command = 0;
break;
}
}
return 0;
}
<file_sep>/reverse.h
#ifndef _REVERSE
#define _REVERSE
class Reverse {
public:
Reverse();
~Reverse();
/*
Reverses an element numbers.
n: the number to be reversed.
m: m = 0 do by iteration, m = 1 do by recursion
*/
int rev (int n = 0, int m = 0);
private:
/*
Reverses a number by iteration.
*/
int revI (int n = 0);
/*
Reverses a number by recursion.
*/
int revR (int n, int r = 0);
};
#endif
|
a24820146aae636080c2928fc5901c9b301f3c2b
|
[
"C++"
] | 5
|
C++
|
nklnkl/csc326-lab3
|
324214fb49181bcfe1a7a6245cc2e933f12bce70
|
59d84d5fd511e78a137f8ed478fd619497a3f0f9
|
refs/heads/master
|
<repo_name>xiao233ming/autoEmail<file_sep>/auto_email.py
#! /usr/bin/env python
# -*- coding: UTF-8 -*-
import smtplib
from email.mime.text import MIMEText
mailto_list=["<EMAIL>","<EMAIL>","<EMAIL>"] #收件人(列表)
mail_host="smtp.163.com" #使用的邮箱的smtp服务器地址,这里是163的smtp地址
mail_user="<EMAIL>" #用户名
mail_pass="xx" #密码,开启stmp后,默认为授权码
mail_postfix="163.com" #邮箱的后缀,网易就是163.com
def send_mail(to_list,sub,content):
me="hello"+"<"+mail_user+"@"+mail_postfix+">"
msg = MIMEText(content,_subtype='plain')
msg['Subject'] = sub
msg['From'] = me
msg['To'] = ",".join(to_list) #将收件人列表以‘;’分隔
try:
server = smtplib.SMTP()
server.connect(mail_host) #连接服务器
server.login(mail_user,mail_pass) #登录操作
server.sendmail(me, to_list, msg.as_string())
server.close()
return True
except Exception as e:
print (str(e))
return False
for i in range(3): #发送1封,range代表发送次数;#邮件主题和邮件内容
word ='''
Hi,
I am <NAME> the newly appointed United Nations Inspection Agent in JFK Airport New York.
During our Investigation, we discovered An abandoned shipment on your name through a Diplomat from London.
which was transferred to our facility here in JF Kennedy Airport and when scanned it revealed an undisclosed
sum of money in a Metal Trunk Box weighing approximately 55kg each.
I beleived each of the boxes will contain more that $4M or above in each and the consignment is still left in
storage house till today through a registered shipping Company, Courier Dispatch Service Limited a division of
Tran guard LTD. The Consignment are two metal box with weight of about 55kg each (Internal dimension: W61 x H156
x D73 (cm). Effective capacity: 680 L.)Approximately.
The details of the consignment including your name the official document from United Nation office in London are
tagged on the Metal Trunk box.If you want us to transact the delivery for mutual benefit, you should provide your
Phone Number, full address, to cross check if it corresponds with the information on the official document, also
you should provide the name of nearest Airport around you and other details to me for onward delivery.
I want us to transact this business and share the money, since the shipper have abandoned it and ran away.I will
pay for the Non inspection fee and arrange for the boxes to be moved out of this Airport to your address, Once we
are through i will deploy the services of a secured shipping Company geared to provide the security it needs to
your doorstep or i can bring it by myself to avoid any more trouble. But we will share it 70% for you and 30%
for me. But you have to assure me of my 30%.
Do respond to my through my direct private email : <EMAIL> for more details.
Best Regards,
<NAME>
INSPECTION OFFICE
'''
if send_mail(mailto_list,"Surprise!",
word):
print ("done!")
else:
print ("failed!")<file_sep>/README.md
# autoEmail
懒人发邮件close
#伪造邮件opening
|
ae8326a56747a839d025c85cff221f89c69580f8
|
[
"Markdown",
"Python"
] | 2
|
Python
|
xiao233ming/autoEmail
|
569dacf18abb94c22d30f44749c28713e4903465
|
a861d876d63cf7d93e21555fcbf43d842c8f794f
|
refs/heads/master
|
<file_sep>from server.models.information import Information
class Dashboard():
def getWindVelocities(self):
return {"windVelocities": [0.5, 25.5, 50.5, 75.5, 100.5, 125.5, 150.5]}
def getWindDirection(self):
return {"windDirection": 45.0}
def getTemperature(self):
return {"temperature": 37.0}
def getTemperatures(self):
return {"temperatures": [-15.5, -5.5, 5.5, 15.5, 25.5, 35.5, 45.5]}
def getHumidities(self):
return {"humidities": [5, 20, 35, 50, 65, 80, 95]}
def getPressures(self):
return {"pressures": [950, 1000, 1050, 1100, 1150, 1200, 1250]}
def getClimates(self):
return {"climates": [0, 1, 2, 0, 1, 2, 0]}
def getRainFallHour(self):
return {"rainFallHou": 35.0}
def getRainFallDay(self):
return {"rainFallDay": 36.5}
def getDashboard(self):
dashboard = dict()
dashboard.update(self.getWindVelocities())
dashboard.update(self.getWindDirection())
dashboard.update(self.getTemperature())
dashboard.update(self.getTemperatures())
dashboard.update(self.getHumidities())
dashboard.update(self.getPressures())
dashboard.update(self.getClimates())
dashboard.update(self.getRainFallHour())
dashboard.update(self.getRainFallDay())
return dashboard
<file_sep># Weather-Station-Server<file_sep>from peewee import Model, BigIntegerField, FloatField, IntegerField
from server import db
class Information(Model):
captured_time = BigIntegerField()
climat = IntegerField()
temperature = FloatField()
pressure = FloatField()
humidity = FloatField()
wind_velocity = FloatField()
wind_direction = FloatField()
rain_fall = FloatField()
def serialize(self):
return {
'captured_time': self.captured_time,
'climat': self.climat,
'temperature': self.temperature,
'pressure': self.pressure,
'humidity': self.humidity,
'wind_velocity': self.wind_velocity,
'wind_direction': self.wind_direction,
'rain_fall': self.rain_fall,
}
class Meta:
database = db
<file_sep>from flask import Flask
from peewee import SqliteDatabase
db = SqliteDatabase("server/database/informations.db")
db.connect()
from server.models.information import Information
db.create_tables([Information])
app = Flask(__name__)
from server.routes import routes<file_sep>from flask_cors import cross_origin
from flask import jsonify, request
from server import app
from server.models.information import Information
from server.services.dashboard import Dashboard
@app.route('/dashboard', methods=['GET'])
@cross_origin(origin='')
def get_dashboard():
dashboard = Dashboard()
return jsonify(dashboard.getDashboard())<file_sep>from server.routes import dashboard
|
09ec18198b4a182a7cc38842b2daae6ac0f14157
|
[
"Markdown",
"Python"
] | 6
|
Python
|
petit-romain/Weather-Station-Server
|
929f4f30bbb309ae24fbe0084bc927a04609f6ba
|
cde5943cb8cc729b7fb8988344ddae87a639460c
|
refs/heads/master
|
<repo_name>r-jenish/SIC-Disassembler<file_sep>/disassembler.cpp
#include "disassembler.h"
#include "convertor.h"
#include "symtable.h"
#include "optable.h"
#include "util.h"
#include <string>
#include <fstream>
#include <sstream>
#include <iostream>
#include <iomanip>
using namespace std;
string programname;
int start_address;
int exe_address;
int prog_length;
int header_record[19];
bool recordflag[2] = {false,false};
int mem[65540][4]; /*mem[][0] = hexvalue mem[][1] = 1 =>inst and mem[][1] = 2 =>data mem[][2] = 0 => simple addressing else index based mem[][3] => visited or not*/
int end_record[7];
int vcounter = 0;
int icounter = 0;
void clearmem () {
for ( int i = 0; i < 65540; i++ ) {
mem[i][0] = -1;
mem[i][1] = -1;
mem[i][2] = 0;
mem[i][3] = 0;
}
}
void readinput ( char* input ) {
clearmem();
string line;
string hex = "00";
ifstream infile;
infile.open(input,ifstream::in);
if ( !infile.is_open() ) {
fatalerror("Unable to open input file.");
}
infileopened();
while ( getline(infile,line) ) {
if (line == "" ) continue;
switch ( line.at(0) ) {
case 'H':
if ( line.length() == 19 ) {
header_record[0] = 'H';
programname = "000000";
if ( !recordflag[0] ) {
for ( int i = 0; i < 6; i++ ) {
header_record[i+1] = line.at(i+1);
programname.at(i) = line.at(i+1);
}
hex = "";
for ( int i = 7; i < 13; i++ ) {
header_record[i] = line.at(i);
hex += line.at(i);
}
start_address = hex_to_int6(hex);
hex = "";
for ( int i = 13; i < 19; i++ ) {
header_record[i] = line.at(i);
hex += line.at(i);
}
prog_length = hex_to_int6(hex);
recordflag[0] = true;
} else {
fatalerror("MORE THAN ONE HEADER RECORD.");
}
} else {
fatalerror("HEADER RECORD NOT CORRECT.");
}
break;
case 'T':
int len;
hex = "";
hex += line.at(7);
hex += line.at(8);
len = hex_to_int(hex);
if ( line.length()-9 == len*2 ) {
hex = "000000";
int addr;
for ( int i = 0; i < 6; i++ ) {
hex.at(i) = line.at(i+1);
}
addr = hex_to_int6(hex);
for ( int i = 0; i < len; i++ ) {
hex = "";
hex += line.at(2*(i+4)+1);
hex += line.at(2*(i+5));
mem[addr][0] = hex_to_int(hex);
addr++;
}
} else {
fatalerror("TEXT RECORD NOT CORRECT.");
}
break;
case 'E':
if ( line.length() == 7 ) {
end_record[0] = 'E';
if ( !recordflag[1] ) {
hex = "";
for ( int i = 0; i < 6; i++ ) {
end_record[i+1] = line.at(i+1);
hex += line.at(i+1);
}
exe_address = hex_to_int6(hex);
recordflag[1] = true;
} else {
fatalerror("MORE THAN ONE END RECORD.");
}
} else {
fatalerror("END RECORD NOT CORRECT.");
}
break;
}
}
infile.close();
infileclosed();
mem[exe_address][1] = 1;
pass2(exe_address);
}
void pass2 ( int exeaddr ) {
mem[exeaddr][3] = 1;
int memvalue = mem[exeaddr][0];
string mnemonic = get_mnemonic(memvalue);
int index;
int effaddr;
if ( (mem[exeaddr+1][0]&128) == 128 ) {
index = 1;
mem[exeaddr][2] = 1;
effaddr = ((mem[exeaddr+1][0]&(127))*16*16) + mem[exeaddr+2][0];
} else {
index = 0;
mem[exeaddr][2] = 0;
effaddr = (mem[exeaddr+1][0]*16*16) + mem[exeaddr+2][0];
}
//cout << hex << exeaddr << " " << dec << mem[exeaddr][1] << " "<< hex << effaddr << dec << endl;
if ( mem[exeaddr][1] != 2 ) {
if ( mnemonic == "LDA" ||
mnemonic == "LDX" ||
mnemonic == "LDL" ||
mnemonic == "ADD" ||
mnemonic == "SUB" ||
mnemonic == "MUL" ||
mnemonic == "DIV" ||
mnemonic == "COMP" ||
mnemonic == "TIX" ||
mnemonic == "AND" ||
mnemonic == "OR" ) {
if ( mem[exeaddr+3][1] == -1) {
mem[exeaddr+3][1] = 1;
}
if ( mem[effaddr][0] == -1 ) {
mem[effaddr][0] = 0;
}
mem[effaddr][1] = 2;
mem[effaddr][2] = 0;
if ( get_label(effaddr) == -1 ) {
set_symtab(effaddr,vcounter,1);
vcounter++;
}
}
if ( mnemonic == "STA" ||
mnemonic == "STX" ||
mnemonic == "STL" ||
mnemonic == "STSW" ) {
if ( mem[exeaddr+3][1] == -1) {
mem[exeaddr+3][1] = 1;
}
if ( mem[effaddr][0] == -1 ) {
mem[effaddr][0] = 0;
}
mem[effaddr][1] = 2;
mem[effaddr][2] = 0;
if ( get_label(effaddr) == -1 ) {
set_symtab(effaddr,vcounter,1);
set_flag(effaddr);
vcounter++;
}
}
if ( mnemonic == "JEQ" ||
mnemonic == "JGT" ||
mnemonic == "JLT" ||
mnemonic == "JSUB" ||
mnemonic == "J" ) {
if ( mem[exeaddr+3][1] == -1) {
mem[exeaddr+3][1] = 1;
}
if ( get_label(effaddr) == -1 ) {
set_symtab(effaddr,icounter,3);
icounter++;
}
if ( mem[effaddr][1] == -1 && mem[effaddr][3] == 0) {
mem[effaddr][1] = 1;
pass2(effaddr);
}
}
if ( mnemonic == "LDCH" ) {
if ( mem[exeaddr+3][1] == -1) {
mem[exeaddr+3][1] = 1;
}
if ( mem[effaddr][0] == -1 ) {
mem[effaddr][0] = 0;
}
mem[effaddr][1] = 2;
mem[effaddr][2] = 0;
if ( get_label(effaddr) == -1 || get_status(effaddr) == 1) {
set_symtab(effaddr,vcounter,2);
vcounter++;
}
}
if ( mnemonic == "STCH" ) {
if ( mem[exeaddr+3][1] == -1) {
mem[exeaddr+3][1] = 1;
}
if ( mem[effaddr][0] == -1 ) {
mem[effaddr][0] = 0;
}
mem[effaddr][1] = 2;
mem[effaddr][2] = 0;
if ( get_label(effaddr) == -1 || get_status(effaddr) == 1) {
set_symtab(effaddr,vcounter,2);
set_flag(effaddr);
vcounter++;
}
}
if ( mnemonic == "RD" ||
mnemonic == "WD" ||
mnemonic == "TD" ) {
if ( mem[exeaddr+3][1] == -1) {
mem[exeaddr+3][1] = 1;
}
if ( mem[effaddr][0] == -1 ) {
mem[effaddr][0] = 0;
}
mem[effaddr][1] = 2;
mem[effaddr][2] = 0;
if ( get_label(effaddr) == -1 ) {
set_symtab(effaddr,vcounter,2);
vcounter++;
}
}
}
if ( mnemonic == "J" ||
mnemonic == "RSUB" ) {
if ( get_label(effaddr) == -1 && mnemonic == "J") {
set_symtab(effaddr,icounter,3);
icounter++;
}
return;
}
if ( mem[exeaddr+3][0] != -1 && mem[exeaddr+3][1] != -1 && mem[exeaddr+3][3] == 0 ) {
pass2(exeaddr+3);
}
}
void print () {
for ( int i = 0; i < 65540; i++ ) {
if ( mem[i][0] != -1 ) {
printf("%7X %3d %3d %3d\n",i,mem[i][0],mem[i][1],mem[i][2]);
}
}
}
void writeoutput (char * output) {
ofstream outfile;
outfile.open(output);
if ( !outfile.is_open() ) {
fatalerror("Unable to open output file.");
}
outfileopened();
stringstream stream;
string label;
string inst;
string operand;
bool flag = true;
int lastaddress;
int effaddr;
inst = "START";
char fill = ' ';
outfile << right << setw(4) << setfill('0') << hex << start_address << dec << left << " " << setw(7) << setfill(fill) << programname << " " << setw(6) << "START" << " " << setw(10) << hex << start_address << dec << endl;
//printf("%-10s %-6s %-10X\n",programname.c_str(),inst.c_str(),start_address);
for ( int i = start_address; i < start_address+prog_length; i = getnextaddr(i) ) {
if ( mem[i][1] == 1) {
if ( !flag ) {
outfile << endl;
}
if ( mem[i][0] != 76 ) {
if ( mem[i][2] == 1 ) {
effaddr = ((mem[i+1][0]&(127))*16*16) + mem[i+2][0];
} else {
effaddr = (mem[i+1][0]*16*16) + mem[i+2][0];
}
if ( mem[i][2] == 1 ) {
label = "";
if ( get_label(i) != -1 ) {
stream.str(std::string());
stream << "ins" << get_label(i);
label = stream.str();
}
inst = get_mnemonic(mem[i][0]);
stream.str(std::string());
stream << "var" << get_label(effaddr) << ",X";
operand = stream.str();
if ( i == exe_address ) label = "FIRST";
outfile << right << setw(4) << setfill('0') << hex << uppercase << i << dec << left << " " << setw(7) << setfill(fill) << label << " " << setw(6) << inst << " " << setw(10) << operand << endl;
//printf("%-10s %-6s %-10s\n", label.c_str(),inst.c_str(),operand.c_str());
} else {
label = "";
if ( get_label(i) != -1 ) {
stream.str(std::string());
stream << "ins" << get_label(i);
label = stream.str();
}
inst = get_mnemonic(mem[i][0]);
stream.str(std::string());
if ( mem[i][0] == 48 || mem[i][0] == 52 || mem[i][0] == 56 || mem[i][0] == 60 || mem[i][0] == 72 ) {
stream << "ins" << get_label(effaddr);
} else {
stream << "var" << get_label(effaddr);
}
operand = stream.str();
if ( i == exe_address ) label = "FIRST";
outfile << right << setw(4) << setfill('0') << hex << uppercase << i << dec << left << " " << setw(7) << setfill(fill) << label << " " << setw(6) << inst << " " << setw(10) << operand << endl;
//printf("%-10s %-6s %-10s\n", label.c_str(),inst.c_str(),operand.c_str());
}
} else {
label = "";
inst = "RSUB";
outfile << right << setw(4) << setfill('0') << hex << uppercase << i << dec << left << " " << setw(7) << setfill(fill) << label << " " << setw(6) << inst << endl;
//printf("%-10s %-6s\n\n", label.c_str(),inst.c_str());
}
flag = true;
} else {
if ( flag ) {
outfile << endl;
}
if ( get_status(i) == 1) {
if ( get_flag(i) == 0 ) {
if ( !wordorbyte(i) ) {
stream.str(std::string());
stream << "var" << get_label(i); //var label
label = stream.str();
inst = "WORD";
outfile << right << setw(4) << setfill('0') << hex << uppercase << i << dec << left << " " << setw(7) << setfill(fill) << label << " " << setw(6) << inst << " " << setw(10) << getinttoprint(i) << endl;
//printf("%-10s %-6s %-10d\n", label.c_str(),inst.c_str(),getinttoprint(i));
} else {
stream.str(std::string());
stream << "var" << get_label(i); //var label
label = stream.str();
inst = "BYTE";
operand = getbytetoprint(i);
outfile << right << setw(4) << setfill('0') << hex << uppercase << i << dec << left << " " << setw(7) << setfill(fill) << label << " " << setw(6) << inst << " " << setw(10) << operand << endl;
}
} else {
stream.str(std::string());
stream << "var" << get_label(i); //var label
label = stream.str();
inst = "RESW";
outfile << right << setw(4) << setfill('0') << hex << uppercase << i << dec << left << " " << setw(7) << setfill(fill) << label << " " << setw(6) << inst << " " << setw(10) << getnoofresword(i) << endl;
//printf("%-10s %-6s %-10d\n", label.c_str(),inst.c_str(),getnoofresword(i));
}
} else {
if ( get_flag(i) == 0 ) {
stream.str(std::string());
stream << "var" << get_label(i); //var label
label = stream.str();
inst = "BYTE";
operand = getbytetoprint(i);
outfile << right << setw(4) << setfill('0') << hex << uppercase << i << dec << left << " " << setw(7) << setfill(fill) << label << " " << setw(6) << inst << " " << setw(10) << operand << endl;
//printf("%-10s %-6s %-10s\n", label.c_str(),inst.c_str(),operand.c_str());
} else {
stream.str(std::string());
stream << "var" << get_label(i); //var label
label = stream.str();
inst = "RESB";
outfile << right << setw(4) << setfill('0') << hex << uppercase << i << dec << left << " " << setw(7) << setfill(fill) << label << " " << setw(6) << inst << " " << setw(10) << getnoofresbyte(i) << endl;
//printf("%-10s %-6s %-10d\n", label.c_str(),inst.c_str(),getnoofresbyte(i));
}
}
flag = false;
}
}
stream.str(std::string());
stream << "label" << get_label(exe_address);
label = "";
inst = "END";
operand = stream.str();
outfile << right << setw(4) << setfill(fill) << "" << left << " " << setw(7) << label << " " << setw(6) << inst << " " << setw(10) << /*operand*/"FIRST" << endl;
//printf("%-10s %-6s %-10s\n", label.c_str(),inst.c_str(),operand.c_str());
outfile.close();
outfileclosed();
}
int getnoofresword ( int addr ) {
int i = getnextaddr(addr);
i = i - addr;
if ( i%3 != 0 ) {
warningmessage("RESW must be a multiple of 3. Check the input file.");
}
i = i/3;
return i;
}
int getinttoprint ( int addr ) {
int i;
bool flag = false;
if ( (mem[addr][0] >> 7) & 1 ) {
flag = true;
}
mem[addr][0] = mem[addr][0]&127;
i = mem[addr][0]*16*16*16*16;
i += mem[addr+1][0]*16*16;
i += mem[addr+2][0];
if ( flag ) {
i -= (1<<23);
}
return i;
}
bool wordorbyte ( int addr ) {
int i = getnextaddr(addr);
bool flag = true;
int z;
for ( int j = addr; j < i; j++ ) {
z = mem[j][0];
if ( !( (z >= 'a' && z <= 'z') || (z >= 'A' && z <= 'Z') || (z >= '0' && z <= '9') ) ) {
flag = false;
break;
}
}
return flag;
}
int getnoofresbyte ( int addr ) {
int i = getnextaddr(addr);
i = i - addr;
return i;
}
string getbytetoprint( int addr ) {
int i = getnextaddr(addr);
bool flag = true;
string hex = "";
int z;
for ( int j = addr; j < i; j++ ) {
z = mem[j][0];
if ( !isprint(z) ) {
flag = false;
break;
}
}
if ( flag ) {
hex += "C'";
for ( int j = addr; j < i; j++ ) {
hex += mem[j][0];
}
hex +="'";
} else {
hex += "X'";
for ( int j = addr; j < i; j++ ) {
hex += int_to_hex(mem[j][0]);
}
hex +="'";
}
return hex;
}
int getnextaddr ( int addr ) {
int i = addr+1;
while ( (i < (prog_length+start_address)) && mem[i][1] == -1 ) {
i++;
}
return i;
}
<file_sep>/CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
project(SICDisassembler)
add_executable(sicdisassembler main.cpp convertor.cpp optable.cpp symtable.cpp disassembler.cpp util.cpp)
<file_sep>/optable.cpp
#include <string>
#include "optable.h"
std::string optab[256];
void initialise_optab ( void ) {
for ( int i = 0; i < 256; i++ ) {
optab[i] = "NULL";
}
optab[0] = "LDA";
optab[4] = "LDX";
optab[8] = "LDL";
optab[12] = "STA";
optab[16] = "STX";
optab[20] = "STL";
optab[24] = "ADD";
optab[28] = "SUB";
optab[32] = "MUL";
optab[36] = "DIV";
optab[40] = "COMP";
optab[44] = "TIX";
optab[48] = "JEQ";
optab[52] = "JGT";
optab[56] = "JLT";
optab[60] = "J";
optab[64] = "AND";
optab[68] = "OR";
optab[72] = "JSUB";
optab[76] = "RSUB";
optab[80] = "LDCH";
optab[84] = "STCH";
optab[216] = "RD";
optab[220] = "WD";
optab[224] = "TD";
optab[232] = "STSW";
}
std::string get_mnemonic ( int opcode ) {
return optab[opcode];
}
<file_sep>/symtable.cpp
#include "symtable.h"
#include "iostream"
int symtab[65540][3];
/*symtab[][1] = 0 => "UNKNOWN";
*symtab[][1] = 1 => "WORD";
*symtab[][1] = 2 => "BYTE";
*symtab[][1] = 3 => "INST";
*/
void initialise_symtab ( void ) {
for ( int i = 0; i < 65540; i++ ) {
symtab[i][0] = -1;
symtab[i][1] = 0;
symtab[i][2] = 0;
}
}
void set_symtab ( int addr, int counter, int status ) {
symtab[addr][0] = counter;
update_symtab(addr,status);
}
void update_symtab ( int addr, int status ) {
symtab[addr][1] = status;
}
void set_flag ( int addr ) {
symtab[addr][2] = 1;
}
int get_label ( int addr ) {
return symtab[addr][0];
}
int get_status ( int addr ) {
return symtab[addr][1];
}
int get_flag ( int addr ) {
return symtab[addr][2];
}
void printtable () {
std::cout << "----------------SYMTAB----------------\n";
for ( int i = 0; i < 65540; i++ ) {
if ( symtab[i][0] != -1 ) {
std::cout << std::hex << i << " ";
std::cout << std::dec << symtab[i][0] << " " << symtab[i][1] << " " << symtab[i][2] << std::endl;
}
}
}
<file_sep>/symtable.h
#ifndef _SYMTABLE_H_
#define _SYMTABLE_H_
void initialise_symtab(void);
void set_symtab(int,int,int);
void update_symtab(int,int);
void set_flag(int);
int get_label(int);
int get_status(int);
int get_flag(int);
void printtable();
#endif
<file_sep>/disassembler.h
#ifndef _DISASSEMBLER_H_
#define _DISASSEMBLER_H_
#include <string>
void readinput(char *);
void writeoutput(char *);
void pass2(int);
void print(void);
int getnoofresword(int);
int getinttoprint(int);
int getnoofresbyte(int);
std::string getbytetoprint(int);
int getnextaddr(int);
bool wordorbyte(int);
#endif
<file_sep>/util.h
#ifndef _UTIL_H_
#define _UTIL_H_
#include <string>
void displaytitle(void);
void fatalerror(std::string);
void warningmessage(std::string);
void displaylastmessage(void);
void infileopened(void);
void infileclosed(void);
void startingdisassembling(void);
void finishdisassembling(void);
void outfileopened(void);
void outfileclosed(void);
#endif
<file_sep>/util.cpp
#include "util.h"
#include <string>
#include <iostream>
#include <cstdlib>
#define KNRM "\x1B[0m"
#define KRED "\x1B[1;31m"
#define KGRN "\x1B[1;32m"
#define KYEL "\x1B[1;33m"
#define KBLU "\x1B[1;34m"
#define KMAG "\x1B[1;35m"
#define KCYN "\x1B[1;36m"
#define KWHT "\x1B[1;37m"
void displaytitle() {
std::cout << KRED
" ___ ___ ___ \n"KYEL
" / __||_ _|/ __| \n"KGRN
" \\__ \\ | || (__ \n"KBLU
" |___/|___|\\___| \n" KCYN
" ___ ___ ___ _ ___ ___ ___ __ __ ___ _ ___ ___ \n"KMAG
" | \\|_ _|/ __| /_\\ / __|/ __|| __|| \\/ || _ )| | | __|| _ \\\n"KRED
" | |) || | \\__ \\ / _ \\ \\__ \\\\__ \\| _| | |\\/| || _ \\| |__ | _| | /\n"KYEL
" |___/|___||___//_/ \\_\\|___/|___/|___||_| |_||___/|____||___||_|_\\\n"KGRN
" \n" KNRM;
}
void fatalerror(std::string err) {
std::cout << KRED << "- " << err << std::endl;
displaylastmessage();
exit(-1);
}
void warningmessage(std::string war) {
std::cout << KYEL << "! " << war << std::endl;
}
void infileopened() {
std::cout << KBLU << "+ Input object file successfully opened." << std::endl;
}
void infileclosed() {
std::cout << KGRN << "+ Input object file successfully closed." << std::endl;
}
void startingdisassembling() {
std::cout << KBLU << "+ Starting disassembling." << std::endl;
}
void finishdisassembling() {
std::cout << KGRN << "+ Finished disassembling and output has be written in ouputfile specified." << std::endl;
}
void outfileopened() {
std::cout << KBLU << "+ Output file successfully opened." << std::endl;
}
void outfileclosed() {
std::cout << KGRN << "+ Output file successfully closed." << std::endl;
}
void displaylastmessage() {
std::cout << KCYN << "=======Copyright (c) 2015 <NAME>=======" << KNRM << std::endl;
}
<file_sep>/main.cpp
#include <iostream>
#include <string>
#include "optable.h"
#include "convertor.h"
#include "symtable.h"
#include "disassembler.h"
#include "util.h"
int main (int argc, char *argv[]) {
displaytitle();
if ( argc == 3 ) {
startingdisassembling();
initialise_optab();
initialise_symtab();
readinput(argv[1]);
writeoutput(argv[2]);
finishdisassembling();
displaylastmessage();
} else {
fatalerror("TOO LESS ARGUMENTS.\nUsage:\t./sicdisassembler inputfile outputfile");
}
return 0;
}
<file_sep>/README.mkd
SIC Disassembler
================
SIC which stands for Simplified Instructional Computer is a hypothetical architecture that was used by <NAME> in his book 'System Software' to explain the concepts of assemblers, compilers and operating systems.
This project aims at disassembling the SIC object file.
COMPILATION
-----------
```
mkdir bin
cd bin/
cmake ..
make
```
USAGE
-----
In the bin folder execute the following command:
```
./sicdisassembler input-object-file ouput-file
```
LICENSE
-------
This software is licensed under MIT License. For more details, please refer to [License](LICENSE) file or at [jenish.mit-license.org](http://jenish.mit-license.org/).
<file_sep>/convertor.h
#ifndef _CONVERTOR_H_
#define _CONVERTOR_H_
#include <string>
std::string lower_to_upper(std::string);
int hex_to_int(std::string);
std::string int_to_hex(int);
int hex_to_int6(std::string);
#endif
<file_sep>/convertor.cpp
// assuming everything in lower case hex
#include <string>
#include "convertor.h"
std::string lower_to_upper ( std::string hex ) {
if ( hex.length() == 1 ) {
char x = hex.at(0);
hex = "0";
hex += x;
}
for ( int i = 0; i < 2; i++ ) {
if ( hex.at(i) >= 'a' && hex.at(i) <= 'f' ) {
hex.at(i) = hex.at(i) - 'a' + 'A';
}
}
return hex;
}
int hex_to_int ( std::string hex ) {
hex = lower_to_upper(hex);
int a[2];
int ans;
ans = 0;
for ( int i = 0; i < 2; i++ ) {
if ( hex.at(i) >= '0' && hex.at(i) <= '9' ) {
a[i] = hex.at(i) - '0';
} else if ( hex.at(i) >= 'A' && hex.at(i) <= 'F' ) {
a[i] = hex.at(i) - 'A' + 10;
}
}
ans = a[0]*16 + a[1];
return ans;
}
std::string int_to_hex ( int num ) {
int a[2];
a[0] = num/16;
a[1] = num%16;
std::string hex = "00";
for ( int i = 0; i < 2; i++ ) {
if ( a[i] < 10 ) {
hex.at(i) = a[i] + '0';
} else {
hex.at(i) = a[i] - 10 + 'A';
}
}
return hex;
}
int hex_to_int6 ( std::string hex ) {
hex = lower_to_upper(hex);
std::string temp = "00";
int a[3];
int ans;
for ( int i = 0; i < 3; i++ ) {
temp.at(0) = hex.at(2*i);
temp.at(1) = hex.at((2*i)+1);
a[i] = hex_to_int(temp);
}
ans = a[0]*16*16*16*16 + a[1]*16*16 + a[2];
return ans;
}
<file_sep>/optable.h
#ifndef _OPTAB_H_
#define _OPTAB_H_
#include <string>
void initialise_optab(void);
std::string get_mnemonic(int);
#endif
|
7094502c016e4763a519d5d747cae8439858db48
|
[
"Markdown",
"C",
"CMake",
"C++"
] | 13
|
C++
|
r-jenish/SIC-Disassembler
|
424b4cd627ed76978adc68603db260be0feedf31
|
23783ba91e312526d34f758ecb5ae74bbb5932e5
|
refs/heads/master
|
<repo_name>HappyDg/ledheadlampbasedonfk4<file_sep>/BSP/Include/SchM_BswM.h
/**********************************************************************************************************************
* COPYRIGHT
* -------------------------------------------------------------------------------------------------------------------
* Copyright (c) 2008-2011 by Vector Informatik GmbH. All rights reserved.
*
* This software is copyright protected and proprietary to Vector Informatik GmbH.
* Vector Informatik GmbH grants to you only those rights as set out in the license conditions.
* All other rights remain with Vector Informatik GmbH.
* -------------------------------------------------------------------------------------------------------------------
* FILE DESCRIPTION
* -------------------------------------------------------------------------------------------------------------------
* File: SchM_BswM.h
* Config: ECUC
* Generated at: 2011-05-03
*
* Author: visntr
*
* Description: Header of BSW Scheduler for BswM
* Mainfunctions:
* BswM_MainFunction() Cycle Time 20 ms Activation Offset 5 ms
*********************************************************************************************************************/
#ifndef SCHM_BSWM_H
#define SCHM_BSWM_H
#include "SchM.h"
#include "SchM_Types.h"
#include "SchM_Cfg.h"
#define BSWM_ACTIVATION_POINT_0 ACT_TIMEOUT_EVENT_20MS
#define SCHM_TIMER_OFFSET_BSWM ACT_TIMEOUT_EVENT_5MS
#define BSWM_EXCLUSIVE_AREA_0 SCHM_EA_SUSPENDALLINTERRUPTS
#define SCHM_BSWM_ENTER_CRITICAL_SECTION \
#define SCHM_BSWM_EXIT_CRITICAL_SECTION \
#define SCHM_BSWM_ENTER_MAINFUNCTION \
#define SCHM_BSWM_EXIT_MAINFUNCTION \
#if defined( __SCHM__ )
SCHM_DEFINE_TIMER(BSWM);
#define SCHM_TIMER_INIT_BSWM SCHM_TIMER_INIT(BSWM, SCHM_TIMER_OFFSET_BSWM)
#define SCHM_MAINFUNCTION_BSWM SCHM_MAINFUNCTION(BswM_MainFunction(), BSWM, BSWM_ACTIVATION_POINT_0)
#else /* __SCHM__ */
# define SchM_Enter_BswM(ExclusiveArea) \
SCHM_BSWM_ENTER_CRITICAL_SECTION \
SCHM_ENTER_EXCLUSIVE(ExclusiveArea)
# define SchM_Exit_BswM(ExclusiveArea) \
SCHM_BSWM_EXIT_CRITICAL_SECTION \
SCHM_EXIT_EXCLUSIVE(ExclusiveArea)
#endif /* __SCHM__ */
#endif /* SCHM_BSWM_H */
<file_sep>/BSP/MCAL/Dio/Dio_Cfg.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* File name = Dio_Cfg.h */
/* Version = 3.1.2 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains pre-compile time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.1.4
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_DIO_V308_140401_HEADLAMP.arxml
* GENERATED ON: 1 Apr 2014 - 10:46:38
*/
#ifndef DIO_CFG_H
#define DIO_CFG_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define DIO_CFG_AR_MAJOR_VERSION 2
#define DIO_CFG_AR_MINOR_VERSION 2
#define DIO_CFG_AR_PATCH_VERSION 0
/* File version information */
#define DIO_CFG_SW_MAJOR_VERSION 3
#define DIO_CFG_SW_MINOR_VERSION 1
/*******************************************************************************
** Common Published Information **
*******************************************************************************/
#define DIO_AR_MAJOR_VERSION_VALUE 2
#define DIO_AR_MINOR_VERSION_VALUE 2
#define DIO_AR_PATCH_VERSION_VALUE 0
#define DIO_SW_MAJOR_VERSION_VALUE 3
#define DIO_SW_MINOR_VERSION_VALUE 1
#define DIO_SW_PATCH_VERSION_VALUE 2
#define DIO_VENDOR_ID_VALUE 23
#define DIO_MODULE_ID_VALUE 120
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Instance ID of the DIO Driver */
#define DIO_INSTANCE_ID_VALUE 0
/* Pre-compile option for Development Error Detect */
#define DIO_DEV_ERROR_DETECT STD_OFF
/* Pre-compile option for Version Info API */
#define DIO_VERSION_INFO_API STD_OFF
/* Pre-compile option for presence of Channel */
#define DIO_CHANNEL_CONFIGURED STD_ON
/* Pre-compile option for presence of Channel Group */
#define DIO_CHANNELGROUP_CONFIGURED STD_ON
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Total number of configured ports */
#define DIO_MAXNOOFPORT (Dio_PortType)5
/* Total number of configured channels */
#define DIO_MAXNOOFCHANNEL (Dio_ChannelType)25
/* DIO Port Configuration Handles */
#define DioPort0 (Dio_PortType)0
#define DioPort1 (Dio_PortType)1
#define DioPort10 (Dio_PortType)2
#define DioPort25 (Dio_PortType)3
#define DioPort27 (Dio_PortType)4
/* DIO Channel Configuration Handles */
#define DioChannel0_0 (Dio_ChannelType)0
#define DioChannel0_10 (Dio_ChannelType)1
#define DioChannel0_7 (Dio_ChannelType)2
#define DioChannel10_10 (Dio_ChannelType)3
#define DioChannel10_11 (Dio_ChannelType)4
#define DioChannel1_10 (Dio_ChannelType)5
#define DioChannel1_11 (Dio_ChannelType)6
#define DioChannel1_12 (Dio_ChannelType)7
#define DioChannel1_7 (Dio_ChannelType)8
#define DioChannel1_8 (Dio_ChannelType)9
#define DioChannel1_9 (Dio_ChannelType)10
#define DioChannel25_1 (Dio_ChannelType)11
#define DioChannel25_10 (Dio_ChannelType)12
#define DioChannel25_11 (Dio_ChannelType)13
#define DioChannel25_12 (Dio_ChannelType)14
#define DioChannel25_13 (Dio_ChannelType)15
#define DioChannel25_14 (Dio_ChannelType)16
#define DioChannel25_5 (Dio_ChannelType)17
#define DioChannel25_6 (Dio_ChannelType)18
#define DioChannel25_7 (Dio_ChannelType)19
#define DioChannel25_8 (Dio_ChannelType)20
#define DioChannel25_9 (Dio_ChannelType)21
#define DioChannel27_0 (Dio_ChannelType)22
#define DioChannel27_1 (Dio_ChannelType)23
#define DioChannel27_2 (Dio_ChannelType)24
/* DIO Channel Group Configuration Handles */
#define DioChannelGroup0 (&Dio_GstChannelGroupData[0])
#define DioChannelGroup1 (&Dio_GstChannelGroupData[1])
#define DioChannelGroup10 (&Dio_GstChannelGroupData[2])
#define DioChannelGroup25 (&Dio_GstChannelGroupData[3])
#define DioChannelGroup27 (&Dio_GstChannelGroupData[4])
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* DIO_CFG_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/Common/interrupt.c
/*
*******************************************************************************
**
** Copyright(C) Renesas Electronics Corporation 2010
** All rights reserved by Renesas Electronics Corporation.
**
** Abstract :
**
** Last update: 2011/06/23
**
*******************************************************************************
*/
/*
*******************************************************************************
** Include files
*******************************************************************************
*/
#include "df4010_0.h"
#include "Std_Types.h"
#include "InterruptType.h"
/*
*******************************************************************************
** Global define
*******************************************************************************
*/
uint16 VeOS_w_UnitCount=0;
/*-----------------------------------------------------------------------------
**
** Abstract:
** This function implements initializes of interrupt.
**
** Parameters:
** None
**
** Returns:
** None
**
**-----------------------------------------------------------------------------*/
void InterruptSetup(void)
{
/* Flag Clear */
ICP0 &= 0xEFFF;
/* Mask Clear */
ICP0 &= 0xFF7F;
}
/*****************************************************************************/
/*---Application Vector ISR functions---*/
/*****************************************************************************/
#define CODE_START_ISR_SECT
#include "MemMap.h"
#if COMPILER_GHS
PRAGMA_INTERRUPT();
#elif COMPILER_CX
#pragma interrupt NO_VECT unused_isr
#endif
void unused_isr(void)
{
while(1){};
}
/*****************************************************************************/
/*--ICU ISR functions---*/
/*****************************************************************************/
__interrupt void Icu_Edge_Detect_1(void)
{
}
<file_sep>/BSP/MCAL/Generic/AUTOSAR_Types/mak/autosartypes_defs.mak
#######################################################################
# REGISTRY
#
CC_INCLUDE_PATH += $(AUTOSARTYPE_CORE_PATH)\inc $(GHS_CORE_PATH)\inc
CPP_INCLUDE_PATH +=
ASM_INCLUDE_PATH +=
PREPROCESSOR_DEFINES +=
#######################################################################
<file_sep>/APP/LEDPWMActOut/LEDPWMActOutRTE.c
#include "Std_Types.h"
#include "IoHwAb_Api.h"
#if 0
void IoHwAb_SetLED1(uint16 percent);
void IoHwAb_SetLED2(uint16 percent);
void IoHwAb_SetHighSpeed(uint16 percent);
void IoHwAb_BadWeather(uint16 percent);
void IoHwAb_SetLED3(uint16 percent);
void IoHwAb_SetTurnLamp(uint16 percent);
void IoHwAb_SetParkLamp(uint16 percent);
void IoHwAb_SetLowBeam1(uint16 percent);
void IoHwAb_SetLowBeam2(uint16 percent);
#endif
void SetParkLampOutPWMDuty(UINT8 value)
{
UINT16 L_DutyCycle;
L_DutyCycle=(0x8000-((0x8000U/100U)*((UINT16)value)));
IoHwAb_SetLowBeam1(L_DutyCycle);
IoHwAb_SetLowBeam2(L_DutyCycle);
}
void SetHighBeamOutPWMDuty(UINT8 value)
{
UINT16 L_DutyCycle;
L_DutyCycle=(0x8000-((0x8000U/100U)*((UINT16)value)));
IoHwAb_SetParkLamp(L_DutyCycle);
}
void SetLowBeam1OutPWMDuty(UINT8 value)
{
UINT16 L_DutyCycle;
L_DutyCycle=(0x8000-((0x8000U/100U)*((UINT16)value)));
IoHwAb_SetLED2(L_DutyCycle);
}
void SetLowBeam2OutPWMDuty(UINT8 value)
{
UINT16 L_DutyCycle;
L_DutyCycle=(0x8000-((0x8000U/100U)*((UINT16)value)));
IoHwAb_SetTurnLamp(L_DutyCycle);
}
void SetTurnLampOutPWMDuty(UINT8 value)
{
UINT16 L_DutyCycle;
L_DutyCycle=(0x8000-((0x8000U/100U)*((UINT16)value)));
IoHwAb_SetHighSpeed(L_DutyCycle);
}
void SetCornerLampOutPWMDuty(UINT8 value)
{
if(value>0)
{
IoHwAb_SetODH1(true);
}
else
{
IoHwAb_SetODH1(false);
}
}
void SetHighSpeedLightOutPWMDuty(UINT8 value)
{
UINT16 L_DutyCycle;
L_DutyCycle=(0x8000-((0x8000U/100U)*((UINT16)value)));
//IoHwAb_SetTurnLamp(L_DutyCycle);
}
void SetBadWeatherLightOutPWMDuty(UINT8 value)
{
UINT16 L_DutyCycle;
L_DutyCycle=(0x8000-((0x8000U/100U)*((UINT16)value)));
IoHwAb_SetLED1(L_DutyCycle);
}
<file_sep>/BSP/MCAL/Icu/Icu_Ram.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Icu_Ram.h */
/* Version = 3.0.1a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains Global variable declarations of ICU Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 26-Aug-2009 : Initial version
*
* V3.0.1: 28-Jun-2010 : As per SCR 286, precompile option is updated for
* the pointer variable "Icu_GpTAUUnitConfig" to
* support the use of Timer Array Unit B.
* V3.0.1a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
#ifndef ICU_RAM_H
#define ICU_RAM_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define ICU_RAM_AR_MAJOR_VERSION ICU_AR_MAJOR_VERSION_VALUE
#define ICU_RAM_AR_MINOR_VERSION ICU_AR_MINOR_VERSION_VALUE
#define ICU_RAM_AR_PATCH_VERSION ICU_AR_PATCH_VERSION_VALUE
/*
* File version information
*/
#define ICU_RAM_SW_MAJOR_VERSION 3
#define ICU_RAM_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
#define ICU_START_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* Global pointer variable for database */
extern P2CONST(Icu_ConfigType, ICU_CONST, ICU_CONFIG_CONST) Icu_GpConfigPtr;
/* Global pointer variable for channel configuration */
extern P2CONST(Tdd_Icu_ChannelConfigType, ICU_CONST, ICU_CONFIG_CONST)
Icu_GpChannelConfig;
/* Global pointer variable for Timer channel configuration */
extern P2CONST(Tdd_Icu_TimerChannelConfigType, ICU_CONST, ICU_CONFIG_CONST)
Icu_GpTimerChannelConfig;
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)||\
(ICU_TAUB_UNIT_USED == STD_ON))
/* Global pointer variable for ICU hardware unit configuration */
extern P2CONST(Tdd_Icu_TAUUnitConfigType, ICU_CONST, ICU_CONFIG_CONST)
Icu_GpTAUUnitConfig;
#endif
#if(ICU_PREVIOUS_INPUT_USED == STD_ON)
/* Global pointer variable for Previous input configuration */
extern P2CONST(Tdd_IcuPreviousInputUseType, ICU_CONST, ICU_CONFIG_CONST)
Icu_GpPreviousInputConfig;
#endif
/* Global pointer variable for channel RAM data */
extern P2VAR(Tdd_Icu_ChannelRamDataType, ICU_NOINIT_DATA, ICU_CONFIG_DATA)
Icu_GpChannelRamData;
/* Global pointer to the address of Edge Count RAM data */
extern P2VAR(Tdd_Icu_EdgeCountChannelRamDataType, ICU_NOINIT_DATA,
ICU_CONFIG_DATA) Icu_GpEdgeCountData;
/* Global pointer variable for Timestamp channel RAM data */
extern P2VAR(Tdd_Icu_TimeStampChannelRamDataType, ICU_NOINIT_DATA,
ICU_CONFIG_DATA) Icu_GpTimeStampData;
/* Global pointer to the address of Signal Measure RAM data */
extern P2VAR(Tdd_Icu_SignalMeasureChannelRamDataType, ICU_NOINIT_DATA,
ICU_CONFIG_DATA) Icu_GpSignalMeasurementData;
/* Holds the status of ICU Driver Component */
extern VAR(Icu_ModeType, ICU_NOINIT_DATA) Icu_GenModuleMode;
#define ICU_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
#define ICU_START_SEC_VAR_NOINIT_8BIT
#include "MemMap.h"
/* Global pointer variable for channel to timer mapping */
extern P2CONST(uint8, ICU_CONST, ICU_CONFIG_CONST) Icu_GpChannelMap;
#define ICU_STOP_SEC_VAR_NOINIT_8BIT
#include "MemMap.h"
#define ICU_START_SEC_VAR_1BIT
#include "MemMap.h"
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Holds the status of Initialization */
extern VAR(boolean, ICU_INIT_DATA) Icu_GblDriverStatus;
#endif
#define ICU_STOP_SEC_VAR_1BIT
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* ICU_RAM_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/Include/SchM_CanTp.h
#ifndef SCHM_CANTP_H
#define SCHM_CANTP_H
#include "SchM.h"
#include "SchM_Types.h"
#include "SchM_Cfg.h"
#define CANTP_EXCLUSIVE_AREA_0 SCHM_EA_SUSPENDALLINTERRUPTS
#define CANTP_EXCLUSIVE_AREA_1 SCHM_EA_SUSPENDALLINTERRUPTS
#define CANTP_EXCLUSIVE_AREA_2 SCHM_EA_SUSPENDALLINTERRUPTS
# define SchM_Enter_CanTp(ExclusiveArea) \
SCHM_ENTER_EXCLUSIVE(ExclusiveArea)
# define SchM_Exit_CanTp(ExclusiveArea) \
SCHM_EXIT_EXCLUSIVE(ExclusiveArea)
#endif /* SCHM_CANTP_H */
<file_sep>/BSP/MCAL/Gpt/Gpt_Version.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Gpt_Version.c */
/* Version = 3.0.0a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains code for version checking for modules included by GPT */
/* Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 23-Oct-2009 : Initial Version
* V3.0.0a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Gpt_Version.h"
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
#include "SchM.h"
#endif
#if (GPT_DEV_ERROR_DETECT == STD_ON)
#include "Det.h"
#endif
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
#include "EcuM.h"
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification version information */
#define GPT_VERSION_C_AR_MAJOR_VERSION GPT_AR_MAJOR_VERSION_VALUE
#define GPT_VERSION_C_AR_MINOR_VERSION GPT_AR_MINOR_VERSION_VALUE
#define GPT_VERSION_C_AR_PATCH_VERSION GPT_AR_PATCH_VERSION_VALUE
/* File version information */
#define GPT_VERSION_C_SW_MAJOR_VERSION 3
#define GPT_VERSION_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (GPT_VERSION_AR_MAJOR_VERSION != GPT_VERSION_C_AR_MAJOR_VERSION)
#error "Gpt_Version.c : Mismatch in Specification Major Version"
#endif
#if (GPT_VERSION_AR_MINOR_VERSION != GPT_VERSION_C_AR_MINOR_VERSION)
#error "Gpt_Version.c : Mismatch in Specification Minor Version"
#endif
#if (GPT_VERSION_AR_PATCH_VERSION != GPT_VERSION_C_AR_PATCH_VERSION)
#error "Gpt_Version.c : Mismatch in Specification Patch Version"
#endif
#if (GPT_VERSION_SW_MAJOR_VERSION != GPT_VERSION_C_SW_MAJOR_VERSION)
#error "Gpt_Version.c : Mismatch in Major Version"
#endif
#if (GPT_VERSION_SW_MINOR_VERSION != GPT_VERSION_C_SW_MINOR_VERSION)
#error "Gpt_Version.c : Mismatch in Minor Version"
#endif
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
#if (SCHM_AR_MAJOR_VERSION != GPT_SCHM_AR_MAJOR_VERSION)
#error "SchM.h : Mismatch in Specification Major Version"
#endif
#if (SCHM_AR_MINOR_VERSION != GPT_SCHM_AR_MINOR_VERSION)
#error "SchM.h : Mismatch in Specification Minor Version"
#endif
#endif
#if (GPT_DEV_ERROR_DETECT == STD_ON)
#if (DET_AR_MAJOR_VERSION != GPT_DET_AR_MAJOR_VERSION)
#error "Det.h : Mismatch in Specification Major Version"
#endif
#if (DET_AR_MINOR_VERSION != GPT_DET_AR_MINOR_VERSION)
#error "Det.h : Mismatch in Specification Minor Version"
#endif
#endif
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
#if (ECUM_AR_MAJOR_VERSION != GPT_ECUM_AR_MAJOR_VERSION)
#error "EcuM.h : Mismatch in Specification Major Version"
#endif
#if (ECUM_AR_MINOR_VERSION != GPT_ECUM_AR_MINOR_VERSION)
#error "EcuM.h : Mismatch in Specification Minor Version"
#endif
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Can/Can_RegStruct.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Can_RegStruct.h */
/* Version = 3.0.2a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2008-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of Controller register structure. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12.12.2008 : Initial Version
* V3.0.1: 21.10.2009 : Updated compiler version as per
* SCR ANMCANLINFR3_SCR_031.
* V3.0.2: 20.01.2010 : 8 bit and 32 bit register structure is updated as per
* SCR ANMCANLINFR3_SCR_042.
* V3.0.2a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
#ifndef CAN_REGSTRUCT_H
#define CAN_REGSTRUCT_H
/******************************************************************************
** Include Section **
******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define CAN_REGSTRUCT_AR_MAJOR_VERSION 2
#define CAN_REGSTRUCT_AR_MINOR_VERSION 2
#define CAN_REGSTRUCT_AR_PATCH_VERSION 2
/* File version information */
#define CAN_REGSTRUCT_SW_MAJOR_VERSION 3
#define CAN_REGSTRUCT_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Union for word access */
typedef union STagTun_Can_AFCan_WordAccess
{
/* Word */
uint16 usWord;
struct
{
/* Lower Byte */
uint8 ucLowByte;
/* Higher Byte */
uint8 ucHighByte;
}Tst_ByteAccess;
}Tun_Can_AFCan_WordAccess;
/* CAN Identifier Data Structure */
typedef union STagTun_Can_AFCan_CanId
{
uint32 ulCanId;
struct
{
/* Lower CAN ID */
uint16 usCanIdLow;
/* Higher CAN ID */
uint16 usCanIdHigh;
}Tst_CanId;
}Tun_Can_AFCan_CanId;
/* Filter mask values */
typedef struct STagTdd_Can_AFCan_HwFilterMask
{
/* Filter Mask value for Mask-Low */
uint16 volatile usMaskLow;
/* Filter Mask value for Mask-High */
uint16 volatile usMaskHigh;
}Tdd_Can_AFCan_HwFilterMask;
/* Definitions of 16-Bit Filter mask registers for HW filtering */
typedef struct STagTdd_Can_AFCan_HwFilterMaskReg
{
/* Filter Mask value for Mask-Low */
uint16 volatile ucFcnCmmkCtl01h; /* 0h */
/* Reserved */
uint16 volatile aaReserved1[3]; /* 2h - 7h */
/* Filter Mask value for Mask-High */
uint16 volatile ucFcnCmmkCtl02h; /* 8h */
/* Reserved */
uint16 volatile aaReserved2[3]; /* Ah - Fh */
}Tdd_Can_AFCan_HwFilterMaskReg;
/* Definitions of 8-Bit Message Buffer Registers */
typedef struct STagTdd_Can_AFCan_8bit_MsgBufferReg
{
/* Data Buffer */
uint8 aaDataBuffer[32]; /* 00h - 1Fh */
/* DLC */
uint8 volatile ucFcnMmDtlgb; /* 20h */
/* Reserved */
uint8 volatile aaReserved1[3]; /* 21h - 23h */
/* Configuration Register */
uint8 volatile ucFcnMmStrb; /* 24h */
/* Reserved */
uint8 volatile aaReserved2[27]; /* 25h - 3Fh */
} Tdd_Can_AFCan_8bit_MsgBuffer;
/* Definitions of 16-Bit Message Buffer Registers */
typedef struct STagTdd_Can_AFCan_16bit_MsgBufferReg
{
/* Data Buffer */
uint16 aaDataBuffer[16]; /* 00h - 1Fh */
/* Reserved */
uint16 volatile aaReserved1[4]; /* 20h - 27h */
/* CAN ID Low */
uint16 volatile usFcnMmMid0h; /* 28h */
/* Reserved */
uint16 volatile aaReserved2[3]; /* 2Ah - 2Fh */
/* CAN ID High */
uint16 volatile usFcnMmMid1h; /* 30h */
/* Reserved */
uint16 volatile aaReserved3[3]; /* 32h - 37h */
/* Message Control Register */
uint16 volatile usFcnMmCtl; /* 38h */
/* Reserved */
uint16 volatile aaReserved4[3]; /* 3Ah - 3Fh */
} Tdd_Can_AFCan_16bit_MsgBuffer;
/* Definitions of 32-Bit Message Buffer Registers */
typedef struct STagTdd_Can_AFCan_32bit_MsgBufferReg
{
/* Data 0123 */
uint32 volatile ulFcnMmDat0w; /* 00h */
/* Reserved */
uint32 volatile aaReserved0[3]; /* 04h - 0Fh */
/* Data 4567 */
uint32 volatile ulFcnMmDat4w; /* 10h */
/* Reserved */
uint32 volatile aaReserved1[5]; /* 14h - 27h */
/* CAN ID */
uint32 volatile ulFcnMmMid0w; /* 28h */
/* Reserved */
uint32 volatile aaReserved2[5]; /* 2Ch - 3Fh */
} Tdd_Can_AFCan_32bit_MsgBuffer;
/* Definitions of 8-Bit Control Registers of CAN controller */
typedef struct STagTdd_Can_AFCan_8bit_CntrlRegs
{
/* Global Clock Selection Register */
uint8 volatile ucFcnGmcsPre; /* 0_0008h */
/* Reserved */
uint8 volatile aaReserved1[23]; /* 0_0009h - 0_001Fh */
/* Automatic Block Transmission delay Register */
uint8 volatile ucFcnGmadCtl; /* 0_00020h */
/* Reserved */
uint8 volatile aaReserved2[551]; /* 0_0021h - 0_0247h */
/* Last Error Count Register */
uint8 volatile ucFcnCmlcStr; /* 0_0248h */
/* Reserved */
uint8 volatile aaReserved3[3]; /* 0_0249h - 0_24Bh */
/* Status Information Register */
uint8 volatile ucFcnCminStr; /* 0_024Ch */
/* Reserved */
uint8 volatile aaReserved4[27]; /* 0_024Dh - 0_0267h */
/* Bit Rate Prescaler */
uint8 volatile ucFcnCmbrPrs; /* 0_0268h */
/* Reserved */
uint8 volatile aaReserved5[15]; /* 0_0269h - 0_0277h */
/* Last in Pointer Register */
uint8 volatile ucFcnCmliStr; /* 0_0278h */
/* Reserved */
uint8 volatile aaReserved6[15]; /* 0_0279h - 0_0287h */
/* Last out Pointer Register */
uint8 volatile ucFcnCmloStr; /* 0_0288h */
/* Reserved */
uint8 volatile aaReserved7[3447]; /* 0_0289h - 0_0FFFh */
/* Message Buffer Register */
Tdd_Can_AFCan_8bit_MsgBuffer ddMsgBuffer[64]; /* 0_1000h - 0_1FFFh */
/* Reserved */
uint8 volatile aaReserved8[4096]; /* 0_2000h - 0_2FFFh */
}Tdd_Can_AFCan_8bit_CntrlReg;
/* Definitions of 16-Bit Control Registers of CAN controller */
typedef struct STagTdd_Can_AFCan_16bit_CntrlRegs
{
/* Control Register */
uint16 volatile usFcnGmclCtl; /* 0_8000h */
/* Reserved */
uint16 volatile aaReserved1[7]; /* 0_8002h - 0_800Fh */
/* Configuration Register */
uint16 volatile usFcnGmcfCtl; /* 0_8010h */
/* Reserved */
uint16 volatile aaReserved2[3]; /* 0_8012h - 0_8017h */
/* Automatic Block Transmission Register */
uint16 volatile usFcnGmabCtl; /* 0_8018h */
/* Reserved */
uint16 volatile aaReserved3[275]; /* 0_801Ah - 0_823Fh */
/* Global Control Register */
uint16 volatile usFcnCmclCtl; /* 0_8240h */
/* Reserved */
uint16 volatile aaReserved4[7]; /* 0_8242h - 0_824Fh */
/* Error Count Register */
uint16 volatile usFcnCmerCnt; /* 0_8250h */
/* Reserved */
uint16 volatile aaReserved5[3]; /* 0_8252h - 0_8257h */
/* Interrupt Enable Register */
uint16 volatile usFcnCmieCtl; /* 0_8258h */
/* Reserved */
uint16 volatile aaReserved6[3]; /* 0_825Ah - 0_825Fh */
/* Interrupt Status Register */
uint16 volatile usFcnCmisCtl; /* 0_8260h */
/* Reserved */
uint16 volatile aaReserved7[7]; /* 0_8262h - 0_826Fh */
/* Bit Timing Register */
uint16 volatile usFcnCmbtCtl; /* 0_8270h */
/* Reserved */
uint16 volatile aaReserved8[7]; /* 0_8272h - 0_827Fh */
/* Receive Get Pointer Register */
uint16 volatile usFcnCmrgRx; /* 0_8280h */
/* Reserved */
uint16 volatile aaReserved9[7]; /* 0_8282h - 0_828Fh */
/* Transmission Get Pointer Register */
uint16 volatile usFcnCmtgTx; /* 0_8290h */
/* Reserved */
uint16 volatile aaReserved10[3]; /* 0_8292h - 0_8297h */
/* Time Stamp Register */
uint16 volatile usFcnCmtsCtl; /* 0_8298h */
/* Reserved */
uint16 volatile aaReserved11[51]; /* 0_829Ah - 0_82FFh */
/* Filter Mask */
Tdd_Can_AFCan_HwFilterMaskReg ddHwFilterMask[8]; /* 0_8300h - 0_837Fh */
/* Reserved */
uint16 volatile aaReserved12[1600]; /* 0_8380h - 0_8FFFh */
/* Message Buffer Register */
Tdd_Can_AFCan_16bit_MsgBuffer ddMsgBuffer[64]; /* 0_9000h - 0_9FFFh */
/* Reserved */
uint16 volatile aaReserved13[2048]; /* 0_A000h - 0_AFFFh */
}Tdd_Can_AFCan_16bit_CntrlReg;
/* Definitions of 32-Bit Control Registers of CAN controller */
typedef struct STagTdd_Can_AFCan_32bit_CntrlRegs
{
/* Data New Bit Monitor Register */
uint32 aaFcnDnbmRx[8]; /* 1_00C0h - 1_00DFh */
/* Reserved */
uint32 volatile aaReserved1[136]; /* 1_00E0h - 1_02FFh */
/* Filter Mask */
uint32 aaFcnCmmkCtl[32]; /* 1_0300h - 1_037Fh */
/* Reserved */
uint32 volatile aaReserved2[800]; /* 1_0380h - 1_0FFFh */
/* Message Buffer Register */
Tdd_Can_AFCan_32bit_MsgBuffer ddMsgBuffer[64]; /* 1_1000h - 1_1FFFh */
/* Reserved */
uint32 volatile aaReserved3[1024]; /* 1_2000h - 0_2FFFh */
}Tdd_Can_AFCan_32bit_CntrlReg;
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* CAN_REGSTRUCT_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/Include/SchM_Com.h
#ifndef SCHM_COM_H
#define SCHM_COM_H
#include "SchM.h"
#include "SchM_Types.h"
#include "SchM_Cfg.h"
/* Com can either use a single interrupt lock for all PDUs at once or for every PDU individually.
To enable individual locks for the tx mainfunction
set COM_EXCLUSIVE_AREA_1 to SCHM_COM_EA_INTERRUPTSLOCKEDBYDIFFERENTEA and COM_EXCLUSIVE_AREA_2 to SCHM_EA_SUSPENDALLINTERRUPTS.
To enable individual locks for the rx mainfunctions
set COM_EXCLUSIVE_AREA_3 to SCHM_COM_EA_INTERRUPTSLOCKEDBYDIFFERENTEA and COM_EXCLUSIVE_AREA_4 to SCHM_EA_SUSPENDALLINTERRUPTS.
Refer to the Com Technical Reference for a detailed description */
#define SCHM_COM_EA_INTERRUPTSLOCKEDBYDIFFERENTEA 1
#define COM_EXCLUSIVE_AREA_0 SCHM_EA_SUSPENDALLINTERRUPTS
#define COM_EXCLUSIVE_AREA_1 SCHM_EA_SUSPENDALLINTERRUPTS
#define COM_EXCLUSIVE_AREA_2 SCHM_EA_SUSPENDALLINTERRUPTS
#define COM_EXCLUSIVE_AREA_3 SCHM_EA_SUSPENDALLINTERRUPTS
#define COM_EXCLUSIVE_AREA_4 SCHM_EA_SUSPENDALLINTERRUPTS
/*
extern const uint8 COM_EXCLUSIVE_AREA_0;
extern const uint8 COM_EXCLUSIVE_AREA_1;
extern const uint8 COM_EXCLUSIVE_AREA_2;
extern const uint8 COM_EXCLUSIVE_AREA_3;
extern const uint8 COM_EXCLUSIVE_AREA_4;
*/
# define SchM_Enter_Com(ExclusiveArea) SCHM_ENTER_EXCLUSIVE(ExclusiveArea)
//((ExclusiveArea == SCHM_COM_EA_INTERRUPTSLOCKEDBYDIFFERENTEA)? ,SCHM_ENTER_EXCLUSIVE(ExclusiveArea))
#if 0
\
if (ExclusiveArea == SCHM_COM_EA_INTERRUPTSLOCKEDBYDIFFERENTEA)\
{\
}\
else\
{\
SCHM_ENTER_EXCLUSIVE(ExclusiveArea);\
}
#endif
# define SchM_Exit_Com(ExclusiveArea) SCHM_EXIT_EXCLUSIVE(ExclusiveArea)
//((ExclusiveArea == SCHM_COM_EA_INTERRUPTSLOCKEDBYDIFFERENTEA)? ,SCHM_EXIT_EXCLUSIVE(ExclusiveArea))
#if 0
{\
}\
else\
{\
SCHM_EXIT_EXCLUSIVE(ExclusiveArea);\
}
#endif
/*
void SchM_Enter_Com(uint8 ExclusiveArea)
{
if (ExclusiveArea == SCHM_COM_EA_INTERRUPTSLOCKEDBYDIFFERENTEA)
{
}
else
{
SCHM_ENTER_EXCLUSIVE(ExclusiveArea);
}
}
void SchM_Exit_Com(uint8 ExclusiveArea)
{
if (ExclusiveArea == SCHM_COM_EA_INTERRUPTSLOCKEDBYDIFFERENTEA)
{
}
else
{
SCHM_EXIT_EXCLUSIVE(ExclusiveArea);
}
}
//void SchM_Enter_Com(uint8 ExclusiveArea);
//void SchM_Exit_Com(uint8 ExclusiveArea);
*/
#endif /* SCHM_COM_H */
<file_sep>/BSP/Common/MemMap/MemMap.h
/*this file must allow be included multi-times*/
#include "Compiler.h"
#if COMPILER_GHS
#include "MemMap_GHS.h"
#elif COMPILER_CX
#include "MemMap_CX.h"
#endif
<file_sep>/BSP/Common/main.c
//#include <stddef.h>
//#include <stdio.h>
#include "DF4010_0.h"
#include "IoHwAb.h"
#include "IoHwAb_Api.h"
#define SKIP_MAGIC_NUMBER
/*******************************************************************************
** Global variables **
*******************************************************************************/
Std_ReturnType GddSetupBuffer0;
/* Declaration for the result buffers */
Adc_ValueGroupType GddDataBufferPtr0[3];
Adc_ValueGroupType ADValueBuffer[3];
/* Variable used to store the Module Version Info */
Std_VersionInfoType GddVersionInfo;
uint8 taskerr;
uint32 programinit_flag = 1;
void Appl_10mS_Task(void);
/******************************************************************************
* OS Global Symbols **
******************************************************************************/
BOOL bitValue = 0;
uint8 TaskAlreadyDo = 1; /* permit task run or not */
uint32 Gdd1mSFlag = 0;
uint32 Gdd10mSFlag = 0;
uint32 Gdd100mSFlag = 0;
uint32 lpcnt_spi = 1;
uint32 spicnt=0; /* spi loop variable */
/******************************************************************************
* Can Global Symbols **
******************************************************************************/
extern void IoHwAb_Init(void);
/*******************************************************************************
** **
*******************************************************************************/
void main(void)
{
int i;
#if 0
/*---------------------------------------------
Port Driver
---------------------------------------------*/
/* Initialize PORT */
/* -- VCC5V_CTL,SYNC_CTRL High -- */
Port_Init(PortConfigSet0);
FCLA27CTL1 = 0x80;
FCLA7CTL3 = 0x80; //CSIG4SI
/*---------------------------------------------
GPT Driver
---------------------------------------------*/
/* Initialisation of the GPT Driver */
Gpt_Init(GptChannelConfigSet0);
/* Enabling the Notification */
Gpt_EnableNotification(GptChannelConfiguration1);
/* Starting the Timer */
Gpt_StartTimer(GptChannelConfiguration1, 0x1F40);
/*---------------------------------------------
PWM Driver
---------------------------------------------*/
/* Initialise the PWM Driver */
Pwm_Init(PwmChannelConfigSet0);
/* Set PWM channel 2 to its idle state */
//Pwm_SetOutputToIdle(PwmChannel13);
#endif
/*EcuM_StartUp() will call the following code*/
SysSrvc_StartSchduler();/*here RTOS is started*/
/*code will never reach here */
for(;;);
while(1){
bitValue =~ bitValue;
for(i=0;i<10000;i++) {
Dio_WriteChannel(DioChannel25_12, bitValue);
}
}
//while(1);
/*---------------------------------------------
Cyclic Task
---------------------------------------------*/
while(1){
//if(Gdd1mSFlag == 10) {
if(TaskAlreadyDo == 0){
Appl_10mS_Task();
TaskAlreadyDo = 1; /* finish task doing job,unpermit task run */
}else{
taskerr = 1; // overrun happen!check your task time
}
//}
} /* infinite loop */
} /* end of mainfunction */
/*******************************************************************************
Task(Dummy)
*******************************************************************************/
void PWMInit(void)
{
IoHwAb_SetLED1(0x8000);
IoHwAb_SetLED2(0x8000);
IoHwAb_SetLED3(0x8000);
IoHwAb_SetLowBeam1(0x8000);
IoHwAb_SetLowBeam2(0x8000);
IoHwAb_SetHighSpeed(0x8000);
IoHwAb_SetBadWeather(0x8000);
IoHwAb_SetTurnLamp(0x8000);
IoHwAb_SetParkLamp(0x8000);
}
void SysSrvc_StartupHook(void)
{
IoHwAb_Init();
PWMInit();
}
void SysSrvc_ShutdownHook (UINT8 Error)
{
}
void Test_Task(void)
{
#if 0
IoHwAb_SetODH1(1);
IoHwAb_SetODH2(1);
IoHwAb_SetDRLFAIL(1);
IoHwAb_SetLowBeam1Fail(1);
IoHwAb_SetLowBeam2Fail(1);
IoHwAb_SetTurnLampFail(1);
IoHwAb_GetSW_ParkLamp();
IoHwAb_GetSW_LowBeam();
IoHwAb_GetSW_HighBeam();
IoHwAb_GetSW_TurnLamp();
IoHwAb_GetSW_CornerLamp();
IoHwAb_GetSW_CornerLamp();
IoHwAb_GetSW_CornerLamp();
IoHwAb_GetSW_CornerLamp();
IoHwAb_GetSW_BadWeatherMode();
IoHwAb_GetSW_ControlEnable();
IoHwAb_ILCLevelLowBeam();
IoHwAb_ILBendingLeftControl();
IoHwAb_ILTurnRightControl();
IoHwAb_ILTurnLeftControl();
IoHwAb_ILParkLampControl();
IoHwAb_ILLowBeamControl();
IoHwAb_ILHighBeamControl();
IoHwAb_ILDRLControl();
IoHwAb_ILELevelHighSpeedModeControl();
IoHwAb_ILVLevelCityModeControl();
IoHwAb_ILWLevelBadWeatherControl();
#endif
}
void IoHwAb_Adc_Notification_Group0(void)
{
}
void Pwm_Notification_0(void){
}
void Pwm_Notification_1(void){
}
void Pwm_Notification_2(void){
}
/*****************************************************************************
CALL BACK
*****************************************************************************/
void OSTM_Notification (void){
Gdd1mSFlag++;
if(Gdd1mSFlag == 1) {
TaskAlreadyDo = 0; /* permit task to run */
}
if(Gdd1mSFlag == 10){
Gdd1mSFlag = 0;
};
}
/*****************************************************************************
10mS Period Task
*****************************************************************************/
void Appl_10mS_Task(void) {
#if 0
bitValue = ~bitValue;
Dio_WriteChannel(DioChannel0_0, bitValue);
Dio_WriteChannel(DioChannel0_7, bitValue);
Dio_WriteChannel(DioChannel0_10, bitValue);
Dio_WriteChannel(DioChannel1_7, bitValue);
Dio_WriteChannel(DioChannel1_8, bitValue);
Dio_WriteChannel(DioChannel1_9, bitValue);
Dio_WriteChannel(DioChannel1_10, bitValue);
Dio_WriteChannel(DioChannel1_11, bitValue);
Dio_WriteChannel(DioChannel1_12, bitValue);
Dio_WriteChannel(DioChannel25_1, bitValue);
Dio_WriteChannel(DioChannel25_5, bitValue);
Dio_WriteChannel(DioChannel25_6, bitValue);
Dio_WriteChannel(DioChannel25_7, bitValue);
Dio_WriteChannel(DioChannel25_8, bitValue);
Dio_WriteChannel(DioChannel25_9, bitValue);
Dio_WriteChannel(DioChannel25_10, bitValue);
Dio_WriteChannel(DioChannel25_11, bitValue);
Dio_WriteChannel(DioChannel25_12, bitValue);
Dio_WriteChannel(DioChannel25_13, bitValue);
Dio_WriteChannel(DioChannel25_14, bitValue);
Dio_WriteChannel(DioChannel27_0, bitValue);
Dio_WriteChannel(DioChannel27_1, bitValue);
#endif
}
/*****************************************************************************
Dummy Func
*****************************************************************************/
void SPI_Sequence0_Notification(void)
{
}
void SPI_Sequence1_Notification(void)
{
}
void SPI_Sequence2_Notification(void)
{
}
void SPI_Sequence3_Notification(void)
{
}
void CanTrcv_30_Tja1145_SpiIndicationN_BB(void)
{
}
void CanTrcv_30_Tja1145_SpiIndicationM_BB(void)
{
}
void CanTrcv_30_Tja1145_SpiIndicationL_BB(void)
{
}
void SuspendAllInterrupts(void){
}
void ResumeAllInterrupts(void){
}
<file_sep>/BSP/IoHwAb/IoHwAb_Api.h
/*****************************************************************************
|File Name: IoHwAb_Api.h
|
|Description:
|
|-----------------------------------------------------------------------------
| PATAC Confidential
|-----------------------------------------------------------------------------
|
| This software is copyright is proprietary of Pan Asia Technical Automotive Company(PATAC).
| All rights are reserved by PATAC.
|
|-----------------------------------------------------------------------------
| A U T H O R I D E N T I T Y
|-----------------------------------------------------------------------------
| Initials Name Company
| ------------------------------------ ---------------------------------------
|
|
|-----------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|-----------------------------------------------------------------------------
| Date Version Author Description
|---------- -------- ------ ----------------------------------------------
|2014-04-01 01.00.00 ZhanYi Create
*****************************************************************************/
#ifndef _IOHWAB_API_H
#define _IOHWAB_API_H
#include "Std_Types.h"
#include "Dio.h"
#include "IoHwAb_Do.h"
/*----------------------------------------------------------------------------------
- Digital Outputs
-----------------------------------------------------------------------------------*/
#define IoHwAb_SetODH1(x) SetDO_AppCtrl(CeDO_e_ODH1, (boolean)(x)) /*Corner lamp*/
#define IoHwAb_SetODH2(x) SetDO_AppCtrl(CeDO_e_ODH2, (boolean)(x)) /*FAN Control*/
#define IoHwAb_SetDRLFAIL(x) SetDO_AppCtrl(CeDO_e_OUT1, (boolean)(x))
#define IoHwAb_SetLowBeam1Fail(x) SetDO_AppCtrl(CeDO_e_OUT2, (boolean)(x))
#define IoHwAb_SetLowBeam2Fail(x) SetDO_AppCtrl(CeDO_e_OUT3, (boolean)(x))
#define IoHwAb_SetTurnLampFail(x) SetDO_AppCtrl(CeDO_e_OUT4, (boolean)(x))
#define IoHwAb_GetODH1(x) GetDO_AppCtrl(CeDO_e_ODH1, (boolean)(x))
#define IoHwAb_GetODH2(x) GetDO_AppCtrl(CeDO_e_ODH2, (boolean)(x))
#define IoHwAb_GetDRLFAIL(x) GetDO_AppCtrl(CeDO_e_OUT1, (boolean)(x))
#define IoHwAb_GetLowBeam1Fail(x) GetDO_AppCtrl(CeDO_e_OUT2, (boolean)(x))
#define IoHwAb_GetLowBeam2Fail(x) GetDO_AppCtrl(CeDO_e_OUT3, (boolean)(x))
#define IoHwAb_GetTurnLampFail(x) GetDO_AppCtrl(CeDO_e_OUT4, (boolean)(x))
/*----------------------------------------------------------------------------------
- Digital Inputs
-----------------------------------------------------------------------------------*/
boolean IoHwAb_GetSW_ParkLamp(void);
boolean IoHwAb_GetSW_LowBeam(void);
boolean IoHwAb_GetSW_HighBeam(void);
boolean IoHwAb_GetSW_TurnLamp(void);
boolean IoHwAb_GetSW_CornerLamp(void);
boolean IoHwAb_GetSW_DRL(void);
boolean IoHwAb_GetSW_CityMode(void);
boolean IoHwAb_GetSW_HighSpeed(void);
boolean IoHwAb_GetSW_BadWeatherMode(void);
boolean IoHwAb_GetSW_ControlEnable(void);
/*----------------------------------------------------------------------------------
- LED Outputs
-----------------------------------------------------------------------------------*/
void IoHwAb_SetLED1(uint16 percent);
void IoHwAb_SetLED2(uint16 percent);
void IoHwAb_SetHighSpeed(uint16 percent);
void IoHwAb_BadWeather(uint16 percent);
void IoHwAb_SetLED3(uint16 percent);
void IoHwAb_SetTurnLamp(uint16 percent);
void IoHwAb_SetParkLamp(uint16 percent);
void IoHwAb_SetLowBeam1(uint16 percent);
void IoHwAb_SetLowBeam2(uint16 percent);
/*----------------------------------------------------------------------------------
- Can Outputs
-----------------------------------------------------------------------------------*/
boolean IoHwAb_ILCLevelLowBeam(void);
boolean IoHwAb_ILBendingRightControl(void);
boolean IoHwAb_ILBendingLeftControl(void);
boolean IoHwAb_ILTurnRightControl(void);
boolean IoHwAb_ILTurnLeftControl(void);
boolean IoHwAb_ILParkLampControl(void);
boolean IoHwAb_ILLowBeamControl(void);
boolean IoHwAb_ILHighBeamControl(void);
boolean IoHwAb_ILDRLControl(void);
boolean IoHwAb_ILELevelHighSpeedModeControl(void);
boolean IoHwAb_ILVLevelCityModeControl(void);
boolean IoHwAb_ILWLevelBadWeatherControl(void);
#endif
/*EOF*/
<file_sep>/BSP/MCAL/Gpt/Gpt_Ram.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Gpt_Ram.h */
/* Version = 3.0.3a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains Global variable declarations of GPT Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 23-Oct-2009 : Initial Version
* V3.0.1: 25-Feb-2010 : As per SCR 194, precompile option is added for the
* pointer variable "Gpt_GpTAUUnitConfig".
* V3.0.2: 23-Jun-2010 : As per SCR 281, precompile option is updated for
* the pointer variable "Gpt_GpTAUUnitConfig".
* V3.0.3: 08-Jul-2010 : As per SCR 299, precompile option
* "GPT_DEV_ERROR_DETECT" is added for
* declaring Gpt_GblDriverStatus.
* V3.0.3a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
#ifndef GPT_RAM_H
#define GPT_RAM_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Gpt_PBTypes.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define GPT_RAM_AR_MAJOR_VERSION GPT_AR_MAJOR_VERSION_VALUE
#define GPT_RAM_AR_MINOR_VERSION GPT_AR_MINOR_VERSION_VALUE
#define GPT_RAM_AR_PATCH_VERSION GPT_AR_PATCH_VERSION_VALUE
/* File version information */
#define GPT_RAM_SW_MAJOR_VERSION 3
#define GPT_RAM_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
#define GPT_START_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON)|| \
(GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON))
/* Global pointer variable for TAU Unit configuration */
extern P2CONST(Tdd_Gpt_TAUUnitConfigType, GPT_CONST, GPT_CONFIG_CONST)
Gpt_GpTAUUnitConfig;
#endif
/* Global pointer variable for channel configuration */
extern P2CONST(Tdd_Gpt_ChannelConfigType, GPT_CONST, GPT_CONFIG_CONST)
Gpt_GpChannelConfig;
#if(GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
/* Global pointer variable for Notification status array */
extern P2VAR(uint8, AUTOMATIC, GPT_CONFIG_DATA) Gpt_GpNotifStatus;
#endif
/* Global pointer variable for channel to timer mapping */
extern P2CONST(uint8, GPT_CONST, GPT_CONFIG_CONST) Gpt_GpChannelTimerMap;
/* Global pointer variable for channel data */
extern P2VAR(Tdd_Gpt_ChannelRamData, GPT_NOINIT_DATA, GPT_CONFIG_DATA)
Gpt_GpChannelRamData;
#define GPT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
#define GPT_START_SEC_VAR_NOINIT_8BIT
#include "MemMap.h"
/* Holds the status of GPT Driver Component */
extern VAR(uint8, GPT_NOINIT_DATA) Gpt_GucGptDriverMode;
#define GPT_STOP_SEC_VAR_NOINIT_8BIT
#include "MemMap.h"
#define GPT_START_SEC_VAR_1BIT
#include "MemMap.h"
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Holds the status of Initialization */
extern VAR(boolean, GPT_INIT_DATA) Gpt_GblDriverStatus;
#endif
#define GPT_STOP_SEC_VAR_1BIT
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* GPT_RAM_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/NvM/NvM_Lcfg.c
/**
\addtogroup MODULE_NvM NvM
Non-volatile Memory Management Module.
*/
/*@{*/
/***************************************************************************//**
\file NvM_Lcfg.c
\brief Link-time Configuration of NVRAM Management Module.
\author zhaoyg
\version 1.0
\date 2012-3-27
\warning Copyright (C), 2012, PATAC.
*//*----------------------------------------------------------------------------
\history
<No.> <author> <time> <version> <description>
1 zhaoyg 2012-3-27 1.0 Create
*******************************************************************************/
/*******************************************************************************
Include Files
*******************************************************************************/
#include "NvM.h"
/*******************************************************************************
Macro Definition
*******************************************************************************/
/**
\def NVM_BLK_CFG
\param RamAddr :RAM address of block.
\param RomAddr :ROM address of block(Default Value).
\param Length :Length of block.
Block configuration.
*/
#define NVM_BLK_CFG(RamAddr1, RamAddr2, RomAddr, Length)\
{(uint8*)(RamAddr1),(uint8*)(RamAddr2),(uint8*)(RomAddr),(Length)}
/*******************************************************************************
Type Definition
*******************************************************************************/
/*******************************************************************************
Prototype Declaration
*******************************************************************************/
/*******************************************************************************
Variable Definition
*******************************************************************************/
/**
\var NvM_Config_t NvM_Config[BLOCK_TOTAL]
Block Configuration.
*/
#if 1 //test Map A
const NvM_Config_t NvM_Config[BLOCK_TOTAL] =
{
NVM_BLK_CFG(0x00000000, 0x00000000, 0x00000000, 0 ),
NVM_BLK_CFG(0xFEDFF000, 0xFEDFF400, 0x000FE000, 1024 ),
NVM_BLK_CFG(0xFEDFF800, 0xFEDFFA00, 0x000FE400, 512 ),
NVM_BLK_CFG(0xFEDFFC00, 0xFEDFFD00, 0x000FE600, 256 ),
NVM_BLK_CFG(0xFEDFFE00, 0xFEDFFF00, 0x000FE700, 256 )
};
#else //test Map B
const NvM_Config_t NvM_Config[BLOCK_TOTAL] =
{
NVM_BLK_CFG(0x00000000, 0x00000000, 0x00000000, 0 ),
NVM_BLK_CFG(0xFEDFE000, 0xFEDFE400, 0x000BF000, 1024 ),
NVM_BLK_CFG(0xFEDFE800, 0xFEDFEC00, 0x000BF400, 1024 ),
NVM_BLK_CFG(0xFEDFF000, 0xFEDFF200, 0x000BF800, 512 ),
NVM_BLK_CFG(0xFEDFF400, 0xFEDFF600, 0x000BFA00, 512 ),
NVM_BLK_CFG(0xFEDFF800, 0xFEDFF900, 0x000BFC00, 256 ),
NVM_BLK_CFG(0xFEDFFA00, 0xFEDFFA80, 0x000BFD00, 128 ),
NVM_BLK_CFG(0xFEDFFB00, 0xFEDFFB80, 0x000BFD80, 128 ),
NVM_BLK_CFG(0xFEDFFC00, 0xFEDFFC80, 0x000BFE00, 128 ),
NVM_BLK_CFG(0xFEDFFD00, 0xFEDFFD80, 0x000BFE80, 128 ),
NVM_BLK_CFG(0xFEDFFE00, 0xFEDFFE80, 0x000BFF00, 128 ),
NVM_BLK_CFG(0xFEDFFF00, 0xFEDFFF40, 0x000BFF80, 64 ),
NVM_BLK_CFG(0xFEDFFF80, 0xFEDFFFA0, 0x000BFFC0, 32 ),
NVM_BLK_CFG(0xFEDFFFC0, 0xFEDFFFD0, 0x000BFFE0, 16 ),
NVM_BLK_CFG(0xFEDFFFE0, 0xFEDFFFE8, 0x000BFFF0, 8 ),
NVM_BLK_CFG(0xFEDFFFF0, 0xFEDFFFF4, 0x000BFFF8, 4 ),
NVM_BLK_CFG(0xFEDFFFF8, 0xFEDFFFFC, 0x000BFFFC, 4 )
};
#endif
/*******************************************************************************
Function Definition
*******************************************************************************/
/*@}*/
<file_sep>/BSP/Common/main_dpstop.c
#include "Adc.h"
#include "Port.h"
#include "Mcu.h"
#include "Can.h"
#include "Pwm.h"
#include "Gpt.h"
#include "Dio.h"
#include "DF4010_0.h"
#include <stddef.h>
#include <stdio.h>
#define SKIP_MAGIC_NUMBER
/*******************************************************************************
** Global variables **
*******************************************************************************/
Std_ReturnType GddSetupBuffer0;
/* Declaration for the result buffers */
Adc_ValueGroupType GddDataBufferPtr0[3];
Adc_ValueGroupType ADValueBuffer[3];
/* Variable used to store the Module Version Info */
Std_VersionInfoType GddVersionInfo;
uint8 taskerr;
void Appl_10mS_Task(void);
/******************************************************************************
* OS Global Symbols **
******************************************************************************/
BOOL bitValue = 0;
uint8 TaskAlreadyDo = 1; /* permit task run or not */
uint32 Gdd1mSFlag = 0;
uint32 Gdd10mSFlag = 0;
uint32 Gdd100mSFlag = 0;
uint32 lpcnt_spi = 1;
uint32 spicnt=0; /* spi loop variable */
/*******************************************************************************
** **
*******************************************************************************/
void main(void)
{
/* Enable the global interrupts */
__asm("ei");
/*---------------------------------------------
Mcu Initialization
---------------------------------------------*/
/* Initialise MCU Driver */
Mcu_Init(McuModuleConfiguration1);
/* Set the CPU Clock to the PLL0 */
Mcu_InitClock(MCU_CLK_SETTING_PLL0);
/* Wait until the PLL is locked */
while (Mcu_GetPllStatus() != MCU_PLL_LOCKED);
/* Activate the PLL Clock */
Mcu_DistributePllClock();
/* Set the MCU to MCU_RUN_MODE mode */
Mcu_SetMode(McuModeSettingConf0);
/* Set the MCU to MCU_RUN_MODE mode */
//Mcu_SetMode(McuModeSettingConf0);
/*---------------------------------------------
Port Driver
---------------------------------------------*/
/* Initialize PORT */
/* -- VCC5V_CTL,SYNC_CTRL High -- */
Port_Init(PortConfigSet0);
FCLA27CTL1 = 0x80;
FCLA7CTL3 = 0x80; //CSIG4SI
/*---------------------------------------------
GPT Driver
---------------------------------------------*/
/* Initialisation of the GPT Driver */
Gpt_Init(GptChannelConfigSet0);
/* Enabling the Notification */
Gpt_EnableNotification(GptChannelConfiguration0);
/* Starting the Timer */
Gpt_StartTimer(GptChannelConfiguration0, 0x0100);
/* Set the MCU to MCU DeepStop mode */
Mcu_SetMode(McuModeSettingConf1);
/*---------------------------------------------
PWM Driver
---------------------------------------------*/
/* Initialise the PWM Driver */
//Pwm_Init(PwmChannelConfigSet0);
/* Set PWM channel 2 to its idle state */
//Pwm_SetOutputToIdle(PwmChannel13);
while(1);
//Set_LED1();
Set_LowBeam2();
//Clr_LowBeam2();
//while(1);
/*---------------------------------------------
Cyclic Task
---------------------------------------------*/
while(1){
//if(Gdd1mSFlag == 10) {
if(TaskAlreadyDo == 0){
Appl_10mS_Task();
TaskAlreadyDo = 1; /* finish task doing job,unpermit task run */
}else{
taskerr = 1; // overrun happen!check your task time
}
//}
} /* infinite loop */
} /* end of mainfunction */
/*******************************************************************************
Task(Dummy)
*******************************************************************************/
void SysSrvc_StartupHook(void)
{
}
void SysSrvc_ShutdownHook (UINT8 Error)
{
}
void IoHwAb_Adc_Notification_Group0(void)
{
}
void Pwm_Notification_0(void){
}
void Pwm_Notification_1(void){
}
void Pwm_Notification_2(void){
}
void osResumeAllInterrupts(void) {
}
void osSuspendAllInterrupts(void){
}
/*****************************************************************************
CALL BACK
*****************************************************************************/
void OSTM_Notification (void){
Gdd1mSFlag++;
if(Gdd1mSFlag == 1) {
TaskAlreadyDo = 0; /* permit task to run */
}
if(Gdd1mSFlag == 10){
Gdd1mSFlag = 0;
};
}
/*****************************************************************************
10mS Period Task
*****************************************************************************/
void Appl_10mS_Task(void) {
bitValue = ~bitValue;
Dio_WriteChannel(DioChannel0_0, bitValue);
Dio_WriteChannel(DioChannel0_7, bitValue);
Dio_WriteChannel(DioChannel0_10, bitValue);
Dio_WriteChannel(DioChannel1_7, bitValue);
Dio_WriteChannel(DioChannel1_8, bitValue);
Dio_WriteChannel(DioChannel1_9, bitValue);
Dio_WriteChannel(DioChannel1_10, bitValue);
Dio_WriteChannel(DioChannel1_11, bitValue);
Dio_WriteChannel(DioChannel1_12, bitValue);
Dio_WriteChannel(DioChannel25_1, bitValue);
Dio_WriteChannel(DioChannel25_5, bitValue);
Dio_WriteChannel(DioChannel25_6, bitValue);
Dio_WriteChannel(DioChannel25_7, bitValue);
Dio_WriteChannel(DioChannel25_8, bitValue);
Dio_WriteChannel(DioChannel25_9, bitValue);
Dio_WriteChannel(DioChannel25_10, bitValue);
Dio_WriteChannel(DioChannel25_11, bitValue);
Dio_WriteChannel(DioChannel25_12, bitValue);
Dio_WriteChannel(DioChannel25_13, bitValue);
Dio_WriteChannel(DioChannel25_14, bitValue);
Dio_WriteChannel(DioChannel27_0, bitValue);
Dio_WriteChannel(DioChannel27_1, bitValue);
}
/*****************************************************************************
Dummy Func
*****************************************************************************/
void SPI_Sequence0_Notification(void)
{
}
void SPI_Sequence1_Notification(void)
{
}
void SPI_Sequence2_Notification(void)
{
}
void SPI_Sequence3_Notification(void)
{
}
void CanTrcv_30_Tja1145_SpiIndicationN_BB(void)
{
}
void CanTrcv_30_Tja1145_SpiIndicationM_BB(void)
{
}
void CanTrcv_30_Tja1145_SpiIndicationL_BB(void)
{
}
void TAUJ0I0_Notification(void)
{
}
void OSTM0_CH0_ISR(void){
}
<file_sep>/BSP/IoHwAb/IoHwAb_LEDcfg.c
#include "Dio.h"
#include "IoHwAb_LED.h"
#include "IoHwAb_LEDcfg.h"
/*******************************************************************************
| Configuration
|******************************************************************************/
/*configure hw-PWM or sim-PWM*/
const TePWM_h_Config CaLED_h_PWMCfg[CeLED_e_ChNum] =
{
/*m_b_Enable, m_e_PwmType PWM, m_w_InitPeriod, m_w_InitDuty*/
{TRUE, CeIoHwAb_e_PwmTypeHw, PWM_10, 4000, 2000}, /* LED1 */
{TRUE, CeIoHwAb_e_PwmTypeHw, PWM_11, 4000, 2000}, /* LED2 */
{TRUE, CeIoHwAb_e_PwmTypeHw, EN3PWM, 4000, 2000}, /* LED3 */
{TRUE, CeIoHwAb_e_PwmTypeHw, PWM_4, 4000, 2000}, /* HighSpeed */
{TRUE, CeIoHwAb_e_PwmTypeHw, PWM_5, 4000, 2000}, /* BadWeather */
{TRUE, CeIoHwAb_e_PwmTypeHw, EN1PWM, 4000, 2000}, /* TurnLamp */
{TRUE, CeIoHwAb_e_PwmTypeHw, EN2PWM, 4000, 2000}, /* ParknLamp */
{TRUE, CeIoHwAb_e_PwmTypeHw, PWM_7, 4000, 2000}, /* LowBeam1 */
{TRUE, CeIoHwAb_e_PwmTypeHw, PWM_6, 4000, 2000}, /* LowBeam2 */
};
const TePWM_h_Config CaLED_h_RTCfg[CeLED_e_ChNum] =
{
/*m_b_Enable, m_e_PwmType RT, m_w_InitPeriod, m_w_InitDuty*/
{TRUE, CeIoHwAb_e_PwmTypeHw, PWM_12, 4000, 2000}, /* LED1 */
{TRUE, CeIoHwAb_e_PwmTypeHw, PWM_12, 4000, 2000}, /* LED2 */
{TRUE, CeIoHwAb_e_PwmTypeHw, FREQ3, 4000, 2000}, /* LED3 */
{TRUE, CeIoHwAb_e_PwmTypeHw, PWM_8, 4000, 2000}, /* HighSpeed */
{TRUE, CeIoHwAb_e_PwmTypeHw, PWM_8, 4000, 2000}, /* BadWeather */
{TRUE, CeIoHwAb_e_PwmTypeHw, FREQ1, 4000, 2000}, /* TurnLamp */
{TRUE, CeIoHwAb_e_PwmTypeHw, FREQ2, 4000, 2000}, /* ParknLamp */
{TRUE, CeIoHwAb_e_PwmTypeHw, PWM_9, 4000, 2000}, /* LowBeam1 */
{TRUE, CeIoHwAb_e_PwmTypeHw, PWM_9, 4000, 2000}, /* LowBeam2 */
};
const TePWM_h_Config CaLED_h_ADimCfg[CeLED_e_ChNum] =
{
/*m_b_Enable, m_e_PwmType RT, m_w_InitPeriod, m_w_InitDuty*/
{TRUE, CeIoHwAb_e_PwmTypeHw, 0, 4000, 2000}, /* LED1 */
{TRUE, CeIoHwAb_e_PwmTypeHw, 0, 4000, 2000}, /* LED2 */
{TRUE, CeIoHwAb_e_PwmTypeHw, PWM_3, 4000, 2000}, /* LED3 */
{TRUE, CeIoHwAb_e_PwmTypeHw, 0, 4000, 2000}, /* HighSpeed */
{TRUE, CeIoHwAb_e_PwmTypeHw, 0, 4000, 2000}, /* BadWeather */
{TRUE, CeIoHwAb_e_PwmTypeHw, PWM_1, 4000, 2000}, /* TurnLamp */
{TRUE, CeIoHwAb_e_PwmTypeHw, PWM_2, 4000, 2000}, /* ParknLamp */
{TRUE, CeIoHwAb_e_PwmTypeHw, 0, 4000, 2000}, /* LowBeam1 */
{TRUE, CeIoHwAb_e_PwmTypeHw, 0, 4000, 2000}, /* LowBeam2 */
};
/*Map Dio to simulate PWM*/
const TePWM_h_SimChCfg CaPwmA_h_SimChCfg[CeLED_e_SwLEDChNum] =
{
/*m_b_PreDutyHigh, m_t_DioChannelId, m_e_CrossRefPwm*/
{TRUE, DioChannel0_0, CeIoHwAb_e_PwmTypeHw},
};
<file_sep>/BSP/Include/SchM_CanSM.h
#ifndef SCHM_CANSM_H
#define SCHM_CANSM_H
#include "SchM.h"
#include "SchM_Types.h"
#include "SchM_Cfg.h"
#define CANSM_EXCLUSIVE_AREA_0 SCHM_EA_SUSPENDALLINTERRUPTS
#define CANSM_EXCLUSIVE_AREA_1 SCHM_EA_SUSPENDALLINTERRUPTS
#define CANSM_EXCLUSIVE_AREA_2 SCHM_EA_SUSPENDALLINTERRUPTS
#define CANSM_EXCLUSIVE_AREA_3 SCHM_EA_SUSPENDALLINTERRUPTS
#define CANSM_EXCLUSIVE_AREA_4 SCHM_EA_SUSPENDALLINTERRUPTS
#define CANSM_EXCLUSIVE_AREA_5 SCHM_EA_SUSPENDALLINTERRUPTS
# define SchM_Enter_CanSM(ExclusiveArea) \
SCHM_ENTER_EXCLUSIVE(ExclusiveArea)
# define SchM_Exit_CanSM(ExclusiveArea) \
SCHM_EXIT_EXCLUSIVE(ExclusiveArea)
#endif /* SCHM_CANSM_H */
<file_sep>/BSP/MCAL/NvM/NvM.H
/**
\addtogroup MODULE_NvM NvM
Non-volatile Memory Management Module.
*/
/*@{*/
/***************************************************************************//**
\file NvM.h
\brief Type and API declaration of Non-volatile Memory Management Module.
\author lsf
\version 1.0
\date 2012-3-29
\warning Copyright (C), 2012, PATAC.
*//*----------------------------------------------------------------------------
\history
<No.> <author> <time> <version> <description>
1 lsf 2012-3-29 1.0 Create
*******************************************************************************/
#ifndef _NVM_H
#define _NVM_H
/*******************************************************************************
Include Files
*******************************************************************************/
#include "Std_Types.h"
#include "NvM_Cfg.h"
/*******************************************************************************
Macro Definition
*******************************************************************************/
#define NVM_BLOCK_WRITE_BLOCK_ONCE_ON (uint8)1
//todo
#define NvM_Appl_DemBlock 0xF8
/*the result of request*/
#define NVM_REQ_OK (uint8)0
#define NVM_REQ_NOT_OK (uint8)1
#define NVM_REQ_PENDING (uint8)2
#define NVM_REQ_INTEGRITY_FAILED (uint8)3
#define NVM_REQ_BLOCK_SKIPPED (uint8)4
#define NVM_REQ_NV_INVALIDATED (uint8)5
#define NVM_REQ_CANCELLED (uint8)6
#define NVM_VENDOR_ID (30u)
#define NVM_MODULE_ID (20u)
#define NVM_INSTANCE_ID (0u)
/*def Service ID,the service type of function*/
#define NVM_INIT (0u) /* Service ID NvM_Init() */
#define NVM_SET_DATA_INDEX (1u) /* Service ID NvM_SetDataIndex() */
#define NVM_GET_DATA_INDEX (2u) /* Service ID NvM_GetDataIndex() */
#define NVM_AR_MAJOR_VERSION (2u)
#define NVM_AR_MINOR_VERSION (2u)
#define NVM_AR_PATCH_VERSION (0u)
#define NVM_SET_BLOCK_PROTECTION (3u) /* Service ID NvM_SetBlockProtection()*/
#define NVM_GET_ERROR_STATUS (4u) /* Service ID NvM_GetErrorStatus() */
#define NVM_SET_RAM_BLOCK_STATUS (5u) /* Service ID NvM_SetRamBlockStatus() */
#define NVM_READ_BLOCK (6u) /* Service ID NvM_ReadBlock() */
#define NVM_WRITE_BLOCK (7u) /* Service ID NvM_WriteBlock() */
#define NVM_RESTORE_BLOCK_DEFAULTS (8u) /* Service ID NvM_RestoreBlockDefaults()*/
#define NVM_ERASE_BLOCK (9u) /* Service ID NvM_EraseNvBlock() */
#define NVM_INVALIDATE_NV_BLOCK (11u) /* Service ID NvM_InvalidateNvBlock() */
#define NVM_READ_ALL (12u) /* Service ID NvM_ReadAll() */
#define NVM_WRITE_ALL (13u) /* Service ID NvM_WriteAll() */
#define NVM_MAINFUNCTION (14u) /* Service ID NvM_MainFunction() */
#define NVM_GET_VERSION_INFO (15u) /* Service ID NvM_GetVersionInfo() */
#define NVM_SET_BLOCK_LOCK_STATUS (16u) /* Service ID NvM_SetBlockProtection()*/
/*def ALL_SET,Set Flag of All Write/ All Read / Cancel All*/
#define NVM_APIFLAG_READ_ALL_SET 0x01
#define NVM_APIFLAG_READ_ALL_CL 0xFE
#define NVM_APIFLAG_WRITE_ALL_SET 0x02
#define NVM_APIFLAG_WRITE_ALL_CL 0xFD
#define NVM_APIFLAG_CANCEL_WR_ALL_SET 0x04
#define NVM_APIFLAG_CANCEL_WR_ALL_CL 0xFB
/*def STATE_SET,Set Status of Block */
#define NVM_WR_PROT_SET 0x01
#define NVM_WR_PROT_CL 0xFE
#define NVM_STATE_CHANGED_SET 0x02
#define NVM_STATE_CHANGED_CL 0xFD
#define NVM_LOCK_STAT_SET 0x04
#define NVM_LOCK_STAT_CL 0xFB
#define NVM_STATE_VALID_SET 0x08
#define NVM_STATE_VALID_CL 0xF7
/*******************************************************************************
Type Definition
*******************************************************************************/
/**
\typedef uint16 NvM_BlockIdType
Block ID type.
*/
typedef uint16 NvM_BlockIdType;
/**
\enum NvM_BlockError_Type
The Block Error or Status
*/
typedef enum
{
NVM_E_NOT_INITIALIZED = 0x14,
NVM_E_BLOCK_PENDING = 0x15,
NVM_E_LIST_OVERFLOW = 0x16,
NVM_E_NV_WRITE_PROTECTED = 0x17,
NVM_E_BLOCK_CONFIG = 0x18,
NVM_E_PARAM_BLOCK_ID = 0x0A,
NVM_E_PARAM_BLOCK_TYPE = 0x0B,
NVM_E_PARAM_BLOCK_DATA_IDX = 0x0C,
NVM_E_PARAM_BLOCK_ADDRESS = 0x0D,
NVM_E_PARAM_DATA = 0x0E
}NvM_BlockError_Type;
/**
\struct RamBlock_t
RamBlock attribute.
*/
typedef struct
{
uint8 NvRamErrorStatus;
uint8 NvDataIndex;
uint8 NvRamAttributes;
uint8 WriteNvRamOnce;
uint8* RamBlockDataAddr;
uint8 DeviceId;
uint16 Length;
uint16 BlockId;
uint16 ServiceId;
uint16 BlockOffset;
} RamBlock_t;
/**
\struct NvM_Config_t
Link-time Configuration.
*/
typedef struct{
uint8* RamAddr1; /**<RAM Mapping Address1 */
uint8* RamAddr2; /**<RAM Mapping Address2 */
uint8* RomAddr; /**<ROM Address(Default Value) */
uint16 Length; /**<Block Length */
} NvM_Config_t;
typedef uint8 NvM_RequestResultType;
//typedef uint16 NvM_BlockIdType;
#define NvM_Appl_NvmBlock1 (0)
#define NvmBlockDescriptor (1)
#define NVM_PUBLIC_CODE
//#define NVM_REQ_OK (0u) /* The last asynchronous request has been finished successfully */
//#define NVM_REQ_NOT_OK (1u) /* The last asynchronous request has been finished unsuccessfully */
//#define NVM_REQ_PENDING (2u) /* An asynchronous request is currently being processed */
//#define NVM_REQ_INTEGRITY_FAILED (3u) /* Result of the last NvM_ReadBlock or NvM_ReadAll is an integrity failure */
//#define NVM_REQ_BLOCK_SKIPPED (4u) /* The referenced block was skipped during a multi block request */
//#define NVM_REQ_NV_INVALIDATED (5u) /* The NV block is invalidated. */
#define NVM_WRITE_ALL (13u) /* Service ID NvM_WriteAll() */
/*******************************************************************************
Prototype Declaration
*******************************************************************************/
extern uint8 NvM_RWC_Flags;
extern RamBlock_t NvM_BlockMngmtArea[BLOCK_TOTAL];
extern const NvM_Config_t NvM_Config[];
extern void NvM_Init(void);
extern void NvM_SetDataIndex( uint16 BlockId, uint8 DataIndex );
extern void NvM_GetDataIndex( uint16 BlockId, uint8* DataIndexPtr );
extern void NvM_SetBlockProtection( uint16 BlockId, boolean ProtectionEnabled );
extern void NvM_GetErrorStatus( uint16 BlockId, uint8* RequestResultPtr );
extern void NvM_SetRamBlockStatus( uint16 BlockId, boolean BlockChanged );
extern Std_ReturnType NvM_ReadBlock( uint16 BlockId, uint8* NvM_DstPtr );
extern Std_ReturnType NvM_WriteBlock( uint16 BlockId, uint8* NvM_SrcPtr );
extern Std_ReturnType NvM_RestoreBlockDefaults( uint16 BlockId, uint8* NvM_DestPtr );
extern Std_ReturnType NvM_EraseNvBlock( uint16 BlockId );
extern Std_ReturnType NvM_InvalidateNvBlock( uint16 BlockId );
extern void NvM_CancelWriteAll( void );
extern void NvM_ReadAll( void );
extern void NvM_WriteAll ( void );
extern void NvM_MainFunction(void);
#endif /* #ifndef _NvM_H */
/*@}*/
<file_sep>/BSP/IoHwAb/IoHwAb_DoCfg.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 LED Components */
/* Module = Pwm_Irq.h */
/* Version = 3.1.3a */
/* Date = 23-Apr-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2013-2014 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of API information. */
/* */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 18-Aug-2009 : Initial version
/******************************************************************************/
#include "Dio.h"
#include "IoHwAb_DoCfg.h"
uint8 dummybuffer[2];
//KaHWIO_h_PortAttri
const TsDO_h_PortConfig KaDO_h_PortConfig[CeIoHwAb_u_DoNumber] =
{
/*********************************************************************************************************************
* configure this table according to hardware design only!!!
|p_bt_Port| |e_bt_Offset| |e_b_Inverse| |e_bt_DftVal| |e_bt_En| | m_u_DoType|
**********************************************************************************************************************/
/*ODH0 ~ ODH1*/
{NULL, DioChannel10_11, FALSE, TRUE, TRUE, CeDO_u_DioType},
{NULL, DioChannel10_10, FALSE, TRUE, TRUE, CeDO_u_DioType},
/*OUT1 ~ OUT4)*/
{NULL, DioChannel1_11, FALSE, TRUE, TRUE, CeDO_u_DioType},
{NULL, DioChannel1_10, FALSE, TRUE, TRUE, CeDO_u_DioType},
{NULL, DioChannel1_9, FALSE, TRUE, TRUE, CeDO_u_DioType},
{NULL, DioChannel1_8, FALSE, TRUE, TRUE, CeDO_u_DioType},
};
/*EOF*/
<file_sep>/BSP/MCAL/NvM/NvM_Cfg.h
/**
\addtogroup MODULE_NvM NvM
Non-volatile Memory Management Module.
*/
/*@{*/
/***************************************************************************//**
\file NvM_Cfg.h
\brief Pre-Compile Configuration of NVRAM Management Module.
\author zhaoyg
\version 1.0
\date 2012-3-27
\warning Copyright (C), 2012, PATAC.
*//*----------------------------------------------------------------------------
\history
<No.> <author> <time> <version> <description>
1 zhaoyg 2012-3-27 1.0 Create
*******************************************************************************/
#ifndef _NVM_CFG_H
#define _NVM_CFG_H
/*******************************************************************************
Include Files
*******************************************************************************/
#include "MemIf.h"
#include "NvM_Types.h"
/*******************************************************************************
Macro Definition
*******************************************************************************/
/**
\def BLOCK_TOTAL
Block total.
*/
#if 1
#define BLOCK_TOTAL 5
#else //Test Map B
#define BLOCK_TOTAL 17
#endif
/*******************************************************************************
Type Definition
*******************************************************************************/
/*******************************************************************************
Prototype Declaration
*******************************************************************************/
#endif /* #ifndef _NVM_CFG_H */
/*@}*/
<file_sep>/BSP/MCAL/Fee/Fee_Types.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Fee_Types.h */
/* Version = 3.0.4a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains type declarations of FEE Component */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 02-Nov-2009 : Initial version
* V3.0.1: 09-Feb-2010 : As per SCR 184 and 188, following changes are made:
* 1. A macro FEE_UNINIT is added and the
* value of the macro FEE_IDLE is changed from 0 to 8
* 2. The macro definition of FEE_ERASE_NOTIFICATION
* is removed.
* V3.0.2: 01-Apr-2010 : As per SCR 234, a macro FEE_INVALID_BLOCK_IDX is
* added.
* V3.0.3: 31-Aug-2010 : As per SCR 348, included Std_Types.h.
* V3.0.4: 12-Oct-2010 : As per SCR 367, macros FEE_INITIALIZED and
* FEE_UNINITIALIZED are modified.
* V3.0.4a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
#ifndef FEE_TYPES_H
#define FEE_TYPES_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Std_Types.h"
#include "MemIf_Types.h"
#include "EEL.h"
#include "FDL.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define FEE_TYPES_AR_MAJOR_VERSION FEE_AR_MAJOR_VERSION_VALUE
#define FEE_TYPES_AR_MINOR_VERSION FEE_AR_MINOR_VERSION_VALUE
#define FEE_TYPES_AR_PATCH_VERSION FEE_AR_PATCH_VERSION_VALUE
/* File version information */
#define FEE_TYPES_SW_MAJOR_VERSION 3
#define FEE_TYPES_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Common macros */
#define FEE_ZERO (uint8)0
#define FEE_ONE (uint16)1
#define FEE_TRUE (uint8)1
#define FEE_FALSE (uint8)0
/* States to hold initialization status */
#define FEE_INITIALIZED (boolean)TRUE
#define FEE_UNINITIALIZED (boolean)FALSE
/* States to hold cancel request status */
#define FEE_CANCEL_INPROG (uint8)1
#define FEE_REQ_AFT_CAN_ACCEPTED (uint8)2
/* Main states of FEE software component */
#define FEE_UNINIT (uint8)0
#define FEE_IDLE (uint8)8
#define FEE_STARTUP (uint8)1
#define FEE_BUSY_FLASH_OPERATION (uint8)2
#define FEE_FORMAT (uint8)4
#define FEE_JOB_COMPLETED (uint8)5
#define FEE_JOB_CANCELLED (uint8)6
#define FEE_JOB_INPROG (uint8)7
#define FEE_INVALID_BLOCK_IDX (uint16)0xFFFF
/* Structure to hold block configuration */
typedef struct STagFee_BlockConfigType
{
uint16 usFeeBlockNumber;
uint16 usFeeBlockSize;
boolean blFeeImmediateData;
} Tdd_Fee_BlockConfigType;
/* Structure to hold function pointer for notifications */
typedef struct STagFee_FuncType
{
P2FUNC (void, FEE_APPL_CODE, pFee_JobEndNotification) (void);
P2FUNC (void, FEE_APPL_CODE, pFee_JobErrorNotification) (void);
} Tdd_Fee_FuncType;
/* Global Structure to handle the Global Variables */
typedef struct STagTdd_Fee_GstVar
{
/* Variable to hold the Normal command */
VAR(eel_request_t, FEE_NOINIT_DATA) GstRequest;
/* Variable to hold the Immediate command after Fee_Cancel */
VAR(eel_request_t, FEE_NOINIT_DATA) GstNewReq;
/* Variable to hold the result of request */
VAR(MemIf_JobResultType, FEE_NOINIT_DATA) GenJobResult;
/* Variable to hold the state of FEE software component */
VAR(uint8, FEE_NOINIT_DATA) GucState;
/* Variable to hold the state of Previous request */
VAR(uint8, FEE_NOINIT_DATA) GucPreviousJobState;
}Tdd_Fee_GstVar;
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
#define FEE_START_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/*
* This array defines the structure for each block configured
* in input ARXML file
*/
extern CONST(Tdd_Fee_BlockConfigType, FEE_CONST) Fee_GstBlockConfiguration[];
/* This structure contains the function pointer for callback functions */
extern CONST(Tdd_Fee_FuncType, FEE_CONST) Fee_GstFunctionNotification;
#define FEE_STOP_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* FEE_TYPES_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/NvM/NvM_Queue.h
/**
\addtogroup MODULE_NvM NvM
Non-volatile Memory Management Module.
*/
/*@{*/
/***************************************************************************//**
\file NvM_Queue.h
\brief Type and API declaration of job queue.
\author Lvsf
\version 1.0
\date 2012-3-28
\warning Copyright (C), 2012, PATAC.
*//*----------------------------------------------------------------------------
\history
<No.> <author> <time> <version> <description>
1 Lvsf 2012-3-28 1.0 Create
*******************************************************************************/
#ifndef _NVM_QUEUE_H
#define _NVM_QUEUE_H
/*******************************************************************************
Include Files
*******************************************************************************/
#include "NvM.h"
/*******************************************************************************
Macro Definition
*******************************************************************************/
/**
\def NVM_QUEUE_SIZE
Queue size.
*/
#define NVM_QUEUE_SIZE 10
/*******************************************************************************
Type Definition
*******************************************************************************/
/**
\struct Queue_t
Queue type definition.
*/
typedef struct
{
RamBlock_t* Data[NVM_QUEUE_SIZE]; /**<Elements of Queue*/
uint8 Front; /**<Header of Queue*/
uint8 Rear; /**<Tail of Queue*/
} Queue_t;
/*******************************************************************************
Prototype Declaration
*******************************************************************************/
/* Clear all jobs */
extern void NvM_ClearJob(void);
/* Add job to queue */
extern uint8 NvM_QueueJob(uint16 BlockId,
uint16 ServiceId,
uint8* BlockOperatePtr);
/* Get job from queue */
extern uint8 NvM_GetJob(RamBlock_t** Job);
#endif /* #ifndef _NVM_QUEUE_H */
/*@}*/
<file_sep>/BSP/MCAL/Wdg/Wdg_23_DriverB.h
/*============================================================================*/
/* Project = AUTOSAR NEC Xx4 MCAL Components */
/* Module = Wdg_23_DriverB.h */
/* Version = 3.0.1 */
/* Date = 14-Jul-2009 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009 by NEC Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of Pre-Compile Macros and API information */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* NEC Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by NEC. Any warranty */
/* is expressly disclaimed and excluded by NEC, either expressed or implied, */
/* including but not limited to those for non-infringement of intellectual */
/* property, merchantability and/or fitness for the particular purpose. */
/* */
/* NEC shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall NEC be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. NEC shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by NEC in connection with the Product(s) and/or the */
/* Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/* Compiler: GHS V5.1.6c */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12-Jun-2009 : Initial version.
* V3.0.1: 14-Jul-2009 : As per SCR 015, compiler version is changed from
* V5.0.5 to V5.1.6c in the header of the file.
*/
/******************************************************************************/
#ifndef WDG_23_DRIVERB_H
#define WDG_23_DRIVERB_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Std_Types.h"
#include "WdgIf_Types.h"
#include "Wdg_23_DriverB_Cfg.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
#define WDG_23_DRIVERB_VENDOR_ID WDG_23_DRIVERB_VENDOR_ID_VALUE
#define WDG_23_DRIVERB_MODULE_ID WDG_23_DRIVERB_MODULE_ID_VALUE
#define WDG_23_DRIVERB_INSTANCE_ID WDG_23_DRIVERB_INSTANCE_ID_VALUE
/* Autosar specification version information */
#define WDG_23_DRIVERB_AR_MAJOR_VERSION WDG_23_DRIVERB_AR_MAJOR_VERSION_VALUE
#define WDG_23_DRIVERB_AR_MINOR_VERSION WDG_23_DRIVERB_AR_MINOR_VERSION_VALUE
#define WDG_23_DRIVERB_AR_PATCH_VERSION WDG_23_DRIVERB_AR_PATCH_VERSION_VALUE
/* Software version Information */
#define WDG_23_DRIVERB_SW_MAJOR_VERSION WDG_23_DRIVERB_SW_MAJOR_VERSION_VALUE
#define WDG_23_DRIVERB_SW_MINOR_VERSION WDG_23_DRIVERB_SW_MINOR_VERSION_VALUE
#define WDG_23_DRIVERB_SW_PATCH_VERSION WDG_23_DRIVERB_SW_PATCH_VERSION_VALUE
/*******************************************************************************
** DET ERROR CODES **
*******************************************************************************/
/* Following error will be reported when API service is used in wrong context
(For eg. When Trigger / SetMode function is invoked without initialization)*/
#define WDG_23_DRIVERB_E_DRIVER_STATE (uint8) 0x10
/* Following error will be reported when API service is called with wrong /
inconsistent parameter(s) */
#define WDG_23_DRIVERB_E_PARAM_MODE (uint8) 0x11
/* Following error will be reported when API service is called with wrong /
inconsistent parameter(s) */
#define WDG_23_DRIVERB_E_PARAM_CONFIG (uint8) 0x12
/* Following error will be reported when Wdg_GetVersionInfo API is invoked with
a null pointer */
#define WDG_23_DRIVERB_E_PARAM_POINTER (uint8) 0xF0
/* Following error will be reported when Watchdog driver database does not
exist or exist in invalid location */
#define WDG_23_DRVB_E_INVALID_DATABASE (uint8) 0xF1
typedef struct STagTdd_Wdg_23_DriverB_ConfigType
{
/* Database start value */
uint32 ulStartOfDbToc;
/* Value of WDTAMD register for SLOW mode*/
uint8 ucWdtamdSlowValue;
/* Value of WDTAMD register for FAST mode*/
uint8 ucWdtamdFastValue;
/* Value of WDTAMD register for Default mode */
uint8 ucWdtamdDefaultMode;
}Wdg_23_DriverB_ConfigType;
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Service ID of Watchdog Driver Initialization API */
#define WDG_23_DRIVERB_INIT_SID 0x00
/* Service ID of SetMode API which switches current watchdog mode to the
Watchdog mode defined by the parameter ModeSet */
#define WDG_23_DRIVERB_SETMODE_SID 0x01
/* Service ID of Trigger API which triggers the Watchdog Hardware*/
#define WDG_23_DRIVERB_TRIGGER_SID 0x02
/* Service ID of Version Information API */
#define WDG_23_DRIVERB_GETVERSIONINFO_SID 0x04
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#define WDG_23_DRIVERB_START_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
extern CONST(Wdg_23_DriverB_ConfigType,
WDG_23_DRIVERB_CONFIG_CONST) Wdg_23_DriverB_GstConfiguration[];
#define WDG_23_DRIVERB_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
#define WDG_23_DRIVERB_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* External Declaration for Watchdog Initialization API */
extern FUNC(void, WDG_23_DRIVERB_PUBLIC_CODE) Wdg_23_DriverBInit
(P2CONST(Wdg_23_DriverB_ConfigType, AUTOMATIC, WDG_23_DRIVERB_APPL_CONST)
ConfigPtr);
/* External Declaration for Watchdog SetMode API */
extern FUNC(Std_ReturnType, WDG_23_DRIVERB_PUBLIC_CODE) Wdg_23_DriverBSetMode
(WdgIf_ModeType Mode);
/* External Declaration for Watchdog Trigger API */
extern FUNC(void, WDG_23_DRIVERB_PUBLIC_CODE) Wdg_23_DriverBTrigger(void);
#if (WDG_23_DRIVERB_VERSION_INFO_API == STD_ON)
/* External Declaration for Watchdog Version Information API */
extern FUNC(void, WDG_23_DRIVERB_PUBLIC_CODE)Wdg_23_DriverBGetVersionInfo
(P2VAR(Std_VersionInfoType, AUTOMATIC, WDG_23_DRIVERB_APPL_DATA)versioninfo);
#endif
#define WDG_23_DRIVERB_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* WDG_23_DRIVERB_H */
/*******************************************************************************
** End Of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/MemIf/MemIf_Types.h
/**
\addtogroup MODULE_MemIf MemIf
Memory Abstration Interface Module.
*/
/*@{*/
/***************************************************************************//**
\file MemIf_Types.h
\brief Types Definition of Memory Abstration Interface Module.
\author zhaoyg
\version 1.0
\date 2012-3-27
\warning Copyright (C), 2012, PATAC.
*//*----------------------------------------------------------------------------
\history
<No.> <author> <time> <version> <description>
1 zhaoyg 2012-3-27 1.0 Create
*******************************************************************************/
#ifndef _MEMIF_TYPES_H
#define _MEMIF_TYPES_H
/*******************************************************************************
Include Files
*******************************************************************************/
/*******************************************************************************
Macro Definition
*******************************************************************************/
/*******************************************************************************
Type Definition
*******************************************************************************/
/**
\enum MemIf_StatusType
Type definition for MEMIF status types.
*/
typedef enum
{
MEMIF_UNINIT = 0,
MEMIF_IDLE,
MEMIF_BUSY,
MEMIF_BUSY_INTERNAL
} MemIf_StatusType;
/**
\enum MemIf_StatusType
Type definition for MEMIF job result types.
*/
typedef enum
{
MEMIF_JOB_OK = 0,
MEMIF_JOB_FAILED,
MEMIF_JOB_PENDING,
MEMIF_JOB_CANCELLED,
MEMIF_BLOCK_INCONSISTENT,
MEMIF_BLOCK_INVALID
} MemIf_JobResultType;
/**
\enum MemIf_StatusType
Type definition for MEMIF mode types.
*/
typedef enum
{
MEMIF_MODE_SLOW = 0,
MEMIF_MODE_FAST
} MemIf_ModeType;
/*******************************************************************************
Prototype Declaration
*******************************************************************************/
#endif /* #ifndef _MEMIF_TYPES_H */
/*@}*/
<file_sep>/BSP/MCAL/Mcu.dp/Mcu_Reg.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* File name = Mcu_Reg.h */
/* Version = 3.1.8 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains register addresses used. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.1.13
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_MCU_V308_140113_HEADLAMP.arxml
* GENERATED ON: 16 Jan 2014 - 08:46:12
*/
#ifndef MCU_REG_H
#define MCU_REG_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*******************************************************************************
** Common Published Information **
*******************************************************************************/
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* This macro containes the base address of CKSC_000 register */
#define MCU_CKSC000_BASE_ADDRESS ((uint32)0xFF422030ul)
/* Protection Command Register 0 */
#define MCU_PROTCMD0 *((volatile uint8 *)0xFF424000ul)
/* Protection Command Register 1 */
#define MCU_PROTCMD1 *((volatile uint8 *)0xFF428000ul)
/* Protection Command Register 2 */
#define MCU_PROTCMD2 *((volatile uint8 *)0xFF420300ul)
/* Main OSC enable register */
#define MCU_MOSCE *((volatile uint32 *)0xFF421010ul)
/* Main OSC control register */
#define MCU_MOSCC *((volatile uint32 *)0xFF421018ul)
/* Main OSC stabilization time setting register */
#define MCU_MOSCST *((volatile uint32 *)0xFF42101Cul)
/* Main OSC status register */
#define MCU_MOSCS *((volatile uint32 *)0xFF421014ul)
/* Protection status register0 */
#define MCU_PROTS0 *((volatile uint8 *)0xFF424004ul)
/* Protection status register1 */
#define MCU_PROTS1 *((volatile uint8 *)0xFF428004ul)
/* Protection status register2 */
#define MCU_PROTS2 *((volatile uint8 *)0xFF420304ul)
/* Ring OSC enable register */
#define MCU_ROSCE *((volatile uint32 *)0xFF421000ul)
/* Ring OSC status register */
#define MCU_ROSCS *((volatile uint32 *)0xFF421004ul)
/* PLL0 enable register */
#define MCU_PLLE0 *((volatile uint32 *)0xFF425000ul)
/* PLL0 stabilization time setting register */
#define MCU_PLLST0 *((volatile uint32 *)0xFF42500Cul)
/* PLL0 Control register */
#define MCU_PLLC0 *((volatile uint32 *)0xFF425008ul)
/* PLL0 status register */
#define MCU_PLLS0 *((volatile uint32 *)0xFF425004ul)
/* PLL1 enable register */
#define MCU_PLLE1 *((volatile uint32 *)0xFF425010ul)
/* PLL1 stabilization time setting register */
#define MCU_PLLST1 *((volatile uint32 *)0xFF42501Cul)
/* PLL1 Control register */
#define MCU_PLLC1 *((volatile uint32 *)0xFF425018ul)
/* PLL1 status register */
#define MCU_PLLS1 *((volatile uint32 *)0xFF425014ul)
/* PLL2 enable register */
#define MCU_PLLE2 *((volatile uint32 *)0xFF425020ul)
/* PLL2 stabilization time setting register */
#define MCU_PLLST2 *((volatile uint32 *)0xFF42502Cul)
/* PLL2 Control register */
#define MCU_PLLC2 *((volatile uint32 *)0xFF425028ul)
/* PLL2 status register */
#define MCU_PLLS2 *((volatile uint32 *)0xFF425024ul)
/* Reset factor register */
#define MCU_RESF *((volatile uint32 *)0xFF420160ul)
/* Software reset register */
#define MCU_SWRESA *((volatile uint32 *)0xFF420204ul)
/* Power save control register 0 */
#define MCU_PSC0 *((volatile uint32 *)0xFF420000ul)
/* Power save control register 1 */
#define MCU_PSC1 *((volatile uint32 *)0xFF420008ul)
/* Power status register 0 */
#define MCU_PWS0 *((volatile uint32 *)0xFF420004ul)
/* Power status register 1 */
#define MCU_PWS1 *((volatile uint32 *)0xFF42000Cul)
/* OSC wake up factor mask register */
#define MCU_OSCWUFMSK *((volatile uint32 *)0xFF4201A4ul)
/* LVI control register */
#define MCU_LVICNT *((volatile uint32 *)0xFF420200ul)
/* Reset factor clear register */
#define MCU_RESFC *((volatile uint32 *)0xFF420168ul)
/* FOUT Divider register */
#define MCU_FOUTDIV *((volatile uint16 *)0xFF81B000ul)
/* Voltage comparator channel 0 control register */
#define MCU_VCPC0CTL0 *((volatile uint8 *)0xFF818000ul)
/* Voltage comparator channel 1 control register */
#define MCU_VCPC0CTL1 *((volatile uint8 *)0xFF818004ul)
/* Sub OSC status register */
#define MCU_SOSCS *((volatile uint32 *)0xFF421024ul)
/* Sub OSC enable register */
#define MCU_SOSCE *((volatile uint32 *)0xFF421020ul)
/* Sub OSC stabilization time setting register */
#define MCU_SOSCST *((volatile uint32 *)0xFF42102Cul)
/* CLMA0 Control register 1 */
#define MCU_CLMA0CTL1 *((volatile uint8 *)0xFF802004ul)
/* CLMA0 Comparison register H */
#define MCU_CLMA0CMPH *((volatile uint16 *)0xFF80200Cul)
/* CLMA0 Comparison register L */
#define MCU_CLMA0CMPL *((volatile uint16 *)0xFF802008ul)
/* CLMA0 Control register 0 */
#define MCU_CLMA0CTL0 *((volatile uint8 *)0xFF802000ul)
/* CLMA0 Protection command register */
#define MCU_CLMA0PCMD *((volatile uint8 *)0xFF802010ul)
/* CLMA0 Protection status register */
#define MCU_CLMA0PS *((volatile uint8 *)0xFF802014ul)
/* CLMA2 Control register 1 */
#define MCU_CLMA2CTL1 *((volatile uint8 *)0xFF804004ul)
/* CLMA2 Comparison register H */
#define MCU_CLMA2CMPH *((volatile uint16 *)0xFF80400Cul)
/* CLMA2 Comparison register L */
#define MCU_CLMA2CMPL *((volatile uint16 *)0xFF804008ul)
/* CLMA2 Control register 0 */
#define MCU_CLMA2CTL0 *((volatile uint8 *)0xFF804000ul)
/* CLMA2 Protection command register */
#define MCU_CLMA2PCMD *((volatile uint8 *)0xFF804010ul)
/* CLMA2 Protection status register */
#define MCU_CLMA2PS *((volatile uint8 *)0xFF804014ul)
/* CLMA3 Control register 1 */
#define MCU_CLMA3CTL1 *((volatile uint8 *)0xFF805004ul)
/* CLMA3 Comparison register H */
#define MCU_CLMA3CMPH *((volatile uint16 *)0xFF80500Cul)
/* CLMA3 Comparison register L */
#define MCU_CLMA3CMPL *((volatile uint16 *)0xFF805008ul)
/* CLMA3 Control register 0 */
#define MCU_CLMA3CTL0 *((volatile uint8 *)0xFF805000ul)
/* CLMA3 Protection command register */
#define MCU_CLMA3PCMD *((volatile uint8 *)0xFF805010ul)
/* CLMA3 Protection status register */
#define MCU_CLMA3PS *((volatile uint8 *)0xFF805014ul)
/* Wake up factor registers for ISO0 area */
#define MCU_WUFL0 *((volatile uint32 *)0xFF420100ul)
#define MCU_WUFM0 *((volatile uint32 *)0xFF420110ul)
#define MCU_WUFH0 *((volatile uint32 *)0xFF420120ul)
/* Wake up factor registers for ISO1 area */
#define MCU_WUFL1 *((volatile uint32 *)0xFF420130ul)
#define MCU_WUFM1 *((volatile uint32 *)0xFF420140ul)
#define MCU_WUFH1 *((volatile uint32 *)0xFF420150ul)
/* Wake up factor clear registers for ISO0 area */
#define MCU_WUFCL0 *((volatile uint32 *)0xFF420108ul)
#define MCU_WUFCM0 *((volatile uint32 *)0xFF420118ul)
#define MCU_WUFCH0 *((volatile uint32 *)0xFF420128ul)
/* Wake up factor clear registers for ISO1 area */
#define MCU_WUFCL1 *((volatile uint32 *)0xFF420138ul)
#define MCU_WUFCM1 *((volatile uint32 *)0xFF420148ul)
#define MCU_WUFCH1 *((volatile uint32 *)0xFF420158ul)
/* Wake up factor mask registers for ISO0 area */
#define MCU_WUFMSKL0 *((volatile uint32 *)0xFF420104ul)
#define MCU_WUFMSKM0 *((volatile uint32 *)0xFF420114ul)
#define MCU_WUFMSKH0 *((volatile uint32 *)0xFF420124ul)
/* Wake up factor mask registers for ISO1 area */
#define MCU_WUFMSKL1 *((volatile uint32 *)0xFF420134ul)
#define MCU_WUFMSKM1 *((volatile uint32 *)0xFF420144ul)
#define MCU_WUFMSKH1 *((volatile uint32 *)0xFF420154ul)
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* MCU_REG_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Adc/Adc_Ram.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Adc_Ram.h */
/* Version = 3.1.3 */
/* Date = 20-Mar-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2013 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Global variable declarations. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 10-Jul-2009 : Initial version
*
* V3.0.1: 12-Oct-2009 : As per SCR 052, the following changes are made
* 1. Extern declaration of the array
* Adc_GaaOperationClrMask, Adc_GaaExtTrigClrMask
* are removed.
* 2. Extern declaration of the array
* Adc_GaaOperationMask is added.
*
* V3.0.2: 02-Dec-2009 : As per SCR 157, the following changes are made
* 1. Adc_GpRunTimeData declaration is changed.
* 2. Adc_GucPopFrmQueue is put within pre-compile
* option.
* 3. Adc_GpDmaHWUnitMapping, Adc_GpDmaCGUnitMapping
* are added.
*
* V3.0.3: 05-Jan-2010 : As per SCR 179, Adc_GucResultRead and
* Adc_GblSampleComp are deleted.
*
* V3.0.4: 01-Jul-2010 : As per SCR 295, Adc_GaaStreamEnableMask[],
* Adc_GaaOperationMask[] and
* Adc_GaaCGmConvStatusMask[] are moved to individual
* files where they are used.
*
* V3.1.0: 27-Jul-2011 : Modified for DK-4
* V3.1.1: 14-Feb-2012 : Merged the fixes done for Fx4L Adc driver
*
* V3.1.2: 04-Jun-2012 : As per SCR 019, the following changes are made
* 1. Compiler version is removed from environment
* section.
* 2. File version is changed.
* V3.1.3: 20-Mar-2013 : As per SCR 083, the following changes are made
* 1. "Adc_GaaHwUnitStatus" is added.
*/
/******************************************************************************/
#ifndef ADC_RAM_H
#define ADC_RAM_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define ADC_RAM_AR_MAJOR_VERSION ADC_AR_MAJOR_VERSION_VALUE
#define ADC_RAM_AR_MINOR_VERSION ADC_AR_MINOR_VERSION_VALUE
#define ADC_RAM_AR_PATCH_VERSION ADC_AR_PATCH_VERSION_VALUE
/*
* File version information
*/
#define ADC_RAM_SW_MAJOR_VERSION 3
#define ADC_RAM_SW_MINOR_VERSION 1
#define ADC_RAM_SW_PATCH_VERSION 2
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (ADC_SW_MAJOR_VERSION != ADC_RAM_SW_MAJOR_VERSION)
#error "Software major version of Adc.h and Adc_Ram.h did not match!"
#endif
#if (ADC_SW_MINOR_VERSION!= ADC_RAM_SW_MINOR_VERSION)
#error "Software minor version of Adc.h and Adc_Ram.h did not match!"
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
#define ADC_START_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* Global database pointer */
extern P2CONST(Adc_ConfigType, ADC_CONST, ADC_CONFIG_CONST)
Adc_GpConfigPtr;
/* Global pointer variable for hardware unit configuration */
extern P2CONST(Tdd_Adc_HwUnitConfigType, ADC_CONST, ADC_CONFIG_CONST)
Adc_GpHwUnitConfig;
/* Global pointer variable for group configuration */
extern P2CONST(Tdd_Adc_GroupConfigType, ADC_CONST, ADC_CONFIG_CONST)
Adc_GpGroupConfig;
#if (ADC_HW_TRIGGER_API == STD_ON)
/* Global pointer variable for HW group configuration */
extern P2CONST(Tdd_Adc_HWGroupTriggType, ADC_CONST, ADC_CONFIG_CONST)
Adc_GpHWGroupTrigg;
#endif
#if (ADC_DMA_MODE_ENABLE == STD_ON)
/* Global pointer variable for HW group configuration */
extern P2CONST(Tdd_Adc_DmaUnitConfig, ADC_CONST, ADC_CONFIG_CONST)
Adc_GpDmaUnitConfig;
/* Global pointer to DMA HW unit array mapping */
extern P2CONST(Adc_HwUnitType, ADC_CONST, ADC_CONFIG_CONST)
Adc_GpDmaHWUnitMapping;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* Global pointer to DMA CG unit array mapping */
extern P2CONST(uint8, ADC_CONST, ADC_CONFIG_CONST)
Adc_GpDmaCGUnitMapping;
#endif
#endif /* #if (ADC_DMA_MODE_ENABLE == STD_ON) */
/* Global pointer variable for group ram data */
extern P2VAR(Tdd_Adc_ChannelGroupRamData, ADC_NOINIT_DATA, ADC_CONFIG_DATA)
Adc_GpGroupRamData;
/* Global pointer variable for hardware unit ram data */
extern P2VAR(Tdd_Adc_HwUnitRamData, ADC_NOINIT_DATA, ADC_CONFIG_DATA)
Adc_GpHwUnitRamData;
/* Global pointer variable for runtime ram data */
extern P2VAR(Tdd_Adc_RunTimeData, ADC_NOINIT_DATA, ADC_CONFIG_DATA)
Adc_GpRunTimeData;
/* Indicates max no of SW triggered groups configured */
extern VAR(boolean, ADC_NOINIT_DATA) Adc_GaaHwUnitStatus[];
#define ADC_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
#define ADC_START_SEC_VAR_NOINIT_8BIT
#include "MemMap.h"
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* Indicates the group is popped out of the queue */
extern VAR(uint8, ADC_NOINIT_DATA) Adc_GucPopFrmQueue;
#endif
/* Indicates max no of SW triggered groups configured */
extern VAR(uint8, ADC_NOINIT_DATA) Adc_GucMaxSwTriggGroups;
#if (ADC_DMA_MODE_ENABLE == STD_ON)
/* Indicates no of DMA channel Ids configured */
extern VAR(uint8, ADC_NOINIT_DATA) Adc_GucMaxDmaChannels;
#endif
#define ADC_STOP_SEC_VAR_NOINIT_8BIT
#include "MemMap.h"
#define ADC_START_SEC_VAR_1BIT
#include "MemMap.h"
#if (ADC_DEV_ERROR_DETECT == STD_ON)
/* Holds the status of Initialisation */
extern VAR(boolean, ADC_INIT_DATA) Adc_GblDriverStatus;
#endif
#define ADC_STOP_SEC_VAR_1BIT
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* ADC_RAM_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/Include/Compiler_Cfg.h
/**********************************************************************************************************************
* COPYRIGHT
* -------------------------------------------------------------------------------------------------------------------
* \verbatim
* Copyright (c) 2007 by Vector Informatik GmbH. All rights reserved.
*
* Please note, that this file contains example configuration used by the
* MICROSAR BSW. This code may influence the behaviour of the MICROSAR BSW
* in principle. Therefore, great care must be taken to verify
* the correctness of the implementation.
*
* The contents of the originally delivered files are only examples resp.
* implementation proposals. With regard to the fact that these functions
* are meant for demonstration purposes only, Vector Informatik's
* liability shall be expressly excluded in cases of ordinary negligence,
* to the extent admissible by law or statute.
* \endverbatim
* -------------------------------------------------------------------------------------------------------------------
* FILE DESCRIPTION
* -------------------------------------------------------------------------------------------------------------------
* File: _Compiler_Cfg.h
* Component: -
* Module: -
* Generator: -
*
* Description: This File is a template for the Compiler_Cfg.h
* This file has to be extended with the memory and pointer classes for all BSW modules
* which where used.
*
* -------------------------------------------------------------------------------------------------------------------
* MISRA VIOLATIONS
* -------------------------------------------------------------------------------------------------------------------
*
*
*********************************************************************************************************************/
/**********************************************************************************************************************
* AUTHOR IDENTITY
* -------------------------------------------------------------------------------------------------------------------
* Name Initials Company
* -------------------------------------------------------------------------------------------------------------------
* <NAME> Jk Vector Informatik
* -------------------------------------------------------------------------------------------------------------------
* REVISION HISTORY
* -------------------------------------------------------------------------------------------------------------------
* Version Date Author Change Id Description
* -------------------------------------------------------------------------------------------------------------------
* 01.00.00 2007-08-01 Jk Initial creation
* 01.01.00 2007-12-14 Jk Component spesific defines filtering added
* 01.01.01 2008-12-17 Ht Improve list of components (Tp_AsrTpCan,Tp_AsrTpFr,DrvMcu,DrvIcu added)
* 01.01.02 2009-04-27 Ht support OEM specific _compiler_cfg.inc file, improve list of components
* (Cp_XcpOnCanAsr, Il_AsrIpduM, If_VxFblDcm, If_VxFblVpm_Volvo_ab, DrvFls added)
* 01.01.03 2009-04-24 Msr Renamed J1939_AsrBase as TpJ1939_AsrBase
* 01.01.04 2009-06-03 Ht Improve list of components (Adc, Dio, Gpt, Pwm, Spi, Wdg, Fls, Port, Fim)
* 01.02.00 2009-08-01 Ht Improve list of components (Fee_30_Inst2, Can, ...Sub)
* Support filtering for RTE
* 01.02.01 2009-09-02 Lo add external Flash driver support
* 01.02.02 2009-09-21 Lo add DrvFls_Mcs12xFslftm01ExtVx
* Ht Improve list of components (CanTrcv_30_Tja1040dio,
* Eth, EthTrcv, EthIf, SoAd, TcpIp, EthSM)
* 01.03.00 2009-10-30 Ht support R8: change EthTrcv to EthTrcv_30_Canoeemu
* support EthTrcv_30_Dp83848
* change CanTrcv_30_Xdio to CanTrcv_30___Your_Trcv__
* change CanTrcv_30_Tja1040dio to CanTrcv_30_Tja1041
* change name FrTrcv to FrTrcv_30_Tja1080dio
* Lo add Cp_AsrXcp
* Ht add Cp_XcpOnFrAsr
* 01.03.01 2010-01-13 Ht support SysService_AsrCal
* 01.03.02 2010-02-15 Ht support SysService_SswRcs_Daimler, SysService_Tls, Tp_Http,
* SysService_Dns, SysService_Json, DrvTrans_GenericLindioAsr
* Lo add Diag_AsrDem for all oems
* rename internal variables and filtermethods
* 01.04.00 2010-03-04 Ht change name FrTrcv_30_Tja1080dio to FrTrcv_30_Tja1080
* 01.04.01 2010-03-10 Ht support DrvTrans_GenericFrAsr, DrvTrans_As8223FrspiAsr, DrvEep and If_AsrIfEa
* 01.04.02 2010-04-07 Lo change IfFee to real components and add If_AsrIfWdV85xNec01Sub
* 01.04.03 2010-06-11 Ht add CanTrcv_30_Tja1043
* Lo add Il_AsrIpduMEbBmwSub
* 01.04.04 2010-08-24 Ht add CanTrcv_30_Tle62512G, DrvEep_XAt25128EAsr, Tp_AsrTpFrEbBmwSub
* 01.05.00 2010-08-24 Ht support R10:
* change LinTrcv_30_Tle7259dio to LinTrcv_30_Tle7259
* 01.05.01 2010-10-14 Ht add VStdLib, SysService_SswScc, SysService_IpBase, SysService_Crypto
* 01.05.02 2010-10-20 Ht support comments for Package Merge Tool
* 01.05.03 2010-11-03 Ht add SysService_E2eLibTttechSub, SysService_E2ePwTttechSub
* 01.05.04 2010-11-16 Ht add SysService_Exi, DrvTrans_Int6400EthAsr, Cdd_AsrCdd_Fiat, Diag_AsrDem_Fiat,
* 01.05.05 2010-12-17 Ht add SysService_AsrSchM, DrvEep_XXStubAsr, DrvIcu_Tms570Tinhet01ExtVx
* DrvWd_XTle4278gEAsr, DrvWd_XXStubAsr
* 01.05.06 2011-02-17 Ht add DrvEed, SysService_AsrBswM
* 01.05.07 2011-03-04 Ht add DrvTrans_Tja1055CandioAsr
* rename CanTrcv_30_Tja1040dio to CanTrcv_30_Tja1040
* add SysService_XmlEngine
* 01.06.00 2011-03-04 Ht support ASR4.0
* add Ccl_Asr4ComM, Ccl_Asr4SmCan, Nm_Asr4NmIf, Nm_AsrNmDirOsek
* 01.06.01 2011-04-15 Ht add Diag_AsrDcm_<OEM>
* 01.06.02 2011-06-17 Ht correct Diag_AsrDcm_<OEM>
* add Monitoring_AsrDlt and Monitoring_GenericMeasurement
* 01.06.03 2011-09-01 Ht add DrvTrans_Tja1145CanSpiAsr, DrvTrans_E52013CanspiAsr, DrvFls_XXStubAsr,
* If_AsrIfFeeV85xNec05Sub, If_AsrIfFeeV85xNec06Sub, If_AsrIfFeeV85xNec07Sub
* SysService_AsrWdMTttechSub and If_AsrIfWdTttechSub
* 01.06.04 2011-10-20 Ht ESCAN00054334: add If_AsrIfFeeTiSub
* ESCAN00054719: add Cdd_AsrCdd
* 01.06.05 2011-12-09 Ht add Tp_IpV4, Tp_IpV6
* 01.06.06 2011-12-14 Ht add Monitoring_RuntimeMeasurement
* 01.06.07 2012-01-03 Ht add DrvI2c, SysService_Asr4BswM
* 01.06.08 2012-01-31 Ht add DrvTrans_Ar7000EthAsr, DrvTrans_GenericEthmiiAsr
* 01.06.09 2012-03-06 Ht add If_AsrIfFeeMb9df126Fuji01Sub,
* Infineon_Tc1767Inf01Sub, Infineon_Tc178xInf01Sub, Infineon_Tc1797Inf01Sub, Infineon_Tc1797Inf02Sub
* 01.06.10 2012-03-13 Ht add Gw_AsrPduRCfg5, Il_AsrComCfg5, Il_AsrIpduMCfg5, Cdd_AsrCddCfg5,
* Tp_Asr4TpCan, Diag_Asr4Dcm, Diag_Asr4Dem
* 01.06.11 2012-03-20 Ht add Cp_AsrCcp, Cp_XcpOnTcpIpAsr
*********************************************************************************************************************/
#ifndef COMPILER_CFG_H
#define COMPILER_CFG_H
/**********************************************************************************************************************
* INCLUDES
*********************************************************************************************************************/
/* Package Merger: Start Section CompilerCfgIncludes */
/* Package Merger: Stop Section CompilerCfgIncludes */
/**********************************************************************************************************************
* GLOBAL CONSTANT MACROS
*********************************************************************************************************************/
#define AUTOSAR_COMSTACKDATA
#define MSR_REGSPACE
/* due to compatibility to ASR 2.1 */
#define _STATIC_ STATIC
#define _INLINE_ INLINE
/* Package Merger: Start Section CompilerCfgModuleList */
#define SKIP_MAGIC_NUMBER
#define V_SUPPRESS_EXTENDED_VERSION_CHECK
/*#define V_EXTENDED_BUILD_LIB_CHECK*/
#define V_USE_DUMMY_STATEMENT STD_ON
/**********************************************************************************************************************
* COMM START
*********************************************************************************************************************/
#define COMM_CODE
#define COMM_CONST
#define COMM_VAR_INIT
#define COMM_VAR_NOINIT
#define COMM_VAR_NOINIT_8BIT
#define COMM_VAR_NOINIT_16BIT
#define COMM_VAR_NOINIT_UNSPECIFIED
#define COMM_VAR_ZERO_INIT
#define COMM_APPL_CODE
#define COMM_APPL_VAR
#define COMM_APPL_VAR_NVRAM
#define COMM_PBCFG
/**********************************************************************************************************************
* COMM END
*********************************************************************************************************************/
/**********************************************************************************************************************
* CanSM START
*********************************************************************************************************************/
#define CANSM_CODE
#define CANSM_APPL_CODE
#define CANSM_CONST
#define CANSM_PBCFG
#define CANSM_VAR_NOINIT
#define CANSM_VAR_ZERO_INIT
#define CANSM_APPL_VAR
/**********************************************************************************************************************
* CanSM END
*********************************************************************************************************************/
/**********************************************************************************************************************
* Cdd_AsrCdd START
*********************************************************************************************************************/
/* Copy the compiler abstraction defines for each of your configured CDDs and replace the prefix _CDD with the MSN of your configured CDD as higher case. */
#define _CDD_CODE
#define _CDD_APPL_DATA
/* Add additional compiler abstraction defines for each of you configured CDDs here. */
/**********************************************************************************************************************
* Cdd_AsrCdd END
*********************************************************************************************************************/
#define DCM_APPL_CONST
#define DCM_APPL_DATA
#define DCM_CONST
#define DCM_PBCFG
#define DCM_CODE
#define DCM_APPL_CODE
#define DCM_VAR_NOINIT
/*==== DEM =================================================================*/
#define DEM_CODE /* code */
#define DEM_VAR /* global/static vars; init after every reset */
#define DEM_VAR_NOINIT_FAST /* global/static vars; using: bitaccess or frequently used or many accesses in code */
#define DEM_VAR_NOINIT /* global/static vars; not initialized after reset */
#define DEM_CONST /* global/static constants */
#define DEM_PBCFG /* global/static constants for PostBuild */
#define DEM_APPL_CODE /* callback functions used by DEM, implemented outside DEM */
#define DEM_APPL_DATA /* vars (buffers) outside DEM, passed via API */
#define DEM_APPL_CONST /* constants outside DEM, passed via API */
/*==========================================================================*/
/* Kernbauer Version: 1.12 Konfiguration: DrvCAN Erzeugungsgangnummer: 288 */
/*-------------------------------------------------------------------------------------------------------------------*/
/* CAN driver start compiler_cfg */
/*-------------------------------------------------------------------------------------------------------------------*/
#define CAN_CODE /* CAN modules code qualifier */
#define CAN_CONST /* constant memory */
#define CAN_CONST_PBCFG /* postbuild generated constant/flash */
#define CAN_VAR_NOINIT /* none initialized variables */
#define CAN_VAR_INIT /* initialized variables */
#define CAN_INT_CTRL /* access to Interrupt controller registers */
#define CAN_REG_CANCELL /* CAN cell register qualifier */
#define CAN_RX_TX_DATA CAN_REG_CANCELL /* pointer width >= CAN_REG_CANCELL / CAN rx/tx data / RAM or SFR (rx data pointer for Indication and PreCopy functions to higher layers / tx data pointers / sdu from application) */
#define CAN_APPL_CODE /* Application code qualifier */
#define CAN_APPL_CONST /* Application constant memory */
#define CAN_APPL_VAR /* Application variables */
/*-------------------------------------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------*/
/* CAN driver end compiler_cfg */
/*-------------------------------------------------------------------------------------------------------------------*/
/**********************************************************************************************************************
* PDUR START
*********************************************************************************************************************/
# define PDUR_CODE
# define PDUR_VAR_NOINIT
# define PDUR_VAR_ZERO_INIT
# define PDUR_VAR
# define PDUR_CONST
# define PDUR_PBCFG
# define PDUR_APPL_DATA
# define PDUR_APPL_CODE
# define PDUR_IPDUM_DATA
# define PDUR_MOST_DATA
# define PDUR_PBCFG_ROOT PDUR_PBCFG
/**********************************************************************************************************************
* PDUR END
*********************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------*/
/* CANIF */
/*-------------------------------------------------------------------------------------------------------------------*/
#define CANIF_VAR_NOINIT
#define CANIF_VAR_ZERO_INIT
#define CANIF_VAR_INIT
#define CANIF_CONST
#define CANIF_PBCFG
#define CANIF_PBCFG_ROOT
#define CANIF_CODE
#define CANIF_APPL_CODE
#define CANIF_APPL_VAR
#define CANIF_APPL_PBCFG
/*-------------------------------------------------------------------------------------------------------------------*/
/* Has to be kept in default section -> Default access */
#define CANIF_VAR_STACK
/* VAR section of higher layers (TP / NM / PduR / CanSM / EcuM) automatically mapped to APPL_VAR */
#define CANIF_APPL_STATE_VAR CANIF_APPL_VAR
#define CANIF_APPL_MSG_VAR CANIF_APPL_VAR
/* VAR section of lower layers (CAN Driver / Transceiver Driver) automatically mapped to APPL_VAR */
#define CANIF_CBK_VAR CANIF_APPL_VAR
/* #define CANIF_CBK_TRCV_VAR CANIF_CBK_VAR not used yet */
#define CANIF_CBK_DRV_VAR CANIF_CBK_VAR
/* Code sections - DO NOT MODIFY */
#define CANIF_CBK_TRCV_CODE CANIF_APPL_CODE
#define CANIF_APPL_STATE_CODE CANIF_APPL_CODE
#define CANIF_APPL_MSG_CODE CANIF_APPL_CODE
/* Upper layer data pointer */
#define CANIF_UL_STANDARD_VAR CANIF_APPL_VAR
#define CANIF_UL_ADVANCED_VAR CANIF_APPL_VAR
#define CANIF_UL_OSEKNM_VAR CANIF_APPL_VAR
/*-------------------------------------------------------------------------------------------------------------------*/
/* CANIF */
/*-------------------------------------------------------------------------------------------------------------------*/
/**********************************************************************************************************************
* Com START
*********************************************************************************************************************/
/* Module Constant Data */
#define COM_CONST
/* Module Constant Data of the Postbuild Configuration */
#define COM_PBCFG
/* Module Root Constant of the Postbuild Configuration */
#define COM_PBCFG_ROOT COM_PBCFG
/* Module Implementation */
#define COM_CODE
/* Module Variables which are initialized by the startup code or by the call of Com_InitMemory() */
#define COM_VAR_NOINIT
/* Module Variables which are initialized by call of Com_Init() */
#define COM_VAR_INIT
/* Application Code Implementation (e.g. Callbacks) */
#define COM_APPL_CODE
/* Application Buffer which is located in RAM */
#define COM_APPL_VAR
/* Application Buffer which is located in ROM or RAM */
#define COM_APPL_DATA
/**********************************************************************************************************************
* Com END
*********************************************************************************************************************/
/**********************************************************************************************************************
* CANNM START
*********************************************************************************************************************/
#define CANNM_CODE
#define CANNM_CONST
#define CANNM_PBCFG
#define CANNM_PBCFG_ROOT
#define CANNM_VAR_NOINIT
#define CANNM_VAR_NOINIT_FAST
#define CANNM_VAR_ZERO_INIT_FAST
#define CANNM_APPL_VAR
/**********************************************************************************************************************
* CANNM END
*********************************************************************************************************************/
/**********************************************************************************************************************
* NM START
*********************************************************************************************************************/
#define NM_CODE
#define NM_CONST
#define NM_VAR_NOINIT
#define NM_VAR_NOINIT_FAST
#define NM_VAR_ZERO_INIT_FAST
#define NM_APPL_VAR
/**********************************************************************************************************************
* NM END
*********************************************************************************************************************/
/**********************************************************************************************************************
* BSWM START
*********************************************************************************************************************/
#define BSWM_CODE
#define BSWM_APPL_CODE
#define BSWM_CONST
#define BSWM_PBCFG
#define BSWM_VAR_INIT
#define BSWM_APPL_DATA
#define BSWM_VAR_NOINIT
/**********************************************************************************************************************
* BSWM END
*********************************************************************************************************************/
/**********************************************************************************************************************
* SYSSERVICE_ASRECUM START
*********************************************************************************************************************/
#define ECUM_API_CODE
#define ECUM_APPL_CONFIG
#define ECUM_APPL_DATA
#define ECUM_VAR_BOOT
#define ECUM_CODE
#define ECUM_CODE_BOOT_TARGET
#define ECUM_CONST
#define ECUM_PBCFG
#define ECUM_VAR
#define ECUM_VAR_NOINIT
/**********************************************************************************************************************
* SYSSERVICE_ASRECUM END
*********************************************************************************************************************/
#define CANTP_VAR_INIT
#define CANTP_VAR_NOINIT
#define CANTP_CONST
#define CANTP_APPL_CONST
#define CANTP_CODE
#define CANTP_APPL_CODE
#define CANTP_APPL_DATA
#define CANTP_PBCFG
/*-------------------------------------------------------------------------------------------------------------------*/
/* VStdLib start compiler_cfg */
/*-------------------------------------------------------------------------------------------------------------------*/
#define VSTDLIB_CODE /* CAN modules code qualifier */
#define VSTDLIB_CONST /* constant memory */
#define VSTDLIB_VAR_NEAR /* near variables: this is the pointer clas for "pOldState" parameter of VStdLL_GlobalInterruptDisable() */
#define VSTDLIB_CONST_FAR /* far constant memory: can remain empty if the application is not using FAR data (neither ROM nor RAM) */
#define VSTDLIB_VAR_FAR /* far variables: can remain empty if the application is not using FAR data (neither ROM nor RAM) */
/*-------------------------------------------------------------------------------------------------------------------*/
/* VStdLib end compiler_cfg */
/*-------------------------------------------------------------------------------------------------------------------*/
/* Package Merger: Stop Section CompilerCfgModuleList */
/**********************************************************************************************************************
* GLOBAL FUNCTION MACROS
*********************************************************************************************************************/
/**********************************************************************************************************************
* GLOBAL DATA TYPES AND STRUCTURES
*********************************************************************************************************************/
/**********************************************************************************************************************
* GLOBAL DATA PROTOTYPES
*********************************************************************************************************************/
/**********************************************************************************************************************
* GLOBAL FUNCTION PROTOTYPES
*********************************************************************************************************************/
#endif /* COMPILER_CFG_H */
/**********************************************************************************************************************
* END OF FILE: Compiler_Cfg.h
*********************************************************************************************************************/
<file_sep>/BSP/MCAL/Wdg/Wdg_23_DriverA_PBcfg.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Wdg_23_DriverA_PBcfg.c */
/* Version = 3.0.0 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains post-build time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: : Initial version
*/
/******************************************************************************/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.0.8a
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_WDGA_V304_120319.arxml
* GENERATED ON: 19 Mar 2012 - 13:36:07
*/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Wdg_23_DriverA_PBTypes.h"
#include "Wdg_23_DriverA.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define WDG_23_DRIVERA_PBCFG_C_AR_MAJOR_VERSION 2
#define WDG_23_DRIVERA_PBCFG_C_AR_MINOR_VERSION 2
#define WDG_23_DRIVERA_PBCFG_C_AR_PATCH_VERSION 0
/* File version information */
#define WDG_23_DRIVERA_PBCFG_C_SW_MAJOR_VERSION 3
#define WDG_23_DRIVERA_PBCFG_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (WDG_23_DRIVERA_PBTYPES_AR_MAJOR_VERSION != \
WDG_23_DRIVERA_PBCFG_C_AR_MAJOR_VERSION)
#error "Wdg_23_DriverA_PBcfg.c : Mismatch in Specification Major Version"
#endif
#if (WDG_23_DRIVERA_PBTYPES_AR_MINOR_VERSION != \
WDG_23_DRIVERA_PBCFG_C_AR_MINOR_VERSION)
#error "Wdg_23_DriverA_PBcfg.c : Mismatch in Specification Minor Version"
#endif
#if (WDG_23_DRIVERA_PBTYPES_AR_PATCH_VERSION != \
WDG_23_DRIVERA_PBCFG_C_AR_PATCH_VERSION)
#error "Wdg_23_DriverA_PBcfg.c : Mismatch in Specification Patch Version"
#endif
#if (WDG_23_DRIVERA_PBTYPES_SW_MAJOR_VERSION != \
WDG_23_DRIVERA_PBCFG_C_SW_MAJOR_VERSION)
#error "Wdg_23_DriverA_PBcfg.c : Mismatch in Major Version"
#endif
#if (WDG_23_DRIVERA_PBTYPES_SW_MINOR_VERSION != \
WDG_23_DRIVERA_PBCFG_C_SW_MINOR_VERSION)
#error "Wdg_23_DriverA_PBcfg.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
#define WDG_23_DRIVERA_START_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
/* Structure for Watchdog Driver Init configuration */
CONST(Wdg_23_DriverA_ConfigType,WDG_23_DRIVERA_CONFIG_CONST)\
Wdg_23_DriverA_GstConfiguration[] =
{
/* Configuration 0 - 1 */
{
/* ulStartOfDbToc */
0x05D98300,
/* ucWdtamdSlowValue */
0x77,
/* ucWdtamdFastValue */
0x07,
/* ucWdtamdDefaultValue */
0x77,
/* ucWdtamdDefaultModeValue */
WDGIF_SLOW_MODE
}
};
#define WDG_23_DRIVERA_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Dio/Dio_Version.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Dio_Version.c */
/* Version = 3.1.2 */
/* Date = 05-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains code for version checking of modules included by DIO */
/* Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied,including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 04-Sep-2009 : Initial Version
*
* V3.0.1: 31-Mar-2010 : As per SCR 238, new line added at the end of file.
* V3.1.0: 27-Jul-2011 : Updated software version to 3.1.0 .
* V3.1.1: 10-feb-2012 : Merged the fixes done to Fx4L Dio driver.
* V3.1.2: 05-Jun-2012 : As per SCR 027, following changes are made:
* 1. File version is changed.
* 2. Compiler version is removed from Environment
* section.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Dio_Version.h"
#if (DIO_DEV_ERROR_DETECT == STD_ON)
#include "Det.h"
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define DIO_VERSION_C_AR_MAJOR_VERSION DIO_AR_MAJOR_VERSION_VALUE
#define DIO_VERSION_C_AR_MINOR_VERSION DIO_AR_MINOR_VERSION_VALUE
#define DIO_VERSION_C_AR_PATCH_VERSION DIO_AR_PATCH_VERSION_VALUE
/* File version information */
#define DIO_VERSION_C_SW_MAJOR_VERSION 3
#define DIO_VERSION_C_SW_MINOR_VERSION 1
#define DIO_VERSION_C_SW_PATCH_VERSION 2
/*******************************************************************************
** Version Check **
*******************************************************************************/
/* Dio Version Check */
#if (DIO_VERSION_AR_MAJOR_VERSION != DIO_VERSION_C_AR_MAJOR_VERSION)
#error "Dio_Version.c : Mismatch in Specification Major Version"
#endif
#if (DIO_VERSION_AR_MINOR_VERSION != DIO_VERSION_C_AR_MINOR_VERSION)
#error "Dio_Version.c : Mismatch in Specification Minor Version"
#endif
#if (DIO_VERSION_AR_PATCH_VERSION != DIO_VERSION_C_AR_PATCH_VERSION)
#error "Dio_Version.c : Mismatch in Specification Patch Version"
#endif
#if (DIO_SW_MAJOR_VERSION != DIO_VERSION_C_SW_MAJOR_VERSION)
#error "Dio_Version.c : Mismatch in Major Version"
#endif
#if (DIO_SW_MINOR_VERSION != DIO_VERSION_C_SW_MINOR_VERSION)
#error "Dio_Version.c : Mismatch in Minor Version"
#endif
/* Det Module Version Check */
#if (DIO_DEV_ERROR_DETECT == STD_ON)
#if (DET_AR_MAJOR_VERSION != DIO_DET_AR_MAJOR_VERSION)
#error "Det.h : Mismatch in Specification Major Version"
#endif
#if (DET_AR_MINOR_VERSION != DIO_DET_AR_MINOR_VERSION)
#error "Det.h : Mismatch in Specification Minor Version"
#endif
#endif /* (DIO_DEV_ERROR_DETECT == STD_ON) */
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Can/Can_Tgt.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Can_Tgt.h */
/* Version = 3.0.4a */
/* Date = 27.10.2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2008-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of macros used by CAN Driver internally */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12.12.2008 : Initial Version
* V3.0.1: 21.10.2009 : Updated compiler version as per
* SCR ANMCANLINFR3_SCR_031.
* V3.0.2: 21.04.2010 : 1. CAN_MBON_BIT_SET is added for ensuring MBON bit
* status during power save mode As per
* ANMCANLINFR3_SCR_056.
* 2. CAN_DLC_REG_MASK, CAN_MCONF_REG_MASK and
* CAN_MIDH_REG_MASK are newly added for masking.
* V3.0.3: 03.02.2011 : Tabs are removed as per ANMCANLINFR3_SCR_093.
* V3.0.4: 20.06.2011 : 1. CAN_TRANSMISSION_STS, CAN_ELEVEN_DBT_COUNT,
* CAN_CLR_ABT_BIT macros are newly added for masking as
* per ANMCANLINFR3_SCR_107.
* 2. CAN_IRQ_REQ_DIS, CAN_IRQ_REQ_ENB macros are
* changed to unit16.
* V3.0.4a: 27.10.2011 : 1. Copyright is updated.
* 2. CAN_CLR_INT_REQ macro is added as per MTS #3641.
* 3. CAN_IRQ_REQ_DIS and CAN_IRQ_REQ_ENB macros are
* updated.
*/
/******************************************************************************/
#ifndef CAN_TGT_H
#define CAN_TGT_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Can.h" /* CAN Driver Header File */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define CAN_CANTGT_AR_MAJOR_VERSION 2
#define CAN_CANTGT_AR_MINOR_VERSION 2
#define CAN_CANTGT_AR_PATCH_VERSION 2
/* File version information */
#define CAN_CANTGT_SW_MAJOR_VERSION 3
#define CAN_CANTGT_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Start address of database */
#define CAN_DBTOC_VALUE \
((CAN_VENDOR_ID_VALUE << 22) | \
(CAN_MODULE_ID_VALUE << 14) | \
(CAN_SW_MAJOR_VERSION_VALUE << 8) | \
(CAN_SW_MINOR_VERSION_VALUE << 3))
/* Limit check */
#define CAN_LIMIT (uint8)0xFF
/* CAN uninitialized status */
#define CAN_UNINITIALIZED (uint8)0
/* CAN initialized status */
#define CAN_INITIALIZED (uint8)1
/* Flag not set */
#define CAN_FALSE (uint8)0
/* Flag set */
#define CAN_TRUE (uint8)1
#define CAN_ZERO (uint8)0
#define CAN_ONE (uint8)1
#define CAN_TWO (uint8)2
#define CAN_THREE (uint8)3
#define CAN_FOUR (uint8)4
#define CAN_EIGHT (uint8)8
#define CAN_IRQ_REQ_DIS (uint16)0x0080
#define CAN_IRQ_REQ_ENB (uint16)0x0000
#define CAN_SHIFT_TWO (uint8)2
#define CAN_DISABLEWAKEUP (uint8)0xF0
#define CAN_WAKEUP (uint8)0xFF
/* */
#define CAN_ELEVEN_DBT_COUNT (uint16)0x1504
/* Clear Global operating mode */
#define CAN_CLR_GOM (uint16)0x0001
/* Clear all interrupts */
#define CAN_CLR_ALL_INTERRUPT (uint16)0x007F
/* Clear Wakeup and TxCancel interrupt/status */
#define CAN_CLR_WUP_TXCANCEL_INTERRUPT (uint16)0x0060
/* Clear Message buffer MUC, MOW, IE, DN, TRQ and RDY bits*/
#define CAN_CLR_CTRL_BIT (uint16)0x001F
/* Clear Message buffer data update */
#define CAN_CLR_DN_BIT (uint16)0x0004
/* Clear Extended format mode identifier */
#define CAN_CLR_IDE_BIT (uint16)0x7FFF
/* Clear Message buffer ready bit */
#define CAN_CLR_RDY_BIT (uint16)0x0001
/* Clear Recieve history list overflow */
#define CAN_CLR_ROVF_BIT (uint16)0x0001
/* Clear Recieve interrupt */
#define CAN_CLR_RX_INTERRUPT (uint16)0x0002
/* Clear Sleep power save mode */
#define CAN_CLR_SLEEP_MODE (uint16)0x0018
/* Clear Transmit history list overflow */
#define CAN_CLR_TOVF_BIT (uint16)0x0001
/* Clear Message buffer transmission request */
#define CAN_CLR_TRQ_BIT (uint16)0x0002
/* Clear Transmit interrupt status bit */
#define CAN_CLR_TX_INTERRUPT (uint16)0x0001
/* Clear Wakeup interrupt status bit */
#define CAN_CLR_WAKEUP_INTERRUPT (uint16)0x0020
/* Clear Transmit Cancellation interrupt status bit */
#define CAN_CLR_TXCANCEL_INTERRUPT (uint16)0x0040
/* Clear Arbitration, Protocol and Module error interrupt status bits */
#define CAN_CLR_ERR_INTERRUPT (uint16)0x001C
/* Enable Wakeup interrupt */
#define CAN_ENB_WAKEUP_INTERRUPT (uint16)0x2000
/* Clear Automatic block transmission */
#define CAN_CLR_ABT_BIT (uint16)0x0001
/* Clear interrupt request flag */
#define CAN_CLR_INT_REQ (uint16)0xEFFF
/* Message buffer enable */
#define CAN_SET_MSG_BUFFER_EN (uint8)0x01
/* System clock */
#define CAN_SET_SYSTEM_CLOCK (uint8)0x00
/* Message buffer interrupt request enable */
#define CAN_SET_MBUF_INT_EN (uint16)0x0800
/* Force shut down */
#define CAN_SET_EFSD (uint16)0x0200
/* Global operating mode */
#define CAN_SET_GOM (uint16)0x0100
/* Error counter clear */
#define CAN_SET_CCERC_BIT (uint16)0x8000
/* Message buffer ready */
#define CAN_SET_RDY_BIT (uint16)0x0100
/* Message buffer transmission message request */
#define CAN_SET_TRQ_BIT (uint16)0x0200
/* Extended format mode identifier */
#define CAN_SET_IDE_BIT (uint32)0x80000000ul
/* Initialization mode */
#define CAN_SET_INIT_OPMODE (uint16)0x0007
/* Recieve-only operating mode */
#define CAN_SET_RECEIVE_ONLY_MODE (uint16)0x0304
/* Sleep power save mode */
#define CAN_SET_SLEEP_MODE (uint16)0x0810
/* Normal operating mode */
#define CAN_SET_START_MODE (uint16)0x0100
/* Transmission status bit */
#define CAN_TRANSMISSION_STS (uint16)0x0100
/* MBON bit status */
#define CAN_MBON_BIT_STS (uint16)0x8000
/* MBON bit set status */
#define CAN_MBON_BIT_SET (uint16)0x8001
/* BusOff status */
#define CAN_BUSOFF_STS (uint8)0x10
/* Message buffer data update status */
#define CAN_DN_BIT_STS (uint16)0x0004
/* Message buffer data update/updating status */
#define CAN_DN_MUC_BIT_STS (uint16)0x2004
/* Initialization mode status */
#define CAN_INIT_OPMODE_STS (uint16)0x0007
/* Recieve-only mode status */
#define CAN_RECEIVE_ONLY_MODE_STS (uint16)0x0003
/* Message buffer ready status */
#define CAN_RDY_BIT_STS (uint16)0x0001
/* Message buffer transmission message status */
#define CAN_TRQ_BIT_STS (uint16)0x0002
/* Transmit history pointer match status */
#define CAN_TCP_BIT_STS (uint16)0x0200
/* Transmit history pointer match status */
#define CAN_THPM_BIT_STS (uint16)0x0002
/* Recieve history pointer match status */
#define CAN_RHPM_BIT_STS (uint16)0x0002
/* Extended identifier check */
#define CAN_EXTENDED_TYPE (uint8)0x01
/* Message buffer disable */
#define CAN_MSG_BUFFER_DISABLE (uint8)0x00
/* Extended format mode identifier mask */
#define CAN_MASK_IDE_BIT (uint16)0x8000
/* Recieve interrupt mask */
#define CAN_REC_INT_MASK (uint16)0x0200
/* Transmit interrupt mask */
#define CAN_TX_INT_MASK (uint16)0x0100
/* Wakeup interrupt mask */
#define CAN_WAKEUP_INT_MASK (uint16)0x2000
/* Error interrupt mask */
#define CAN_ERR_INT_MASK (uint16)0x0400
/* Transmit Cancellation interrupt mask */
#define CAN_TXCANCEL_INT_MASK (uint16)0x4000
/* Recieve interrupt status mask */
#define CAN_REC_STS_MASK (uint16)0x0002
/* Transmit interrupt status mask */
#define CAN_TX_STS_MASK (uint16)0x0001
/* Wakeup interrupt status mask */
#define CAN_WAKEUP_STS_MASK (uint16)0x0020
/* Error interrupt status mask */
#define CAN_ERR_STS_MASK (uint16)0x0004
/* Transmit Cancellation interrupt status mask */
#define CAN_TXCANCEL_STS_MASK (uint16)0x0040
/* Message Data Length Register Mask for caution */
#define CAN_DLC_REG_MASK (uint8)0x0F
/* Message configuration Register Mask for caution */
#define CAN_MCONF_REG_MASK (uint8)0xFD
/* MID1H Register Mask for caution */
#define CAN_MIDH_REG_MASK (uint16)0x9FFF
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* CAN_TGT_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Port/Port_PBTypes.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Port_PBTypes.h */
/* Version = 3.1.5a */
/* Date = 19-Feb-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2013 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains the type definitions of Post-build Time Parameters */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 27-Jul-2009 : Initial Version
*
* V3.0.1: 07-Sep-2009 : As per SCR 026, Global Symbols section is updated for
* the addition of new macros, removal of unused macros
* and alignment of macros.
*
* V3.0.3: 07-Nov-2009 : As per SCR 105, the code is updated to support Px4
* variant.
*
* V3.0.4: 23-Feb-2010 : As per SCR 189, updated for Port Filter Functionality
* implementation.
* V3.0.5: 03-Mar-2010 : As per SCR 210, globle symbols section is updated.
*
* V3.0.6: 29-Sep-2010 : As per SCR 360, Global Symbols section updated.
*
* V3.0.7: 15-Mar-2011 : As per SCR 423, "PORT_WRITE_ERROR_CLEAR_VAL" macro
* value is modified.
*
* V3.0.8: 24-Jun-2011 : As per SCR 479, In structure "STagTdd_Port_PMSRRegs"
* parameters "usExistingValAndMask" and
* "usConfigValUnchangeablePins" are removed and
* "ulMaskAndConfigValue" is added.
* V3.1.0: 26-Jul-2011 : Initial Version DK4-H variant
* V3.1.1: 15-Sep-2011 : As per the DK-4H requirements
* 1. Added DK4-H specific JTAG information.
* 2. Added compiler switch for USE_UPD70F3529 device
* name.
* V3.1.2: 16-Feb-2012 : Merged the fixes done for Fx4L.
* V3.1.3: 06-Jun-2012 : As per SCR 033, File version is changed.
* V3.1.4: 10-Jul-2012 : As per SCR 047, "blPortType" is removed from the
* structure "STagTdd_Port_Regs" and file version is
* changed.
* V3.1.5: 11-Dec-2012 : As per MNT_0005397 and MNT_0005415, added macro
* for to clear I/O reset register.
* V3.1.5a: 19-Feb-2013 : Merged the fixes done for Sx4-H
*/
/******************************************************************************/
#ifndef PORT_PBTYPES_H
#define PORT_PBTYPES_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Port.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define PORT_PBTYPES_AR_MAJOR_VERSION PORT_AR_MAJOR_VERSION_VALUE
#define PORT_PBTYPES_AR_MINOR_VERSION PORT_AR_MINOR_VERSION_VALUE
#define PORT_PBTYPES_AR_PATCH_VERSION PORT_AR_PATCH_VERSION_VALUE
/* File version information */
#define PORT_PBTYPES_SW_MAJOR_VERSION 3
#define PORT_PBTYPES_SW_MINOR_VERSION 1
#define PORT_PBTYPES_SW_PATCH_VERSION 4
#if (PORT_SW_MAJOR_VERSION != PORT_PBTYPES_SW_MAJOR_VERSION)
#error "Software major version of Port_PBTypes.h and Port.h did not match!"
#endif
#if (PORT_SW_MINOR_VERSION != PORT_PBTYPES_SW_MINOR_VERSION)
#error "Software minor version of Port_PBTypes.h and Port.h did not match!"
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* General defines */
#define PORT_DBTOC_VALUE ((PORT_VENDOR_ID_VALUE << 22) | \
(PORT_MODULE_ID_VALUE << 14) | \
(PORT_SW_MAJOR_VERSION_VALUE << 8) | \
(PORT_SW_MINOR_VERSION_VALUE << 3))
#define PORT_FALSE (boolean)0x00
#define PORT_TRUE (boolean)0x01
#define PORT_ZERO (uint8)0x00
#define PORT_ONE (uint8)0x01
#define PORT_TEN (uint8)0x0A
#define PORT_UNINITIALIZED (boolean)0x00
#define PORT_INITIALIZED (boolean)0x01
#define PORT_JTAG_SR_REGS (uint8)0x01
#define PORT_JTAG_FUNC_CTRL_REGS (uint8)0x02
#define PORT_JTAG_OTHER_16BIT_REGS (uint8)0x08
#define PORT_MAX_ALLOWED_PIN_MODES (uint8)0x02
#define PORT_REG_NOTAVAILABLE (uint8)0xFF
#define PORT_WRITE_ERROR_CLEAR_VAL (uint8)0xA5
#define PORT_NUM_PODC_REG_ADD_OFFSET (uint16)0x4500
#define PORT_NUM_PDSC_REG_ADD_OFFSET (uint16)0x4600
#define PORT_NUM_PUCC_REG_ADD_OFFSET (uint16)0x4900
#define PORT_NUM_PPROTS_REG_ADD_OFFSET (uint16)0x4B00
#define PORT_NUM_PPCMD_REG_ADD_OFFSET (uint16)0x4C00
#define PORT_NUM_PSBC_REG_ADD_OFFSET (uint16)0x4D00
#define PORT_JTAG_PODC_REG_ADD_OFFSET (uint16)0x0450
#define PORT_JTAG_PDSC_REG_ADD_OFFSET (uint16)0x0460
#define PORT_JTAG_PUCC_REG_ADD_OFFSET (uint16)0x0490
#define PORT_JTAG_PPROTS_REG_ADD_OFFSET (uint16)0x04B0
#define PORT_JTAG_PPCMD_REG_ADD_OFFSET (uint16)0x04C0
#define PORT_JTAG_PSBC_REG_ADD_OFFSET (uint16)0x04D0
#define PORT_MSB_MASK (uint32)0xFFFF0000ul
#define PORT_IORES_CLR (uint32)0x00000000ul
#define PORT_IOHOLD_CLR (uint32)0x00000008ul
#define PORT_IOHOLD_SET (uint32)0x00000002ul
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Type definition for Port Group types */
typedef enum
{
PORT_GROUP_NUMERIC = 0,
PORT_GROUP_ALPHABETIC = 1,
PORT_GROUP_JTAG = 2
} Port_GroupType;
typedef union STagTun_Port_Pin_Direction
{
/* Full Word */
uint32 ulRegContent;
struct
{
/* Lower Word */
uint16 usLSWord;
/* Higher Word */
uint16 usMSWord;
}Tst_Port_Word;
} Tun_Port_Pin_Direction;
/*******************************************************************************
** Structure declaration of port group registers, except PMSR, PFCE, PFC **
** and PMCSR. **
** This structure will be generated in the following sequence of registers: **
** PIS, PISE, PISA, PIBC, PIPC, PU, PD, PBDC, PODC, PDSC, PUCC and PSBC. **
*******************************************************************************/
typedef struct STagTdd_Port_Regs
{
/*
* Offset value of the register address. This value of any register, when
* added to the base address, gives the address of that particular register.
*/
uint16 usRegAddrOffset;
/* Configured value of the port group registers for initial mode. */
uint16 usInitModeRegVal;
} Tdd_Port_Regs;
/*******************************************************************************
** Structure declaration of PFCE, PFC and PMCSR port group registers **
** This structure will be generated in the following sequence of registers: **
** PFCE, PFC and PMCSR. **
*******************************************************************************/
typedef struct STagTdd_Port_FuncCtrlRegs
{
/*
* Offset value of the register address. This value of any register, when
* added to the base address, gives the address of that particular register.
*/
uint16 usRegAddrOffset;
/* Configured value of the port group registers for initial mode. */
uint16 usInitModeRegVal;
#if (PORT_SET_PIN_MODE_API == STD_ON)
/* Configured value of the port group registers for set pin mode. */
uint16 usSetModeRegVal;
#endif
} Tdd_Port_FuncCtrlRegs;
/*******************************************************************************
** Structure declaration of PMSR registers for all port groups **
*******************************************************************************/
typedef struct STagTdd_Port_PMSRRegs
{
/* Bit value of upper 16 bits (31-16) = 0 if for pin
"PortPinDirectionChangeable" is configured as true
Bit value of upper 16 bits (31-16) = 1 if for pin
"PortPinDirectionChangeable" configured as false
Bit value of lower 16 bits (15-0) = Initial value of the corresponding pin
*/
uint32 ulMaskAndConfigValue;
/*
* Offset value of the PMSR register address. This value of any register, when
* added to the base address, gives the address of that particular register.
*/
uint16 usRegAddrOffset;
/* Configured PMSR Register value for initial mode */
uint16 usInitModeRegVal;
} Tdd_Port_PMSRRegs;
/*******************************************************************************
** Structure containing information on PINs whose direction can be changed **
** during run time **
*******************************************************************************/
#if (PORT_SET_PIN_DIRECTION_API == STD_ON)
typedef struct STagTdd_Port_PinsDirChangeable
{
/* The PIN number whose direction is configured as changeable at run time */
Port_PinType ddPinId;
/*
* Offset value of the PMSR register address. This value of any register, when
* added to the base address, gives the address of that particular register.
*/
uint16 usPMSRRegAddrOffset;
/*
* Offset value of the PSR register address. This value of any register, when
* added to the base address, gives the address of that particular register.
*/
uint16 usPSRRegAddrOffset;
/* Mask value to check whether the requested direction and current direction
* of the PIN are same.
*/
uint16 usOrMaskVal;
/* Configured level value for PSR register */
uint16 usChangeableConfigVal;
/* Indicates the Port type (Numeric/ Alphabetic/ JTAG) */
uint8 ucPortType;
} Tdd_Port_PinsDirChangeable;
#endif /* End of PORT_SET_PIN_DIRECTION_API == STD_ON */
/*******************************************************************************
** Structure contains information about the port groups, containing the PINs **
** whose mode can be changed during run time. **
*******************************************************************************/
#if (PORT_SET_PIN_MODE_API == STD_ON)
typedef struct STagTdd_Port_PinModeChangeableGroups
{
/* Index of the PSR register in the structure array, where all port group
* registers, except PMSR, are generated.
*/
uint8 ucPSRRegIndex;
/* Index of the PFCE register in the structure array, where all port group
* registers, except PMSR, are generated.
*/
uint8 ucPFCERegIndex;
/* Index of the PFC register in the structure array, where all port group
* registers, except PMSR, are generated.
*/
uint8 ucPFCRegIndex;
/* Index of the PMCSR register in the structure array, where all port group
* registers, except PMSR, are generated.
*/
uint8 ucPMCSRRegIndex;
/* Index of PMSR register in the structure array of PMSR registers.*/
uint8 ucPMSRRegIndex;
} Tdd_Port_PinModeChangeableGroups;
#endif /* End of PORT_SET_PIN_MODE_API == STD_ON */
/*******************************************************************************
** Structure contains details of PINs whose mode can be changed during run **
** time. **
*******************************************************************************/
#if (PORT_SET_PIN_MODE_API == STD_ON)
typedef struct STagTdd_Port_PinModeChangeableDetails
{
/* The PIN number whose mode is configured as changeable at run time. */
Port_PinType ddPinId;
/* Or mask value of the port pin */
uint16 usOrMask;
/* Index of the structure array which provide the information of port groups,
* containing the PINs whose mode can be changed during run time
*/
uint8 ucSetModeIndex;
/* Indicates the Port type (Numeric/ Alphabetic/ JTAG) */
uint8 ucPortType;
} Tdd_Port_PinModeChangeableDetails;
#endif /* End of PORT_SET_PIN_MODE_API == STD_ON */
/*******************************************************************************
** Structure contains the declaration for DNFA registers **
** This structure will be generated in the following sequence of registers: **
** DNFAnCTL, DNFAnEN. **
*******************************************************************************/
typedef struct STagTdd_Port_DNFARegs
{
/*
* Offset value of the DNFACTL register address. This value of any register,
* if added to the base address, gives the address of that particular register
*/
uint16 usDNFARegAddrOffset;
/* Configured value for DNFA noise elimination control register */
uint8 ucDNFACTL;
/* Configured value for DNFA noise elimination enable register */
uint16 usDNFAEN;
} Tdd_Port_DNFARegs;
/*******************************************************************************
** Structure contains the declaration for FCLA registers **
** This structure will be generated in the following sequence of registers: **
** FCLAnCTL. **
*******************************************************************************/
typedef struct STagTdd_Port_FCLARegs
{
/*
* Offset value of the FLCACTL register address. This value of any register
* if added to the base address, gives the address of that particular register
*/
uint16 usFCLARegAddrOffset;
/* Configured value for FCLA noise elimination control register */
uint8 ucFCLACTL;
} Tdd_Port_FCLARegs;
/*******************************************************************************
** Extern declarations for Global Data **
*******************************************************************************/
#define PORT_START_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
#if (PORT_NUM_PORT_GROUPS_AVAILABLE == STD_ON)
extern CONST(Tdd_Port_Regs, PORT_CONST) Port_Num_Regs[];
extern CONST(Tdd_Port_FuncCtrlRegs, PORT_CONST) Port_Num_FuncCtrlRegs[];
extern CONST(Tdd_Port_PMSRRegs, PORT_CONST) Port_Num_PMSRRegs[];
#endif
#if (PORT_ALPHA_PORT_GROUPS_AVAILABLE == STD_ON)
extern CONST(Tdd_Port_Regs, PORT_CONST) Port_Alpha_Regs[];
extern CONST(Tdd_Port_FuncCtrlRegs, PORT_CONST) Port_Alpha_FuncCtrlRegs[];
extern CONST(Tdd_Port_PMSRRegs, PORT_CONST) Port_Alpha_PMSRRegs[];
#endif
#if (PORT_JTAG_PORT_GROUPS_AVAILABLE == STD_ON)
extern CONST(Tdd_Port_Regs, PORT_CONST) Port_JTAG_Regs[];
extern CONST(Tdd_Port_FuncCtrlRegs, PORT_CONST) Port_JTAG_FuncCtrlRegs[];
extern CONST(Tdd_Port_PMSRRegs, PORT_CONST) Port_JTAG_PMSRRegs[];
#endif
#if (PORT_SET_PIN_DIRECTION_API == STD_ON)
extern CONST(Tdd_Port_PinsDirChangeable, PORT_CONST)
Port_GstPinDirChangeableList[];
#endif
#if (PORT_SET_PIN_MODE_API == STD_ON)
extern CONST(Tdd_Port_PinModeChangeableGroups, PORT_CONST)
Port_GstSetModeGroupsList[];
extern CONST (Tdd_Port_PinModeChangeableDetails, PORT_CONST)
Port_GstSetModePinDetailsList[];
#endif
extern CONST(Tdd_Port_DNFARegs, SPI_NOINIT_DATA) Port_DNFARegs[];
extern CONST(Tdd_Port_FCLARegs, SPI_NOINIT_DATA) Port_FCLARegs[];
#define PORT_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* PORT_PBTYPES_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Wdg/Wdg_23_DriverA_PBTypes.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Wdg_23_DriverA_PBTypes.h */
/* Version = 3.0.2a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains the type definitions of Post Build time Parameters */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12-Jun-2009 : Initial version
*
* V3.0.1: 14-Jul-2009 : As per SCR 015, compiler version is changed from
* V5.0.5 to V5.1.6c in the header of the file.
*
* V3.0.2: 06-Mar-2010 : As per SCR 219, the macros WDG_FALSE and WDG_TRUE
* are added.
* V3.0.2a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
#ifndef WDG_23_DRIVERA_PBTYPES_H
#define WDG_23_DRIVERA_PBTYPES_H
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Wdg_23_DriverA.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define WDG_23_DRIVERA_PBTYPES_AR_MAJOR_VERSION 2
#define WDG_23_DRIVERA_PBTYPES_AR_MINOR_VERSION 2
#define WDG_23_DRIVERA_PBTYPES_AR_PATCH_VERSION 0
/* File version information */
#define WDG_23_DRIVERA_PBTYPES_SW_MAJOR_VERSION 3
#define WDG_23_DRIVERA_PBTYPES_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Type definition for trigger mode */
#define WDG_WINDOW 1
/* General defines */
#define WDG_23_DRIVERA_DBTOC_VALUE \
((WDG_23_DRIVERA_VENDOR_ID_VALUE << 22) | \
(WDG_23_DRIVERA_MODULE_ID_VALUE << 14) | \
(WDG_23_DRIVERA_SW_MAJOR_VERSION_VALUE << 8) | \
(WDG_23_DRIVERA_SW_MINOR_VERSION_VALUE << 3))
/* Value to be written to WDTAWDTE / WDTAEVAC register for stopping the
watchdog timer */
#define WDG_23_DRIVERA_STOP (uint8)0x2C
/* Value to be written to WDTAWDTE / WDTAEVAC register to clear and restart
the timer */
#define WDG_23_DRIVERA_RESTART (uint8)0xAC
#define WDG_FALSE (boolean)0x00
#define WDG_TRUE (boolean)0x01
#if(WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON)
/* Type defintion for the current state of Watchdog Driver */
typedef enum
{
WDG_UNINIT = 0,
WDG_IDLE,
WDG_BUSY
}Wdg_23_DriverA_StatusType;
#endif /* WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON */
#endif /* WDG_23_DRIVERA_PBTYPES_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/IoHwAb/IoHwAb_DoTypes.h
/*****************************************************************************
|File Name: IoHwAb_DoPrivate.h
|
|Description: Abstracted digital output channels.
|
|-----------------------------------------------------------------------------
| PATAC Confidential
|-----------------------------------------------------------------------------
|
| This software is copyright is proprietary of Pan Asia Technical Automotive Company(PATAC).
| All rights are reserved by PATAC.
|
|-----------------------------------------------------------------------------
| A U T H O R I D E N T I T Y
|-----------------------------------------------------------------------------
| Initials Name Company
| ------------------------------------ ---------------------------------------
|
|
|-----------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|-----------------------------------------------------------------------------
| Date Version Author Description
|---------- -------- ------ ----------------------------------------------
|2011-08-19 01.00.00 WH Create
*****************************************************************************/
#ifndef _IOHWAB_DOPRIAVATE_H
#define _IOHWAB_DOPRIAVATE_H
/******************************************************************************
** Include Section **
******************************************************************************/
#include "std_types.h"
/*******************************************************************************
** Precompile Options **
*******************************************************************************/
/*DO source type*/
#define CeDO_u_NullType 0
#define CeDO_u_DioType 1
#define CeDO_u_BufferType 2
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
typedef struct
{
uint8 * m_p_Buffer; /*pointer to the MCU IO port address or buffer*/
uint8 m_u_Offset; /*buffer offset or Dio index*/
boolean e_b_Inverse; /*if output inverse or not*/
boolean e_bt_DftVal; /*Default value when normal operation */
boolean e_bt_En; /*enabled or not*/
uint8 m_u_DoType; /*DO source type*/
}TsDO_h_PortConfig;
/*local configurations*/
extern const TsDO_h_PortConfig KaDO_h_PortConfig[];
#endif
/*EOF*/
<file_sep>/BSP/MCAL/Pwm/Pwm_Version.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Pwm_Version.h */
/* Version = 3.1.2 */
/* Date = 06-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains macros required for checking versions of modules */
/* included by PWM Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 18-Aug-2009 : Initial version
* V3.1.0: 26-Jul-2011 : Ported for the DK4 variant.
* V3.1.1: 05-Mar-2012 : Merged the fixes done for Fx4L PWM driver
* V3.1.2: 06-Jun-2012 : As per SCR 034, Compiler version is removed from
* Environment section.
*/
/******************************************************************************/
#ifndef PWM_VERSION_H
#define PWM_VERSION_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification Version Information */
#define PWM_VERSION_AR_MAJOR_VERSION PWM_AR_MAJOR_VERSION_VALUE
#define PWM_VERSION_AR_MINOR_VERSION PWM_AR_MINOR_VERSION_VALUE
#define PWM_VERSION_AR_PATCH_VERSION PWM_AR_PATCH_VERSION_VALUE
/* Software Version Information */
#define PWM_VERSION_SW_MAJOR_VERSION 3
#define PWM_VERSION_SW_MINOR_VERSION 1
/* Included Files AUTOSAR Specification Version */
#if(PWM_DEV_ERROR_DETECT == STD_ON)
#define PWM_DET_AR_MAJOR_VERSION 2
#define PWM_DET_AR_MINOR_VERSION 2
#endif
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
#define PWM_SCHM_AR_MAJOR_VERSION 1
#define PWM_SCHM_AR_MINOR_VERSION 1
#endif
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (PWM_SW_MAJOR_VERSION != PWM_VERSION_SW_MAJOR_VERSION)
#error "Pwm_Version.h : Mismatch in Major Version"
#endif
#if (PWM_SW_MINOR_VERSION != PWM_VERSION_SW_MINOR_VERSION)
#error "Pwm_Version.h : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
#endif /* PWM_VERSION_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Fee/Fee_InternalFct.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Fee_InternalFct.c */
/* Version = 3.0.6a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains internal function definitions of FEE Component */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 05-Nov-2009 : Initial version
* V3.0.1: 20-Jan-2010 : As per SCR 184, following changes are made:
* 1. In the function 'Fee_EndProcessBlock', check for
* the Format request to invoke DEM error is removed.
* 2. A comment is provided to the '#endif' of the
* function 'Fee_BlockCfgLookUp'.
* V3.0.2: 12-Mar-2010 : As per SCR 223, function Fee_BlockCfgLookUp is
* updated for binary search.
* V3.0.3: 01-Apr-2010 : As per SCR 234, following changes are made:
* 1. The function Fee_BlockCfgLookUp is
* updated with type of return parameter LusBlkFoundIdx
* as uint16 for retrieving the index of configured
* FeeBlockNumber in array Fee_GstBlockConfiguration.
* 2. The precompile option FEE_DEV_ERROR_DETECT for the
* function Fee_BlockCfgLookUp is removed.
* V3.0.4: 24-Jun-2010 : As per SCR 287, comments are updated.
* V3.0.5: 03-Jan-2011 : As per SCR 394, updated function
* Fee_EndProcessBlock() to change the state of FEE
* before job notification.
* V3.0.6: 17-Jun-2011 : As per SCR 472, Function Fee_EndProcessBlock()
* is updated to change the DEM error name
* from FLS_E_READ_FAILED to FEE_E_READ_FAILED and
* FLS_E_WRITE_FAILED to FEE_E_WRITE_FAILED.
* V3.0.6a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Fee.h"
#include "EEL.h"
#include "Fee_InternalFct.h"
#include "Fee_Types.h"
#include "Fee_Ram.h"
//#include "Dem.h"
#if(FEE_CRITICAL_SECTION_PROTECTION == STD_ON)
//#include "SchM_Fee.h"
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define FEE_INTERNALFCT_C_AR_MAJOR_VERSION FEE_AR_MAJOR_VERSION_VALUE
#define FEE_INTERNALFCT_C_AR_MINOR_VERSION FEE_AR_MINOR_VERSION_VALUE
#define FEE_INTERNALFCT_C_AR_PATCH_VERSION FEE_AR_PATCH_VERSION_VALUE
/* File version information */
#define FEE_INTERNALFCT_C_SW_MAJOR_VERSION 3
#define FEE_INTERNALFCT_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (FEE_INTERNALFCT_AR_MAJOR_VERSION != FEE_INTERNALFCT_C_AR_MAJOR_VERSION)
#error "Fee_InternalFct.c : Mismatch in Specification Major Version"
#endif
#if (FEE_INTERNALFCT_AR_MINOR_VERSION != FEE_INTERNALFCT_C_AR_MINOR_VERSION)
#error "Fee_InternalFct.c : Mismatch in Specification Minor Version"
#endif
#if (FEE_INTERNALFCT_AR_PATCH_VERSION != FEE_INTERNALFCT_C_AR_PATCH_VERSION)
#error "Fee_InternalFct.c : Mismatch in Specification Patch Version"
#endif
#if (FEE_INTERNALFCT_SW_MAJOR_VERSION != FEE_INTERNALFCT_C_SW_MAJOR_VERSION)
#error "Fee_InternalFct.c : Mismatch in Major Version"
#endif
#if (FEE_INTERNALFCT_SW_MINOR_VERSION != FEE_INTERNALFCT_C_SW_MINOR_VERSION)
#error "Fee_InternalFct.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Fee_EndProcessBlock
**
** Service ID : NA
**
** Description : Function to end the processing of any read, write and
** invalidate request
*
** Sync/Async : Synchronous
**
** Re-entrancy : Non Reentrant
**
** Input Parameters : LenRequestResult
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : FEE software component should be initialised
**
** Remarks : Global Variable(s):
** Fee_GstFunctionNotification, Fee_GstVar
**
** Function(s) invoked:
** pFee_JobEndNotification, pFee_JobErrorNotification,
** Dem_ReportErrorStatus
**
*******************************************************************************/
#define FEE_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, FEE_PRIVATE_CODE) Fee_EndProcessBlock(MemIf_JobResultType
LenRequestResult)
{
/* Checks if callback is configured and invokes the callback function */
#if (FEE_UPPER_LAYER_NOTIFICATION == STD_ON)
/* Pointer to function pointer structure */
P2CONST(Tdd_Fee_FuncType, AUTOMATIC, FEE_PRIVATE_CONST) LpFuncNotification;
/* Initialise the notification function pointer */
LpFuncNotification = &Fee_GstFunctionNotification;
#endif
/* Update the state to idle and job result to passed result */
Fee_GstVar.GenJobResult = LenRequestResult;
Fee_GstVar.GucState = FEE_IDLE;
#if (FEE_UPPER_LAYER_NOTIFICATION == STD_ON)
/* Check LenRequestResult is MEMIF_JOB_OK */
if (LenRequestResult == MEMIF_JOB_OK)
{
/* Invoke the successful callback notification */
LpFuncNotification->pFee_JobEndNotification();
}
else
#else
if (LenRequestResult != MEMIF_JOB_OK)
#endif
{
#if (FEE_UPPER_LAYER_NOTIFICATION == STD_ON)
/* Invoke the unsuccessful callback notification */
LpFuncNotification->pFee_JobErrorNotification();
#endif
/* Check request command is EEL_CMD_READ */
if (Fee_GstVar.GstRequest.command_enu == EEL_CMD_READ)
{
/* Report failure of read job request to DEM */
//Dem_ReportErrorStatus((Dem_EventIdType)FEE_E_READ_FAILED,
//(Dem_EventStatusType)DEM_EVENT_STATUS_FAILED);
}
/* Check request command is EEL_CMD_WRITE or EEL_CMD_WRITE_IMM */
else if((Fee_GstVar.GstRequest.command_enu == EEL_CMD_WRITE) ||
(Fee_GstVar.GstRequest.command_enu == EEL_CMD_WRITE_IMM))
{
/* Report failure of write job request to DEM */
//Dem_ReportErrorStatus((Dem_EventIdType)FEE_E_WRITE_FAILED,
// (Dem_EventStatusType)DEM_EVENT_STATUS_FAILED);
}
else
{
/* Added for QAC */
}
} /* End of else part of if (LenRequestResult == MEMIF_JOB_OK) */
} /* End of function body */
#define FEE_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Fee_BlockCfgLookUp
**
** Service ID : NA
**
** Description : Function to search the BlockNumber in BlockConfiguration
** array structure.
*
** Sync/Async : Synchronous
**
** Re-entrancy : Non Reentrant
**
** Input Parameters : BlockNumber
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : LusBlkIndex
**
** Preconditions : FEE software component should be initialised
**
** Remarks : Global Variable(s):
** Fee_GstBlockConfiguration
**
** Function(s) invoked:
** None
**
*******************************************************************************/
#define FEE_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(uint16, FEE_PRIVATE_CODE) Fee_BlockCfgLookUp(uint16 BlockNumber)
{
/* Update the pointer to first element of the structure array */
P2CONST(Tdd_Fee_BlockConfigType, AUTOMATIC, FEE_PRIVATE_DATA)
LpBlockConfig = &Fee_GstBlockConfiguration[FEE_ZERO];
/* Initialize the bottom index to first element */
uint16 LusBottomIdx = FEE_ONE;
/* Initialize the top index to last element of structure array */
uint16 LusTopIdx = FEE_NUM_BLOCKS - FEE_ONE;
/*
* Initialize the default value to 0xFFFF which is other than
* blocks configured
*/
uint16 LusBlkFoundIdx = FEE_INVALID_BLOCK_IDX;
/* Point to the centre element in structure array */
uint16 LusMidIdx;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Check whether BlockNumber is in range */
if((BlockNumber >= (LpBlockConfig->usFeeBlockNumber)) &&
(BlockNumber <= ((LpBlockConfig + LusTopIdx)->usFeeBlockNumber)))
{
/*
* Check whether requested BlockNumber is not equal to first BlockNumber
* of the list
*/
if(BlockNumber != (LpBlockConfig->usFeeBlockNumber))
{
do
{
/* Get the middle index number */
LusMidIdx = ((LusTopIdx + LusBottomIdx) >> FEE_ONE);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Compare BlockNumber with the requested one */
if(((LpBlockConfig + LusMidIdx)->usFeeBlockNumber) == BlockNumber)
{
/* Update the block index found */
LusBlkFoundIdx = LusMidIdx;
/* Set LusTopIdx to zero to break the loop */
LusTopIdx = FEE_ZERO;
}
else
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Compare the BlockNumber with the requested one */
if(BlockNumber < ((LpBlockConfig + LusMidIdx)->usFeeBlockNumber))
{
/* MISRA Rule : 21.1 */
/* Message : An integer expression with a value that */
/* apparently negative is being converted */
/* to an unsigned type. */
/* Reason : This is to update the local variable. */
/* Verification : However, part of the code is verified */
/* manually and it is not having any impact. */
/* If the priority is lower, update LusTopIdx */
LusTopIdx = LusMidIdx - FEE_ONE;
}
else
{
/* If the priority is higher, update LusBottomIdx */
LusBottomIdx = LusMidIdx + FEE_ONE;
}
}
}while(LusBottomIdx <= LusTopIdx);
}
else
{
/* Update the block index found */
LusBlkFoundIdx = FEE_ZERO;
}
}
/* Return block index if found, else return zero */
return (LusBlkFoundIdx);
} /* End of function body */
#define FEE_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Icu/Icu_Ram.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Icu_Ram.c */
/* Version = 3.0.1a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains Global variable definitions of ICU Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 26-Aug-2009 : Initial version
*
* V3.0.1: 28-Jun-2010 : As per SCR 286, precompile option is added for
* the pointer variable "Icu_GpTAUUnitConfig" to
* support the use of Timer Array Unit B.
* V3.0.1a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Icu.h"
#include "Icu_PBTypes.h"
#include "Icu_LTTypes.h"
#include "Icu_Ram.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define ICU_RAM_C_AR_MAJOR_VERSION ICU_AR_MAJOR_VERSION_VALUE
#define ICU_RAM_C_AR_MINOR_VERSION ICU_AR_MINOR_VERSION_VALUE
#define ICU_RAM_C_AR_PATCH_VERSION ICU_AR_PATCH_VERSION_VALUE
/* File version information */
#define ICU_RAM_C_SW_MAJOR_VERSION 3
#define ICU_RAM_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (ICU_RAM_AR_MAJOR_VERSION != ICU_RAM_C_AR_MAJOR_VERSION)
#error "Icu_Ram.c : Mismatch in Specification Major Version"
#endif
#if (ICU_RAM_AR_MINOR_VERSION != ICU_RAM_C_AR_MINOR_VERSION)
#error "Icu_Ram.c : Mismatch in Specification Minor Version"
#endif
#if (ICU_RAM_AR_PATCH_VERSION != ICU_RAM_C_AR_PATCH_VERSION)
#error "Icu_Ram.c : Mismatch in Specification Patch Version"
#endif
#if (ICU_RAM_SW_MAJOR_VERSION != ICU_RAM_C_SW_MAJOR_VERSION)
#error "Icu_Ram.c : Mismatch in Major Version"
#endif
#if (ICU_RAM_SW_MINOR_VERSION != ICU_RAM_C_SW_MINOR_VERSION)
#error "Icu_Ram.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
#define ICU_START_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* Global pointer variable for database */
P2CONST(Icu_ConfigType, ICU_CONST, ICU_CONFIG_CONST) Icu_GpConfigPtr;
/* Global pointer variable for channel configuration */
P2CONST(Tdd_Icu_ChannelConfigType, ICU_CONST, ICU_CONFIG_CONST)
Icu_GpChannelConfig;
/* Global pointer variable for Timer channel configuration */
P2CONST(Tdd_Icu_TimerChannelConfigType, ICU_CONST, ICU_CONFIG_CONST)
Icu_GpTimerChannelConfig;
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)||\
(ICU_TAUB_UNIT_USED == STD_ON))
/* Global pointer variable for ICU hardware unit configuration */
P2CONST(Tdd_Icu_TAUUnitConfigType, ICU_CONST, ICU_CONFIG_CONST)
Icu_GpTAUUnitConfig;
#endif
#if(ICU_PREVIOUS_INPUT_USED == STD_ON)
/* Global pointer variable for Previous input configuration */
P2CONST(Tdd_IcuPreviousInputUseType, ICU_CONST, ICU_CONFIG_CONST)
Icu_GpPreviousInputConfig;
#endif
/* Global pointer variable for channel data */
P2VAR(Tdd_Icu_ChannelRamDataType, ICU_NOINIT_DATA, ICU_CONFIG_DATA)
Icu_GpChannelRamData;
/* Global pointer to the address of Edge Count RAM data */
P2VAR(Tdd_Icu_EdgeCountChannelRamDataType, ICU_NOINIT_DATA, ICU_CONFIG_DATA)
Icu_GpEdgeCountData;
/* Global pointer variable for Timestamp channel data */
P2VAR(Tdd_Icu_TimeStampChannelRamDataType, ICU_NOINIT_DATA, ICU_CONFIG_DATA)
Icu_GpTimeStampData;
/* Global pointer to the address of Signal Measure RAM data */
P2VAR(Tdd_Icu_SignalMeasureChannelRamDataType, ICU_NOINIT_DATA, ICU_CONFIG_DATA)
Icu_GpSignalMeasurementData;
/* Holds the status of ICU Driver Component */
VAR(Icu_ModeType, ICU_NOINIT_DATA) Icu_GenModuleMode;
#define ICU_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
#define ICU_START_SEC_VAR_NOINIT_8BIT
#include "MemMap.h"
/* Global pointer variable for channel to timer mapping */
P2CONST(uint8, ICU_CONST, ICU_CONFIG_CONST) Icu_GpChannelMap;
#define ICU_STOP_SEC_VAR_NOINIT_8BIT
#include "MemMap.h"
#define ICU_START_SEC_VAR_1BIT
#include "MemMap.h"
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Holds the status of Initialization */
VAR(boolean, ICU_INIT_DATA) Icu_GblDriverStatus = ICU_UNINITIALIZED;
#endif
#define ICU_STOP_SEC_VAR_1BIT
#include "MemMap.h"
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Can/Can_Ram.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Can_Ram.h */
/* Version = 3.0.1a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2008-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* C header file for Can_Ram.c */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12.12.2008 : Initial Version
* V3.0.1: 21.10.2009 : Updated compiler version as per
* SCR ANMCANLINFR3_SCR_031.
* V3.0.1a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
#ifndef CAN_RAM_H
#define CAN_RAM_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Can_PBTypes.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define CAN_RAM_AR_MAJOR_VERSION 2
#define CAN_RAM_AR_MINOR_VERSION 2
#define CAN_RAM_AR_PATCH_VERSION 2
/* File version information */
#define CAN_RAM_SW_MAJOR_VERSION 3
#define CAN_RAM_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
#define CAN_AFCAN_START_SEC_VAR_8BIT
#include "MemMap.h"
/* Global variable to store initialization status of CAN Driver */
extern VAR (boolean, CAN_AFCAN_INIT_DATA) Can_GblCanStatus;
#if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
/* Global flag to store the status of Tx Cancel Interrupt status considering
all the controllers */
extern VAR (boolean, CAN_AFCAN_NOINIT_DATA) Can_GblTxCancelIntFlg;
#endif
#define CAN_AFCAN_STOP_SEC_VAR_8BIT
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_VAR_NOINIT_8BIT
#include "MemMap.h"
/* Global variable to store index of first Hth Id of the CAN Driver */
extern VAR (uint8, CAN_AFCAN_NOINIT_DATA) Can_GucFirstHthId;
/* Global variable to store index counter for controlling interrupt */
extern VAR (uint8, CAN_AFCAN_NOINIT_DATA)
Can_GucIntCounter[CAN_MAX_NUMBER_OF_CONTROLLER];
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Global variable to store index of last Hth Id of the CAN Driver */
extern VAR (uint8, CAN_AFCAN_NOINIT_DATA) Can_GucLastHthId;
/* Global variable to store index of last Controller Id of the CAN Driver */
extern VAR (uint8, CAN_AFCAN_NOINIT_DATA) Can_GucLastCntrlId;
#endif
#if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
/* Global array for counting the number of Tx Cancellations in progress in
polling mode of operation for the controller */
extern VAR (uint8, CAN_AFCAN_NOINIT_DATA)
Can_GaaTxCancelCtr[CAN_MAX_NUMBER_OF_CONTROLLER];
#endif
#define CAN_AFCAN_STOP_SEC_VAR_NOINIT_8BIT
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* Global variable to store pointer to first controller structure */
extern P2CONST(Can_ControllerConfigType, CAN_AFCAN_CONST,
CAN_AFCAN_PRIVATE_CONST)Can_GpFirstController;
/* Global variable to store pointer to first Hth structure */
extern P2CONST(Tdd_Can_AFCan_Hth, CAN_AFCAN_CONST, CAN_AFCAN_PRIVATE_CONST)
Can_GpFirstHth;
/* Global variable to store pointer of CntrlId array */
extern P2CONST(uint8, CAN_AFCAN_CONST, CAN_AFCAN_PRIVATE_CONST)
Can_GpCntrlIdArray;
#define CAN_AFCAN_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* CAN_RAM_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Generic/Compiler/GHS/Startup_Files/Fx4/inc/icu_feret.h
/*===========================================================================*/
/* Module = icu_feret.h */
/* Version = V1.01 */
/* generated by DeFiXE2 0.8.4.5 */
/*===========================================================================*/
/* COPYRIGHT */
/*===========================================================================*/
/* Copyright (c) 2010 by Renesas Electronics Europe GmbH, */
/* a company of the Renesas Electronics Corporation */
/*===========================================================================*/
/* Purpose: Definition of ICU Macros */
/* */
/*===========================================================================*/
/* */
/* Warranty Disclaimer */
/* */
/* Because the Product(s) is licensed free of charge, there is no warranty */
/* of any kind whatsoever and expressly disclaimed and excluded by NEC, */
/* either expressed or implied, including but not limited to those for */
/* non-infringement of intellectual property, merchantability and/or */
/* fitness for the particular purpose. */
/* NEC shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall NEC be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. NEC shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by NEC in connection with the Product(s) and/or the */
/* Application. */
/* */
/*===========================================================================*/
/* Environment: */
/* Device: all V850E2 core devices */
/* IDE: GHS Multi for V800 */
/*===========================================================================*/
#ifndef __ICU_FERET_H__
#define __ICU_FERET_H__
#pragma asm
#if (__V800_registermode==22)
.set regframe, 16
#endif
#if (__V800_registermode==26)
.set regframe, 18
#endif
#if (__V800_registermode==32)
.set regframe, 21
#endif
.set framesize, regframe*4
#pragma endasm
asm void FETRAP_ENTRY( void)
{
-- isr prolog
-- 22 reg mode: save 15 registers + BSEL + FEPSW + FEPC
-- 26 reg mode: save 17 registers + BSEL + FEPSW + FEPC
-- 32 reg mode: save 20 registers + BSEL + FEPSW + FEPC
prepare {ep-lp}, regframe, sp
sst.w r1, (framesize-4)[ep]
stsr BSEL, r1
sst.w r1, (framesize-8)[ep] -- save actual bank #
ldsr r0, BSEL -- set bank/group # to 0
stsr FEPSW, r1
sst.w r1, (framesize-12)[ep]
stsr FEPC, r1
sst.w r1, (framesize-16)[ep]
sst.w r2, (framesize-20)[ep]
sst.w gp, (framesize-24)[ep]
sst.w r5, (framesize-28)[ep]
sst.w r6, (framesize-32)[ep]
sst.w r7, (framesize-36)[ep]
sst.w r8, (framesize-40)[ep]
sst.w r9, (framesize-44)[ep]
sst.w r10, (framesize-48)[ep]
sst.w r11, (framesize-52)[ep]
sst.w r12, (framesize-56)[ep]
sst.w r13, (framesize-60)[ep]
sst.w r14, (framesize-64)[ep]
#if (__V800_registermode==26)
sst.w r15, (framesize-68)[ep]
sst.w r16, (framesize-72)[ep]
#endif
#if (__V800_registermode==32)
sst.w r15, (framesize-68)[ep]
sst.w r16, (framesize-72)[ep]
sst.w r17, (framesize-76)[ep]
sst.w r18, (framesize-80)[ep]
sst.w r19, (framesize-84)[ep]
#endif
}
asm void FETRAP_LEAVE( void)
{
mov sp, ep
#if (__V800_registermode==32)
sld.w (framesize-84)[ep], r19
sld.w (framesize-80)[ep], r18
sld.w (framesize-76)[ep], r17
sld.w (framesize-72)[ep], r16
sld.w (framesize-68)[ep], r15
#endif
#if (__V800_registermode==26)
sld.w (framesize-72)[ep], r16
sld.w (framesize-68)[ep], r15
#endif
sld.w (framesize-64)[ep], r14
sld.w (framesize-60)[ep], r13
sld.w (framesize-56)[ep], r12
sld.w (framesize-52)[ep], r11
sld.w (framesize-48)[ep], r10
sld.w (framesize-44)[ep], r9
sld.w (framesize-40)[ep], r8
sld.w (framesize-36)[ep], r7
sld.w (framesize-32)[ep], r6
sld.w (framesize-28)[ep], r5
sld.w (framesize-24)[ep], gp
sld.w (framesize-20)[ep], r2
di
sld.w (framesize-16)[ep], r1
ldsr r1, FEPC
sld.w (framesize-12)[ep], r1
ldsr r1, FEPSW
sld.w (framesize-8)[ep], r1
ldsr r1, BSEL
sld.w (framesize-4)[ep], r1
dispose regframe, {ep-lp}
feret
}
#define PRAGMA(x) _Pragma(#x)
#define FETRAP_EXCEPTION( name, isr) \
PRAGMA( ghs noprologue) \
void name( void) { \
FETRAP_ENTRY(); \
isr(); \
FETRAP_LEAVE(); \
}
#endif // __ICU_FERET_H__
<file_sep>/BSP/MCAL/Wdg/Wdg_23_DriverB.c
/*============================================================================*/
/* Project = AUTOSAR NEC Xx4 MCAL Components */
/* Module = Wdg_23_DriverB.c */
/* Version = 3.0.4 */
/* Date = 06-Mar-2010 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009 by NEC Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Driver code of the Watchdog Driver B Component */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* NEC Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by NEC. Any warranty */
/* is expressly disclaimed and excluded by NEC, either expressed or implied, */
/* including but not limited to those for non-infringement of intellectual */
/* property, merchantability and/or fitness for the particular purpose. */
/* */
/* NEC shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall NEC be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. NEC shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by NEC in connection with the Product(s) and/or the */
/* Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/* Compiler: GHS V5.1.6c */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12-Jun-2009 : Initial Version
*
* V3.0.1: 14-Jul-2009 : As per SCR 015, compiler version is changed from
* V5.0.5 to V5.1.6c in the header of the file.
*
* V3.0.2: 22-Feb-2010 : As per SCR 196, initializing the timer counter
* register is done in Wdg_Init() API.
*
* V3.0.3: 25-Feb-2010 : As per SCR 198, watchdog timer is started in
* Wdg_SetMode() API.
*
* V3.0.4: 06-Mar-2010 : As per SCR 219, Wdg_SetMode() API is updated
* to start watchdog after setting the requested mode.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Wdg_23_DriverB.h"
#include "Wdg_23_DriverB_PBTypes.h"
#if (WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON)
#include "Det.h"
#endif
#include "Dem.h"
#include "Wdg_23_DriverB_Ram.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define WDG_23_DRIVERB_C_AR_MAJOR_VERSION WDG_23_DRIVERB_AR_MAJOR_VERSION_VALUE
#define WDG_23_DRIVERB_C_AR_MINOR_VERSION WDG_23_DRIVERB_AR_MINOR_VERSION_VALUE
#define WDG_23_DRIVERB_C_AR_PATCH_VERSION WDG_23_DRIVERB_AR_PATCH_VERSION_VALUE
/* File version information */
#define WDG_23_DRIVERB_C_SW_MAJOR_VERSION 3
#define WDG_23_DRIVERB_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (WDG_23_DRIVERB_AR_MAJOR_VERSION != WDG_23_DRIVERB_C_AR_MAJOR_VERSION)
#error "Wdg_23_DriverB.c : Mismatch in Specification Major Version"
#endif
#if (WDG_23_DRIVERB_AR_MINOR_VERSION != WDG_23_DRIVERB_C_AR_MINOR_VERSION)
#error "Wdg_23_DriverB.c : Mismatch in Specification Minor Version"
#endif
#if (WDG_23_DRIVERB_AR_PATCH_VERSION != WDG_23_DRIVERB_C_AR_PATCH_VERSION)
#error "Wdg_23_DriverB.c : Mismatch in Specification Patch Version"
#endif
#if (WDG_23_DRIVERB_SW_MAJOR_VERSION != WDG_23_DRIVERB_C_SW_MAJOR_VERSION)
#error "Wdg_23_DriverB.c : Mismatch in Major Version"
#endif
#if (WDG_23_DRIVERB_SW_MINOR_VERSION != WDG_23_DRIVERB_C_SW_MINOR_VERSION)
#error "Wdg_23_DriverB.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Wdg_23_DriverBInit
**
** Service ID : 0x00
**
** Description : This service initialise the Watchdog driver and
** hardware.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non-Reentrant
**
** Input Parameters : ConfigPtr Pointer to the configuration
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return Parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Wdg_23_DriverB_GpConfigPtr,
** Wdg_GddDriverState,
** Wdg_GddCurrentMode
** Function(s) invoked:
** Det_ReportError
** Dem_ReportErrorStatus
*******************************************************************************/
#define WDG_23_DRIVERB_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, WDG_23_DRIVERB_PUBLIC_CODE) Wdg_23_DriverBInit
(P2CONST(Wdg_23_DriverB_ConfigType, AUTOMATIC, WDG_23_DRIVERB_APPL_CONST)
ConfigPtr)
{
#if (WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON)
/* Report Error to DET, if the config pointer value is NULL */
if (ConfigPtr == NULL_PTR)
{
/* Report Error to DET */
Det_ReportError(WDG_23_DRIVERB_MODULE_ID,WDG_23_DRIVERB_INSTANCE_ID,
WDG_23_DRIVERB_INIT_SID, WDG_23_DRIVERB_E_PARAM_CONFIG);
}
else
#endif /* (WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON) */
{
/* Check whether the existing database is correct */
if ((ConfigPtr->ulStartOfDbToc) == WDG_23_DRIVERB_DBTOC_VALUE)
{
/* Assign the config pointer value to global pointer */
Wdg_23_DriverB_GpConfigPtr = ConfigPtr;
/* Check whether Watchdog disable is allowed */
#if (WDG_23_DRIVERB_DISABLE_ALLOWED == STD_OFF)
if(Wdg_23_DriverB_GpConfigPtr->ucWdtamdDefaultMode == WDGIF_OFF_MODE)
{
/* Report Error to DEM */
Dem_ReportErrorStatus(WDG_23_DRVB_E_DISABLE_REJECTED,
DEM_EVENT_STATUS_FAILED);
}
else
#endif
{
/* To check whether the default mode is OFF mode */
if (Wdg_23_DriverB_GpConfigPtr->ucWdtamdDefaultMode == WDGIF_OFF_MODE)
{
/* Set current mode as OFF mode */
Wdg_GddCurrentMode = WDGIF_OFF_MODE;
}
else
{
/* To check whether the default mode is SLOW mode */
if (Wdg_23_DriverB_GpConfigPtr->ucWdtamdDefaultMode == WDGIF_SLOW_MODE)
{
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified */
/* manually and it is not having any impact. */
/* Set configured slow mode value to Mode register */
WDG_23_DRIVERB_WDTAMD_ADDRESS =
Wdg_23_DriverB_GpConfigPtr->ucWdtamdSlowValue;
/* Set current mode as slow mode */
Wdg_GddCurrentMode = WDGIF_SLOW_MODE;
}
else
{
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified */
/* manually and it is not having any impact. */
/* Set configured slow mode value to Mode register */
WDG_23_DRIVERB_WDTAMD_ADDRESS =
Wdg_23_DriverB_GpConfigPtr->ucWdtamdFastValue;
/* Set current mode as fast mode */
Wdg_GddCurrentMode = WDGIF_FAST_MODE;
}
/* Check whether Varying Activation Code is enabled or disabled */
#if (WDG_23_DRIVERB_VAC_ALLOWED == STD_OFF)
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified */
/* manually and it is not having any impact. */
/* Initialise the register with preconfigured value */
WDG_23_DRIVERB_WDTAWDTE_ADDRESS = WDG_23_DRIVERB_RESTART;
#else
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified */
/* manually and it is not having any impact. */
/* Initialise VAC register */
WDG_23_DRIVERB_WDTAEVAC_ADDRESS = WDG_23_DRIVERB_RESTART -
WDG_23_DRIVERB_WDTAREF_ADDRESS;
#endif /* WDG_23_DRIVERB_VAC_ALLOWED == STD_OFF */
}
/* Check if WDG_23_DRIVERB_DEV_ERROR_DETECT is enabled */
#if (WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON)
/* Set the state of Watchdog as idle */
Wdg_GddDriverState = WDG_IDLE;
#endif
}
}
#if (WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON)
else
{
/* Report Error to DET */
Det_ReportError(WDG_23_DRIVERB_MODULE_ID,WDG_23_DRIVERB_INSTANCE_ID,
WDG_23_DRIVERB_INIT_SID, WDG_23_DRVB_E_INVALID_DATABASE);
} /* End of Check to check database */
#endif
}
}
#define WDG_23_DRIVERB_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Wdg_23_DriverBSetMode
**
** Service ID : 0x01
**
** Sync/Async : Synchronous
**
** Description : This service change the mode of the Watchdog timer
**
** Re-entrancy : Non-Reentrant
**
** Input Parameters : WdgIf_ModeType Mode
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return Parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):Wdg_GddDriverState,
** Wdg_GddCurrentMode
** Function(s) Invoked:
** Dem_ReportErrorStatus
** Det_ReportError
*******************************************************************************/
#define WDG_23_DRIVERB_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(Std_ReturnType, WDG_23_DRIVERB_PUBLIC_CODE) Wdg_23_DriverBSetMode
(WdgIf_ModeType Mode)
{
Std_ReturnType LenReturnValue = E_OK;
boolean LblRestartFlag = WDG_FALSE;
/* Report Error to DET, if state of Watchdog is not idle */
#if (WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON)
if (Wdg_GddDriverState != WDG_IDLE)
{
/* Report Error to DET */
Det_ReportError(WDG_23_DRIVERB_MODULE_ID, WDG_23_DRIVERB_INSTANCE_ID,
WDG_23_DRIVERB_SETMODE_SID, WDG_23_DRIVERB_E_DRIVER_STATE);
/* Set Return Value as E_NOT_OK */
LenReturnValue = E_NOT_OK;
}
/* MISRA Rule : 13.7 */
/* Message : The result of this logical operation is always */
/* 'false'. The value of this control expression */
/* is always 'false'. */
/* Reason : Since e-num type is used it is not possible to */
/* provide out of range value but as per AUTOSAR */
/* all the input paramters of an API have to be */
/* verified. */
/* Verification : However, part of the code is verified manually */
/* and it is not giving any impact */
/* MISRA Rule : 14.1 */
/* Message : This statement is unreachable. */
/* Reason : Since e-num type is used it is not possible to */
/* provide out of range value but as per AUTOSAR */
/* all the input paramters of an API have to be */
/* verified. */
/* Verification : However, part of the code is verified manually */
/* and it is not giving any impact */
/* Check whether input parameter 'Mode' is within the range */
if(Mode > WDGIF_FAST_MODE)
{
/* Report Error to DET, if the parameter mode is not within the range */
Det_ReportError(WDG_23_DRIVERB_MODULE_ID, WDG_23_DRIVERB_INSTANCE_ID,
WDG_23_DRIVERB_SETMODE_SID, WDG_23_DRIVERB_E_PARAM_MODE);
/* Set Return Value as E_NOT_OK */
LenReturnValue = E_NOT_OK;
}
if(LenReturnValue == E_OK)
#endif /* #if (WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON) */
{
#if (WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON)
/* Set the state of Watchdog as busy */
Wdg_GddDriverState = WDG_BUSY;
#endif
/* Switching the Watchdog Mode from OFF to SLOW */
if ((Wdg_GddCurrentMode == WDGIF_OFF_MODE) && (Mode == WDGIF_SLOW_MODE))
{
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Set configured slow mode value to Mode register */
WDG_23_DRIVERB_WDTAMD_ADDRESS =
Wdg_23_DriverB_GpConfigPtr->ucWdtamdSlowValue;
/* Set current mode value as slow */
Wdg_GddCurrentMode = WDGIF_SLOW_MODE;
/* Set Return Value as E_OK */
LenReturnValue = E_OK;
/* Set the restart flag */
LblRestartFlag = WDG_TRUE;
}
/* Switching the Watchdog Mode from OFF to FAST */
else if ((Wdg_GddCurrentMode == WDGIF_OFF_MODE) &&
(Mode == WDGIF_FAST_MODE))
{
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Set configured fast mode value to Mode register */
WDG_23_DRIVERB_WDTAMD_ADDRESS =
Wdg_23_DriverB_GpConfigPtr->ucWdtamdFastValue;
/* Set current mode value as fast */
Wdg_GddCurrentMode = WDGIF_FAST_MODE;
/* Set Return Value as E_OK */
LenReturnValue = E_OK;
/* Set the restart flag */
LblRestartFlag = WDG_TRUE;
}
/* Switching the Watchdog Mode from FAST to FAST / SLOW to SLOW */
else if (Wdg_GddCurrentMode == Mode)
{
/* Set Return Value as E_NOT_OK */
LenReturnValue = E_OK;
}
else
{
/* Report Error to DEM */
Dem_ReportErrorStatus(WDG_23_DRVB_E_MODE_SWITCH_FAILED,
DEM_EVENT_STATUS_FAILED);
/* Set Return Value as E_NOT_OK */
LenReturnValue = E_NOT_OK;
}
/* Start the Watchdog Driver if the restart flag is true */
if(LblRestartFlag == WDG_TRUE)
{
/* Check whether Varying Activation Code is enabled or disabled */
#if (WDG_23_DRIVERB_VAC_ALLOWED == STD_OFF)
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified */
/* manually and it is not having any impact. */
/* Initialise the register with preconfigured value */
WDG_23_DRIVERB_WDTAWDTE_ADDRESS = WDG_23_DRIVERB_RESTART;
#else
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified */
/* manually and it is not having any impact. */
/* Initialise VAC register */
WDG_23_DRIVERB_WDTAEVAC_ADDRESS = WDG_23_DRIVERB_RESTART -
WDG_23_DRIVERB_WDTAREF_ADDRESS;
#endif /* WDG_23_DRIVERB_VAC_ALLOWED == STD_OFF */
}
/* Set Watchdog Driver State to IDLE after Mode Switch operation */
#if (WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON)
/* Set the state of Watchdog as idle */
Wdg_GddDriverState = WDG_IDLE;
#endif /* (WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON) */
}
return(LenReturnValue);
}
#define WDG_23_DRIVERB_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Wdg_23_DriverBTrigger
**
** Service ID : 0x02
**
** Sync/Async : Synchronous
**
** Description : This service is used to trigger the Watchdog timer
**
** Re-entrancy : Non-Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return Parameter : None
**
** Preconditions : Wdg_23_DriverBInit must be called before this function
**
** Remarks : Global Variable(s):
** Wdg_GddDriverState
** Function(s) Invoked:
** Det_ReportError
**
*******************************************************************************/
#define WDG_23_DRIVERB_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, WDG_23_DRIVERB_PUBLIC_CODE) Wdg_23_DriverBTrigger(void)
{
/* Check if DET is enabled */
#if (WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON)
/* Check whether Watchdog is in idle state */
if (Wdg_GddDriverState != WDG_IDLE)
{
/* Report to DET, if Watchdog is not in idle state */
Det_ReportError(WDG_23_DRIVERB_MODULE_ID, WDG_23_DRIVERB_INSTANCE_ID,
WDG_23_DRIVERB_TRIGGER_SID, WDG_23_DRIVERB_E_DRIVER_STATE);
}
else
#endif
{
#if (WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON)
/* Set the state of Watchdog as busy */
Wdg_GddDriverState = WDG_BUSY;
#endif /* WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON */
/* Check whether Varying Activation Code is enabled */
#if (WDG_23_DRIVERB_VAC_ALLOWED == STD_OFF)
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Initialise the register with preconfigured value */
WDG_23_DRIVERB_WDTAWDTE_ADDRESS = WDG_23_DRIVERB_RESTART;
#else
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Initialise VAC register */
WDG_23_DRIVERB_WDTAEVAC_ADDRESS = WDG_23_DRIVERB_RESTART -
WDG_23_DRIVERB_WDTAREF_ADDRESS;
#endif /* WDG_23_DRIVERB_VAC_ALLOWED == STD_OFF */
#if (WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON)
/* Set the state of Watchdog as idle */
Wdg_GddDriverState = WDG_IDLE;
#endif /* WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON */
}
}
#define WDG_23_DRIVERB_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Wdg_23_DriverBGetVersionInfo
**
** Service ID : 0x04
**
** Sync/Async : Synchronous
**
** Description : This service returns the version information of Watchdog
** Driver Component
**
** Re-entrancy : Non-Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : versioninfo
**
** Return Parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
** Function(s) Invoked:
** Det_ReportError
**
*******************************************************************************/
#if (WDG_23_DRIVERB_VERSION_INFO_API == STD_ON)
#define WDG_23_DRIVERB_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC (void, WDG_23_DRIVERB_PUBLIC_CODE) Wdg_23_DriverBGetVersionInfo
(P2VAR(Std_VersionInfoType, AUTOMATIC, WDG_23_DRIVERB_APPL_DATA)versioninfo)
{
#if (WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON)
/* Check whether Version Information is equal to Null Ptr */
if(versioninfo == NULL_PTR)
{
/* Report to DET */
Det_ReportError(WDG_23_DRIVERB_MODULE_ID, WDG_23_DRIVERB_INSTANCE_ID,
WDG_23_DRIVERB_GETVERSIONINFO_SID, WDG_23_DRIVERB_E_PARAM_POINTER);
}
else
#endif /* (WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON) */
{
/* Copy the vendor Id */
versioninfo->vendorID = WDG_23_DRIVERB_VENDOR_ID;
/* Copy the module Id */
versioninfo->moduleID = WDG_23_DRIVERB_MODULE_ID;
/* Copy the instance Id */
versioninfo->instanceID = WDG_23_DRIVERB_INSTANCE_ID;
/* Copy Software Major Version */
versioninfo->sw_major_version = WDG_23_DRIVERB_SW_MAJOR_VERSION_VALUE;
/* Copy Software Minor Version */
versioninfo->sw_minor_version = WDG_23_DRIVERB_SW_MINOR_VERSION_VALUE;
/* Copy Software Patch Version */
versioninfo->sw_patch_version = WDG_23_DRIVERB_SW_PATCH_VERSION_VALUE;
}
}
#define WDG_23_DRIVERB_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* (WDG_23_DRIVERB_VERSION_INFO_API == STD_ON) */
/*******************************************************************************
** End Of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Port/Port.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Port.h */
/* Version = 3.1.5 */
/* Date = 18-Mar-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2013 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains macros, PORT type definitions, structure data types and */
/* API function prototypes of PORT Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 27-Jul-2009 : Initial Version
*
* V3.0.1: 07-Sep-2009 : As per SCR 026, Port_ConfigType structure is updated
* for the additon of new elements to implement write
* protection for write protected registers PODC, PDSC
* PUCC and PSBC.
*
* V3.0.2: 13-Nov-2009 : As per SCR 120, Port_ConfigType structure is updated
* for the additon of new element to support JTAG
* function control registers.
*
* V3.0.3: 23-Feb-2010 : As per SCR 189, updated for Port Filter Functionality
* implementation.
*
* V3.0.4: 05-Apr-2010 : As per SCR 245, Port_ConfigType structure is updated
* to add updated ucNoOfNumRestoredRegs and
* ucNoOfAlphaRestoredRegs
* V3.1.0: 26-Jul-2011 : Initial Version DK4-H variant
* V3.1.0: 26-Jul-2011 : Initial Version DK4-H variant
* V3.1.1: 15-Sep-2011 : As per the DK-4H requirements
* 1. Added DK4-H specific JTAG information.
* V3.1.2: 16-Feb-2012 : Merged the fixes done for Fx4L
* V3.1.3: 06-Jun-2012 : As per SCR 033, following changes are made:
* 1. File version is changed.
* 2. Function Port_GetVersionInfo is implemented as
* Macro.
* V3.1.4: 10-Jul-2012 : As per SCR 047, File version is changed.
* V3.1.4a: 19-Feb-2013 : Port_ConfigType structure is updated for the addition
* of new element ucNoOfJtagRestoredRegs to support JTAG
* restored registers.
* V3.1.5: 18-Mar-2013 : As per SCR 80 for the mantis issue #5399,
* PORT_SW_PATCH_VERSION version is updated.
*/
/******************************************************************************/
#ifndef PORT_H
#define PORT_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Std_Types.h"
#include "Port_Cfg.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* Version identification */
#define PORT_VENDOR_ID PORT_VENDOR_ID_VALUE
#define PORT_MODULE_ID PORT_MODULE_ID_VALUE
#define PORT_INSTANCE_ID PORT_INSTANCE_ID_VALUE
/* AUTOSAR specification version information */
#define PORT_AR_MAJOR_VERSION PORT_AR_MAJOR_VERSION_VALUE
#define PORT_AR_MINOR_VERSION PORT_AR_MINOR_VERSION_VALUE
#define PORT_AR_PATCH_VERSION PORT_AR_PATCH_VERSION_VALUE
/* File version information */
#define PORT_SW_MAJOR_VERSION 3
#define PORT_SW_MINOR_VERSION 1
#define PORT_SW_PATCH_VERSION 5
#if (PORT_CFG_SW_MAJOR_VERSION != PORT_SW_MAJOR_VERSION)
#error "Software major version of Port.h and Port_Cfg.h did not match!"
#endif
#if (PORT_CFG_SW_MINOR_VERSION!= PORT_SW_MINOR_VERSION )
#error "Software minor version of Port.h and Port_Cfg.h did not match!"
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Service IDs **
*******************************************************************************/
/* Service ID for PORT Initialization */
#define PORT_INIT_SID (uint8)0x00
/* Service ID for setting the Direction of PORT Pin */
#define PORT_SET_PIN_DIR_SID (uint8)0x01
/* Service ID for refreshing the Direction of PORT Pin */
#define PORT_REFRESH_PORT_DIR_SID (uint8)0x02
/* Service ID for PORT getting Version Information */
#define PORT_GET_VERSION_INFO_SID (uint8)0x03
/* Service ID for setting the Mode of PORT Pin */
#define PORT_SET_PIN_MODE_SID (uint8)0x04
/*******************************************************************************
** DET Error Codes **
*******************************************************************************/
/* Invalid Port Pin ID requested */
#define PORT_E_PARAM_PIN (uint8)0x0A
/* Port Pin Direction not configured as changeable */
#define PORT_E_DIRECTION_UNCHANGEABLE (uint8)0x0B
/* API Port_Init service called with wrong parameter. */
#define PORT_E_PARAM_CONFIG (uint8)0x0C
/* When valid Mode is not available */
#define PORT_E_PARAM_INVALID_MODE (uint8)0x0D
/* When valid Mode is not configured as changeable */
#define PORT_E_MODE_UNCHANGEABLE (uint8)0x0E
/* When PORT APIs are invoked before PORT Module Initialization */
#define PORT_E_UNINIT (uint8)0x0F
/* API Port_GetVersionInfo() API is invoked with wrong parameter */
#define PORT_E_PARAM_POINTER (uint8)0xF0
/* When valid Database is not available */
#define PORT_E_INVALID_DATABASE (uint8)0xEF
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Type definition for Port_PinType used by the API Port_SetPinDirection() */
typedef uint16 Port_PinType;
/* Type definition for Port_PinDirectionType used by the API
* Port_SetPinDirection()
*/
typedef enum
{
PORT_PIN_OUT = 0,
PORT_PIN_IN = 1
}Port_PinDirectionType;
/* Type definition for Port_PinModeType used by the API
* Port_SetPinMode()
*/
typedef enum
{
PORT_INIT_MODE = 0,
PORT_SETPIN_MODE = 1
}Port_PinModeType;
/* Structure for Port Init Configuration */
/* Overall Module Configuration Data Structure */
typedef struct STagPort_ConfigType
{
/* Database start value - 0x05DF0300 */
uint32 ulStartOfDbToc;
#if (PORT_NUM_PORT_GROUPS_AVAILABLE == STD_ON)
/* Pointer to structure of Numeric Port Group registers in sequence: PSR,
* PIS, PISE, PISA, PIBC, PIPC, PU, PD, PBDC, PODC, PDSC, PUCC and PSBC.
*/
P2CONST(struct STagTdd_Port_Regs, AUTOMATIC, PORT_CONFIG_CONST)
pPortNumRegs;
/* Pointer to structure of Numeric Function Control Port Group registers
* in sequence: PFCE, PFC and PMCSR
*/
P2CONST(struct STagTdd_Port_FuncCtrlRegs, AUTOMATIC, PORT_CONFIG_CONST)
pPortNumFuncCtrlRegs;
/* Pointer to structure of Numeric PMSR Port Group registers */
P2CONST(struct STagTdd_Port_PMSRRegs, AUTOMATIC, PORT_CONFIG_CONST)
pPortNumPMSRRegs;
#endif
#if (PORT_ALPHA_PORT_GROUPS_AVAILABLE == STD_ON)
/* Pointer to structure of Alphabetic Port Group registers in sequence:
* PSR,PIS, PISE, PISA, PIBC, PIPC, PU, PD, PBDC, PODC, PDSC, PUCC
* and PSBC.
*/
P2CONST(struct STagTdd_Port_Regs, AUTOMATIC, PORT_CONFIG_CONST)
pPortAlphaRegs;
/* Pointer to structure of Alphabetic Function Control Port Group
* registers in sequence: PFCE, PFC and PMCSR
*/
P2CONST(struct STagTdd_Port_FuncCtrlRegs, AUTOMATIC, PORT_CONFIG_CONST)
pPortAlphaFuncCtrlRegs;
/* Pointer to structure of Alphabetic PMSR Port Group registers */
P2CONST(struct STagTdd_Port_PMSRRegs, AUTOMATIC, PORT_CONFIG_CONST)
pPortAlphaPMSRRegs;
#endif
#if (PORT_JTAG_PORT_GROUPS_AVAILABLE == STD_ON)
/* Pointer to structure of JTAG Port Group registers in sequence:
* PSR,PIS, PISE, PISA, PIBC, PIPC, PU, PD, PBDC, PODC, PDSC, PUCC
* and PSBC.
*/
P2CONST(struct STagTdd_Port_Regs, AUTOMATIC, PORT_CONFIG_CONST)
pPortJRegs;
/* Pointer to structure of JATG Function Control Port Group registers in
* sequence: PFCE, PFC and PMCSR
*/
P2CONST(struct STagTdd_Port_FuncCtrlRegs, AUTOMATIC, PORT_CONFIG_CONST)
pPortJFuncCtrlRegs;
/* Pointer to structure of JTAG PMSR Port Group registers */
P2CONST(struct STagTdd_Port_PMSRRegs, AUTOMATIC, PORT_CONFIG_CONST)
pPortJPMSRRegs;
#endif
#if (PORT_SET_PIN_DIRECTION_API == STD_ON)
/* Pointer to structure containing details about the pins whose direction
* can be changed during run time.
*/
P2CONST(struct STagTdd_Port_PinsDirChangeable, AUTOMATIC, PORT_CONFIG_CONST)
pPinDirChangeable;
#endif
#if (PORT_SET_PIN_MODE_API == STD_ON)
/* Pointer to structure containing details about the port pin mode */
P2CONST(struct STagTdd_Port_PinModeChangeableGroups, AUTOMATIC,
PORT_CONFIG_CONST)pPinModeChangeableGroups;
P2CONST(struct STagTdd_Port_PinModeChangeableDetails, AUTOMATIC,
PORT_CONFIG_CONST)pPinModeChangeableDetails;
#endif
#if(PORT_DNFA_REG_CONFIG == STD_ON)
/* Pointer to array of structure containing details about DNFA registers */
P2CONST(struct STagTdd_Port_DNFARegs, AUTOMATIC, SPI_CONFIG_DATA)
pPortDNFARegs;
#endif
#if(PORT_FCLA_REG_CONFIG == STD_ON)
/* Pointer to array of structure containing details about FCLA registers */
P2CONST(struct STagTdd_Port_FCLARegs, AUTOMATIC, SPI_CONFIG_DATA)
pPortFCLARegs;
#endif
#if(PORT_DNFS_AVAILABLE == STD_ON)
/* The value of digital noise filter sampling clock control register */
uint16 usPortDNFSRegVal;
#endif
#if (PORT_NUM_PORT_GROUPS_AVAILABLE == STD_ON)
/* The Total number of PSR/PMSR registers configured */
uint8 ucNoOfNumPSRRegs;
/* The Total number of PMCSR registers configured */
uint8 ucNoOfNumPMCSRRegs;
/* The Total number of other 16-Bit registers configured */
uint8 ucNoOfNumOther16BitRegs;
/* The Total number of Numeric PODC registers configured */
uint8 ucNoOfNumPODCRegs;
/* The Total number of Numeric PDSC registers configured */
uint8 ucNoOfNumPDSCRegs;
/* The Total number of Numeric PUCC registers configured */
uint8 ucNoOfNumPUCCRegs;
/* The Total number of Numeric PSBC registers configured */
uint8 ucNoOfNumPSBCRegs;
/* The Total number of Function Control registers configured */
uint8 ucNoOfNumFuncCtrlRegs;
#if(PORT_PIN_STATUS_BACKUP == STD_ON)
/* The Total number of Numeric Restored registers configured */
uint8 ucNoOfNumRestoredRegs;
#endif
#endif
#if (PORT_ALPHA_PORT_GROUPS_AVAILABLE == STD_ON)
/* The Total number of PSR/PMSR registers configured */
uint8 ucNoOfAlphaPSRRegs;
/* The Total number of PMCSR registers configured */
uint8 ucNoOfAlphaPMCSRRegs;
/* The Total number of other 16-Bit registers configured */
uint8 ucNoOfAlphaOther16BitRegs;
/* The Total number of Alphabetic PODC registers configured */
uint8 ucNoOfAlphaPODCRegs;
/* The Total number of Alphabetic PDSC registers configured */
uint8 ucNoOfAlphaPDSCRegs;
/* The Total number of Alphabetic PUCC registers configured */
uint8 ucNoOfAlphaPUCCRegs;
/* The Total number of Alphabetic PSBC registers configured */
uint8 ucNoOfAlphaPSBCRegs;
/* The Total number of Function Control registers configured */
uint8 ucNoOfAlphaFuncCtrlRegs;
#if(PORT_PIN_STATUS_BACKUP == STD_ON)
/* The Total number of Alphabetic Restored registers configured */
uint8 ucNoOfAlphaRestoredRegs;
#endif
#endif
#if (PORT_JTAG_PORT_GROUPS_AVAILABLE == STD_ON)
/* The Total number of JTAG Function Control registers configured */
uint8 ucNoOfJFuncCtrlRegs;
#if (PORT_PIN_STATUS_BACKUP == STD_ON)
/* The Total number of JTAG Restored registers configured */
uint8 ucNoOfJtagRestoredRegs;
#endif
#endif
#if (PORT_SET_PIN_DIRECTION_API == STD_ON)
/* The Total number of Pins configured for Direction Change at run time. */
uint8 ucNoOfPinsDirChangeable;
#endif
#if (PORT_SET_PIN_MODE_API == STD_ON)
/* The Total number of Pins configured for Mode Change at run time. */
uint8 ucNoOfPinsModeChangeable;
#endif
#if(PORT_DNFA_REG_CONFIG == STD_ON)
/* The total number of DNFA noise elimination registers configured */
uint8 ucNoOfDNFARegs;
#endif
#if(PORT_FCLA_REG_CONFIG == STD_ON)
/* The total number of FCLA noise elimination regsisters configured */
uint8 ucNoOfFCLARegs;
#endif
}Port_ConfigType;
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#define PORT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, PORT_PUBLIC_CODE) Port_Init
(
P2CONST(Port_ConfigType, AUTOMATIC, PORT_APPL_CONST)ConfigPtr
);
#if (PORT_SET_PIN_DIRECTION_API == STD_ON)
extern FUNC(void, PORT_PUBLIC_CODE) Port_SetPinDirection
(
Port_PinType Pin, Port_PinDirectionType Direction
);
#endif
extern FUNC(void, PORT_PUBLIC_CODE) Port_RefreshPortDirection
(
void
);
#if (PORT_VERSION_INFO_API == STD_ON)
#define Port_GetVersionInfo(versioninfo) \
{ \
(versioninfo)->vendorID = (uint16)PORT_VENDOR_ID; \
(versioninfo)->moduleID = (uint16)PORT_MODULE_ID; \
(versioninfo)->instanceID = (uint8)PORT_INSTANCE_ID; \
(versioninfo)->sw_major_version = PORT_SW_MAJOR_VERSION; \
(versioninfo)->sw_minor_version = PORT_SW_MINOR_VERSION; \
(versioninfo)->sw_patch_version = PORT_SW_PATCH_VERSION; \
}
#endif /* End of (PORT_VERSION_INFO_API == STD_ON) */
#if (PORT_SET_PIN_MODE_API == STD_ON)
extern FUNC (void, PORT_PUBLIC_CODE) Port_SetPinMode
(
Port_PinType Pin, Port_PinModeType Mode
);
#endif
#define PORT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Global Data **
*******************************************************************************/
#define PORT_START_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
/* Structure for PORT Init configuration */
extern CONST(Port_ConfigType, PORT_CONST) Port_GstConfiguration[];
#define PORT_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
#endif /* PORT_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/Common/Compiler/Compiler_CX.h
/******************************************************************************/
#ifndef COMPILER_H
#define COMPILER_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Compiler_Cfg.h" /* Module specific memory and pointer */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define COMPILER_AR_MAJOR_VERSION 2
#define COMPILER_AR_MINOR_VERSION 0
#define COMPILER_AR_PATCH_VERSION 0
/*
* File version information
*/
#define COMPILER_SW_MAJOR_VERSION 3
#define COMPILER_SW_MINOR_VERSION 0
#define COMPILER_SW_PATCH_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*
* Compiler abstraction symbols
*/
#define INLINE inline
#define STATIC static
#define _INTERRUPT_
#ifndef _GREENHILLS_C_V850_
#define _GREENHILLS_C_V850_
#endif
#ifndef NULL_PTR
#define NULL_PTR ((void *)0)
#endif
/*pointer in FK4 is always 32bit*/
#ifndef FAR_PTR
#define FAR_PTR
#endif
/* AUTOMATIC used for the declaration of local pointers */
#define AUTOMATIC
/* TYPEDEF used for defining pointer types within type definitions */
#define TYPEDEF
/* Type definition of pointers to functions
rettype return type of the function
ptrclass defines the classification of the pointer's distance
fctname function name respectively name of the defined type
*/
#define P2FUNC(rettype, ptrclass, fctname) rettype (*fctname)
/* The compiler abstraction shall define the FUNC macro for the declaration and
definition of functions, that ensures correct syntax of function
declarations as required by a specific compiler. - used for API functions
rettype return type of the function
memclass classification of the function itself
*/
#define FUNC(type, memclass) memclass type
/* Pointer to constant data
ptrtype type of the referenced data
memclass classification of the pointer's variable itself
ptrclass defines the classification of the pointer's distance
*/
#define P2CONST(ptrtype, memclass, ptrclass) const ptrtype *
/* Pointer to variable data
ptrtype type of the referenced data
memclass classification of the pointer's variable itself
ptrclass defines the classification of the pointer's distance
*/
#define P2VAR(ptrtype, memclass, ptrclass) ptrtype *
/* Const pointer to variable data
ptrtype type of the referenced data
memclass classification of the pointer's variable itself
ptrclass defines the classification of the pointer's distance
*/
#define CONSTP2VAR(ptrtype, memclass, ptrclass) ptrtype * const
/* Const pointer to constant data
ptrtype type of the referenced data
memclass classification of the pointer's variable itself
ptrclass defines the classification of the pointer's distance
*/
#define CONSTP2CONST(ptrtype, memclass, ptrclass) const ptrtype * const
/* ROM constant
type type of the constant
memclass classification of the constant
*/
#define CONST(type, memclass) const type
/* RAM variables
type type of the variable
memclass classification of the variable
*/
#define VAR(type, memclass) type
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* COMPILER_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/APP/LEDPWMActOut/LEDPWMActOut.h
#ifndef __LEDPWMActOut_H
#define __LEDPWMActOut_H
#include "Std_Types.h"
void LEDPWMOutMainFunction(void);
#endif
<file_sep>/BSP/MCAL/Pwm/Pwm_LLDriver.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Pwm_LLDriver.h */
/* Version = 3.1.4 */
/* Date = 06-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of prototypes for internal functions. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 18-Aug-2009 : Initial version
* V3.0.1: 28-Oct-2009 : Updated as per the SCR 054
* extern function for Pwm_HW_Callback is added
* V3.1.0: 26-Jul-2011 : Ported for the DK4 variant.
* V3.1.2: 12-Jan-2012 :TEL have fixed The Issues reported by mantis id
* : #4246,#4210,#4207,#4206,#4202,#4259,#4257,#4248.
* V3.1.3: 05-Mar-2012 : Merged the fixes done for Fx4L PWM driver
* V3.1.4: 06-Jun-2012 : As per SCR 034, Compiler version is removed from
* Environment section.
*/
/******************************************************************************/
#ifndef PWM_LLDRIVER_H
#define PWM_LLDRIVER_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Pwm_LTTypes.h"
#include "Pwm_PBTypes.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define PWM_LLDRIVER_AR_MAJOR_VERSION PWM_AR_MAJOR_VERSION_VALUE
#define PWM_LLDRIVER_AR_MINOR_VERSION PWM_AR_MINOR_VERSION_VALUE
#define PWM_LLDRIVER_AR_PATCH_VERSION PWM_AR_PATCH_VERSION_VALUE
/* File version information */
#define PWM_LLDRIVER_SW_MAJOR_VERSION 3
#define PWM_LLDRIVER_SW_MINOR_VERSION 1
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (PWM_SW_MAJOR_VERSION != PWM_LLDRIVER_SW_MAJOR_VERSION)
#error "Pwm_LLDriver.h : Mismatch in Major Version"
#endif
#if (PWM_SW_MINOR_VERSION != PWM_LLDRIVER_SW_MINOR_VERSION)
#error "Pwm_LLDriver.h : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#define PWM_START_SEC_PRIVATE_CODE
#include "MemMap.h"
extern FUNC(void, PWM_PRIVATE_CODE) Pwm_HW_Init (void);
#if (PWM_DE_INIT_API == STD_ON)
extern FUNC(void, PWM_PRIVATE_CODE) Pwm_HW_DeInit (void);
#endif
#if (PWM_SET_OUTPUT_TO_IDLE_API == STD_ON)
extern FUNC (void, PWM_PRIVATE_CODE) Pwm_HW_SetOutputToIdle
(Pwm_ChannelType LddChannelId);
#endif
#if (PWM_GET_OUTPUT_STATE_API == STD_ON)
extern FUNC (Pwm_OutputStateType, PWM_PRIVATE_CODE) Pwm_HW_GetOutputState
(Pwm_ChannelType LddChannelId);
#endif
#if (PWM_SET_DUTY_CYCLE_API == STD_ON)
extern FUNC (void, PWM_PRIVATE_CODE) Pwm_HW_SetDutyCycle
(Pwm_ChannelType LddChannelId, uint16 LusDutyCycle);
extern FUNC (void, PWM_PRIVATE_CODE) Pwm_HW_SetDuty_FixedPeriodShifted
(Pwm_ChannelType LddChannelId, uint16 LusDutyCycle);
#endif
#if (PWM_SET_PERIOD_AND_DUTY_API == STD_ON)
extern FUNC (void, PWM_PRIVATE_CODE) Pwm_HW_SetPeriodAndDuty
(Pwm_ChannelType LddChannelId, Pwm_PeriodType LddPeriod, uint16 LusDutyCycle);
#endif
#if (PWM_NOTIFICATION_SUPPORTED == STD_ON)
extern FUNC(void, PWM_PRIVATE_CODE) Pwm_HW_Callback
(Pwm_ChannelType LucChannelIdx);
#endif
extern FUNC(Pwm_PeriodType, PWM_PRIVATE_CODE) Pwm_HW_CalculateDuty
(Pwm_PeriodType LddAbsolutePeriod, Pwm_PeriodType LddRelativeDuty,
uint8 LucTAUType);
#define PWM_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#endif /* PWM_LLDRIVER_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Gpt/Gpt_PBcfg.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Gpt_PBcfg.c */
/* Version = 3.0.0 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains post-build time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: : Initial version
*/
/******************************************************************************/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.0.11a
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_GPT_V304_130924_NEWCLEAPLUS.arxml
* GENERATED ON: 26 Sep 2013 - 12:55:15
*/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Gpt_PBTypes.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define GPT_PBCFG_C_AR_MAJOR_VERSION 2
#define GPT_PBCFG_C_AR_MINOR_VERSION 2
#define GPT_PBCFG_C_AR_PATCH_VERSION 0
/*
* File version information
*/
#define GPT_PBCFG_C_SW_MAJOR_VERSION 3
#define GPT_PBCFG_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (GPT_PBTYPES_AR_MAJOR_VERSION != GPT_PBCFG_C_AR_MAJOR_VERSION)
#error "Gpt_PBcfg.c : Mismatch in Specification Major Version"
#endif
#if (GPT_PBTYPES_AR_MINOR_VERSION != GPT_PBCFG_C_AR_MINOR_VERSION)
#error "Gpt_PBcfg.c : Mismatch in Specification Minor Version"
#endif
#if (GPT_PBTYPES_AR_PATCH_VERSION != GPT_PBCFG_C_AR_PATCH_VERSION)
#error "Gpt_PBcfg.c : Mismatch in Specification Patch Version"
#endif
#if (GPT_PBTYPES_SW_MAJOR_VERSION != GPT_PBCFG_C_SW_MAJOR_VERSION)
#error "Gpt_PBcfg.c : Mismatch in Major Version"
#endif
#if (GPT_PBTYPES_SW_MINOR_VERSION != GPT_PBCFG_C_SW_MINOR_VERSION)
#error "Gpt_PBcfg.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
#define GPT_START_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
/* Initialization of GPT Channel Configuration */
CONST(Gpt_ConfigType, GPT_CONST) Gpt_GstConfiguration[] =
{
/* Configuration Set 0 */
{
/* ulStartOfDbToc */
0x05D90300,
/* pChannelConfig */
&Gpt_GstChannelConfig[0],
/* pChannelTimerMap */
&Gpt_GaaTimerChIdx[0],
/* pChannelRamData */
&Gpt_GstChannelRamData[0]
}
};
#define GPT_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
#define GPT_START_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
/* Structure for each TAU Unit Configuration set */
/* CONST(Tdd_Gpt_TAUUnitConfigType,GPT_CONST) Gpt_GstTAUUnitConfig[]; */
/* Structure for each Config Set */
CONST(Tdd_Gpt_ChannelConfigType, GPT_CONST) Gpt_GstChannelConfig[] =
{
/* Index: 0 */
{
/* pBaseCtlAddress */
(P2VAR(void, AUTOMATIC, GPT_CONFIG_DATA)) 0xFF800000ul,
/* pCMORorCTLAddress */
(P2VAR(uint16, AUTOMATIC, GPT_CONFIG_DATA)) 0xFF800020,
/* pImrIntrCntlAddress */
(P2VAR(void, AUTOMATIC, GPT_CONFIG_DATA))0xFFFF6412ul,
/* pIntrCntlAddress */
(P2VAR(uint16, AUTOMATIC, GPT_CONFIG_DATA))0xFFFF6126ul,
/* usChannelMask */
0x0001,
/* usModeSettingsMask */
0x4000,
/* ddWakeupSourceId */
0x00,
/* ucNotificationConfig */
0x00,
/* ucImrMaskValue */
0xF7,
/* ucTimerUnitIndex */
0xFF,
/* uiTimerType */
GPT_HW_OSTM,
/* uiGptEnableWakeup */
GPT_FALSE,
/* uiGptChannelMode */
GPT_MODE_CONTINUOUS
}
};
/* Array to map channel to timer index */
CONST(uint8, GPT_CONST) Gpt_GaaTimerChIdx[157] =
{
/* Index: 0 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 1 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 2 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 3 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 4 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 5 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 6 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 7 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 8 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 9 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 10 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 11 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 12 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 13 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 14 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 15 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 16 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 17 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 18 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 19 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 20 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 21 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 22 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 23 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 24 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 25 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 26 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 27 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 28 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 29 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 30 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 31 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 32 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 33 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 34 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 35 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 36 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 37 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 38 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 39 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 40 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 41 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 42 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 43 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 44 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 45 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 46 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 47 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 48 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 49 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 50 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 51 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 52 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 53 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 54 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 55 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 56 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 57 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 58 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 59 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 60 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 61 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 62 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 63 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 64 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 65 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 66 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 67 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 68 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 69 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 70 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 71 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 72 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 73 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 74 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 75 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 76 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 77 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 78 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 79 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 80 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 81 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 82 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 83 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 84 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 85 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 86 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 87 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 88 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 89 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 90 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 91 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 92 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 93 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 94 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 95 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 96 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 97 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 98 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 99 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 100 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 101 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 102 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 103 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 104 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 105 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 106 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 107 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 108 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 109 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 110 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 111 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 112 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 113 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 114 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 115 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 116 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 117 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 118 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 119 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 120 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 121 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 122 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 123 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 124 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 125 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 126 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 127 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 128 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 129 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 130 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 131 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 132 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 133 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 134 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 135 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 136 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 137 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 138 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 139 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 140 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 141 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 142 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 143 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 144 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 145 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 146 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 147 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 148 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 149 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 150 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 151 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 152 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 153 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 154 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 155 */
GPT_CHANNEL_UNCONFIGURED,
/* Index: 156 */
0x00
};
#define GPT_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
#define GPT_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* RAM Allocation of Channel data */
VAR(Tdd_Gpt_ChannelRamData,GPT_NOINIT_DATA) Gpt_GstChannelRamData[1];
#define GPT_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/SERV/Os/Sys_AlarmHandler.h
/*****************************************************************************
| File Name: ApiAlarmHandler.h
|
| Description: Alarm Handler Header
|
|-----------------------------------------------------------------------------
| PATAC Confidential
|-----------------------------------------------------------------------------
|
| This software is copyright is proprietary of
| Pan Asia Technical Automotive Company(PATAC).
| All rights are reserved by PATAC.
|
|-----------------------------------------------------------------------------
| A U T H O R I D E N T I T Y
|-----------------------------------------------------------------------------
| Initials Name Company
| -------- -------------------- ---------------------------------------
| FRED <NAME> PATAC
|
|-----------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|-----------------------------------------------------------------------------
| Date Version Author Description
| ---------- -------- ------ ----------------------------------------------
| 2009-1-30 01.00.00 FRED Creation
| 2009-8-10 01.01.00 FRED Add ContinueKERNEL_Alarm, ReStartKERNEL_Alarm;
|****************************************************************************/
#ifndef __API_ALARM_HANDLER_H__
#define __API_ALARM_HANDLER_H__
#include "platform_types.h"
#define ADOPT_UINT16_FOR_ALARM_ID
#if defined(ADOPT_UINT8_FOR_ALARM_ID) && defined(ADOPT_UINT16_FOR_ALARM_ID)
#error "Can't define both type for Alarm ID"
#elif defined ADOPT_UINT8_FOR_ALARM_ID
#define AlarmIDType UINT8
#elif defined ADOPT_UINT16_FOR_ALARM_ID
#define AlarmIDType UINT16
#else
#error "A type must be defined for Alarm ID"
#endif
#ifdef __16_BIT_MCU
#define AlmTickType UINT16 /*for 16bit data, the max value is about 1minute,when 1 tick is 1ms*/
#elif defined __32_BIT_MCU
#define AlmTickType UINT32 /*for 32bit data, the max value is about 49day,when 1 tick is 1ms*/
#else
#error "can't support this type of MCU"
#endif
#define EN_HASH
#define EN_ELAPSTM
#define EN_DEBUG
/*macro function define*/
#define StartTm(event , duration , cycle) StartGeneralTm(event , duration , cycle, UNIT_MS)
#define StartTm_L(event , duration , cycle) StartGeneralTm(event , duration , cycle, UNIT_0P1S)
#define StopTm(event) StopGeneralTm(event)
#define StopTm_L(event) StopGeneralTm(event)
#define TmRmnd(event) TmRmndGeneral(event, UNIT_MS)
#define TmRmnd_L(event) TmRmndGeneral(event, UNIT_0P1S)
#ifdef EN_ELAPSTM
#define TmElspd(event) TmElspdGeneral(event, UNIT_MS)
#define TmElspd_L(event) TmElspdGeneral(event, UNIT_0P1S)
#endif
#define IsTmActv(event) IsTmActvGeneral(event)
#define IsTmActv_L(event) IsTmActvGeneral(event)
typedef enum
{
ONE_SNAPSHOT_ALARM = 0, /**< Indicates the alarm is one snapshot. */
CYCLIC_ALARM /* Indicates the alarm is cyclic. */
}ALARM_TYPE;
typedef enum
{
UNIT_MS = 0,/*unit in millisecond*/
UNIT_0P1S,/*unit in 0.1second*/
UNIT_NUM
}tALARM_UNIT;
#ifdef EN_DEBUG
enum
{
ALMERR_OK = 0,
ALMERR_ALMOVFL,
ALMERR_NOALLOCATEALM,
};
extern UINT8 AlmErrCode;
extern UINT8 AlmMaxUseNum;
extern UINT8 AlmCurUseNum;
#endif
/**
* Function declaration.
*/
void SysSrvc_InitFreeAlmQ(void);
void StartGeneralTm( const UINT16 event , const UINT16 duration , const BOOL cycle ,const UINT8 unit);
void StopGeneralTm( const UINT16 event );
UINT16 TmRmndGeneral( const UINT16 event , const UINT8 unit);
#ifdef EN_ELAPSTM
UINT16 TmElspdGeneral( const UINT16 event ,const UINT8 unit);
#endif
BOOL IsTmActvGeneral( const UINT16 event );
#endif
<file_sep>/BSP/Include/SchM_PduR.h
#ifndef SCHM_PDUR_H
#define SCHM_PDUR_H
#include "SchM.h"
#include "SchM_Types.h"
#include "SchM_Cfg.h"
#define PDUR_EXCLUSIVE_AREA_0 SCHM_EA_SUSPENDALLINTERRUPTS
# define SchM_Enter_PduR(ExclusiveArea) \
SCHM_ENTER_EXCLUSIVE(ExclusiveArea)
# define SchM_Exit_PduR(ExclusiveArea) \
SCHM_EXIT_EXCLUSIVE(ExclusiveArea)
#endif /* SCHM_PDUR_H */
<file_sep>/BSP/MCAL/Icu/Icu_LLDriver.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Icu_LLDriver.c */
/* Version = 3.0.10a */
/* Date = 04-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains Low Level function implementations of ICU Driver */
/* Component */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 26-Aug-2009 : Initial version
*
* V3.0.1: 29-Oct-2009 : As per SCR 074, unnecessary MISRA messages
* are removed.
*
* V3.0.2: 05-Nov-2009 : As per SCR 088, I/O structure is updated to have
* separate base address for USER and OS registers.
*
* V3.0.3: 08-Dec-2009 : As per SCR 154, name of global pointer for
* previous input structure is corrected and
* Icu_HWSetMode() is updated.
*
* V3.0.4: 25-Feb-2010 : As per SCR 192, following changes are done:
* 1. The structure 'Tdd_Icu_ExtIntpConfigType' is
* removed from the function Icu_HWSetActivation.
* 2. The edge counting functionality for TAUJ
* channel is removed from Icu_HWSetActivation
* function.
*
* V3.0.5: 17-Mar-2010 : As per SCR 230, comments of #endif are updated.
*
* V3.0.6: 28-Jun-2010 : As per SCR 286, following changes are done:
* 1. All the functions are modified to support the
* use of Timer Array Unit B.
* 2. The interrupts are enabled/disabled using
* IMR registers.
*
* V3.0.7: 20-Jul-2010 : As per SCR 308, the functions Icu_HWInit,
* Icu_HWDeInit Icu_HWSetActivation and Icu_TimerIsr
* are updated with pre-compile options for
* timer channels.
*
* V3.0.8: 26-Aug-2010 : As per SCR 335, following changes are done:
* 1. The Active time and Period time
* are initialized to zero in
* Icu_HWSignalMeasurementInit.
* 2. The check for valid data in case of
* signal measurement mode is removed from the function
* Icu_ServiceSignalMeasurement.
* 3. The functions Icu_HWInit,
* Icu_HWStartCountMeasurement and
* Icu_HWStopCountMeasurement are updated to enable
* channel interrupts.
*
* V3.0.9: 03-Jan-2011 : As per SCR 388, in Icu_HWResetEdgeCount function
* check to call Icu_HWStartCountMeasurement is
* removed.
*
* V3.0.10: 24-Jun-2011 : As per SCR 477, following changes are done:
* 1. Access size is updated for registers
* TAUAnBRS, TAUJnBRS, TAUJnTS, TAUJnTT, TAUJnTE,
* TAUABnCMURm, TAUABnCSRm, TAUABnCSCm, TAUJnCMURm,
* TAUJnCSRm, TAUJnCSCm.
* 2. Data type of local variable LusOverflowFlag is
* changed to LucOverflowFlag.
*
* V3.0.10a: 04-Oct-2011 : As per MANTIS #3551, following changes are done:
* 1. The function Icu_HWInit is updated to clear
* the interrupt request flag before enabling
* interrupt.
* 2. The functions Icu_HWSetMode and
* Icu_HWStartCountMeasurement are updated to
* disable interrupt and clear the interrupt
* request flag before enabling interrupt.
* As per MANTIS #3708, following changes are done:
* 1. The function Icu_HWSignalMeasurementInit is
* updated to reset the ulPrevSignalActiveTime
* 2. The function Icu_ServiceSignalMeasurememt is
* updated to set active time when measurement
* property is ICU_PERIOD_TIME.
* As per MANTIS #3904, following changes are done:
* 1. The functions Icu_ServiceSignalMeasurement and
* Icu_TimerIsr are updated to clear the Overflow
* flag via the register CSCm.
* As per MANTIS #4016, Icu_HWDeInit is updated to
* swap the reset operation between CDRm and CMORm.
* As per MANTIS #4019, Icu_ServiceSignalMeasurement
* is updated to return the captured value as maximum
* count when overflow occurs.
* As per MANTIS #4019, Icu_TimerIsr is updated to
* return always counted capture value without
* considering overflow.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Icu.h"
#include "Icu_PBTypes.h"
#include "Icu_LTTypes.h"
#include "Icu_LLDriver.h"
#include "Icu_Ram.h"
#if(ICU_REPORT_WAKEUP_SOURCE == STD_ON)
#include "EcuM_Cbk.h"
#endif
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
#include "SchM_Icu.h"
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define ICU_LLDRIVER_C_AR_MAJOR_VERSION ICU_AR_MAJOR_VERSION_VALUE
#define ICU_LLDRIVER_C_AR_MINOR_VERSION ICU_AR_MINOR_VERSION_VALUE
#define ICU_LLDRIVER_C_AR_PATCH_VERSION ICU_AR_PATCH_VERSION_VALUE
/* File version information */
#define ICU_LLDRIVER_C_SW_MAJOR_VERSION 3
#define ICU_LLDRIVER_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (ICU_LLDRIVER_AR_MAJOR_VERSION != ICU_LLDRIVER_C_AR_MAJOR_VERSION)
#error "Icu_LLDriver.c : Mismatch in Specification Major Version"
#endif
#if (ICU_LLDRIVER_AR_MINOR_VERSION != ICU_LLDRIVER_C_AR_MINOR_VERSION)
#error "Icu_LLDriver.c : Mismatch in Specification Minor Version"
#endif
#if (ICU_LLDRIVER_AR_PATCH_VERSION != ICU_LLDRIVER_C_AR_PATCH_VERSION)
#error "Icu_LLDriver.c : Mismatch in Specification Patch Version"
#endif
#if (ICU_LLDRIVER_SW_MAJOR_VERSION != ICU_LLDRIVER_C_SW_MAJOR_VERSION)
#error "Icu_LLDriver.c : Mismatch in Major Version"
#endif
#if (ICU_LLDRIVER_SW_MINOR_VERSION != ICU_LLDRIVER_C_SW_MINOR_VERSION)
#error "Icu_LLDriver.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Icu_HWEdgeCountingInit
**
** Service ID : None
**
** Description : This service initializes the channel configured for
** edge counting mode.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non-Reentrant
**
** Input Parameters : LpChannelConfig, LpTimerChannelConfig
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Icu_GpEdgeCountData
**
** Function(s) invoked:
** None
*******************************************************************************/
#define ICU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, ICU_PRIVATE_CODE) Icu_HWEdgeCountingInit
(P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)LpChannelConfig,
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig)
{
/* Pointer definition for Edge Count Channel properties */
P2CONST(Tdd_Icu_EdgeCountConfigType, AUTOMATIC, ICU_CONFIG_CONST) LpEdgeCount;
/* Local variable used to store the default active edge */
uint8 LucDefaultEdge;
/* Local variable used to store the Ram index */
uint8 LucIndex;
/* Load the default edge */
LucDefaultEdge = LpChannelConfig->uiIcuDefaultStartEdge;
/* Read the edge count channel properties and the ram index */
LpEdgeCount = LpTimerChannelConfig->pChannelProp;
LucIndex = LpEdgeCount->ucEdgeCounterRamIndex;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Store the default active as channel activation edge */
(Icu_GpEdgeCountData + LucIndex)->ucActiveEdge = LucDefaultEdge;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Reset the edge count overflow flag */
(Icu_GpEdgeCountData + LucIndex)->uiTimerOvfFlag = ICU_FALSE;
}
#define ICU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Icu_HWTimestampInit
**
** Service ID : None
**
** Description : This service is used to initialize the channel
** configured for Timestamp Measurement mode.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non-Reentrant
**
** Input Parameters : LpChannelConfig, LpTimerChannelConfig
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Icu_GpTimeStampData
**
** Function(s) invoked:
** None
*******************************************************************************/
#define ICU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, ICU_PRIVATE_CODE) Icu_HWTimestampInit
(P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)LpChannelConfig,
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig)
{
/* Pointer definition for Timestamp Channel properties */
P2CONST(Tdd_Icu_TimeStampMeasureConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimestamp;
/* Local variable used to store the channel index */
uint8 LucIndex;
/* Load the Timestamp Channel pointer */
LpTimestamp = LpTimerChannelConfig->pChannelProp;
LucIndex = LpTimestamp->ucTimeStampRamDataIndex;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Read the default active edge and store into RAM */
(Icu_GpTimeStampData + LucIndex)->ucActiveEdge =
LpChannelConfig->uiIcuDefaultStartEdge;
}
#define ICU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Icu_HWSignalMeasurementInit
**
** Service ID : None
**
** Description : This service initializes the channel configured in
** Signal Measurement Mode.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non-Reentrant
**
** Input Parameters : LpTimerChannelConfig
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Icu_GpSignalMeasurementData
**
** Function(s) invoked:
** None
*******************************************************************************/
#define ICU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, ICU_PRIVATE_CODE) Icu_HWSignalMeasurementInit
(P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig)
{
/* Pointer definition for Signal Measurement Channel properties */
P2CONST(Tdd_Icu_SignalMeasureConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpSignalMeasureChannel;
/* Local variable used to store the Timer Instance */
uint8 LucIndex;
/* Load the Signal Measurement Channel pointer */
LpSignalMeasureChannel = LpTimerChannelConfig->pChannelProp;
/* Read the Signal Measurement Channel ram index */
LucIndex = LpSignalMeasureChannel->ucSignalMeasureRamDataIndex;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Initialize the Signal Active time to zero */
(Icu_GpSignalMeasurementData + LucIndex)->ulSignalActiveTime = ICU_ZERO;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Initialize the Signal Period time to zero */
(Icu_GpSignalMeasurementData + LucIndex)->ulSignalPeriodTime = ICU_ZERO;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Initialize the Signal Period time to zero */
(Icu_GpSignalMeasurementData + LucIndex)->ulPrevSignalActiveTime = ICU_ZERO;
}
#define ICU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Icu_HWInit
**
** Service ID : None
**
** Description : This service initializes the hardware for all the
** configured channels based on the measurement mode.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non-Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Icu_GpChannelConfig, Icu_GpTimerChannelConfig,
** Icu_GpTAUUnitConfig, Icu_GpPreviousInputConfig
**
** Function(s) invoked:
** Icu_HWSetActivation, Icu_HWEdgeCountingInit,
** Icu_HWTimestampInit, Icu_HWSignalMeasurementInit
*******************************************************************************/
#define ICU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, ICU_PRIVATE_CODE) Icu_HWInit(void)
{
/* Defining a pointer to the channel configuration parameters */
P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpChannelConfig;
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)\
||(ICU_TAUB_UNIT_USED == STD_ON))
/* Defining a pointer to the timer channel configuration parameters */
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig;
#endif
#if(((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)\
||(ICU_TAUB_UNIT_USED == STD_ON)) && (ICU_PRESCALER_CONFIGURED))
/* Defining a pointer to the TAU configuration parameters */
P2CONST(Tdd_Icu_TAUUnitConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTAUUnitConfig;
#endif
#if(ICU_PREVIOUS_INPUT_USED == STD_ON)
/* Defining a pointer to the previous input configurtaion parameters */
P2CONST(Tdd_IcuPreviousInputUseType, AUTOMATIC, ICU_CONFIG_CONST)
LpPreviousInputConfig;
/* Defining a pointer to the Interrupt Control Register */
P2VAR(uint8, AUTOMATIC,ICU_CONFIG_DATA) LpPrevInputCntrlReg;
#endif
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) && \
(ICU_PRESCALER_CONFIGURED))
/* Pointer pointing to the TAUA/B Unit control registers */
P2VAR(Tdd_Icu_TAUABUnitOsRegs, AUTOMATIC, ICU_CONFIG_DATA) LpTAUABUnitOsReg;
#endif
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Pointer pointing to the TAUA/B channel control registers */
P2VAR(Tdd_Icu_TAUABChannelUserRegs, AUTOMATIC, ICU_CONFIG_DATA)
LpTAUABChannelReg;
#endif
#if((ICU_TAUJ_UNIT_USED == STD_ON) && (ICU_PRESCALER_CONFIGURED))
/* Pointer pointing to the TAUJ Unit control registers */
P2VAR(Tdd_Icu_TAUJUnitOsRegs, AUTOMATIC, ICU_CONFIG_DATA) LpTAUJUnitOsReg;
#endif
#if(ICU_TAUJ_UNIT_USED == STD_ON)
/* Pointer pointing to the TAUJ channel control registers */
P2VAR(Tdd_Icu_TAUJChannelUserRegs, AUTOMATIC, ICU_CONFIG_DATA)
LpTAUJChannelReg;
#endif
/* Defining a pointer to the Interrupt Control Register */
P2VAR(uint16, AUTOMATIC,ICU_CONFIG_DATA) LpIntrCntlReg;
/* Defining a pointer to the Interrupt Mask Register */
P2VAR(uint8, AUTOMATIC,ICU_CONFIG_DATA) LpImrIntpCntrlReg;
#if(ICU_EDGE_DETECTION_API == STD_ON)
/* Local variable to store the default activation edge */
Icu_ActivationType LucDefaultActivation;
#endif /* End of (ICU_EDGE_DETECTION_API == STD_ON) */
/* Local variable to store the measurement mode of a channel */
Icu_MeasurementModeType LddMeasurementMode;
uint8 LucCnt;
/* Update the channel configuration pointer to point to the current channel */
LpChannelConfig = Icu_GpChannelConfig;
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON) \
|| (ICU_TAUB_UNIT_USED == STD_ON))
LpTimerChannelConfig = Icu_GpTimerChannelConfig;
#endif
#if(((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)\
||(ICU_TAUB_UNIT_USED == STD_ON)) && (ICU_PRESCALER_CONFIGURED))
/* Update the TAU configuration pointer to point to the current TAU */
LpTAUUnitConfig = Icu_GpTAUUnitConfig;
#endif
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Critical Section */
SchM_Enter_Icu (ICU_CHANNEL_DATA_PROTECTION);
#endif /* End of (ICU_CRITICAL_SECTION_PROTECTION == STD_ON) */
#if(ICU_TIMER_CH_CONFIGURED == STD_ON)
#if(ICU_PRESCALER_CONFIGURED == STD_ON)
if(LpTAUUnitConfig->uiConfigurePrescaler == ICU_ONE)
{
for(LucCnt = ICU_ZERO; LucCnt < ICU_TOTAL_TAU_UNITS_CONFIGURED; LucCnt++)
{
#if(((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON))\
||(ICU_TAUB_UNIT_USED == STD_ON))
if((LpTAUUnitConfig->ucIcuUnitType == ICU_HW_TAUA) ||
(LpTAUUnitConfig->ucIcuUnitType == ICU_HW_TAUB))
#endif
{
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Initialize pointer to the base address of the current timer unit */
LpTAUABUnitOsReg = (P2VAR(Tdd_Icu_TAUABUnitOsRegs, AUTOMATIC,
ICU_CONFIG_CONST))LpTAUUnitConfig->pTAUnitOsCntlRegs;
/* Set the values of prescaler and baud rate to
* TPS and BRS registers respectively
*/
LpTAUABUnitOsReg->usTAUABnTPS = LpTAUUnitConfig->usPrescaler;
#if(ICU_TAUA_UNIT_USED == STD_ON)
if(LpTAUUnitConfig->ucIcuUnitType == ICU_HW_TAUA)
{
LpTAUABUnitOsReg->ucTAUAnBRS = LpTAUUnitConfig->ucBaudRate;
}
#endif
#endif /* End of
((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) */
}
#if(((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON))\
||(ICU_TAUB_UNIT_USED == STD_ON))
else /* (LpTAUUnitConfig->ucIcuUnitType == ICU_HW_TAUJ) */
#endif
{
#if(ICU_TAUJ_UNIT_USED == STD_ON)
/* Initialize pointer to the base address of the current timer unit */
LpTAUJUnitOsReg = (P2VAR(Tdd_Icu_TAUJUnitOsRegs, AUTOMATIC,
ICU_CONFIG_CONST))LpTAUUnitConfig->pTAUnitOsCntlRegs;
/* Set the values of prescaler and baud rate to
* TPS and BRS registers respectively
*/
LpTAUJUnitOsReg->usTAUJnTPS = LpTAUUnitConfig->usPrescaler;
LpTAUJUnitOsReg->ucTAUJnBRS = LpTAUUnitConfig->ucBaudRate;
#endif /* End of (ICU_TAUJ_UNIT_USED == STD_ON) */
}
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpTAUUnitConfig++;
} /* End of TAU units for loop */
}
#endif /* End of (ICU_PRESCALER_CONFIGURED == STD_ON) */
#endif /* End of (ICU_TIMER_CH_CONFIGURED == STD_ON) */
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Critical Section */
SchM_Exit_Icu (ICU_CHANNEL_DATA_PROTECTION);
#endif /* End of (ICU_CRITICAL_SECTION_PROTECTION == STD_ON) */
#if(ICU_PREVIOUS_INPUT_USED == STD_ON)
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Critical Section */
SchM_Enter_Icu (ICU_CHANNEL_DATA_PROTECTION);
#endif
/* Update the previous input use pointer to point to the current channel */
LpPreviousInputConfig = Icu_GpPreviousInputConfig;
for(LucCnt = ICU_ZERO; LucCnt < ICU_TOTAL_UNITS_FOR_PREVINPUT; LucCnt++)
{
LpPrevInputCntrlReg = LpPreviousInputConfig->pPreviousInputCntlRegs;
*LpPrevInputCntrlReg |= LpPreviousInputConfig->ucPreviousInputMask;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpPreviousInputConfig++;
}
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Critical Section */
SchM_Exit_Icu (ICU_CHANNEL_DATA_PROTECTION);
#endif /* End of (ICU_CRITICAL_SECTION_PROTECTION == STD_ON)*/
#endif /* End of (ICU_PREVIOUS_INPUT_USED == STD_ON) */
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Critical Section */
SchM_Enter_Icu (ICU_CHANNEL_DATA_PROTECTION);
#endif /* end of (ICU_CRITICAL_SECTION_PROTECTION == STD_ON) */
for(LucCnt = ICU_ZERO; LucCnt < ICU_MAX_CHANNEL; LucCnt++)
{
/* Read the channel's measurement mode */
LddMeasurementMode = (Icu_MeasurementModeType)
(LpChannelConfig->uiIcuMeasurementMode);
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
if((LpChannelConfig->uiIcuChannelType == ICU_HW_TAUA) ||
(LpChannelConfig->uiIcuChannelType == ICU_HW_TAUB))
#endif
{
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Initialize pointer to the base address of the current channel */
LpTAUABChannelReg =
(P2VAR(Tdd_Icu_TAUABChannelUserRegs, AUTOMATIC, ICU_CONFIG_CONST))
LpChannelConfig->pCntlRegs;
/* If the measurement mode is edge counter, put the defined
count value to CDR Register */
if(LddMeasurementMode == ICU_MODE_EDGE_COUNTER)
{
LpTAUABChannelReg->usTAUABnCDRm = ICU_TAUAB_START_DWNCNT_VAL;
}
/* Read the value of Channel Mode OS Register configured */
*(LpTimerChannelConfig->pCMORRegs) =
LpTimerChannelConfig->usChannelModeOSRegSettings;
/* Read the value of Channel Mode User Register configured */
LpTAUABChannelReg->ucTAUABnCMURm = \
LpTimerChannelConfig->ucChannelModeUserRegSettings;
/* Reset Channel Status Clear Trigger Register */
LpTAUABChannelReg->ucTAUABnCSCm = ICU_ONE;
#endif /* End of
((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) */
}
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
else if(LpChannelConfig->uiIcuChannelType == ICU_HW_TAUJ)
#endif
{
#if(ICU_TAUJ_UNIT_USED == STD_ON)
/* Initialize pointer to the base address of the current channel */
LpTAUJChannelReg =
(P2VAR(Tdd_Icu_TAUJChannelUserRegs, AUTOMATIC, ICU_CONFIG_CONST))
LpChannelConfig->pCntlRegs;
/* If the measurement mode is edge counter, put the defined
* count value to CDR Register
*/
if(LddMeasurementMode == ICU_MODE_EDGE_COUNTER)
{
LpTAUJChannelReg->ulTAUJnCDRm = ICU_TAUJ_START_DWNCNT_VAL;
}
/* Read the value of Channel Mode OS Register configured */
*(LpTimerChannelConfig->pCMORRegs) =
LpTimerChannelConfig->usChannelModeOSRegSettings;
/* Read the value of Channel Mode User Register configured */
LpTAUJChannelReg->ucTAUJnCMURm =
LpTimerChannelConfig->ucChannelModeUserRegSettings;
/* Reset Channel Status Clear Trigger Register */
LpTAUJChannelReg->ucTAUJnCSCm = ICU_ONE;
#endif /* End of (ICU_TAUJ_UNIT_USED == STD_ON) */
}
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
else
{
/* To avoid MISRA warning */
}
#endif
switch(LddMeasurementMode)
{
#if (ICU_EDGE_DETECTION_API == STD_ON)
/* Edge Detection Mode */
case ICU_MODE_SIGNAL_EDGE_DETECT:
{
/* Clear the interrupt request flag */
LpIntrCntlReg = LpChannelConfig->pIntrCntlRegs;
*(LpIntrCntlReg) &= ICU_CLEAR_INT_REQUEST_FLAG;
/* Enabling the Interrupt processing */
LpImrIntpCntrlReg = LpChannelConfig->pImrIntrCntlRegs;
*(LpImrIntpCntrlReg) &= LpChannelConfig->ucImrMaskValue;
/* Read the default edge configured for the channel */
LucDefaultActivation = (Icu_ActivationType)
LpChannelConfig->uiIcuDefaultStartEdge;
/* Configure external interrupt for the active edge */
Icu_HWSetActivation(LucCnt, LucDefaultActivation);
break;
}
#endif /* End of (ICU_EDGE_DETECTION_API == STD_ON) */
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUB_UNIT_USED == STD_ON))
/* Edge Counter Mode */
case ICU_MODE_EDGE_COUNTER:
{
/* Configure the channel in Edge Counter Mode */
Icu_HWEdgeCountingInit(LpChannelConfig, LpTimerChannelConfig);
break;
}
#endif
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
|| (ICU_TAUJ_UNIT_USED == STD_ON))
/* Timestamp Mode */
case ICU_MODE_TIMESTAMP:
{
/* Configure the channel in Timestamp Mode */
Icu_HWTimestampInit(LpChannelConfig, LpTimerChannelConfig);
break;
}
#endif
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
|| (ICU_TAUJ_UNIT_USED == STD_ON))
/* Signal Measurement Mode */
case ICU_MODE_SIGNAL_MEASUREMENT:
{
/* Configure the channel in Signal Measurement Mode */
Icu_HWSignalMeasurementInit(LpTimerChannelConfig);
break;
}
#endif
default:
{
/* Execution should never get here */
break;
}
} /* End of switch case */
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the channel pointer */
LpChannelConfig++;
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
|| (ICU_TAUJ_UNIT_USED == STD_ON))
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the timer channel pointer */
LpTimerChannelConfig++;
#endif
/* End of (((ICU_TAUA_UNIT_USED == STD_ON) \
|| (ICU_TAUB_UNIT_USED == STD_ON)) || (ICU_TAUJ_UNIT_USED == STD_ON))
*/
} /* End of channels for loop */
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Critical Section */
SchM_Exit_Icu (ICU_CHANNEL_DATA_PROTECTION);
#endif /* End of (ICU_CRITICAL_SECTION_PROTECTION == STD_ON) */
}
#define ICU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#if(ICU_DE_INIT_API == STD_ON)
/*******************************************************************************
** Function Name : Icu_HWDeInit
**
** Service ID : None
**
** Description : This service De-Initializes the hardware for all the
** configured channels based on the measurement mode.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non-Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Icu_GpChannelConfig, Icu_GpTimerChannelConfig,
** Icu_GpTAUUnitConfig, Icu_GpPreviousInputConfig
**
** Function(s) invoked:
** None
*******************************************************************************/
#define ICU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, ICU_PRIVATE_CODE) Icu_HWDeInit(void)
{
/* Defining a pointer to the channel configuration parameters */
P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpChannelConfig;
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)\
||(ICU_TAUB_UNIT_USED == STD_ON))
/* Defining a pointer to the timer channel configuration parameters */
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig;
#endif
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Pointer pointing to the TAUA/B channel control registers */
P2VAR(Tdd_Icu_TAUABChannelUserRegs, AUTOMATIC, ICU_CONFIG_DATA)
LpTAUABChannelReg;
#endif
#if(ICU_TAUJ_UNIT_USED == STD_ON)
/* Pointer pointing to the TAUJ channel control registers */
P2VAR(Tdd_Icu_TAUJChannelUserRegs, AUTOMATIC, ICU_CONFIG_DATA)
LpTAUJChannelReg;
#endif
/* Defining a pointer to the Interrupt Control Register */
P2VAR(uint8, AUTOMATIC,ICU_CONFIG_DATA) LpImrIntpCntrlReg;
#if(ICU_PREVIOUS_INPUT_USED == STD_ON)
/* Defining a pointer to the previous input configurtaion parameters */
P2CONST(Tdd_IcuPreviousInputUseType, AUTOMATIC, ICU_CONFIG_CONST)
LpPreviousInputConfig;
/* Defining a pointer to the Interrupt Control Register */
P2VAR(uint8, AUTOMATIC,ICU_CONFIG_DATA) LpPrevInputCntrlReg;
#endif
#if(ICU_EDGE_DETECTION_API == STD_ON)
/* Defining a pointer to point to the External Interrupt registers */
P2VAR(uint8, AUTOMATIC,ICU_CONFIG_DATA) LpExtIntpRegs;
#endif /* End of (ICU_EDGE_DETECTION_API == STD_ON) */
#if(ICU_EDGE_DETECTION_API == STD_ON)
/* Local variable to store the measurement mode of a channel */
Icu_MeasurementModeType LddMeasurementMode;
#endif
uint8 LucCnt;
/* Update the channel configuration pointer to point to the current channel */
LpChannelConfig = Icu_GpChannelConfig;
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)\
||(ICU_TAUB_UNIT_USED == STD_ON))
LpTimerChannelConfig = Icu_GpTimerChannelConfig;
#endif
#if(ICU_PREVIOUS_INPUT_USED == STD_ON)
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Critical Section */
SchM_Enter_Icu (ICU_CHANNEL_DATA_PROTECTION);
#endif /* End of (ICU_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* Update the previous input use pointer to point to the current channel */
LpPreviousInputConfig = Icu_GpPreviousInputConfig;
for(LucCnt = ICU_ZERO; LucCnt < ICU_TOTAL_UNITS_FOR_PREVINPUT; LucCnt++)
{
LpPrevInputCntrlReg = LpPreviousInputConfig->pPreviousInputCntlRegs;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
*LpPrevInputCntrlReg &= ~LpPreviousInputConfig->ucPreviousInputMask;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpPreviousInputConfig++;
}
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Critical Section */
SchM_Exit_Icu (ICU_CHANNEL_DATA_PROTECTION);
#endif /* End of (ICU_CRITICAL_SECTION_PROTECTION == STD_ON) */
#endif /* End of (ICU_PREVIOUS_INPUT_USED == STD_ON) */
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Critical Section */
SchM_Enter_Icu (ICU_CHANNEL_DATA_PROTECTION);
#endif /* End of (ICU_CRITICAL_SECTION_PROTECTION == STD_ON) */
for (LucCnt = ICU_ZERO; LucCnt < ICU_MAX_CHANNEL; LucCnt++)
{
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
if((LpChannelConfig->uiIcuChannelType == ICU_HW_TAUA)
|| (LpChannelConfig->uiIcuChannelType == ICU_HW_TAUB))
#endif
{
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Initialize pointer to the base address of the current channel */
LpTAUABChannelReg =
(P2VAR(Tdd_Icu_TAUABChannelUserRegs, AUTOMATIC, ICU_CONFIG_CONST))
LpChannelConfig->pCntlRegs;
/* Reset the value of Channel Mode OS Register */
*(LpTimerChannelConfig->pCMORRegs) = ICU_WORD_ZERO;
/* Reset the value of Channel Data Register */
LpTAUABChannelReg->usTAUABnCDRm = ICU_WORD_ZERO;
/* Reset the value of Channel Mode User Register */
LpTAUABChannelReg->ucTAUABnCMURm = ICU_ZERO;
/* Reset Channel Status Clear Trigger Register */
LpTAUABChannelReg->ucTAUABnCSCm = ICU_ZERO;
#endif
}
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
else if(LpChannelConfig->uiIcuChannelType == ICU_HW_TAUJ)
#endif
{
#if(ICU_TAUJ_UNIT_USED == STD_ON)
/* Initialize pointer to the base address of the current channel */
LpTAUJChannelReg =
(P2VAR(Tdd_Icu_TAUJChannelUserRegs, AUTOMATIC, ICU_CONFIG_CONST))
LpChannelConfig->pCntlRegs;
/* Reset the value of Channel Mode OS Register */
*(LpTimerChannelConfig->pCMORRegs) = ICU_WORD_ZERO;
/* Reset the value of Channel Data Register */
LpTAUJChannelReg->ulTAUJnCDRm = ICU_DOUBLE_ZERO;
/* Reset the value of Channel Mode User Register */
LpTAUJChannelReg->ucTAUJnCMURm = ICU_ZERO;
/* Reset Channel Status Clear Trigger Register */
LpTAUJChannelReg->ucTAUJnCSCm = ICU_ZERO;
#endif
}
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
else
{
/* To avoid MISRA warning */
}
#endif
/* Disabling the Interrupt processing */
LpImrIntpCntrlReg = LpChannelConfig->pImrIntrCntlRegs;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
*(LpImrIntpCntrlReg) |= ~(LpChannelConfig->ucImrMaskValue);
/* Check channel connected to Timers based on the measurement mode */
#if(ICU_EDGE_DETECTION_API == STD_ON)
/* Read the channel's measurement mode */
LddMeasurementMode = (Icu_MeasurementModeType)
(LpChannelConfig->uiIcuMeasurementMode);
/* Edge Detection Mode */
if(LddMeasurementMode == ICU_MODE_SIGNAL_EDGE_DETECT)
{
/* Read the base configuration interrupt address */
LpExtIntpRegs = LpChannelConfig->pCntlRegs;
/* Set FCLAnCTLm register to the reset value */
*(LpExtIntpRegs) = ICU_ZERO;
}
#endif /* End of (ICU_EDGE_DETECTION_API == STD_ON) */
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the channel pointer */
LpChannelConfig++;
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)\
||(ICU_TAUB_UNIT_USED == STD_ON))
/* Increment the timer channel pointer */
LpTimerChannelConfig++;
#endif
} /* End of channels for loop */
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Critical Section */
SchM_Exit_Icu (ICU_CHANNEL_DATA_PROTECTION);
#endif /* End of (ICU_CRITICAL_SECTION_PROTECTION == STD_ON) */
}
#define ICU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#endif /* End of (ICU_DE_INIT_API == STD_ON) */
#if(ICU_SET_MODE_API == STD_ON)
/*******************************************************************************
** Function Name : Icu_HWSetMode
**
** Service ID : None
**
** Description : This service sets the operating mode of the ICU
** Driver.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non-Reentrant
**
** Input Parameters : Mode
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Icu_GpChannelConfig, Icu_GpChannelRamData
** Icu_GenModuleMode
**
** Function(s) invoked:
** None
*******************************************************************************/
#define ICU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, ICU_PRIVATE_CODE) Icu_HWSetMode(Icu_ModeType Mode)
{
/* Defining a pointer to the channel configuration parameters */
P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpChannelConfig;
/* Defining a pointer to the Interrupt Control Register */
P2VAR(uint16, AUTOMATIC,ICU_CONFIG_DATA) LpIntrCntlReg;
/* Defining a pointer to the Interrupt Mask Register */
P2VAR(uint8, AUTOMATIC,ICU_CONFIG_DATA) LpImrIntpCntrlReg;
/* Local variable to store wakeup status */
uint8 LucWakeupStatus;
/* Local variable to loop through the channels */
uint8 LucChannelNo;
for(LucChannelNo = ICU_ZERO; LucChannelNo < ICU_MAX_CHANNEL; LucChannelNo++)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Update the channel configuration pointer to the current channel */
LpChannelConfig = Icu_GpChannelConfig + LucChannelNo;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Read the current channel wakeup status */
LucWakeupStatus = (Icu_GpChannelRamData + LucChannelNo)->uiWakeupEnable;
/* Load the interrupt control register */
LpIntrCntlReg = LpChannelConfig->pIntrCntlRegs;
/* Load the interrupt mask register */
LpImrIntpCntrlReg = LpChannelConfig->pImrIntrCntlRegs;
/* Check for the current wakeup status of the channel */
if(LucWakeupStatus == ICU_FALSE)
{
if(Mode == ICU_MODE_SLEEP)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable Interrupt */
*(LpImrIntpCntrlReg) |= ~(LpChannelConfig->ucImrMaskValue);
}
else /* Mode = ICU_MODE_NORMAL */
{
/* Disable Interrupt */
*(LpImrIntpCntrlReg) |= ~(LpChannelConfig->ucImrMaskValue);
/* Clear the interrupt request flag */
*(LpIntrCntlReg) &= ICU_CLEAR_INT_REQUEST_FLAG;
/* Enable Interrupt */
*(LpImrIntpCntrlReg) &= LpChannelConfig->ucImrMaskValue;
}
}
}
/* Update the ICU Driver Mode */
Icu_GenModuleMode = Mode;
}
#define ICU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#endif /* End of (ICU_SET_MODE_API == STD_ON) */
/*******************************************************************************
** Function Name : Icu_HWSetActivation
**
** Service ID : None
**
** Description : This service configures the hardware to the active
** edges of the requested channel.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : LucChannel, LucActiveEdge
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : NA
**
** Remarks : Global Variable(s):
** Icu_GpChannelConfig, Icu_GpEdgeCountData
**
** Function(s) invoked:
** None
*******************************************************************************/
#define ICU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, ICU_PRIVATE_CODE) Icu_HWSetActivation
(uint8 LucChannel, Icu_ActivationType LucActiveEdge)
{
/* Defining a pointer to the channel configuration parameters */
P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpChannelConfig;
#if(ICU_EDGE_DETECTION_API == STD_ON)
/* Defining a pointer to point to the External Interrupt registers */
P2VAR(uint8, AUTOMATIC, ICU_CONFIG_DATA) LpExtIntpRegs;
#endif /* End of (ICU_EDGE_DETECTION_API == STD_ON) */
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Defining a pointer to point to the TAUA/B registers */
P2VAR(Tdd_Icu_TAUABChannelUserRegs, AUTOMATIC, ICU_CONFIG_DATA)
LpTAUABChannelReg;
#endif
#if(ICU_TAUJ_UNIT_USED == STD_ON)
/* Defining a pointer to point to the TAUJ registers */
P2VAR(Tdd_Icu_TAUJChannelUserRegs, AUTOMATIC, ICU_CONFIG_DATA)
LpTAUJChannelReg;
#endif
#if((ICU_EDGE_DETECTION_API == STD_ON) || (ICU_TAUA_UNIT_USED == STD_ON) || \
(ICU_TAUB_UNIT_USED == STD_ON))
/* To store Channel Measurement Mode */
Icu_MeasurementModeType LddMeasurementMode;
#endif
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Defining a pointer to the timer channel configuration parameters */
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig;
/* Pointer definition for Edge Count Channel properties */
P2CONST(Tdd_Icu_EdgeCountConfigType, AUTOMATIC, ICU_CONFIG_CONST) LpEdgeCount;
uint8 LucIndex;
#endif
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Update the channel configuration pointer to point to the current channel */
LpChannelConfig = Icu_GpChannelConfig + LucChannel;
/* Update the timer channel configuration pointer to point to the
* current channel
*/
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
LpTimerChannelConfig = Icu_GpTimerChannelConfig + LucChannel;
#endif
#if((ICU_EDGE_DETECTION_API == STD_ON) || (ICU_TAUA_UNIT_USED == STD_ON) || \
(ICU_TAUB_UNIT_USED == STD_ON))
/* Read measurement mode */
LddMeasurementMode =
(Icu_MeasurementModeType)(LpChannelConfig->uiIcuMeasurementMode);
#endif
#if(ICU_EDGE_DETECTION_API == STD_ON)
if(LddMeasurementMode == ICU_MODE_SIGNAL_EDGE_DETECT)
{
/* Read the address of filter control register */
LpExtIntpRegs = LpChannelConfig->pCntlRegs;
/* Mask the bypass bits of filter control register */
*(LpExtIntpRegs) &= ICU_BYPASS_MASK;
if(LucActiveEdge == ICU_BOTH_EDGES)
{
/* Set the edge detection bits in the filter control register
* as per mask
*/
*(LpExtIntpRegs) |= ICU_BOTH_EDGES_MASK;
}
else if(LucActiveEdge == ICU_FALLING_EDGE)
{
/* Set the edge detection bits in the filter control register
* as per mask
*/
*(LpExtIntpRegs) |= ICU_FALLING_EDGE_MASK;
}
else /* (LucActiveEdge == ICU_RISING_EDGE) */
{
/* Set the edge detection bits in the filter control register
* as per mask
*/
*(LpExtIntpRegs) |= ICU_RISING_EDGE_MASK;
}
}
else /* LddMeasurementMode = ICU_MODE_EDGE_COUNTER or ICU_MODE_TIMESTAMP */
#endif /* End of (ICU_EDGE_DETECTION_API == STD_ON) */
{
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
if((LpChannelConfig->uiIcuChannelType == ICU_HW_TAUA) ||
(LpChannelConfig->uiIcuChannelType == ICU_HW_TAUB))
#endif
{
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Initialize pointer to the base address of the current channel */
LpTAUABChannelReg =
(P2VAR(Tdd_Icu_TAUABChannelUserRegs, AUTOMATIC, ICU_CONFIG_CONST))
LpChannelConfig->pCntlRegs;
if(LddMeasurementMode == ICU_MODE_EDGE_COUNTER)
{
/* Read the current active edge */
LpEdgeCount = LpTimerChannelConfig->pChannelProp;
LucIndex = LpEdgeCount->ucEdgeCounterRamIndex;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Enable Edge Counting only if there is no timer overflow */
if((Icu_GpEdgeCountData + LucIndex)->uiTimerOvfFlag == ICU_FALSE)
{
/* Set the active edge */
LpTAUABChannelReg->ucTAUABnCMURm = LucActiveEdge;
}
}
else /* if (LddMeasurementMode == ICU_MODE_TIMESTAMP) */
{
/* Set the active edge */
LpTAUABChannelReg->ucTAUABnCMURm = LucActiveEdge;
}
#endif
}
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
else if(LpChannelConfig->uiIcuChannelType == ICU_HW_TAUJ)
#endif
{
#if(ICU_TAUJ_UNIT_USED == STD_ON)
/* Initialize pointer to the base address of the current channel */
LpTAUJChannelReg =
(P2VAR(Tdd_Icu_TAUJChannelUserRegs, AUTOMATIC, ICU_CONFIG_CONST))
LpChannelConfig->pCntlRegs;
/* TAUJ does't support edge counter mode. so, set the active edge
* for timestamp mode only
*/
LpTAUJChannelReg->ucTAUJnCMURm = LucActiveEdge;
#endif
}
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
else
{
/* To avoid MISRA warning */
}
#endif
}
}
#define ICU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Icu_HWStartCountMeasurement
**
** Service ID : None
**
** Description : This service routine starts the count measurement
** for starting edge counting or signal measurement or
** timestamp measurement.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : LddChannel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Icu_GpTimerChannelConfig
**
** Function(s) invoked:
** None
*******************************************************************************/
#define ICU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, ICU_PRIVATE_CODE) Icu_HWStartCountMeasurement
(Icu_ChannelType LddChannel)
{
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)\
||(ICU_TAUB_UNIT_USED == STD_ON))
/* Defining a pointer to the TAU configuration parameters */
P2CONST(Tdd_Icu_TAUUnitConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTAUUnitConfig;
/* Defining a pointer to the timer channel configuration parameters */
P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpChannelConfig;
/* Defining a pointer to the timer channel configuration parameters */
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig;
/* Local variable to store the measurement mode of a channel */
Icu_MeasurementModeType LddMeasurementMode;
/* Pointer definition for Signal Measurement Channel properties */
P2CONST(Tdd_Icu_SignalMeasureConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpSignalMeasure;
/* Defining a pointer to the Interrupt Control Register */
P2VAR(uint16, AUTOMATIC,ICU_CONFIG_DATA) LpIntrCntlReg;
/* Defining a pointer to the Interrupt Control Register */
P2VAR(uint8, AUTOMATIC,ICU_CONFIG_DATA) LpImrIntpCntrlReg;
#endif
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Defining a pointer to point to the TAUA/B user registers */
P2VAR(Tdd_Icu_TAUABUnitUserRegs, AUTOMATIC, ICU_CONFIG_DATA)
LpTAUABUnitUserReg;
#endif
#if(ICU_TAUJ_UNIT_USED == STD_ON)
/* Defining a pointer to point to the TAUJ user registers */
P2VAR(Tdd_Icu_TAUJUnitUserRegs, AUTOMATIC, ICU_CONFIG_DATA) LpTAUJUnitUserReg;
#endif
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)\
||(ICU_TAUB_UNIT_USED == STD_ON))
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Read channel configuration pointer */
LpChannelConfig = Icu_GpChannelConfig + LddChannel;
/* Read timer channel configuration pointer */
LpTimerChannelConfig = Icu_GpTimerChannelConfig + LddChannel;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Update the TAU configuration pointer to point to the current TAU */
LpTAUUnitConfig =
Icu_GpTAUUnitConfig + LpTimerChannelConfig->ucTimerUnitIndex;
/* Disabling the Interrupt processing */
LpImrIntpCntrlReg = LpChannelConfig->pImrIntrCntlRegs;
*(LpImrIntpCntrlReg) |= ~(LpChannelConfig->ucImrMaskValue);
/* Clear the interrupt request flag */
LpIntrCntlReg = LpChannelConfig->pIntrCntlRegs;
*(LpIntrCntlReg) &= ICU_CLEAR_INT_REQUEST_FLAG;
/* Enabling the Interrupt processing */
*(LpImrIntpCntrlReg) &= LpChannelConfig->ucImrMaskValue;
/* Read the channel's measurement mode */
LddMeasurementMode = (Icu_MeasurementModeType)
(LpChannelConfig->uiIcuMeasurementMode);
if(LddMeasurementMode == ICU_MODE_SIGNAL_MEASUREMENT)
{
/* Read the channel properties */
LpSignalMeasure = LpTimerChannelConfig->pChannelProp;
/* If the channel is duty cycle channel, then enable interrupt for the
next channel also */
if(LpSignalMeasure->blDutyCycleChannel == ICU_TRUE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Read channel configuration pointer */
LpChannelConfig = Icu_GpChannelConfig + LddChannel + ICU_ONE;
/* Disabling the Interrupt processing */
LpImrIntpCntrlReg = LpChannelConfig->pImrIntrCntlRegs;
*(LpImrIntpCntrlReg) |= ~(LpChannelConfig->ucImrMaskValue);
/* Clear the interrupt request flag */
LpIntrCntlReg = LpChannelConfig->pIntrCntlRegs;
*(LpIntrCntlReg) &= ICU_CLEAR_INT_REQUEST_FLAG;
/* Enabling the Interrupt processing */
*(LpImrIntpCntrlReg) &= LpChannelConfig->ucImrMaskValue;
}
}
#endif /* End of ((ICU_TAUA_UNIT_USED == STD_ON)||
(ICU_TAUJ_UNIT_USED == STD_ON) ||(ICU_TAUB_UNIT_USED == STD_ON) */
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
if((LpTAUUnitConfig->ucIcuUnitType == ICU_HW_TAUA) ||
(LpTAUUnitConfig->ucIcuUnitType == ICU_HW_TAUB))
#endif
{
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Initialize pointer to the base address of the current timer unit */
LpTAUABUnitUserReg =
(P2VAR(Tdd_Icu_TAUABUnitUserRegs, AUTOMATIC, ICU_CONFIG_CONST))
LpTAUUnitConfig->pTAUnitUserCntlRegs;
/* Set the bit corresponding to the channel no. in TS register */
LpTAUABUnitUserReg->usTAUABnTS |= LpChannelConfig->usChannelMaskValue;
#endif /* End of
((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) */
}
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
else /* (LpTAUUnitConfig->ucIcuUnitType == ICU_HW_TAUJ) */
#endif
{
#if(ICU_TAUJ_UNIT_USED == STD_ON)
/* Initialize pointer to the base address of the current timer unit */
LpTAUJUnitUserReg =
(P2VAR(Tdd_Icu_TAUJUnitUserRegs, AUTOMATIC, ICU_CONFIG_CONST))
LpTAUUnitConfig->pTAUnitUserCntlRegs;
/* Set the bit corresponding to the channel no. in TS register */
LpTAUJUnitUserReg->ucTAUJnTS |= (uint8)LpChannelConfig->usChannelMaskValue;
#endif /* End of (ICU_TAUJ_UNIT_USED == STD_ON) */
}
}
#define ICU_STOP_SEC_PRIVATE_CODE
#include "Memmap.h"
/*******************************************************************************
** Function Name : Icu_HWStopCountMeasurement
**
** Service ID : None
**
** Description : This service routine stops the count measurement
** for starting edge counting or signal measurement or
** timestamp measurement.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : LddChannel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Icu_GpTimerChannelConfig
**
** Function(s) invoked:
** None
*******************************************************************************/
#define ICU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, ICU_PRIVATE_CODE) Icu_HWStopCountMeasurement
(Icu_ChannelType LddChannel)
{
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON) \
||(ICU_TAUB_UNIT_USED == STD_ON))
/* Defining a pointer to the timer channel configuration parameters */
P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpChannelConfig;
/* Defining a pointer to the timer channel configuration parameters */
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig;
/* Defining a pointer to the TAU configuration parameters */
P2CONST(Tdd_Icu_TAUUnitConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTAUUnitConfig;
/* Local variable to store the measurement mode of a channel */
Icu_MeasurementModeType LddMeasurementMode;
/* Pointer definition for Signal Measurement Channel properties */
P2CONST(Tdd_Icu_SignalMeasureConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpSignalMeasure;
/* Defining a pointer to the Interrupt Control Register */
P2VAR(uint8, AUTOMATIC,ICU_CONFIG_DATA) LpImrIntpCntrlReg;
#endif
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Defining a pointer to point to the TAUA/B registers */
P2VAR(Tdd_Icu_TAUABUnitUserRegs, AUTOMATIC, ICU_CONFIG_DATA)
LpTAUABUnitUserReg;
#endif
#if(ICU_TAUJ_UNIT_USED == STD_ON)
/* Defining a pointer to point to the TAUJ registers */
P2VAR(Tdd_Icu_TAUJUnitUserRegs, AUTOMATIC, ICU_CONFIG_DATA) LpTAUJUnitUserReg;
#endif
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)\
||(ICU_TAUB_UNIT_USED == STD_ON))
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Read channel configuration pointer */
LpChannelConfig = Icu_GpChannelConfig + LddChannel;
/* Read timer channel configuration pointer */
LpTimerChannelConfig = Icu_GpTimerChannelConfig + LddChannel;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Update the TAU configuration pointer to point to the current TAU */
LpTAUUnitConfig =
Icu_GpTAUUnitConfig + LpTimerChannelConfig->ucTimerUnitIndex;
/* Disabling the Interrupt processing */
LpImrIntpCntrlReg = LpChannelConfig->pImrIntrCntlRegs;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
*(LpImrIntpCntrlReg) |= ~(LpChannelConfig->ucImrMaskValue);
/* Read the channel's measurement mode */
LddMeasurementMode = (Icu_MeasurementModeType)
(LpChannelConfig->uiIcuMeasurementMode);
if(LddMeasurementMode == ICU_MODE_SIGNAL_MEASUREMENT)
{
/* Read the channel properties */
LpSignalMeasure = LpTimerChannelConfig->pChannelProp;
/* If the channel is duty cycle channel, then enable interrupt for the
next channel also */
if(LpSignalMeasure->blDutyCycleChannel == ICU_TRUE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Read channel configuration pointer */
LpChannelConfig = Icu_GpChannelConfig + LddChannel + ICU_ONE;
/* Disabling the Interrupt processing */
LpImrIntpCntrlReg = LpChannelConfig->pImrIntrCntlRegs;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
*(LpImrIntpCntrlReg) |= ~(LpChannelConfig->ucImrMaskValue);
}
}
#endif /* End of ((ICU_TAUA_UNIT_USED == STD_ON)||
(ICU_TAUJ_UNIT_USED == STD_ON) ||(ICU_TAUB_UNIT_USED == STD_ON) */
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
if((LpTAUUnitConfig->ucIcuUnitType == ICU_HW_TAUA) ||
(LpTAUUnitConfig->ucIcuUnitType == ICU_HW_TAUB))
#endif
{
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Initialize pointer to the base address of the current timer unit */
LpTAUABUnitUserReg =
(P2VAR(Tdd_Icu_TAUABUnitUserRegs, AUTOMATIC, ICU_CONFIG_CONST))
LpTAUUnitConfig->pTAUnitUserCntlRegs;
/* Set the bit corresponding to the channel no. in TT register */
LpTAUABUnitUserReg->usTAUABnTT |= LpChannelConfig->usChannelMaskValue;
#endif
}
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
else /* (LpTAUUnitConfig->ucIcuUnitType == ICU_HW_TAUJ) */
#endif
{
#if(ICU_TAUJ_UNIT_USED == STD_ON)
/* Initialize pointer to the base address of the current timer unit */
LpTAUJUnitUserReg =
(P2VAR(Tdd_Icu_TAUJUnitUserRegs, AUTOMATIC, ICU_CONFIG_CONST))
LpTAUUnitConfig->pTAUnitUserCntlRegs;
/* Set the bit corresponding to the channel no. in TT register */
LpTAUJUnitUserReg->ucTAUJnTT |= (uint8)LpChannelConfig->usChannelMaskValue;
#endif
}
}
#define ICU_STOP_SEC_PRIVATE_CODE
#include "Memmap.h"
#if(ICU_EDGE_COUNT_API == STD_ON)
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/*******************************************************************************
** Function Name : Icu_HWResetEdgeCount
**
** Service ID : None
**
** Description : This service resets the Timer Counter of the channel
** which is configured in Edge Counting Mode.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : LucChannel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Icu_GpChannelConfig, Icu_GpEdgeCountData,
** Icu_GpChannelRamData
**
** Function(s) invoked:
** Icu_HWStartCountMeasurement
*******************************************************************************/
#define ICU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, ICU_PRIVATE_CODE) Icu_HWResetEdgeCount(uint8 LucChannel)
{
/* Defining a pointer to point to the channel configuration parameters */
P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpChannelConfig;
/* Defining a pointer to point to the timer channel configuration
* parameters
*/
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig;
/* Pointer definition for Edge Count Channel properties */
P2CONST(Tdd_Icu_EdgeCountConfigType, AUTOMATIC, ICU_CONFIG_CONST) LpEdgeCount;
/* Defining a pointer to point to the TAUA/B registers */
P2VAR(Tdd_Icu_TAUABChannelUserRegs, AUTOMATIC,ICU_CONFIG_DATA)
LpTAUABChannelReg;
uint8 LucIndex;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Update the channel configuration pointer to point to the current channel */
LpChannelConfig = Icu_GpChannelConfig + LucChannel;
/* Update the channel configuration pointer to point to the current channel */
LpTimerChannelConfig = Icu_GpTimerChannelConfig + LucChannel;
/* Initialize pointer to the base address of the current channel */
LpTAUABChannelReg =
(P2VAR(Tdd_Icu_TAUABChannelUserRegs, AUTOMATIC, ICU_CONFIG_CONST))
LpChannelConfig->pCntlRegs;
/* Reset the Timer Counter */
LpTAUABChannelReg->usTAUABnCDRm = ICU_TIMER_RESET_VAL;
/* Read the channel properties */
LpEdgeCount = LpTimerChannelConfig->pChannelProp;
LucIndex = LpEdgeCount->ucEdgeCounterRamIndex;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Reset the overflow flag */
(Icu_GpEdgeCountData + LucIndex)->uiTimerOvfFlag = ICU_FALSE;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Re-enable Edge Counting */
Icu_HWStartCountMeasurement(LucChannel);
}
#define ICU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#endif /* End of
((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) */
#endif /* End of (ICU_EDGE_COUNT_API == STD_ON) */
/*******************************************************************************
** Function Name : Icu_HWGetEdgeNumbers
**
** Service ID : None
**
** Description : This service routine counts the number of edges
** for the given channel.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : LddChannel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Icu_GpChannelConfig, Icu_GpEdgeCountData
**
** Function(s) invoked:
** None
*******************************************************************************/
#define ICU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, ICU_PRIVATE_CODE) Icu_HWGetEdgeNumbers(Icu_ChannelType LddChannel)
{
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Defining a pointer to point to the channel configuration parameters */
P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpChannelConfig;
/* Defining a pointer to point to the timer channel configuration
* parameters
*/
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig;
/* Pointer definition for Signal Measurement Channel properties */
P2CONST(Tdd_Icu_EdgeCountConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpEdgeCount;
/* Pointer definition for Signal Measurement RAM data */
P2VAR(Tdd_Icu_EdgeCountChannelRamDataType, AUTOMATIC,ICU_CONFIG_DATA)
LpEdgeCountData;
/* Defining a pointer to point to the TAUA/B registers */
P2VAR(Tdd_Icu_TAUABChannelUserRegs, AUTOMATIC,ICU_CONFIG_DATA)
LpTAUABChannelReg;
uint8 LucRamIndex;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Read channel configuration pointer */
LpChannelConfig = Icu_GpChannelConfig + LddChannel;
/* Read timer channel configuration pointer */
LpTimerChannelConfig = Icu_GpTimerChannelConfig + LddChannel;
/* Read the channel properties */
LpEdgeCount = LpTimerChannelConfig->pChannelProp;
/* Read the channel ram index */
LucRamIndex = LpEdgeCount->ucEdgeCounterRamIndex;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpEdgeCountData = Icu_GpEdgeCountData + LucRamIndex;
/* Initialize pointer to the base address of the current channel */
LpTAUABChannelReg =
(P2VAR(Tdd_Icu_TAUABChannelUserRegs, AUTOMATIC, ICU_CONFIG_CONST))
LpChannelConfig->pCntlRegs;
/* Storing the Edge count value into RAM */
LpEdgeCountData->usIcuEdgeCount =
LpTAUABChannelReg->usTAUABnCDRm - LpTAUABChannelReg->usTAUABnCNTm;
#endif
}
#define ICU_STOP_SEC_PRIVATE_CODE
#include "Memmap.h"
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON) || \
(ICU_TAUB_UNIT_USED == STD_ON))
/*******************************************************************************
** Function Name : Icu_ServiceSignalMeasurement
**
** Service ID : None
**
** Description : This service routine calculates the channel's Signal
** Time (Low, High, Period or Duty) based on its
** configuration.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : LddChannel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Icu_GpChannelConfig, Icu_GpSignalMeasurementData
**
** Function(s) invoked:
** None
*******************************************************************************/
#define ICU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, ICU_PRIVATE_CODE)Icu_ServiceSignalMeasurement
(Icu_ChannelType LddChannel)
{
/* Defining a pointer to point to the channel configuration parameters */
P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpChannelConfig;
/* Define a pointer to point to the timer channel configuration parameters */
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig;
/* Pointer definition for Signal Measurement Channel properties */
P2CONST(Tdd_Icu_SignalMeasureConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpSignalMeasure;
/* Pointer definition for Signal Measurement RAM data */
P2VAR(Tdd_Icu_SignalMeasureChannelRamDataType, AUTOMATIC,ICU_CONFIG_DATA)
LpSignalMeasureData;
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Defining a pointer to point to the TAUA/B registers */
P2VAR(Tdd_Icu_TAUABChannelUserRegs, AUTOMATIC,ICU_CONFIG_DATA)
LpTAUABChannelReg;
#endif
#if(ICU_TAUJ_UNIT_USED == STD_ON)
/* Defining a pointer to point to the TAUJ registers */
P2VAR(Tdd_Icu_TAUJChannelUserRegs, AUTOMATIC,ICU_CONFIG_DATA)
LpTAUJChannelReg;
#endif
Icu_SignalMeasurementPropertyType LddMeasureProperty;
uint8 LucOverflowFlag = ICU_ZERO;
uint8 LucRamIndex;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Read channel configuration pointer */
LpChannelConfig = Icu_GpChannelConfig + LddChannel;
/* Read timer channel configuration pointer */
LpTimerChannelConfig = Icu_GpTimerChannelConfig + LddChannel;
/* Read the channel properties */
LpSignalMeasure = LpTimerChannelConfig->pChannelProp;
/* Read the channel ram index */
LucRamIndex = LpSignalMeasure->ucSignalMeasureRamDataIndex;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Read channel measurement property */
LpSignalMeasureData = Icu_GpSignalMeasurementData + LucRamIndex;
LddMeasureProperty = (Icu_SignalMeasurementPropertyType)
LpSignalMeasure->uiSignalMeasurementProperty;
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
if((LpChannelConfig->uiIcuChannelType == ICU_HW_TAUA) ||
(LpChannelConfig->uiIcuChannelType == ICU_HW_TAUB))
#endif
{
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Initialize pointer to the base address of the current channel */
LpTAUABChannelReg =
(P2VAR(Tdd_Icu_TAUABChannelUserRegs, AUTOMATIC, ICU_CONFIG_CONST))
LpChannelConfig->pCntlRegs;
/* Set the value of overflow flag as per the value set in CSR register */
LucOverflowFlag = LpTAUABChannelReg->ucTAUABnCSRm & ICU_OVERFLOW_BIT_MASK;
if((LddMeasureProperty == (ICU_HIGH_TIME)) ||
(LddMeasureProperty == (ICU_LOW_TIME)))
/* Calculate Active time */
{
if(LucOverflowFlag == ICU_ZERO)
{
LpSignalMeasureData->ulSignalActiveTime =
((LpTAUABChannelReg->usTAUABnCDRm) + 1);
}
else
{
/* Maximum count value */
LpSignalMeasureData->ulSignalActiveTime = ICU_TAUAB_MAX_CNT_VAL;
}
}
else /* (LddMeasureProperty == (ICU_PERIOD_TIME)) */
{
LpSignalMeasureData->ulPrevSignalActiveTime =
LpSignalMeasureData->ulSignalActiveTime;
if(LucOverflowFlag == ICU_ZERO)
{
/* Calculate Period time */
LpSignalMeasureData->ulSignalPeriodTime =
((LpTAUABChannelReg->usTAUABnCDRm) + 1);
}
else
{
/* Maximum count value */
LpSignalMeasureData->ulSignalPeriodTime = ICU_TAUAB_MAX_CNT_VAL;
}
}
/* Clear the Overflow flag */
LpTAUABChannelReg->ucTAUABnCSCm = ICU_ONE;
#endif /* End of
((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) */
}
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
else if(LpChannelConfig->uiIcuChannelType == ICU_HW_TAUJ)
#endif
{
#if(ICU_TAUJ_UNIT_USED == STD_ON)
/* Initialize pointer to the base address of the current channel */
LpTAUJChannelReg =
(P2VAR(Tdd_Icu_TAUJChannelUserRegs, AUTOMATIC, ICU_CONFIG_CONST))
LpChannelConfig->pCntlRegs;
/* Set the value of overflow flag as per the value set in CSR register */
LucOverflowFlag = LpTAUJChannelReg->ucTAUJnCSRm & ICU_OVERFLOW_BIT_MASK;
if ((LddMeasureProperty == (ICU_HIGH_TIME)) ||
(LddMeasureProperty == (ICU_LOW_TIME)))
/* Calculate Active time */
{
if(LucOverflowFlag == ICU_ZERO)
{
LpSignalMeasureData->ulSignalActiveTime =
((LpTAUJChannelReg->ulTAUJnCDRm) + 1);
}
else
{
/* Maximum count value */
LpSignalMeasureData->ulSignalActiveTime = ICU_TAUJ_MAX_CNT_VAL;
}
}
else /* (LddMeasureProperty == (ICU_PERIOD_TIME)) */
{
LpSignalMeasureData->ulPrevSignalActiveTime =
LpSignalMeasureData->ulSignalActiveTime;
if(LucOverflowFlag == ICU_ZERO)
{
/* Calculate Period time */
LpSignalMeasureData->ulSignalPeriodTime =
((LpTAUJChannelReg->ulTAUJnCDRm) + 1);
}
else
{
/* Maximum count value */
LpSignalMeasureData->ulSignalPeriodTime = ICU_TAUJ_MAX_CNT_VAL;
}
}
/* Clear the Overflow flag */
LpTAUJChannelReg->ucTAUJnCSCm = ICU_ONE;
#endif /* End of (ICU_TAUJ_UNIT_USED == STD_ON) */
}
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
else
{
/* To avoid MISRA warning */
}
#endif
}
#define ICU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#endif /* End of
* ((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON) || \
* (ICU_TAUB_UNIT_USED == STD_ON))
*/
/*******************************************************************************
** Function Name : Icu_ServiceTimestamp
**
** Service ID : None
**
** Description : This service routine captures the channel's Timestamp
** data based on its active edge configuration.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : LddChannel, LulCapturedTimestampVal
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Icu_GpChannelConfig, Icu_GpTimeStampData,
** Icu_GstChannelFunc
**
** Function(s) invoked:
** None
*******************************************************************************/
#define ICU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, ICU_PRIVATE_CODE)Icu_ServiceTimestamp
(Icu_ChannelType LddChannel, uint32 LulCapturedTimestampVal)
{
/* Defining a pointer to point to the timer channel configuration
* parameters
*/
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig;
/* Pointer definition for Timestamp Channel properties */
P2CONST(Tdd_Icu_TimeStampMeasureConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimestamp;
P2VAR(Tdd_Icu_TimeStampChannelRamDataType, AUTOMATIC,ICU_CONFIG_DATA)
LpTimestampdata;
/* Local variable used to store the ram index of the channel */
uint8 LucRamIndex;
#if(ICU_NOTIFICATION_CONFIG == STD_ON)
/* Local variable for the index to the call-back function */
uint8 LucIndex;
#endif
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load timer channel configuration pointer and channel properties */
LpTimerChannelConfig = Icu_GpTimerChannelConfig + LddChannel;
LpTimestamp = LpTimerChannelConfig->pChannelProp;
/* Read channel ram index */
LucRamIndex = LpTimestamp->ucTimeStampRamDataIndex;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Read the Timestamp channel data pointer */
LpTimestampdata = Icu_GpTimeStampData + LucRamIndex;
/* Check if timestamp capturing reached end of the buffer */
if((LpTimestampdata->usTimestampIndex) < (LpTimestampdata->usBufferSize))
{
/* Update the buffer pointer with current timestamp */
*(LpTimestampdata->pBufferPointer) = LulCapturedTimestampVal;
(LpTimestampdata->usTimestampIndex)++;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
(LpTimestampdata->pBufferPointer)++;
(LpTimestampdata->usTimestampsCounter)++;
/*
* Notify if the configured number of timestamps are captured and
* notification is enabled
*/
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
#if(ICU_NOTIFICATION_CONFIG == STD_ON)
if(((LpTimestampdata->usTimestampsCounter) ==
(LpTimestampdata->usNotifyInterval)) &&
(((Icu_GpChannelRamData + LddChannel)->uiNotificationEnable) == ICU_TRUE))
{
/* Reset the number of timestamp captured counter */
LpTimestampdata->usTimestampsCounter = ICU_ZERO;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Read the function pointer address */
LucIndex = (Icu_GpChannelConfig + LddChannel)->ucIcuNotificationIndex;
if(LucIndex != ICU_NO_CBK_CONFIGURED)
{
Icu_GstChannelFunc[LucIndex].pIcuNotificationPointer();
}
}
#endif /*if (ICU_NOTIFICATION_CONFIG == STD_ON) */
/* Check whether the timestamp index has reached the end of buffer */
if((LpTimestampdata->usTimestampIndex) >= (LpTimestampdata->usBufferSize))
{
/* Check if buffer is configured as circular */
if(LpTimestamp->uiTimestampMeasurementProperty == ICU_CIRCULAR_BUFFER)
{
/* Reset buffer pointer and index */
LpTimestampdata->usTimestampIndex = ICU_ZERO;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpTimestampdata->pBufferPointer -= LpTimestampdata->usBufferSize;
}
}
}
}
#define ICU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON) \
|| (ICU_TAUB_UNIT_USED == STD_ON))
/*******************************************************************************
** Function Name : Icu_TimerIsr
**
** Service ID : None
**
** Description : This service routine invokes the required function
** based on the channel configuration for further
** calculations.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : LddChannel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Icu_GpChannelConfig, Icu_GpChannelMap,
** Icu_GpChannelRamData, Icu_GenModuleMode
**
** Function(s) invoked:
** Icu_ServiceSignalMeasurement, Icu_ServiceTimestamp,
** EcuM_CheckWakeup
*******************************************************************************/
#define ICU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, ICU_PRIVATE_CODE) Icu_TimerIsr(Icu_ChannelType LddChannel)
{
/* Defining a pointer to point to the channel configuration parameters */
P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpChannelConfig;
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Define a pointer to point to the timer channel configuration parameters */
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig;
/* Pointer definition for Edge Count Channel properties */
P2CONST(Tdd_Icu_EdgeCountConfigType, AUTOMATIC, ICU_CONFIG_CONST) LpEdgeCount;
/* Defining a pointer to point to the TAUA/B registers */
P2VAR(Tdd_Icu_TAUABChannelUserRegs, AUTOMATIC,ICU_CONFIG_DATA)
LpTAUABChannelReg;
#endif
#if(ICU_TAUJ_UNIT_USED == STD_ON)
/* Defining a pointer to point to the TAUJ registers */
P2VAR(Tdd_Icu_TAUJChannelUserRegs, AUTOMATIC,ICU_CONFIG_DATA)
LpTAUJChannelReg;
#endif
Icu_MeasurementModeType LddMeasurementMode;
Icu_ChannelType LddChannelMap;
uint32 LulCapturedTimestampVal;
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
uint8 LucIndex;
#endif
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannelMap = *(Icu_GpChannelMap + LddChannel);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Update the channel pointer to point to the current channel */
LpChannelConfig = Icu_GpChannelConfig + LddChannelMap;
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Update the timer channel pointer to point to the current channel */
LpTimerChannelConfig = Icu_GpTimerChannelConfig + LddChannelMap;
#endif
/* Read the channel's measurement property */
LddMeasurementMode =
(Icu_MeasurementModeType)(LpChannelConfig->uiIcuMeasurementMode);
/* Check whether the channel is configured for Signal Measurement */
if(LddMeasurementMode == ICU_MODE_SIGNAL_MEASUREMENT)
{
/* Process Signal Measurement */
Icu_ServiceSignalMeasurement(LddChannelMap);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Set channel input status as active */
(Icu_GpChannelRamData + LddChannelMap)->uiChannelStatus = ICU_ACTIVE;
}
/* Check whether the channel is configured for Timestamp */
else if(LddMeasurementMode == ICU_MODE_TIMESTAMP)
{
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
if((LpChannelConfig->uiIcuChannelType == ICU_HW_TAUA) ||
(LpChannelConfig->uiIcuChannelType == ICU_HW_TAUB))
#endif
{
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Initialize pointer to the base address of the current channel */
LpTAUABChannelReg =
(P2VAR(Tdd_Icu_TAUABChannelUserRegs, AUTOMATIC, ICU_CONFIG_CONST))
LpChannelConfig->pCntlRegs;
/* Calculate captured value */
LulCapturedTimestampVal = ((LpTAUABChannelReg->usTAUABnCDRm) + 1);
/* Process Timestamp */
Icu_ServiceTimestamp(LddChannelMap, LulCapturedTimestampVal);
#endif /* End of
((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) */
}
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
else if(LpChannelConfig->uiIcuChannelType == ICU_HW_TAUJ)
#endif
{
#if(ICU_TAUJ_UNIT_USED == STD_ON)
/* Initialize pointer to the base address of the current channel */
LpTAUJChannelReg =
(P2VAR(Tdd_Icu_TAUJChannelUserRegs, AUTOMATIC, ICU_CONFIG_CONST))
LpChannelConfig->pCntlRegs;
/* Calculate captured value */
LulCapturedTimestampVal = ((LpTAUJChannelReg->ulTAUJnCDRm) + 1);
/* Process Timestamp */
Icu_ServiceTimestamp(LddChannelMap, LulCapturedTimestampVal);
#endif /* End of (ICU_TAUJ_UNIT_USED == STD_ON) */
}
#if(((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) \
&& (ICU_TAUJ_UNIT_USED == STD_ON))
else
{
/* To avoid MISRA warning */
}
#endif
}
else /* if(LddMeasurementMode == ICU_MODE_EDGE_COUNTER) */
{
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
/* Read the edge count channel properties and the ram index */
LpEdgeCount = LpTimerChannelConfig->pChannelProp;
LucIndex = LpEdgeCount->ucEdgeCounterRamIndex;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Reset the edge count overflow flag */
(Icu_GpEdgeCountData + LucIndex)->uiTimerOvfFlag = ICU_TRUE;
#endif /* End of
((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) */
}
#if(ICU_REPORT_WAKEUP_SOURCE == STD_ON)
/* If Module was in SLEEP mode and reporting wakeup is enabled */
if(Icu_GenModuleMode == ICU_MODE_SLEEP)
{
/* Report Wakeup Event to EcuM */
EcuM_CheckWakeup(LpChannelConfig->ddEcuMChannelWakeupInfo);
}
#endif /* End of (ICU_REPORT_WAKEUP_SOURCE == STD_ON) */
}
#define ICU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#endif /* End of
* ((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON) \
* || (ICU_TAUB_UNIT_USED == STD_ON))
*/
/*******************************************************************************
** Function Name : Icu_ExternalInterruptIsr
**
** Service ID : None
**
** Description : This service routine is invoked from all the external
** interrupts which takes care of calling the
** notification functions.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : LddChannel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Icu_GpChannelConfig, Icu_GpChannelMap,
** Icu_GpChannelRamData, Icu_GstChannelFunc
**
** Function(s) invoked:
** EcuM_CheckWakeup
*******************************************************************************/
#define ICU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, ICU_PRIVATE_CODE) Icu_ExternalInterruptIsr
(Icu_ChannelType LddChannel)
{
Icu_ChannelType LddChannelMap;
#if(ICU_NOTIFICATION_CONFIG == STD_ON)
uint8 LucIndex;
#endif /* End of (ICU_NOTIFICATION_CONFIG == STD_ON) */
/* Defining a pointer to point to the channel configuration parameters */
#if(ICU_REPORT_WAKEUP_SOURCE == STD_ON)
P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpChannelConfig;
#endif /* End of (ICU_REPORT_WAKEUP_SOURCE == STD_ON) */
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannelMap = *(Icu_GpChannelMap + LddChannel);
#if(ICU_REPORT_WAKEUP_SOURCE == STD_ON)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Update the channel pointer to point to the current channel */
LpChannelConfig = Icu_GpChannelConfig + LddChannelMap;
#endif /* End of (ICU_REPORT_WAKEUP_SOURCE == STD_ON) */
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
#if(ICU_NOTIFICATION_CONFIG == STD_ON)
/* Check if notification is enabled */
if(((Icu_GpChannelRamData + LddChannelMap)->uiNotificationEnable) ==
ICU_TRUE)
{
/* Read the function pointer address */
LucIndex = (Icu_GpChannelConfig + LddChannelMap)->ucIcuNotificationIndex;
if(LucIndex != ICU_NO_CBK_CONFIGURED)
{
Icu_GstChannelFunc[LucIndex].pIcuNotificationPointer();
}
}
#endif /* End of (ICU_NOTIFICATION_CONFIG == STD_ON) */
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Set channel input status as active */
(Icu_GpChannelRamData + LddChannelMap)->uiChannelStatus = ICU_ACTIVE;
#if(ICU_REPORT_WAKEUP_SOURCE == STD_ON)
/* If Module was in SLEEP mode and reporting wakeup is enabled */
if(Icu_GenModuleMode == ICU_MODE_SLEEP)
{
/* Report Wakeup Event to EcuM */
EcuM_CheckWakeup(LpChannelConfig->ddEcuMChannelWakeupInfo);
}
#endif /* End of (ICU_REPORT_WAKEUP_SOURCE == STD_ON) */
}
#define ICU_STOP_SEC_PRIVATE_CODE
#include "Memmap.h"
/*******************************************************************************
** End of File **
*******************************************************************************/<file_sep>/BSP/Common/Compiler/Compiler.h
#ifndef _COMPILER_H
#define _COMPILER_H
/*Select memroy mapping file
*if greenhills, use MemMap_GHS.h
*if CX, use MemMap_CX.h
* Note, for sourceinsight parser, comments the unused option with "//"
*/
#define COMPILER_GHS 1
//#define COMPILER_CX 1
#define __32_BIT_MCU
#if COMPILER_GHS
#include "Compiler_GHS.h"
#elif COMPILER_CX
#include "Compiler_CX.h"
#endif
#endif
<file_sep>/BSP/MCAL/NvM/NvM_Types.h
/**
\addtogroup MODULE_NvM NvM
Non-volatile Memory Management Module.
*/
/*@{*/
/***************************************************************************//**
\file NvM_Types.h
\brief Types Definition of NVRAM Management Module.
\author zhaoyg
\version 1.0
\date 2012-3-27
\warning Copyright (C), 2012, PATAC.
*//*----------------------------------------------------------------------------
\history
<No.> <author> <time> <version> <description>
1 zhaoyg 2012-3-27 1.0 Create
*******************************************************************************/
#ifndef _NVM_TYPES_H
#define _NVM_TYPES_H
/*******************************************************************************
Include Files
*******************************************************************************/
/*******************************************************************************
Macro Definition
*******************************************************************************/
/*******************************************************************************
Type Definition
*******************************************************************************/
/**
\enum NvM_BlockManagementType
Block Management Type.
*/
typedef enum BlockManagementType
{
NVM_BLOCK_NATIVE = 0,
NVM_BLOCK_REDUNDANT,
NVM_BLOCK_DATASET
} NvM_BlockManagementType;
/**
\enum NvM_ApiConfigClassType
API Config Class Type.
*/
typedef enum ApiConfigClassType
{
NVM_API_CONFIG_CLASS_1 = 0,
NVM_API_CONFIG_CLASS_2,
NVM_API_CONFIG_CLASS_3
} NvM_ApiConfigClassType;
/*******************************************************************************
Prototype Declaration
*******************************************************************************/
#endif /* #ifndef _NVM_TYPES_H */
/*@}*/
<file_sep>/BSP/IoHwAb/IoHwAb_LEDcfg.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 LED Components */
/* Module = Pwm_Irq.h */
/* Version = 3.1.3a */
/* Date = 23-Apr-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2013-2014 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of API information. */
/* */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 18-Aug-2009 : Initial version
*******************************************************************************/
#ifndef IOHWAB_LED_CFG_H
#define IOHWAB_LED_CFG_H
#define CeIoHwAb_e_InvalidPwmName CeLED_e_ChNum
/*PWM clock config:
|Although PWM clock is config in MCAL, this parameter is set in this file and used in RTE
|Unit: us
*/
#define CeLED_w_ClockSourceUs 32u
/*simulate PWM channel Id*/
typedef enum
{
CeLED_e_SimCh0,
CeLED_e_SwLEDChNum
} TeLED_SimChEnum;
typedef enum
{
//CeIoHwAb_e_PWMCLK,
CeIoHwAb_e_LED_1, /*Reserved1*/
CeIoHwAb_e_LED_2, /*Reserved2*/
CeIoHwAb_e_LED_3, /*Highbeam*/
CeIoHwAb_e_HighSpeed, /*HighSpeed*/
CeIoHwAb_e_BadWeather, /*BadWeather*/
CeIoHwAb_e_TurnLamp, /*TurnLamp*/
CeIoHwAb_e_ParkLamp, /*ParkLamp*/
CeIoHwAb_e_LowBeam_1, /*LowBeam1*/
CeIoHwAb_e_LowBeam_2, /*LowBeam2*/
CeLED_e_ChNum
} TeLED_ChName;
#endif /* IOHWAB_LED_CFG_H */
<file_sep>/BSP/MCAL/Wdg/Wdg_23_DriverA_Cfg.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Wdg_23_DriverA_Cfg.h */
/* Version = 3.0.0 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains pre-compile time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: : Initial version
*/
/******************************************************************************/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.0.8a
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_WDGA_V304_120319.arxml
* GENERATED ON: 19 Mar 2012 - 13:36:07
*/
#ifndef WDG_23_DRIVERA_CFG_H
#define WDG_23_DRIVERA_CFG_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define WDG_23_DRIVERA_CFG_AR_MAJOR_VERSION 2
#define WDG_23_DRIVERA_CFG_AR_MINOR_VERSION 2
#define WDG_23_DRIVERA_CFG_AR_PATCH_VERSION 0
/* File version information */
#define WDG_23_DRIVERA_CFG_SW_MAJOR_VERSION 3
#define WDG_23_DRIVERA_CFG_SW_MINOR_VERSION 0
/*******************************************************************************
** Common Published Information **
*******************************************************************************/
#define WDG_23_DRIVERA_AR_MAJOR_VERSION_VALUE 2
#define WDG_23_DRIVERA_AR_MINOR_VERSION_VALUE 2
#define WDG_23_DRIVERA_AR_PATCH_VERSION_VALUE 0
#define WDG_23_DRIVERA_SW_MAJOR_VERSION_VALUE 3
#define WDG_23_DRIVERA_SW_MINOR_VERSION_VALUE 0
#define WDG_23_DRIVERA_SW_PATCH_VERSION_VALUE 0
#define WDG_23_DRIVERA_VENDOR_ID_VALUE (uint16)23
#define WDG_23_DRIVERA_MODULE_ID_VALUE (uint16)102
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Pre-compile option for development error detect */
#define WDG_23_DRIVERA_DEV_ERROR_DETECT STD_OFF
/* Pre-compile option for version info API */
#define WDG_23_DRIVERA_VERSION_INFO_API STD_OFF
/* Compile switch to allow/forbid disabling Watchdog Driver during runtime */
#define WDG_23_DRIVERA_DISABLE_ALLOWED STD_ON
/* Compile switch to allow/forbid VAC */
#define WDG_23_DRIVERA_VAC_ALLOWED STD_OFF
/* Watchdog Driver Id */
#define WDG_23_DRIVERA_INDEX (uint8)0
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Instance ID of the WDG Component*/
#define WDG_23_DRIVERA_INSTANCE_ID_VALUE (uint8)0
/* Minimum Watchdog Timer timeout in milliseconds */
#define WDG_23_DRIVERA_MIN_TIMEOUT (float32)0.00213
/* Maximum Watchdog Timer timeout in milliseconds*/
#define WDG_23_DRIVERA_MAX_TIMEOUT (float32)139.81013
/* Resolution of Watchdog timeout period in milliseconds*/
#define WDG_23_DRIVERA_RESOLUTION (float32)0.0000041666
/* Watchdog trigger mode */
#define WDG_23_DRIVERA_TRIGGER_MODE WDG_WINDOW
/* Configuration Set Handles */
#define WdgModeConfig0 &Wdg_23_DriverA_GstConfiguration[0]
/* Address of Trigger Register when VAC is OFF */
#define WDG_23_DRIVERA_WDTAWDTE_ADDRESS *((volatile uint8 *)0xFF806000ul)
/* Address of Mode Register */
#define WDG_23_DRIVERA_WDTAMD_ADDRESS *((volatile uint8 *)0xFF80600Cul)
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* WDG_23_DRIVERA_CFG_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Can/Can_Int.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Can_Int.c */
/* Version = 3.0.4a */
/* Date = 16-Nov-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2008-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of Interrupt Control Functionality. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12.12.2008 : Initial Version
* V3.0.1: 10.10.2009 : Updated for changes in wake-up support and
* EnableControllerInterrupts has been updated as per
* SCR ANMCANLINFR3_SCR_031.
* V3.0.2: 21.04.2010 : As per ANMCANLINFR3_SCR_056, provision for Tied Wakeup
* interrupts is added.
* V3.0.3: 11.05.2010 : "ddMask<xxx>Reg" are changed to "ucMask<xxx>Reg" as
* per guidelines.
* V3.0.4: 20.06.2011 : data width of interrupt control registers is changed
* from unit8 to unit16 in Can_EnableControllerInterrupts
* API as per SCR ANMCANLINFR3_SCR_107.
* V3.0.4a: 16.11.2011 : Can_DisableControllerInterrupts and
* Can_EnableControllerInterrupts are updated due to the
* change of the IC register operation.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Can_PBTypes.h" /* CAN Driver Post-Build Config. Header File */
#include "Can_Int.h" /* CAN Interrupt Control Header File */
#include "Can_Ram.h" /* CAN Driver RAM Header File */
#include "Can_Tgt.h" /* CAN Driver Target Header File */
#if (CAN_DEV_ERROR_DETECT == STD_ON)
#include "Det.h" /* DET Header File */
#endif
#include "SchM_Can.h" /* Scheduler Header File */
#include "Dem.h" /* DEM Header File */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define CAN_INT_C_AR_MAJOR_VERSION 2
#define CAN_INT_C_AR_MINOR_VERSION 2
#define CAN_INT_C_AR_PATCH_VERSION 2
/* File version information */
#define CAN_INT_C_SW_MAJOR_VERSION 3
#define CAN_INT_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (CAN_INT_AR_MAJOR_VERSION != CAN_INT_C_AR_MAJOR_VERSION)
#error "Can_Int.c : Mismatch in Specification Major Version"
#endif
#if (CAN_INT_AR_MINOR_VERSION != CAN_INT_C_AR_MINOR_VERSION)
#error "Can_Int.c : Mismatch in Specification Minor Version"
#endif
#if (CAN_INT_AR_PATCH_VERSION != CAN_INT_C_AR_PATCH_VERSION)
#error "Can_Int.c : Mismatch in Specification Patch Version"
#endif
#if (CAN_INT_SW_MAJOR_VERSION != CAN_INT_C_SW_MAJOR_VERSION)
#error "Can_Int.c : Mismatch in Software Major Version"
#endif
#if (CAN_INT_SW_MINOR_VERSION != CAN_INT_C_SW_MINOR_VERSION)
#error "Can_Int.c : Mismatch in Software Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Can_DisableControllerInterrupts
**
** Service ID : 0x04
**
** Description : This service disables all interrupts for this CAN
** Controller.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Re-entrant
**
** Input Parameters : Controller
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The CAN Driver must be initialized.
**
** Remarks : Global Variable(s) referred in this function:
** Can_GblCanStatus, Can_GpCntrlIdArray, Can_GucIntCounter,
** Can_GpFirstController,Can_GucLastCntrlId.
**
** Function(s) invoked:
** Det_ReportError(), SchM_Enter_Can(), SchM_Exit_Can()
**
*******************************************************************************/
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, CAN_AFCAN_PUBLIC_CODE)Can_DisableControllerInterrupts
(uint8 Controller)
{
P2CONST(Can_ControllerConfigType,AUTOMATIC,
CAN_AFCAN_PRIVATE_CONST)LpController;
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit;
P2VAR(uint16,AUTOMATIC,CAN_AFCAN_CONFIG_DATA)LpIntCntrlReg;
uint16 LusTimeOutCount;
uint8_least LucCount;
#if (CAN_DEV_ERROR_DETECT == STD_ON)
boolean LblErrFlag;
#endif
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Initialize the error status flag to false */
LblErrFlag = CAN_FALSE;
/* Report to DET, if module is not initialized */
if (Can_GblCanStatus == CAN_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_DISABLE_CNTRL_INT_SID,CAN_E_UNINIT);
/* Set the error status flag to true */
LblErrFlag = CAN_TRUE;
}
/* Report to DET, if the Controller Id is out of range */
else if(Controller > Can_GucLastCntrlId)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_DISABLE_CNTRL_INT_SID,CAN_E_PARAM_CONTROLLER);
/* Set the error status flag to true */
LblErrFlag = CAN_TRUE;
}
else
{
/* Get the Controller index */
Controller = Can_GpCntrlIdArray[Controller];
/* Check whether the Controller index is present or not */
if(Controller == CAN_LIMIT)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_DISABLE_CNTRL_INT_SID,CAN_E_PARAM_CONTROLLER);
/* Set the error status flag to true */
LblErrFlag = CAN_TRUE;
}
}
/* Check whether any development error occurred */
if(LblErrFlag != CAN_TRUE)
#endif
{
#if (CAN_DEV_ERROR_DETECT == STD_OFF)
/* Get the Controller index */
Controller = Can_GpCntrlIdArray[Controller];
#endif
/* MISRA Rule : 21.1
Message : Indexing array with value that will apparently be
out of bounds.
Reason : Negative value is not being used and verified.
Verification : However, the part of the code is
verified manually and it is not having
any impact on code.
*/
/* Check whether Interrupt counter is equal to zero */
if(Can_GucIntCounter[Controller] == CAN_ZERO)
{
/* Get the pointer to the Controller structure */
LpController = &Can_GpFirstController[Controller];
/* Get the pointer to the 16-bit control register structure */
LpCntrlReg16bit = LpController->pCntrlReg16bit;
/* Disable Wakeup and TxCancel interrupts in peripheral level */
LpCntrlReg16bit->usFcnCmieCtl = CAN_CLR_WUP_TXCANCEL_INTERRUPT;
/* Clear Wakeup and TxCancel interrupt status in peripheral level */
LpCntrlReg16bit->usFcnCmisCtl = CAN_CLR_WUP_TXCANCEL_INTERRUPT;
/* Get the pointer to EIC register */
LpIntCntrlReg = (LpController->pIntCntrlReg);
/* Initialize EIC Count */
#if (CAN_WAKEUP_INTERRUPTS_TIED == TRUE)
LucCount = CAN_THREE;
#else
LucCount = CAN_FOUR;
#endif
/* Loop to disable all interrupts in EIC */
do
{
*(uint8 *)LpIntCntrlReg |= (uint8)CAN_IRQ_REQ_DIS;
/* Get the Timeout count value and store it in a local variable */
LusTimeOutCount = CAN_TIMEOUT_COUNT;
/* Check whether controller interrupts are disabled and Timeout count
is expired or not */
do
{
/* Decrement the Timeout count */
LusTimeOutCount--;
}while(((*LpIntCntrlReg & CAN_IRQ_REQ_DIS) != CAN_IRQ_REQ_DIS) &&
(LusTimeOutCount != CAN_ZERO));
/* Check whether Timeout count is expired or not */
if(LusTimeOutCount == CAN_ZERO)
{
/* Report to DEM for hardware failure */
Dem_ReportErrorStatus(CAN_E_TIMEOUT, DEM_EVENT_STATUS_FAILED);
}
/* MISRA Rule : 17.4
Message : Performing pointer arithmetic
on pointer 'LpIntCntrlReg'.
Reason : pointer arithmetic is performed to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to next EIC register */
LpIntCntrlReg++;
/* Decrement the EIC Count */
LucCount--;
}while(LucCount != CAN_ZERO);
} /* if(Can_GucIntCounter[Controller] == CAN_ZERO) */
/* MISRA Rule : 21.1
Message : Indexing array with value that will apparently be
out of bounds.
Reason : Negative value is not being used and verified.
Verification : However, the part of the code is
verified manually and it is not having
any impact on code.
*/
/* Increment the interrupt counter */
Can_GucIntCounter[Controller]++;
}/* if(LblErrFlag != CAN_TRUE) */
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Can_EnableControllerInterrupts
**
** Service ID : 0x05
**
** Description : This service enables all interrupts for this CAN
** Controller.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Re-entrant
**
** Input Parameters : Controller
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The CAN Driver must be initialized.
**
** Remarks : Global Variable(s) referred in this function:
** Can_GblCanStatus, Can_GpCntrlIdArray, Can_GucIntCounter,
** Can_GpFirstController,Can_GucLastCntrlId.
**
** Function(s) invoked:
** Det_ReportError(), SchM_Enter_Can(), SchM_Exit_Can()
**
*******************************************************************************/
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, CAN_AFCAN_PUBLIC_CODE)Can_EnableControllerInterrupts
(uint8 Controller)
{
P2CONST(Can_ControllerConfigType,AUTOMATIC,
CAN_AFCAN_PRIVATE_CONST) LpController;
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit;
P2VAR(uint16,AUTOMATIC,CAN_AFCAN_CONFIG_DATA)LpIntCntrlReg;
uint16 LusTimeOutCount;
#if (CAN_DEV_ERROR_DETECT == STD_ON)
boolean LblErrFlag;
#endif
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Initialize the error status flag to false */
LblErrFlag = CAN_FALSE;
/* Report to DET, if module is not initialized */
if (Can_GblCanStatus == CAN_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_ENABLE_CNTRL_INT_SID, CAN_E_UNINIT);
/* Set the error status flag to true */
LblErrFlag = CAN_TRUE;
}
/* Report to DET, if the Controller Id is out of range */
else if(Controller > Can_GucLastCntrlId)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_ENABLE_CNTRL_INT_SID, CAN_E_PARAM_CONTROLLER);
/* Set the error status flag to true */
LblErrFlag = CAN_TRUE;
}
else
{
/* Get the Controller index */
Controller = Can_GpCntrlIdArray[Controller];
/* Check if the Controller index is present or not */
if(Controller == CAN_LIMIT)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_ENABLE_CNTRL_INT_SID, CAN_E_PARAM_CONTROLLER);
/* Set the error status flag to true */
LblErrFlag = CAN_TRUE;
}
}
/* Check whether any development error occurred */
if(LblErrFlag != CAN_TRUE)
#endif
{
#if (CAN_DEV_ERROR_DETECT == STD_OFF)
/* Get the Controller index */
Controller = Can_GpCntrlIdArray[Controller];
#endif
/* MISRA Rule : 21.1
Message : Indexing array with value that will apparently be
out of bounds.(Can_GucIntCounter)
Reason : Negative value is not being used and verified.
Verification : However, the part of the code is
verified manually and it is not having
any impact on code.
*/
/* Check whether interrupt counter is equal to zero or not */
if(Can_GucIntCounter[Controller] != CAN_ZERO)
{
/* Decrement the interrupt counter */
Can_GucIntCounter[Controller]--;
/* Check whether interrupt counter is equal to zero */
if(Can_GucIntCounter[Controller] == CAN_ZERO)
{
/* Get the pointer to the Controller structure */
LpController = &Can_GpFirstController[Controller];
/* Get the pointer to the 16-bit control register structure */
LpCntrlReg16bit = LpController->pCntrlReg16bit;
/* Enable all interrupts in peripheral level */
LpCntrlReg16bit->usFcnCmieCtl = LpController->usIntEnable;
/* Get the pointer to EIC register */
LpIntCntrlReg = (LpController->pIntCntrlReg);
/* Enable error interrupt in EIC if bus-off configured */
*(uint8 *)LpIntCntrlReg &= (uint8)(LpController->usMaskERRReg);
/* MISRA Rule : 17.4
Message : Performing pointer arithmetic.
Reason : Increment operator not used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
#if (CAN_WAKEUP_INTERRUPTS_TIED == TRUE)
/* Increment the pointer to point to next EIC register */
LpIntCntrlReg++;
#else
LpIntCntrlReg += CAN_TWO;
#endif
/* Enable receive interrupt in EIC if configured */
*(uint8 *)LpIntCntrlReg &= (uint8)(LpController->usMaskRECReg);
/* MISRA Rule : 17.4
Message : Performing pointer arithmetic.
Reason : Increment operator not used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to next EIC register */
LpIntCntrlReg++;
/* Enable transmit interrupt in EIC if configured */
*(uint8 *)LpIntCntrlReg &= (uint8)(LpController->usMaskTRXReg);
/* Get the pointer to wake-up ICR register */
LpIntCntrlReg = (LpController->pWupIntCntrlReg);
/* Enable wake-up interrupt in EIC if configured */
*(uint8 *)LpIntCntrlReg &= (uint8) (LpController->usMaskWUPReg);
} /* if(Can_GucIntCounter[Controller] == CAN_ZERO) */
} /* if(Can_GucIntCounter[Controller] != CAN_ZERO) */
}/* if(LblErrFlag != CAN_TRUE) */
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Mcu/Mcu_Version.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Mcu_Version.c */
/* Version = 3.0.1 */
/* Date = 15-Mar-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2010-2013 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains version check of modules included by MCU Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Fx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 02-Jul-2010 : Initial Version
*
* V3.0.0a: 18-Oct-2011 : Copyright is updated.
*
* V3.0.1: 15-Mar-2013 : As per SCR 091, Alignment is changed as per code
* guidelines.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Mcu_Version.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification version information */
#define MCU_VERSION_C_AR_MAJOR_VERSION MCU_AR_MAJOR_VERSION_VALUE
#define MCU_VERSION_C_AR_MINOR_VERSION MCU_AR_MINOR_VERSION_VALUE
#define MCU_VERSION_C_AR_PATCH_VERSION MCU_AR_PATCH_VERSION_VALUE
/* File version information */
#define MCU_VERSION_C_SW_MAJOR_VERSION 3
#define MCU_VERSION_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (MCU_VERSION_AR_MAJOR_VERSION != MCU_VERSION_C_AR_MAJOR_VERSION)
#error "Mcu_Version.c : Mismatch in Specification Major Version"
#endif
#if (MCU_VERSION_AR_MINOR_VERSION != MCU_VERSION_C_AR_MINOR_VERSION)
#error "Mcu_Version.c : Mismatch in Specification Minor Version"
#endif
#if (MCU_VERSION_AR_PATCH_VERSION != MCU_VERSION_C_AR_PATCH_VERSION)
#error "Mcu_Version.c : Mismatch in Specification Patch Version"
#endif
#if (MCU_VERSION_SW_MAJOR_VERSION != MCU_VERSION_C_SW_MAJOR_VERSION)
#error "Mcu_Version.c : Mismatch in Major Version"
#endif
#if (MCU_VERSION_SW_MINOR_VERSION != MCU_VERSION_C_SW_MINOR_VERSION)
#error "Mcu_Version.c : Mismatch in Minor Version"
#endif
/* Dem Module Version Check */
#if (DEM_AR_MAJOR_VERSION != MCU_DEM_AR_MAJOR_VERSION)
#error "Dem.h : Mismatch in Specification Major Version"
#endif
#if (DEM_AR_MINOR_VERSION != MCU_DEM_AR_MINOR_VERSION)
#error "Dem.h : Mismatch in Specification Minor Version"
#endif
/* SchM Module Version Check */
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
#if (SCHM_AR_MAJOR_VERSION != MCU_SCHM_AR_MAJOR_VERSION)
#error "SchM.h : Mismatch in Specification Major Version"
#endif
#if (SCHM_AR_MINOR_VERSION != MCU_SCHM_AR_MINOR_VERSION)
#error "SchM.h : Mismatch in Specification Minor Version"
#endif
#endif /* #if(MCU_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* Det Module Version Check */
#if (MCU_DEV_ERROR_DETECT == STD_ON)
#if (DET_AR_MAJOR_VERSION != MCU_DET_AR_MAJOR_VERSION)
#error "Det.h : Mismatch in Specification Major Version"
#endif
#if (DET_AR_MINOR_VERSION != MCU_DET_AR_MINOR_VERSION)
#error "Det.h : Mismatch in Specification Minor Version"
#endif
#endif /* #if (MCU_DEV_ERROR_DETECT == STD_ON) */
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/NvM/NvM_Queue.c
/**
\addtogroup MODULE_NvM NvM
Non-volatile Memory Management Module.
*/
/*@{*/
/***************************************************************************//**
\file NvM_Queue.h
\brief Implementation of queue.
\author Lvsf
\version 1.0
\date 2012-3-28
\warning Copyright (C), 2012, PATAC.
*//*----------------------------------------------------------------------------
\history
<No.> <author> <time> <version> <description>
1 Lvsf 2012-3-28 1.0 Create
*******************************************************************************/
/*******************************************************************************
Include Files
*******************************************************************************/
#include "NvM_JobProc.h"
#include "NvM_Queue.h"
/*******************************************************************************
Macro Definition
*******************************************************************************/
/*******************************************************************************
Type Definition
*******************************************************************************/
/*******************************************************************************
Prototype Declaration
*******************************************************************************/
static void InitQueue(Queue_t* Queue);
static uint8 PushQueue(Queue_t* Queue, RamBlock_t* Job);
static uint8 PopQueue(Queue_t* Queue, RamBlock_t** Job);
/*******************************************************************************
Variable Definition
*******************************************************************************/
/**
\var static Queue_t JobQueue
Job Queue.
*/
static Queue_t JobQueue;
/*******************************************************************************
Function Definition
*******************************************************************************/
/***************************************************************************//**
\fn void NvM_ClearJob(void)
\author Lvsf
\date 2012-3-28
\brief Clear all job from queue.
*******************************************************************************/
void NvM_ClearJob(void)
{
InitQueue(&JobQueue);
}
/***************************************************************************//**
\fn uint8 NvM_QueueJob(uint16 BlockId, uint16 ServiceId,
uint8* BufferPtr)
\author Lvsf
\date 2012-3-28
\param[in] BlockId :Block ID.
\param[in] ServiceId :Service ID.
\param[in] BufferPtr :RAM data pointer.
\return FALSE: Failure/TRUE: Success.
\brief Add job to queue.
*******************************************************************************/
uint8 NvM_QueueJob(uint16 BlockId, uint16 ServiceId, uint8* BufferPtr)
{
uint8 Status;
uint8 ret = FALSE;
Status = NvM_BlockMngmtArea[BlockId].NvRamErrorStatus;
if (NVM_REQ_PENDING != Status)
{
if(PushQueue(&JobQueue, &NvM_BlockMngmtArea[BlockId]))
{
NvM_BlockMngmtArea[BlockId].BlockId = BlockId;
NvM_BlockMngmtArea[BlockId].ServiceId = ServiceId;
NvM_BlockMngmtArea[BlockId].RamBlockDataAddr = BufferPtr;
NvM_BlockMngmtArea[BlockId].NvRamErrorStatus = NVM_REQ_PENDING;
ret = TRUE;
}
else
{
}
}
else
{
}
return ret;
}
/***************************************************************************//**
\fn uint8 NvM_GetJob(RamBlock_t** Job)
\author Lvsf
\date 2012-3-28
\param[out] Job :The pointer to element.
\return FALSE: Failure/TRUE: Success.
\brief Get job from queue.
*******************************************************************************/
uint8 NvM_GetJob(RamBlock_t** Job)
{
uint8 ret = FALSE;
if(PopQueue(&JobQueue, Job))
{
ret = TRUE;
}
else
{
}
return ret;
}
/***************************************************************************//**
\fn static void InitQueue(Queue_t* Queue)
\author Lvsf
\date 2012-3-28
\param[in] Queue :The pointer to queue.
\brief Init queue.
*******************************************************************************/
static void InitQueue(Queue_t* Queue)
{
if(NULL != Queue)
{
Queue->Front = 0;
Queue->Rear = 0;
}
else
{
}
}
/***************************************************************************//**
\fn static uint8 PushQueue(Queue_t* Queue, RamBlock_t* Job)
\author Lvsf
\date 2012-3-28
\param[in] Queue :The pointer to queue.
\param[in] Job :The pointer to element.
\return FALSE: Failure/TRUE: Success.
\brief Push element into queue.
*******************************************************************************/
static uint8 PushQueue(Queue_t* Queue, RamBlock_t* Job)
{
uint8 ret = FALSE;
if(NULL != Queue)
{
if((Queue->Rear+1)%NVM_QUEUE_SIZE != Queue->Front)
{
Queue->Data[Queue->Rear] = Job;
Queue->Rear = (Queue->Rear+1)%NVM_QUEUE_SIZE;
ret = TRUE;
}
else
{
}
}
else
{
}
return ret;
}
/***************************************************************************//**
\fn static uint8 PopQueue(Queue_t* Queue, RamBlock_t** Job)
\author Lvsf
\date 2012-3-28
\param[in] Queue :The pointer to queue.
\param[out] Job :The pointer to element.
\return FALSE: Failure/TRUE: Success.
\brief Pop element from queue.
*******************************************************************************/
static uint8 PopQueue(Queue_t* Queue, RamBlock_t** Job)
{
uint8 ret = FALSE;
if(NULL != Queue)
{
if(Queue->Front != Queue->Rear)
{
*Job = Queue->Data[Queue->Front];
Queue->Front = (Queue->Front+1)%NVM_QUEUE_SIZE;
ret = TRUE;
}
else
{
}
}
else
{
}
return ret;
}
<file_sep>/BSP/Common/Compiler/CompilerSelect.h
/*Select the compiler*/
#ifndef _COMPILERSELECT_H
#define _COMPILERSELECT_H
/*Select memroy mapping file
*if greenhills, use MemMap_GHS.h
*if CX, use MemMap_CX.h
* Note, for sourceinsight parser, comments the unused option with "//"
*/
#define COMPILER_GHS 1
//#define COMPILER_CX 1
#endif
<file_sep>/BSP/MCAL/Can/Can_PBcfg.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Can_PBcfg.c */
/* Version = 3.0.0 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of Configuration information. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: : Initial version
*/
/******************************************************************************/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.0.13a
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_MCU_V304_130427.arxml
* EcuM_Can.arxml
* FK4_4010_CAN_TST.arxml
* GENERATED ON: 24 Jul 2013 - 16:51:03
*/
/*******************************************************************************
** Include Section **
*******************************************************************************/
/* CAN Post Build configuration header */
#include "Can_PBTypes.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* Autosar Specification Version Information */
#define CAN_PBCFG_C_AR_MAJOR_VERSION 2
#define CAN_PBCFG_C_AR_MINOR_VERSION 2
#define CAN_PBCFG_C_AR_PATCH_VERSION 2
/* File Version Information */
#define CAN_PBCFG_C_SW_MAJOR_VERSION 3
#define CAN_PBCFG_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (CAN_PBTYPES_AR_MAJOR_VERSION != CAN_PBCFG_C_AR_MAJOR_VERSION)
#error "Can_PBcfg.c : Mismatch in Specification Major Version"
#endif
#if (CAN_PBTYPES_AR_MINOR_VERSION != CAN_PBCFG_C_AR_MINOR_VERSION)
#error "Can_PBcfg.c : Mismatch in Specification Minor Version"
#endif
#if (CAN_PBTYPES_AR_PATCH_VERSION != CAN_PBCFG_C_AR_PATCH_VERSION)
#error "Can_PBcfg.c : Mismatch in Specification Patch Version"
#endif
#if (CAN_PBTYPES_SW_MAJOR_VERSION != CAN_PBCFG_C_SW_MAJOR_VERSION)
#error "Can_PBcfg.c : Mismatch in Major Version"
#endif
#if (CAN_PBTYPES_SW_MINOR_VERSION != CAN_PBCFG_C_SW_MINOR_VERSION)
#error "Can_PBcfg.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
#define CAN_AFCAN_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* Global array for Byte allocation */
VAR(uint8, CAN_AFCAN_NOINIT_DATA) Can_AFCan_GaaPBByteArray[4];
/* Array of CanTxPduId */
VAR(PduIdType, CAN_AFCAN_NOINIT_DATA) Can_AFCan_GaaCanTxPduId[2];
/* Global array for storing the Tx Cancellation status of BasicCan Hth */
/* VAR(uint8, CAN_AFCAN_NOINIT_DATA) Can_AFCan_GaaTxCancelStsFlgs[]; */
/* Global array for counting the number of Tx Cancellations */
/* VAR (uint8, CAN_AFCAN_NOINIT_DATA) Can_GaaTxCancelCtr[]; */
#define CAN_AFCAN_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
/* Global array for Config Structure */
CONST(Can_ConfigType, CAN_AFCAN_CONST) Can_AFCan_GaaConfigType[] =
{
/* Configuration 0 - Can1_CanConfigSet_1 */
{
/* *ulStartOfDbToc */
0x5D40300,
/* *pFirstController */
(P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_CONFIG_CONST))
&Can_AFCan_GaaControllerConfigType[0],
/* *pFirstHth */
(P2CONST(Tdd_Can_AFCan_Hth, AUTOMATIC, CAN_AFCAN_CONFIG_CONST))
&Can_AFCan_GaaHth[0],
/* *pCntrlIdArray */
(P2CONST(uint8, AUTOMATIC, CAN_AFCAN_CONFIG_CONST))
&Can_AFCan_GaaCntrlArrayId[0],
/* ucFirstHthId */
2,
/* ucLastHthId */
3,
/* ucLastCntrlId */
1
}
};
#define CAN_AFCAN_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_DBTOC_CTRL_CFG_DATA_UNSPECIFIED
#include "MemMap.h"
/* Global array for Controller Config Structure */
CONST(Can_ControllerConfigType, CAN_AFCAN_CONST) Can_AFCan_GaaControllerConfigType[] =
{
/* CONTROLLER 0 - Can1_CanConfigSet_1_0 */
{
/* *pFilterMask */
(P2CONST(Tdd_Can_AFCan_HwFilterMask, AUTOMATIC, CAN_AFCAN_CONFIG_CONST))
NULL_PTR,
/* *pIntCntrlReg */
(P2VAR(uint16, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFFFF6108,
/* *pWupIntCntrlReg */
(P2VAR(uint16, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFFFF60D2,
/* *pWkpStsFlag */
(P2VAR(uint8,AUTOMATIC,CAN_AFCAN_CONFIG_DATA))
&Can_AFCan_GaaPBByteArray[0],
/* *pHrh */
(P2CONST(Tdd_Can_AFCan_Hrh, AUTOMATIC, CAN_AFCAN_CONFIG_CONST))
&Can_AFCan_GaaHrh[0],
/* *pHth */
(P2CONST(Tdd_Can_AFCan_Hth, AUTOMATIC, CAN_AFCAN_CONFIG_CONST))
&Can_AFCan_GaaHth[0],
/* *pCntrlReg8bit */
(P2VAR(Tdd_Can_AFCan_8bit_CntrlReg, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFF4A0008ul,
/* *pCntrlReg16bit */
(P2VAR(Tdd_Can_AFCan_16bit_CntrlReg, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFF4A8000ul,
/* *pCntrlReg32bit */
(P2VAR(Tdd_Can_AFCan_32bit_CntrlReg, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFF4B00C0ul,
/* *pCntrlMode */
(P2VAR(uint8, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
&Can_AFCan_GaaPBByteArray[1],
/* ddWakeupSourceId */
0x02,
/* usIntEnable */
0x0000,
/* usBTR */
0x000D,
/* usMaskERRReg */
0x108F,
/* usMaskWUPReg */
0x108F,
/* usMaskRECReg */
0x108F,
/* usMaskTRXReg */
0x108F,
/* ucBRP */
0x03,
/* ucNoOfFilterMask */
0,
/* ucNoOfHrh */
1,
/* ucNoOfHth */
1,
/* ssHthOffSetId */
-1,
/* ucHrhOffSetId */
0,
/* ucCntrlRegId */
0,
/* ucMaxNoOfMsgBufs */
0x40
},
/* CONTROLLER 1 - Can1_CanConfigSet_1_1 */
{
/* *pFilterMask */
(P2CONST(Tdd_Can_AFCan_HwFilterMask, AUTOMATIC, CAN_AFCAN_CONFIG_CONST))
NULL_PTR,
/* *pIntCntrlReg */
(P2VAR(uint16, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFFFF60D4,
/* *pWupIntCntrlReg */
(P2VAR(uint16, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFFFF60D2,
/* *pWkpStsFlag */
(P2VAR(uint8,AUTOMATIC,CAN_AFCAN_CONFIG_DATA))
&Can_AFCan_GaaPBByteArray[2],
/* *pHrh */
(P2CONST(Tdd_Can_AFCan_Hrh, AUTOMATIC, CAN_AFCAN_CONFIG_CONST))
&Can_AFCan_GaaHrh[1],
/* *pHth */
(P2CONST(Tdd_Can_AFCan_Hth, AUTOMATIC, CAN_AFCAN_CONFIG_CONST))
&Can_AFCan_GaaHth[1],
/* *pCntrlReg8bit */
(P2VAR(Tdd_Can_AFCan_8bit_CntrlReg, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFF480008ul,
/* *pCntrlReg16bit */
(P2VAR(Tdd_Can_AFCan_16bit_CntrlReg, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFF488000ul,
/* *pCntrlReg32bit */
(P2VAR(Tdd_Can_AFCan_32bit_CntrlReg, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFF4900C0ul,
/* *pCntrlMode */
(P2VAR(uint8, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
&Can_AFCan_GaaPBByteArray[3],
/* ddWakeupSourceId */
0x02,
/* usIntEnable */
0x0000,
/* usBTR */
0x000D,
/* usMaskERRReg */
0x108F,
/* usMaskWUPReg */
0x108F,
/* usMaskRECReg */
0x108F,
/* usMaskTRXReg */
0x108F,
/* ucBRP */
0x03,
/* ucNoOfFilterMask */
0,
/* ucNoOfHrh */
1,
/* ucNoOfHth */
1,
/* ssHthOffSetId */
0,
/* ucHrhOffSetId */
1,
/* ucCntrlRegId */
1,
/* ucMaxNoOfMsgBufs */
0x40
}
};
#define CAN_AFCAN_STOP_SEC_DBTOC_CTRL_CFG_DATA_UNSPECIFIED
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
/* Global array for Controller Id*/
CONST(uint8, CAN_AFCAN_CONST) Can_AFCan_GaaCntrlArrayId[] =
{
/* CONTROLLER 0 - Can1_CanConfigSet_1_0 */
0x00,
/* CONTROLLER 1 - Can1_CanConfigSet_1_1 */
0x01
};
/* Global array for BasicCanHth Id*/
/* CONST(uint8, CAN_AFCAN_CONST) Can_AFCan_GaaBasicCanHth[]; */
/* Hardware Receive Handle Structure */
CONST(Tdd_Can_AFCan_Hrh, CAN_AFCAN_CONST) Can_AFCan_GaaHrh[] =
{
/* HRH 0 - Can1_CanConfigSet_1hrh_0 */
{
/* *pMsgBuffer8bit */
(P2VAR(Tdd_Can_AFCan_8bit_MsgBuffer, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFF4A1000,
/* *pMsgBuffer16bit */
(P2VAR(Tdd_Can_AFCan_16bit_MsgBuffer, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFF4A9000,
/* *pMsgBuffer32bit */
(P2VAR(Tdd_Can_AFCan_32bit_MsgBuffer, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFF4B1000,
/* usCanIdHigh */
0x08C0,
/* ucMConfigReg */
0x89
},
/* HRH 1 - Can1_CanConfigSet_1hrh_1 */
{
/* *pMsgBuffer8bit */
(P2VAR(Tdd_Can_AFCan_8bit_MsgBuffer, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFF481000,
/* *pMsgBuffer16bit */
(P2VAR(Tdd_Can_AFCan_16bit_MsgBuffer, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFF489000,
/* *pMsgBuffer32bit */
(P2VAR(Tdd_Can_AFCan_32bit_MsgBuffer, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFF491000,
/* usCanIdHigh */
0x0480,
/* ucMConfigReg */
0x89
}
};
/* Hardware Transmit Handle Structure */
CONST(Tdd_Can_AFCan_Hth,CAN_AFCAN_CONST) Can_AFCan_GaaHth[] =
{
/* HTH 0 - Can1_CanConfigSet_1hth_2 */
{
/* *pMsgBuffer8bit */
(P2VAR(Tdd_Can_AFCan_8bit_MsgBuffer, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFF4A1040,
/* *pMsgBuffer16bit */
(P2VAR(Tdd_Can_AFCan_16bit_MsgBuffer, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFF4A9040,
/* *pMsgBuffer32bit */
(P2VAR(Tdd_Can_AFCan_32bit_MsgBuffer, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFF4B1040,
/* *pCanTxPduId */
(P2VAR(PduIdType, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
&Can_AFCan_GaaCanTxPduId[0],
/* ucController */
0x00
},
/* HTH 1 - Can1_CanConfigSet_1hth_3 */
{
/* *pMsgBuffer8bit */
(P2VAR(Tdd_Can_AFCan_8bit_MsgBuffer, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFF481040,
/* *pMsgBuffer16bit */
(P2VAR(Tdd_Can_AFCan_16bit_MsgBuffer, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFF489040,
/* *pMsgBuffer32bit */
(P2VAR(Tdd_Can_AFCan_32bit_MsgBuffer, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
0xFF491040,
/* *pCanTxPduId */
(P2VAR(PduIdType, AUTOMATIC, CAN_AFCAN_CONFIG_DATA))
&Can_AFCan_GaaCanTxPduId[1],
/* ucController */
0x01
}
};
/* Filter Mask Structure */
/* CONST(Tdd_Can_AFCan_HwFilterMask, CAN_AFCAN_CONST) Can_AFCan_GaaFilterMask[]; */
#define CAN_AFCAN_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** END OF FILE **
*******************************************************************************/
<file_sep>/APP/LEDPWMActOut/CAL3_LEDPWMActOut.h
#ifndef _CAL3_LEDPWMActOut_H
#define _CAL3_LEDPWMActOut_H
#include "std_types.h"
#endif
<file_sep>/BSP/MCAL/Fee/Fee_Cfg.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Fee_Cfg.h */
/* Version = 3.0.0 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains pre-compile time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: : Initial version
*/
/******************************************************************************/
/*******************************************************************************
** FEE Component Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.0.6a
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_FEE_V304_130924_NEWCLEAPLUS.arxml
* GENERATED ON: 26 Sep 2013 - 09:00:16
*/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Fee.h"
#include "Fee_Types.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define FEE_CFG_C_AR_MAJOR_VERSION 1
#define FEE_CFG_C_AR_MINOR_VERSION 2
#define FEE_CFG_C_AR_PATCH_VERSION 0
/*
* File version information
*/
#define FEE_CFG_C_SW_MAJOR_VERSION 3
#define FEE_CFG_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (FEE_CFG_AR_MAJOR_VERSION != FEE_CFG_C_AR_MAJOR_VERSION)
#error "Fee_Cfg.c : Mismatch in Specification Major Version"
#endif
#if (FEE_CFG_AR_MINOR_VERSION != FEE_CFG_C_AR_MINOR_VERSION)
#error "Fee_Cfg.c : Mismatch in Specification Minor Version"
#endif
#if (FEE_CFG_AR_PATCH_VERSION != FEE_CFG_C_AR_PATCH_VERSION)
#error "Fee_Cfg.c : Mismatch in Specification Patch Version"
#endif
#if (FEE_CFG_SW_MAJOR_VERSION != FEE_CFG_C_SW_MAJOR_VERSION)
#error "Fee_Cfg.c : Mismatch in Major Version"
#endif
#if (FEE_CFG_SW_MINOR_VERSION != FEE_CFG_C_SW_MINOR_VERSION)
#error "Fee_Cfg.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
#define FEE_START_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
CONST(Tdd_Fee_BlockConfigType, FEE_CONST) Fee_GstBlockConfiguration[4] =
{
/* BLOCK: 0 - 2 */
{
/* usFeeBlockNumber */
0x0002,
/* usFeeBlockSize */
0x0064,
/* blFeeImmediateData */
FEE_FALSE
},
/* BLOCK: 1 - 4 */
{
/* usFeeBlockNumber */
0x0004,
/* usFeeBlockSize */
0x00C8,
/* blFeeImmediateData */
FEE_FALSE
},
/* BLOCK: 2 - 8 */
{
/* usFeeBlockNumber */
0x0008,
/* usFeeBlockSize */
0x01F4,
/* blFeeImmediateData */
FEE_FALSE
},
/* BLOCK: 3 - 16 */
{
/* usFeeBlockNumber */
0x0010,
/* usFeeBlockSize */
0x03E8,
/* blFeeImmediateData */
FEE_FALSE
}
};
#if (FEE_UPPER_LAYER_NOTIFICATION == STD_ON)
/* CONST(Tdd_Fee_FuncType, FEE_CONST) Fee_GstFunctionNotification[]; */
#endif
#define FEE_STOP_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/IoHwAb/IoHwAb_LED.c
/*******************************************************************************
| Include Session
|******************************************************************************/
#include "IoHwAb_LEDcfg.h"
#include "IoHwAb_LED.h"
/*******************************************************************************
| Static Local Variables Declaration
|******************************************************************************/
/* Buffer indicates if diagnostic override control request is active or not*/
static boolean SaLED_b_HwLEDDevCtrlActv[CeLED_e_ChNum];
static boolean SaLED_b_SwLEDDevCtrlActv[CeLED_e_SwLEDChNum];
static TeLED_h_ChPeriodDuty SaLED_h_HwLEDPeriodDuty[CeLED_e_ChNum];
static TeLED_h_ChPeriodDuty SaLED_h_SwLEDPeriodDuty[CeLED_e_SwLEDChNum];
/*******************************************************************************
| Extern variables and functions declaration
|******************************************************************************/
static void iLED_RefreshPeriodDuty_TPS(TeLED_ChName Le_e_LEDName);
static void iLED_RefreshPeriodDuty_TLD(TeLED_ChName Le_e_LEDName);
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
void LED_Init(void){
uint16 Le_w_LEDName;
TeLED_h_ChPeriodDuty *Lp_h_LEDPeriodDuty;
uint16 Period;
//Period = KeBSP_w_CourtesyLampPwmPeriod;
/*-------------------------------------------
Configuration Initialization
---------------------------------------------*/
/*Init the data buffer of fixed-period PWM, not the physical outputs*/
/*the physical hardware PWM output is determined by PwmInit() */
/*the physical simulate PWM output is determined by DioInit()*/
Lp_h_LEDPeriodDuty = SaLED_h_HwLEDPeriodDuty;
for(Le_w_LEDName=0; Le_w_LEDName<(uint16)CeLED_e_ChNum;Le_w_LEDName++){
Lp_h_LEDPeriodDuty->m_w_Period = CaLED_h_PWMCfg[Le_w_LEDName].m_w_InitPeriod;
Lp_h_LEDPeriodDuty->m_w_AEPeriod = Lp_h_LEDPeriodDuty->m_w_Period;
Lp_h_LEDPeriodDuty->m_w_AppPeriod = Lp_h_LEDPeriodDuty->m_w_Period;
Lp_h_LEDPeriodDuty->m_w_Duty = CaLED_h_PWMCfg[Le_w_LEDName].m_w_InitDuty;
Lp_h_LEDPeriodDuty->m_w_AEDuty = Lp_h_LEDPeriodDuty->m_w_Duty;
Lp_h_LEDPeriodDuty->m_w_AppDuty = Lp_h_LEDPeriodDuty->m_w_Duty;
Lp_h_LEDPeriodDuty++;
}
/*-------------------------------------------
RT Frequence Setting
---------------------------------------------*/
Pwm_SetPeriodAndDuty(PwmChannel8,4000,2000);
Pwm_SetPeriodAndDuty(PwmChannel9,4000,2000);
Pwm_SetPeriodAndDuty(PwmChannel10,4000,2000);
Pwm_SetPeriodAndDuty(PwmChannel11,4000,2000);
}
void LED_SetHwLED_TPS(TeLED_ChName Channel, uint16 Period, uint16 Duty, TeLED_Mode Mode){
/* pointer to pwm period&duty configuraion*/
TeLED_h_ChPeriodDuty *Lp_h_LEDPeriodDuty;
Lp_h_LEDPeriodDuty = &SaLED_h_HwLEDPeriodDuty[Channel];
if(LED_MODE_DEVCTRL == Mode){
SaLED_b_HwLEDDevCtrlActv[Channel] = TRUE;
/*save history period and duty if previous mode is normal mode(device control inactive mode)*/
Lp_h_LEDPeriodDuty->m_w_AEPeriod = Period;
Lp_h_LEDPeriodDuty->m_w_AEDuty = Duty;
Lp_h_LEDPeriodDuty->m_w_Period = Period;
Lp_h_LEDPeriodDuty->m_w_Duty = Duty;
}else if((LED_MODE_NORMAL == Mode)&&(FALSE==SaLED_b_HwLEDDevCtrlActv[Channel])){
/*save history period and duty if previous mode is normal mode(device control inactive mode)*/
Lp_h_LEDPeriodDuty->m_w_AppPeriod = Period;
Lp_h_LEDPeriodDuty->m_w_AppDuty = Duty;
Lp_h_LEDPeriodDuty->m_w_Period = Period;
Lp_h_LEDPeriodDuty->m_w_Duty = Duty;
}else{
Lp_h_LEDPeriodDuty->m_w_AppPeriod = Period;
Lp_h_LEDPeriodDuty->m_w_AppDuty = Duty;
}
iLED_RefreshPeriodDuty_TPS(Channel); /* reflect your setting into hardware directly */
}
void LED_SetHwLED_TLD(TeLED_ChName Channel, uint16 Period, uint16 Duty, TeLED_Mode Mode){
/* pointer to pwm period&duty configuraion*/
TeLED_h_ChPeriodDuty *Lp_h_LEDPeriodDuty;
Lp_h_LEDPeriodDuty = &SaLED_h_HwLEDPeriodDuty[Channel];
if(LED_MODE_DEVCTRL == Mode){
SaLED_b_HwLEDDevCtrlActv[Channel] = TRUE;
/*save history period and duty if previous mode is normal mode(device control inactive mode)*/
Lp_h_LEDPeriodDuty->m_w_AEPeriod = Period;
Lp_h_LEDPeriodDuty->m_w_AEDuty = Duty;
Lp_h_LEDPeriodDuty->m_w_Period = Period;
Lp_h_LEDPeriodDuty->m_w_Duty = Duty;
}else if((LED_MODE_NORMAL == Mode)&&(FALSE==SaLED_b_HwLEDDevCtrlActv[Channel])){
/*save history period and duty if previous mode is normal mode(device control inactive mode)*/
Lp_h_LEDPeriodDuty->m_w_AppPeriod = Period;
Lp_h_LEDPeriodDuty->m_w_AppDuty = Duty;
Lp_h_LEDPeriodDuty->m_w_Period = Period;
Lp_h_LEDPeriodDuty->m_w_Duty = Duty;
}else{
Lp_h_LEDPeriodDuty->m_w_AppPeriod = Period;
Lp_h_LEDPeriodDuty->m_w_AppDuty = Duty;
}
iLED_RefreshPeriodDuty_TLD(Channel); /* reflect your setting into hardware directly */
}
void iLED_RefreshPeriodDuty_TPS(Channel){
const TePWM_h_Config *Lp_h_PwmConfig;
TeLED_h_ChPeriodDuty *Lp_h_LEDPeriodDuty;
Lp_h_PwmConfig = &CaLED_h_PWMCfg[Channel]; /* find your led's pwm channel for dimming */
Lp_h_LEDPeriodDuty = &SaLED_h_HwLEDPeriodDuty[Channel]; /* The period and duty you want to set */
/* Resetting LED's PWM and Period to Dimming */
if(CeIoHwAb_e_PwmTypeHw == Lp_h_PwmConfig->m_e_PwmType){
/*update PWM output immediately*/
Pwm_SetPeriodAndDuty(
Lp_h_PwmConfig->m_w_ChannelId,
Lp_h_LEDPeriodDuty->m_w_Period,
Lp_h_LEDPeriodDuty->m_w_Duty);
}else if(CeIoHwAb_e_PwmTypeSim == Lp_h_PwmConfig->m_e_PwmType){
/*let simulate PWM handler to update output*/
}else{
/*incorrect condition*/
}
}
void iLED_RefreshPeriodDuty_TLD(Channel){
const TePWM_h_Config *Lp_h_PwmConfig;
TeLED_h_ChPeriodDuty *Lp_h_LEDPeriodDuty;
Lp_h_PwmConfig = &CaLED_h_PWMCfg[Channel]; /* find your led's pwm channel for dimming */
Lp_h_LEDPeriodDuty = &SaLED_h_HwLEDPeriodDuty[Channel]; /* The period and duty you want to set */
/* Resetting LED's PWM and Period to Dimming */
if(CeIoHwAb_e_PwmTypeHw == Lp_h_PwmConfig->m_e_PwmType){
/*update PWM output immediately*/
Pwm_SetPeriodAndDuty(
Lp_h_PwmConfig->m_w_ChannelId,
Lp_h_LEDPeriodDuty->m_w_Period,
Lp_h_LEDPeriodDuty->m_w_Duty);
}
else if(CeIoHwAb_e_PwmTypeSim == Lp_h_PwmConfig->m_e_PwmType)
{
/*let simulate PWM handler to update output*/
}
else
{
/*incorrect condition*/
}
}
/*******************************************************************************
** LED1 Open **
*******************************************************************************/
void Set_LED1(void){
/* enable RT clock output */
Pwm_SetDutyCycle(PWM_12,0x4000);
/* enable PWMIN1 output */
Pwm_SetDutyCycle(PWM_10,0x0000);
}
void Clr_LED1(void){
/* enable PWMIN1 output */
Pwm_SetDutyCycle(PWM_10,0x0000);
/* enable RT clock output */
Pwm_SetDutyCycle(PWM_12,0x0000);
}
void Set_LowBeam2(void){
/* enable RT clock output */
Pwm_SetDutyCycle(PWM_9,0x4000);
/* enable PWMIN1 output */
Pwm_SetDutyCycle(PWM_6,0x0000);
}
void Clr_LowBeam2(void){
/* enable RT clock output */
Pwm_SetDutyCycle(PWM_9,0x0000);
/* enable PWMIN1 output */
Pwm_SetDutyCycle(PWM_6,0x0000);
}
void Set_LED3(void){
/* enable SET PIN */
Pwm_SetDutyCycle(PWM_3,0x4000);
/* enable ENPWMI PIN */
Pwm_SetDutyCycle(EN3PWM,0x4000);
/* enable EN_PWMI output */
Pwm_SetDutyCycle(FREQ3,0x4000);
}
void Clr_TurnLamp(void){
/* Disable SET PIN */
Pwm_SetDutyCycle(PWM_1,0x0000);
/* Disable ENPWMI PIN */
Pwm_SetDutyCycle(EN1PWM,0x0000);
/* Disable EN_PWMI output */
Pwm_SetDutyCycle(FREQ1,0x0000);
}
void Set_TurnLamp(void){
/* enable SET PIN */
Pwm_SetDutyCycle(PWM_1,0x0000);
/* enable ENPWMI PIN */
Pwm_SetDutyCycle(EN1PWM,0x0000);
/* enable EN_PWMI output */
Pwm_SetDutyCycle(FREQ1,0x4000);
}
<file_sep>/BSP/MCAL/Can/CanIf_Cbk.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = CanIf_Cbk.h */
/* Version = 3.0.0a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2008-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of external declaration of constants, global data, type */
/* definitions, APIs and service IDs. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision History **
*******************************************************************************/
/*
* V3.0.0: 12.12.2008 : Initial Version
* V3.0.0a: 18-Oct-2011 : Copyright is updated.
*/
#ifndef CANIF_CBK_H
#define CANIF_CBK_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Can.h" /* CAN Driver Header File */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
/* BusOff event referring to a CAN Controller */
extern void CanIf_ControllerBusOff (uint8 Controller);
/* RxIndication event referring to a CAN Network */
extern void CanIf_RxIndication (uint8 Hrh, Can_IdType CanId, uint8 CanDlc,
const uint8 *CanSduPtr);
/* TxConfirmaton event referring to a CAN Network */
extern void CanIf_TxConfirmation(PduIdType CanTxPduId);
/* TxCancelConfirmation event referring to a CAN Network */
extern void CanIf_CancelTxConfirmation
(P2CONST(Can_PduType, AUTOMATIC, CANIF_APPL_CONST) PduInfoPtr);
/* TxCancelConfirmation event referring to a CAN Network */
extern void CanIf_ReadRxData(uint8 Hrh,uint8 Dlc,uint8 * CanSduRxDataO);
#endif /* CANIF_CBK_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Can/Can_Ram.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Can_Ram.c */
/* Version = 3.0.3a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2008-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of initialized and unintialized global variables and constants. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12.12.2008 : Initial Version
* V3.0.1: 21.10.2009 : Updated compiler version as per
* SCR ANMCANLINFR3_SCR_031.
* V3.0.2: 11.05.2010 : Declaration of "Can_GaaTxCancelCtr" is removed
* (and moved to Can_PBCfg.c) for multiple
* configuration support as per ANMCANLINFR3_SCR_060.
* V3.0.3: 21.07.2010 : CAN_ZERO is changed as CAN_UNINITIALIZED as per
* ANMCANLINFR3_SCR_073.
* V3.0.3a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Can_PBTypes.h" /* CAN Driver Post-Build Config. Header File */
#include "Can_Ram.h" /* Module RAM header */
#include "Can_Tgt.h" /* CAN Driver Target Header File */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define CAN_RAM_C_AR_MAJOR_VERSION 2
#define CAN_RAM_C_AR_MINOR_VERSION 2
#define CAN_RAM_C_AR_PATCH_VERSION 2
/* File version information */
#define CAN_RAM_C_SW_MAJOR_VERSION 3
#define CAN_RAM_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (CAN_RAM_AR_MAJOR_VERSION != CAN_RAM_C_AR_MAJOR_VERSION)
#error "Can_Ram.c : Mismatch in Specification Major Version"
#endif
#if (CAN_RAM_AR_MINOR_VERSION != CAN_RAM_C_AR_MINOR_VERSION)
#error "Can_Ram.c : Mismatch in Specification Minor Version"
#endif
#if (CAN_RAM_AR_PATCH_VERSION != CAN_RAM_C_AR_PATCH_VERSION)
#error "Can_Ram.c : Mismatch in Specification Patch Version"
#endif
#if (CAN_RAM_SW_MAJOR_VERSION != CAN_RAM_C_SW_MAJOR_VERSION)
#error "Can_Ram.c : Mismatch in Software Major Version"
#endif
#if (CAN_RAM_SW_MINOR_VERSION != CAN_RAM_C_SW_MINOR_VERSION)
#error "Can_Ram.c : Mismatch in Software Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
#define CAN_AFCAN_START_SEC_VAR_8BIT
#include "MemMap.h"
/* Global variable to store initialization status of CAN Driver */
VAR (boolean, CAN_AFCAN_INIT_DATA) Can_GblCanStatus = CAN_UNINITIALIZED;
#if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
/* Global flag to store the status of Tx Cancel Interrupt status considering
all the controllers */
VAR (boolean, CAN_AFCAN_NOINIT_DATA) Can_GblTxCancelIntFlg;
#endif
#define CAN_AFCAN_STOP_SEC_VAR_8BIT
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_VAR_NOINIT_8BIT
#include "MemMap.h"
/* Global variable to store index of first Hth Id of the CAN Driver */
VAR (uint8, CAN_AFCAN_NOINIT_DATA) Can_GucFirstHthId;
/* Global variable to store index counter for controlling interrupt */
VAR (uint8, CAN_AFCAN_NOINIT_DATA)
Can_GucIntCounter[CAN_MAX_NUMBER_OF_CONTROLLER];
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Global variable to store index of last Hth Id of the CAN Driver */
VAR (uint8, CAN_AFCAN_NOINIT_DATA) Can_GucLastHthId;
/* Global variable to store index of last Controller Id of the CAN Driver */
VAR (uint8, CAN_AFCAN_NOINIT_DATA) Can_GucLastCntrlId;
#endif
#define CAN_AFCAN_STOP_SEC_VAR_NOINIT_8BIT
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* Global variable to store pointer to first Controller structure */
P2CONST(Can_ControllerConfigType, CAN_AFCAN_CONST, CAN_AFCAN_PRIVATE_CONST)
Can_GpFirstController;
/* Global variable to store pointer to first Hth structure */
P2CONST(Tdd_Can_AFCan_Hth, CAN_AFCAN_CONST,
CAN_AFCAN_PRIVATE_CONST)Can_GpFirstHth;
/* Global variable to store pointer of CntrlId array */
P2CONST(uint8, CAN_AFCAN_CONST, CAN_AFCAN_PRIVATE_CONST) Can_GpCntrlIdArray;
#define CAN_AFCAN_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Mcu.dp/Mcu.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Mcu.h */
/* Version = 3.0.4 */
/* Date = 15-Mar-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2010-2013 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains macros, MCU type definitions, structure data types and */
/* API function prototypes of MCU Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Fx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 02-Jul-2010 : Initial Version
*
* V3.0.1: 28-Jul-2010 : As per SCR 320 following change is made:
* ucVCPC0CTLreg0, ucVCPC0CTLreg1 elements are added in
* Mcu_ConfigType structure.
* V3.0.2: 17-Jun-2011 : As per SCR 468 following change is made:
* pre compile options added for ucVCPC0CTLreg0 and
* ucVCPC0CTLreg1 elements in Mcu_ConfigType structure and
* data type for element ulLVIindicationReg corrected.
* V3.0.2a: 18-Oct-2011 : Copyright is updated.
*
* V3.0.3: 06-Jun-2012 : As per SCR 031, API Mcu_GetVersionInfo is implemented
* as Macro.
* V3.0.4: 15-Mar-2013 : As per SCR 091, The following changes have been made,
* 1. Alignment is changed as per code guidelines.
* 2. Service id is corrected for API
* Mcu_MaskClear_WakeUpFactor.
* 3. 'MCU_E_PARAM_POINTER' macro is removed.
*/
/******************************************************************************/
#ifndef MCU_H
#define MCU_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Std_Types.h"
#include "Mcu_Cfg.h" /* MCU Driver Configuration Header */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define MCU_AR_MAJOR_VERSION MCU_AR_MAJOR_VERSION_VALUE
#define MCU_AR_MINOR_VERSION MCU_AR_MINOR_VERSION_VALUE
#define MCU_AR_PATCH_VERSION MCU_AR_PATCH_VERSION_VALUE
/*
* File version information
*/
#define MCU_SW_MAJOR_VERSION MCU_SW_MAJOR_VERSION_VALUE
#define MCU_SW_MINOR_VERSION MCU_SW_MINOR_VERSION_VALUE
#define MCU_SW_PATCH_VERSION MCU_SW_PATCH_VERSION_VALUE
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Vendor and Module IDs */
#define MCU_VENDOR_ID MCU_VENDOR_ID_VALUE
#define MCU_MODULE_ID MCU_MODULE_ID_VALUE
#define MCU_INSTANCE_ID MCU_INSTANCE_ID_VALUE
/* Service IDs */
/* Service Id of Mcu_Init API */
#define MCU_INIT_SID (uint8)0x00
/* Service Id of Mcu_InitRamSection API */
#define MCU_INITRAMSECTION_SID (uint8)0x01
/* Service Id of Mcu_InitClock API */
#define MCU_INITCLOCK_SID (uint8)0x02
/* Service Id of Mcu_DistributePllClock API */
#define MCU_DISTRIBUTEPLLCLOCK_SID (uint8)0x03
/* Service Id of Mcu_GetPllStatus API */
#define MCU_GETPLLSTATUS_SID (uint8)0x04
/* Service Id of Mcu_GetResetReason API */
#define MCU_GETRESETREASON_SID (uint8)0x05
/* Service Id of Mcu_GetResetRawValue API */
#define MCU_GETRESETRAWVAULE_SID (uint8)0x06
/* Service Id of Mcu_PerformReset API */
#define MCU_PERFORMRESET_SID (uint8)0x07
/* Service Id of Mcu_SetMode API */
#define MCU_SETMODE_SID (uint8)0x08
/* Service Id of Mcu_GetVersionInfo API */
#define MCU_GETVERSIONINFO_SID (uint8)0x09
/* Service Id of Mcu_MaskClear_WakeUpFactor API */
#define MCU_MASKCLEAR_WAKEUPFACTOR_SID (uint8)0x0A
/*******************************************************************************
** DET Error Codes **
*******************************************************************************/
/* DET Code to report NULL pointer passed to Mcu_Init API */
#define MCU_E_PARAM_CONFIG (uint8)0x0A
/* DET Code for invalid Clock Setting */
#define MCU_E_PARAM_CLOCK (uint8)0x0B
/* DET Code for invalid Operation Mode */
#define MCU_E_PARAM_MODE (uint8)0x0C
/* DET Code for invalid RAM Section handle */
#define MCU_E_PARAM_RAMSECTION (uint8)0x0D
/* DET Code to report that PLL Clock is not locked */
#define MCU_E_PLL_NOT_LOCKED (uint8)0x0E
/* DET code to report uninitialized state */
#define MCU_E_UNINIT (uint8)0x0F
/* DET code to report invalid database */
#define MCU_E_INVALID_DATABASE (uint8)0xED
/* DET code to report invalid power mode */
#define MCU_E_INVALID_MODE (uint8)0xEF
/* DET code to report invalid clock setting */
#define MCU_E_INVALID_CLK_SETTING (uint8)0xF0
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Type definition for Mcu_ClockType used by the API Mcu_InitClock */
typedef uint8 Mcu_ClockType;
/* Type definition for Mcu_RawResetType used by the API Mcu_GetResetRawValue */
typedef uint32 Mcu_RawResetType;
/* Type definition for Mcu_ModeType used by the API Mcu_SetMode */
typedef uint8 Mcu_ModeType;
/* Type definition for Mcu_RamSectionType used by the API Mcu_InitRamSection */
typedef uint8 Mcu_RamSectionType;
/* Structure for MCU Init Configuration */
typedef struct STagMcu_ConfigType
{
/* Database start value */
uint32 ulStartOfDbToc;
/* Count for stabilization at Ring Oscillator clock */
uint32 ulHighRingStabCount;
/* Count for stabilization at Main clock */
uint32 ulMainClockStabCount;
/* Element to handle the detection level of voltage */
uint32 ulLVIindicationReg;
/* Address for Clock setting Index Mapping array */
P2CONST(uint8, AUTOMATIC, MCU_CONFIG_CONST) pClkSettingIndexMap;
/* Pointer to MCU Clock Setting configuration */
P2CONST(void, AUTOMATIC, MCU_CONFIG_CONST) pClockSetting;
/* Pointer to MCU Operating Mode configuration */
P2CONST(void, AUTOMATIC, MCU_CONFIG_CONST) pModeSetting;
/* Pointer to CKSC register offset */
P2CONST(uint16, AUTOMATIC, MCU_CONFIG_CONST) pCkscRegOffset;
/* Pointer to CKSC register value */
P2CONST(uint32, AUTOMATIC, MCU_CONFIG_CONST) pCkscRegValue;
#if(MCU_PORTGROUP_STATUS_BACKUP == STD_ON)
/* Pointer to array of port registers */
P2CONST(void, AUTOMATIC, MCU_CONFIG_CONST) pPortGroupSetting;
/* Pointer to array of RAM area */
P2VAR(uint32, AUTOMATIC, MCU_CONFIG_CONST) pPortRamArea;
#endif /* #if(MCU_PORTGROUP_STATUS_BACKUP == STD_ON) */
/* Element containing value of CLMA0CMPL register */
uint16 usCLMA0CMPL;
/* Element containing value of CLMA0CMPH register */
uint16 usCLMA0CMPH;
/* Element containing value of CLMA3CMPL register */
uint16 usCLMA3CMPL;
/* Element containing value of CLMA3CMPH register */
uint16 usCLMA3CMPH;
#if(MCU_VCPC0CTL0_ENABLE == STD_ON)
/* Element containing value of VCPC0CTL0 register for channnel 0 */
uint8 ucVCPC0CTLreg0;
#endif /* #if(MCU_VCPC0CTL0_ENABLE == STD_ON) */
#if(MCU_VCPC0CTL1_ENABLE == STD_ON)
/* Element containing value of VCPC0CTL1 register for channnel 1 */
uint8 ucVCPC0CTLreg1;
#endif /* #if(MCU_VCPC0CTL1_ENABLE == STD_ON) */
#if(MCU_PORTGROUP_STATUS_BACKUP == STD_ON)
/* Element which contains total number of ports configured */
uint8 ucNumOfPortGroup;
#endif
/* Element to enable or disable the operation of clock monitor function */
uint8 ucCLMEnable;
/* Element to select the output signal */
uint8 ucCLMOutputSignal;
/* Clock Failure Notification Enable or Disable */
boolean blClockFailureNotify;
} Mcu_ConfigType;
/* Status value returned by the API Mcu_GetPllStatus */
typedef enum
{
MCU_PLL_LOCKED = 0,
MCU_PLL_UNLOCKED,
MCU_PLL_STATUS_UNDEFINED
} Mcu_PllStatusType;
/* Type of reset supported by the hardware */
typedef enum
{
MCU_POWER_ON_RESET = 0,
MCU_SW_RESET,
MCU_WATCHDOG0_RESET,
MCU_WATCHDOG1_RESET,
MCU_CLM0_RESET,
MCU_CLM1_RESET,
MCU_CLM2_RESET,
MCU_CLM3_RESET,
MCU_LVI_RESET,
MCU_TERMINAL_RESET,
MCU_AWO_ISO0_ISO1_WAKEUP,
MCU_AWO_ISO0_WAKEUP,
MCU_ISO1_WAKEUP,
MCU_RESET_UNDEFINED,
MCU_RESET_UNKNOWN
} Mcu_ResetType;
/* Handles for clock setting */
/* Clock setting for High Speed Ring Oscillator */
#define MCU_CLK_SETTING_RINGOSC (Mcu_ClockType)0x00
/* Clock setting for Main Oscillator */
#define MCU_CLK_SETTING_MAINOSC (Mcu_ClockType)0x01
/* Clock setting for PLL0 */
#define MCU_CLK_SETTING_PLL0 (Mcu_ClockType)0x02
/* Handles for Mode setting */
/* Mode setting: RUN_MODE */
#define MCU_RUN_MODE (Mcu_ModeType)0x00
/* Mode setting: RUN_MODE_ISO1_STOP */
#define MCU_RUN_MODE_ISO1_STOP (Mcu_ModeType)0x01
/* Mode setting: STOP_MODE */
#define MCU_STOP_MODE (Mcu_ModeType)0x02
/* Mode setting: RUN_MODE_ISO1_DEEPSTOP */
#define MCU_RUN_MODE_ISO1_DEEPSTOP (Mcu_ModeType)0x03
/* Mode setting: STOP_MODE_ISO1_DEEPSTOP */
#define MCU_STOP_MODE_ISO1_DEEPSTOP (Mcu_ModeType)0x04
/* Mode Setting: DEEPSTOP_MODE */
#define MCU_DEEPSTOP_MODE (Mcu_ModeType)0x05
/* Mode setting: HALT */
#define MCU_HALT_MODE (Mcu_ModeType)0x06
/* Mode Setting: STOP_MODE_ISO1_ON */
#define MCU_STOP_MODE_ISO1_ON (Mcu_ModeType)0x07
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#define MCU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, MCU_PUBLIC_CODE) Mcu_Init
(P2CONST(Mcu_ConfigType, AUTOMATIC, MCU_APPL_CONST) ConfigPtr);
extern FUNC(Std_ReturnType, MCU_PUBLIC_CODE) Mcu_InitRamSection
(Mcu_RamSectionType RamSection);
extern FUNC(Std_ReturnType, MCU_PUBLIC_CODE) Mcu_InitClock
(Mcu_ClockType ClockSetting);
extern FUNC(void, MCU_PUBLIC_CODE) Mcu_DistributePllClock (void);
extern FUNC(Mcu_PllStatusType, MCU_PUBLIC_CODE) Mcu_GetPllStatus (void);
extern FUNC(Mcu_ResetType, MCU_PUBLIC_CODE) Mcu_GetResetReason (void);
extern FUNC(Mcu_RawResetType, MCU_PUBLIC_CODE) Mcu_GetResetRawValue (void);
#if (MCU_PERFORM_RESET_API == STD_ON)
extern FUNC(void, MCU_PUBLIC_CODE) Mcu_PerformReset (void);
#endif
extern FUNC(void, MCU_PUBLIC_CODE) Mcu_SetMode (Mcu_ModeType McuMode);
extern FUNC(void, MCU_PUBLIC_CODE) Mcu_MaskClear_WakeUpFactor \
(Mcu_ModeType McuMode);
#if (MCU_VERSION_INFO_API == STD_ON)
#define Mcu_GetVersionInfo(versioninfo)\
{ \
(versioninfo)->vendorID = (uint16)MCU_VENDOR_ID; \
(versioninfo)->moduleID = (uint16)MCU_MODULE_ID; \
(versioninfo)->instanceID = (uint8)MCU_INSTANCE_ID; \
(versioninfo)->sw_major_version = MCU_SW_MAJOR_VERSION; \
(versioninfo)->sw_minor_version = MCU_SW_MINOR_VERSION; \
(versioninfo)->sw_patch_version = MCU_SW_PATCH_VERSION; \
}
#endif /* (MCU_VERSION_INFO_API == STD_ON) */
#define MCU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Global Data **
*******************************************************************************/
#define MCU_START_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
/* Structure for MCU Init configuration */
extern CONST(Mcu_ConfigType, MCU_CONST) Mcu_GstConfiguration[];
#define MCU_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
#endif /* MCU_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/IoHwAb/IoHwAb_Do.c
/*****************************************************************************
|File Name: IoHwAb_Do.c
|
|Description: Abstracted digital output channels.
|
|-----------------------------------------------------------------------------
| PATAC Confidential
|-----------------------------------------------------------------------------
|
| This software is copyright is proprietary of Pan Asia Technical Automotive Company(PATAC).
| All rights are reserved by PATAC.
|
|-----------------------------------------------------------------------------
| A U T H O R I D E N T I T Y
|-----------------------------------------------------------------------------
| Initials Name Company
| ------------------------------------ ---------------------------------------
|
|
|-----------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|-----------------------------------------------------------------------------
| Date Version Author Description
|---------- -------- ------ ----------------------------------------------
|2012-05-02 01.00.00 WangHui Create
*****************************************************************************/
/******************************************************************************
** Include Section **
******************************************************************************/
#include "Std_Macro.h"
#include "IoHwAb_Do.h"
#include "IoHwAb_DoTypes.h"
/*******************************************************************************
| Macro Declaration
|******************************************************************************/
#define CeDO_u_BufferSize ((CeIoHwAb_u_DoNumber+7)/8)
/*******************************************************************************
| Global Variables Declaration
|******************************************************************************/
/*******************************************************************************
| Static Local Variables Declaration
|******************************************************************************/
/*When learn K value, disable output overload protect*/
static boolean VeAPI_b_OutPrtctDsbl;
/* Buffer indicates APP control status, bitfield operation*/
static uint8 VaAPI_u_AppOutput[CeDO_u_BufferSize] = {0};
/* Buffer indicates if diagnostic override control request is active or not*/
static uint8 VaAPI_u_AECtrlReqActv[CeDO_u_BufferSize] = {0};
/* Buffer indicates that if output proection is active due to reasons like over current. */
static uint8 VaAPI_u_OutPrtctActv[CeDO_u_BufferSize] = {0};
/* Buffer indicates the current actual output status for each MCU IO or MSDI IO. */
static uint8 VaAPI_u_ActualOutStatus[CeDO_u_BufferSize] = {0};
static uint8 VaDoAb_u_OutOfVolt[CeDO_u_BufferSize] = {0};
#define GetDO_b_DevCtrlReq(EcuDoutId) Read_Buf_Bit(VaAPI_u_AECtrlReqActv, EcuDoutId)
#define SetDO_DevCtrlReq(EcuDoutId) Set_Buf_Bit(VaAPI_u_AECtrlReqActv, EcuDoutId)
#define ClrDO_DevCtrlReq(EcuDoutId) Clr_Buf_Bit(VaAPI_u_AECtrlReqActv, EcuDoutId)
#define GetDO_b_AppCtrlVal(EcuDoutId) Read_Buf_Bit(VaAPI_u_AppOutput, EcuDoutId)
#define SetDO_AppCtrlVal(EcuDoutId) Set_Buf_Bit(VaAPI_u_AppOutput, EcuDoutId)
#define ClrDO_AppCtrlVal(EcuDoutId) Clr_Buf_Bit(VaAPI_u_AppOutput, EcuDoutId)
#define GetHWIO_b_OutPrtctActvByEcuDoutId(EcuDoutId) Read_Buf_Bit(VaAPI_u_OutPrtctActv, EcuDoutId)
#define SetHWIO_OutPrtctActvByEcuDoutId(EcuDoutId) Set_Buf_Bit(VaAPI_u_OutPrtctActv, EcuDoutId)
#define ClrHWIO_OutPrtctActvByEcuDoutId(EcuDoutId) Clr_Buf_Bit(VaAPI_u_OutPrtctActv, EcuDoutId)
#define GetDO_b_BufferVal(EcuDoutId) Read_Buf_Bit(VaAPI_u_ActualOutStatus, EcuDoutId)
#define SetDO_BufferVal(EcuDoutId) Set_Buf_Bit(VaAPI_u_ActualOutStatus, EcuDoutId)
#define ClrDO_BufferVal(EcuDoutId) Clr_Buf_Bit(VaAPI_u_ActualOutStatus, EcuDoutId)
/*Get/Set Dout out of voltage range flag*/
#define GetHWIO_b_DoutOutOfRng(DoId) Read_Buf_Bit(VaDoAb_u_OutOfVolt, DoId)
#define SetHWIO_DoutOutOfRng(DoId) Set_Buf_Bit(VaDoAb_u_OutOfVolt, DoId)
#define ClrHWIO_DoutOutOfRng(DoId) Clr_Buf_Bit(VaDoAb_u_OutOfVolt, DoId)
/*******************************************************************************
| Extern variables and functions declaration
|******************************************************************************/
/***************************************************************************************************
| NAME: DoAb_Init
| CALLED BY:
| PRECONDITIONS:
| INPUT PARAMETERS:
| RETURN VALUE:
| DESCRIPTION:
|***************************************************************************************************/
void DoAb_Init(void)
{
uint8 i;
VeAPI_b_OutPrtctDsbl=FALSE;
for(i=0;i<CeDO_u_BufferSize;i++)
{
VaAPI_u_AppOutput[i] = 0;
VaAPI_u_AECtrlReqActv[i]=0;
VaAPI_u_OutPrtctActv[i]=0;
VaAPI_u_ActualOutStatus[i]=0;
VaDoAb_u_OutOfVolt[i]=0;
}
}
/***************************************************************************************************
| NAME: UpdateIoHwAb_DoChannel
| CALLED BY:
| PRECONDITIONS:
| INPUT PARAMETERS:
| RETURN VALUE:
| DESCRIPTION: Update DO channel, if DO is Dio type, update is implemented immediately; if DO is SPI buffer type,
| output is updated when SPI is implemented.
|***************************************************************************************************/
void DoAb_UpdateChannel(void)
{
TsDO_h_PortConfig *Lp_h_PortConfig;
uint8 Le_u_DoChannel=CeIoHwAb_u_DoNumber;
boolean Le_b_DoValue=FALSE;
for(Le_u_DoChannel=0;Le_u_DoChannel<CeIoHwAb_u_DoNumber;Le_u_DoChannel++)
{
Lp_h_PortConfig = (TsDO_h_PortConfig *)&KaDO_h_PortConfig[Le_u_DoChannel];
if(Lp_h_PortConfig->e_bt_En)
{
/*use default value if output is protected by voltage or HSD overload*/
if((FALSE == VeAPI_b_OutPrtctDsbl) &&
((TRUE == GetHWIO_b_OutPrtctActvByEcuDoutId( Le_u_DoChannel))||
(TRUE == GetHWIO_b_DoutOutOfRng(Le_u_DoChannel))))
{
Le_b_DoValue = Lp_h_PortConfig->e_bt_DftVal;
}
else
{
Le_b_DoValue = GetDO_b_BufferVal( Le_u_DoChannel);
}
/*convert application logical value to low level value*/
if(Lp_h_PortConfig->e_b_Inverse)
{
Le_b_DoValue = !Le_b_DoValue;
}
/*map value to DIO or buffer*/
if(CeDO_u_DioType == Lp_h_PortConfig->m_u_DoType)
{
Dio_WriteChannel(Lp_h_PortConfig->m_u_Offset, Le_b_DoValue);
}
else if(CeDO_u_BufferType == Lp_h_PortConfig->m_u_DoType)
{
if(Le_b_DoValue)
{
SET_BIT(*(Lp_h_PortConfig->m_p_Buffer), Lp_h_PortConfig->m_u_Offset);
}
else
{
CLR_BIT(*(Lp_h_PortConfig->m_p_Buffer), Lp_h_PortConfig->m_u_Offset);
}
}
else
{}
}
}
}
/***************************************************************************************************
| NAME: SetDO_DevCtrl
| CALLED BY:
| PRECONDITIONS:
| INPUT PARAMETERS: Le_b_value - true: active; false:inactive
| Le_e_DoId - DO id
| RETURN VALUE:
| DESCRIPTION: Set device control value active/inactive, note the real output logic is determined by configuration.
|***************************************************************************************************/
void SetDO_DevCtrl(TeIoHwAb_e_DoIds Le_e_DoId, boolean Le_b_value)
{
SetDO_DevCtrlReq(Le_e_DoId);
if(Le_b_value)
{
SetDO_BufferVal(Le_e_DoId);
}
else
{
ClrDO_BufferVal(Le_e_DoId);
}
}
/***************************************************************************************************
| NAME: ClrDO_DevCtrl
| CALLED BY:
| PRECONDITIONS:
| INPUT PARAMETERS: Le_b_value - true: active; false:inactive
| Le_e_DoId - DO id
| RETURN VALUE:
| DESCRIPTION: clear device control value, note the real output logic is determined by configuration.
|***************************************************************************************************/
void ClrDO_DevCtrl(TeIoHwAb_e_DoIds Le_e_DoId)
{
ClrDO_DevCtrlReq(Le_e_DoId);
if(GetDO_b_AppCtrlVal(Le_e_DoId))
{
SetDO_BufferVal(Le_e_DoId);
}
else
{
ClrDO_BufferVal(Le_e_DoId);
}
}
/***************************************************************************************************
| NAME: SetDO_AppCtrl
| CALLED BY:
| PRECONDITIONS:
| INPUT PARAMETERS: Le_b_value - true: active; false:inactive
| Le_e_DoId - DO id
| RETURN VALUE:
| DESCRIPTION: Set device control value active/inactive, note the real output logic is determined by configuration.
|***************************************************************************************************/
void SetDO_AppCtrl(TeIoHwAb_e_DoIds Le_e_DoId, boolean Le_b_value)
{
if(Le_b_value)
{
SetDO_AppCtrlVal(Le_e_DoId);
if(FALSE==GetDO_b_DevCtrlReq(Le_e_DoId))
{
SetDO_BufferVal(Le_e_DoId);
}
}
else
{
ClrDO_AppCtrlVal(Le_e_DoId);
if(FALSE==GetDO_b_DevCtrlReq(Le_e_DoId))
{
ClrDO_BufferVal(Le_e_DoId);
}
}
}
/***************************************************************************************************
| NAME: GetDO_OutputVal
| CALLED BY:
| PRECONDITIONS:
| INPUT PARAMETERS: Le_e_DoId - DO id
| RETURN VALUE: true: active; false:inactive
| DESCRIPTION: Get output value active/inactive.
|***************************************************************************************************/
boolean GetDO_OutputVal(TeIoHwAb_e_DoIds Le_e_DoId)
{
return GetDO_b_BufferVal(Le_e_DoId);
}
/*EOF*/
<file_sep>/BSP/MCAL/Dio/Dio_Lcfg.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* File name = Dio_Lcfg.c */
/* Version = 3.1.2 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of AUTOSAR DIO Link Time Source Register */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.1.4
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_DIO_V308_140401_HEADLAMP.arxml
* GENERATED ON: 1 Apr 2014 - 10:46:38
*/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Dio_LTTypes.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define DIO_LCFG_C_AR_MAJOR_VERSION 2
#define DIO_LCFG_C_AR_MINOR_VERSION 2
#define DIO_LCFG_C_AR_PATCH_VERSION 0
/* File version information */
#define DIO_LCFG_C_SW_MAJOR_VERSION 3
#define DIO_LCFG_C_SW_MINOR_VERSION 1
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (DIO_LTTYPES_AR_MAJOR_VERSION != DIO_LCFG_C_AR_MAJOR_VERSION)
#error "Dio_Lcfg.c : Mismatch in Specification Major Version"
#endif
#if (DIO_LTTYPES_AR_MINOR_VERSION != DIO_LCFG_C_AR_MINOR_VERSION)
#error "Dio_Lcfg.c : Mismatch in Specification Minor Version"
#endif
#if (DIO_LTTYPES_AR_PATCH_VERSION != DIO_LCFG_C_AR_PATCH_VERSION)
#error "Dio_Lcfg.c : Mismatch in Specification Patch Version"
#endif
#if (DIO_SW_MAJOR_VERSION != DIO_LCFG_C_SW_MAJOR_VERSION)
#error "Dio_Lcfg.c : Mismatch in Major Version"
#endif
#if (DIO_SW_MINOR_VERSION != DIO_LCFG_C_SW_MINOR_VERSION)
#error "Dio_Lcfg.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
#define DIO_START_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/* Structure of DIO Port Group Configuration */
CONST (Tdd_Dio_PortGroup, DIO_CONST) Dio_GstPortGroup[] =
{
/* Port: 0 - DioPort0 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400100,
/* blJtagPort */
DIO_FALSE
},
/* Port: 1 - DioPort1 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400104,
/* blJtagPort */
DIO_FALSE
},
/* Port: 2 - DioPort10 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400128,
/* blJtagPort */
DIO_FALSE
},
/* Port: 3 - DioPort25 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400164,
/* blJtagPort */
DIO_FALSE
},
/* Port: 4 - DioPort27 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF40016C,
/* blJtagPort */
DIO_FALSE
}
};
/* Data Structure of DIO Port Channel Configuration */
CONST(Tdd_Dio_PortChannel, DIO_CONST) Dio_GstPortChannel[] =
{
/* Channel: 0 - DioChannel0_0 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400100,
/* usMask */
0x0001,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 1 - DioChannel0_10 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400100,
/* usMask */
0x0400,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 2 - DioChannel0_7 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400100,
/* usMask */
0x0080,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 3 - DioChannel10_10 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400128,
/* usMask */
0x0400,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 4 - DioChannel10_11 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400128,
/* usMask */
0x0800,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 5 - DioChannel1_10 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400104,
/* usMask */
0x0400,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 6 - DioChannel1_11 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400104,
/* usMask */
0x0800,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 7 - DioChannel1_12 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400104,
/* usMask */
0x1000,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 8 - DioChannel1_7 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400104,
/* usMask */
0x0080,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 9 - DioChannel1_8 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400104,
/* usMask */
0x0100,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 10 - DioChannel1_9 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400104,
/* usMask */
0x0200,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 11 - DioChannel25_1 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400164,
/* usMask */
0x0002,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 12 - DioChannel25_10 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400164,
/* usMask */
0x0400,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 13 - DioChannel25_11 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400164,
/* usMask */
0x0800,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 14 - DioChannel25_12 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400164,
/* usMask */
0x1000,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 15 - DioChannel25_13 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400164,
/* usMask */
0x2000,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 16 - DioChannel25_14 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400164,
/* usMask */
0x4000,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 17 - DioChannel25_5 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400164,
/* usMask */
0x0020,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 18 - DioChannel25_6 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400164,
/* usMask */
0x0040,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 19 - DioChannel25_7 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400164,
/* usMask */
0x0080,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 20 - DioChannel25_8 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400164,
/* usMask */
0x0100,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 21 - DioChannel25_9 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400164,
/* usMask */
0x0200,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 22 - DioChannel27_0 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF40016C,
/* usMask */
0x0001,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 23 - DioChannel27_1 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF40016C,
/* usMask */
0x0002,
/* blJtagPort */
DIO_FALSE
},
/* Channel: 24 - DioChannel27_2 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF40016C,
/* usMask */
0x0004,
/* blJtagPort */
DIO_FALSE
}
};
/* Data Structure of DIO Port Channel Group Configuration */
CONST(Dio_ChannelGroupType, DIO_CONST) Dio_GstChannelGroupData[] =
{
/* ChannelGroup: 0 - DioChannelGroup0 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400100,
/* usMask */
0x0000,
/* ucOffset */
0x00,
/* blJtagPort */
DIO_FALSE
},
/* ChannelGroup: 1 - DioChannelGroup1 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400104,
/* usMask */
0x0000,
/* ucOffset */
0x00,
/* blJtagPort */
DIO_FALSE
},
/* ChannelGroup: 2 - DioChannelGroup10 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400128,
/* usMask */
0x0000,
/* ucOffset */
0x00,
/* blJtagPort */
DIO_FALSE
},
/* ChannelGroup: 3 - DioChannelGroup25 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF400164,
/* usMask */
0x0000,
/* ucOffset */
0x00,
/* blJtagPort */
DIO_FALSE
},
/* ChannelGroup: 4 - DioChannelGroup27 */
{
/* pPortAddress */
(P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA))0xFF40016C,
/* usMask */
0x0000,
/* ucOffset */
0x00,
/* blJtagPort */
DIO_FALSE
}
};
#define DIO_STOP_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/Common/McuSpecific/ind_800.h
--
-- V850 Language Independent Runtime Library
--
-- Copyright 1996-2000 by Green Hills Software, Inc.
--
-- This program is the property of Green Hills Software, Inc,
-- its contents are proprietary information and no part of it
-- is to be disclosed to anyone except employees of Green Hills
-- Software, Inc., or as agreed in writing signed by the President
-- of Green Hills Software, Inc.
--
#ifdef __V850
#define CALL(x) jarl x, lp
#else
#define CALL(x) jal x
#endif
#ifdef __V810
#define HI hi1
#else
#define HI hi
#endif
#ifdef __V850_LOAD_STORE_SYNC
#define SYNC mov r31, r0
#else
#define SYNC
#endif
#if defined(EVA_LOAD_HAZARD) \
|| defined(__V850_LOAD_STORE_SYNC) \
|| defined(__V850_BITOP_SYNC)
#define RETI mov r31, r0 ; reti
#else
#define RETI reti
#endif
#ifdef __V850E
#define MOV32(x, y) mov x, y
#else
#define MOV32(x, y) movhi HI(x),zero,y ; movea lo(x),y,y
#endif
<file_sep>/APP/LEDPWMActOut/LEDPWMActOut.c
#include "Std_Types.h"
const UINT8 KeLED_u_ParkLampDuty=20U;
const UINT8 KeLED_u_DRLDuty=40U;
const UINT8 KeLED_u_HighBeamDuty=40U;
const UINT8 KeLED_u_LowBeamDuty=40U;
const UINT8 KeLED_u_TurnLampDuty=40U;
const UINT8 KeLED_u_CornerLampDuty=40U;
const UINT8 KeLED_u_CityModeLampDuty=40U;
const UINT8 KeLED_u_HighSpeedLampDuty=40U;
const UINT8 KeLED_u_BadWeatherLampDuty=40U;
UINT8 KeLED_u_LightingShowMode=0;
UINT16 VeLED_w_LightingShowCount=0;
UINT8 VeLED_w_PWMDutyCount=0;
UINT8 VeLED_u_TurnLampCount2=0;
extern uint8 GaaByteArrayCanRdData[8];
void LEDPWMOutMainFunction(void)
{
SetBadWeatherLightOutPWMDuty(40);
SetParkLampOutPWMDuty(40);
SetLowBeam1OutPWMDuty(40);
SetLowBeam2OutPWMDuty(40);
SetHighBeamOutPWMDuty(40);
SetTurnLampOutPWMDuty(40);
#if 0
KeLED_u_LightingShowMode=GetHighSpeedModeSwitchSwitch();
/*the Code is for Manual Mode*/
if((0==GaaByteArrayCanRdData[7])&&(1==KeLED_u_LightingShowMode))
{
VeLED_w_LightingShowCount=0;
VeLED_w_PWMDutyCount=0;
if(true==GetParkLampOut())
{
SetParkLampOutPWMDuty(KeLED_u_ParkLampDuty);
}
else if(true==GetDRLOut())
{
SetParkLampOutPWMDuty(KeLED_u_DRLDuty);
}
else
{
SetParkLampOutPWMDuty(0);
}
if(true==GetLowBeamOut())
{
SetLowBeam2OutPWMDuty(KeLED_u_CityModeLampDuty);
}
else
{
SetLowBeam2OutPWMDuty(0);
}
if(true==GetCityModeOut())
{
SetLowBeam1OutPWMDuty(KeLED_u_CityModeLampDuty);
}
else
{
SetLowBeam1OutPWMDuty(0);
}
if(true==GetHighBeamOut())
{
SetHighBeamOutPWMDuty(KeLED_u_HighBeamDuty);
}
else
{
SetHighBeamOutPWMDuty(0);
}
if(true==GetTurnLampOut())
{
SetTurnLampOutPWMDuty(KeLED_u_TurnLampDuty);
}
else
{
SetTurnLampOutPWMDuty(0);
}
if(true==GetCornerLampOut())
{
SetCornerLampOutPWMDuty(KeLED_u_CornerLampDuty);
}
else
{
SetCornerLampOutPWMDuty(0);
}
if(true==GetHighSpeedModeOut())
{
SetHighSpeedLightOutPWMDuty(KeLED_u_HighSpeedLampDuty);
}
else
{
SetHighSpeedLightOutPWMDuty(0);
}
if(true==GetBadWeatherModeOut())
{
SetBadWeatherLightOutPWMDuty(KeLED_u_BadWeatherLampDuty);
}
else
{
SetBadWeatherLightOutPWMDuty(0);
}
}
/*the code below is for the AutoMode*/
else
{
VeLED_w_LightingShowCount++;
if(VeLED_w_LightingShowCount>=3100)
{
VeLED_w_LightingShowCount=0;
}
/*This is for all LED dimming Open*/
if(VeLED_w_LightingShowCount<40)
{
if(VeLED_w_PWMDutyCount<40)
{
VeLED_w_PWMDutyCount++;
}
SetBadWeatherLightOutPWMDuty(VeLED_w_PWMDutyCount);
SetTurnLampOutPWMDuty(VeLED_w_PWMDutyCount);
SetParkLampOutPWMDuty(VeLED_w_PWMDutyCount);
SetLowBeam1OutPWMDuty(VeLED_w_PWMDutyCount);
SetLowBeam2OutPWMDuty(VeLED_w_PWMDutyCount);
SetHighBeamOutPWMDuty(VeLED_w_PWMDutyCount);
}
else if((VeLED_w_LightingShowCount>=140)&&(VeLED_w_LightingShowCount<180))
{
if(VeLED_w_PWMDutyCount>0)
{
VeLED_w_PWMDutyCount--;
}
SetBadWeatherLightOutPWMDuty(VeLED_w_PWMDutyCount);
SetTurnLampOutPWMDuty(VeLED_w_PWMDutyCount);
SetParkLampOutPWMDuty(VeLED_w_PWMDutyCount);
SetLowBeam1OutPWMDuty(VeLED_w_PWMDutyCount);
SetLowBeam2OutPWMDuty(VeLED_w_PWMDutyCount);
SetHighBeamOutPWMDuty(VeLED_w_PWMDutyCount);
}
else if((VeLED_w_LightingShowCount>=230)&&(VeLED_w_LightingShowCount<270))
{
if(VeLED_w_PWMDutyCount<40)
{
VeLED_w_PWMDutyCount++;
}
SetTurnLampOutPWMDuty(VeLED_w_PWMDutyCount);
}
else if((VeLED_w_LightingShowCount>=320)&&(VeLED_w_LightingShowCount<360))
{
if(VeLED_w_PWMDutyCount>0)
{
VeLED_w_PWMDutyCount--;
}
SetTurnLampOutPWMDuty(VeLED_w_PWMDutyCount);
}
else if((VeLED_w_LightingShowCount>=410)&&(VeLED_w_LightingShowCount<450))
{
if(VeLED_w_PWMDutyCount<40)
{
VeLED_w_PWMDutyCount++;
}
SetParkLampOutPWMDuty(VeLED_w_PWMDutyCount);
}
else if((VeLED_w_LightingShowCount>=500)&&(VeLED_w_LightingShowCount<540))
{
if(VeLED_w_PWMDutyCount>0)
{
VeLED_w_PWMDutyCount--;
}
SetParkLampOutPWMDuty(VeLED_w_PWMDutyCount);
}
else if((VeLED_w_LightingShowCount>=590)&&(VeLED_w_LightingShowCount<630))
{
if(VeLED_w_PWMDutyCount<40)
{
VeLED_w_PWMDutyCount++;
}
SetLowBeam1OutPWMDuty(VeLED_w_PWMDutyCount);
SetLowBeam2OutPWMDuty(VeLED_w_PWMDutyCount);
}
else if((VeLED_w_LightingShowCount>=680)&&(VeLED_w_LightingShowCount<720))
{
if(VeLED_w_PWMDutyCount>0)
{
VeLED_w_PWMDutyCount--;
}
SetLowBeam1OutPWMDuty(VeLED_w_PWMDutyCount);
SetLowBeam2OutPWMDuty(VeLED_w_PWMDutyCount);
}
else if((VeLED_w_LightingShowCount>=770)&&(VeLED_w_LightingShowCount<810))
{
if(VeLED_w_PWMDutyCount<40)
{
VeLED_w_PWMDutyCount++;
}
SetHighBeamOutPWMDuty(VeLED_w_PWMDutyCount);
}
else if((VeLED_w_LightingShowCount>=860)&&(VeLED_w_LightingShowCount<900))
{
if(VeLED_w_PWMDutyCount>0)
{
VeLED_w_PWMDutyCount--;
}
SetHighBeamOutPWMDuty(VeLED_w_PWMDutyCount);
}
else if((VeLED_w_LightingShowCount>=950)&&(VeLED_w_LightingShowCount<1250))
{
if(950==VeLED_w_LightingShowCount)
{
VeLED_u_TurnLampCount2=0;
}
VeLED_u_TurnLampCount2++;
if(VeLED_u_TurnLampCount2<=30)
{
SetTurnLampOutPWMDuty(40);
}
else if((VeLED_u_TurnLampCount2<=60)&&
(VeLED_u_TurnLampCount2>30))
{
SetTurnLampOutPWMDuty(0);
}
else if((VeLED_u_TurnLampCount2<=90)&&
(VeLED_u_TurnLampCount2>60))
{
SetTurnLampOutPWMDuty(40);
}
else if((VeLED_u_TurnLampCount2<=120)&&
(VeLED_u_TurnLampCount2>90))
{
SetTurnLampOutPWMDuty(0);
}
else if((VeLED_u_TurnLampCount2<=150)&&
(VeLED_u_TurnLampCount2>120))
{
SetTurnLampOutPWMDuty(40);
}
else if((VeLED_u_TurnLampCount2<=180)&&
(VeLED_u_TurnLampCount2>150))
{
SetTurnLampOutPWMDuty(0);
}
else if((VeLED_u_TurnLampCount2<=210)&&
(VeLED_u_TurnLampCount2>180))
{
SetTurnLampOutPWMDuty(40);
}
else if((VeLED_u_TurnLampCount2<=240)&&
(VeLED_u_TurnLampCount2>210))
{
SetTurnLampOutPWMDuty(0);
}
else if((VeLED_u_TurnLampCount2<=270)&&
(VeLED_u_TurnLampCount2>240))
{
SetTurnLampOutPWMDuty(40);
}
else if((VeLED_u_TurnLampCount2<=300)&&
(VeLED_u_TurnLampCount2>270))
{
SetTurnLampOutPWMDuty(0);
}
else if(VeLED_u_TurnLampCount2>300)
{
VeLED_u_TurnLampCount2=0;
SetTurnLampOutPWMDuty(0);
}
}
else if((VeLED_w_LightingShowCount>=1250)&&(VeLED_w_LightingShowCount<1290))
{
if(1250==VeLED_w_LightingShowCount)
{
VeLED_w_PWMDutyCount=0;
}
if(VeLED_w_PWMDutyCount<40)
{
VeLED_w_PWMDutyCount++;
}
SetParkLampOutPWMDuty(VeLED_w_PWMDutyCount);
}
else if((VeLED_w_LightingShowCount>=1340)&&(VeLED_w_LightingShowCount<1380))
{
if(1340==VeLED_w_LightingShowCount)
{
VeLED_w_PWMDutyCount=0;
}
if(VeLED_w_PWMDutyCount<40)
{
VeLED_w_PWMDutyCount++;
}
SetLowBeam1OutPWMDuty(VeLED_w_PWMDutyCount);
}
else if((VeLED_w_LightingShowCount>=1430)&&(VeLED_w_LightingShowCount<1470))
{
if(1430==VeLED_w_LightingShowCount)
{
VeLED_w_PWMDutyCount=0;
}
if(VeLED_w_PWMDutyCount<40)
{
VeLED_w_PWMDutyCount++;
}
SetLowBeam2OutPWMDuty(VeLED_w_PWMDutyCount);
}
else if((VeLED_w_LightingShowCount>=1520)&&(VeLED_w_LightingShowCount<1560))
{
if(1520==VeLED_w_LightingShowCount)
{
VeLED_w_PWMDutyCount=0;
}
if(VeLED_w_PWMDutyCount<40)
{
VeLED_w_PWMDutyCount++;
}
SetHighBeamOutPWMDuty(VeLED_w_PWMDutyCount);
}
else if((VeLED_w_LightingShowCount>=1610)&&(VeLED_w_LightingShowCount<1650))
{
if(1610==VeLED_w_LightingShowCount)
{
VeLED_w_PWMDutyCount=40;
}
if(VeLED_w_PWMDutyCount>0)
{
VeLED_w_PWMDutyCount--;
}
SetParkLampOutPWMDuty(VeLED_w_PWMDutyCount);
SetLowBeam1OutPWMDuty(VeLED_w_PWMDutyCount);
SetLowBeam2OutPWMDuty(VeLED_w_PWMDutyCount);
SetHighBeamOutPWMDuty(VeLED_w_PWMDutyCount);
}
else if((VeLED_w_LightingShowCount>=1700)&&(VeLED_w_LightingShowCount<1740))
{
if(1700==VeLED_w_LightingShowCount)
{
VeLED_w_PWMDutyCount=0;
}
if(VeLED_w_PWMDutyCount<40)
{
VeLED_w_PWMDutyCount++;
}
SetParkLampOutPWMDuty(VeLED_w_PWMDutyCount);
}
else if((VeLED_w_LightingShowCount>=1790)&&(VeLED_w_LightingShowCount<1830))
{
if(1790==VeLED_w_LightingShowCount)
if(VeLED_w_PWMDutyCount<40)
{
VeLED_w_PWMDutyCount++;
}
SetLowBeam1OutPWMDuty(VeLED_w_PWMDutyCount);
SetLowBeam2OutPWMDuty(VeLED_w_PWMDutyCount);
}
else if((VeLED_w_LightingShowCount>=1880)&&(VeLED_w_LightingShowCount<2280))
{
if(1880==VeLED_w_LightingShowCount)
{
VeLED_u_TurnLampCount2=0;
}
VeLED_u_TurnLampCount2++;
if(VeLED_u_TurnLampCount2<=40)
{
SetHighBeamOutPWMDuty(40);
}
else if((VeLED_u_TurnLampCount2<=80)&&
(VeLED_u_TurnLampCount2>40))
{
SetHighBeamOutPWMDuty(0);
}
else if((VeLED_u_TurnLampCount2<=120)&&
(VeLED_u_TurnLampCount2>80))
{
SetHighBeamOutPWMDuty(40);
}
else if((VeLED_u_TurnLampCount2<=160)&&
(VeLED_u_TurnLampCount2>120))
{
SetHighBeamOutPWMDuty(0);
}
else if((VeLED_u_TurnLampCount2<=200)&&
(VeLED_u_TurnLampCount2>160))
{
SetHighBeamOutPWMDuty(40);
}
else if((VeLED_u_TurnLampCount2<=240)&&
(VeLED_u_TurnLampCount2>200))
{
SetHighBeamOutPWMDuty(0);
}
else if((VeLED_u_TurnLampCount2<=280)&&
(VeLED_u_TurnLampCount2>240))
{
SetHighBeamOutPWMDuty(40);
}
else if((VeLED_u_TurnLampCount2<=320)&&
(VeLED_u_TurnLampCount2>280))
{
SetHighBeamOutPWMDuty(0);
}
else if((VeLED_u_TurnLampCount2<=360)&&
(VeLED_u_TurnLampCount2>320))
{
SetHighBeamOutPWMDuty(40);
}
else if((VeLED_u_TurnLampCount2<=400)&&
(VeLED_u_TurnLampCount2>360))
{
SetHighBeamOutPWMDuty(0);
}
else if(VeLED_u_TurnLampCount2>400)
{
VeLED_u_TurnLampCount2=0;
SetHighBeamOutPWMDuty(0);
}
}
else if((VeLED_w_LightingShowCount>=2280)&&(VeLED_w_LightingShowCount<2320))
{
if(2280==VeLED_w_LightingShowCount)
{
VeLED_w_PWMDutyCount=40;
}
if(VeLED_w_PWMDutyCount>0)
{
VeLED_w_PWMDutyCount--;
}
SetParkLampOutPWMDuty(VeLED_w_PWMDutyCount);
SetLowBeam1OutPWMDuty(VeLED_w_PWMDutyCount);
SetLowBeam2OutPWMDuty(VeLED_w_PWMDutyCount);
SetHighBeamOutPWMDuty(VeLED_w_PWMDutyCount);
}
#if 0
else if((VeLED_w_LightingShowCount>=500)&&(VeLED_w_LightingShowCount<1000))
{
if(500==VeLED_w_LightingShowCount)
{
VeLED_u_TurnLampCount2=0;
}
VeLED_u_TurnLampCount2++;
if(VeLED_u_TurnLampCount2<=50)
{
SetTurnLampOutPWMDuty(40);
}
else if((VeLED_u_TurnLampCount2<=100)&&
(VeLED_u_TurnLampCount2>50))
{
SetTurnLampOutPWMDuty(0);
}
else if(VeLED_u_TurnLampCount2>100)
{
VeLED_u_TurnLampCount2=0;
SetTurnLampOutPWMDuty(0);
}
SetBadWeatherLightOutPWMDuty(40);
SetParkLampOutPWMDuty(0);
SetLowBeam1OutPWMDuty(0);
SetLowBeam2OutPWMDuty(0);
SetHighBeamOutPWMDuty(0);
}
else if((VeLED_w_LightingShowCount>=1000)&&(VeLED_w_LightingShowCount<1500))
{
if(1000==VeLED_w_LightingShowCount)
{
VeLED_w_PWMDutyCount=0;
VeLED_u_TurnLampCount2=0;
}
VeLED_u_TurnLampCount2++;
if(VeLED_u_TurnLampCount2<=50)
{
SetTurnLampOutPWMDuty(40);
}
else if((VeLED_u_TurnLampCount2<=100)&&
(VeLED_u_TurnLampCount2>50))
{
SetTurnLampOutPWMDuty(0);
}
else if(VeLED_u_TurnLampCount2>100)
{
VeLED_u_TurnLampCount2=0;
SetTurnLampOutPWMDuty(0);
}
if(VeLED_w_PWMDutyCount<40)
{
VeLED_w_PWMDutyCount++;
}
SetBadWeatherLightOutPWMDuty(40);
SetParkLampOutPWMDuty(VeLED_w_PWMDutyCount);
SetLowBeam1OutPWMDuty(0);
SetLowBeam2OutPWMDuty(0);
SetHighBeamOutPWMDuty(0);
}
else if((VeLED_w_LightingShowCount>=1500)&&(VeLED_w_LightingShowCount<2000))
{
if(1500==VeLED_w_LightingShowCount)
{
VeLED_w_PWMDutyCount=0;
VeLED_u_TurnLampCount2=0;
}
/*Begin of turnlamp Control*/
VeLED_u_TurnLampCount2++;
if(VeLED_u_TurnLampCount2<=50)
{
SetTurnLampOutPWMDuty(40);
}
else if((VeLED_u_TurnLampCount2<=100)&&
(VeLED_u_TurnLampCount2>50))
{
SetTurnLampOutPWMDuty(0);
}
else if(VeLED_u_TurnLampCount2>100)
{
VeLED_u_TurnLampCount2=0;
SetTurnLampOutPWMDuty(0);
}
/*End of turnlamp Control*/
if(VeLED_w_PWMDutyCount<40)
{
VeLED_w_PWMDutyCount++;
}
SetBadWeatherLightOutPWMDuty(40);
SetParkLampOutPWMDuty(40);
SetLowBeam1OutPWMDuty(VeLED_w_PWMDutyCount);
SetLowBeam2OutPWMDuty(0);
SetHighBeamOutPWMDuty(0);
}
else if((VeLED_w_LightingShowCount>=2000)&&(VeLED_w_LightingShowCount<2500))
{
if(2000==VeLED_w_LightingShowCount)
{
VeLED_w_PWMDutyCount=0;
VeLED_u_TurnLampCount2=0;
}
/*Begin of turnlamp Control*/
VeLED_u_TurnLampCount2++;
if(VeLED_u_TurnLampCount2<=50)
{
SetTurnLampOutPWMDuty(40);
}
else if((VeLED_u_TurnLampCount2<=100)&&
(VeLED_u_TurnLampCount2>50))
{
SetTurnLampOutPWMDuty(0);
}
else if(VeLED_u_TurnLampCount2>100)
{
VeLED_u_TurnLampCount2=0;
SetTurnLampOutPWMDuty(0);
}
/*End of turnlamp Control*/
if(VeLED_w_PWMDutyCount<40)
{
VeLED_w_PWMDutyCount++;
}
SetBadWeatherLightOutPWMDuty(40);
SetParkLampOutPWMDuty(40);
SetLowBeam1OutPWMDuty(40);
SetLowBeam2OutPWMDuty(VeLED_w_PWMDutyCount);
SetHighBeamOutPWMDuty(0);
}
else if((VeLED_w_LightingShowCount>=2500)&&(VeLED_w_LightingShowCount<3000))
{
if(2500==VeLED_w_LightingShowCount)
{
VeLED_w_PWMDutyCount=0;
VeLED_u_TurnLampCount2=0;
}
/*Begin of turnlamp Control*/
VeLED_u_TurnLampCount2++;
if(VeLED_u_TurnLampCount2<=50)
{
SetTurnLampOutPWMDuty(40);
}
else if((VeLED_u_TurnLampCount2<=100)&&
(VeLED_u_TurnLampCount2>50))
{
SetTurnLampOutPWMDuty(0);
}
else if(VeLED_u_TurnLampCount2>100)
{
VeLED_u_TurnLampCount2=0;
SetTurnLampOutPWMDuty(0);
}
/*End of turnlamp Control*/
if(VeLED_w_PWMDutyCount<40)
{
VeLED_w_PWMDutyCount++;
}
SetBadWeatherLightOutPWMDuty(40);
SetParkLampOutPWMDuty(40);
SetLowBeam1OutPWMDuty(40);
SetLowBeam2OutPWMDuty(40);
SetHighBeamOutPWMDuty(VeLED_w_PWMDutyCount);
}
else if((VeLED_w_LightingShowCount>=3000)&&(VeLED_w_LightingShowCount<3100))
{
if(3000==VeLED_w_LightingShowCount)
{
VeLED_w_PWMDutyCount=40;
}
if(VeLED_w_PWMDutyCount>0)
{
VeLED_w_PWMDutyCount--;
}
SetBadWeatherLightOutPWMDuty(VeLED_w_PWMDutyCount);
SetTurnLampOutPWMDuty(0);
SetParkLampOutPWMDuty(VeLED_w_PWMDutyCount);
SetLowBeam1OutPWMDuty(VeLED_w_PWMDutyCount);
SetLowBeam2OutPWMDuty(VeLED_w_PWMDutyCount);
SetHighBeamOutPWMDuty(VeLED_w_PWMDutyCount);
}
#endif
}
#endif
}
<file_sep>/BSP/Common/Compiler/Compiler_GHS.h
#ifndef COMPILER_H
#define COMPILER_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Compiler_Cfg.h" /* Module specific memory and pointer */
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
#define INLINE inline
#define STATIC static
#define _INTERRUPT_ __interrupt
#ifndef INTERRUPTFUC
#define INTERRUPTFUC interrupt
#endif
#define OsAppMode 0
#ifndef _GREENHILLS_C_V850_
#define _GREENHILLS_C_V850_
#endif
#ifndef NULL_PTR
#define NULL_PTR ((void *)0)
#endif
#ifndef NULL
#define NULL ((void *)0)
#endif
/*far: data pointer in FK4 is always 32bit*/
#define DATA_FAR
#define CONST_FAR
#define FUNC_FAR
#define far
/* AUTOMATIC used for the declaration of local pointers */
#define AUTOMATIC
/* TYPEDEF used for defining pointer types within type definitions */
#define TYPEDEF
/* Type definition of pointers to functions
rettype return type of the function
ptrclass defines the classification of the pointer's distance
fctname function name respectively name of the defined type
*/
#define P2FUNC(rettype, ptrclass, fctname) rettype (*fctname)
/* The compiler abstraction shall define the FUNC macro for the declaration and
definition of functions, that ensures correct syntax of function
declarations as required by a specific compiler. - used for API functions
rettype return type of the function
memclass classification of the function itself
*/
#define FUNC(type, memclass) type
/* Pointer to constant data
ptrtype type of the referenced data
memclass classification of the pointer's variable itself
ptrclass defines the classification of the pointer's distance
*/
#define P2CONST(ptrtype, memclass, ptrclass) const ptrtype *
/* Pointer to variable data
ptrtype type of the referenced data
memclass classification of the pointer's variable itself
ptrclass defines the classification of the pointer's distance
*/
#define P2VAR(ptrtype, memclass, ptrclass) ptrtype *
/* Const pointer to variable data
ptrtype type of the referenced data
memclass classification of the pointer's variable itself
ptrclass defines the classification of the pointer's distance
*/
#define CONSTP2VAR(ptrtype, memclass, ptrclass) ptrtype * const
/* Const pointer to constant data
ptrtype type of the referenced data
memclass classification of the pointer's variable itself
ptrclass defines the classification of the pointer's distance
*/
#define CONSTP2CONST(ptrtype, memclass, ptrclass) const ptrtype * const
/* ROM constant
type type of the constant
memclass classification of the constant
*/
#define CONST(type, memclass) const type
/* RAM variables
type type of the variable
memclass classification of the variable
*/
#define VAR(type, memclass) type
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* COMPILER_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Port/Port.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Port.c */
/* Version = 3.1.9 */
/* Date = 02-Sep-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2013 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* API function implementations of PORT Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 27-Jul-2009 : Initial Version
*
* V3.0.1: 07-Sep-2009 : As per SCR 026 and SCR 036, Port_InitConfig API is
* updated to follow the write protection for 32 bit
* write protected registers PODC, PDSC, PUCC and PSBC.
*
* V3.0.2: 31-Oct-2009 : As per SCR 071, check for IOHLDCLR bit is added
* to check the functionality of restoring the
* settings of PORT registers after wake-up from
* deep stop mode in Port_Init().
*
* V3.0.3: 13-Nov-2009 : As per SCR 105 and 120, the code is updated to
* support Px4 variant.
*
* V3.0.4: 23-Feb-2010 : As per SCR 189, updated for Port Filter Functionality
* implementation.
*
* V3.0.5: 03-Mar-2010 : As per SCR 210, following modifications are done:
* 1. Port filter configuration is removed from
* Port_InitConfig and separate function
* Port_FilterConfig() is added for that task.
* 2. Writing of protected registers is updated to avoid
* the hanging possibility during Port initialization
*
* V3.0.6: 05-Apr-2010 : As per SCR 245, following modifications are done:
* 1. Port_Init API is updated to remove the check
* whether reset is occurred due to deep stop mode.
* 2. Port_InitConfig function is updated to skip the
* re-initialization of the port configuration
* which is restored by Mcu_Init when deepstop reset
* occurs.
* 3. Port_SetPinMode API is updated to add the PSR
* register settings.
* V3.0.7: 15-Apr-2010 : As per SCR 254, Port_InitConfig function is corrected
* to skip re-initialization of PSR register settings
* when deepstop reset occurs.
* V3.0.8: 15-Mar-2011 : As per SCR 423, in Port_InitConfig API data type of
* PPCMD register is modified to update 8 bit values.
* V3.0.9: 08-Apr-2011 : As per SCR 428, Port_InitConfig function is updated
* for setting direction register before function
* control register.
* V3.0.10: 24-Jun-2011 : As per SCR 479, following modifications are done:
* 1. Function Port_RefreshPortInternal is updated
* for removing unnecessary Read-Modify-Write
* access of PMSR register.
* 2. Function Port_SetPinDirection is updated for
* removing unnecessary SchM protection since
* PMSR register is used and for removing
* unnecessary Read-Modify-Write access of PMSR
* register.
* 3. Function Port_SetPinMode is updated for
* adding SchM protection to assure atomic access and
* for removing unnecessary Read-Modify-Write access
* of PMCSR and PSR registers.
* V3.1.0: 26-Jul-2011 : Initial Version DK4-H variant
* V3.1.1: 15-Sep-2011 : As per the DK-4H requirements
* 1. Added DK4-H specific JTAG information.
* 2. Added compiler switch for USE_UPD70F3529 device
* name.
* 3. Corrected the address calculation for JPDOC and
* JPDSC registers.
* 4. Corrected the address calculation for the JTAG
* protection registers.
* V3.1.2: 08-Oct-2011 : 1. Added curly brackets for the if condition used for
* address calculation.
* 2. Added check for registers PSC1 and PWS1.
* 3. Added comments for the violation of MISRA rule.
* V3.1.3: 16-Feb-2012 : Merged the fixes done for Fx4L
* V3.1.4: 06-Jun-2012 : As per SCR 033, following changes are made:
* 1. Port_GetVersionInfo API is removed.
* 2. Compiler version is removed from Environment
* section.
* 3. DET error check conditional branch is corrected.
* V3.1.5: 10-Jul-2012 : As per SCR 047, in Port_InitConfig, handling of
* JPODC, JPSBC, JPUCC and JPSBC registers are
* corrected.
* V3.1.6: 27-Nov-2012 : As per MNT_0007541, in Port_InitConfig ,removed
* compiler switch for USE_UPD70F3529 device name .
* V3.1.7: 11-Dec-2012 : 1.As per MNT_0005397 and MNT_0005415, updated
* Port_Init function to release IO buffer Reset
* during Port initialization.
* 2.As per MNT_0005117 , Updated Port_InitConfig
* function.
* V3.1.7a: 19-Feb-2013 : Merged the fixes done for Sx4-H
* V3.1.8: 08-Apr-2013 : As per SCR 80 for the mantis issue #5399,Port_Init
* API is updated to correct PORT_IOHOLD_SET and
* PORT_IOHOLD_CLR functionality.
* V3.1.9: 02-Sep-2013 : Updated Port_Init function.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Port.h"
#include "Port_Ram.h"
#if (PORT_DEV_ERROR_DETECT == STD_ON)
#include "Det.h"
#endif
#include "Dem.h"
#if(PORT_CRITICAL_SECTION_PROTECTION == STD_ON)
#include "SchM_Port.h"
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define PORT_C_AR_MAJOR_VERSION PORT_AR_MAJOR_VERSION_VALUE
#define PORT_C_AR_MINOR_VERSION PORT_AR_MINOR_VERSION_VALUE
#define PORT_C_AR_PATCH_VERSION PORT_AR_PATCH_VERSION_VALUE
/* File version information */
#define PORT_C_SW_MAJOR_VERSION 3
#define PORT_C_SW_MINOR_VERSION 1
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (PORT_AR_MAJOR_VERSION != PORT_C_AR_MAJOR_VERSION)
#error "Port.c : Mismatch in Specification Major Version"
#endif
#if (PORT_AR_MINOR_VERSION != PORT_C_AR_MINOR_VERSION)
#error "Port.c : Mismatch in Specification Minor Version"
#endif
#if (PORT_AR_PATCH_VERSION != PORT_C_AR_PATCH_VERSION)
#error "Port.c : Mismatch in Specification Patch Version"
#endif
#if (PORT_SW_MAJOR_VERSION != PORT_C_SW_MAJOR_VERSION)
#error "Port.c : Mismatch in Major Version"
#endif
#if (PORT_SW_MINOR_VERSION != PORT_C_SW_MINOR_VERSION)
#error "Port.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#define PORT_START_SEC_PRIVATE_CODE
/* MISRA Rule : 19.1 */
/* Message : #include statements in a file */
/* should only be preceded by other*/
/* preprocessor directives or */
/* comments. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
#include "MemMap.h"
STATIC FUNC(void, PORT_PRIVATE_CODE) Port_InitConfig
(Port_GroupType LenGroupType);
#if((PORT_DNFA_REG_CONFIG == STD_ON) || (PORT_FCLA_REG_CONFIG == STD_ON))
STATIC FUNC(void, PORT_PRIVATE_CODE) Port_FilterConfig(void);
#endif
#if (PORT_SET_PIN_DIRECTION_API == STD_ON)
STATIC
FUNC(P2CONST(Tdd_Port_PinsDirChangeable, AUTOMATIC, PORT_CONFIG_CONST)
,PORT_PRIVATE_CODE) Port_SearchDirChangeablePin(Port_PinType LddPinNumber,
P2CONST(Tdd_Port_PinsDirChangeable, AUTOMATIC, PORT_CONFIG_CONST)
LpStartPtr, uint8 Lucsize);
#endif
STATIC FUNC(void, PORT_PRIVATE_CODE) Port_RefreshPortInternal
(Port_GroupType LenGroupType);
#if (PORT_SET_PIN_MODE_API == STD_ON)
STATIC
FUNC(P2CONST(Tdd_Port_PinModeChangeableDetails, AUTOMATIC, PORT_CONFIG_CONST)
, PORT_PRIVATE_CODE) Port_SearchModeChangeablePin(Port_PinType LddPinNumber,
P2CONST(Tdd_Port_PinModeChangeableDetails, AUTOMATIC, PORT_CONFIG_CONST)
LpStartPtr, uint8 Lucsize);
#endif
#define PORT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
#define PORT_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Port_Init
**
** Service ID : 0x00
**
** Description : This service performs initialization of the PORT
** Driver components.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non-Reentrant
**
** Input Parameters : ConfigPtr
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Port_GblDriverStatus,Port_GpConfigPtr
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
FUNC(void, PORT_PUBLIC_CODE) Port_Init
(P2CONST(Port_ConfigType, AUTOMATIC, PORT_APPL_CONST) ConfigPtr)
{
#if (((PORT_PWS0_ENABLE == STD_ON) && (PORT_PSC0_ENABLE == STD_ON)) \
|| ((PORT_PWS1_ENABLE == STD_ON) && (PORT_PSC1_ENABLE == STD_ON)))
uint32 Luliohold;
uint8 LucLoopCount;
#endif /*(((PORT_PWS0_ENABLE == STD_ON) && (PORT_PWS1_ENABLE == STD_ON))
|| ((PORT_PSC0_ENABLE == STD_ON) && (PORT_PSC1_ENABLE == STD_ON)))*/
#if(PORT_IORES0_ENABLE == STD_ON)
uint8 LucCount;
#endif
#if (PORT_DEV_ERROR_DETECT == STD_ON)
/* Report to DET, if the config pointer is NULL pointer */
if (ConfigPtr == NULL_PTR)
{
/* Report to DET */
Det_ReportError(PORT_MODULE_ID, PORT_INSTANCE_ID, PORT_INIT_SID,
PORT_E_PARAM_CONFIG);
}
else
#endif /* End of PORT_DEV_ERROR_DETECT == STD_ON */
{
if ((ConfigPtr->ulStartOfDbToc) == PORT_DBTOC_VALUE)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Assign the global pointer with the config pointer */
Port_GpConfigPtr = ConfigPtr;
/* Check for available Port Group Type(Numeric Port) */
#if (PORT_NUM_PORT_GROUPS_AVAILABLE == STD_ON)
/* Invoking Port_InitConfig() API with Numeric Port Group data */
Port_InitConfig(PORT_GROUP_NUMERIC);
#endif /* End of PORT_NUM_PORT_GROUPS_AVAILABLE == STD_ON */
/* Check for available Port Group Type(Alphabetic Port) */
#if (PORT_ALPHA_PORT_GROUPS_AVAILABLE == STD_ON)
/* Invoking Port_InitConfig() API with Alphabetic Port Group data */
Port_InitConfig(PORT_GROUP_ALPHABETIC);
#endif /* End of PORT_ALPHA_PORT_GROUPS_AVAILABLE == STD_ON */
/* Check for available Port Group Type(JTag Port) */
#if (PORT_JTAG_PORT_GROUPS_AVAILABLE == STD_ON)
/* Invoking Port_InitConfig() API with JTag Port Group data */
Port_InitConfig(PORT_GROUP_JTAG);
#endif /* End of PORT_JTAG_PORT_GROUPS_AVAILABLE == STD_ON */
#if (PORT_DEV_ERROR_DETECT == STD_ON)
/* Set the Port status to initialized */
Port_GblDriverStatus = PORT_INITIALIZED;
#endif
#if((PORT_DNFA_REG_CONFIG == STD_ON) || (PORT_FCLA_REG_CONFIG == STD_ON))
/* Invoking Port_FilterConfig() for configuration of filter registers */
Port_FilterConfig();
#endif
#if(PORT_IORES0_ENABLE == STD_ON)
/* Release IO buffer reset */
LucCount = PORT_TEN;
do
{
/* Write the write enable register */
PORT_PROTCMD3 = PORT_WRITE_ERROR_CLEAR_VAL;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Make IOHLDCLR bit of PSC1 register true */
PORT_IORES0 = PORT_IORES_CLR;
PORT_IORES0 = ~PORT_IORES_CLR;
PORT_IORES0 = PORT_IORES_CLR;
LucCount--;
}while((LucCount > PORT_ZERO)&&(PORT_PROTS3 == PORT_ONE));
if(PORT_PROTS3 == PORT_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(PORT_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
}
else
{
/*For MISRA C compliance */
}
#endif /* PORT_IORES0_ENABLE == STD_ON */
#if ((PORT_PWS0_ENABLE == STD_ON) && (PORT_PSC0_ENABLE == STD_ON))
/* Check for IOHOLD of ISO0 */
/* MISRA Violation: START Msg(6:0303)-1 */
if ((PORT_PWS0 & PORT_IOHOLD_SET) == PORT_IOHOLD_SET)
{
/* Mask the IOHOLDCLR bit */
Luliohold = (PORT_PSC0 | PORT_IOHOLD_CLR);
LucLoopCount = PORT_TEN;
do
{
/* Write the write enable register */
PORT_PROTCMD2 = PORT_WRITE_ERROR_CLEAR_VAL;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Make IOHLDCLR bit of PSC1 register true */
PORT_PSC0 = Luliohold;
PORT_PSC0 = ~Luliohold;
PORT_PSC0 = Luliohold;
LucLoopCount--;
}while((LucLoopCount > PORT_ZERO)&&(PORT_PROTS2 == PORT_ONE));
if(PORT_PROTS2 == PORT_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(PORT_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
}
else
{
/*For MISRA C compliance */
}
}
else
{
/*For MISRA C compliance */
}
#endif /* End of ((PORT_PWS0_ENABLE == STD_ON) &&
(PORT_PSC0_ENABLE == STD_ON)) */
#if ((PORT_PWS1_ENABLE == STD_ON) && (PORT_PSC1_ENABLE == STD_ON))
/* Mask the IOHOLDCLR bit */
if ((PORT_PWS1 & PORT_IOHOLD_SET)==PORT_IOHOLD_SET)
{
/* Mask the IOHOLDCLR bit */
Luliohold = (PORT_PSC1 | PORT_IOHOLD_CLR);
LucLoopCount = PORT_TEN;
do
{
/* Write the write enable register */
PORT_PROTCMD2 = PORT_WRITE_ERROR_CLEAR_VAL;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Make IOHLDCLR bit of PSC1 register true */
PORT_PSC1 = Luliohold;
PORT_PSC1 = ~Luliohold;
PORT_PSC1 = Luliohold;
LucLoopCount--;
}while((LucLoopCount > PORT_ZERO)&&(PORT_PROTS2 == PORT_ONE));
if(PORT_PROTS2 == PORT_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(PORT_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
}
else
{
/*For MISRA C compliance */
}
}
else
{
/*For MISRA C compliance */
}
#endif /* End of ((PORT_PWS1_ENABLE == STD_ON) &&
(PORT_PSC1_ENABLE == STD_ON)) */
}
#if (PORT_DEV_ERROR_DETECT == STD_ON)
/*If there is no valid database is present */
else
{
/* Report to DET */
Det_ReportError(PORT_MODULE_ID, PORT_INSTANCE_ID, PORT_INIT_SID,
PORT_E_INVALID_DATABASE);
}
#endif /* End of PORT_DEV_ERROR_DETECT == STD_ON */
}
}
#define PORT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#if (PORT_SET_PIN_DIRECTION_API == STD_ON)
#define PORT_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Port_SetPinDirection
**
** Service ID : 0x01
**
** Description : This service sets the port pin direction during
** runtime.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Pin - Port Pin ID number
** Direction - Port Pin Direction
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : Ports should be initliazed by calling Port_Init().
**
** Remarks : Global Variable(s):
** Port_GblDriverStatus, Port_GpConfigPtr
** Function(s) invoked:
** Det_ReportError, Port_SearchDirChangeablePin
*******************************************************************************/
FUNC(void, PORT_PUBLIC_CODE) Port_SetPinDirection
(Port_PinType Pin, Port_PinDirectionType Direction)
{
P2CONST(Tdd_Port_PinsDirChangeable, AUTOMATIC, PORT_CONFIG_CONST)
LpChangeablePinDet;
/* MISRA Rule : 18.4 */
/* Message : An object of union type has been defined. */
/* Reason : Data access of larger data types is used to achieve */
/* better throughput. */
/* Verification : However, part of the code is verified manually and */
/* it is not having any impact. */
Tun_Port_Pin_Direction LunSRRegContent;
uint32 LulBaseAddress;
#if (PORT_DEV_ERROR_DETECT == STD_ON)
boolean LblErrorflag;
#endif
LpChangeablePinDet = NULL_PTR;
#if (PORT_DEV_ERROR_DETECT == STD_ON)
LblErrorflag = PORT_FALSE;
/* Check whether the PORT module is initialized */
if(Port_GblDriverStatus == PORT_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(PORT_MODULE_ID, PORT_INSTANCE_ID, PORT_SET_PIN_DIR_SID,
PORT_E_UNINIT);
LblErrorflag = PORT_TRUE;
}
/* Check whether the requested PIN number is invalid */
if(Pin >= PORT_TOTAL_NUMBER_OF_PINS)
{
/* Report to DET */
Det_ReportError(PORT_MODULE_ID, PORT_INSTANCE_ID, PORT_SET_PIN_DIR_SID,
PORT_E_PARAM_PIN);
LblErrorflag = PORT_TRUE;
}
if(LblErrorflag == PORT_FALSE)
{
/* Check whether the Pin direction is changeable at run time */
LpChangeablePinDet = Port_SearchDirChangeablePin(Pin,
Port_GpConfigPtr->pPinDirChangeable,
Port_GpConfigPtr->ucNoOfPinsDirChangeable);
/* Return value LpChangeablePinDet - Changeable, NULL - Unchangeable */
if(LpChangeablePinDet == NULL_PTR)
{
/* Report to DET */
Det_ReportError(PORT_MODULE_ID, PORT_INSTANCE_ID, PORT_SET_PIN_DIR_SID,
PORT_E_DIRECTION_UNCHANGEABLE);
LblErrorflag = PORT_TRUE;
}
}
if(LblErrorflag == PORT_FALSE)
#endif /*End of (PORT_DEV_ERROR_DETECT == STD_ON) */
{
#if (PORT_DEV_ERROR_DETECT == STD_OFF)
/* Check whether the Pin direction is changeable at run time */
LpChangeablePinDet = Port_SearchDirChangeablePin(Pin,
Port_GpConfigPtr->pPinDirChangeable,
Port_GpConfigPtr->ucNoOfPinsDirChangeable);
#endif /* End of (PORT_DEV_ERROR_DETECT == STD_OFF) */
/* Get the base address of the corresponding Port Type */
#if(PORT_NUM_PORT_GROUPS_AVAILABLE == STD_ON)
if(LpChangeablePinDet->ucPortType == PORT_GROUP_NUMERIC)
{
LulBaseAddress = PORT_USER_BASE_ADDRESS_NUMERIC;
}
#endif /* End of (PORT_NUM_PORT_GROUPS_AVAILABLE == STD_ON) */
#if(PORT_ALPHA_PORT_GROUPS_AVAILABLE == STD_ON)
if(LpChangeablePinDet->ucPortType == PORT_GROUP_ALPHABETIC)
{
LulBaseAddress = PORT_USER_BASE_ADDRESS_ALPHABETIC;
}
#endif /* End of (PORT_ALPHA_PORT_GROUPS_AVAILABLE == STD_ON) */
#if(PORT_JTAG_PORT_GROUPS_AVAILABLE == STD_ON)
if(LpChangeablePinDet->ucPortType == PORT_GROUP_JTAG)
{
LulBaseAddress = PORT_USER_BASE_ADDRESS_JTAG;
}
#endif /* End of (PORT_JTAG_PORT_GROUPS_AVAILABLE == STD_ON) */
/* Set the bit position in the upper 16 bits (31-16) of the PSR or PMSR
* variable to 1 of the configured pin whose Direction has to be changed
*/
LunSRRegContent.Tst_Port_Word.usMSWord = LpChangeablePinDet->usOrMaskVal;
/* Check if requested direction is OUTPUT */
if(Direction == PORT_PIN_OUT)
{
/* Write the Lower word contents with configured Pin Level Value */
LunSRRegContent.Tst_Port_Word.usLSWord =\
LpChangeablePinDet->usChangeableConfigVal;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is apparently */
/* unset at this point. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Write the configured value into the register */
*((uint32 *)(LulBaseAddress + LpChangeablePinDet->usPSRRegAddrOffset)) =
LunSRRegContent.ulRegContent;
/* Set the requested direction */
LunSRRegContent.Tst_Port_Word.usLSWord = ~LpChangeablePinDet->usOrMaskVal;
}
else
{
/* Requested direction is INPUT */
LunSRRegContent.Tst_Port_Word.usLSWord = LpChangeablePinDet->usOrMaskVal;
}
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Bit value of Upper 16 bits (31-16) of PMSR register = 1
* Bit value of Lower 16 bits (15-0) of PMSR register = Configured value
* for the corresponding pin position
*/
*((uint32 *)(LulBaseAddress + LpChangeablePinDet->usPMSRRegAddrOffset)) =
LunSRRegContent.ulRegContent;
}
}
#define PORT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* (PORT_SET_PIN_DIRECTION_API == STD_ON) */
#define PORT_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Port_RefreshPortDirection
**
** Service ID : 0x02
**
** Description : This service shall refresh the direction of all
** configured ports to the configured direction.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non-Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : Ports should be initliazed by calling Port_init().
**
** Remarks : Global Variable(s):
** Port_GblDriverStatus, Port_GpConfigPtr
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
FUNC(void, PORT_PUBLIC_CODE) Port_RefreshPortDirection (void)
{
#if (PORT_DEV_ERROR_DETECT == STD_ON)
/* Check whether the PORT module is initialized */
if(Port_GblDriverStatus == PORT_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(PORT_MODULE_ID, PORT_INSTANCE_ID, PORT_REFRESH_PORT_DIR_SID,
PORT_E_UNINIT);
}
else
#endif /* End of PORT_DEV_ERROR_DETECT == STD_ON */
{
#if (PORT_NUM_PORT_GROUPS_AVAILABLE == STD_ON)
/* Invoking Port_RefreshPortInternal API with Numeric Group data */
Port_RefreshPortInternal(PORT_GROUP_NUMERIC);
#endif /* End of PORT_NUM_PORT_GROUPS_AVAILABLE == STD_ON */
#if (PORT_ALPHA_PORT_GROUPS_AVAILABLE == STD_ON)
/* Invoking Port_RefreshPortInternal API with Alphabetic Group data */
Port_RefreshPortInternal(PORT_GROUP_ALPHABETIC);
#endif /* End of PORT_ALPHA_PORT_GROUPS_AVAILABLE == STD_ON */
#if (PORT_JTAG_PORT_GROUPS_AVAILABLE == STD_ON)
/* Invoking Port_RefreshPortInternal API with JTag Group data */
Port_RefreshPortInternal(PORT_GROUP_JTAG);
#endif /* End of PORT_JTAG_PORT_GROUPS_AVAILABLE == STD_ON */
}
}
#define PORT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#if (PORT_SET_PIN_MODE_API == STD_ON)
#define PORT_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Port_SetPinMode
**
** Service ID : 0x04
**
** Description : This function used to set the mode of a port pin
** during runtime.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Pin - Port Pin ID number
** Mode - New mode to be set on port pin.
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : Ports should be initliazed by calling Port_init().
**
** Remarks : Global Variable(s):
** Port_GblDriverStatus, Port_GpConfigPtr
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
FUNC(void, PORT_PUBLIC_CODE) Port_SetPinMode
(Port_PinType Pin, Port_PinModeType Mode)
{
P2CONST(Tdd_Port_PinModeChangeableDetails, AUTOMATIC, PORT_CONFIG_CONST)
LpModeChangeablePin = NULL_PTR;
/* Pointer to Alternate mode data structure */
P2CONST(Tdd_Port_PinModeChangeableGroups, AUTOMATIC, PORT_CONFIG_CONST)
LpSetPinModeGroupStruct = NULL_PTR;
/* Pointer to Port Registers Data structure */
P2CONST(Tdd_Port_Regs, AUTOMATIC, PORT_CONFIG_CONST)
LpPortReg = NULL_PTR;
/* Pointer to Alternate Function Control Registers Data structure */
P2CONST(Tdd_Port_FuncCtrlRegs, AUTOMATIC, PORT_CONFIG_CONST)
LpFuncCtrlReg = NULL_PTR;
/* Pointer to hold the register address of 32 bit value */
P2VAR(uint32, AUTOMATIC, PORT_CONFIG_CONST)LpRegAddr = NULL_PTR;
/* Pointer to hold the register address 16 bit value */
P2VAR(uint16, AUTOMATIC, PORT_CONFIG_CONST)Lp16BitRegAddr;
/* MISRA Rule : 18.4 */
/* Message : An object of union type has been defined. */
/* Reason : Data access of larger data types is used to achieve */
/* better throughput. */
/* Verification : However, part of the code is verified manually and */
/* it is not having any impact. */
Tun_Port_Pin_Direction LunSRRegContent;
uint32 LulBaseAddress;
uint16 LusPFCERegVal;
uint16 LusPFCRegVal;
#if (PORT_DEV_ERROR_DETECT == STD_ON)
boolean LblErrorflag;
#endif
#if (PORT_DEV_ERROR_DETECT == STD_ON)
LblErrorflag = PORT_FALSE;
/* Check whether the PORT module is initialized */
if(Port_GblDriverStatus == PORT_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(PORT_MODULE_ID, PORT_INSTANCE_ID, PORT_SET_PIN_MODE_SID,
PORT_E_UNINIT);
LblErrorflag = PORT_TRUE;
}
/* Check whether the requested PIN number is invalid */
if (Pin >= PORT_TOTAL_NUMBER_OF_PINS)
{
/* Report to DET */
Det_ReportError(PORT_MODULE_ID, PORT_INSTANCE_ID, PORT_SET_PIN_MODE_SID,
PORT_E_PARAM_PIN);
LblErrorflag = PORT_TRUE;
}
/* Check whether the requested mode is invalid */
if(Mode >= PORT_MAX_ALLOWED_PIN_MODES)
{
/* Report to DET */
Det_ReportError(PORT_MODULE_ID, PORT_INSTANCE_ID, PORT_SET_PIN_MODE_SID,
PORT_E_PARAM_INVALID_MODE);
LblErrorflag = PORT_TRUE;
}
if(LblErrorflag == PORT_FALSE)
{
/* Check whether the Pin mode is changeable at run time */
LpModeChangeablePin = Port_SearchModeChangeablePin(Pin,
Port_GpConfigPtr->pPinModeChangeableDetails,
Port_GpConfigPtr->ucNoOfPinsModeChangeable);
/* Return value LpModeChangeablePin - Changeable, NULL - Unchangeable */
if(LpModeChangeablePin == NULL_PTR)
{
/* Report to DET */
Det_ReportError(PORT_MODULE_ID, PORT_INSTANCE_ID, PORT_SET_PIN_MODE_SID,
PORT_E_MODE_UNCHANGEABLE);
LblErrorflag = PORT_TRUE;
}
}
if(LblErrorflag == PORT_FALSE)
#endif /* End of PORT_DEV_ERROR_DETECT == STD_ON */
{
/* Check whether the Pin is mode changeable at run time */
LpModeChangeablePin = Port_SearchModeChangeablePin(Pin,
Port_GpConfigPtr->pPinModeChangeableDetails,
Port_GpConfigPtr->ucNoOfPinsModeChangeable);
/* MISRA Rule : 17.4 */
/* Message : Performing Pointer arithmetic. */
/* Reason : This is to get the ID in the */
/* data structure in the code. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Get the pointer to the Set Mode group list */
LpSetPinModeGroupStruct = (Port_GpConfigPtr->pPinModeChangeableGroups
+ LpModeChangeablePin->ucSetModeIndex);
/* If the Pin group is of Numeric type */
#if (PORT_NUM_PORT_GROUPS_AVAILABLE == STD_ON)
if(LpModeChangeablePin->ucPortType == PORT_GROUP_NUMERIC)
{
LpPortReg = Port_GpConfigPtr->pPortNumRegs;
LpFuncCtrlReg = Port_GpConfigPtr->pPortNumFuncCtrlRegs;
LulBaseAddress = PORT_USER_BASE_ADDRESS_NUMERIC;
}
else
#endif /* End of (PORT_NUM_PORT_GROUPS_AVAILABLE == STD_ON) */
{
#if (PORT_ALPHA_PORT_GROUPS_AVAILABLE == STD_ON)
if(LpModeChangeablePin->ucPortType == PORT_GROUP_ALPHABETIC)
{
LpPortReg = Port_GpConfigPtr->pPortAlphaRegs;
LpFuncCtrlReg = Port_GpConfigPtr->pPortAlphaFuncCtrlRegs;
LulBaseAddress = PORT_USER_BASE_ADDRESS_ALPHABETIC;
}
else
#endif /* End of (PORT_ALPHA_PORT_GROUPS_AVAILABLE == STD_ON) */
{
#if (PORT_JTAG_PORT_GROUPS_AVAILABLE == STD_ON)
if(LpModeChangeablePin->ucPortType == PORT_GROUP_JTAG)
{
LpPortReg = Port_GpConfigPtr->pPortJRegs;
LpFuncCtrlReg = Port_GpConfigPtr->pPortJFuncCtrlRegs;
LulBaseAddress = PORT_USER_BASE_ADDRESS_JTAG;
}
#endif /* End of (PORT_JTAG_PORT_GROUPS_AVAILABLE == STD_ON) */
}
}
/* Set the bit position in the upper 16 bits (31-16) of the PSR or PMSR
* variable to 1 of the configured pin whose Mode has to be changed
*/
LunSRRegContent.Tst_Port_Word.usMSWord = LpModeChangeablePin->usOrMask;
/* Write PSR register.Check for PSR register availability */
if (LpSetPinModeGroupStruct->ucPSRRegIndex != PORT_REG_NOTAVAILABLE)
{
/* MISRA Rule : 1.2 */
/* Message : Dereferencing pointer value that is apparently */
/* NULL. */
/* Reason : Pointer is checked and verified when DET is */
/* switched ON. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* MISRA Rule : 17.4 */
/* Message : Performing Pointer arithmetic. */
/* Reason : This is to get the ID in the */
/* data structure in the code. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Write Initial mode register value into Lower word of PSR variable */
LunSRRegContent.Tst_Port_Word.usLSWord = (LpPortReg + \
LpSetPinModeGroupStruct->ucPSRRegIndex)->usInitModeRegVal;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* MISRA Rule : 17.4 */
/* Message : Performing Pointer arithmetic. */
/* Reason : This is to get the ID in the */
/* data structure in the code. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is apparently */
/* unset at this point. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Get the PSR register Address */
LpRegAddr = (uint32 *)((LpPortReg +
LpSetPinModeGroupStruct->ucPSRRegIndex)->usRegAddrOffset
+ LulBaseAddress);
/* Bit value of Upper 16 bits (31-16) of PSR register = 1
* Bit value of Lower 16 bits (15-0) of PSR register = Initial value
* for the corresponding pin position
*/
*LpRegAddr = LunSRRegContent.ulRegContent;
}
/* Check if requested is Init mode */
if(Mode == PORT_INIT_MODE)
{
/* MISRA Rule : 1.2 */
/* Message : Dereferencing pointer value that is apparently */
/* NULL. */
/* Reason : Pointer is checked and verified when DET is */
/* switched ON. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* MISRA Rule : 17.4 */
/* Message : Performing Pointer arithmetic. */
/* Reason : This is to get the ID in the */
/* data structure in the code. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Load Initial values to the corresponding PFCE and PFC registers */
LusPFCERegVal = (LpFuncCtrlReg +
LpSetPinModeGroupStruct->ucPFCERegIndex)->usInitModeRegVal;
LusPFCRegVal = (LpFuncCtrlReg +
LpSetPinModeGroupStruct->ucPFCRegIndex)->usInitModeRegVal;
/* Bit value of Lower 16 bits (15-0) of PMCSR register = Initial value
* for the corresponding pin position
*/
LunSRRegContent.Tst_Port_Word.usLSWord = (LpFuncCtrlReg + \
LpSetPinModeGroupStruct->ucPMCSRRegIndex)->usInitModeRegVal;
}
else
{
/* MISRA Rule : 17.4 */
/* Message : Performing Pointer arithmetic. */
/* Reason : This is to get the ID in the */
/* data structure in the code. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Load Configured values to the corresponding PFCE and PFC registers */
LusPFCERegVal = (LpFuncCtrlReg +
LpSetPinModeGroupStruct->ucPFCERegIndex)->usSetModeRegVal;
LusPFCRegVal = (LpFuncCtrlReg +
LpSetPinModeGroupStruct->ucPFCRegIndex)->usSetModeRegVal;
/* Bit value of Lower 16 bits (15-0) of PMCSR register = configured value
* for the corresponding pin position
*/
LunSRRegContent.Tst_Port_Word.usLSWord = (LpFuncCtrlReg + \
LpSetPinModeGroupStruct->ucPMCSRRegIndex)->usSetModeRegVal;
}
/* Enter critical section */
#if(PORT_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Port(PORT_SET_PIN_MODE_PROTECTION);
#endif /* End of CRITICAL_SECTION_PROTECTION == STD_ON*/
/* Write PFCE register.Check for register availability */
if (LpSetPinModeGroupStruct->ucPFCERegIndex != PORT_REG_NOTAVAILABLE)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* MISRA Rule : 17.4 */
/* Message : Performing Pointer arithmetic. */
/* Reason : This is to get the ID in the */
/* data structure in the code. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
Lp16BitRegAddr = (uint16 *)((LpFuncCtrlReg +
LpSetPinModeGroupStruct->ucPFCERegIndex)->usRegAddrOffset +
LulBaseAddress);
/* Check whether the corresponding bit is to set or reset. */
if((LusPFCERegVal & LpModeChangeablePin->usOrMask) == PORT_ZERO)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* If bit needs to reset, AND the register contents with InvOrMask */
*Lp16BitRegAddr &= (~LpModeChangeablePin->usOrMask);
}
else
{
/* If bit needs to be set, OR the register contents with OrMask */
*Lp16BitRegAddr |= LpModeChangeablePin->usOrMask;
}
} /* End of Write PFCE register */
/* Write PFC register.Check for register availability */
if (LpSetPinModeGroupStruct->ucPFCRegIndex != PORT_REG_NOTAVAILABLE)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* MISRA Rule : 17.4 */
/* Message : Performing Pointer arithmetic. */
/* Reason : This is to get the ID in the */
/* data structure in the code. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
Lp16BitRegAddr = (uint16 *)((LpFuncCtrlReg +
LpSetPinModeGroupStruct->ucPFCRegIndex)->usRegAddrOffset +
LulBaseAddress);
/* Check whether the corresponding bit is to set or reset. */
if((LusPFCRegVal & LpModeChangeablePin->usOrMask) == PORT_ZERO)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* If bit needs to be reset, AND the register contents with AndMask */
*Lp16BitRegAddr &= (~LpModeChangeablePin->usOrMask);
}
else
{
/* If bit needs to be set, OR the register contents with OrMask */
*Lp16BitRegAddr |= LpModeChangeablePin->usOrMask;
}
} /* End of Write PFC register */
/* Exit critical section */
#if(PORT_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Port(PORT_SET_PIN_MODE_PROTECTION);
#endif /* End of CRITICAL_SECTION_PROTECTION == STD_ON*/
/* Write PMCSR register. Check for register availability */
if (LpSetPinModeGroupStruct->ucPMCSRRegIndex != PORT_REG_NOTAVAILABLE)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* MISRA Rule : 17.4 */
/* Message : Performing Pointer arithmetic. */
/* Reason : This is to get the ID in the */
/* data structure in the code. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Get the address of PMCSR register */
LpRegAddr = (uint32 *)((LpFuncCtrlReg +
LpSetPinModeGroupStruct->ucPMCSRRegIndex)->usRegAddrOffset
+ LulBaseAddress);
/* Write the corresponding 32 bit value to the PMCSR register */
*LpRegAddr = LunSRRegContent.ulRegContent;
}/* End of Write PMCSR register */
}
}
#define PORT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* PORT_SET_PIN_MODE_API = = STD_ON */
#if (PORT_SET_PIN_MODE_API == STD_ON)
#define PORT_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Port_SearchModeChangeablePin
**
** Service ID : Not Applicable
**
** Description : This function used to verify whether the given pin is
** Mode changeable.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : LddPinNumber - Port Pin number
** LpStartPtr - Start pointer to the Changeable pin
** structures.
** Lucsize - Size of the Changeable pin structures.
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Pointer to Mode Changeable Pin structure - if given
** pin number matches.
** NULL - If Pin number does not match.
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
** Function(s) invoked:
** None
*******************************************************************************/
STATIC
FUNC(P2CONST(Tdd_Port_PinModeChangeableDetails, AUTOMATIC, PORT_CONFIG_CONST)
, PORT_PRIVATE_CODE) Port_SearchModeChangeablePin(Port_PinType LddPinNumber,
P2CONST(Tdd_Port_PinModeChangeableDetails, AUTOMATIC, PORT_CONFIG_CONST)
LpStartPtr, uint8 Lucsize)
{
P2CONST(Tdd_Port_PinModeChangeableDetails, AUTOMATIC, PORT_CONFIG_DATA)
LpRetPtr = NULL_PTR;
uint8 LddLow;
uint8 LddHigh;
uint8 LddMid;
uint16 LddListSearchId;
LddHigh = Lucsize - PORT_ONE;
LddLow = PORT_ONE;
/* Get the lower limit of Search ID */
LddListSearchId = LpStartPtr->ddPinId;
/* MISRA Rule : 17.4 */
/* Message : Performing Pointer arithmetic. */
/* Reason : This is to get the ID in the */
/* data structure in the code. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Check whether search Search-ID is in range */
if((LddPinNumber >= LddListSearchId) &&
(LddPinNumber <= ((LpStartPtr+LddHigh)->ddPinId)))
{
/* Check whether requested Search-ID is same as first Search-ID
* of the list
*/
if(LddPinNumber != LddListSearchId)
{
do
{
/* Get the middle index number */
LddMid = (LddHigh + LddLow) >> PORT_ONE;
/* Get the Search-ID of the mid IDs */
LddListSearchId = ((LpStartPtr+LddMid)->ddPinId);
/* Compare Search-ID with the requested one */
if(LddListSearchId == LddPinNumber)
{
/* Update the return pointer with the pin number structure */
LpRetPtr = (LpStartPtr + LddMid);
/* Set LddHigh to zero to break the loop */
LddHigh = PORT_ZERO;
}
else
{
/* Compare the Search-ID with the requested one */
if(LddPinNumber < LddListSearchId)
{
/* MISRA Rule : 21.1 */
/* Message : An integer expression with a value that */
/* apparently negative is being converted */
/* to an unsigned type. */
/* Reason : This is to update the local variable. */
/* Verification : However, part of the code is verified */
/* manually and it is not having any impact. */
/* If the priority is lower, update LddHigh */
LddHigh = LddMid - PORT_ONE;
}
else
{
/* If the priority is higher, update LddLow */
LddLow = LddMid + PORT_ONE;
}
}
}while(LddLow <= LddHigh);
}
else
{
/* Update the return pointer with start pointer (Matches with first Id) */
LpRetPtr = LpStartPtr;
}
}
return LpRetPtr;
}
#define PORT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* (PORT_SET_PIN_MODE_API == STD_ON) */
#define PORT_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Port_InitConfig
**
** Service ID : Not Applicable
**
** Description : This function used to initialize all the registers of
** numeric, alphabetic and JTag ports
** Sync/Async : Synchronous
**
** Reentrancy : Non-Reentrant
**
** Input Parameters : LenGroupType - Port group type
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
** Function(s) invoked:
** None
*******************************************************************************/
STATIC FUNC(void, PORT_PRIVATE_CODE) Port_InitConfig
(Port_GroupType LenGroupType)
{
P2CONST(Tdd_Port_Regs,AUTOMATIC,PORT_CONFIG_CONST)LpPortReg;
P2CONST(Tdd_Port_FuncCtrlRegs,AUTOMATIC,PORT_CONFIG_CONST)LpFuncCtrlReg;
P2CONST(Tdd_Port_PMSRRegs,AUTOMATIC,PORT_CONFIG_CONST)LpPMSRReg;
P2VAR(volatile uint32, AUTOMATIC, PORT_CONFIG_DATA) Lp32BitRegAddress;
P2VAR(uint16, AUTOMATIC, PORT_CONFIG_DATA) Lp16BitRegAddress;
P2VAR(uint8, AUTOMATIC, PORT_CONFIG_DATA) Lp8BitPPCMDRegAdd;
P2VAR(uint8, AUTOMATIC, PORT_CONFIG_DATA) Lp8BitPPROTSRegAdd;
uint32 LulUserBaseAddress;
uint32 LulOsBaseAddress;
uint8 LucLoopCount;
uint8 LucNoOfRegs;
uint8 LucNoOfPSRRegs;
uint8 LucNoOfPMCSRRegs;
uint8 LucNoOfOther16BitRegs;
uint8 LucNoOfPODCRegs;
uint8 LucNoOfPDSCRegs;
uint8 LucNoOfPUCCRegs;
uint8 LucNoOfPSBCRegs;
uint8 LucNoOfFuncCtrlRegs;
#if(PORT_PIN_STATUS_BACKUP == STD_ON)
uint8 LucNoOfRestoredRegs;
#endif
boolean LblDemReported = PORT_FALSE;
boolean LblNumAlpha = PORT_FALSE;
boolean LblJtag = PORT_FALSE;
#if (PORT_NUM_PORT_GROUPS_AVAILABLE == STD_ON)
if(LenGroupType == PORT_GROUP_NUMERIC)
{
/* Get the pointer to the Numeric Port registers */
LpPortReg = Port_GpConfigPtr->pPortNumRegs;
/* Get the pointer to the Numeric Function Control registers */
LpFuncCtrlReg = Port_GpConfigPtr->pPortNumFuncCtrlRegs;
/* Get the pointer to the Numeric PMSR registers */
LpPMSRReg = Port_GpConfigPtr->pPortNumPMSRRegs;
/* Get the total number of Numeric SR registers */
LucNoOfPSRRegs = Port_GpConfigPtr->ucNoOfNumPSRRegs;
/* Get the total number of Numeric PMCSR registers */
LucNoOfPMCSRRegs = Port_GpConfigPtr->ucNoOfNumPMCSRRegs;
/* Get the total number of Numeric Other 16 Bit registers */
LucNoOfOther16BitRegs = Port_GpConfigPtr->ucNoOfNumOther16BitRegs;
/* Get the total number of Numeric PODC registers */
LucNoOfPODCRegs = Port_GpConfigPtr->ucNoOfNumPODCRegs;
#if(USE_UPD70F3580 == STD_OFF)
/* Get the total number of Numeric PDSC registers */
LucNoOfPDSCRegs = Port_GpConfigPtr->ucNoOfNumPDSCRegs;
/* Get the total number of Numeric PUCC registers */
LucNoOfPUCCRegs = Port_GpConfigPtr->ucNoOfNumPUCCRegs;
/* Get the total number of Numeric PSBC registers */
LucNoOfPSBCRegs = Port_GpConfigPtr->ucNoOfNumPSBCRegs;
#else
/* Get the total number of Numeric PDSC registers */
LucNoOfPDSCRegs = PORT_ZERO;
/* Get the total number of Numeric PUCC registers */
LucNoOfPUCCRegs = PORT_ZERO;
/* Get the total number of Numeric PSBC registers */
LucNoOfPSBCRegs = PORT_ZERO;
#endif /* End of (USE_UPD70F3580 == STD_OFF) */
/* Get the total number of Numeric Function Control registers */
LucNoOfFuncCtrlRegs = Port_GpConfigPtr->ucNoOfNumFuncCtrlRegs;
#if(PORT_PIN_STATUS_BACKUP == STD_ON)
/* Get the total number of Numeric Restored registers */
LucNoOfRestoredRegs = Port_GpConfigPtr->ucNoOfNumRestoredRegs;
#endif
/* Get the Base address of Numeric Port */
LulUserBaseAddress = PORT_USER_BASE_ADDRESS_NUMERIC;
/* Get the Base address of Numeric Port */
LulOsBaseAddress = PORT_OS_BASE_ADDRESS_NUMERIC;
/* Update the local variable as one */
LblNumAlpha = PORT_TRUE;
}
else
#endif /* End of PORT_NUM_PORT_GROUPS_AVAILABLE == STD_ON */
{
#if (PORT_ALPHA_PORT_GROUPS_AVAILABLE == STD_ON)
if(LenGroupType == PORT_GROUP_ALPHABETIC)
{
/* Get the pointer to the Alphabetic Port registers */
LpPortReg = Port_GpConfigPtr->pPortAlphaRegs;
/* Get the pointer to the Alphabetic Function Control registers */
LpFuncCtrlReg = Port_GpConfigPtr->pPortAlphaFuncCtrlRegs;
/* Get the pointer to the Alphabetic PMSR registers */
LpPMSRReg = Port_GpConfigPtr->pPortAlphaPMSRRegs;
/* Get the total number of Alphabetic SR registers */
LucNoOfPSRRegs = Port_GpConfigPtr->ucNoOfAlphaPSRRegs;
/* Get the total number of Alphabetic PMCSR registers */
LucNoOfPMCSRRegs = Port_GpConfigPtr->ucNoOfAlphaPMCSRRegs;
/* Get the total number of Alphabetic Other 16 Bit registers */
LucNoOfOther16BitRegs = Port_GpConfigPtr->ucNoOfAlphaOther16BitRegs;
/* Get the total number of Alphabetic PODC registers */
LucNoOfPODCRegs = Port_GpConfigPtr->ucNoOfAlphaPODCRegs;
#if(USE_UPD70F3580 == STD_OFF)
/* Get the total number of Alphabetic PDSC registers */
LucNoOfPDSCRegs = Port_GpConfigPtr->ucNoOfAlphaPDSCRegs;
/* Get the total number of Alphabetic PUCC registers */
LucNoOfPUCCRegs = Port_GpConfigPtr->ucNoOfAlphaPUCCRegs;
/* Get the total number of Alphabetic PSBC registers */
LucNoOfPSBCRegs = Port_GpConfigPtr->ucNoOfAlphaPSBCRegs;
#else
/* Get the total number of Alphabetic PDSC registers */
LucNoOfPDSCRegs = Port_GpConfigPtr->PORT_ZERO;
/* Get the total number of Alphabetic PUCC registers */
LucNoOfPUCCRegs = Port_GpConfigPtr->PORT_ZERO;
/* Get the total number of Alphabetic PSBC registers */
LucNoOfPSBCRegs = Port_GpConfigPtr->PORT_ZERO;
#endif /*End of (USE_UPD70F3580 == STD_OFF)*/
/* Get the total number of Alphabetic Function Control registers */
LucNoOfFuncCtrlRegs = Port_GpConfigPtr->ucNoOfAlphaFuncCtrlRegs;
#if(PORT_PIN_STATUS_BACKUP == STD_ON)
/* Get the total number of Alphabetic Restored registers */
LucNoOfRestoredRegs = Port_GpConfigPtr->ucNoOfAlphaRestoredRegs;
#endif
/* Get the Base address of Alphabetic Port */
LulUserBaseAddress = PORT_USER_BASE_ADDRESS_ALPHABETIC;
/* Get the Base address of Alphabetic Port */
LulOsBaseAddress = PORT_OS_BASE_ADDRESS_ALPHABETIC;
/* Update the local variable as one */
LblNumAlpha = PORT_TRUE;
}
else
#endif /* End of PORT_ALPHA_PORT_GROUPS_AVAILABLE == STD_ON */
{
#if (PORT_JTAG_PORT_GROUPS_AVAILABLE == STD_ON)
if(LenGroupType == PORT_GROUP_JTAG)
{
/* Get the pointer to the JTag Port registers */
LpPortReg = Port_GpConfigPtr->pPortJRegs;
/* Get the pointer to the JTag Function Control registers */
LpFuncCtrlReg = Port_GpConfigPtr->pPortJFuncCtrlRegs;
/* Get the pointer to the JTag PMSR registers */
LpPMSRReg = Port_GpConfigPtr->pPortJPMSRRegs;
/* Get the total number of JTAG SR registers */
LucNoOfPSRRegs = PORT_JTAG_PSR_REGS;
/* Get the total number of JTAG PMCSR registers */
LucNoOfPMCSRRegs = PORT_JTAG_PMCSR_REGS;
/* Get the total number of JTag Other 8 Bit registers */
LucNoOfOther16BitRegs = PORT_JTAG_OTHER_8BIT_REGS;
/* Get the total number of JTag PODC registers */
LucNoOfPODCRegs = PORT_JTAG_PODC_REGS;
/* Get the total number of JTag PDSC registers */
LucNoOfPDSCRegs = PORT_JTAG_PDSC_REGS;
/* Get the total number of JTag PUCC registers */
LucNoOfPUCCRegs = PORT_JTAG_PUCC_REGS;
/* Get the total number of JTag PSBC registers */
LucNoOfPSBCRegs = PORT_JTAG_PSBC_REGS;
/* Get the total number of JTag Function Control registers */
LucNoOfFuncCtrlRegs = Port_GpConfigPtr->ucNoOfJFuncCtrlRegs;
#if(PORT_PIN_STATUS_BACKUP == STD_ON)
/* Get the total number of JTag Restored registers */
LucNoOfRestoredRegs = Port_GpConfigPtr->ucNoOfJtagRestoredRegs;
#endif
/* Get the Base address of JTag Port */
LulUserBaseAddress = PORT_USER_BASE_ADDRESS_JTAG;
/* Get the Base address of JTag Port */
LulOsBaseAddress = PORT_OS_BASE_ADDRESS_JTAG;
/* Update the local variable as one */
LblJtag = PORT_TRUE;
}
#endif /* PORT_JTAG_PORT_GROUPS_AVAILABLE == STD_ON */
}
}
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is apparently */
/* unset at this point. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Get the count of total number of SR registers */
LucNoOfRegs = LucNoOfPSRRegs;
#if(PORT_PIN_STATUS_BACKUP == STD_ON)
/* Check if reset is done by deep stop */
#if(PORT_PWS0_ENABLE == STD_ON)
if((PORT_PWS0 & PORT_IOHOLD_SET)==PORT_IOHOLD_SET)
#endif
{
#if(PORT_PWS1_ENABLE == STD_ON)
if((PORT_PWS1 & PORT_IOHOLD_SET)==PORT_IOHOLD_SET)
#endif
{
LpPortReg = LpPortReg + LucNoOfRestoredRegs;
LucNoOfRegs = LucNoOfRegs - LucNoOfRestoredRegs;
}
}
#endif /* End of (PORT_PIN_STATUS_BACKUP == STD_ON) */
while(LucNoOfRegs > PORT_ZERO)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Get the register address by adding the offset to the Base address */
Lp32BitRegAddress =
(uint32 *)(LpPortReg->usRegAddrOffset + LulUserBaseAddress);
/* Write the register value to the corresponding register */
*Lp32BitRegAddress = (LpPortReg->usInitModeRegVal | PORT_MSB_MASK);
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation performed */
/* on pointer. */
/* Reason : This is to access the data structure */
/* pointing to next port group. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LpPortReg++;
LucNoOfRegs--;
}
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is apparently */
/* unset at this point. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Get the count of total number of Other 16Bit registers */
LucNoOfRegs = LucNoOfOther16BitRegs;
while(LucNoOfRegs > PORT_ZERO)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Get the register address by adding the offset to the Base address */
Lp16BitRegAddress =
(uint16 *)(LpPortReg->usRegAddrOffset + LulOsBaseAddress);
/* Write the register value to the corresponding register */
*Lp16BitRegAddress = LpPortReg->usInitModeRegVal;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation performed */
/* on pointer. */
/* Reason : This is to access the data structure */
/* pointing to next port group. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/*Compiler Switch to check if the variant is DK4-H*/
#if(USE_UPD70F3529 == STD_ON)
/*Check for Port Group JTAG*/
if(LenGroupType == PORT_GROUP_JTAG)
{
/*If DK4-H do not increment the structure pointer.
This provides the correct address for the next loop of registers
Namely,
1. JPODC0
2. JPDSC0
*/
if(LucNoOfRegs != PORT_ONE)
{
LpPortReg++;
}
else
{
/*For MISRA-C complaint*/
}
LucNoOfRegs--;
}
else
/*For all other Port Groups*/
{
LpPortReg++;
LucNoOfRegs--;
}
/*For all other variants*/
#else
LpPortReg++;
LucNoOfRegs--;
#endif /* USE_UPD70F3529 == STD_ON */
}
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is apparently */
/* unset at this point. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Get the count of total number of 32Bit PODC registers */
LucNoOfRegs = LucNoOfPODCRegs;
while((LucNoOfRegs > PORT_ZERO) && (LblDemReported == PORT_FALSE))
{
/* Initialize the loop count to ten */
LucLoopCount = PORT_TEN;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Get the register address by adding the offset to the Base address */
Lp32BitRegAddress =
(uint32 *)(LpPortReg->usRegAddrOffset + LulOsBaseAddress);
/*Compiler Switch to check if the variant is DK4-H*/
#if(USE_UPD70F3529 == STD_ON)
/*Check for Port Group JTAG*/
if(LenGroupType == PORT_GROUP_JTAG)
{
Lp8BitPPROTSRegAdd = (uint8 *) (LulOsBaseAddress + PORT_JTAG_PPROTS_REG_ADD_OFFSET);
Lp8BitPPCMDRegAdd = (uint8 *) (LulOsBaseAddress + PORT_JTAG_PPCMD_REG_ADD_OFFSET);
}
else
/*For all other Port Groups*/
{
/* Get the address of the corresponding PPROTS register */
Lp8BitPPROTSRegAdd = (uint8 *)((LpPortReg->usRegAddrOffset -
((PORT_NUM_PODC_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PODC_REG_ADD_OFFSET * LblJtag)) +
LulOsBaseAddress) +
(PORT_NUM_PPROTS_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PPROTS_REG_ADD_OFFSET * LblJtag));
/* Get the address of the corresponding PPCMD register */
Lp8BitPPCMDRegAdd = (uint8 *)((LpPortReg->usRegAddrOffset -
((PORT_NUM_PODC_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PODC_REG_ADD_OFFSET * LblJtag)) +
LulOsBaseAddress) +
(PORT_NUM_PPCMD_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PPCMD_REG_ADD_OFFSET * LblJtag));
}
/*For all other variants*/
#else
/* Get the address of the corresponding PPROTS register */
Lp8BitPPROTSRegAdd = (uint8 *)((LpPortReg->usRegAddrOffset -
((PORT_NUM_PODC_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PODC_REG_ADD_OFFSET * LblJtag)) +
LulOsBaseAddress) +
(PORT_NUM_PPROTS_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PPROTS_REG_ADD_OFFSET * LblJtag));
/* Get the address of the corresponding PPCMD register */
Lp8BitPPCMDRegAdd = (uint8 *)((LpPortReg->usRegAddrOffset -
((PORT_NUM_PODC_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PODC_REG_ADD_OFFSET * LblJtag)) +
LulOsBaseAddress) +
(PORT_NUM_PPCMD_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PPCMD_REG_ADD_OFFSET * LblJtag));
#endif
do
{
*Lp8BitPPCMDRegAdd = PORT_WRITE_ERROR_CLEAR_VAL;
/* Write the register value to the corresponding register with upper 16
* bit set to zero
*/
*Lp32BitRegAddress = LpPortReg->usInitModeRegVal & (~PORT_MSB_MASK);
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Write the bit wise inverse value to the corresponding register with
* upper 16 bit set to one
*/
*Lp32BitRegAddress = ~LpPortReg->usInitModeRegVal | PORT_MSB_MASK;
/* Write the register value to the corresponding register with upper 16
* bit set to zero
*/
*Lp32BitRegAddress = LpPortReg->usInitModeRegVal & (~PORT_MSB_MASK);
/* Decrement the loop count for each iteration */
LucLoopCount--;
/* Check the state of PPROTS register for successful write operation or
* perform maximum ten tries, if failure occures report DEM and skip
* further configuration
*/
}while((*Lp8BitPPROTSRegAdd == PORT_ONE) && (LucLoopCount > PORT_ZERO));
/* Check if the loop has exited because of failure of writing to register */
if(*Lp8BitPPROTSRegAdd == PORT_ONE)
{
/* Report write failure production error */
Dem_ReportErrorStatus(PORT_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
/* Set the Dem error flag */
LblDemReported = PORT_TRUE;
}
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation performed */
/* on pointer. */
/* Reason : This is to access the data structure */
/* pointing to next port group. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LpPortReg++;
LucNoOfRegs--;
}
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is apparently */
/* unset at this point. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Get the count of total number of 32Bit PDSC registers */
LucNoOfRegs = LucNoOfPDSCRegs;
while((LucNoOfRegs > PORT_ZERO) && (LblDemReported == PORT_FALSE))
{
/* Initialize the loop count to ten */
LucLoopCount = PORT_TEN;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Get the register address by adding the offset to the Base address */
Lp32BitRegAddress =
(uint32 *)(LpPortReg->usRegAddrOffset + LulOsBaseAddress);
/*Compiler Switch to check if the variant is DK4-H*/
#if(USE_UPD70F3529 == STD_ON)
/*Check for Port Group JTAG*/
if(LenGroupType == PORT_GROUP_JTAG)
{
Lp8BitPPROTSRegAdd = (uint8 *) (LulOsBaseAddress + PORT_JTAG_PPROTS_REG_ADD_OFFSET);
Lp8BitPPCMDRegAdd = (uint8 *) (LulOsBaseAddress + PORT_JTAG_PPCMD_REG_ADD_OFFSET);
}
else
/*For all other Port Groups*/
{
/* Get the address of the corresponding PPROTS register */
Lp8BitPPROTSRegAdd = (uint8 *)((LpPortReg->usRegAddrOffset -
((PORT_NUM_PDSC_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PDSC_REG_ADD_OFFSET * LblJtag)) +
LulOsBaseAddress) +
(PORT_NUM_PPROTS_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PPROTS_REG_ADD_OFFSET * LblJtag));
/* Get the address of the corresponding PPCMD register */
Lp8BitPPCMDRegAdd = (uint8 *)((LpPortReg->usRegAddrOffset -
((PORT_NUM_PDSC_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PDSC_REG_ADD_OFFSET * LblJtag)) +
LulOsBaseAddress) +
(PORT_NUM_PPCMD_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PPCMD_REG_ADD_OFFSET * LblJtag));
}
/*For all other variants*/
#else
/* Get the address of the corresponding PPROTS register */
Lp8BitPPROTSRegAdd = (uint8 *)((LpPortReg->usRegAddrOffset -
((PORT_NUM_PDSC_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PDSC_REG_ADD_OFFSET * LblJtag)) +
LulOsBaseAddress) +
(PORT_NUM_PPROTS_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PPROTS_REG_ADD_OFFSET * LblJtag));
/* Get the address of the corresponding PPCMD register */
Lp8BitPPCMDRegAdd = (uint8 *)((LpPortReg->usRegAddrOffset -
((PORT_NUM_PDSC_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PDSC_REG_ADD_OFFSET * LblJtag)) +
LulOsBaseAddress) +
(PORT_NUM_PPCMD_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PPCMD_REG_ADD_OFFSET * LblJtag));
#endif
do
{
*Lp8BitPPCMDRegAdd = PORT_WRITE_ERROR_CLEAR_VAL;
/* Write the register value to the corresponding register with upper 16
* bit set to zero
*/
*Lp32BitRegAddress = LpPortReg->usInitModeRegVal & (~PORT_MSB_MASK);
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Write the bit wise inverse value to the corresponding register with
* upper 16 bit set to one
*/
*Lp32BitRegAddress = ~LpPortReg->usInitModeRegVal | PORT_MSB_MASK;
/* Write the register value to the corresponding register with upper 16
* bit set to zero
*/
*Lp32BitRegAddress = LpPortReg->usInitModeRegVal & (~PORT_MSB_MASK);
/* Decrement the loop count for each iteration */
LucLoopCount--;
/* Check the state of PPROTS register for successful write operation or
* perform maximum ten tries, if failure occures report DEM and skip
* further configuration
*/
}while((*Lp8BitPPROTSRegAdd == PORT_ONE) && (LucLoopCount > PORT_ZERO));
/* Check if the loop has exited because of failure of writing to register */
if(*Lp8BitPPROTSRegAdd == PORT_ONE)
{
/* Report write failure production error */
Dem_ReportErrorStatus(PORT_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
/* Set the Dem error flag */
LblDemReported = PORT_TRUE;
}
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation performed */
/* on pointer. */
/* Reason : This is to access the data structure */
/* pointing to next port group. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LpPortReg++;
LucNoOfRegs--;
}
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is apparently */
/* unset at this point. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Get the count of total number of 32Bit PUCC registers */
LucNoOfRegs = LucNoOfPUCCRegs;
while((LucNoOfRegs > PORT_ZERO) && (LblDemReported == PORT_FALSE))
{
/* Initialize the loop count to ten */
LucLoopCount = PORT_TEN;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Get the register address by adding the offset to the Base address */
Lp32BitRegAddress =
(uint32 *)(LpPortReg->usRegAddrOffset + LulOsBaseAddress);
/* Get the address of the corresponding PPROTS register */
Lp8BitPPROTSRegAdd = (uint8 *)((LpPortReg->usRegAddrOffset -
((PORT_NUM_PUCC_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PUCC_REG_ADD_OFFSET * LblJtag)) +
LulOsBaseAddress) +
(PORT_NUM_PPROTS_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PPROTS_REG_ADD_OFFSET * LblJtag));
/* Get the address of the corresponding PPCMD register */
Lp8BitPPCMDRegAdd = (uint8 *)((LpPortReg->usRegAddrOffset -
((PORT_NUM_PUCC_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PUCC_REG_ADD_OFFSET * LblJtag)) +
LulOsBaseAddress) +
(PORT_NUM_PPCMD_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PPCMD_REG_ADD_OFFSET * LblJtag));
do
{
*Lp8BitPPCMDRegAdd = PORT_WRITE_ERROR_CLEAR_VAL;
/* Write the register value to the corresponding register with upper 16
* bit set to zero
*/
*Lp32BitRegAddress = LpPortReg->usInitModeRegVal & (~PORT_MSB_MASK);
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Write the bit wise inverse value to the corresponding register with
* upper 16 bit set to one
*/
*Lp32BitRegAddress = ~LpPortReg->usInitModeRegVal | PORT_MSB_MASK;
/* Write the register value to the corresponding register with upper 16
* bit set to zero
*/
*Lp32BitRegAddress = LpPortReg->usInitModeRegVal & (~PORT_MSB_MASK);
/* Decrement the loop count for each iteration */
LucLoopCount--;
/* Check the state of PPROTS register for successful write operation or
* perform maximum ten tries, if failure occures report DEM and skip
* further configuration
*/
}while((*Lp8BitPPROTSRegAdd == PORT_ONE) && (LucLoopCount > PORT_ZERO));
/* Check if the loop has exited because of failure of writing to register */
if(*Lp8BitPPROTSRegAdd == PORT_ONE)
{
/* Report write failure production error */
Dem_ReportErrorStatus(PORT_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
/* Set the Dem error flag */
LblDemReported = PORT_TRUE;
}
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation performed */
/* on pointer. */
/* Reason : This is to access the data structure */
/* pointing to next port group. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LpPortReg++;
LucNoOfRegs--;
}
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is apparently */
/* unset at this point. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Get the count of total number of 32Bit PSBC registers */
LucNoOfRegs = LucNoOfPSBCRegs;
while((LucNoOfRegs > PORT_ZERO) && (LblDemReported == PORT_FALSE))
{
/* Initialize the loop count to ten */
LucLoopCount = PORT_TEN;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Get the register address by adding the offset to the Base address */
Lp32BitRegAddress =
(uint32 *)(LpPortReg->usRegAddrOffset + LulOsBaseAddress);
/* Get the address of the corresponding PPROTS register */
Lp8BitPPROTSRegAdd = (uint8 *)((LpPortReg->usRegAddrOffset -
((PORT_NUM_PSBC_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PSBC_REG_ADD_OFFSET * LblJtag)) +
LulOsBaseAddress) +
(PORT_NUM_PPROTS_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PPROTS_REG_ADD_OFFSET * LblJtag));
/* Get the address of the corresponding PPCMD register */
Lp8BitPPCMDRegAdd = (uint8 *)((LpPortReg->usRegAddrOffset -
((PORT_NUM_PSBC_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PSBC_REG_ADD_OFFSET * LblJtag)) +
LulOsBaseAddress) +
(PORT_NUM_PPCMD_REG_ADD_OFFSET * LblNumAlpha) +
(PORT_JTAG_PPCMD_REG_ADD_OFFSET * LblJtag));
do
{
*Lp8BitPPCMDRegAdd = PORT_WRITE_ERROR_CLEAR_VAL;
/* Write the register value to the corresponding register with upper 16
* bit set to zero
*/
*Lp32BitRegAddress = LpPortReg->usInitModeRegVal & (~PORT_MSB_MASK);
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Write the bit wise inverse value to the corresponding register with
* upper 16 bit set to one
*/
*Lp32BitRegAddress = ~LpPortReg->usInitModeRegVal | PORT_MSB_MASK;
/* Write the register value to the corresponding register with upper 16
* bit set to zero
*/
*Lp32BitRegAddress = LpPortReg->usInitModeRegVal & (~PORT_MSB_MASK);
/* Decrement the loop count for each iteration */
LucLoopCount--;
/* Check the state of PPROTS register for successful write operation or
* perform maximum ten tries, if failure occures report DEM and skip
* further configuration
*/
}while((*Lp8BitPPROTSRegAdd == PORT_ONE) && (LucLoopCount > PORT_ZERO));
/* Check if the loop has exited because of failure of writing to register */
if(*Lp8BitPPROTSRegAdd == PORT_ONE)
{
/* Report write failure production error */
Dem_ReportErrorStatus(PORT_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
/* Set the Dem error flag */
LblDemReported = PORT_TRUE;
}
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation performed */
/* on pointer. */
/* Reason : This is to access the data structure */
/* pointing to next port group. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LpPortReg++;
LucNoOfRegs--;
}
if(LblDemReported == PORT_FALSE)
{
/* Get the count of total number of PMSR registers */
LucNoOfRegs = LucNoOfPSRRegs;
while(LucNoOfRegs > PORT_ZERO)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is apparently */
/* unset at this point. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Get the pointer to the PMSR registers */
Lp32BitRegAddress =
(uint32 *)(LpPMSRReg->usRegAddrOffset + LulUserBaseAddress);
/* Write the register value to the corresponding register */
*Lp32BitRegAddress = (LpPMSRReg->usInitModeRegVal | PORT_MSB_MASK);
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation performed */
/* on pointer. */
/* Reason : This is to access the data structure */
/* pointing to next port group. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LpPMSRReg++;
LucNoOfRegs--;
}
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is apparently */
/* unset at this point. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Get the count of total number of Function Control registers */
LucNoOfRegs = LucNoOfFuncCtrlRegs;
while(LucNoOfRegs > PORT_ZERO)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is apparently */
/* unset at this point. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Get the pointer to the function control registers */
Lp16BitRegAddress = (uint16 *)
(LpFuncCtrlReg->usRegAddrOffset + LulUserBaseAddress);
/* Write the register value to the corresponding register */
*Lp16BitRegAddress = LpFuncCtrlReg->usInitModeRegVal;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation performed */
/* on pointer. */
/* Reason : This is to access the data structure */
/* pointing to next port group. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LpFuncCtrlReg++;
LucNoOfRegs--;
}
/* Get the count of total number of Function Control SR registers */
LucNoOfRegs = LucNoOfPMCSRRegs;
while(LucNoOfRegs > PORT_ZERO)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is apparently */
/* unset at this point. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Get the pointer to the function control registers */
Lp32BitRegAddress = (uint32 *)
(LpFuncCtrlReg->usRegAddrOffset + LulUserBaseAddress);
/* Write the register value to the corresponding register */
*Lp32BitRegAddress = (LpFuncCtrlReg->usInitModeRegVal | PORT_MSB_MASK);
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation performed */
/* on pointer. */
/* Reason : This is to access the data structure */
/* pointing to next port group. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LpFuncCtrlReg++;
LucNoOfRegs--;
}
}
}
#define PORT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#if (PORT_SET_PIN_DIRECTION_API == STD_ON)
#define PORT_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Port_SearchDirChangeablePin
**
** Service ID : Not Applicable
**
** Description : This function used to verify whether the given pin is
** Direction changeable.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : LddPinNumber - Port Pin number
** LpStartPtr - Start pointer to the Changeable pin
** structures.
** Lucsize - Size of the Changeable pin structures.
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Pointer to Direction Changeable Pin structure - if
** given pin number matches.
** NULL - If Pin number does not match.
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
** Function(s) invoked:
** None
*******************************************************************************/
STATIC
FUNC(P2CONST(Tdd_Port_PinsDirChangeable, AUTOMATIC, PORT_CONFIG_CONST)
, PORT_PRIVATE_CODE) Port_SearchDirChangeablePin(Port_PinType LddPinNumber,
P2CONST(Tdd_Port_PinsDirChangeable, AUTOMATIC, PORT_CONFIG_CONST)
LpStartPtr, uint8 Lucsize)
{
P2CONST(Tdd_Port_PinsDirChangeable, AUTOMATIC, PORT_CONFIG_DATA) LpRetPtr
= NULL_PTR;
uint8 LddLow;
uint8 LddHigh;
uint8 LddMid;
uint16 LddListSearchId;
LddHigh = Lucsize - PORT_ONE;
LddLow = PORT_ONE;
/* Get the lower limit of Search ID */
LddListSearchId = LpStartPtr->ddPinId;
/* MISRA Rule : 17.4 */
/* Message : Performing Pointer arithmetic. */
/* Reason : This is to get the ID in the */
/* data structure in the code. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Check whether search Search-ID is in range */
if((LddPinNumber >= LddListSearchId) &&
(LddPinNumber <= ((LpStartPtr+LddHigh)->ddPinId)))
{
/* Check whether requested Search-ID is same as first Search-ID
* of the list
*/
if(LddPinNumber != LddListSearchId)
{
do
{
/* Get the middle index number */
LddMid = (LddHigh + LddLow) >> PORT_ONE;
/* Get the Search-ID of the mid IDs */
LddListSearchId = ((LpStartPtr+LddMid)->ddPinId);
/* Compare Search-ID with the requested one */
if(LddListSearchId == LddPinNumber)
{
/* Update the return pointer with the pin number structure */
LpRetPtr = (LpStartPtr + LddMid);
/* Set LddHigh to zero to break the loop */
LddHigh = PORT_ZERO;
}
else
{
/* Compare the Search-ID with the requested one */
if(LddPinNumber < LddListSearchId)
{
/* MISRA Rule : 21.1 */
/* Message : An integer expression with a value that */
/* apparently negative is being converted */
/* to an unsigned type. */
/* Reason : This is to update the local variable. */
/* Verification : However, part of the code is verified */
/* manually and it is not having any impact. */
/* If the priority is lower, update LddHigh */
LddHigh = LddMid - PORT_ONE;
}
else
{
/* If the priority is higher, update LddLow */
LddLow = LddMid + PORT_ONE;
}
}
}while(LddLow <= LddHigh);
}
else
{
/* Update the return pointer with start pointer (Matches with first Id) */
LpRetPtr = LpStartPtr;
}
}
return LpRetPtr;
}
#define PORT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* (PORT_SET_PIN_DIRECTION_API == STD_ON) */
#define PORT_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Port_RefreshPortInternal
**
** Service ID : Not Applicable
**
** Description : This service shall refresh the direction of all
** configured ports to the configured direction.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non-Reentrant
**
** Input Parameters : LenGroupType - Port Group Type
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : Ports should be initialized by calling Port_init().
**
** Remarks : Global Variable(s):
** Port_GpConfigPtr
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
STATIC FUNC(void, PORT_PRIVATE_CODE) Port_RefreshPortInternal
(Port_GroupType LenGroupType)
{
P2CONST(Tdd_Port_PMSRRegs, AUTOMATIC, PORT_CONFIG_CONST)LpPMSRReg;
P2VAR(uint32, AUTOMATIC, PORT_CONFIG_DATA) LpPMSRRegAddress;
uint32 LulBaseAddress;
uint8 LucNoOfRegs;
#if (PORT_NUM_PORT_GROUPS_AVAILABLE == STD_ON)
if(LenGroupType == PORT_GROUP_NUMERIC)
{
/* Get the pointer to 32Bit Numeric PMSR register structure */
LpPMSRReg = Port_GpConfigPtr->pPortNumPMSRRegs;
/* Get the count of 32Bit Numeric PMSR registers */
LucNoOfRegs = Port_GpConfigPtr->ucNoOfNumPSRRegs;
/* Get the Numeric base address */
LulBaseAddress = PORT_USER_BASE_ADDRESS_NUMERIC;
}
else
#endif
{
#if (PORT_ALPHA_PORT_GROUPS_AVAILABLE == STD_ON)
if(LenGroupType == PORT_GROUP_ALPHABETIC)
{
/* Get the pointer to 32Bit Alphabetic PMSR register structure */
LpPMSRReg = Port_GpConfigPtr->pPortAlphaPMSRRegs;
/* Get the count of 32Bit Alphabetic PMSR registers */
LucNoOfRegs = Port_GpConfigPtr->ucNoOfAlphaPSRRegs;
/* Get the Alphabetic base address */
LulBaseAddress = PORT_USER_BASE_ADDRESS_ALPHABETIC;
}
else
#endif
{
#if (PORT_JTAG_PORT_GROUPS_AVAILABLE == STD_ON)
if(LenGroupType == PORT_GROUP_JTAG)
{
/* Get the pointer to 32Bit JTAG PMSR register structure */
LpPMSRReg = Port_GpConfigPtr->pPortJPMSRRegs;
/* Get the count of 32Bit JTAG PMSR registers */
LucNoOfRegs = PORT_JTAG_PSR_REGS;
/* Get the JTAG base address */
LulBaseAddress = PORT_USER_BASE_ADDRESS_JTAG;
}
#endif
}
}
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is apparently */
/* unset at this point. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
while(LucNoOfRegs > PORT_ZERO)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is apparently */
/* unset at this point. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Get the contents of the register */
LpPMSRRegAddress = (uint32 *)(LpPMSRReg->usRegAddrOffset +
LulBaseAddress);
/* Write the initial value to the pins which are Directional unchangeable
and retain the values of those pins which are Directional changeable */
*LpPMSRRegAddress = LpPMSRReg->ulMaskAndConfigValue;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation performed */
/* on pointer. */
/* Reason : This is to access the data structure */
/* pointing to next port group. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LpPMSRReg++;
LucNoOfRegs--;
}
}
#define PORT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#if((PORT_DNFA_REG_CONFIG == STD_ON) || (PORT_FCLA_REG_CONFIG == STD_ON))
#define PORT_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Port_FilterConfig
**
** Service ID : Not Applicable
**
** Description : This function used to initialize all the registers of
** filter configuration
**
** Sync/Async : Synchronous
**
** Reentrancy : Non-Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Port_GpConfigPtr
** Function(s) invoked:
** None
*******************************************************************************/
STATIC FUNC(void, PORT_PRIVATE_CODE) Port_FilterConfig(void)
{
#if(PORT_DNFA_REG_CONFIG == STD_ON)
P2CONST(Tdd_Port_DNFARegs, AUTOMATIC, PORT_CONFIG_DATA) LpDNFAReg;
#endif
#if(PORT_FCLA_REG_CONFIG == STD_ON)
P2CONST(Tdd_Port_FCLARegs, AUTOMATIC, PORT_CONFIG_DATA) LpFCLAReg;
#endif
uint32 LulBaseAddress;
uint8 LucNoOfRegs;
#if(PORT_DNFA_REG_CONFIG == STD_ON)
/* Get the base address for DNFA Noise Elimination Registers */
LulBaseAddress = PORT_DNFA_BASE_ADDRESS;
/* Get the pointer to the details of DNFA Noise Elimination Registers */
LpDNFAReg = Port_GpConfigPtr->pPortDNFARegs;
/* Get the count for total number of DNFA Noise Elimination Regsisters */
LucNoOfRegs = Port_GpConfigPtr->ucNoOfDNFARegs;
while(LucNoOfRegs > PORT_ZERO)
{
/* Write the DNFAnCTL register value to the corresponding register */
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
*((uint8 *)(LulBaseAddress + (uint32)LpDNFAReg->usDNFARegAddrOffset)) =
LpDNFAReg->ucDNFACTL;
/* Write the DNFAnEN register value to the corresponding register */
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
*((uint16 *)(LulBaseAddress + (uint32)LpDNFAReg->usDNFARegAddrOffset +
PORT_DNFAEN_ADDRESS_OFFSET)) = LpDNFAReg->usDNFAEN;
/* Increment the pointer to get the value of next structure */
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation performed */
/* on pointer. */
/* Reason : This is to access the data structure */
/* pointing to next port group. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LpDNFAReg++;
/* Decrement the count for total number of DNFA Regsisters */
LucNoOfRegs--;
}
#if(PORT_DNFS_AVAILABLE == STD_ON)
/* Get the address of Digital noise filter sampling clock control register */
LulBaseAddress = PORT_DNFS_BASE_ADDRESS;
/* Load the value of Digital noise filter sampling clock control register */
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
*((uint16 *)LulBaseAddress) = Port_GpConfigPtr->usPortDNFSRegVal;
#endif /* End of PORT_DNFS_AVAILABLE == STD_ON */
#endif /* End of PORT_DNFA_REG_CONFIG == STD_ON */
#if(PORT_FCLA_REG_CONFIG == STD_ON)
/* Get the base address for FCLA Noise Elimination Registers */
LulBaseAddress = PORT_FCLA_BASE_ADDRESS;
/* Get the pointer to the details of FCLA Noise Elimination Registers */
LpFCLAReg = Port_GpConfigPtr->pPortFCLARegs;
/* Get the count for total number of FCLA Noise Elimination Regsisters */
LucNoOfRegs = Port_GpConfigPtr->ucNoOfFCLARegs;
while(LucNoOfRegs > PORT_ZERO)
{
/* Write the FCLAnCTL register value to the corresponding register */
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
*((uint8 *)(LulBaseAddress + (uint32)LpFCLAReg->usFCLARegAddrOffset)) =
LpFCLAReg->ucFCLACTL;
/* Increment the pointer to get the value of next structure */
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation performed */
/* on pointer. */
/* Reason : This is to access the data structure */
/* pointing to next port group. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LpFCLAReg++;
/* Decrement the count for total number of FCLA Regsisters */
LucNoOfRegs--;
}
#endif /* End of PORT_FCLA_REG_CONFIG == STD_ON */
}
#define PORT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* End of (PORT_DNFA_REG_CONFIG == STD_ON) ||
(PORT_FCLA_REG_CONFIG == STD_ON) */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/Include/Dimcntlsettings.h
#ifndef _dimcntlsettings_
#define _dimcntlsettings_
#define Max_Pwm_DutySteps 5
extern void Adc_Group1_Notification(void);
#endif
/************ Organi, Version 3.9.1 Vector-Informatik GmbH ************/
<file_sep>/BSP/MCAL/Icu/Icu.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Icu.c */
/* Version = 3.0.7a */
/* Date = 22-Sep-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains API implementations of Icu Driver Component. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 26-Aug-2009 : Initial version
*
* V3.0.1: 29-Oct-2009 : As per SCR 074, a MISRA message is added at
* line number 2581.
*
* V3.0.2: 25-Feb-2010 : As per SCR 192, pointer to the ICU Channel
* properties based on Measurement Mode is moved from
* 'Tdd_Icu_ChannelConfigType' structure to
* 'Tdd_Icu_TimerChannelConfigType' structure.
*
* V3.0.3: 18-Mar-2010 : As per SCR 230, APIs are updated to avoid
* reading from uninitialized pointers.
*
* V3.0.4: 06-Apr-2010 : As per SCR 242, condition check for DET error
* ICU_E_PARAM_MODE is updated in API Icu_SetMode.
*
* V3.0.5: 28-Jun-2010 : As per SCR 286, following changes are done:
* 1. The API Icu_EnableNotification is updated to
* use IMR registers to enable/disable interrupts.
* 2. The edge count functionality is modified to
* support the use of Timer Array Unit B.
*
* V3.0.6: 20-Jul-2010 : As per SCR 308, the API Icu_Init() is updated with
* pre-compile options for timer channels.
*
* V3.0.7: 26-Aug-2010 : As per SCR 335, following changes are done:
* 1. The APIs Icu_GetTimeElapsed and
* Icu_GetDutyCycleValues are updated to modify the
* signal measurement functionality.
* 2. The APIs Icu_Init, Icu_StartTimestamp and
* Icu_GetTimestampIndex are updated to modify
* the timestamping functionality.
* 3. SW Patch version details are removed.
* V3.0.7a 22-Sep-2011 : As per MANTIS 3551, the API Icu_EnableNotification
* is updated to add clearing interrupt request flag.
* As per MANTIS 3708, the API Icu_GetDutyCycleValues
* is updated to modify the previous active time.
* Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Icu.h"
#include "Icu_PBTypes.h"
#include "Icu_LTTypes.h"
#include "Icu_LLDriver.h"
#include "Icu_Irq.h"
#include "Icu_Ram.h"
#if (ICU_DEV_ERROR_DETECT == STD_ON)
#include "Det.h"
#endif
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
#include "SchM_Icu.h"
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification version information */
#define ICU_C_AR_MAJOR_VERSION ICU_AR_MAJOR_VERSION_VALUE
#define ICU_C_AR_MINOR_VERSION ICU_AR_MINOR_VERSION_VALUE
#define ICU_C_AR_PATCH_VERSION ICU_AR_PATCH_VERSION_VALUE
/* File version information */
#define ICU_C_SW_MAJOR_VERSION 3
/* MISRA Rule : 1.1 */
/* Message : Number of macro definitions should not */
/* exceed 1024. */
/* Reason : Since there are more number of macros */
/* used, this warning occurs . */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
#define ICU_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (ICU_AR_MAJOR_VERSION != ICU_C_AR_MAJOR_VERSION)
#error "Icu.c : Mismatch in Specification Major Version"
#endif
#if (ICU_AR_MINOR_VERSION != ICU_C_AR_MINOR_VERSION)
#error "Icu.c : Mismatch in Specification Minor Version"
#endif
#if (ICU_AR_PATCH_VERSION != ICU_C_AR_PATCH_VERSION)
#error "Icu.c : Mismatch in Specification Patch Version"
#endif
#if (ICU_SW_MAJOR_VERSION != ICU_C_SW_MAJOR_VERSION)
#error "Icu.c : Mismatch in Major Version"
#endif
#if (ICU_SW_MINOR_VERSION != ICU_C_SW_MINOR_VERSION)
#error "Icu.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Icu_Init
**
** Service ID : 0x00
**
** Description : This API performs the initialization of the Icu Driver
** Component.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non-Reentrant
**
** Input Parameters : ConfigPtr
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Icu_GpConfigPtr, Icu_GpChannelConfig,
** Icu_GpTimerChannelConfig, Icu_GpChannelMap,
** Icu_GpTAUUnitConfig, Icu_GpPreviousInputConfig
** Icu_GpChannelRamData, Icu_GpSignalMeasurementData,
** Icu_GpTimeStampData, Icu_GpEdgeCountData,
** Icu_GblDriverStatus, Icu_GenModuleMode
**
** Function(s) invoked:
** Det_ReportError, Icu_HWInit
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, ICU_PUBLIC_CODE) Icu_Init
(P2CONST(Icu_ConfigType, AUTOMATIC, ICU_APPL_CONST) ConfigPtr)
{
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)||\
(ICU_TAUB_UNIT_USED == STD_ON))
/* Defining a pointer to the channel config parameters */
P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST) LpChannel;
/* Defining a pointer to the channel config parameters */
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannel;
/* Pointer definition for Timestamp Channel properties */
P2CONST(Tdd_Icu_TimeStampMeasureConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimestamp;
/* Local variable to store Measurement Mode */
Icu_MeasurementModeType LddMeasurementMode;
uint8 LucIndex;
#endif
/* Defining a pointer to the Channel Ram Data */
P2VAR(Tdd_Icu_ChannelRamDataType, AUTOMATIC,ICU_CONFIG_DATA) LpRamData;
/* Local variable to hold the channel number */
uint8 LucChannelNo;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the ICU Driver is already initialized */
if(Icu_GblDriverStatus == ICU_INITIALIZED)
{
/* Report Error to DET */
Det_ReportError(ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_INIT_SID,
ICU_E_ALREADY_INITIALIZED);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
/* Check if the Configuration pointer is NULL */
if(ConfigPtr == NULL_PTR)
{
/* Report Error to Det */
Det_ReportError(ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_INIT_SID,
ICU_E_PARAM_CONFIG);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
/* MISRA Rule : 1.2 */
/* Message : Dereferencing pointer value that is */
/* apparently NULL. */
/* Reason : "Config" pointer is checked and verified */
/* when DET is switched STD_ON. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check if the database is flashed on the target device */
if((ConfigPtr->ulStartOfDbToc) == ICU_DBTOC_VALUE)
{
/* Update the global pointer with the database configuration pointer */
Icu_GpConfigPtr = ConfigPtr;
/*
* Update the global pointer with the first channel's configuration
* database address
*/
Icu_GpChannelConfig = ConfigPtr->pChannelConfig;
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)||\
(ICU_TAUB_UNIT_USED == STD_ON))
/*
* Update the global pointer with the first Timer channel's configuration
* database address
*/
Icu_GpTimerChannelConfig = ConfigPtr->pTimerChannelConfig;
/* Update the global pointer with the ICU Hardware unit configuration */
Icu_GpTAUUnitConfig = ConfigPtr->pHWUnitConfig;
#endif
#if(ICU_PREVIOUS_INPUT_USED == STD_ON)
/* Update the global pointer with the Previous input configuration */
Icu_GpPreviousInputConfig = ConfigPtr->pPrevInputConfig;
#endif
/* Update the global pointer with the first channel's ram address */
Icu_GpChannelRamData = ConfigPtr->pRamAddress;
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)||\
(ICU_TAUB_UNIT_USED == STD_ON))
/*
* Update the global pointer with the first channel's address
* of Signal Measurement mode type channel's RAM data
*/
Icu_GpSignalMeasurementData = ConfigPtr->pSignalMeasureAddress;
/*
* Update the global pointer with the first channel's address
* of Timestamp mode type channel's RAM data
*/
Icu_GpTimeStampData = ConfigPtr->pTimeStampAddress;
/*
* Update the global pointer with the first channel's address
* of Edge Count mode type channel's RAM data
*/
Icu_GpEdgeCountData = ConfigPtr->pEdgeCountRamAddress;
#endif
/* Update the global pointer with the channel's map */
Icu_GpChannelMap = ConfigPtr->pChannelMap;
/* Initialize all the configured Icu Channels */
for(LucChannelNo = ICU_ZERO; LucChannelNo < ICU_MAX_CHANNEL;
LucChannelNo++)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load the channel data pointer */
LpRamData = Icu_GpChannelRamData + LucChannelNo;
/* Initialize each channel status as idle */
LpRamData->uiChannelStatus = ICU_IDLE;
/* Disable each channel wakeup from sleep mode */
LpRamData->uiWakeupEnable = ICU_FALSE;
/* Disable notification for each channel */
LpRamData->uiNotificationEnable = ICU_FALSE;
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)||\
(ICU_TAUB_UNIT_USED == STD_ON))
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load the channel pointer */
LpChannel = Icu_GpChannelConfig + LucChannelNo;
/* Load the timer channel pointer */
LpTimerChannel = Icu_GpTimerChannelConfig + LucChannelNo;
/* Read the Measurement mode of the channel */
LddMeasurementMode =
(Icu_MeasurementModeType)LpChannel->uiIcuMeasurementMode;
/* Check whether measurement mode is timestamp */
if(LddMeasurementMode == ICU_MODE_TIMESTAMP)
{
/* Load the Timestamp Channel pointer */
LpTimestamp = LpTimerChannel->pChannelProp;
/* Read the current activation edge from RAM */
LucIndex = LpTimestamp->ucTimeStampRamDataIndex;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Reset the flag to indicate that the timestamping is not started */
(Icu_GpTimeStampData + LucIndex)->blTimestampingStarted = ICU_FALSE;
}
#endif
}
/* Invoke low level driver for initializing the hardware */
Icu_HWInit();
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set Icu Driver status as initialized */
Icu_GblDriverStatus = ICU_INITIALIZED;
#endif
/* Set Icu Driver Mode as normal */
Icu_GenModuleMode = ICU_MODE_NORMAL;
}
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/*If there is no valid database is present */
else
{
/* Report to DET */
Det_ReportError(ICU_MODULE_ID, ICU_INSTANCE_ID,ICU_INIT_SID,
ICU_E_INVALID_DATABASE);
}
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
}
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#if (ICU_DE_INIT_API == STD_ON)
/*******************************************************************************
** Function Name : Icu_DeInit
**
** Service ID : 0x01
**
** Description : This API performs the De-Initialization of the Icu
** Driver Component by making all the registers to the
** power on reset state.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non-Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GblDriverStatus
**
** Function(s) invoked:
** Det_ReportError, Icu_HWDeInit
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, ICU_PUBLIC_CODE) Icu_DeInit(void)
{
/* Defining a pointer to the Timer registers */
P2VAR(Tdd_Icu_ChannelRamDataType, AUTOMATIC,ICU_CONFIG_DATA) LpRamData;
/* Local variable to hold the channel number */
uint8 LucChannelNo;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_DEINIT_SID,
ICU_E_UNINIT);
}
else
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
for(LucChannelNo = ICU_ZERO; LucChannelNo < ICU_MAX_CHANNEL;
LucChannelNo++)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load the channel data pointer */
LpRamData = Icu_GpChannelRamData + LucChannelNo;
/* Initialize each channel status as idle */
LpRamData->uiChannelStatus = ICU_IDLE;
/* Disable each channel wakeup from sleep mode */
LpRamData->uiWakeupEnable = ICU_FALSE;
/* Disable notification for each channel */
LpRamData->uiNotificationEnable = ICU_FALSE;
}
/* Invoke low level driver for De-Initializing the hardware */
Icu_HWDeInit();
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set Icu Driver status as un-initialized */
Icu_GblDriverStatus = ICU_UNINITIALIZED;
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
}
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* End of (ICU_DE_INIT_API == STD_ON) */
#if (ICU_SET_MODE_API == STD_ON)
/*******************************************************************************
** Function Name : Icu_SetMode
**
** Service ID : 0x02
**
** Description : This API service will set the operation mode of the
** Icu Driver.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non-Reentrant
**
** Input Parameters : Mode
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GblDriverStatus, Icu_GpChannelConfig
** Icu_GpChannelRamData
**
** Function(s) invoked:
** Det_ReportError, Icu_HWSetMode
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, ICU_PUBLIC_CODE) Icu_SetMode(Icu_ModeType Mode)
{
/* Defining a pointer to the channel configuration parameters */
P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST) LpChannel;
/* Local variable to store Measurement Mode */
Icu_MeasurementModeType LddMeasurementMode;
/* Local variable to loop through the channels */
uint8 LucChannelNo = ICU_ZERO;
/* Local variable to store the channel status */
uint8 LenChannelStatus;
/* Local variable to store error status */
uint8 LucRunningOperation = ICU_FALSE;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_SET_MODE_SID,
ICU_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
/* MISRA Rule : 13.7 */
/* Message : The result of this logical */
/* operation or control expression */
/* is always 'false'. */
/* Reason : As per AUTOSAR all the input */
/* parameters of an API have to be */
/* verified. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Check if mode is neither ICU_MODE_NORMAL nor ICU_MODE_SLEEP */
if((Mode != ICU_MODE_NORMAL) && (Mode != ICU_MODE_SLEEP))
/* MISRA Rule : 14.1 */
/* Message : This statement is unreachable. */
/* Reason : As per AUTOSAR all the input */
/* parameters of an API have to be */
/* verified. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_SET_MODE_SID,
ICU_E_PARAM_MODE);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
do
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load the channel pointer */
LpChannel = Icu_GpChannelConfig + LucChannelNo;
/* Read the Measurement mode of the channel */
LddMeasurementMode =
(Icu_MeasurementModeType)LpChannel->uiIcuMeasurementMode;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Read the channel status */
LenChannelStatus =
(Icu_GpChannelRamData + LucChannelNo)->uiChannelStatus;
/* Check whether Timestamping or Edge counting is in progress */
if (((LddMeasurementMode == ICU_MODE_EDGE_COUNTER) ||
(LddMeasurementMode == ICU_MODE_TIMESTAMP)) &&
(LenChannelStatus == ICU_ACTIVE))
{
/* Update running operation as TRUE */
LucRunningOperation = ICU_TRUE;
}
LucChannelNo++;
} while((LucChannelNo < ICU_MAX_CHANNEL) &&
(LucRunningOperation != ICU_TRUE));
}
#if(ICU_DEV_ERROR_DETECT == STD_ON)
if((Mode == ICU_MODE_SLEEP) && (LucRunningOperation == ICU_TRUE))
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_SET_MODE_SID,
ICU_E_BUSY_OPERATION);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
/* Set operation mode to SLEEP provided there is no running operation */
if((Mode == ICU_MODE_NORMAL) || (LucRunningOperation == ICU_FALSE))
{
Icu_HWSetMode(Mode);
}
}
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* End of (ICU_SET_MODE_API == STD_ON) */
#if(ICU_DISABLE_WAKEUP_API == STD_ON)
/*******************************************************************************
** Function Name : Icu_DisableWakeup
**
** Service ID : 0x03
**
** Description : This API service will disable the wakeup interrupt of
** the requested Icu channel. The requested channel must
** be wakeup capable.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GblDriverStatus, Icu_GpChannelConfig,
** Icu_GpChannelRamData, Icu_GpChannelMap
**
** Function(s) invoked:
** Det_ReportError
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, ICU_PUBLIC_CODE) Icu_DisableWakeup (Icu_ChannelType Channel)
{
Icu_ChannelType LddChannel;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_DISABLE_WAKEUP_SID,
ICU_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(Channel > ICU_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_DISABLE_WAKEUP_SID,
ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
if((LddChannel == ICU_CHANNEL_UNCONFIGURED) ||
((Icu_GpChannelConfig + LddChannel)->uiIcuWakeupCapability == ICU_FALSE))
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_DISABLE_WAKEUP_SID,
ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
#if(ICU_DEV_ERROR_DETECT == STD_OFF)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
#endif
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is possibly */
/* unset at this point. */
/* Reason : This variable is initialized at two places */
/* under different pre-compile options */
/* Verification : However, it is maually verified that atleast */
/* one of the pre-compile options will be ON and */
/* hence this variable will be always initialzed */
/* Hence,this is not having any impact. */
/* Store the disabled wakeup status into RAM */
(Icu_GpChannelRamData + LddChannel)->uiWakeupEnable = ICU_FALSE;
}
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* End of (ICU_DISABLE_WAKEUP_API == STD_ON) */
#if(ICU_ENABLE_WAKEUP_API == STD_ON)
/*******************************************************************************
** Function Name : Icu_EnableWakeup
**
** Service ID : 0x04
**
** Description : This API service will enable the wakeup interrupt of
** the requested Icu channel. The requested channel must
** be wakeup capable.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GblDriverStatus, Icu_GpChannelRamData,
** Icu_GpChannelMap, Icu_GpChannelConfig
**
** Function(s) invoked:
** Det_ReportError
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, ICU_PUBLIC_CODE) Icu_EnableWakeup(Icu_ChannelType Channel)
{
Icu_ChannelType LddChannel;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_ENABLE_WAKEUP_SID,
ICU_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(Channel > ICU_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_ENABLE_WAKEUP_SID,
ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
if((LddChannel == ICU_CHANNEL_UNCONFIGURED) ||
((Icu_GpChannelConfig + LddChannel)->uiIcuWakeupCapability == ICU_FALSE))
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_ENABLE_WAKEUP_SID,
ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
#if(ICU_DEV_ERROR_DETECT == STD_OFF)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
#endif
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is possibly */
/* unset at this point. */
/* Reason : This variable is initialized at two places */
/* under different pre-compile options */
/* Verification : However, it is maually verified that atleast */
/* one of the pre-compile options will be ON and */
/* hence this variable will be always initialzed */
/* Hence,this is not having any impact. */
/* Store the enabled wakeup status into RAM */
(Icu_GpChannelRamData + LddChannel)->uiWakeupEnable = ICU_TRUE;
}
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* End of (ICU_ENABLE_WAKEUP_API == STD_ON) */
/*******************************************************************************
** Function Name : Icu_SetActivationCondition
**
** Service ID : 0x05
**
** Description : This API service will set the activation edge
** according to the Activation parameter for the given
** channel.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Channel, Activation
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GpChannelMap, Icu_GpChannelConfig,
** Icu_GblDriverStatus, Icu_GpChannelRamData,
** Icu_GpTimeStampData, Icu_GpEdgeCountData
**
** Function(s) invoked:
** Det_ReportError, Icu_HWSetActivation
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, ICU_PUBLIC_CODE) Icu_SetActivationCondition
(Icu_ChannelType Channel, Icu_ActivationType Activation)
{
/* Defining a pointer to point to the channel configuration parameters */
P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST) LpChannel;
/* Defining a pointer to point to the timer channel configuration
* parameters
*/
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannel;
/* Pointer definition for Timestamp Channel properties */
P2CONST(Tdd_Icu_TimeStampMeasureConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimestamp;
/* Pointer definition for Edge Count Channel properties */
P2CONST(Tdd_Icu_EdgeCountConfigType, AUTOMATIC, ICU_CONFIG_CONST) LpEdgeCount;
Icu_MeasurementModeType LddMeasurementMode;
uint8 LddChannel;
uint8 LucIndex;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_SET_ACTIVATION_CONDITION_SID, ICU_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
/* MISRA Rule : 13.7 */
/* Message : The result of this logical */
/* operation or control expression */
/* is always 'false'. */
/* Reason : As per AUTOSAR all the input */
/* parameters of an API have to be */
/* verified. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
if(Activation > ICU_BOTH_EDGES)
/* MISRA Rule : 14.1 */
/* Message : This statement is unreachable. */
/* Reason : As per AUTOSAR all the input */
/* parameters of an API have to be */
/* verified. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_SET_ACTIVATION_CONDITION_SID, ICU_E_PARAM_ACTIVATION);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(Channel > ICU_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_SET_ACTIVATION_CONDITION_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
if((LddChannel == ICU_CHANNEL_UNCONFIGURED) ||
((Icu_GpChannelConfig + LddChannel)->uiIcuMeasurementMode
== ICU_MODE_SIGNAL_MEASUREMENT))
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_SET_ACTIVATION_CONDITION_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
#if(ICU_DEV_ERROR_DETECT == STD_OFF)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
#endif
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is possibly */
/* unset at this point. */
/* Reason : This variable is initialized at two places */
/* under different pre-compile options */
/* Verification : However, it is maually verified that atleast */
/* one of the pre-compile options will be ON and */
/* hence this variable will be always initialzed */
/* Hence,this is not having any impact. */
/* Load channel pointer */
LpChannel = Icu_GpChannelConfig + LddChannel;
/* Read the Channel Measurement Mode */
LddMeasurementMode =
(Icu_MeasurementModeType)LpChannel->uiIcuMeasurementMode;
/* Load timer channel pointer */
LpTimerChannel = Icu_GpTimerChannelConfig + LddChannel;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Initialize channel status as idle */
(Icu_GpChannelRamData + LddChannel)->uiChannelStatus = ICU_IDLE;
if(LddMeasurementMode == ICU_MODE_TIMESTAMP)
{
/* Load the Timestamp Channel pointer */
LpTimestamp = LpTimerChannel->pChannelProp;
/* Read the current activation edge from RAM */
LucIndex = LpTimestamp->ucTimeStampRamDataIndex;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
(Icu_GpTimeStampData + LucIndex)->ucActiveEdge = Activation;
Icu_HWSetActivation (LddChannel, Activation);
}
else if(LddMeasurementMode == ICU_MODE_EDGE_COUNTER)
{
/* Load the Edge Count Channel pointer */
LpEdgeCount = LpTimerChannel->pChannelProp;
/* Read the current activation edge from RAM */
LucIndex = LpEdgeCount->ucEdgeCounterRamIndex;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
(Icu_GpEdgeCountData + LucIndex)->ucActiveEdge = Activation;
Icu_HWSetActivation (LddChannel, Activation);
}
#if(ICU_EDGE_DETECTION_API == STD_ON)
else /* if(LddMeasurementMode == ICU_MODE_SIGNAL_EDGE_DETECT) */
{
/* Activate External Interrupt as requested */
Icu_HWSetActivation (LddChannel, Activation);
}
#endif /* End of (ICU_EDGE_DETECTION_API == STD_ON) */
}
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Icu_DisableNotification
**
** Service ID : 0x06
**
** Description : This API service will disable the Icu signal
** notification of the requested channel.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GpChannelMap, Icu_GblDriverStatus,
** Icu_GpChannelConfig, Icu_GpChannelRamData
**
** Function(s) invoked:
** Det_ReportError
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, ICU_PUBLIC_CODE) Icu_DisableNotification(Icu_ChannelType Channel)
{
Icu_ChannelType LddChannel;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_DISABLE_NOTIFICATION_SID, ICU_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(Channel > ICU_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_DISABLE_NOTIFICATION_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
if((LddChannel == ICU_CHANNEL_UNCONFIGURED) ||
((Icu_GpChannelConfig + LddChannel)->uiIcuMeasurementMode ==
ICU_MODE_SIGNAL_MEASUREMENT) ||
((Icu_GpChannelConfig + LddChannel)->uiIcuMeasurementMode ==
ICU_MODE_EDGE_COUNTER))
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_DISABLE_NOTIFICATION_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
else if((Icu_GpChannelRamData + LddChannel)->uiNotificationEnable
== ICU_FALSE)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_DISABLE_NOTIFICATION_SID, ICU_E_ALREADY_DISABLED);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
else
{
/* To avoid MISRA warning */
}
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
#if(ICU_DEV_ERROR_DETECT == STD_OFF)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
#endif
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is possibly */
/* unset at this point. */
/* Reason : This variable is initialized at two places */
/* under different pre-compile options */
/* Verification : However, it is maually verified that atleast */
/* one of the pre-compile options will be ON and */
/* hence this variable will be always initialzed */
/* Hence,this is not having any impact. */
/* Store the disabled notification into RAM */
(Icu_GpChannelRamData + LddChannel)->uiNotificationEnable = ICU_FALSE;
}
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Icu_EnableNotification
**
** Service ID : 0x07
**
** Description : This API service will disable the Icu signal
** notification of the requested channel.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GpChannelMap, Icu_GblDriverStatus,
** Icu_GpChannelConfig, Icu_GpChannelRamData
**
** Function(s) invoked:
** Det_ReportError
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, ICU_PUBLIC_CODE) Icu_EnableNotification(Icu_ChannelType Channel)
{
#if(ICU_EDGE_DETECTION_API == STD_ON)
/* Defining a pointer to the Interrupt Control Register */
P2VAR(uint16, AUTOMATIC,ICU_CONFIG_DATA) LpIntrCntlReg;
/* Defining a pointer to the Interrupt Mask Register */
P2VAR(uint8, AUTOMATIC,ICU_CONFIG_DATA) LpImrIntpCntrlReg;
#endif /* End of (ICU_EDGE_DETECTION_API == STD_ON) */
Icu_ChannelType LddChannel;
#if(ICU_EDGE_DETECTION_API == STD_ON)
/* Defining a pointer to the channel configuration parameters */
P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST) LpChannel;
Icu_MeasurementModeType LddMeasurementMode;
#endif
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_ENABLE_NOTIFICATION_SID, ICU_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(Channel > ICU_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_ENABLE_NOTIFICATION_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
if((LddChannel == ICU_CHANNEL_UNCONFIGURED)
|| ((Icu_GpChannelConfig + LddChannel)->uiIcuMeasurementMode
== ICU_MODE_SIGNAL_MEASUREMENT) ||
((Icu_GpChannelConfig + LddChannel)->uiIcuMeasurementMode
== ICU_MODE_EDGE_COUNTER))
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_ENABLE_NOTIFICATION_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
else if((Icu_GpChannelRamData + LddChannel)->uiNotificationEnable
== ICU_TRUE)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_ENABLE_NOTIFICATION_SID, ICU_E_ALREADY_ENABLED);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
else
{
/* To avoid MISRA warning */
}
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
#if(ICU_DEV_ERROR_DETECT == STD_OFF)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
#endif
#if(ICU_EDGE_DETECTION_API == STD_ON)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is possibly */
/* unset at this point. */
/* Reason : This variable is initialized at two places */
/* under different pre-compile options */
/* Verification : However, it is maually verified that atleast */
/* one of the pre-compile options will be ON and */
/* hence this variable will be always initialzed */
/* Hence,this is not having any impact. */
/* Update the channel configuration pointer to point to the current
channel */
LpChannel = Icu_GpChannelConfig + LddChannel;
/* Read the channel's measurement mode */
LddMeasurementMode =
(Icu_MeasurementModeType)LpChannel->uiIcuMeasurementMode;
#endif
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Store enabled notification into RAM */
(Icu_GpChannelRamData + LddChannel)->uiNotificationEnable = ICU_TRUE;
#if(ICU_EDGE_DETECTION_API == STD_ON)
/*
* Cancel pending interrupts in case the channel is configured for
* edge detection functionality
*/
if(LddMeasurementMode == ICU_MODE_SIGNAL_EDGE_DETECT)
{
/* Load the interrupt control register */
LpImrIntpCntrlReg = LpChannel->pImrIntrCntlRegs;
/* Disable channel Interrupt */
*(LpImrIntpCntrlReg) |= ~(LpChannel->ucImrMaskValue);
/* Load interrupt control register and disable interrupt */
LpIntrCntlReg = LpChannel->pIntrCntlRegs;
/* Clear the interrupt request flag */
*(LpIntrCntlReg) &= ICU_CLEAR_INT_REQUEST_FLAG;
/* Enable channel Interrupt */
*(LpImrIntpCntrlReg) &= LpChannel->ucImrMaskValue;
}
#endif /* End of (ICU_EDGE_DETECTION_API == STD_ON) */
}
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#if (ICU_GET_INPUT_STATE_API == STD_ON)
/*******************************************************************************
** Function Name : Icu_GetInputState
**
** Service ID : 0x08
**
** Description : This API service will return the status of the Icu
** input.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Icu_InputStateType
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GpChannelMap, Icu_GblDriverStatus,
** Icu_GpChannelConfig, Icu_GpChannelRamData
**
** Function(s) invoked:
** Det_ReportError, SchM_Enter_Icu, SchM_Exit_Icu
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(Icu_InputStateType, ICU_PUBLIC_CODE) Icu_GetInputState
(Icu_ChannelType Channel)
{
Icu_ChannelType LddChannel;
Icu_InputStateType LddChannelState = ICU_IDLE;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to DET */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_GET_INPUT_STATE_SID,
ICU_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(Channel > ICU_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report Error to DET */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_GET_INPUT_STATE_SID,
ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
if(LddChannel == ICU_CHANNEL_UNCONFIGURED)
{
/* Report Error to DET */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_GET_INPUT_STATE_SID,
ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
if(((Icu_GpChannelConfig + LddChannel)->uiIcuMeasurementMode !=
ICU_MODE_SIGNAL_EDGE_DETECT) &&
((Icu_GpChannelConfig + LddChannel)->uiIcuMeasurementMode !=
ICU_MODE_SIGNAL_MEASUREMENT))
{
/* Report Error to DET */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_GET_INPUT_STATE_SID,
ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
#if(ICU_DEV_ERROR_DETECT == STD_OFF)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
#endif
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Critical Section */
SchM_Enter_Icu (ICU_CHANNEL_DATA_PROTECTION);
#endif /* End of (ICU_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is possibly */
/* unset at this point. */
/* Reason : This variable is initialized at two places */
/* under different pre-compile options */
/* Verification : However, it is maually verified that atleast */
/* one of the pre-compile options will be ON and */
/* hence this variable will be always initialzed */
/* Hence,this is not having any impact. */
/* Read the channel input status */
LddChannelState =
(Icu_InputStateType)(Icu_GpChannelRamData + LddChannel)->uiChannelStatus;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Store channel status as idle */
(Icu_GpChannelRamData + LddChannel)->uiChannelStatus = ICU_IDLE;
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Critical Section */
SchM_Exit_Icu (ICU_CHANNEL_DATA_PROTECTION);
#endif /* End of (ICU_CRITICAL_SECTION_PROTECTION == STD_ON) */
}
return(LddChannelState);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* End of (ICU_GET_INPUT_STATE_API == STD_ON) */
#if (ICU_TIMESTAMP_API == STD_ON)
/*******************************************************************************
** Function Name : Icu_StartTimestamp
**
** Service ID : 0x09
**
** Description : This API service starts the capturing of timer values
** on the edges activated (rising/falling/both) to an
** externalbuffer at the beginning of the buffer.
**
** Sync/Async : Asynchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Channel, BufferPtr, BufferSize, NotifyInterval
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GpChannelMap, Icu_GpChannelConfig,
** Icu_GblDriverStatus, Icu_GpTimeStampData,
** Icu_GpChannelRamData
**
** Function(s) invoked:
** Det_ReportError, Icu_HWStartCountMeasurement
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, ICU_PUBLIC_CODE) Icu_StartTimestamp (Icu_ChannelType Channel,
P2VAR (Icu_ValueType, AUTOMATIC, ICU_APPL_DATA)BufferPtr,
uint16 BufferSize, uint16 NotifyInterval)
{
/* Pointer for Timestamp Channel properties */
P2CONST(Tdd_Icu_TimeStampMeasureConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimestamp;
/* Pointer to point to the timer channel configuration parameters */
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannel;
/* Local pointer variable for Timestamp channel data */
P2VAR(Tdd_Icu_TimeStampChannelRamDataType, AUTOMATIC, ICU_CONFIG_DATA)
LpTimeStampData;
Icu_ChannelType LddChannel;
uint8 LucIndex;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_START_TIMESTAMP_SID,
ICU_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(Channel > ICU_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_START_TIMESTAMP_SID,
ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
if((LddChannel == ICU_CHANNEL_UNCONFIGURED) ||
((Icu_GpChannelConfig + LddChannel)->uiIcuMeasurementMode
!= ICU_MODE_TIMESTAMP))
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_START_TIMESTAMP_SID,
ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
/* Check if pointer passed is Null */
if(BufferPtr == NULL_PTR)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_START_TIMESTAMP_SID,
ICU_E_PARAM_BUFFER_PTR);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(BufferSize == ICU_ZERO)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_START_TIMESTAMP_SID,
ICU_E_PARAM_BUFFER_SIZE);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
#if(ICU_DEV_ERROR_DETECT == STD_OFF)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
#endif
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is possibly */
/* unset at this point. */
/* Reason : This variable is initialized at two places */
/* under different pre-compile options */
/* Verification : However, it is maually verified that atleast */
/* one of the pre-compile options will be ON and */
/* hence this variable will be always initialzed */
/* Hence,this is not having any impact. */
/* Read timer channel configuration pointer */
LpTimerChannel = Icu_GpTimerChannelConfig + LddChannel;
/* Load the Timestamp Channel pointer */
LpTimestamp = LpTimerChannel->pChannelProp;
LucIndex = LpTimestamp->ucTimeStampRamDataIndex;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Initialize Timestamp RAM data */
LpTimeStampData = Icu_GpTimeStampData + LucIndex;
LpTimeStampData->pBufferPointer = BufferPtr;
LpTimeStampData->usBufferSize = BufferSize;
LpTimeStampData->usTimestampIndex = ICU_ZERO;
LpTimeStampData->usTimestampsCounter = ICU_ZERO;
LpTimeStampData->usNotifyInterval = NotifyInterval;
/* Activate Timestamp capturing */
Icu_HWStartCountMeasurement (LddChannel);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Initialize channel status as active */
(Icu_GpChannelRamData + LddChannel)->uiChannelStatus = ICU_ACTIVE;
/* MISRA Rule : 17.4
Message : Performing pointer arithmetic.
Reason : For code optimization.
Verification : However, part of the code is
verified manually and it is not
having any impact.
*/
/* Set the flag to indicate that the timestamping is started */
(Icu_GpTimeStampData + LucIndex)->blTimestampingStarted = ICU_TRUE;
}
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Icu_StopTimestamp
**
** Service ID : 0x0A
**
** Description : This API service stops the timestamp measurement of
** the requested channel.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GpChannelMap, Icu_GpChannelConfig,
** Icu_GpChannelRamData
**
** Function(s) invoked:
** Det_ReportError, Icu_HWStopCountMeasurement
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, ICU_PUBLIC_CODE) Icu_StopTimestamp(Icu_ChannelType Channel)
{
Icu_ChannelType LddChannel;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_STOP_TIMESTAMP_SID,
ICU_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(Channel > ICU_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_STOP_TIMESTAMP_SID,
ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
if((LddChannel == ICU_CHANNEL_UNCONFIGURED) ||
((Icu_GpChannelConfig + LddChannel)->uiIcuMeasurementMode !=
ICU_MODE_TIMESTAMP))
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_STOP_TIMESTAMP_SID,
ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
else if((Icu_GpChannelRamData + LddChannel)->uiChannelStatus == ICU_IDLE)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_STOP_TIMESTAMP_SID,
ICU_E_NOT_STARTED);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
else
{
/* To avoid MISRA warning */
}
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
#if(ICU_DEV_ERROR_DETECT == STD_OFF)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
#endif
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is possibly */
/* unset at this point. */
/* Reason : This variable is initialized at two places */
/* under different pre-compile options */
/* Verification : However, it is maually verified that atleast */
/* one of the pre-compile options will be ON and */
/* hence this variable will be always initialzed */
/* Hence,this is not having any impact. */
/* Disable Timestamp capturing */
Icu_HWStopCountMeasurement (LddChannel);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Initialize channel status as idle */
(Icu_GpChannelRamData + LddChannel)->uiChannelStatus = ICU_IDLE;
}
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Icu_GetTimestampIndex
**
** Service ID : 0x0B
**
** Description : This API service reads the timestamp index the next to
** be written for the requested channel.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Icu_IndexType
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GpChannelMap, Icu_GblDriverStatus,
** Icu_GpChannelRamData, Icu_GpTimeStampData
**
** Function(s) invoked:
** Det_ReportError, SchM_Enter_Icu, SchM_Exit_Icu
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(Icu_IndexType, ICU_PUBLIC_CODE) Icu_GetTimestampIndex
(Icu_ChannelType Channel)
{
/* Defining a pointer to point to the timer channel configuration
* parameters
*/
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannel;
/* Pointer definition for Timestamp Channel properties */
P2CONST(Tdd_Icu_TimeStampMeasureConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimestamp;
uint16 LusTimestampIndex = ICU_ZERO;
Icu_ChannelType LddChannel;
uint8 LucIndex;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_GET_TIMESTAMP_INDEX_SID, ICU_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(Channel > ICU_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_GET_TIMESTAMP_INDEX_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
if((LddChannel == ICU_CHANNEL_UNCONFIGURED) ||
((Icu_GpChannelConfig + LddChannel)->uiIcuMeasurementMode
!= ICU_MODE_TIMESTAMP))
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_GET_TIMESTAMP_INDEX_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
#if(ICU_DEV_ERROR_DETECT == STD_OFF)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
#endif
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is possibly */
/* unset at this point. */
/* Reason : This variable is initialized at two places */
/* under different pre-compile options */
/* Verification : However, it is maually verified that atleast */
/* one of the pre-compile options will be ON and */
/* hence this variable will be always initialzed */
/* Hence,this is not having any impact. */
/* Read timer channel configuration pointer */
LpTimerChannel = Icu_GpTimerChannelConfig + LddChannel;
/* Load the Timestamp Channel pointer */
LpTimestamp = LpTimerChannel->pChannelProp;
LucIndex = LpTimestamp->ucTimeStampRamDataIndex;
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Critical Section */
SchM_Enter_Icu (ICU_TIMESTAMP_DATA_PROTECTION);
#endif /* End of (ICU_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* If timestamping is started, then only return timestamp index value */
if ((Icu_GpTimeStampData + LucIndex)->blTimestampingStarted == ICU_TRUE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LusTimestampIndex = (Icu_GpTimeStampData + LucIndex)->usTimestampIndex;
}
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Critical Section */
SchM_Exit_Icu (ICU_TIMESTAMP_DATA_PROTECTION);
#endif /* End of (ICU_CRITICAL_SECTION_PROTECTION == STD_ON) */
}
return(LusTimestampIndex);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* End of (ICU_TIMESTAMP_API == STD_ON) */
#if(ICU_EDGE_COUNT_API == STD_ON)
/*******************************************************************************
** Function Name : Icu_ResetEdgeCount
**
** Service ID : 0x0C
**
** Description : This API resets the value of the counted edges.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GblDriverStatus, Icu_GpChannelConfig,
** Icu_GpChannelMap
**
** Function(s) invoked:
** Det_ReportError, Icu_HWResetEdgeCount
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, ICU_PUBLIC_CODE) Icu_ResetEdgeCount(Icu_ChannelType Channel)
{
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
Icu_ChannelType LddChannel;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_RESET_EDGE_COUNT_SID,
ICU_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(Channel > ICU_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_RESET_EDGE_COUNT_SID,
ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
if((LddChannel == ICU_CHANNEL_UNCONFIGURED) ||
((Icu_GpChannelConfig + LddChannel)->uiIcuMeasurementMode !=
ICU_MODE_EDGE_COUNTER))
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_RESET_EDGE_COUNT_SID,
ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
#if(ICU_DEV_ERROR_DETECT == STD_OFF)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
#endif
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is possibly */
/* unset at this point. */
/* Reason : This variable is initialized at two places */
/* under different pre-compile options */
/* Verification : However, it is maually verified that atleast */
/* one of the pre-compile options will be ON and */
/* hence this variable will be always initialzed */
/* Hence,this is not having any impact. */
/* Invoke the Low Level Driver for resetting the edge count */
Icu_HWResetEdgeCount (LddChannel);
}
#endif /* End of
((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON)) */
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Icu_EnableEdgeCount
**
** Service ID : 0x0D
**
** Description : This API service enables the counting of edges of the
** requested channel.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GpChannelMap, Icu_GpChannelConfig,
** Icu_GblDriverStatus, Icu_GpEdgeCountData
** Icu_GpChannelRamData
**
** Function(s) invoked:
** Det_ReportError, Icu_HWStartCountMeasurement,
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, ICU_PUBLIC_CODE) Icu_EnableEdgeCount(Icu_ChannelType Channel)
{
Icu_ChannelType LddChannel;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_ENABLE_EDGE_COUNT_SID,
ICU_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(Channel > ICU_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_ENABLE_EDGE_COUNT_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
if((LddChannel == ICU_CHANNEL_UNCONFIGURED) ||
((Icu_GpChannelConfig + LddChannel)->uiIcuMeasurementMode
!= ICU_MODE_EDGE_COUNTER))
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_ENABLE_EDGE_COUNT_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
#if(ICU_DEV_ERROR_DETECT == STD_OFF)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
#endif
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is possibly */
/* unset at this point. */
/* Reason : This variable is initialized at two places */
/* under different pre-compile options */
/* Verification : However, it is maually verified that atleast */
/* one of the pre-compile options will be ON and */
/* hence this variable will be always initialzed */
/* Hence,this is not having any impact. */
/* Start count measurement for the channel */
Icu_HWStartCountMeasurement(LddChannel);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Initialize the channel status as active */
(Icu_GpChannelRamData + LddChannel)->uiChannelStatus = ICU_ACTIVE;
}
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Icu_DisableEdgeCount
**
** Service ID : 0x0E
**
** Description : This API service disables the counting of edges of the
** requested channel.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GpChannelMap, Icu_GblDriverStatus,
** Icu_GpChannelRamData, Icu_GpChannelConfig
**
** Function(s) invoked:
** Det_ReportError, Icu_HWStopCountMeasurement
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, ICU_PUBLIC_CODE) Icu_DisableEdgeCount(Icu_ChannelType Channel)
{
Icu_ChannelType LddChannel;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_DISABLE_EDGE_COUNT_SID,
ICU_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(Channel > ICU_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_DISABLE_EDGE_COUNT_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
if((LddChannel == ICU_CHANNEL_UNCONFIGURED) ||
((Icu_GpChannelConfig + LddChannel)->uiIcuMeasurementMode !=
ICU_MODE_EDGE_COUNTER))
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_DISABLE_EDGE_COUNT_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
#if(ICU_DEV_ERROR_DETECT == STD_OFF)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
#endif
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is possibly */
/* unset at this point. */
/* Reason : This variable is initialized at two places */
/* under different pre-compile options */
/* Verification : However, it is maually verified that atleast */
/* one of the pre-compile options will be ON and */
/* hence this variable will be always initialzed */
/* Hence,this is not having any impact. */
/* Invoke the Low Level Driver for disabling the edge count */
Icu_HWStopCountMeasurement(LddChannel);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Initialize the channel status as idle */
(Icu_GpChannelRamData + LddChannel)->uiChannelStatus = ICU_IDLE;
}
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Icu_GetEdgeNumbers
**
** Service ID : 0x0F
**
** Description : This API service reads the number of counted edges
** after the last reset of edges happened.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Icu_EdgeNumberType
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GpChannelMap, Icu_GblDriverStatus,
** Icu_GpChannelConfig
**
** Function(s) invoked:
** Det_ReportError, Icu_HWGetEdgeNumbers
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(Icu_EdgeNumberType, ICU_PUBLIC_CODE) Icu_GetEdgeNumbers
(Icu_ChannelType Channel)
{
/* Defining a pointer to point to the timer channel configuration
* parameters
*/
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig;
/* Pointer definition for Signal Measurement Channel properties */
P2CONST(Tdd_Icu_EdgeCountConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpEdgeCount;
/* Pointer definition for Signal Measurement RAM data */
P2VAR(Tdd_Icu_EdgeCountChannelRamDataType, AUTOMATIC,ICU_CONFIG_DATA)
LpEdgeCountData;
Icu_ChannelType LddChannel;
Icu_EdgeNumberType LddEdgeCount = ICU_ZERO;
uint8 LucRamIndex;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_GET_EDGE_NUMBERS_SID,
ICU_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(Channel > ICU_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report Error to Det */
Det_ReportError(ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_GET_EDGE_NUMBERS_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
if((LddChannel == ICU_CHANNEL_UNCONFIGURED) ||
((Icu_GpChannelConfig + LddChannel)->uiIcuMeasurementMode !=
ICU_MODE_EDGE_COUNTER))
{
/* Report Error to Det */
Det_ReportError(ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_GET_EDGE_NUMBERS_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
#if (ICU_DEV_ERROR_DETECT == STD_OFF)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
#endif
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is possibly */
/* unset at this point. */
/* Reason : This variable is initialized at two places */
/* under different pre-compile options */
/* Verification : However, it is maually verified that atleast */
/* one of the pre-compile options will be ON and */
/* hence this variable will be always initialzed */
/* Hence,this is not having any impact. */
/* Read timer channel configuration pointer */
LpTimerChannelConfig = Icu_GpTimerChannelConfig + LddChannel;
/* Read the channel properties */
LpEdgeCount = LpTimerChannelConfig->pChannelProp;
/* Read the channel ram index */
LucRamIndex = LpEdgeCount->ucEdgeCounterRamIndex;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpEdgeCountData = Icu_GpEdgeCountData + LucRamIndex;
Icu_HWGetEdgeNumbers(LddChannel);
LddEdgeCount = LpEdgeCountData->usIcuEdgeCount;
}
return(LddEdgeCount);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* End of (ICU_EDGE_COUNT_API == STD_ON) */
#if (ICU_SIGNAL_MEASUREMENT_API == STD_ON)
/*******************************************************************************
** Function Name : Icu_StartSignalMeasurement
**
** Service ID : 0x13
**
** Description : This API starts the measurement of signals beginning
** with the configured default start edge which occurs
** first after the call of this service.
**
** Sync/Async : Asynchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GpChannelMap, Icu_GpChannelConfig,
** Icu_GblDriverStatus, Icu_GpChannelRamData
**
** Function(s) invoked:
** Det_ReportError, Icu_HWStartCountMeasurement
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, ICU_PUBLIC_CODE) Icu_StartSignalMeasurement(Icu_ChannelType Channel)
{
Icu_ChannelType LddChannel;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_START_SIGNAL_MEASUREMENT_SID, ICU_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(Channel > ICU_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_START_SIGNAL_MEASUREMENT_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
if((LddChannel == ICU_CHANNEL_UNCONFIGURED) ||
((Icu_GpChannelConfig + LddChannel)->uiIcuMeasurementMode
!= ICU_MODE_SIGNAL_MEASUREMENT))
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_START_SIGNAL_MEASUREMENT_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
#if(ICU_DEV_ERROR_DETECT == STD_OFF)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
#endif
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is possibly */
/* unset at this point. */
/* Reason : This variable is initialized at two places */
/* under different pre-compile options */
/* Verification : However, it is maually verified that atleast */
/* one of the pre-compile options will be ON and */
/* hence this variable will be always initialzed */
/* Hence,this is not having any impact. */
/* Start count measurement for the channel */
Icu_HWStartCountMeasurement(LddChannel);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Initialize channel status as idle */
(Icu_GpChannelRamData + LddChannel)->uiChannelStatus = ICU_IDLE;
}
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Icu_StopSignalMeasurement
**
** Service ID : 0x14
**
** Description : This API stops the measurement of signals of the
** given channel.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GpChannelMap, Icu_GpChannelConfig,
** Icu_GblDriverStatus, Icu_GpChannelRamData
**
** Function(s) invoked:
** Det_ReportError, Icu_HWStopCountMeasurement
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, ICU_PUBLIC_CODE) Icu_StopSignalMeasurement(Icu_ChannelType Channel)
{
Icu_ChannelType LddChannel;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_STOP_SIGNAL_MEASUREMENT_SID, ICU_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(Channel > ICU_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_STOP_SIGNAL_MEASUREMENT_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
if((LddChannel == ICU_CHANNEL_UNCONFIGURED) ||
(((Icu_GpChannelConfig + LddChannel)->uiIcuMeasurementMode) !=
ICU_MODE_SIGNAL_MEASUREMENT))
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_STOP_SIGNAL_MEASUREMENT_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
#if(ICU_DEV_ERROR_DETECT == STD_OFF)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
#endif
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is possibly */
/* unset at this point. */
/* Reason : This variable is initialized at two places */
/* under different pre-compile options */
/* Verification : However, it is maually verified that atleast */
/* one of the pre-compile options will be ON and */
/* hence this variable will be always initialzed */
/* Hence,this is not having any impact. */
/* Disable Timestamp capturing */
Icu_HWStopCountMeasurement (LddChannel);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Initialize channel status as idle */
(Icu_GpChannelRamData + LddChannel)->uiChannelStatus = ICU_IDLE;
}
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* End of (ICU_SIGNAL_MEASUREMENT_API == STD_ON) */
#if(ICU_GET_TIME_ELAPSED_API == STD_ON)
/*******************************************************************************
** Function Name : Icu_GetTimeElapsed
**
** Service ID : 0x10
**
** Description : This API service reads the elapsed signal time (Low
** Time,High Time or Period Time) of the requested
** channel as configured.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Icu_ValueType
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GpChannelMap, Icu_GpChannelConfig,
** Icu_GblDriverStatus, Icu_GpSignalMeasurementData
**
** Function(s) invoked:
** Det_ReportError, SchM_Enter_Icu, SchM_Exit_Icu
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(Icu_ValueType, ICU_PUBLIC_CODE) Icu_GetTimeElapsed(Icu_ChannelType Channel)
{
/* Defining a pointer to point to the timer channel configuration
* parameters
*/
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig;
/* Pointer definition for Signal Measurement Channel properties */
P2CONST(Tdd_Icu_SignalMeasureConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpSignalMeasure;
/* Local pointer to the address of Signal Measure RAM data */
P2VAR(Tdd_Icu_SignalMeasureChannelRamDataType, AUTOMATIC, ICU_CONFIG_DATA)
LpSignalMeasurementData;
Icu_SignalMeasurementPropertyType LddMeasureProperty;
Icu_ChannelType LddChannel;
Icu_ValueType LddSignalTime = ICU_ZERO;
uint8 LucIndex;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_GET_TIME_ELAPSED_SID,
ICU_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(Channel > ICU_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_GET_TIME_ELAPSED_SID,
ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
if((LddChannel == ICU_CHANNEL_UNCONFIGURED) ||
((Icu_GpChannelConfig + LddChannel)->uiIcuMeasurementMode
!= ICU_MODE_SIGNAL_MEASUREMENT))
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_GET_TIME_ELAPSED_SID,
ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
#if(ICU_DEV_ERROR_DETECT == STD_OFF)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
#endif
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is possibly */
/* unset at this point. */
/* Reason : This variable is initialized at two places */
/* under different pre-compile options */
/* Verification : However, it is maually verified that atleast */
/* one of the pre-compile options will be ON and */
/* hence this variable will be always initialzed */
/* Hence,this is not having any impact. */
/* Read timer channel configuration pointer */
LpTimerChannelConfig = Icu_GpTimerChannelConfig + LddChannel;
/* Read the channel properties */
LpSignalMeasure = LpTimerChannelConfig->pChannelProp;
LddMeasureProperty = (Icu_SignalMeasurementPropertyType)
LpSignalMeasure->uiSignalMeasurementProperty;
LpSignalMeasure = LpTimerChannelConfig->pChannelProp;
LucIndex = LpSignalMeasure->ucSignalMeasureRamDataIndex;
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Critical Section */
SchM_Enter_Icu (ICU_SIGNALMEASURE_DATA_PROTECTION);
#endif /* End of (ICU_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpSignalMeasurementData = Icu_GpSignalMeasurementData + LucIndex;
/* Check for the status of Channel */
if((Icu_GpChannelRamData + LddChannel)->uiChannelStatus == ICU_ACTIVE)
{
if((LddMeasureProperty == (ICU_HIGH_TIME)) ||
(LddMeasureProperty == (ICU_LOW_TIME)))
{
/* Read the captured Signal Active Time */
LddSignalTime = LpSignalMeasurementData->ulSignalActiveTime;
LpSignalMeasurementData->ulSignalActiveTime = ICU_ZERO;
}
else /* (LddMeasureProperty == ICU_PERIOD_TIME) */
{
/* Read the captured Signal Period Time */
LddSignalTime = LpSignalMeasurementData->ulSignalPeriodTime;
LpSignalMeasurementData->ulSignalPeriodTime = ICU_ZERO;
}
}
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Critical Section */
SchM_Exit_Icu (ICU_SIGNALMEASURE_DATA_PROTECTION);
#endif /* End of (ICU_CRITICAL_SECTION_PROTECTION == STD_ON) */
}
return(LddSignalTime);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* End of (ICU_GET_TIME_ELAPSED_API == STD_ON) */
#if (ICU_GET_DUTY_CYCLE_VALUES_API == STD_ON)
/*******************************************************************************
** Function Name : Icu_GetDutyCycleValues
**
** Service ID : 0x11
**
** Description : This API service reads the coherent high time and
** period time for the requested Icu channel.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : Channel
**
** InOut Parameters : None
**
** Output Parameters : DutyCycleValues
**
** Return parameter : None
**
** Preconditions : The Icu Driver must be initialized.
**
** Remarks : Global Variable(s):
** Icu_GpChannelMap, Icu_GpChannelConfig,
** Icu_GblDriverStatus, Icu_GpSignalMeasurementData
**
** Function(s) invoked:
** Det_ReportError, SchM_Enter_Icu, SchM_Exit_Icu
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, ICU_PUBLIC_CODE) Icu_GetDutyCycleValues(Icu_ChannelType Channel,
P2VAR(Icu_DutyCycleType, AUTOMATIC, ICU_APPL_DATA) DutyCycleValues)
{
/* Defining a pointer to point to the timer channel configuration
* parameters
*/
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig;
/* Pointer definition for Signal Measurement Channel properties */
P2CONST(Tdd_Icu_SignalMeasureConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpSignalMeasure;
/* Local pointer to the address of Signal Measure RAM data */
P2VAR(Tdd_Icu_SignalMeasureChannelRamDataType, AUTOMATIC, ICU_CONFIG_DATA)
LpSignalMeasurementData;
/* Local variable to store the duty cycle values */
Icu_ChannelType LddChannel;
uint8 LucIndex;
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Set error status flag to false */
boolean LblDetErrFlag = ICU_FALSE;
/* Check if the Icu Module is not initialized */
if(Icu_GblDriverStatus != ICU_INITIALIZED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_GET_DUTY_CYCLE_VALUES_SID, ICU_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(Channel > ICU_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_GET_DUTY_CYCLE_VALUES_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
if(LblDetErrFlag == ICU_FALSE)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
if((LddChannel == ICU_CHANNEL_UNCONFIGURED) ||
((Icu_GpChannelConfig + LddChannel)->uiIcuMeasurementMode
!= ICU_MODE_SIGNAL_MEASUREMENT))
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_GET_DUTY_CYCLE_VALUES_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Read timer channel configuration pointer */
LpTimerChannelConfig = Icu_GpTimerChannelConfig + LddChannel;
/* Load channel properties */
LpSignalMeasure = LpTimerChannelConfig->pChannelProp;
/* Check if the channel is configured for duty cycle measurement */
if(LpSignalMeasure->blDutyCycleChannel != ICU_TRUE)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_GET_DUTY_CYCLE_VALUES_SID, ICU_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
/* Check if pointer passed is Null */
if(DutyCycleValues == NULL_PTR)
{
/* Report Error to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID,
ICU_GET_DUTY_CYCLE_VALUES_SID, ICU_E_PARAM_BUFFER_PTR);
/* Set error status flag to true */
LblDetErrFlag = ICU_TRUE;
}
}
if(LblDetErrFlag == ICU_FALSE)
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
#if (ICU_DEV_ERROR_DETECT == STD_OFF)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Load Channel index of Icu_GstChannelConfig */
LddChannel = *(Icu_GpChannelMap + Channel);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Read timer channel configuration pointer */
LpTimerChannelConfig = Icu_GpTimerChannelConfig + LddChannel;
/* Load channel properties */
LpSignalMeasure = LpTimerChannelConfig->pChannelProp;
#endif
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is possibly */
/* unset at this point. */
/* Reason : This variable is initialized at two places */
/* under different pre-compile options */
/* Verification : However, it is maually verified that atleast */
/* one of the pre-compile options will be ON and */
/* hence this variable will be always initialzed */
/* Hence,this is not having any impact. */
/* Read channel's RAM Index */
LucIndex = LpSignalMeasure->ucSignalMeasureRamDataIndex;
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Critical Section */
SchM_Enter_Icu (ICU_SIGNALMEASURE_DATA_PROTECTION);
#endif /* End of (ICU_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpSignalMeasurementData = Icu_GpSignalMeasurementData + LucIndex;
/* Check for the status of Channel */
if((Icu_GpChannelRamData + LddChannel)->uiChannelStatus == ICU_ACTIVE)
{
if(LpSignalMeasurementData->ulSignalPeriodTime > ICU_ZERO)
{
/* MISRA Rule : 1.2 */
/* Message : Dereferencing pointer value that is */
/* apparently NULL. */
/* Reason : "DutyCycleValues" pointer is checked */
/* and verified when DET is switched STD_ON */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Read the captured Signal Active Time */
DutyCycleValues->ActiveTime =
LpSignalMeasurementData->ulPrevSignalActiveTime;
/* MISRA Rule : 1.2 */
/* Message : Dereferencing pointer value that is */
/* apparently NULL. */
/* Reason : "DutyCycleValues" pointer is checked */
/* and verified when DET is switched STD_ON */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Read the captured Signal Period Time */
DutyCycleValues->PeriodTime =
LpSignalMeasurementData->ulSignalPeriodTime;
LpSignalMeasurementData->ulSignalPeriodTime = ICU_ZERO;
}
else
{
DutyCycleValues->ActiveTime = ICU_ZERO;
DutyCycleValues->PeriodTime = ICU_ZERO;
}
}
#if(ICU_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Critical Section */
SchM_Exit_Icu (ICU_SIGNALMEASURE_DATA_PROTECTION);
#endif /* End of (ICU_CRITICAL_SECTION_PROTECTION == STD_ON) */
}
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* End of (ICU_GET_DUTY_CYCLE_VALUES_API == STD_ON) */
#if (ICU_GET_VERSION_INFO_API == STD_ON)
/*******************************************************************************
** Function Name : Icu_GetVersionInfo
**
** Service ID : 0x12
**
** Description : This API reads the Version Information of Icu Driver.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non-Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : versioninfo
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
**
** Function(s) invoked:
** Det_ReportError
**
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, ICU_PUBLIC_CODE)Icu_GetVersionInfo
(P2VAR(Std_VersionInfoType, AUTOMATIC, ICU_APPL_DATA) versioninfo)
{
#if(ICU_DEV_ERROR_DETECT == STD_ON)
/* Check if pointer passed is Null */
if(versioninfo == NULL_PTR)
{
/* Report to Det */
Det_ReportError (ICU_MODULE_ID, ICU_INSTANCE_ID, ICU_GET_VERSION_INFO_SID,
ICU_E_PARAM_POINTER);
}
else
#endif /* End of (ICU_DEV_ERROR_DETECT == STD_ON) */
{
/* Update the vendor Id */
versioninfo->vendorID = ICU_VENDOR_ID;
/* Update the module Id */
versioninfo->moduleID = ICU_MODULE_ID;
/* Copy the instance Id */
versioninfo->instanceID = ICU_INSTANCE_ID;
/* Update Software Major Version */
versioninfo->sw_major_version = ICU_SW_MAJOR_VERSION;
/* Update Software Minor Version */
versioninfo->sw_minor_version = ICU_SW_MINOR_VERSION;
/* Update Software Patch Version */
versioninfo->sw_patch_version = ICU_SW_PATCH_VERSION;
}
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* End of (ICU_GET_VERSION_INFO_API == STD_ON) */
/*******************************************************************************
** End of File **
*******************************************************************************/<file_sep>/BSP/Gendata/ComStack_Types.h
/* -----------------------------------------------------------------------------
Filename: ComStack_Types.h
Description: Toolversion: 13.02.10.01.20.01.46.01.00.00
Serial Number: CBD1200146
Customer Info: Pan Asia Technical Automotive Center Co., Ltd. PATAC
Micro: Renesas uPD70F3558
Compiler: Green Hills
Generator Fwk : GENy
Generator Module: GenTool_GenyComStackTypes
Configuration : D:\dyd\ForFtp-dyd_\clea+BCM_\CAN_Geny_Configuration\GenyOnSendondSIP\Config\ECUC\NewSipBCM.ecuc.vdsxml
ECU:
TargetSystem: Hw_V85xFcnCpu
Compiler: GHS
Derivates: Fx4
Channel "BB":
Databasefile:
Bussystem: CAN
Manufacturer: Vector
Node: CanStateManagerConfiguration
Generated by , 2012-09-29 10:34:01
----------------------------------------------------------------------------- */
/* -----------------------------------------------------------------------------
C O P Y R I G H T
-------------------------------------------------------------------------------
Copyright (c) 2001-2011 by Vector Informatik GmbH. All rights reserved.
This software is copyright protected and proprietary to Vector Informatik
GmbH.
Vector Informatik GmbH grants to you only those rights as set out in the
license conditions.
All other rights remain with Vector Informatik GmbH.
-------------------------------------------------------------------------------
----------------------------------------------------------------------------- */
#if !defined(__COMSTACK_TYPES_H__)
#define __COMSTACK_TYPES_H__
/**********************************************************************************************************************
* INCLUDES
*********************************************************************************************************************/
# include "Std_Types.h"
/**********************************************************************************************************************
* GLOBAL CONSTANT MACROS
*********************************************************************************************************************/
/* ##V_CFG_MANAGEMENT ##CQProject : CommonAsr__Common CQComponent : Impl_ComStackTypes */
# define COMMONASR__COMMON_IMPL_COMSTACKTYPES_VERSION 0x0305
# define COMMONASR__COMMON_IMPL_COMSTACKTYPES_RELEASE_VERSION 0x01
/* AUTOSAR Software Specification Version Information */
/* AUTOSAR Document version 2.2.1 part of release 3.0.0 */
# define COMSTACKTYPE_AR_MAJOR_VERSION (2u)
# define COMSTACKTYPE_AR_MINOR_VERSION (2u)
# define COMSTACKTYPE_AR_PATCH_VERSION (1u)
/* Component Version Information */
# define COMSTACKTYPE_SW_MAJOR_VERSION (3u)
# define COMSTACKTYPE_SW_MINOR_VERSION (5u)
# define COMSTACKTYPE_SW_PATCH_VERSION (1u)
# define COMSTACKTYPE_VENDOR_ID (30u)
/*General return codes for NotifResultType*/
# define NTFRSLT_OK 0x00 /*Action has been successfully finished:
- message sent out (in case of confirmation),
- message received (in case of indication) */
# define NTFRSLT_E_NOT_OK 0x01 /*Error notification:
- message not successfully sent out (in case of confirmation),
- message not successfully received (in case of indication) */
# define NTFRSLT_E_TIMEOUT_A 0x02 /*Error notification:
- timer N_Ar/N_As (according to ISO specification [ISONM]) has passed its time-out value N_Asmax/N_Armax.
This value can be issued to service user on both the sender and receiver side. */
# define NTFRSLT_E_TIMEOUT_BS 0x03 /*Error notification:
- timer N_Bs has passed its time-out value N_Bsmax (according to ISO specification [ISONM]).
This value can be issued to the service user on the sender side only. */
# define NTFRSLT_E_TIMEOUT_CR 0x04 /*Error notification:
- timer N_Cr has passed its time-out value N_Crmax.
This value can be issued to the service user on the receiver side only. */
# define NTFRSLT_E_WRONG_SN 0x05 /*Error notification:
- unexpected sequence number (PCI.SN) value received.
This value can be issued to the service user on the receiver side only. */
# define NTFRSLT_E_INVALID_FS 0x06 /*Error notification:
- invalid or unknown FlowStatus value has been received in a flow control (FC) N_PDU.
This value can be issued to the service user on the sender side only. */
# define NTFRSLT_E_UNEXP_PDU 0x07 /*Error notification:
- unexpected protocol data unit received.
This value can be issued to the service user on both the sender and receiver side. */
# define NTFRSLT_E_WFT_OVRN 0x08 /*Error notification:
- flow control WAIT frame that exceeds the maximum counter N_WFTmax received.
This value can be issued to the service user on the receiver side. */
# define NTFRSLT_E_NO_BUFFER 0x09 /*Error notification:
- flow control (FC) N_PDU with FlowStatus = OVFLW received.
It indicates that the buffer on the receiver side of a segmented message transmission
cannot store the number of bytes specified by the FirstFrame DataLength (FF_DL) parameter
in the FirstFrame and therefore the transmission of the 19 of 23 AUTOSAR_SWS_ComStackTypes
segmented message was aborted.
- no buffer within the TP available to transmit the segmented I-PDU.
This value can be issued to the service user on both the sender and receiver side. */
# define NTFRSLT_E_CANCELATION_OK 0x0A /*Action has been successfully finished:
- Requested cancellation has been executed.*/
# define NTFRSLT_E_CANCELATION_NOT_OK 0x0B /*Error notification:
- Due to an internal error the requested cancelation has not been executed. This will happen e.g., if the to be canceled transmission has been executed already.*/
/* extension of R4.0 R1 */
# define NTFRSLT_PARAMETER_OK 0x0D /* The parameter change request has been successfully executed */
# define NTFRSLT_E_PARAMETER_NOT_OK 0x0E /* The request for the change of the parameter did not complete successfully */
# define NTFRSLT_E_RX_ON 0x0F /* The parameter change request not executed successfully due to an ongoing reception */
# define NTFRSLT_E_VALUE_NOT_OK 0x10 /* The parameter change request not executed successfully due to a wrong value */
/* 0x11-0x1E Reserved values for future usage. */
/*General return codes for BusTrcvErrorType*/
# define BUSTRCV_OK 0x00
/*BUSTRCV_E_OK needed by FrTrcv specification inconcistency between ComStackTypes and FrTrcv*/
# define BUSTRCV_E_OK 0x00
# define BUSTRCV_E_ERROR 0x01
/* ISO15765-2 conform items */
/* range 100-150 */
# define TPPARAMTYPE_CANTP_STMIN 100u
# define TPPARAMTYPE_CANTP_BS 101u
/* ISO10681-2 conform items */
/* range 150-200 */
# define TPPARAMTYPE_FRTP_BC 150u
# define TPPARAMTYPE_FRTP_BFS 151u
# define TPPARAMTYPE_FRTP_MAX_WFT 152u
# define TPPARAMTYPE_FRTP_MAX_RETRIES 153u
/* Vector extensions */
# define TPPARAMTYPE_FRTP_TA 160u
# define TPPARAMTYPE_FRTP_SA 161u
# define TPPARAMTYPE_FRTP_NUM_TX_PDUS_TO_USE 162u
# define TPPARAMTYPE_FRTP_BW_LIMITATION 163u
# define TPPARAMTYPE_FRTP_MAX_TX_PDU_LEN 164u
/**********************************************************************************************************************
* GLOBAL FUNCTION MACROS
*********************************************************************************************************************/
/* -----------------------------------------------------------------------------
&&&~ GLOBAL DATA TYPES AND STRUCTURES
----------------------------------------------------------------------------- */
typedef uint16 PduIdType; /* The size of this global type depends on the maximum number of PDUs used within one software module. */
typedef uint16 PduLengthType; /* The size of this global type depends on the maximum length of PDUs to be sent by an ECU. */
typedef P2VAR(uint8, TYPEDEF, AUTOSAR_COMSTACKDATA) SduDataPtrType;
typedef struct
{
SduDataPtrType SduDataPtr;
PduLengthType SduLength;
} PduInfoType;
typedef enum
{
BUFREQ_OK, /*Buffer request accomplished successful.*/
BUFREQ_E_NOT_OK, /*Buffer request not successful. Buffer cannot be accessed.*/
BUFREQ_E_BUSY, /*Temporarily no buffer available. It's up the requestor to retry request for a certain time.*/
BUFREQ_E_OVFL /*No Buffer of the required length can be provided.*/
} BufReq_ReturnType;
typedef uint8 NotifResultType;
typedef uint8 BusTrcvErrorType;
typedef uint8 NetworkHandleType;
typedef uint8 PNCHandleType; /* Neccessary for partial network */
typedef enum
{
TP_DATACONF, /* TP_DATACONF indicates that all data, that have been copied so far, are confirmed and can be
removed from the TP buffer. Data copied by this API call are excluded and will be confirmed later. */
TP_DATARETRY, /* TP_DATARETRY indicates that this API call shall copy already copied data in order to recover from
an error. In this case TxTpDataCnt specifies the offset of the first byte to be copied by the API call. */
TP_CONFPENDING, /* TP_CONFPENDING indicates that the previously copied data must remain in the TP */
TP_NORETRY /* TP_NORETRY indicates that the retry feature is not supported */
} TpDataStateType;
typedef struct
{
TpDataStateType TpDataState;
PduLengthType TxTpDataCnt;
} RetryInfoType;
/* ISO15765-2 conform items */
typedef uint8 TPParameterType;
/**********************************************************************************************************************
* GLOBAL DATA PROTOTYPES
*********************************************************************************************************************/
/**********************************************************************************************************************
* GLOBAL FUNCTION PROTOTYPES
*********************************************************************************************************************/
/* begin Fileversion check */
#ifndef SKIP_MAGIC_NUMBER
#ifdef MAGIC_NUMBER
#if MAGIC_NUMBER != 108457753
#error "The magic number of the generated file <D:\dyd\ForFtp-dyd_\clea+BCM_\CAN_Geny_Configuration\GenyOnSendondSIP\Appl\GenData\ComStack_Types.h> is different. Please check time and date of generated files!"
#endif
#else
#define MAGIC_NUMBER 108457753
#endif /* MAGIC_NUMBER */
#endif /* SKIP_MAGIC_NUMBER */
/* end Fileversion check */
#endif /* __COMSTACK_TYPES_H__ */
<file_sep>/BSP/MCAL/Can/Can_Write.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Can_Write.c */
/* Version = 3.0.6a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2008-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Transmission of L-PDU(s). */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12.12.2008 : Initial Version
* V3.0.1: 21.10.2009 : Updated compiler version as per
* SCR ANMCANLINFR3_SCR_031.
* V3.0.2: 20.01.2010 : Memory section for Can_TxCancel() is updated as per
* SCR ANMCANLINFR3_SCR_042.
* V3.0.3: 21.04.2010 : As per ANMCANLINFR3_SCR_056, DLC and MIDH registers
* are write protected with respective masks.
* V3.0.4: 28.07.2010 : As per ANMCANLINFR3_SCR_077, CAN_TRUE changed as
* CAN_INITIALIZED in line 194.
* V3.0.5: 31.12.2010 : As per ANMCANLINFR3_SCR_087, space between
* '#' and 'if' is removed.
* V3.0.6: 20.06.2011 : As per ANMCANLINFR3_SCR_107, clearing RDY flag process
is moved into the do-while loop in Can_Write().
* V3.0.6a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Can_PBTypes.h" /* CAN Driver Post-Build Config. Header File */
#include "Can_Write.h" /* CAN Transmission Header File */
#include "Can_Ram.h" /* CAN Driver RAM Header File */
#include "Can_Tgt.h" /* CAN Driver Target Header File */
#include "Dem.h" /* DEM Header File */
#if (CAN_DEV_ERROR_DETECT == STD_ON)
#include "Det.h" /* DET Header File */
#endif
#include "SchM_Can.h" /* Scheduler Header File */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define CAN_WRITE_C_AR_MAJOR_VERSION 2
#define CAN_WRITE_C_AR_MINOR_VERSION 2
#define CAN_WRITE_C_AR_PATCH_VERSION 2
/* File version information */
#define CAN_WRITE_C_SW_MAJOR_VERSION 3
#define CAN_WRITE_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (CAN_WRITE_AR_MAJOR_VERSION != CAN_WRITE_C_AR_MAJOR_VERSION)
#error "Can_Write.c : Mismatch in Specification Major Version"
#endif
#if (CAN_WRITE_AR_MINOR_VERSION != CAN_WRITE_C_AR_MINOR_VERSION)
#error "Can_Write.c : Mismatch in Specification Minor Version"
#endif
#if (CAN_WRITE_AR_PATCH_VERSION != CAN_WRITE_C_AR_PATCH_VERSION)
#error "Can_Write.c : Mismatch in Specification Patch Version"
#endif
#if (CAN_WRITE_SW_MAJOR_VERSION != CAN_WRITE_C_SW_MAJOR_VERSION)
#error "Can_Write.c : Mismatch in Software Major Version"
#endif
#if (CAN_WRITE_SW_MINOR_VERSION != CAN_WRITE_C_SW_MINOR_VERSION)
#error "Can_Write.c : Mismatch in Software Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Can_Write
**
** Service ID : 0x06
**
** Description : This service writes the L-PDU in an appropriate buffer
** inside the CAN Controller hardware. The CAN Driver
** stores the swPduhandle that is given inside parameter
** PduInfo until it calls the CanIf_TxConfirmation.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Re-entrant
**
** Input Parameters : Hth, PduInfo
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Can_ReturnType (CAN_OK / CAN_NOT_OK / CAN_BUSY)
**
** Preconditions : The CAN Driver must be initialized.
**
** Remarks : Global Variable(s) referred in this function:
** Can_GblCanStatus, Can_GucFirstHthId, Can_GucLastHthId,
** Can_GpFirstHth
**
** : Function(s) invoked:
** Det_ReportError(),SchM_Enter_Can(), SchM_Exit_Can(),
** Dem_ReportErrorStatus()
**
*******************************************************************************/
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(Can_ReturnType, CAN_AFCAN_PUBLIC_CODE) Can_Write(uint8 Hth,
P2CONST(Can_PduType, AUTOMATIC, CAN_AFCAN_APPL_CONST) PduInfo)
{
#if(CAN_STANDARD_CANID == STD_OFF)
/* MISRA Rule : 18.4
Message : An object of union type has been defined.
Reason : Data access of larger data types is used to achieve
better throughput.
Verification : However, part of the code is verified manually and
it is not having any impact.
*/
Tun_Can_AFCan_CanId Lun_Can_CanId;
#endif
P2CONST(Tdd_Can_AFCan_Hth,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)LpHth;
P2VAR(Tdd_Can_AFCan_8bit_MsgBuffer,AUTOMATIC,CAN_AFCAN_PRIVATE_DATA)
LpMsgBuffer8bit;
P2VAR(Tdd_Can_AFCan_16bit_MsgBuffer,AUTOMATIC,CAN_AFCAN_PRIVATE_DATA)
LpMsgBuffer16bit;
P2VAR(uint8,AUTOMATIC, CAN_AFCAN_PRIVATE_DATA)LpCanSduPtr;
P2VAR(uint8,AUTOMATIC, CAN_AFCAN_PRIVATE_DATA)LpMsgDataBuffer;
Can_ReturnType LenCanReturnType;
uint8 LucLength;
uint16 LusTimeOutCount;
#if(CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
P2CONST(Can_ControllerConfigType,AUTOMATIC,
CAN_AFCAN_PRIVATE_CONST) LpController;
boolean LblTxCancelStarted;
#endif
/* Initialize CanReturnType to CAN_BUSY */
LenCanReturnType = CAN_BUSY;
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Report to DET, if module is not initialized */
if(Can_GblCanStatus != CAN_INITIALIZED)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE, CAN_WRITE_SID,
CAN_E_UNINIT);
/* Set CanReturnType to CAN_NOT_OK */
LenCanReturnType = CAN_NOT_OK;
}
/* Report to DET, if Hth is out of range */
else if((Hth < Can_GucFirstHthId) || (Hth > Can_GucLastHthId))
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE, CAN_WRITE_SID,
CAN_E_PARAM_HANDLE);
/* Set CanReturnType to CAN_NOT_OK */
LenCanReturnType = CAN_NOT_OK;
}
else
{
/* To avoid QAC warning */
}
/* Report to DET, if PduInfo pointer is NULL */
if (PduInfo == NULL_PTR)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE, CAN_WRITE_SID,
CAN_E_PARAM_POINTER);
/* Set CanReturnType to CAN_NOT_OK */
LenCanReturnType = CAN_NOT_OK;
}
/* Report to DET, if SduPtr is NULL */
else if((PduInfo->sdu) == NULL_PTR)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE, CAN_WRITE_SID,
CAN_E_PARAM_POINTER);
/* Set CanReturnType to CAN_NOT_OK */
LenCanReturnType = CAN_NOT_OK;
}
/* Report to DET, if DLC length is more than eight byte */
else if((PduInfo->length) > CAN_EIGHT)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE, CAN_WRITE_SID,
CAN_E_PARAM_DLC);
/* Set CanReturnType to CAN_NOT_OK */
LenCanReturnType = CAN_NOT_OK;
}
else
{
/* To avoid QAC warning */
}
/* Check whether any development error occurred */
if(LenCanReturnType != CAN_NOT_OK)
#endif
{
/* Get the Hth */
Hth -= Can_GucFirstHthId;
/* Get the pointer to the corresponding Hth structure */
LpHth = &Can_GpFirstHth[Hth];
/* Get the pointer to 8-bit message buffer register */
LpMsgBuffer8bit = LpHth->pMsgBuffer8bit;
/* Get the pointer to 16-bit message buffer register */
LpMsgBuffer16bit = LpHth->pMsgBuffer16bit;
/* Check whether transmit request is set */
if((LpMsgBuffer16bit->usFcnMmCtl & CAN_TRQ_BIT_STS) != CAN_TRQ_BIT_STS)
{
#if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
/* Check whether Tx Cancellation of any message is in progress */
if((Can_GblTxCancelIntFlg == CAN_FALSE) &&
(Can_GaaTxCancelCtr[LpHth->ucController] == CAN_ZERO))
#endif
{
/* Check whether Multiplexed transmission is on or not */
#if (CAN_MULTIPLEX_TRANSMISSION == STD_ON)
/* Check whether global flag for other hardware is already set or not */
if(*(LpHth->pHwAccessFlag) != CAN_TRUE)
#endif /*#if(CAN_MULTIPLEX_TRANSMISSION == STD_ON) */
{
/* Check whether Multiplexed transmission is on or not */
#if (CAN_MULTIPLEX_TRANSMISSION == STD_ON)
/* Disable global interrupts */
SchM_Enter_Can(CAN_WRITE_PROTECTION_AREA);
/* Set the global flag to one to indicate access of hardware buffer */
*(LpHth->pHwAccessFlag) = CAN_TRUE;
/* Enable global interrupts */
SchM_Exit_Can(CAN_WRITE_PROTECTION_AREA);
#endif /* #if(CAN_MULTIPLEX_TRANSMISSION == STD_ON) */
/* MISRA Rule : 1.2
Message : Dereferencing pointer value that is apparently
NULL.
Reason : "PduInfo" pointer is checked and verified when
DET is switched STD_ON.
Verification : However, the part of the code is
verified manually and it is not having
any impact on code.
*/
/* Store swPduHandle */
*(LpHth->pCanTxPduId) = PduInfo->swPduHandle;
/* Get the Timeout count value and store it in a local variable */
LusTimeOutCount = CAN_TIMEOUT_COUNT;
/* Loop until RDY bit cleared or Timeout count expired */
do
{
/* Clear RDY bit to lock the buffer */
LpMsgBuffer16bit->usFcnMmCtl = CAN_CLR_RDY_BIT;
/* Decrement the Timeout count */
LusTimeOutCount--;
/* Check whether RDY bit is cleared and Timeout count is expired or
not */
} while(((LpMsgBuffer16bit->usFcnMmCtl & CAN_RDY_BIT_STS) != CAN_ZERO)
&& (LusTimeOutCount != CAN_ZERO));
/* Check whether Timeout count is expired or not */
if(LusTimeOutCount != CAN_ZERO)
{
/* Get the DLC length from PduInfo structure */
LucLength = (PduInfo->length);
/* Store the received DLC */
LpMsgBuffer8bit->ucFcnMmDtlgb = LucLength & CAN_DLC_REG_MASK;
/* Check whether the configured CAN-ID is Standard or Extended */
#if(CAN_STANDARD_CANID == STD_OFF)
Lun_Can_CanId.ulCanId = PduInfo->id;
/* Check whether configured CAN-ID is Standard or Extended */
if(((Lun_Can_CanId.ulCanId) & (CAN_SET_IDE_BIT)) != CAN_FALSE)
{
/* Set the Extended CAN-ID Higher bit - 16 to 28 */
LpMsgBuffer16bit->usFcnMmMid1h =
(Lun_Can_CanId.Tst_CanId.usCanIdHigh) & CAN_MIDH_REG_MASK;
/* Set the Extended CAN-ID Lower bit - 0 to 15 */
LpMsgBuffer16bit->usFcnMmMid0h =
(Lun_Can_CanId.Tst_CanId.usCanIdLow);
}
else
{
/* Set the Standard CAN-ID Higher bit - 18 to 28 */
LpMsgBuffer16bit->usFcnMmMid1h = ((uint16)((PduInfo->id) <<
(CAN_SHIFT_TWO))) & CAN_MIDH_REG_MASK;
}
#else
/* Set the Standard CAN-ID Higher bit - 18 to 28 */
LpMsgBuffer16bit->usFcnMmMid1h = ((uint16)((PduInfo->id) <<
(CAN_SHIFT_TWO))) & CAN_MIDH_REG_MASK;
#endif /* #if(CAN_STANDARD_CANID == STD_OFF) */
/* Get the pointer to sdu from PduInfo structure */
LpCanSduPtr = (PduInfo->sdu);
/* Get the pointer to message data byte register */
LpMsgDataBuffer = LpMsgBuffer8bit->aaDataBuffer;
/* Loop until the DLC length is equal to zero to copy data */
while(LucLength != CAN_ZERO)
{
/* Transfer the data to corresponding message data bye register */
*LpMsgDataBuffer = *LpCanSduPtr;
/* MISRA Rule : 17.4
Message : Performing pointer arithmetic
on pointer 'LpMsgDataBuffer'.
Reason : Pointer arithmetic is performed to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the message buffer pointer to point to next
message data byte register*/
LpMsgDataBuffer += CAN_FOUR;
/* MISRA Rule : 17.4
Message : Increment or decrement operation performed
on pointer LpCanSduPtr.
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment sdu pointer */
LpCanSduPtr++;
/*Decrement the DLC Length*/
LucLength--;
}
/* Set RDY bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_SET_RDY_BIT;
/* Set TRQ bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_SET_TRQ_BIT;
/* Check whether Multiplexed transmission is on or not */
#if (CAN_MULTIPLEX_TRANSMISSION == STD_ON)
/* Disable global interrupts */
SchM_Enter_Can(CAN_WRITE_PROTECTION_AREA);
/* Set the global flag to zero */
*(LpHth->pHwAccessFlag) = CAN_FALSE;
/* Enable global interrupts */
SchM_Exit_Can(CAN_WRITE_PROTECTION_AREA);
#endif
/* Set CanReturnType to CAN_OK */
LenCanReturnType = CAN_OK;
} /* if(LusTimeOutCount != CAN_ZERO) */
else
{
/* Set CanReturn Type to CAN_NOT_OK */
LenCanReturnType = CAN_NOT_OK;
/* Report to DEM for timeout error */
Dem_ReportErrorStatus(CAN_E_TIMEOUT, DEM_EVENT_STATUS_FAILED);
}
} /* if(*(LpHth->pHwAccessFlag) == CAN_FALSE) */
} /* if(Can_GaaTxCancelCtr = CAN_FALSE) */
} /* if((LpMsgBuffer16bit->usFcnMmCtl & CAN_TRQ_BIT_STS) ==
CAN_TRQ_BIT_STS) */
/* Check whether transmission cancellation is on or not */
#if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
/* Check whether Transmission is pending for the Hth */
else
{
/* Get the pointer to Controller structure */
LpController = &Can_GpFirstController[LpHth->ucController];
/* Check whether Interrupt bit of the Hth is enabled */
if(((LpController->usIntEnable) & (CAN_TXCANCEL_INT_MASK)) ==
CAN_TXCANCEL_INT_MASK)
{
/* Check whether any Tx Cancellation is already in progress through
interrupt mode of operation */
if(Can_GblTxCancelIntFlg == CAN_FALSE)
{
/* Invoke internal function to initiate Tx Cancellation, if the new
message has higher priority than the pending message */
LblTxCancelStarted = Can_TxCancel(Hth, PduInfo);
/* Set global Tx Cancel flag, if Tx Cancellation is started */
if(LblTxCancelStarted == CAN_TRUE)
{
Can_GblTxCancelIntFlg = CAN_TRUE;
}
}
}
else
{
/* Invoke internal function to initiate Tx Cancellation, if the new
message has higher priority than the pending message */
LblTxCancelStarted = Can_TxCancel(Hth, PduInfo);
/* Increment global Tx Cancel counter of the controller, if
Tx Cancellation is started */
if((LblTxCancelStarted == CAN_TRUE) &&
(Can_GblTxCancelIntFlg == CAN_FALSE))
{
Can_GaaTxCancelCtr[LpHth->ucController]++;
}
} /* End of check for Tx Cancel Interrupt */
} /* End of else part of TRQ Bit check */
#endif /* #if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON) */
} /* if(LenCanReturnType != CAN_NOT_OK) */
return(LenCanReturnType); /* Return CanReturnType */
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Can_TxCancel
**
** Service ID : Not Applicable
**
** Description : This service checks the priority of new message with the
** pending message and initiates transmit cancellation if
** it has high priority.
**
** Sync/Async : None
**
** Re-entrancy : Re-entrant
**
** Input Parameters : LucHth, LpPduInfo
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The CAN Driver must be initialized.
**
** Remarks : Global Variable(s) referred in this function:
** Can_AFCan_GaaBasicCanHth[],
** Can_AFCan_GaaTxCancelStsFlgs[]
**
** : Function(s) invoked:
** SchM_Enter_Can(), SchM_Exit_Can()
**
*******************************************************************************/
#if(CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
#define CAN_AFCAN_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(boolean, CAN_AFCAN_PRIVATE_CODE)Can_TxCancel(uint8 LucHth,
P2CONST(Can_PduType, AUTOMATIC, CAN_AFCAN_PRIVATE_CONST) LpPduInfo)
{
P2CONST(Tdd_Can_AFCan_Hth,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)LpHth;
P2VAR(Tdd_Can_AFCan_16bit_MsgBuffer,AUTOMATIC,CAN_AFCAN_PRIVATE_DATA)
LpMsgBuffer16bit;
P2CONST(Can_ControllerConfigType,AUTOMATIC,
CAN_AFCAN_PRIVATE_CONST)LpController;
#if(CAN_STANDARD_CANID == STD_OFF)
/* MISRA Rule : 18.4
Message : An object of union type has been defined.
Reason : Data access of larger data types is used to achieve
better throughput.
Verification : However, part of the code is verified manually and
it is not having any impact.
*/
Tun_Can_AFCan_CanId Lun_Can_CanId;
#endif
uint8_least LucCount;
uint8_least LucArrPosition;
boolean LblTxCancelFlag;
/* Get the pointer to the corresponding Hth structure */
LpHth = &Can_GpFirstHth[LucHth];
/* Get the pointer to message buffer */
LpMsgBuffer16bit = LpHth->pMsgBuffer16bit;
/* Get the pointer to Controller structure */
LpController = &Can_GpFirstController[LpHth->ucController];
/* Get the array position for first BasicCAN Hth of this controller */
LucArrPosition = LpController->ucBasicCanHthOffset;
LucHth += Can_GucFirstHthId;
/* Initialize the local Tx Cancel flag to false */
LblTxCancelFlag = CAN_FALSE;
/* Initialize the BasicCAN Hth count of the controller to zero */
LucCount = CAN_ZERO;
/* Loop as many times as the number of BasicCAN Hth of the controller */
while(LucCount < (LpController->ucNoOfBasicCanHth))
{
/* Check whether the Hth of the controller is of BasicCAN type */
if((LucHth == Can_AFCan_GaaBasicCanHth[LucArrPosition]) &&
(*(LpHth->pHwAccessFlag) != CAN_TRUE))
{
/* Check whether Multiplexed transmission is on or not */
#if (CAN_MULTIPLEX_TRANSMISSION == STD_ON)
/* Disable global interrupts */
SchM_Enter_Can(CAN_WRITE_PROTECTION_AREA);
/* Set the global flag to one to indicate access of hardware buffer */
*(LpHth->pHwAccessFlag) = CAN_TRUE;
/* Enable global interrupts */
SchM_Exit_Can(CAN_WRITE_PROTECTION_AREA);
#endif /* #if(CAN_MULTIPLEX_TRANSMISSION == STD_ON) */
#if (CAN_STANDARD_CANID == STD_OFF)
Lun_Can_CanId.ulCanId = LpPduInfo->id;
/* Check whether configured CAN-ID is Standard or Extended */
if(((Lun_Can_CanId.ulCanId) & (CAN_SET_IDE_BIT)) != CAN_FALSE)
{
/* Check whether the CAN-ID of new message is lower than the
pending message */
if((Lun_Can_CanId.Tst_CanId.usCanIdHigh <=
LpMsgBuffer16bit->usFcnMmMid1h) && (Lun_Can_CanId.Tst_CanId.usCanIdLow
< LpMsgBuffer16bit->usFcnMmMid0h))
{
/* Set local Tx Cancel flag to start cancellation of low priority
pending message */
LblTxCancelFlag = CAN_TRUE;
}
}
else
{
Lun_Can_CanId.Tst_CanId.usCanIdHigh =
((Lun_Can_CanId.Tst_CanId.usCanIdHigh) << (CAN_SHIFT_TWO));
/* Check whether the CAN-ID of new message is lower than the
pending message */
if(Lun_Can_CanId.Tst_CanId.usCanIdHigh < LpMsgBuffer16bit->usFcnMmMid1h)
{
/* Set local Tx Cancel flag to start cancellation of low priority
pending message */
LblTxCancelFlag = CAN_TRUE;
}
}
#else
/* Set the Standard CAN-ID Higher bit - 18 to 28 */
if(((uint16)((LpPduInfo->id) << (CAN_SHIFT_TWO))) <
LpMsgBuffer16bit->usFcnMmMid1h)
{
/* Set local Tx Cancel flag to start cancellation of low priority
pending message */
LblTxCancelFlag = CAN_TRUE;
}
#endif /* #if(CAN_STANDARD_CANID == STD_OFF) */
if(LblTxCancelFlag == CAN_TRUE)
{
/* Clear TRQ bit to start cancellation of pending message in the
message buffer */
LpMsgBuffer16bit->usFcnMmCtl = CAN_CLR_TRQ_BIT;
/* Set the Tx Cancellation Status flag of the Hth */
Can_AFCan_GaaTxCancelStsFlgs[(LucArrPosition >> CAN_THREE)] |=
(uint8)(CAN_ONE << (LucCount % CAN_EIGHT));
/* Set the BasicCAN Hth count to maximum to exit the while loop */
LucArrPosition = LpController->ucNoOfBasicCanHth;
}
/* Check whether Multiplexed transmission is on or not */
#if (CAN_MULTIPLEX_TRANSMISSION == STD_ON)
/* Disable global interrupts */
SchM_Enter_Can(CAN_WRITE_PROTECTION_AREA);
/* Set the global flag to one to indicate access of hardware buffer */
*(LpHth->pHwAccessFlag) = CAN_FALSE;
/* Enable global interrupts */
SchM_Exit_Can(CAN_WRITE_PROTECTION_AREA);
#endif /* #if(CAN_MULTIPLEX_TRANSMISSION == STD_ON) */
} /* if(Hth != Can_AFCan_GaaBasicCanHth[LucCount]) */
/* Increment the array position to point to next BasicCAN Hth of the
controller */
LucArrPosition++;
/* Increment BasicCAN Hth count of the controller */
LucCount++;
} /* while(LucCount < Can_GucNoOfBasicCanHth) */
return(LblTxCancelFlag); /* Return LblTxCancelFlag */
}
#define CAN_AFCAN_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#endif
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Gpt/Gpt.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Gpt.c */
/* Version = 3.0.4a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains API function implementations of GPT Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 23-Oct-2009 : Initial Version
* V3.0.1: 25-Feb-2010 : As per SCR 194 following changes are made:
* 1. In Gpt_Init API pre-compile option is added
* for "Gpt_GpTAUUnitConfig"
* 2. In the description of the API
* Gpt_DisableNotification 'Gpt_GstChannelFunc' is
* removed from the Remarks.
* V3.0.2: 07-Apr-2010 : As per SCR 244, the API Gpt_Cbk_CheckWakeup is
* updated for the initialization of the RAM variable
* after successful initialization of the module.
* V3.0.3: 23-Jun-2010 : As per SCR 281, Gpt_Init is updated to support
* TAUB and TAUC timer units.
* V3.0.4: 03-Jan-2011 : As per SCR 389, In version imformation section
* "GPT_C_SW_PATCH_VERSION" macro is removed.
* V3.0.4a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Gpt.h"
#include "Gpt_PBTypes.h"
#include "Gpt_LLDriver.h"
#include "Gpt_LTTypes.h"
#include "Gpt_Ram.h"
#if (GPT_DEV_ERROR_DETECT == STD_ON)
#include "Det.h"
#endif
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
#include "EcuM_Cbk.h"
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define GPT_C_AR_MAJOR_VERSION GPT_AR_MAJOR_VERSION_VALUE
#define GPT_C_AR_MINOR_VERSION GPT_AR_MINOR_VERSION_VALUE
#define GPT_C_AR_PATCH_VERSION GPT_AR_PATCH_VERSION_VALUE
/* File version information */
#define GPT_C_SW_MAJOR_VERSION 3
#define GPT_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (GPT_AR_MAJOR_VERSION != GPT_C_AR_MAJOR_VERSION)
#error "Gpt.c : Mismatch in Specification Major Version"
#endif
#if (GPT_AR_MINOR_VERSION != GPT_C_AR_MINOR_VERSION)
#error "Gpt.c : Mismatch in Specification Minor Version"
#endif
#if (GPT_AR_PATCH_VERSION != GPT_C_AR_PATCH_VERSION)
#error "Gpt.c : Mismatch in Specification Patch Version"
#endif
#if (GPT_SW_MAJOR_VERSION != GPT_C_SW_MAJOR_VERSION)
#error "Gpt.c : Mismatch in Major Version"
#endif
#if (GPT_SW_MINOR_VERSION != GPT_C_SW_MINOR_VERSION)
#error "Gpt.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Gpt_GetVersionInfo
**
** Service ID : 0x00
**
** Description : This API reads the version information of GPT Driver
** component.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Non Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : versioninfo
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
**
** Function(s) invoked:
** Det_ReportError
**
*******************************************************************************/
#if (GPT_VERSION_INFO_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, GPT_PUBLIC_CODE)Gpt_GetVersionInfo
(P2VAR(Std_VersionInfoType, AUTOMATIC, GPT_APPL_DATA)versioninfo)
{
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Check if parameter passed is equal to Null pointer */
if(versioninfo == NULL_PTR)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_GET_VERSION_INFO_SID,
GPT_E_PARAM_POINTER);
}
else
#endif /* (GPT_DEV_ERROR_DETECT == STD_ON) */
{
/* Copy the vendor Id */
versioninfo->vendorID = GPT_VENDOR_ID;
/* Copy the module Id */
versioninfo->moduleID = GPT_MODULE_ID;
/* Copy the instance Id */
versioninfo->instanceID = GPT_INSTANCE_ID;
/* Copy Software Major Version */
versioninfo->sw_major_version = GPT_SW_MAJOR_VERSION;
/* Copy Software Minor Version */
versioninfo->sw_minor_version = GPT_SW_MINOR_VERSION;
/* Copy Software Patch Version */
versioninfo->sw_patch_version = GPT_SW_PATCH_VERSION;
}
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* (GPT_VERSION_INFO_API == STD_ON) */
/*******************************************************************************
** Function Name : Gpt_Init
**
** Service ID : 0x01
**
** Description : This API performs the initialization of GPT Driver
** component.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Non Reentrant
**
** Input Parameters : configPtr
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Gpt_GblDriverStatus, Gpt_GpChannelConfig,
** Gpt_GpChannelRamData, Gpt_GpChannelTimerMap,
** Gpt_GucGptDriverMode
**
** Function(s) invoked:
** Det_ReportError, Gpt_HW_Init
**
*******************************************************************************/
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, GPT_PUBLIC_CODE) Gpt_Init
(P2CONST(Gpt_ConfigType, AUTOMATIC, GPT_APPL_CONST) configPtr)
{
#if (GPT_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
#endif
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Local Flag to check DET Error */
LblDetErrFlag = GPT_FALSE;
/* Check if config pointer is NULL pointer */
if(configPtr == NULL_PTR)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_INIT_SID,
GPT_E_PARAM_CONFIG);
LblDetErrFlag = GPT_TRUE;
}
if(Gpt_GblDriverStatus == GPT_INITIALIZED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_INIT_SID,
GPT_E_ALREADY_INITIALIZED);
LblDetErrFlag = GPT_TRUE;
}
if(LblDetErrFlag == GPT_FALSE)
#endif
{
/* MISRA Rule : 1.2 */
/* Message : Dereferencing pointer value that is */
/* apparently NULL. */
/* Reason : "Config" pointer is checked and verified */
/* when DET is switched STD_ON. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check if the database is present */
if((configPtr->ulStartOfDbToc) == GPT_DBTOC_VALUE)
{
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON)||\
(GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON))
Gpt_GpTAUUnitConfig = configPtr->pTAUUnitConfig;
#endif
/* Store the global pointer to first channel Configuration */
Gpt_GpChannelConfig = configPtr->pChannelConfig;
/* Store the global pointer to First channel's Ram data */
Gpt_GpChannelRamData = configPtr->pChannelRamAddress;
/* Store the global pointer to channel-timer map */
Gpt_GpChannelTimerMap = configPtr->pChannelTimerMap;
/* Invoke low level driver for initializing the hardware */
Gpt_HW_Init();
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Set Driver state to initialized */
Gpt_GblDriverStatus = GPT_INITIALIZED;
#endif
/* Set the Driver Mode to Normal */
Gpt_GucGptDriverMode = GPT_MODE_NORMAL;
}
#if (GPT_DEV_ERROR_DETECT == STD_ON)
else
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_INIT_SID,
GPT_E_INVALID_DATABASE);
}
#endif
}
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Gpt_DeInit
**
** Service ID : 0x02
**
** Description : This service performs de-initialization of the
** GPT Driver component.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Non Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Gpt_GblDriverStatus, Gpt_GpChannelRamData
**
** Function(s) invoked:
** Det_ReportError,
** Gpt_HW_DeInit
**
*******************************************************************************/
#if (GPT_DE_INIT_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, GPT_PUBLIC_CODE) Gpt_DeInit(void)
{
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Defining a local pointer to point to the Channel Ram Data */
P2VAR(Tdd_Gpt_ChannelRamData,AUTOMATIC,GPT_CONFIG_DATA)LpRamData;
/* Initialize local variable to first channel */
uint8 LucChannelID;
boolean LblDetErrFlag;
LpRamData = Gpt_GpChannelRamData;
LucChannelID = GPT_ZERO;
#endif
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Local Flag to check DET Error */
LblDetErrFlag = GPT_FALSE;
/* Check if the GPT Driver is initialized properly */
if(Gpt_GblDriverStatus != GPT_INITIALIZED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_DEINIT_SID,
GPT_E_UNINIT);
LblDetErrFlag = GPT_TRUE;
}
else
{
do
{
if(LpRamData->ucChannelStatus == GPT_CH_RUNNING)
{
LblDetErrFlag = GPT_TRUE;
}
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpRamData++;
LucChannelID++;
}while((LucChannelID != GPT_TOTAL_CHANNELS_CONFIG)
&& (LblDetErrFlag == GPT_FALSE));
if(LblDetErrFlag == GPT_TRUE)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_DEINIT_SID,
GPT_E_BUSY);
}
}
if(LblDetErrFlag == GPT_FALSE)
#endif /* (GPT_DEV_ERROR_DETECT == STD_ON) */
{
/* Invoke low level driver for de-initializing the hardware */
Gpt_HW_DeInit();
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Set Driver state to uninitialized */
Gpt_GblDriverStatus = GPT_UNINITIALIZED;
#endif
}
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* (GPT_DE_INIT_API == STD_ON) */
/*******************************************************************************
** Function Name : Gpt_GetTimeElapsed
**
** Service ID : 0x03
**
** Description : This API is used to read the time elapsed for a
** particular channel from the start of channel.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : value
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Gpt_GblDriverStatus, Gpt_GpChannelTimerMap,
** Gpt_GpChannelRamData
**
** Function(s) invoked:
** Det_ReportError,
** Gpt_HW_GetTimeElapsed
**
*******************************************************************************/
#if (GPT_TIME_ELAPSED_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(Gpt_ValueType, GPT_PUBLIC_CODE) Gpt_GetTimeElapsed
(Gpt_ChannelType channel)
{
Gpt_ChannelType LddChannel;
Gpt_ValueType LddTimeElapsed;
#if (GPT_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
#endif
LddTimeElapsed = GPT_ZERO;
#if (GPT_DEV_ERROR_DETECT == STD_ON)
LblDetErrFlag = GPT_FALSE;
/* Check if the GPT Driver is initialized properly */
if(Gpt_GblDriverStatus != GPT_INITIALIZED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_GET_TIME_ELAPSED_SID,
GPT_E_UNINIT);
LblDetErrFlag = GPT_TRUE;
}
/* Check if the channel is in the desired range */
if(channel > GPT_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_GET_TIME_ELAPSED_SID,
GPT_E_PARAM_CHANNEL);
LblDetErrFlag = GPT_TRUE;
}
if(LblDetErrFlag == GPT_FALSE)
#endif /* (GPT_DEV_ERROR_DETECT == STD_ON) */
{ /* Block Comment - 1 */
LddChannel = Gpt_GpChannelTimerMap[channel];
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Check if the channel is not configured */
if(LddChannel == GPT_CHANNEL_UNCONFIGURED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_GET_TIME_ELAPSED_SID,
GPT_E_PARAM_CHANNEL);
}
else
#endif
{ /* Block Comment - 2 */
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Check if the timer is not started */
if(Gpt_GpChannelRamData[LddChannel].ucChannelStatus != GPT_CH_RUNNING)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID,
GPT_GET_TIME_ELAPSED_SID, GPT_E_NOT_STARTED);
}
else
#endif /* (GPT_DEV_ERROR_DETECT == STD_ON) */
{
/* Call to the HW Function */
LddTimeElapsed = Gpt_HW_GetTimeElapsed(LddChannel);
}
} /* End of Block Comment - 2 */
} /* End of Block Comment - 1 */
return (LddTimeElapsed);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* (GPT_TIME_ELAPSED_API == STD_ON) */
/*******************************************************************************
** Function Name : Gpt_GetTimeRemaining
**
** Service ID : 0x04
**
** Description : This API is used to read the time remaining for the
** channel to reach timeout.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Gpt_GblDriverStatus, Gpt_GpChannelRamData,
** Gpt_GpChannelTimerMap
**
** Function(s) invoked:
** Det_ReportError,
** Gpt_HW_GetTimeRemaining
**
*******************************************************************************/
#if (GPT_TIME_REMAINING_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(Gpt_ValueType, GPT_PUBLIC_CODE) Gpt_GetTimeRemaining
(Gpt_ChannelType channel)
{
Gpt_ChannelType LddChannel;
Gpt_ValueType LddTimeRemaining;
#if (GPT_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
#endif
LddTimeRemaining = GPT_ZERO;
#if (GPT_DEV_ERROR_DETECT == STD_ON)
LblDetErrFlag = GPT_FALSE;
/* Check if the GPT Driver is initialized properly */
if(Gpt_GblDriverStatus != GPT_INITIALIZED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_GET_TIME_REMAINING_SID,
GPT_E_UNINIT);
LblDetErrFlag = GPT_TRUE;
}
/* Check if the channel is in the desired range */
if(channel > GPT_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_GET_TIME_REMAINING_SID,
GPT_E_PARAM_CHANNEL);
LblDetErrFlag = GPT_TRUE;
}
if(LblDetErrFlag == GPT_FALSE)
#endif /* (GPT_DEV_ERROR_DETECT == STD_ON) */
{ /* Block Comment - 1 */
LddChannel = Gpt_GpChannelTimerMap[channel];
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Check if the channel is not configured */
if(LddChannel == GPT_CHANNEL_UNCONFIGURED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID,
GPT_GET_TIME_REMAINING_SID, GPT_E_PARAM_CHANNEL);
}
else
#endif
{ /* Block Comment - 2 */
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Check if the timer is not started */
if(Gpt_GpChannelRamData[LddChannel].ucChannelStatus != GPT_CH_RUNNING)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID,
GPT_GET_TIME_REMAINING_SID, GPT_E_NOT_STARTED);
}
else
#endif/* (GPT_DEV_ERROR_DETECT == STD_ON) */
{
/* Call to the HW Function */
LddTimeRemaining = Gpt_HW_GetTimeRemaining(LddChannel);
}
} /* End of Block Comment - 2 */
} /* End of Block Comment - 1 */
return (LddTimeRemaining);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* (GPT_TIME_REMAINING_API == STD_ON) */
/*******************************************************************************
** Function Name : Gpt_StartTimer
**
** Service ID : 0x05
**
** Description : This API starts the particular timer channel.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : channel, value
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Gpt_GblDriverStatus, Gpt_GpChannelTimerMap,
** Gpt_GpChannelRamData
**
** Function(s) invoked:
** Det_ReportError,
** Gpt_HW_StartTimer
**
*******************************************************************************/
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, GPT_PUBLIC_CODE) Gpt_StartTimer
(Gpt_ChannelType channel,Gpt_ValueType value)
{
Gpt_ChannelType LddChannel;
#if (GPT_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
LblDetErrFlag = GPT_FALSE;
/* Check if the GPT Driver is initialized properly */
if(Gpt_GblDriverStatus != GPT_INITIALIZED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_START_TIMER_SID,
GPT_E_UNINIT);
LblDetErrFlag = GPT_TRUE;
}
/* Check if the channel is in the desired range */
if(channel > GPT_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_START_TIMER_SID,
GPT_E_PARAM_CHANNEL);
LblDetErrFlag = GPT_TRUE;
}
/* Check if the channel value is ZERO */
if(value == GPT_ZERO)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_START_TIMER_SID,
GPT_E_PARAM_VALUE);
LblDetErrFlag = GPT_TRUE;
}
if(LblDetErrFlag == GPT_FALSE)
#endif /* (GPT_DEV_ERROR_DETECT == STD_ON) */
{
LddChannel = Gpt_GpChannelTimerMap[channel];
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Check if the channel is not configured */
if(LddChannel == GPT_CHANNEL_UNCONFIGURED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_START_TIMER_SID,
GPT_E_PARAM_CHANNEL);
}
/* Check if the timer is already running */
else if(Gpt_GpChannelRamData[LddChannel].ucChannelStatus == GPT_CH_RUNNING)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_START_TIMER_SID,
GPT_E_BUSY);
}
else
#endif
{
/* Call to the HW function */
Gpt_HW_StartTimer(LddChannel, value);
}
} /* End of Block Comment - 1 */
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Gpt_StopTimer
**
** Service ID : 0x06
**
** Description : This API stops the particular channel
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Gpt_GblDriverStatus, Gpt_GpChannelTimerMap
** Gpt_GpChannelRamData
**
** Function(s) invoked:
** Det_ReportError,
** Gpt_HW_StopTimer
**
*******************************************************************************/
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, GPT_PUBLIC_CODE) Gpt_StopTimer(Gpt_ChannelType channel)
{
Gpt_ChannelType LddChannel;
#if (GPT_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
LblDetErrFlag = GPT_FALSE;
/* Check if the GPT Driver is initialized properly */
if(Gpt_GblDriverStatus != GPT_INITIALIZED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_STOP_TIMER_SID,
GPT_E_UNINIT);
LblDetErrFlag = GPT_TRUE;
}
/* Check if the channel is in the desired range */
if(channel > GPT_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_STOP_TIMER_SID,
GPT_E_PARAM_CHANNEL);
LblDetErrFlag = GPT_TRUE;
}
if(LblDetErrFlag == GPT_FALSE)
#endif /* (GPT_DEV_ERROR_DETECT == STD_ON) */
{ /* Block Comment - 1 */
LddChannel = Gpt_GpChannelTimerMap[channel];
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Check if the channel is not configured */
if(LddChannel == GPT_CHANNEL_UNCONFIGURED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_STOP_TIMER_SID,
GPT_E_PARAM_CHANNEL);
}
else
#endif
{ /* Block Comment - 2 */
/* Check if the timer is started */
if(Gpt_GpChannelRamData[LddChannel].ucChannelStatus == GPT_CH_RUNNING)
{
/* Call to the HW function */
Gpt_HW_StopTimer(LddChannel);
}
} /* End of Block Comment - 2 */
} /* End of Block Comment - 1 */
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Gpt_EnableNotification
**
** Service ID : 0x07
**
** Description : This API enables the notification for particular channel
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Gpt_GblDriverStatus, Gpt_GpChannelRamData,
** Gpt_GpChannelTimerMap, Gpt_GstChannelFunc
**
** Function(s) invoked:
** Det_ReportError
**
*******************************************************************************/
#if (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, GPT_PUBLIC_CODE) Gpt_EnableNotification(Gpt_ChannelType channel)
{
P2CONST(Tdd_Gpt_ChannelFuncType, AUTOMATIC, GPT_APPL_CODE) LpChannelFunc;
Gpt_ChannelType LddChannel;
#if (GPT_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
LblDetErrFlag = GPT_FALSE;
/* Check if the GPT Driver is initialized properly */
if(Gpt_GblDriverStatus != GPT_INITIALIZED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_ENABLE_NOTIFY_SID,
GPT_E_UNINIT);
LblDetErrFlag = GPT_TRUE;
}
/* Check if the channel is in the desired range */
if(channel > GPT_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_ENABLE_NOTIFY_SID,
GPT_E_PARAM_CHANNEL);
LblDetErrFlag = GPT_TRUE;
}
if(LblDetErrFlag == GPT_FALSE)
#endif /* (GPT_DEV_ERROR_DETECT == STD_ON) */
{ /* Block Comment - 1 */
LddChannel = Gpt_GpChannelTimerMap[channel];
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Check if the channel is not configured */
if(LddChannel == GPT_CHANNEL_UNCONFIGURED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_ENABLE_NOTIFY_SID,
GPT_E_PARAM_CHANNEL);
}
else if
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
((Gpt_GpChannelRamData + LddChannel)->uiNotifyStatus == GPT_TRUE)
{
/* Report Error to Det */
Det_ReportError (GPT_MODULE_ID, GPT_INSTANCE_ID,
GPT_ENABLE_NOTIFY_SID, GPT_E_ALREADY_ENABLED);
}
else
#endif
{
LpChannelFunc = &Gpt_GstChannelFunc[LddChannel];
/* Check if the Notification Function is configured */
if(LpChannelFunc->pGptNotificationPointer_Channel != NULL_PTR )
{
/* Enabling the normal Notification */
Gpt_GpChannelRamData[LddChannel].uiNotifyStatus = GPT_TRUE;
}
}
} /* End of Block Comment - 1 */
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON) */
/*******************************************************************************
** Function Name : Gpt_DisableNotification
**
** Service ID : 0x08
**
** Description : This API disables notification for particular channel
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Gpt_GblDriverStatus, Gpt_GpChannelRamData,
** Gpt_GpChannelTimerMap
**
** Function(s) invoked:
** Det_ReportError
**
*******************************************************************************/
#if (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, GPT_PUBLIC_CODE) Gpt_DisableNotification(Gpt_ChannelType channel)
{
Gpt_ChannelType LddChannel;
#if (GPT_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
LblDetErrFlag = GPT_FALSE;
/* Check if the GPT Driver is initialized properly */
if(Gpt_GblDriverStatus != GPT_INITIALIZED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_DISABLE_NOTIFY_SID,
GPT_E_UNINIT);
LblDetErrFlag = GPT_TRUE;
}
/* Check if the channel is in the desired range */
if(channel > GPT_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_DISABLE_NOTIFY_SID,
GPT_E_PARAM_CHANNEL);
LblDetErrFlag = GPT_TRUE;
}
if(LblDetErrFlag == GPT_FALSE)
#endif /* (GPT_DEV_ERROR_DETECT == STD_ON) */
{
LddChannel = Gpt_GpChannelTimerMap[channel];
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Check if the channel is not configured */
if(LddChannel == GPT_CHANNEL_UNCONFIGURED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_DISABLE_NOTIFY_SID,
GPT_E_PARAM_CHANNEL);
}
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
else if
((Gpt_GpChannelRamData + LddChannel)->uiNotifyStatus == GPT_FALSE)
{
/* Report Error to Det */
Det_ReportError (GPT_MODULE_ID, GPT_INSTANCE_ID,
GPT_DISABLE_NOTIFY_SID, GPT_E_ALREADY_DISABLED);
}
else
#endif
{
/* Disabling the Notification */
Gpt_GpChannelRamData[LddChannel].uiNotifyStatus = GPT_FALSE;
}
}
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON) */
/*******************************************************************************
** Function Name : Gpt_SetMode
**
** Service ID : 0x09
**
** Description : This API is used to set the GPT Driver mode
**
** Sync/Async : Synchronous
**
** Re-entrancy : Non Re-entrant
**
** Input Parameters : mode
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Gpt_GblDriverStatus, Gpt_GpChannelConfig,
** Gpt_GucGptDriverMode
**
** Function(s) invoked:
** Det_ReportError,
** Gpt_HW_StopTimer
**
*******************************************************************************/
#if ((GPT_REPORT_WAKEUP_SOURCE == STD_ON) && \
(GPT_WAKEUP_FUNCTIONALITY_API == STD_ON))
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, GPT_PUBLIC_CODE) Gpt_SetMode(Gpt_ModeType mode)
{
/* Defining a local pointer to point to the Channel Config Data */
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)LpChannel;
#if(GPT_REPORT_WAKEUP_SOURCE == STD_ON)
/* Local variable notification status */
uint8 LucWakeupStatus;
#endif /* (GPT_REPORT_WAKEUP_SOURCE = STD_ON) */
/* Local Channel Index */
uint8 LucChannelID = GPT_ZERO;
#if (GPT_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
LblDetErrFlag = GPT_FALSE;
/* Check if the GPT Driver is initialized properly */
if(Gpt_GblDriverStatus != GPT_INITIALIZED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_SET_MODE_SID,
GPT_E_UNINIT);
LblDetErrFlag = GPT_TRUE;
}
/* MISRA Rule : 13.7 */
/* Message : The result of this logical opera */
/* tion is always false. */
/* Reason : Logical operation performed to */
/* check the mode of the GPT driver */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Check if the GPT mode is correct */
if((mode != GPT_MODE_NORMAL) && (mode != GPT_MODE_SLEEP))
/* MISRA Rule : 14.1 */
/* Message : This statement is unreachable. */
/* Reason : As per AUTOSAR all the input */
/* parameters of an API have to be */
/* verified. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_SET_MODE_SID,
GPT_E_PARAM_MODE);
LblDetErrFlag = GPT_TRUE;
}
if(LblDetErrFlag == GPT_FALSE)
#endif /* (GPT_DEV_ERROR_DETECT == STD_ON) */
{
/* Updating the local pointer to channel config data */
LpChannel = Gpt_GpChannelConfig;
Gpt_GucGptDriverMode = mode;
if(mode == GPT_MODE_SLEEP)
{
do
{
/* Check for disable wakeup status of a channel */
if((LpChannel->uiGptEnableWakeup) == GPT_FALSE)
{
Gpt_HW_StopTimer(LucChannelID);
}
/* Copy the notification status */
LucWakeupStatus = Gpt_GpChannelRamData[LucChannelID].uiWakeupStatus;
/* Check for disable wakeup status */
if(LucWakeupStatus == GPT_WAKEUP_NOTIFICATION_DISABLED)
{
/* Disabling wakeup notification of the timer channel */
Gpt_HW_DisableWakeup(LucChannelID);
}
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpChannel++;
LucChannelID++;
}while(LucChannelID != GPT_TOTAL_CHANNELS_CONFIG);
}
}
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* (GPT_WAKEUP_FUNCTIONALITY_API == STD_ON) */
/* (GPT_REPORT_WAKEUP_SOURCE == STD_ON) */
/*******************************************************************************
** Function Name : Gpt_DisableWakeup
**
** Service ID : 0x0A
**
** Description : This API disables the wakeup notification for a
** particular channel
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Gpt_GblDriverStatus, Gpt_GpChannelConfig,
** Gpt_GpChannelTimerMap
**
** Function(s) invoked:
** Det_ReportError,
** Gpt_HW_DisableWakeup
**
*******************************************************************************/
#if ((GPT_REPORT_WAKEUP_SOURCE == STD_ON) && \
(GPT_WAKEUP_FUNCTIONALITY_API == STD_ON))
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, GPT_PUBLIC_CODE) Gpt_DisableWakeup(Gpt_ChannelType channel)
{
Gpt_ChannelType LddChannel;
#if (GPT_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
LblDetErrFlag = GPT_FALSE;
/* Check if the GPT Driver is initialized properly */
if(Gpt_GblDriverStatus != GPT_INITIALIZED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_DISABLE_WAKEUP_SID,
GPT_E_UNINIT);
LblDetErrFlag = GPT_TRUE;
}
/* Check if the channel mode is correct */
if(channel > GPT_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_DISABLE_WAKEUP_SID,
GPT_E_PARAM_CHANNEL);
LblDetErrFlag = GPT_TRUE;
}
if(LblDetErrFlag == GPT_FALSE)
#endif /* (GPT_DEV_ERROR_DETECT == STD_ON) */
{ /* Block comment - 1 */
LddChannel = Gpt_GpChannelTimerMap[channel];
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Check if the channel is not configured */
if(LddChannel == GPT_CHANNEL_UNCONFIGURED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_DISABLE_WAKEUP_SID,
GPT_E_PARAM_CHANNEL);
}
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
else if((Gpt_GpChannelConfig + LddChannel)->uiGptEnableWakeup == GPT_ZERO)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_DISABLE_WAKEUP_SID,
GPT_E_PARAM_CHANNEL);
}
else
#endif
{
/* Check if the GPT driver is in sleep mode */
if(Gpt_GucGptDriverMode == GPT_MODE_SLEEP)
{
/* Disabling wakeup notification of the timer channel */
Gpt_HW_DisableWakeup(LddChannel);
}
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
else
{
/* Storing Wakeup Notification in Normal Mode */
Gpt_GpChannelRamData[LddChannel].uiWakeupStatus = GPT_ZERO;
}
#endif
}
} /* End of Block comment - 1 */
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* (GPT_WAKEUP_FUNCTIONALITY_API == STD_ON) &&
(GPT_REPORT_WAKEUP_SOURCE == STD_ON) */
/*******************************************************************************
** Function Name : Gpt_EnableWakeup
**
** Service ID : 0x0B
**
** Description : This API enables the wakeup notification for a
** particular channel
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Gpt_GblDriverStatus, Gpt_GpChannelConfig,
** Gpt_GpChannelTimerMap
**
** Function(s) invoked:
** Det_ReportError, Gpt_HW_EnableWakeup
**
*******************************************************************************/
#if ((GPT_REPORT_WAKEUP_SOURCE == STD_ON) && \
(GPT_WAKEUP_FUNCTIONALITY_API == STD_ON))
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, GPT_PUBLIC_CODE) Gpt_EnableWakeup(Gpt_ChannelType channel)
{
Gpt_ChannelType LddChannel;
#if (GPT_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
LblDetErrFlag = GPT_FALSE;
/* Check if the GPT Driver is initialized properly */
if(Gpt_GblDriverStatus != GPT_INITIALIZED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_ENABLE_WAKEUP_SID,
GPT_E_UNINIT);
LblDetErrFlag = GPT_TRUE;
}
/* Check if the channel mode is correct */
if(channel > GPT_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_ENABLE_WAKEUP_SID,
GPT_E_PARAM_CHANNEL);
LblDetErrFlag = GPT_TRUE;
}
if(LblDetErrFlag == GPT_FALSE)
#endif /* (GPT_DEV_ERROR_DETECT == STD_ON) */
{ /* Block comment - 1 */
LddChannel = Gpt_GpChannelTimerMap[channel];
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Check if the channel is not configured */
if(LddChannel == GPT_CHANNEL_UNCONFIGURED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_ENABLE_WAKEUP_SID,
GPT_E_PARAM_CHANNEL);
}
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
else if((Gpt_GpChannelConfig + LddChannel)->uiGptEnableWakeup == GPT_ZERO)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_ENABLE_WAKEUP_SID,
GPT_E_PARAM_CHANNEL);
}
else
#endif
{
/* Check if the GPT driver is in sleep mode */
if(Gpt_GucGptDriverMode == GPT_MODE_SLEEP)
{
/* Enabling Wakeup Notification */
Gpt_HW_EnableWakeup(LddChannel);
}
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
else
{
/* Storing Notification in normal mode */
Gpt_GpChannelRamData[LddChannel].uiWakeupStatus = GPT_ONE;
}
#endif
}
} /* End of Block comment - 1 */
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* (GPT_WAKEUP_FUNCTIONALITY_API == STD_ON) &&
(GPT_REPORT_WAKEUP_SOURCE == STD_ON) */
/*******************************************************************************
** Function Name : Gpt_Cbk_CheckWakeup
**
** Service ID : 0x0C
**
** Description : This API checks the wakeup notification for a
** particular channel
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : wakeupSource
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Gpt_GblDriverStatus, Gpt_GpChannelConfig
** Gpt_GpChannelRamData
**
** Function(s) invoked:
** Det_ReportError and EcuM_SetWakeupEvent
**
*******************************************************************************/
#if ((GPT_REPORT_WAKEUP_SOURCE == STD_ON) && \
(GPT_WAKEUP_FUNCTIONALITY_API == STD_ON))
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
void Gpt_Cbk_CheckWakeup( EcuM_WakeupSourceType wakeupSource )
{
/* Defining a local pointer to point to the Channel Config Data */
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)LpChannel;
boolean LblWakeupFlag;
uint8 LucChannelID = GPT_ZERO;
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Check if the GPT Driver is initialized properly */
if(Gpt_GblDriverStatus != GPT_INITIALIZED)
{
/* Report to DET */
Det_ReportError(GPT_MODULE_ID, GPT_INSTANCE_ID, GPT_CBK_CHECK_WAKEUP_SID,
GPT_E_UNINIT);
}
else
#endif/* (GPT_DEV_ERROR_DETECT == STD_ON) */
{
/* Update the local pointer to channel config */
LpChannel = Gpt_GpChannelConfig;
do
{
/* Copy the Wakeup status */
LblWakeupFlag = Gpt_GpChannelRamData[LucChannelID].uiWakeupStatus;
/* Check whether the notification is from the configured Channel */
if(((LpChannel->ddWakeupSourceId) == wakeupSource) &&
(LblWakeupFlag == GPT_TRUE))
{
/* Invoke the EcuM Set Wakeup API*/
EcuM_SetWakeupEvent(wakeupSource);
/* Reset wakeup flag for channel */
Gpt_GpChannelRamData[LucChannelID].uiWakeupStatus = GPT_ZERO;
/* Update the channel ID with maximum number of channel configured */
LucChannelID = GPT_TOTAL_CHANNELS_CONFIG;
}
else
{
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpChannel++;
LucChannelID++;
}
}while(LucChannelID != GPT_TOTAL_CHANNELS_CONFIG);
}
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* (GPT_WAKEUP_FUNCTIONALITY_API == STD_ON) &&
(GPT_REPORT_WAKEUP_SOURCE == STD_ON) */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/Common/Types/Std_Macro.h
#ifndef _STD_MACRO_H
#define _STD_MACRO_H
#include "Std_Types.h"
#define READ_BIT(data, bit) ((0x0 != ((data)& (uint8)(1<<(bit))))?TRUE:FALSE)
#define SET_BIT(data, bit) ((data) |= (uint8)(1<<(bit)))
#define CLR_BIT(data, bit) ((data) &= (uint8)~(1<<(bit)))
#define RVS_BIT(data, bit) ((data) ^= (uint8)(1<<(bit)))
/*bitID = switch index*/
#define GetByteIndex(bitID) ((bitID)>>3)
#define GetBitsIndex(bitID) ((bitID)%8)
/* pBuf = (uint8 *) */
#define Set_Buf_Bit(pBuf,bitID) SET_BIT(*((uint8 *)(pBuf)+ GetByteIndex(bitID)),GetBitsIndex(bitID))
#define Clr_Buf_Bit(pBuf,bitID) CLR_BIT(*((uint8 *)(pBuf)+ GetByteIndex(bitID)),GetBitsIndex(bitID))
#define Rvs_Buf_Bit(pBuf,bitID) RVS_BIT(*((uint8 *)(pBuf) + GetByteIndex(bitID)),GetBitsIndex(bitID))
#define Read_Buf_Bit(pBuf,bitID) READ_BIT(*((uint8 *)(pBuf)+ GetByteIndex(bitID)),GetBitsIndex(bitID))
#define Ctrl_Buf_Bit(pBuf,bitID,Ctrl_Flag) { \
if (TRUE == (Ctrl_Flag)) \
{ \
Set_Buf_Bit(pBuf,bitID);\
} \
else \
{ \
Clr_Buf_Bit(pBuf,bitID);\
} \
}
#endif
/*EOF*/
<file_sep>/BSP/MCAL/Wdg/Wdg_23_DriverB_PBcfg.c
/*============================================================================*/
/* Project = AUTOSAR NEC Xx4 MCAL Components */
/* Module = Wdg_23_DriverB_PBcfg.c */
/* Version = 3.0.0 */
/* Date = 19-Jun-2009 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009 by NEC Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains post-build time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* NEC Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by NEC. Any warranty */
/* is expressly disclaimed and excluded by NEC, either expressed or implied, */
/* including but not limited to those for non-infringement of intellectual */
/* property, merchantability and/or fitness for the particular purpose. */
/* */
/* NEC shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall NEC be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. NEC shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by NEC in connection with the Product(s) and/or the */
/* Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/* Compiler: GHS V5.0.5 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 19-Jun-2009 : Initial version
*/
/******************************************************************************/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.0.5
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_EVB_WDG_B.arxml
* GENERATED ON: 29 Jul 2011 - 11:33:00
*/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Wdg_23_DriverB_PBTypes.h"
#include "Wdg_23_DriverB.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define WDG_23_DRIVERB_PBCFG_C_AR_MAJOR_VERSION 2
#define WDG_23_DRIVERB_PBCFG_C_AR_MINOR_VERSION 2
#define WDG_23_DRIVERB_PBCFG_C_AR_PATCH_VERSION 0
/* File version information */
#define WDG_23_DRIVERB_PBCFG_C_SW_MAJOR_VERSION 3
#define WDG_23_DRIVERB_PBCFG_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (WDG_23_DRIVERB_PBTYPES_AR_MAJOR_VERSION != \
WDG_23_DRIVERB_PBCFG_C_AR_MAJOR_VERSION)
#error "Wdg_23_DriverB_PBcfg.c : Mismatch in Specification Major Version"
#endif
#if (WDG_23_DRIVERB_PBTYPES_AR_MINOR_VERSION != \
WDG_23_DRIVERB_PBCFG_C_AR_MINOR_VERSION)
#error "Wdg_23_DriverB_PBcfg.c : Mismatch in Specification Minor Version"
#endif
#if (WDG_23_DRIVERB_PBTYPES_AR_PATCH_VERSION != \
WDG_23_DRIVERB_PBCFG_C_AR_PATCH_VERSION)
#error "Wdg_23_DriverB_PBcfg.c : Mismatch in Specification Patch Version"
#endif
#if (WDG_23_DRIVERB_PBTYPES_SW_MAJOR_VERSION != \
WDG_23_DRIVERB_PBCFG_C_SW_MAJOR_VERSION)
#error "Wdg_23_DriverB_PBcfg.c : Mismatch in Major Version"
#endif
#if (WDG_23_DRIVERB_PBTYPES_SW_MINOR_VERSION != \
WDG_23_DRIVERB_PBCFG_C_SW_MINOR_VERSION)
#error "Wdg_23_DriverB_PBcfg.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
#define WDG_23_DRIVERB_START_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
/* Structure for Watchdog Driver Init configuration */
CONST(Wdg_23_DriverB_ConfigType,WDG_23_DRIVERB_CONFIG_CONST)\
Wdg_23_DriverB_GstConfiguration[] =
{
/* Configuration 0 - 1 */
{
/* ulStartOfDbToc */
0x05D98300,
/* ucWdtamdSlowValue */
0x77,
/* ucWdtamdFastValue */
0x07,
/* ucWdtamdDefaultModeValue */
WDGIF_FAST_MODE
}
};
#define WDG_23_DRIVERB_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Generic/Compiler/GHS/Startup_Files/Fx4/mak/startup_necv850_fx4_rules.mak
#######################################################################
# REGISTRY
#
LIBRARIES_TO_BUILD +=
CC_FILES_TO_BUILD +=
CPP_FILES_TO_BUILD +=
ASM_FILES_TO_BUILD += \
$(STARTUP_FX4_CORE_PATH)\src\df4010_startup.$(ASM_FILE_SUFFIX)
LIBRARIES_LINK_ONLY +=
OBJECTS_LINK_ONLY +=
GENERATED_SOURCE_FILES +=
MAKE_CLEAN_RULES +=
MAKE_GENERATE_RULES +=
MAKE_DEBUG_RULES += debug_startup_necv850_fx4_makefile
MAKE_CONFIG_RULES +=
#######################################################################
# Command to print debug information #
#######################################################################
debug_startup_necv850_fx4_makefile:
@echo STARTUP_FX4_CORE_PATH = $(STARTUP_FX4_CORE_PATH)
@echo OBJ_FILE_SUFFIX = $(OBJ_FILE_SUFFIX)
#######################################################################
<file_sep>/APP/LEDTemperature/LEDTemperature.c
#include "Std_Types.h"
UINT16 VeLED_sw_TempFlt1=0;
UINT16 VeLED_sw_TempFlt2=0;
UINT8 VeLED_sw_TempPWMDutyOut1=100U;
UINT8 VeLED_sw_TempPWMDutyOut2=100U;
/****************************************************************************************
| NAME: ConvertLED_VoltToTempTask
| CALLED BY: task handler
| PRECONDITIONS: task is to be scheduled
| INPUT PARAMETERS: void
| RETURN VALUE: void
| DESCRIPTION: This function is filter the volt and convert volt to temp
|***************************************************************************************/
void ConvertLED_VoltToTempTask(void)
{
UINT16 LeLED_w_VoltIsigADValue1;
UINT16 LeLED_w_VoltIsigADValue2;
/* get the original value from ADC processing module */
LeLED_w_VoltIsigADValue1 = GetLEDTemperature_ADCValue1();
/*through lookup,get the filterd value of temprature*/
//VeLED_sw_TempFlt1 = GetLIB_sw_DataByDimTwoTab(KaLED_sw_LEDTempVoltLookupTbl,
// KeLED_u_TempLookupArraySize, LeLED_w_VoltIsigADValue1);
/* get the original value from ADC processing module */
LeLED_w_VoltIsigADValue2 = GetLEDTemperature_ADCValue2();
/*through lookup,get the filterd value of temprature*/
VeLED_sw_TempFlt2 = GetLIB_sw_DataByDimTwoTab(KaLED_sw_LEDTempVoltLookupTbl,
KeLED_u_TempLookupArraySize, LeLED_w_VoltIsigADValue2);
}
void ConvertLED_TempToPWMTask(void)
{
SINT16 LeLED_sw_TempFlt1;
SINT16 LeLED_sw_TempFlt2;
LeLED_sw_TempFlt1=VeLED_sw_TempFlt1;
LeLED_sw_TempFlt2=VeLED_sw_TempFlt2;
/*through lookup,get the filterd value of temprature*/
VeLED_sw_TempPWMDutyOut1 = GetLIB_sw_DataByDimTwoTab(KaLED_sw_LEDTempPWMLookupTbl,
KeLED_u_PWMLookupArraySize, LeLED_sw_TempFlt1);
/*through lookup,get the filterd value of temprature*/
VeLED_sw_TempPWMDutyOut2 = GetLIB_sw_DataByDimTwoTab(KaLED_sw_LEDTempPWMLookupTbl,
KeLED_u_PWMLookupArraySize, LeLED_sw_TempFlt2);
}
/*******************************************************************************
| FUNCTION NAME : GetLIB_sw_DataByDimTwoTab
| CALLED BY :
| PRECONDITIONS :
| INPUT PARAMETERS:
| RETURN VALUE :
| DESCRIPTION :
|******************************************************************************/
SINT16 GetLIB_sw_DataByDimTwoTab(TwoDimCstArryPtr_S16 const pTab,
const UINT8 Length, const SINT16 SerchValue)
{
UINT8 Idx;
UINT8 Head = 0;
UINT8 Rear = Length - 1;
SINT32 tmp32;
SINT16 tmp16;
/*In most case, the engine speed or vehicle speed is 0x0, and it is at head of arrary, return it directly
to accelareate the search speed, by Wanrong*/
if(SerchValue <= pTab[0][0])
{
return pTab[0][1];
}
/*> upper edge case: use upper*/
else if(SerchValue >= pTab[Rear][0])
{
return pTab[Rear][1];
}
/*else continue*/
else
{}
while((Rear-Head)>1)
{
Idx = (UINT8)((UINT16)(Head + Rear) >> 1);
tmp16 = pTab[Idx][0];
if(SerchValue < tmp16)
Rear = Idx;
else if(SerchValue > tmp16)
Head = Idx;
else
return pTab[Idx][1];
}
/* Linear Scale */
tmp16 = pTab[Rear][0] - pTab[Head][0];
if(tmp16> 0)
{
/* increasement */
if(pTab[Rear][1] >= pTab[Head][1])
{
tmp32 = ((SINT32)SerchValue - (SINT32)pTab[Head ][0]) * ((SINT32)pTab[Rear][1] - (SINT32)pTab[Head][1]);
tmp32 = tmp32/tmp16; /* additional diff */
tmp32 += pTab[Head][1];
}
/* decreasement */
else
{
tmp32 = ((SINT32)pTab[Rear][0] - (SINT32)SerchValue) * ((SINT32)pTab[Head][1] - (SINT32)pTab[Rear][1]);
tmp32 = tmp32/tmp16; /* additional diff */
tmp32 += pTab[Rear][1];
}
}
else
{
tmp32 = pTab[Head][1];
}
return (SINT16)tmp32;
}
<file_sep>/BSP/MCAL/Dio/Dio_LTTypes.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Dio_LTTypes.h */
/* Version = 3.1.2 */
/* Date = 05-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of AUTOSAR DIO Link Time Parameters */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied,including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 04-Sep-2009 : Initial version
*
* V3.0.1: 29-Oct-2009 : As per SCR 70, updated for Global Data, Types and
* Symbols.
*
* V3.0.2: 12-Nov-2009 : As per SCR 124, Updated to include boolean parameter
* for JTAG Ports.
* V3.1.0: 27-Jul-2011 : Modified for Dk4.
* V3.1.1: 10-Feb-2012 : Merged the fixes done to Fx4L Dio driver.
* V3.1.2: 05-Jun-2012 : As per SCR 027, following changes are made:
* 1. File version is changed.
* 2. Compiler version is removed from Environment
* section.
*/
/******************************************************************************/
#ifndef DIO_LTTYPES_H
#define DIO_LTTYPES_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Dio.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define DIO_LTTYPES_AR_MAJOR_VERSION DIO_AR_MAJOR_VERSION_VALUE
#define DIO_LTTYPES_AR_MINOR_VERSION DIO_AR_MINOR_VERSION_VALUE
#define DIO_LTTYPES_AR_PATCH_VERSION DIO_AR_PATCH_VERSION_VALUE
/* File version information */
#define DIO_LTTYPES_SW_MAJOR_VERSION 3
#define DIO_LTTYPES_SW_MINOR_VERSION 1
#define DIO_LTTYPES_SW_PATCH_VERSION 2
#if (DIO_SW_MAJOR_VERSION != DIO_LTTYPES_SW_MAJOR_VERSION)
#error "Software major version of Dio_LTTypes.h and Dio.h did not match!"
#endif
#if (DIO_SW_MINOR_VERSION != DIO_LTTYPES_SW_MINOR_VERSION)
#error "Software minor version of Dio_LTTypes.h and Dio.h did not match!"
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
#define DIO_TRUE (boolean)1
#define DIO_FALSE (boolean)0
#define DIO_ZERO (uint16)0x00
/* Offset for getting PPR register address from PSR register address
for JTAG ports */
#define DIO_PPR_OFFSET_JTAG (uint16)0x4
/* Offset for getting PPR register address from PSR register address
for Numeric and Alphabetic ports */
#define DIO_PPR_OFFSET_NONJTAG (uint16)0x40
/* Mask to enable writing to lower 16-bits of PSR register */
#define DIO_MSB_MASK (uint32)0xFFFF0000ul
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Structure for Dio Port Group */
typedef struct STagTdd_Dio_PortGroup
{
/* Address of the port */
P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA) pPortAddress;
/* Boolean paramter: 1 = JTAG port, 0 = Numeric/Alphabatic port */
boolean blJtagPort;
}Tdd_Dio_PortGroup;
/* Structure for Dio Channel */
typedef struct STagTdd_Dio_PortChannel
{
/* Address of the port */
P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA) pPortAddress;
/* Mask for the channel */
uint16 usMask;
/* Boolean paramter: 1 = JTAG port, 0 = Numeric/Alphabatic port */
boolean blJtagPort;
}Tdd_Dio_PortChannel;
/* Union for accessing 32 bit PSR register */
typedef union STagTun_Dio_PortData
{
uint32 ulLongWord;
struct
{
uint16 usLSWord;
uint16 usMSWord;
}Tst_WordValue;
}Tun_Dio_PortData;
/*******************************************************************************
** Extern declarations for Global Data **
*******************************************************************************/
#define DIO_START_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
extern CONST(Tdd_Dio_PortGroup, DIO_CONST) Dio_GstPortGroup[];
extern CONST(Tdd_Dio_PortChannel, DIO_CONST) Dio_GstPortChannel[];
#define DIO_STOP_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* DIO_LTTYPES_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Wdg/Wdg_23_DriverB_Cfg.h
/*============================================================================*/
/* Project = AUTOSAR NEC Xx4 MCAL Components */
/* Module = Wdg_23_DriverB_Cfg.h */
/* Version = 3.0.0 */
/* Date = 19-Jun-2009 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009 by NEC Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains pre-compile time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* NEC Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by NEC. Any warranty */
/* is expressly disclaimed and excluded by NEC, either expressed or implied, */
/* including but not limited to those for non-infringement of intellectual */
/* property, merchantability and/or fitness for the particular purpose. */
/* */
/* NEC shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall NEC be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. NEC shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by NEC in connection with the Product(s) and/or the */
/* Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/* Compiler: GHS V5.0.5 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 19-Jun-2009 : Initial version
*/
/******************************************************************************/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.0.5
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_EVB_WDG_B.arxml
* GENERATED ON: 29 Jul 2011 - 11:33:00
*/
#ifndef WDG_23_DRIVERB_CFG_H
#define WDG_23_DRIVERB_CFG_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define WDG_23_DRIVERB_CFG_AR_MAJOR_VERSION 2
#define WDG_23_DRIVERB_CFG_AR_MINOR_VERSION 2
#define WDG_23_DRIVERB_CFG_AR_PATCH_VERSION 0
/* File version information */
#define WDG_23_DRIVERB_CFG_SW_MAJOR_VERSION 3
#define WDG_23_DRIVERB_CFG_SW_MINOR_VERSION 0
/*******************************************************************************
** Common Published Information **
*******************************************************************************/
#define WDG_23_DRIVERB_AR_MAJOR_VERSION_VALUE 2
#define WDG_23_DRIVERB_AR_MINOR_VERSION_VALUE 2
#define WDG_23_DRIVERB_AR_PATCH_VERSION_VALUE 0
#define WDG_23_DRIVERB_SW_MAJOR_VERSION_VALUE 3
#define WDG_23_DRIVERB_SW_MINOR_VERSION_VALUE 0
#define WDG_23_DRIVERB_SW_PATCH_VERSION_VALUE 0
#define WDG_23_DRIVERB_VENDOR_ID_VALUE (uint16)23
#define WDG_23_DRIVERB_MODULE_ID_VALUE (uint16)102
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Pre-compile option for development error detect */
#define WDG_23_DRIVERB_DEV_ERROR_DETECT STD_OFF
/* Pre-compile option for version info API */
#define WDG_23_DRIVERB_VERSION_INFO_API STD_OFF
/* Compile switch to allow/forbid disabling Watchdog Driver during runtime */
#define WDG_23_DRIVERB_DISABLE_ALLOWED STD_ON
/* Compile switch to allow/forbid VAC */
#define WDG_23_DRIVERB_VAC_ALLOWED STD_OFF
/* Watchdog Driver Id */
#define WDG_23_DRIVERB_INDEX (uint8)1
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Instance ID of the WDG Component*/
#define WDG_23_DRIVERB_INSTANCE_ID_VALUE (uint8)0
/* Minimum Watchdog Timer timeout in milliseconds */
#define WDG_23_DRIVERB_MIN_TIMEOUT (float32)0.00213
/* Maximum Watchdog Timer timeout in milliseconds*/
#define WDG_23_DRIVERB_MAX_TIMEOUT (float32)139.81013
/* Resolution of Watchdog timeout period in milliseconds*/
#define WDG_23_DRIVERB_RESOLUTION (float32)0.0000041666
/* Watchdog trigger mode */
#define WDG_23_DRIVERB_TRIGGER_MODE WDG_WINDOW
/* Configuration Set Handles */
#define WdgModeConfig0 &Wdg_23_DriverB_GstConfiguration[0]
/* Address of Trigger Register when VAC is OFF */
#define WDG_23_DRIVERB_WDTAWDTE_ADDRESS *((volatile uint8 *)0xFF807000ul)
/* Address of Mode Register */
#define WDG_23_DRIVERB_WDTAMD_ADDRESS *((volatile uint8 *)0xFF80700Cul)
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* WDG_23_DRIVERB_CFG_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Gpt/Gpt_LLDriver.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Gpt_LLDriver.c */
/* Version = 3.0.7a */
/* Date = 29-Sep-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains Low level driver function definitions of the of GPT */
/* Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 23-Oct-2009 : Initial Version
* V3.0.1: 05-Nov-2009 : As per SCR 088, I/O structure is updated to have
* separate base address for USER and OS registers.
* V3.0.2: 09-Nov-2009 : As per SCR 127, In Gpt_Hw_Init and Gpt_Hw_DeInit
* GPT_TOTAL_OSTM_CHANNELS_CONFIG is replaced by
* GPT_TOTAL_OSTM_UNITS_CONFIGURED.
* V3.0.3: 25-Feb-2010 : As per SCR 194, in functions Gpt_HW_Init and
* Gpt_HW_DeInit assigning value to the "LucSaveCount"
* is made in precompile switch GPT_TAUA_UNIT_USED.
* V3.0.4: 23-Jun-2010 : As per SCR 281, all the API s are modified to
* support TAUB and TAUC timers.
* V3.0.5: 08-Jul-2010 : As per SCR 299, following changes are made:
1. In function Gpt_HW_DeInit Pre-Compile option for
* TAUB and TAUC are removed for initializing
* Lastcount.
* 2. In function Gpt_HW_DeInit Pre-Compile option for
* TAUB and TAUC are added for updating the TAU
* configuration pointer to point to the current TAU.
* V3.0.6: 28-Jul-2010 : As per SCR 317, following changes are made:
* 1. In function Gpt_HW_Init, interrupts are disabled
* and the macro GPT_MODE_CONTINUOUS is replaced by
* GPT_MODE_OSTM_CONTINUOUS.
* 2. In functions Gpt_HW_StartTimer and
* Gpt_HW_StopTimer, interrupt enabling and disabling
* are added.
* 3. Gpt_HW_EnableWakeup and Gpt_HW_DisableWakeup
* APIs are modified for interrupt enabling/disabling.
* V3.0.7: 17-Jun-2011 : As per SCR 474, following changes are made:
* 1. Access size is updated for registers TAUAnBRS,
* TAUJnBRS, TAUJnTS, TAUJnTT, TAUJnTOE.
* 2. OSTMnTO and OSTMnTOE registers are not available
* in some of the Xx4 devices and also these registers
* are not required for any functionality of the GPT
* Driver Module, hence initializing and deinitializing
* of these registers in functions Gpt_HW_Init() and
* Gpt_HW_DeInit() has been removed
* V3.0.7a: 29-Sep-2011 : As per mantis #3551,
* In functions Gpt_Hw_Init, Gpt_Hw_StartTimer and
* Gpt_Hw_EnableWakeup are added clear the pending
* interrupt request flag.
* As per mantis #4040,
* Added stop the timer OSTM in Gpt_Hw_DeInit.
* As per mantis #3442,
* Updated loading the value - 1 into the Data register
* in Gpt_Hw_StartTimer.
* Added comments violations of MISRA rules 12.7.
* Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Gpt.h"
#include "Gpt_Ram.h"
#include "Gpt_LLDriver.h"
#include "Gpt_LTTypes.h"
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
#include "EcuM_Cbk.h"
#endif
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
#include "SchM_Gpt.h"
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification version information */
#define GPT_LLDRIVER_C_AR_MAJOR_VERSION GPT_AR_MAJOR_VERSION_VALUE
#define GPT_LLDRIVER_C_AR_MINOR_VERSION GPT_AR_MINOR_VERSION_VALUE
#define GPT_LLDRIVER_C_AR_PATCH_VERSION GPT_AR_PATCH_VERSION_VALUE
/* File version information */
#define GPT_LLDRIVER_C_SW_MAJOR_VERSION 3
#define GPT_LLDRIVER_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (GPT_LLDRIVER_AR_MAJOR_VERSION != GPT_LLDRIVER_C_AR_MAJOR_VERSION)
#error "Gpt_LLDriver.c : Mismatch in Specification Major Version"
#endif
#if (GPT_LLDRIVER_AR_MINOR_VERSION != GPT_LLDRIVER_C_AR_MINOR_VERSION)
#error "Gpt_LLDriver.c : Mismatch in Specification Minor Version"
#endif
#if (GPT_LLDRIVER_AR_PATCH_VERSION != GPT_LLDRIVER_C_AR_PATCH_VERSION)
#error "Gpt_LLDriver.c : Mismatch in Specification Patch Version"
#endif
#if (GPT_LLDRIVER_SW_MAJOR_VERSION != GPT_LLDRIVER_C_SW_MAJOR_VERSION)
#error "Gpt_LLDriver.c : Mismatch in Major Version"
#endif
#if (GPT_LLDRIVER_SW_MINOR_VERSION != GPT_LLDRIVER_C_SW_MINOR_VERSION)
#error "Gpt_LLDriver.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Gpt_HW_Init
**
** Service ID : NA
**
** Description : This is GPT Driver component support function.
** This function sets the clock prescaler,timer mode.
** This function also disables the interrupts and resets
** the interrupt request pending flags.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameter : None
**
** Output Parameters : None
**
** Return Value : None
**
** Pre-condition : None
**
** Remarks : Global Variable(s):
** Gpt_GpChannelConfig
**
** Function(s) invoked:
** None
**
*******************************************************************************/
#define GPT_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, GPT_PRIVATE_CODE) Gpt_HW_Init(void)
{
/* Pointer to the channel configuration */
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)
LpChannelConfig;
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON)||\
(GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON))
/* Pointer pointing to the TAU Unit configuration */
P2CONST(Tdd_Gpt_TAUUnitConfigType,AUTOMATIC,GPT_CONFIG_CONST)
LpTAUUnitConfig;
#endif
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON))
/* Pointer pointing to the TAUA/TAUB/TAUC Unit user control registers */
P2VAR(Tdd_Gpt_TAUABCUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)
LpTAUABCUnitUserReg;
#if(GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON)
/* Pointer pointing to the TAUA/TAUB/TAUC Unit os control registers */
P2VAR(Tdd_Gpt_TAUABCUnitOsRegs,AUTOMATIC,GPT_CONFIG_DATA) LpTAUABCUnitOsReg;
#endif
#endif
#if(GPT_TAUJ_UNIT_USED == STD_ON)
/* Pointer pointing to the TAUJ Unit control registers */
P2VAR(Tdd_Gpt_TAUJUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA) LpTAUJUnitUserReg;
#if(GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON)
/* Pointer pointing to the TAUJ Unit control registers */
P2VAR(Tdd_Gpt_TAUJUnitOsRegs,AUTOMATIC,GPT_CONFIG_DATA) LpTAUJUnitOsReg;
#endif
#endif
#if((GPT_TAUJ_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON))
uint8 Lastcount;
#endif
#if((GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON))
uint8 LucUnitCount;
#endif
uint8 LucCount;
#if((GPT_TAUJ_UNIT_USED == STD_ON)||(GPT_OSTM_UNIT_USED == STD_ON))
/* Save count from the TAUA channel loop */
uint8_least LucSaveCount = GPT_ZERO;
#endif
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Update the channel configuration pointer to point to the current channel */
LpChannelConfig = Gpt_GpChannelConfig;
#if((GPT_TAUJ_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON))
Lastcount = GPT_ZERO;
#endif
#if((GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON))
LucUnitCount = GPT_ZERO;
#endif
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON)||\
(GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON))
/* Update the TAU configuration pointer to point to the current TAU */
LpTAUUnitConfig = Gpt_GpTAUUnitConfig;
#endif
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERREG_PROTECTION);
#endif
#if(GPT_TAUA_UNIT_USED == STD_ON)
for(LucCount = GPT_ZERO; LucCount < GPT_TOTAL_TAUA_UNITS_CONFIG;
LucCount++)
{
/* Initialize the pointer to user register base address */
LpTAUABCUnitUserReg = LpTAUUnitConfig->pTAUUnitUserCntlRegs;
#if(GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON)
/* Initialize the pointer to os register base address */
LpTAUABCUnitOsReg = LpTAUUnitConfig->pTAUUnitOsCntlRegs;
/* Check for Prescaler setting by the GPT module for TAUAn Unit */
if(LpTAUUnitConfig->blConfigurePrescaler == GPT_TRUE)
{
/* Load the configured prescaler value */
LpTAUABCUnitOsReg->usTAUABCnTPS = LpTAUUnitConfig->usPrescaler;
/* Load the configured baudrate value */
LpTAUABCUnitOsReg->ucTAUAnBRS = LpTAUUnitConfig->ucBaudRate;
}
#endif /* End of (GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON) */
/* Set the corresponding bits to enable/disable TOm operation */
LpTAUABCUnitUserReg->usTAUABCnTOE |= LpTAUUnitConfig->usTAUChannelMaskValue;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer for the next TAUA Unit */
LpTAUUnitConfig++;
#if((GPT_TAUJ_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON))
Lastcount++;
#endif
}
#endif /* End of (GPT_TAUA_UNIT_USED == STD_ON) */
#if((GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON))
/* Increment LucUnitCount to total TAUB and TAUC units configured */
LucUnitCount = (GPT_TOTAL_TAUB_UNITS_CONFIG + GPT_TOTAL_TAUC_UNITS_CONFIG +
Lastcount);
for(LucCount = Lastcount; LucCount < LucUnitCount; LucCount++)
{
/* Initialize the pointer to user register base address */
LpTAUABCUnitUserReg = LpTAUUnitConfig->pTAUUnitUserCntlRegs;
#if(GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON)
/* Initialize the pointer to os register base address */
LpTAUABCUnitOsReg = LpTAUUnitConfig->pTAUUnitOsCntlRegs;
/* Check for Prescaler setting by the GPT module for TAUBn Unit */
if(LpTAUUnitConfig->blConfigurePrescaler == GPT_TRUE)
{
/* Load the configured prescaler value */
LpTAUABCUnitOsReg->usTAUABCnTPS = LpTAUUnitConfig->usPrescaler;
}
#endif /* End of (GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON) */
/* Set the corresponding bits to enable/disable TOm operation */
LpTAUABCUnitUserReg->usTAUABCnTOE |= LpTAUUnitConfig->usTAUChannelMaskValue;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer for the next TAUB/TAUC Unit */
LpTAUUnitConfig++;
#if(GPT_TAUJ_UNIT_USED == STD_ON)
Lastcount++;
#endif
}
#endif /* End of (GPT_TAUB_UNIT_USED == STD_ON)||
* (GPT_TAUC_UNIT_USED == STD_ON)
*/
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERREG_PROTECTION);
#endif
#if(GPT_TAUJ_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERREG_PROTECTION);
#endif
for(LucCount = Lastcount; LucCount < GPT_TOTAL_TAU_UNITS_CONFIGURED;
LucCount++)
{
/* Initialize the pointer to user register base address */
LpTAUJUnitUserReg = LpTAUUnitConfig->pTAUUnitUserCntlRegs;
#if(GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON)
/* Initialize the pointer to os register base address */
LpTAUJUnitOsReg = LpTAUUnitConfig->pTAUUnitOsCntlRegs;
/* Check for Prescaler setting by the GPT module for TAUJn Unit */
if(LpTAUUnitConfig->blConfigurePrescaler == GPT_TRUE)
{
/* Load the configured prescaler value */
LpTAUJUnitOsReg->usTAUJnTPS = LpTAUUnitConfig->usPrescaler;
/* Load the configured baudrate value */
LpTAUJUnitOsReg->ucTAUJnBRS = LpTAUUnitConfig->ucBaudRate;
}
#endif /* End of (GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON) */
/* Set the corresponding bits to enable/disable TOm operation */
LpTAUJUnitUserReg->ucTAUJnTOE |=
(uint8)LpTAUUnitConfig->usTAUChannelMaskValue;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next TAUJ Unit */
LpTAUUnitConfig++;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERREG_PROTECTION);
#endif
#endif /* End of (GPT_TAUJ_UNIT_USED == STD_ON) */
/* check for TAUA/TAUB/TAUC Units Used */
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON))
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERREG_PROTECTION);
#endif
for(LucCount = GPT_ZERO; LucCount < GPT_TOTAL_TAUABC_CHANNELS_CONFIG;
LucCount++)
{
*(LpChannelConfig->pCMORorCTLAddress) =
LpChannelConfig->usModeSettingsMask;
/* Check the Notification is configured for the current channel */
if(LpChannelConfig->ucImrMaskValue != GPT_NO_CBK_CONFIGURED)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlAddress) |=
~(LpChannelConfig->ucImrMaskValue);
/* Clear the pending interrupt request flag */
*(LpChannelConfig->pIntrCntlAddress) &= GPT_CLEAR_INT_REQUEST_FLAG;
}
#if (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
/* Set the Notification status as GPT_FALSE */
Gpt_GpChannelRamData[LucCount].uiNotifyStatus = GPT_FALSE;
#endif
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
/* Assign the Wakeup status to the Channel */
Gpt_GpChannelRamData[LucCount].uiWakeupStatus = GPT_FALSE;
#endif
/* Assign the timer status to the Channel */
Gpt_GpChannelRamData[LucCount].ucChannelStatus = GPT_CH_NOTRUNNING;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next channel */
LpChannelConfig++;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERREG_PROTECTION);
#endif
#if((GPT_TAUJ_UNIT_USED == STD_ON)||(GPT_OSTM_UNIT_USED == STD_ON))
LucSaveCount = LucCount;
#endif
#endif /* End of (GPT_TAUA_UNIT_USED == STD_ON)|| \
* (GPT_TAUB_UNIT_USED == STD_ON)|| \
* (GPT_TAUC_UNIT_USED == STD_ON)
*/
/* check for TAUJ Units Used */
#if(GPT_TAUJ_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERREG_PROTECTION);
#endif
for(LucCount = GPT_ZERO; LucCount < GPT_TOTAL_TAUJ_CHANNELS_CONFIG;
LucCount++)
{
*(LpChannelConfig->pCMORorCTLAddress) =
LpChannelConfig->usModeSettingsMask;
/* Check the Notification is configured for the current channel */
if(LpChannelConfig->ucImrMaskValue != GPT_NO_CBK_CONFIGURED)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlAddress) |=
~(LpChannelConfig->ucImrMaskValue);
/* Clear the pending interrupt request flag */
*(LpChannelConfig->pIntrCntlAddress) &= GPT_CLEAR_INT_REQUEST_FLAG;
}
#if (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
/* Set the Notification status as GPT_FALSE */
Gpt_GpChannelRamData[LucSaveCount].uiNotifyStatus = GPT_FALSE;
#endif
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
/* Assign the Wakeup status to the Channel */
Gpt_GpChannelRamData[LucSaveCount].uiWakeupStatus = GPT_FALSE;
#endif
/* Assign the timer status to the Channel */
Gpt_GpChannelRamData[LucSaveCount].ucChannelStatus = GPT_CH_NOTRUNNING;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer for the next TAUJ channel */
LpChannelConfig++;
LucSaveCount++;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERREG_PROTECTION);
#endif
#endif /* End of (GPT_TAUJ_UNIT_USED == STD_ON) */
/* check for OSTM Units Used */
#if(GPT_OSTM_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERREG_PROTECTION);
#endif
for(LucCount = GPT_ZERO; LucCount < GPT_TOTAL_OSTM_UNITS_CONFIGURED;
LucCount++)
{
/* MISRA Rule : 11.4 */
/* Message : A cast should not be performed */
/* between a pointer to object type */
/* and a different pointer to object*/
/* type. */
/* Reason : This is to access the CTL reg */
/* of type 8 bit. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
*((uint8*)(LpChannelConfig->pCMORorCTLAddress)) = GPT_MODE_OSTM_CONTINUOUS;
/* Check the Notification is configured for the current channel */
if(LpChannelConfig->ucImrMaskValue != GPT_NO_CBK_CONFIGURED)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlAddress) |=
~(LpChannelConfig->ucImrMaskValue);
/* Clear the pending interrupt request flag */
*(LpChannelConfig->pIntrCntlAddress) &= GPT_CLEAR_INT_REQUEST_FLAG;
}
#if (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
/* Set the Notification status as GPT_FALSE */
Gpt_GpChannelRamData[LucSaveCount].uiNotifyStatus = GPT_FALSE;
#endif
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
/* Assign the Wakeup status to the Channel */
Gpt_GpChannelRamData[LucSaveCount].uiWakeupStatus = GPT_FALSE;
#endif
/* Assign the timer status to the Channel */
Gpt_GpChannelRamData[LucSaveCount].ucChannelStatus = GPT_CH_NOTRUNNING;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer for the next OSTM channel */
LpChannelConfig++;
LucSaveCount++;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERREG_PROTECTION);
#endif
#endif /* End of (GPT_OSTM_UNIT_USED == STD_ON) */
}
#define GPT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Gpt_HW_DeInit
**
** Service ID : NA
**
** Description : This is GPT Driver component support function.
** This function resets all the HW Registers.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non Reentrant
**
** Input Parameters : channel
**
** InOut Parameter : None
**
** Output Parameters : None
**
** Return Value : None
**
** Pre-condition : None
**
** Remarks : Global Variable(s):
** Gpt_GpChannelConfig
**
** Function(s) invoked:
** None
**
*******************************************************************************/
#define GPT_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, GPT_PRIVATE_CODE) Gpt_HW_DeInit (void)
{
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)
LpChannelConfig;
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON)||\
(GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON))
/* Pointer pointing to the TAUA/TAUB/TAUC/TAUJ Unit configuration */
P2CONST(Tdd_Gpt_TAUUnitConfigType,AUTOMATIC,GPT_CONFIG_CONST)
LpTAUUnitConfig;
#endif
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON))
/* Pointer pointing to the TAUA/TAUB/TAUC Unit control registers */
P2VAR(Tdd_Gpt_TAUABCUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)
LpTAUABCUnitUserReg;
/* Pointer used for TAUA/TAUB/TAUC channel control registers */
P2VAR(Tdd_Gpt_TAUABCChannelUserRegs,AUTOMATIC,GPT_CONFIG_DATA)
LpTAUABCChannelReg;
#endif
#if(GPT_TAUJ_UNIT_USED == STD_ON)
/* Pointer pointing to the TAUJ Unit control registers */
P2VAR(Tdd_Gpt_TAUJUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA) LpTAUJUnitUserReg;
/* Pointer used for TAUJ channel control registers */
P2VAR(Tdd_Gpt_TAUJChannelUserRegs,AUTOMATIC,GPT_CONFIG_DATA) LpTAUJChannelReg;
#endif
#if(GPT_OSTM_UNIT_USED == STD_ON)
/* Pointer pointing to the OSTM Unit control registers */
P2VAR(Tdd_Gpt_OSTMUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA) LpOSTMUnitReg;
#endif
#if(GPT_TAUJ_UNIT_USED == STD_ON)
uint8 Lastcount;
#endif
uint8 LucCount;
#if(GPT_TAUJ_UNIT_USED == STD_ON || GPT_OSTM_UNIT_USED == STD_ON )
/* Save count from the TAUA channel loop */
uint8_least LucSaveCount = GPT_ZERO;
#endif
/* Update the channel configuration pointer to point to the current channel */
LpChannelConfig = Gpt_GpChannelConfig;
/* Initialize the loop count value */
LucCount = GPT_ZERO;
#if(GPT_TAUJ_UNIT_USED == STD_ON)
Lastcount = GPT_ZERO;
#endif
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON))
/* Update the TAU configuration pointer to point to the current TAU */
LpTAUUnitConfig = Gpt_GpTAUUnitConfig;
#endif
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERREG_PROTECTION);
#endif
/* Check for TAUA/TAUB/TAUC Units Used */
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON))
for(LucCount = GPT_ZERO; LucCount < GPT_TOTAL_TAUABC_UNITS_CONFIG; LucCount++)
{
/* Update pointer for the user base address of the TAUA/TAUB/TAUC unit
* registers
*/
LpTAUABCUnitUserReg = LpTAUUnitConfig->pTAUUnitUserCntlRegs;
/* Set the configured channel bits to disable the count operation */
LpTAUABCUnitUserReg->usTAUABCnTT &= LpTAUUnitConfig->usTAUChannelMaskValue;
LpTAUABCUnitUserReg->usTAUABCnTOE &= LpTAUUnitConfig->usTAUChannelMaskValue;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next TAUA/TAUB/TAUC unit */
LpTAUUnitConfig++;
#if(GPT_TAUJ_UNIT_USED == STD_ON)
Lastcount++;
#endif
}
#endif
/* Check for TAUA/TAUB/TAUC Units Used */
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON))
for(LucCount = GPT_ZERO; LucCount < GPT_TOTAL_TAUABC_CHANNELS_CONFIG;
LucCount++)
{
LpTAUABCChannelReg =
(P2VAR(Tdd_Gpt_TAUABCChannelUserRegs, AUTOMATIC, GPT_CONFIG_CONST))
LpChannelConfig->pBaseCtlAddress;
/* Reset the CMORm register of the configured channel */
*(LpChannelConfig->pCMORorCTLAddress) = GPT_RESET_WORD;
/* Reset the CDRm register of the configured channel */
LpTAUABCChannelReg->usTAUABCnCDRm = GPT_RESET_WORD;
/* Load the reset value of CNTm register */
LpTAUABCChannelReg->usTAUABCnCNTm = GPT_SET_WORD;
#if(GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
/* Check the Notification is configured for the current channel */
if (LpChannelConfig->ucImrMaskValue != GPT_NO_CBK_CONFIGURED)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlAddress) |=
~(LpChannelConfig->ucImrMaskValue);
}
/* Set the Notification status as GPT_FALSE */
Gpt_GpChannelRamData[LucCount].uiNotifyStatus = GPT_FALSE;
#endif
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
/* Assign the Wakeup status to the Channel */
Gpt_GpChannelRamData[LucCount].uiWakeupStatus = GPT_FALSE;
#endif
/* Assign the timer status to the Channel */
Gpt_GpChannelRamData[LucCount].ucChannelStatus = GPT_CH_NOTRUNNING;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next TAUA/TAUB/TAUC channel */
LpChannelConfig++;
}
#endif
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERREG_PROTECTION);
#endif
#if((GPT_TAUJ_UNIT_USED == STD_ON)||(GPT_OSTM_UNIT_USED == STD_ON))
LucSaveCount = LucCount;
#endif
/* Check for TAUJ Units Used */
#if(GPT_TAUJ_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERREG_PROTECTION);
#endif
for(LucCount = Lastcount; LucCount < GPT_TOTAL_TAU_UNITS_CONFIGURED;
LucCount++)
{
/* Update pointer for user base address of the TAUJ unit registers */
LpTAUJUnitUserReg = LpTAUUnitConfig->pTAUUnitUserCntlRegs;
/* Set the configured channel bits to disable the count operation */
LpTAUJUnitUserReg->ucTAUJnTT &=
(uint8)LpTAUUnitConfig->usTAUChannelMaskValue;
LpTAUJUnitUserReg->ucTAUJnTOE &=
(uint8)LpTAUUnitConfig->usTAUChannelMaskValue;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to next TAUJ unit */
LpTAUUnitConfig++;
}
for(LucCount = GPT_ZERO;LucCount < GPT_TOTAL_TAUJ_CHANNELS_CONFIG;
LucCount++)
{
LpTAUJChannelReg =
(P2VAR(Tdd_Gpt_TAUJChannelUserRegs, AUTOMATIC, GPT_CONFIG_CONST))
LpChannelConfig->pBaseCtlAddress;
/* Reset the CMORm register of the configured channel */
*(LpChannelConfig->pCMORorCTLAddress) = GPT_RESET_WORD;
/* Reset the CDRm register of the configured channel */
LpTAUJChannelReg->ulTAUJnCDRm = GPT_RESET_LONG_WORD;
/* Load the reset value of CNTm register */
LpTAUJChannelReg->ulTAUJnCNTm = GPT_SET_LONG_WORD;
#if(GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
/* Check the Notification is configured for the current channel */
if (LpChannelConfig->ucImrMaskValue != GPT_NO_CBK_CONFIGURED)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlAddress) |=
~(LpChannelConfig->ucImrMaskValue);
}
/* Set the Notification status as GPT_FALSE */
Gpt_GpChannelRamData[LucSaveCount].uiNotifyStatus = GPT_FALSE;
#endif
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
/* Assign the Wakeup status to the Channel */
Gpt_GpChannelRamData[LucSaveCount].uiWakeupStatus = GPT_FALSE;
#endif
/* Assign the timer status to the Channel */
Gpt_GpChannelRamData[LucSaveCount].ucChannelStatus = GPT_CH_NOTRUNNING;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next TAUJ channel */
LpChannelConfig++;
LucSaveCount++;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERREG_PROTECTION);
#endif
#endif
/* Check for OSTM Units Used */
#if(GPT_OSTM_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERREG_PROTECTION);
#endif
for(LucCount = GPT_ZERO;LucCount < GPT_TOTAL_OSTM_UNITS_CONFIGURED;
LucCount++)
{
LpOSTMUnitReg =
(P2VAR(Tdd_Gpt_OSTMUnitUserRegs, AUTOMATIC, GPT_CONFIG_CONST))
LpChannelConfig->pBaseCtlAddress;
/* Stop the timer OSTM */
LpOSTMUnitReg->ucOSTMnTT = GPT_OSTM_STOP_MASK;
/* Reset the CMP register of the configured channel */
LpOSTMUnitReg->ulOSTMnCMP = GPT_RESET_LONG_WORD;
/* Load the reset value of CNTm register */
LpOSTMUnitReg->ulOSTMnCNT = GPT_SET_LONG_WORD;
/* MISRA Rule : 11.4 */
/* Message : A cast should not be performed */
/* between a pointer to object type */
/* and a different pointer to object */
/* type. */
/* Reason : This is to access the CTL reg */
/* of type 8 bit. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
*((uint8*)(LpChannelConfig->pCMORorCTLAddress)) = GPT_RESET_BYTE;
#if(GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
/* Check the Notification is configured for the current channel */
if (LpChannelConfig->ucImrMaskValue != GPT_NO_CBK_CONFIGURED)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlAddress) |=
~(LpChannelConfig->ucImrMaskValue);
}
/* Set the Notification status as GPT_FALSE */
Gpt_GpChannelRamData[LucSaveCount].uiNotifyStatus = GPT_FALSE;
#endif
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
/* Assign the Wakeup status to the Channel */
Gpt_GpChannelRamData[LucSaveCount].uiWakeupStatus = GPT_FALSE;
#endif
/* Assign the timer status to the Channel */
Gpt_GpChannelRamData[LucSaveCount].ucChannelStatus = GPT_CH_NOTRUNNING;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next OSTM channel */
LpChannelConfig++;
LucSaveCount++;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERREG_PROTECTION);
#endif
#endif
}
#define GPT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Gpt_HW_GetTimeElapsed
**
** Service ID : NA
**
** Description : This is GPT Driver component support function.
** This function returns the time elapsed for a channel by
** accessing the respective timer registers.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameter : None
**
** Output Parameters : None
**
** Return Value : Gpt_ValueType
**
** Pre-condition : None
**
** Remarks : Global Variable(s):
** Gpt_GpChannelConfig, Gpt_GpChannelRamData
**
** Function(s) invoked:
** None
**
*******************************************************************************/
#if (GPT_TIME_ELAPSED_API == STD_ON)
#define GPT_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(Gpt_ValueType, GPT_PRIVATE_CODE) Gpt_HW_GetTimeElapsed
(Gpt_ChannelType channel)
{
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON))
/* Defining a pointer to point to the TAUA\TAUB\TAUC registers */
P2VAR(Tdd_Gpt_TAUABCChannelUserRegs,AUTOMATIC,GPT_CONFIG_DATA)
LpTAUABCChannelRegs;
#endif
#if(GPT_TAUJ_UNIT_USED == STD_ON)
/* Defining a pointer to point to the TAUJ registers */
P2VAR(Tdd_Gpt_TAUJChannelUserRegs,AUTOMATIC,GPT_CONFIG_DATA)LpTAUJChannelRegs;
#endif
#if(GPT_OSTM_UNIT_USED == STD_ON)
/* Defining a pointer to point to the OSTM registers */
P2VAR(Tdd_Gpt_OSTMUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)LpOSTMUnitRegs;
#endif
/* Defining a pointer to point to the Channel Ram Data */
P2VAR(Tdd_Gpt_ChannelRamData,AUTOMATIC,GPT_CONFIG_DATA)LpRamData;
/* Updating the channel config parameter to the current channel */
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)LpChannel;
/* Return Value */
Gpt_ValueType LddTimeElapsed;
uint8 LucTimerType;
/* Initialize Return Value to zero */
LddTimeElapsed = GPT_ZERO;
/* Updating the channel config parameter to the current channel */
LpChannel = &Gpt_GpChannelConfig[channel];
/* Read the Timer Type for given channel */
LucTimerType = LpChannel->uiTimerType;
LpRamData = &Gpt_GpChannelRamData[channel];
switch(LucTimerType)
{
case GPT_HW_TAUA:
case GPT_HW_TAUB:
case GPT_HW_TAUC:
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON))
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if( LpRamData->ucChannelStatus == GPT_CH_NOTRUNNING)
{
LddTimeElapsed = GPT_ZERO;
}
else
{
LpTAUABCChannelRegs =
(P2VAR(Tdd_Gpt_TAUABCChannelUserRegs, AUTOMATIC, GPT_CONFIG_DATA))
LpChannel->pBaseCtlAddress;
/* Assign the final return value */
LddTimeElapsed =
LpTAUABCChannelRegs->usTAUABCnCDRm - \
LpTAUABCChannelRegs->usTAUABCnCNTm;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
#endif
/* End of
((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON)) */
break;
case GPT_HW_TAUJ:
#if(GPT_TAUJ_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if( LpRamData->ucChannelStatus == GPT_CH_NOTRUNNING)
{
LddTimeElapsed = GPT_ZERO;
}
else
{
LpTAUJChannelRegs =
(P2VAR(Tdd_Gpt_TAUJChannelUserRegs, AUTOMATIC, GPT_CONFIG_DATA))
LpChannel->pBaseCtlAddress;
/* Assign the final return value */
LddTimeElapsed =
LpTAUJChannelRegs->ulTAUJnCDRm - LpTAUJChannelRegs->ulTAUJnCNTm;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
#endif/* End of (GPT_TAUJ_UNIT_USED == STD_ON) */
break;
case GPT_HW_OSTM:
#if(GPT_OSTM_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if( LpRamData->ucChannelStatus == GPT_CH_NOTRUNNING)
{
LddTimeElapsed = GPT_ZERO;
}
else
{
LpOSTMUnitRegs = (P2VAR(Tdd_Gpt_OSTMUnitUserRegs, AUTOMATIC,
GPT_CONFIG_DATA))
LpChannel->pBaseCtlAddress;
/* Assign the final return value */
LddTimeElapsed = LpOSTMUnitRegs->ulOSTMnCMP -
LpOSTMUnitRegs->ulOSTMnCNT;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
#endif/* End of (GPT_OSTM_UNIT_USED == STD_ON) */
break;
default:
break;
}
return (LddTimeElapsed);
}
#define GPT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#endif /* End of (GPT_TIME_ELAPSED_API == STD_ON) */
/********************************************************************************
** Function Name : Gpt_HW_GetTimeRemaining
**
** Service ID : NA
**
** Description : This is GPT Driver component support function.
** This function returns the time remaining for
** the channel's next timeout by
** accessing the respective timer registers.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameter : None
**
** Output Parameters : None
**
** Return Value : Gpt_ValueType
**
** Pre-condition : None
**
** Remarks : Global Variable(s):
** Gpt_GpChannelConfig, Gpt_GpChannelRamData
**
** Function(s) invoked:
** None
**
*******************************************************************************/
#if (GPT_TIME_REMAINING_API == STD_ON)
#define GPT_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(Gpt_ValueType, GPT_PRIVATE_CODE) Gpt_HW_GetTimeRemaining
(Gpt_ChannelType channel)
{
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON))
/* Defining a pointer to point to the TAUA/TAUB/TAUC registers */
P2VAR(Tdd_Gpt_TAUABCChannelUserRegs,AUTOMATIC,GPT_CONFIG_DATA)
LpTAUABCChannelRegs;
#endif
#if(GPT_TAUJ_UNIT_USED == STD_ON)
/* Defining a pointer to point to the TAUJ registers */
P2VAR(Tdd_Gpt_TAUJChannelUserRegs,AUTOMATIC,GPT_CONFIG_DATA)LpTAUJChannelRegs;
#endif
#if(GPT_OSTM_UNIT_USED == STD_ON)
/* Defining a pointer to point to the OSTM registers */
P2VAR(Tdd_Gpt_OSTMUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)LpOSTMUnitRegs;
#endif
/* Defining a pointer to point to the Channel Ram Data */
P2VAR(Tdd_Gpt_ChannelRamData,AUTOMATIC,GPT_CONFIG_DATA)LpRamData;
/* Updating the channel config parameter to the current channel */
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)LpChannel;
Gpt_ValueType LddTimeRemaining;
uint8 LucTimerType;
/* Initialize Return Value to zero */
LddTimeRemaining = GPT_ZERO;
/* Updating the channel config parameter to the current channel */
LpChannel = &Gpt_GpChannelConfig[channel];
/* Read the Timer Type for given channel */
LucTimerType = LpChannel->uiTimerType;
LpRamData = &Gpt_GpChannelRamData[channel];
switch(LucTimerType)
{
case GPT_HW_TAUA:
case GPT_HW_TAUB:
case GPT_HW_TAUC:
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON))
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if( LpRamData->ucChannelStatus == GPT_CH_NOTRUNNING)
{
LddTimeRemaining = GPT_ZERO;
}
else
{
LpTAUABCChannelRegs =
(P2VAR(Tdd_Gpt_TAUABCChannelUserRegs, AUTOMATIC, GPT_CONFIG_DATA))
LpChannel->pBaseCtlAddress;
/* Assign the final return value */
LddTimeRemaining = LpTAUABCChannelRegs->usTAUABCnCNTm;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
#endif
/* End of
((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON)) */
break;
case GPT_HW_TAUJ:
#if(GPT_TAUJ_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if( LpRamData->ucChannelStatus == GPT_CH_NOTRUNNING)
{
LddTimeRemaining = GPT_ZERO;
}
else
{
LpTAUJChannelRegs =
(P2VAR(Tdd_Gpt_TAUJChannelUserRegs, AUTOMATIC, GPT_CONFIG_DATA))
LpChannel->pBaseCtlAddress;
/* Assign the final return value */
LddTimeRemaining = LpTAUJChannelRegs->ulTAUJnCNTm;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
#endif/* End of (GPT_TAUJ_UNIT_USED == STD_ON) */
break;
case GPT_HW_OSTM:
#if(GPT_OSTM_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if( LpRamData->ucChannelStatus == GPT_CH_NOTRUNNING)
{
LddTimeRemaining = GPT_ZERO;
}
else
{
LpOSTMUnitRegs = (P2VAR(Tdd_Gpt_OSTMUnitUserRegs, AUTOMATIC,
GPT_CONFIG_DATA))LpChannel->pBaseCtlAddress;
/* Assign the final return value */
LddTimeRemaining = LpOSTMUnitRegs->ulOSTMnCNT;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
#endif/* End of (GPT_OSTM_UNIT_USED == STD_ON) */
break;
default:
break;
}
return (LddTimeRemaining);
}
#define GPT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#endif /* (GPT_TIME_REMAINING_API == STD_ON) */
/*******************************************************************************
** Function Name : Gpt_HW_StartTimer
**
** Service ID : NA
**
** Description : This is GPT Driver component support function.
** This function starts the timer channel by loading the
** compare registers and enabling the clock.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : channel, value
**
** InOut Parameter : None
**
** Output Parameters : None
**
** Return Value : None
**
** Pre-condition : None
**
** Remarks : Global Variable(s):
** Gpt_GpChannelConfig, Gpt_GpChannelRamData
**
** Function(s) invoked:
** SchM_Enter_Gpt, SchM_Exit_Gpt
**
*******************************************************************************/
#define GPT_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, GPT_PRIVATE_CODE) Gpt_HW_StartTimer
(Gpt_ChannelType channel, Gpt_ValueType value)
{
/* Updating the channel config parameter to the current channel */
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)LpChannel;
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON))
/* Defining a pointer to point to the TAUA/TAUB/TAUC registers */
P2VAR(Tdd_Gpt_TAUABCUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)
LpTAUABCUnitUserRegs;
/* Defining a pointer to point to the channel control registers of
TAUA/TAUB/TAUC */
P2VAR(Tdd_Gpt_TAUABCChannelUserRegs,AUTOMATIC,GPT_CONFIG_DATA)
LpTAUABCChannelRegs;
#endif
#if(GPT_TAUJ_UNIT_USED == STD_ON)
/* Defining a pointer to point to the TAUJ registers */
P2VAR(Tdd_Gpt_TAUJUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)LpTAUJUnitUserRegs;
/* Defining a pointer to point to the channel control registers of TAUA */
P2VAR(Tdd_Gpt_TAUJChannelUserRegs,AUTOMATIC,GPT_CONFIG_DATA)LpTAUJChannelRegs;
#endif
#if(GPT_OSTM_UNIT_USED == STD_ON)
/* Defining a pointer to point to the OSTM registers */
P2VAR(Tdd_Gpt_OSTMUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)LpOSTMUnitRegs;
#endif
/* Defining a pointer to point to the Channel Ram Data */
P2VAR(Tdd_Gpt_ChannelRamData,AUTOMATIC,GPT_CONFIG_DATA)LpRamData;
uint8 LucTimerType;
/* Updating the channel config parameter to the current channel */
LpChannel = &Gpt_GpChannelConfig[channel];
/* Read the Timer Type for given channel */
LucTimerType = LpChannel->uiTimerType;
LpRamData = &Gpt_GpChannelRamData[channel];
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if(LpChannel->ucImrMaskValue != GPT_NO_CBK_CONFIGURED)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V7.1.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the Interrupt processing of the current channel */
*(LpChannel->pImrIntrCntlAddress) |= ~(LpChannel->ucImrMaskValue);
/* Clear the pending interrupt request flag */
*(LpChannel->pIntrCntlAddress) &= GPT_CLEAR_INT_REQUEST_FLAG;
/* Enable the Interrupt processing of the current channel */
*(LpChannel->pImrIntrCntlAddress) &= LpChannel->ucImrMaskValue;
}
switch(LucTimerType)
{
case GPT_HW_TAUA:
case GPT_HW_TAUB:
case GPT_HW_TAUC:
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON))
LpTAUABCUnitUserRegs =
(P2VAR(Tdd_Gpt_TAUABCUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA))
Gpt_GpTAUUnitConfig[LpChannel->ucTimerUnitIndex].pTAUUnitUserCntlRegs;
LpTAUABCChannelRegs = (P2VAR(Tdd_Gpt_TAUABCChannelUserRegs,
AUTOMATIC,GPT_CONFIG_DATA))
LpChannel->pBaseCtlAddress;
/* Load the value into the Data register */
LpTAUABCChannelRegs->usTAUABCnCDRm = (uint16)value - GPT_WORD_ONE;
/* Start the timer TAUA/TAUB/TAUC */
LpTAUABCUnitUserRegs->usTAUABCnTS |= LpChannel->usChannelMask;
#endif /* End of
((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON)) */
break;
case GPT_HW_TAUJ:
#if(GPT_TAUJ_UNIT_USED == STD_ON)
LpTAUJUnitUserRegs =
(P2VAR(Tdd_Gpt_TAUJUnitUserRegs, AUTOMATIC, GPT_CONFIG_DATA))
Gpt_GpTAUUnitConfig[LpChannel->ucTimerUnitIndex].pTAUUnitUserCntlRegs;
LpTAUJChannelRegs = (P2VAR(Tdd_Gpt_TAUJChannelUserRegs,AUTOMATIC,
GPT_CONFIG_DATA))LpChannel->pBaseCtlAddress;
/* Load the value into the Data register */
LpTAUJChannelRegs->ulTAUJnCDRm = (value - ((uint32)GPT_ONE));
/* Start the timer TAUJ */
LpTAUJUnitUserRegs->ucTAUJnTS |= (uint8)LpChannel->usChannelMask;
#endif /* End of (GPT_TAUJ_UNIT_USED == STD_ON) */
break;
case GPT_HW_OSTM:
#if(GPT_OSTM_UNIT_USED == STD_ON)
LpOSTMUnitRegs =
(P2VAR(Tdd_Gpt_OSTMUnitUserRegs, AUTOMATIC, GPT_CONFIG_DATA))
LpChannel->pBaseCtlAddress;
/* Load the value into the Data register */
LpOSTMUnitRegs->ulOSTMnCMP = (value - ((uint32)GPT_ONE));
/* Start the timer OSTM */
LpOSTMUnitRegs->ucOSTMnTS = GPT_OSTM_START_MASK;
#endif/* End of (GPT_OSTM_UNIT_USED == STD_ON) */
break;
default:
break;
}
/* Assign the timer status to the Channel */
LpRamData->ucChannelStatus = GPT_CH_RUNNING;
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
}
#define GPT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Gpt_HW_StopTimer
**
** Service ID : NA
**
** Description : This is GPT Driver component support function.
** This function stops the channel
** by disabling the interrupt and/or the clock.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameter : None
**
** Output Parameters : None
**
** Return Value : None
**
** Pre-condition : None
**
** Remarks : Global Variable(s):
** Gpt_GpChannelConfig, Gpt_GpChannelRamData
**
** Function(s) invoked:
** SchM_Enter_Gpt, SchM_Exit_Gpt
**
*******************************************************************************/
#define GPT_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, GPT_PRIVATE_CODE) Gpt_HW_StopTimer(Gpt_ChannelType channel)
{
/* Updating the channel config parameter to the current channel */
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)LpChannel;
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON))
/* Defining a pointer to point to the TAUA registers */
P2VAR(Tdd_Gpt_TAUABCUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)
LpTAUABCUnitUserRegs;
#endif
#if(GPT_TAUJ_UNIT_USED == STD_ON)
/* Defining a pointer to point to the TAUJ registers */
P2VAR(Tdd_Gpt_TAUJUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)LpTAUJUnitUserRegs;
#endif
#if(GPT_OSTM_UNIT_USED == STD_ON)
/* Defining a pointer to point to the OSTM registers */
P2VAR(Tdd_Gpt_OSTMUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)LpOSTMUnitRegs;
#endif
/* Defining a pointer to point to the Channel Ram Data */
P2VAR(Tdd_Gpt_ChannelRamData,AUTOMATIC,GPT_CONFIG_DATA)LpRamData;
uint8 LucTimerType;
/* Updating the channel config parameter to the current channel */
LpChannel = &Gpt_GpChannelConfig[channel];
/* Read the Timer Type for given channel */
LucTimerType = LpChannel->uiTimerType;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpRamData = Gpt_GpChannelRamData+channel;
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if(LpChannel->ucImrMaskValue != GPT_NO_CBK_CONFIGURED)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the Interrupt processing of the current channel */
*(LpChannel->pImrIntrCntlAddress) |=
~(LpChannel->ucImrMaskValue);
}
switch(LucTimerType)
{
case GPT_HW_TAUA:
case GPT_HW_TAUB:
case GPT_HW_TAUC:
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON))
LpTAUABCUnitUserRegs =
(P2VAR(Tdd_Gpt_TAUABCUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA))
Gpt_GpTAUUnitConfig[LpChannel->ucTimerUnitIndex].pTAUUnitUserCntlRegs;
/* Stop the timer TAUA/TAUB/TAUC */
LpTAUABCUnitUserRegs->usTAUABCnTT |= LpChannel->usChannelMask;
#endif
/* End of
((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON)) */
break;
case GPT_HW_TAUJ:
#if(GPT_TAUJ_UNIT_USED == STD_ON)
LpTAUJUnitUserRegs =
(P2VAR(Tdd_Gpt_TAUJUnitUserRegs, AUTOMATIC, GPT_CONFIG_DATA))
Gpt_GpTAUUnitConfig[LpChannel->ucTimerUnitIndex].pTAUUnitUserCntlRegs;
/* Stop the timer TAUJ */
LpTAUJUnitUserRegs->ucTAUJnTT |= (uint8)LpChannel->usChannelMask;
#endif/* End of (GPT_TAUJ_UNIT_USED == STD_ON) */
break;
case GPT_HW_OSTM:
#if(GPT_OSTM_UNIT_USED == STD_ON)
LpOSTMUnitRegs =
(P2VAR(Tdd_Gpt_OSTMUnitUserRegs, AUTOMATIC, GPT_CONFIG_DATA))
LpChannel->pBaseCtlAddress;
/* Stop the timer OSTM */
LpOSTMUnitRegs->ucOSTMnTT = GPT_OSTM_STOP_MASK;
#endif/* End of (GPT_OSTM_UNIT_USED == STD_ON) */
break;
default:
break;
}
/* Assign the timer status to the Channel */
LpRamData->ucChannelStatus = GPT_CH_NOTRUNNING;
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
}
#define GPT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Gpt_HW_DisableWakeup
**
** Service ID : NA
**
** Description : This is GPT Driver component support function. This
** function disables the interrupt for the wakeup channel.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameter : None
**
** Output Parameters : None
**
** Return Value : None
**
** Pre-condition : None
**
** Remarks : Global Variable(s):
** Gpt_GpChannelConfig
**
** Function(s) invoked:
** SchM_Enter_Gpt, SchM_Exit_Gpt
**
*******************************************************************************/
#if ((GPT_REPORT_WAKEUP_SOURCE == STD_ON) && \
(GPT_WAKEUP_FUNCTIONALITY_API == STD_ON))
#define GPT_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, GPT_PRIVATE_CODE) Gpt_HW_DisableWakeup(Gpt_ChannelType channel)
{
/* Updating the channel config parameter to the current channel */
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)LpChannelConfig;
LpChannelConfig = &Gpt_GpChannelConfig[channel];
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if((LpChannelConfig->ucImrMaskValue != GPT_NO_CBK_CONFIGURED)&&
(LpChannelConfig->uiGptChannelMode != GPT_MODE_ONESHOT))
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disabling the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlAddress) |=
~(LpChannelConfig->ucImrMaskValue);
}
else
{
/* To avoid QAC warning*/
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
}
#define GPT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#endif /* End of ((GPT_WAKEUP_FUNCTIONALITY_API == STD_ON) &&
(GPT_REPORT_WAKEUP_SOURCE == STD_ON)) */
/*******************************************************************************
** Function Name : Gpt_HW_EnableWakeup
**
** Service ID : NA
**
** Description : This is GPT Driver component support function.This
** function enables the interrupt for the wakeup channel
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameter : None
**
** Output Parameters : None
**
** Return Value : None
**
** Pre-condition : None
**
** Remarks : Global Variable(s):
** Gpt_GpChannelConfig
**
** Function(s) invoked:
** SchM_Enter_Gpt, SchM_Exit_Gpt
**
*******************************************************************************/
#if ((GPT_REPORT_WAKEUP_SOURCE == STD_ON) && \
(GPT_WAKEUP_FUNCTIONALITY_API == STD_ON))
#define GPT_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, GPT_PRIVATE_CODE) Gpt_HW_EnableWakeup(Gpt_ChannelType channel)
{
/* Updating the channel config parameter to the current channel */
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)LpChannelConfig;
LpChannelConfig = &Gpt_GpChannelConfig[channel];
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if((LpChannelConfig->ucImrMaskValue != GPT_NO_CBK_CONFIGURED)&&
(LpChannelConfig->uiGptChannelMode != GPT_MODE_ONESHOT))
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V7.1.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlAddress) |=
~(LpChannelConfig->ucImrMaskValue);
/* Clear the pending interrupt request flag */
*(LpChannelConfig->pIntrCntlAddress) &= GPT_CLEAR_INT_REQUEST_FLAG;
/* Enable the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlAddress) &= LpChannelConfig->ucImrMaskValue;
}
else
{
/* To avoid QAC warning*/
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
}
#define GPT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#endif /* End of ((GPT_WAKEUP_FUNCTIONALITY_API == STD_ON) &&
(GPT_REPORT_WAKEUP_SOURCE == STD_ON)) */
/*******************************************************************************
** Function Name : Gpt_CbkNotification
**
** Service ID : NA
**
** Description : This routine is used to invoke the callback notification
** or wakeup notification based on timer mode.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : LucChannelIdx
**
** InOut Parameter : None
**
** Output Parameters : None
**
** Return Value : None
**
** Pre-condition : None
**
** Remarks : Global Variable(s):
** Gpt_GstChannelFunc, Gpt_GpChannelRamData,
** Gpt_GpChannelTimerMap, Gpt_GucGptDriverMode
**
** Function(s) invoked:
** EcuM_CheckWakeup, GptNotification_Channel(Configured
** Notification function for the corresponding channel)
**
*******************************************************************************/
#define GPT_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, GPT_PRIVATE_CODE) Gpt_CbkNotification(uint8 LucChannelIdx)
{
#if (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
/* Pointer to Function pointer Table */
P2CONST(Tdd_Gpt_ChannelFuncType, AUTOMATIC, GPT_APPL_CODE) LpChannelFunc;
#endif
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON))
/* Pointer pointing to the TAUA/TAUB/TAUC Unit control registers */
P2VAR(Tdd_Gpt_TAUABCUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)
LpTAUABCUnitUserRegs;
#endif
#if(GPT_TAUJ_UNIT_USED == STD_ON)
/* Pointer pointing to the TAUJ Unit user control registers */
P2VAR(Tdd_Gpt_TAUJUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA) LpTAUJUnitUserRegs;
#endif
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON))
/* Updating the channel config parameter to the current channel */
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)LpChannel;
/* Defining a pointer to point to the Channel Ram Data */
P2VAR(Tdd_Gpt_ChannelRamData,AUTOMATIC,GPT_CONFIG_DATA)LpRamData;
uint8 LucTimerType;
#endif
uint8 LucChIdx;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LucChIdx = *(Gpt_GpChannelTimerMap + LucChannelIdx);
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON))
/* Updating the channel config parameter to the current channel */
LpChannel = &Gpt_GpChannelConfig[LucChIdx];
/* Updating the Timertype of the current channel */
LucTimerType = LpChannel->uiTimerType;
/* Updating the channel ram data to the current channel */
LpRamData = &Gpt_GpChannelRamData[LucChIdx];
if(LpChannel->uiGptChannelMode == GPT_MODE_ONESHOT)
{
switch(LucTimerType)
{
case GPT_HW_TAUA:
case GPT_HW_TAUB:
case GPT_HW_TAUC:
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON))
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
/* Initialize pointer to the base address of the currect timer unit */
LpTAUABCUnitUserRegs =
(P2VAR(Tdd_Gpt_TAUABCUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA))
Gpt_GpTAUUnitConfig[LpChannel->ucTimerUnitIndex].pTAUUnitUserCntlRegs;
/* Stop the timer TAUA/TAUB/TAUC */
LpTAUABCUnitUserRegs->usTAUABCnTT |= LpChannel->usChannelMask;
/* Assign the timer status to the Channel */
LpRamData->ucChannelStatus = GPT_CH_NOTRUNNING;
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
#endif
/* End of
((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON)) */
break;
case GPT_HW_TAUJ:
#if(GPT_TAUJ_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
/* Initialize pointer to the base address of the currect timer unit */
LpTAUJUnitUserRegs =
(P2VAR(Tdd_Gpt_TAUJUnitUserRegs, AUTOMATIC, GPT_CONFIG_DATA))
Gpt_GpTAUUnitConfig[LpChannel->ucTimerUnitIndex].pTAUUnitUserCntlRegs;
/* Stop the timer TAUJ */
LpTAUJUnitUserRegs->ucTAUJnTT |= (uint8)LpChannel->usChannelMask;
/* Assign the timer status to the Channel */
LpRamData->ucChannelStatus = GPT_CH_NOTRUNNING;
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
#endif/* End of (GPT_TAUJ_UNIT_USED == STD_ON) */
break;
default:
break;
}
}
#endif/* End of ((GPT_TAUA_UNIT_USED == STD_ON)||
* (GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON)
* (GPT_TAUJ_UNIT_USED == STD_ON))
*/
#if (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
/* copy the driver status */
if(Gpt_GucGptDriverMode == GPT_MODE_NORMAL)
{
/* Invoke callback notification if notification is enabled */
if (Gpt_GpChannelRamData[LucChIdx].uiNotifyStatus == GPT_TRUE)
{
LpChannelFunc = &Gpt_GstChannelFunc[LucChIdx];
/* Invoke the callback function */
LpChannelFunc->pGptNotificationPointer_Channel();
}
}
else
#endif/* End of (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON) */
{
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/*
* If the driver is in Sleep mode and wakeup notification is enabled,
* invoke ECU Wakeup function
*/
EcuM_CheckWakeup(((Gpt_GpChannelConfig + LucChIdx)->ddWakeupSourceId));
/* Set the wakeup status to true */
Gpt_GpChannelRamData[LucChIdx].uiWakeupStatus = GPT_ONE;
#endif/* End of (GPT_REPORT_WAKEUP_SOURCE == STD_ON) */
}
}
#define GPT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Mcu/Mcu.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Mcu.c */
/* Version = 3.0.17 */
/* Date = 10-Sep-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2010-2013 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains API function implementations of MCU Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Fx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 02-Jul-2010 : Initial Version
*
* V3.0.1: 28-Jul-2010 : As per SCR 320 following changes are made:
* 1 Mcu_Init Api updated with Voltage comparator
* channels initialization functionality.
* 2 Mcu_InitClock Api updated to support FOUT
* functionality.
* 3 Deepstop mode is supported with the WAKE pin
* functionality as a precompile option.
* 4 In Mcu_GetPllStatus Api conditional checks modified
* to avoid reloading of the same value.
* 5 Misra warning added in Mcu_PerformReset Api.
*
* V3.0.2: 02-Sep-2010 : As per SCR 341, Misra warning's are added.
*
* V3.0.3: 06-Jan-2011 : As per SCR 392, following changes are done:
* 1 Clearing of Wake up factors in Mcu_Init Api are
* removed.
* 2 Mcu_InitClock Api is updated to add a functionality
* for High speed Internal ring ocillator.
* 3 Functionality related to High speed Internal ring
* oscillator is removed in Mcu_SetMode Api.
* 4 Mcu_DeepStopPrepare Internal API added.
* 5 Sequence of verification of the status of clock
* domains is modified.
* 6 Mcu_InitClock and Mcu_DistributePllClock Api's are
* updated for CLMAn control register 1.
*
* V3.0.4: 27-Jan-2011 : As per SCR 407, functionality of IO reset register 1
* is added in Mcu_SetMode Api.
*
* V3.0.5: 25-Feb-2011 : As per SCR 420, PROTCMDn and PROTSn registers are
* modified to update and check the status with value of
* 8 bit.
*
* V3.0.6: 17-Jun-2011 : As per SCR 468, following changes are done:
* 1 Data types of the following data structure
* elements are corrected:ulLVIindicatingReg,
* ulSubOscStabTime, ulPLL0StabTime, ulPLL1StabTime,
* ulPLL2StabTime, ulOscWufMsk and ulMainOscStabTime.
* 2 The functionality for clearing of Wake up factors is
* updated for writing with "0" for Wake up factors
* which are not assigned to a valid wake-up factor.
* 3 Functionality of Voltage comparators is updated with
* precompile options and also to update the enable and
* the edge selection bits seperately.
* 4 Trailing spaces are removed at the end of lines.
*
* V3.0.7: 29-Jun-2011 : As per SCR 481, Clock monitor disabling
* functionality is removed and added a check for status
* of clock monitor before updating respective clock
* monitor registers in Mcu_InitClock and
* Mcu_DistributePllClock Api's.
*
* V3.0.7a: 18-Oct-2011 : Copyright is updated.
*
* V3.0.8 : 17-May-2012 : As per SCR 014, Following changes are made:
* 1. Precompile options are added to
* LulSubClockStabCount and LulMainClockStabCount
* variables in Mcu_InitClock API.
* 2. Mcu_SetMode API is updated for changes in
* MCU_STOP_MODE, MCU_RUN_MODE_ISO1_DEEPSTOP and
* MCU_DEEPSTOP_MODE power down modes.
* 3. Mcu_DeepStopPrepare function is updated for
* removal of disabling the PLL's functionality.
* 4. Invocation of Mcu_DeepStopPrepare is modified in
* Mcu_SetMode API for change in order of preparing
* AWO and ISO0 clock domains.
* 5. Stop mask is unmasked for PLL's in
* Mcu_DeepStopPrepare function.
*
* V3.0.9 : 06-Jun-2012 : As per SCR 031, Mcu_GetVersionInfo API is removed
* and implemented as macro.
*
* V3.0.9a: 19-Feb-2013 : Merged Sx4-H V3.00 as below.
* 1. As per MANTIS 5337, Mcu_InitRamSection is updated
* for changing type from 16bit to 32bit of
* ulRamSectionSize and related variables.
* 2. As per MANTIS 4690, Mcu_GetPllStatus is modified
* to modify checking algorithm of PLL0-2.
* 3. As per MANTIS 7125, Mcu_SetMode is modified.
* 4. Added # define MCU_STOP_SEC_PRIVATE_CODE at last
* of code.
*
* V3.0.10 : 06-Dec-2012 : As per SCR 078, Automatic change to I/O buffer hold
* state upon entering DEEPSTOP mode is avoided in case
* "McuPortGroupStatusBackup"=false, in the
* API Mcu_SetMode().
*
* V3.0.11 : 31-Jan-2013 : IOHOLD masking functionality is updated as
* independent of Port Group Status Backup
* functionality
*
* V3.0.12: 25-Mar-2013 : As per SCR 091, The following changes have been made,
* 1. Alignment is changed as per code guidelines.
* 2. Registers Used section is updated in API Headers
* 3. As per mantis #6151, IOHOLD masking functionality
* is updated as independent of Port Group Status
* Backup functionality.
* 4. As per mantis #5455, a vendor specific API
* Mcu_MaskClear_WakeUpFactor is added to Mask and
* Clear the wakeup factor register.
* 5. As per mantis #5465, The API Mcu_RestartClocks,
* is added for restart of PLL after early wakeup
* 6. As per OPCN requirement "Resume of Clock
* Generators after STOP / DEEPSTOP" a vendor
* specific API Mcu_ConfigureAWO7 is added.
* 7. As per OPCN requirement workaround for "CPU start
* after DEEPSTOP" disabling of PLL before Deep Stop
* mode is removed from Mcu_DeepStopPrepare
* API.
* 8. As per Mantis #5465, Mcu_Iso1SoftWakeUp API is
* added.
*
* V3.0.13: 12-04-2013 : As per SCR 100, for mantis #7125 The initialization
* of wakeup mask registers is loaded with configuration
* values and masking of register.
*
* V3.0.14: 22-04-2013 : As per SCR 104, Following changes are made:
* 1.For mantis #5465 and #8472 The Mcu_RestartClocks
* API is updated for the restart of the Sub
* Oscillator.
* 2.For mantis #9015 The Mcu_ConfigureAWO7 API is
* Invoked between MCU_STOP_MODE_ISO1_ON and
* MCU_STOP_MODE_ISO1_DEEPSTOP.
* 3.For Mantis #5465 and #8472 Mcu_SetMode API is
* updated for the return value of the
* Mcu_RestartClocks API.
* 4.For mantis #5465 and #8472 Mcu_Iso1SoftWakeUp API
* is updated for the passing of argument.
*
* V3.0.14a: 14-06-2013 : As per the MANTIS #12207, API Mcu_RestartClocks()
* is updated for patch release.
*
* V3.0.15: 12-Jul-2013 : As per mantis 11731 and SCR xxx,following changes are
* made:
* Mcu_SetMode API is updated for the clock switch
* in the STOP Mode.
* V3.0.16: 18-Jul-2013 : As per Mantis 11731 and SCR xxx Mcu_CpuClockRestore
* API is added and Mcu_SetMode API is updated.
*
* V3.0.17: 10-Sep-2013 : The declaration of variable LblDemReported is
* modified in Mcu_SetMode API.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Mcu.h"
#include "Mcu_Ram.h"
#if (MCU_DEV_ERROR_DETECT == STD_ON)
#include "Det.h"
#endif
#include "Dem.h"
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
#include "SchM_Mcu.h"
#endif
#include "Mcu_LTTypes.h"
#include "Mcu_Reg.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification version information */
#define MCU_C_AR_MAJOR_VERSION MCU_AR_MAJOR_VERSION_VALUE
#define MCU_C_AR_MINOR_VERSION MCU_AR_MINOR_VERSION_VALUE
#define MCU_C_AR_PATCH_VERSION MCU_AR_PATCH_VERSION_VALUE
/* File version information */
#define MCU_C_SW_MAJOR_VERSION 3
#define MCU_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (MCU_AR_MAJOR_VERSION != MCU_C_AR_MAJOR_VERSION)
#error "Mcu.c : Mismatch in Specification Major Version"
#endif
#if (MCU_AR_MINOR_VERSION != MCU_C_AR_MINOR_VERSION)
#error "Mcu.c : Mismatch in Specification Minor Version"
#endif
#if (MCU_AR_PATCH_VERSION != MCU_C_AR_PATCH_VERSION)
#error "Mcu.c : Mismatch in Specification Patch Version"
#endif
#if (MCU_SW_MAJOR_VERSION != MCU_C_SW_MAJOR_VERSION)
#error "Mcu.c : Mismatch in Major Version"
#endif
#if (MCU_SW_MINOR_VERSION != MCU_C_SW_MINOR_VERSION)
#error "Mcu.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
#define MCU_START_SEC_VAR_NOINIT_32BIT
#include "MemMap.h"
/* Global for storing AW07 CKSC register value */
STATIC VAR(uint32, MCU_CONFIG_DATA) Mcu_GulCkscA07Val;
/* Global for storing AW07 CKSC register value */
STATIC VAR(uint32, MCU_CONFIG_DATA) Mcu_Gblckscstatus;
#define MCU_STOP_SEC_VAR_NOINIT_32BIT
#include "MemMap.h"
/*******************************************************************************
** Internal Function Prototypes **
*******************************************************************************/
#define MCU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
STATIC FUNC(void, MCU_PRIVATE_CODE)Mcu_DeepStopPrepare(void);
#define MCU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#define MCU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
STATIC FUNC(void, MCU_PRIVATE_CODE)Mcu_ConfigureAWO7(void);
#define MCU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#define MCU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
STATIC FUNC(Std_ReturnType, MCU_PRIVATE_CODE)Mcu_RestartClocks(void);
#define MCU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#define MCU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
STATIC FUNC(Std_ReturnType, MCU_PRIVATE_CODE)Mcu_CpuClockPrepare(void);
#define MCU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#define MCU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
STATIC FUNC(Std_ReturnType, MCU_PRIVATE_CODE)Mcu_CpuClockRestore(void);
#define MCU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#define MCU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
STATIC FUNC(Std_ReturnType, MCU_PRIVATE_CODE)Mcu_Iso1SoftWakeUp(void);
#define MCU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Mcu_Init
**
** Service ID : 0x00
**
** Description : This service performs initialization of the MCU Driver
** component.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non Reentrant
**
** Input Parameters : ConfigPtr - Pointer to MCU Driver Configuration set
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable:
** Mcu_GblDriverStatus, Mcu_GpConfigPtr
** Mcu_GpCkscRegOffset, Mcu_GpCkscRegValue
**
** Function Invoked : Det_ReportError, Dem_ReportErrorStatus,
** Mcu_Iso1SoftWakeUp
**
** Registers Used : PROTCMD2, LVICNT, PROTS2, VCPC0CTL0, VCPC0CTL1, PWS0,
** PWS1
**
*******************************************************************************/
#define MCU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, MCU_PUBLIC_CODE) Mcu_Init
(P2CONST(Mcu_ConfigType, AUTOMATIC, MCU_APPL_CONST) ConfigPtr)
{
#if (MCU_PORTGROUP_STATUS_BACKUP == STD_ON)
/* Pointer pointing to the Port registers */
P2CONST(Tdd_Mcu_PortGroupAddress, AUTOMATIC, MCU_CONFIG_DATA) LpPortRegisters;
/* pointer to CKSC register offset */
P2VAR(uint32, AUTOMATIC, MCU_CONFIG_CONST) LpPortRamArea;
uint8 LucIndex;
#endif
#if ((MCU_VCPC0CTL0_ENABLE == STD_ON) || (MCU_VCPC0CTL1_ENABLE == STD_ON))
uint8 LucVoltageCmp;
#endif
uint8 LenReturnValue;
boolean LblDemReported;
uint8 LucCount = MCU_FIVE;
LblDemReported = MCU_FALSE;
#if (MCU_DEV_ERROR_DETECT == STD_ON)
/* Report to DET, if the config pointer is NULL pointer */
if (ConfigPtr == NULL_PTR)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_INIT_SID,
MCU_E_PARAM_CONFIG);
}
else
#endif /* MCU_DEV_ERROR_DETECT == STD_ON */
{
/* Check if the database is present */
if ((ConfigPtr->ulStartOfDbToc) == MCU_DBTOC_VALUE)
{
/* Assign the global pointer with the config pointer */
Mcu_GpConfigPtr = ConfigPtr;
/* Assign global pointers to CKSC register offset and value */
Mcu_GpCkscRegOffset = Mcu_GpConfigPtr->pCkscRegOffset;
Mcu_GpCkscRegValue = Mcu_GpConfigPtr->pCkscRegValue;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
do
{
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Set LVI indication voltage detection level */
MCU_LVICNT = Mcu_GpConfigPtr->ulLVIindicationReg;
MCU_LVICNT = ~(Mcu_GpConfigPtr->ulLVIindicationReg);
MCU_LVICNT = Mcu_GpConfigPtr->ulLVIindicationReg;
LucCount--;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
}while ((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
}
#if (MCU_VCPC0CTL0_ENABLE == STD_ON)
/* Get Voltage comparator configured channel 0 */
LucVoltageCmp = Mcu_GpConfigPtr->ucVCPC0CTLreg0;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* check if the Voltage comparator configured channel 0 needs to be
* enabled */
if ((LucVoltageCmp & MCU_VCPC_ENABLE_VALUE) == MCU_VCPC_ENABLE_VALUE)
{
/* Update the voltage comparator for Enable bit seperately for Reset*/
MCU_VCPC0CTL0 &= MCU_VCPC_ENABLE_VALUE;
/* configure the Voltage transition direction edge selection of
* interrupt for Voltage comparator channel 0 */
MCU_VCPC0CTL0 |= (LucVoltageCmp & MCU_VCPC_ENABLE_MASK);
/* Update the voltage comparator for Enable bit seperately */
MCU_VCPC0CTL0 |= MCU_VCPC_ENABLE_VALUE;
}
#endif
#if (MCU_VCPC0CTL1_ENABLE == STD_ON)
/* Get Voltage comparator configured channel 1 */
LucVoltageCmp = Mcu_GpConfigPtr->ucVCPC0CTLreg1;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* check if the Voltage comparator configured channel 1 needs to be
* enabled */
if ((LucVoltageCmp & MCU_VCPC_ENABLE_VALUE) == MCU_VCPC_ENABLE_VALUE)
{
/* Update the voltage comparator for Enable bit seperately for Reset */
MCU_VCPC0CTL1 &= MCU_VCPC_ENABLE_VALUE;
/* configure the Voltage transition direction edge selection of
* interrupt for Voltage comparator channel 1 */
MCU_VCPC0CTL1 |= (LucVoltageCmp & MCU_VCPC_ENABLE_MASK);
/* Update the voltage comparator for Enable bit seperately */
MCU_VCPC0CTL1 |= MCU_VCPC_ENABLE_VALUE;
}
#endif
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check if reset because of ISO0 wakeup */
if (((MCU_WUFH0 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFL0 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFM0 != MCU_LONG_WORD_ZERO)))
{
LenReturnValue = Mcu_Iso1SoftWakeUp();
if (LenReturnValue != E_NOT_OK)
{
do
{
/* Infinite loop to wait for PWSS1PSS bit of PWS1 to 0 and
* Iso bit to 1 */
}while(((MCU_PWS1 & MCU_PWS_REG_MASK) != MCU_LONG_WORD_ONE));
}
}
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
do
{
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a*/
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers*/
/* in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* Make the ISO1 region enter into DEEPSTOP mode */
MCU_PSC0 = MCU_LONG_WORD_ZERO;
MCU_PSC0 = ~MCU_LONG_WORD_ZERO;
MCU_PSC0 = MCU_LONG_WORD_ZERO;
LucCount--;
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
}while((LucCount > MCU_ZERO) &&
(MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
do
{
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a*/
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers*/
/* in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* Make the ISO1 region enter into DEEPSTOP mode */
MCU_PSC1 = MCU_LONG_WORD_ZERO;
MCU_PSC1 = ~MCU_LONG_WORD_ZERO;
MCU_PSC1 = MCU_LONG_WORD_ZERO;
LucCount--;
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
}while((LucCount > MCU_ZERO) &&
(MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
if (LblDemReported == MCU_FALSE)
{
/* Check if the wake-up is from deep-stop mode */
if (((MCU_PWS0 & MCU_IOHOLD_MASK) == MCU_IOHOLD_MASK)
&& ((MCU_PWS1 & MCU_IOHOLD_MASK) == MCU_IOHOLD_MASK))
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
#if (MCU_PORTGROUP_STATUS_BACKUP == STD_ON)
/* Restore PORT registers */
/* Count for the size of array in which the values at Port
* registers are to be stored for back-up before entering into
* deep-stop mode
*/
LucIndex = Mcu_GpConfigPtr->ucNumOfPortGroup;
/* Get pointer to RAM area */
LpPortRamArea = Mcu_GpConfigPtr->pPortRamArea;
/* Get pointer to port registers structure */
LpPortRegisters =
(P2CONST(Tdd_Mcu_PortGroupAddress, AUTOMATIC, MCU_CONFIG_DATA))
Mcu_GpConfigPtr->pPortGroupSetting;
do
{
/* Restore the value of PSR register of the configured
* Port group
*/
LpPortRegisters->pPortGroupAddress->ulPSRn
= (*LpPortRamArea) | MCU_MSB_MASK;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpPortRamArea++;
LpPortRegisters++;
LucIndex--;
}while (LucIndex > MCU_ZERO);
#endif /* #if (MCU_PORTGROUP_STATUS_BACKUP == STD_ON) */
}
}
#if (MCU_DEV_ERROR_DETECT == STD_ON)
/* Set the Global Status */
Mcu_GblDriverStatus = MCU_INITIALIZED;
#endif
}
#if (MCU_DEV_ERROR_DETECT == STD_ON)
else
{
/* No database flashed. Hence, report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_INIT_SID,
MCU_E_INVALID_DATABASE);
}
#endif
}
}
#define MCU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Mcu_InitRamSection
**
** Service ID : 0x01
**
** Description : This function initializes the RAM section as provided
** from the configuration structure.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non Reentrant
**
** Input Parameters : RamSection - Id for RAM section
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Std_ReturnType (E_OK, E_NOT_OK)
**
** Preconditions : MCU Driver component must be initialized
**
** Remarks : Global Variable:
** Mcu_GblDriverStatus, Mcu_GpConfigPtr
**
** Function Invoked : Det_ReportError
**
** Registers Used : None
**
*******************************************************************************/
#define MCU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(Std_ReturnType, MCU_PUBLIC_CODE) Mcu_InitRamSection
(Mcu_RamSectionType RamSection)
{
P2CONST(Tdd_Mcu_RamSetting, AUTOMATIC, MCU_CONFIG_CONST) LpRamSetting;
P2VAR(uint8, AUTOMATIC, MCU_CONFIG_DATA) LpRamStartAddress;
Std_ReturnType LenReturnValue;
uint32 LulNoOfByte;
uint8 LucDataByte;
/* Initialize return value with E_OK */
LenReturnValue = E_OK;
#if (MCU_DEV_ERROR_DETECT == STD_ON)
/* Report to DET, if the component is not initialized */
if (Mcu_GblDriverStatus == MCU_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_INITRAMSECTION_SID,
MCU_E_UNINIT);
/* Set the return value to E_NOT_OK */
LenReturnValue = E_NOT_OK;
}
else
{
/* Do nothing */
}
/* Report to DET, if RamSetting Id is out of range */
if (RamSection >= MCU_MAX_RAMSETTING)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_INITRAMSECTION_SID,
MCU_E_PARAM_RAMSECTION);
/* Set the return value to E_NOT_OK */
LenReturnValue = E_NOT_OK;
}
else
{
/* Do nothing */
}
/* Check if any development error occurred */
if (LenReturnValue == E_OK)
#endif /* MCU_DEV_ERROR_DETECT == STD_ON */
{
/* Get the pointer to the RAM structure */
LpRamSetting = &Mcu_GstRamSetting[RamSection];
/* Get the start address of the RAM section */
LpRamStartAddress = LpRamSetting->pRamStartAddress;
/* Get the size of RAM section */
LulNoOfByte = LpRamSetting->ulRamSectionSize;
/* Get initial value */
LucDataByte = LpRamSetting->ucRamInitValue;
while (LulNoOfByte != ((uint32)MCU_ZERO))
{
/* Initialize RAM area with the value */
*LpRamStartAddress = LucDataByte;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpRamStartAddress++;
LulNoOfByte--;
}
}
return (LenReturnValue);
}
#define MCU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Mcu_InitClock
**
** Service ID : 0x02
**
** Description : This service initializes the PLL and other MCU specific
** clock options.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non Reentrant
**
** Input Parameters : ClockSetting - Id for Clock setting
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Std_ReturnType (E_OK, E_NOT_OK)
**
** Preconditions : MCU Driver component must be initialized
**
** Remarks : Global Variable:
** Mcu_GblDriverStatus, Mcu_GpConfigPtr
** Mcu_GpClockSetting, Mcu_GpCkscRegOffset,
** Mcu_GpCkscRegValue
**
** Function Invoked : Det_ReportError
** Dem_ReportErrorStatus
**
** Registers Used : MOSCC, MOSCST, MOSCE, MOSCS, SOSCST, SOSCE, SOSCS,
** ROSCS, ROSCE, PLLS0, PLLC0, PLLST0, PLLE0, PLLS1, PLLC1,
** PLLST1, PLLE1, PLLS2, PLLC2, PLLST2, PLLE2, PROTCMD0,
** PROTS0, PROTCMD1, PROTS1, PROTCMD2, PROTS2, FOUTDIV,
** CLMA0CTL1, CLMA0CMPH, CLMA0CMPL, CLMA0PCMD, CLMA0CTL0,
** CLMA0PS, CLMA2CTL1, CLMA2CMPH, CLMA2CMPL, CLMA2PCMD,
** CLMA2CTL0, CLMA2PS, CKSC
**
*******************************************************************************/
#define MCU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(Std_ReturnType, MCU_PUBLIC_CODE) Mcu_InitClock
(Mcu_ClockType ClockSetting)
{
#if (MCU_MAINOSC_ENABLE == STD_ON)
uint32 LulMainClockStabCount;
#endif
#if (MCU_SUBOSC_ENABLE == STD_ON)
uint32 LulSubClockStabCount;
#endif
P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST) Lpval;
/* Global pointer to CKSC register offset */
P2CONST(uint16, AUTOMATIC, MCU_CONFIG_CONST) LpCkscRegOffset;
/* Global pointer to CKSC register value */
P2CONST(uint32, AUTOMATIC, MCU_CONFIG_CONST) LpCkscRegValue;
Std_ReturnType LenReturnValue = E_OK;
uint8 LucClockSettingIndex = MCU_ZERO;
uint8 LucNoOfCkscReg;
uint8 LucSelectedSrcClk;
uint8 LucCount = MCU_FIVE;
boolean LblDemReported = MCU_FALSE;
#if (MCU_SUBOSC_ENABLE == STD_ON)
LulSubClockStabCount = MCU_CLK_SETTING_RINGOSC;
#endif
#if (MCU_DEV_ERROR_DETECT == STD_ON)
/* Report to DET, if the component is not initialized */
if (Mcu_GblDriverStatus == MCU_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_INITCLOCK_SID,
MCU_E_UNINIT);
/* Set the return value to E_NOT_OK */
LenReturnValue = E_NOT_OK;
}
/* Report to DET, if clock setting Id is invalid */
else
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Get the pointer to the Clock setting structure */
LucClockSettingIndex = *((Mcu_GpConfigPtr->pClkSettingIndexMap)
+ ClockSetting);
if ((ClockSetting >= MCU_MAX_CLK_SET) ||
(LucClockSettingIndex == MCU_INVALID_SETTING))
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_INITCLOCK_SID,
MCU_E_PARAM_CLOCK);
/* Set the return value to E_NOT_OK */
LenReturnValue = E_NOT_OK;
}
}
/* Check if any development error occurred */
if (LenReturnValue == E_OK)
#endif /* MCU_DEV_ERROR_DETECT == STD_ON */
{
/* Get the pointer to the Clock setting structure */
#if (MCU_DEV_ERROR_DETECT == STD_OFF)
LucClockSettingIndex = *((Mcu_GpConfigPtr->pClkSettingIndexMap)
+ ClockSetting);
#endif
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Store the pointer to the configured clock structure */
Mcu_GpClockSetting =
(P2CONST(Tdd_Mcu_ClockSetting, MCU_CONST, MCU_CONFIG_CONST))
(Mcu_GpConfigPtr->pClockSetting) + LucClockSettingIndex;
/* Get the value of the selected source clock */
LucSelectedSrcClk = Mcu_GpClockSetting->ucSelectedSrcClock;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/*Disbale the FOUT divider register */
MCU_FOUTDIV = MCU_FOUT_DISABLE_MASK;
#if (MCU_MAINOSC_ENABLE == STD_ON)
/* Check whether the selected clock source is main oscillator */
if ((LucSelectedSrcClk & MCU_MAIN_OSC_SELECTED) == MCU_MAIN_OSC_SELECTED)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check whether MOSC is OFF */
if ((MCU_MOSCS & MCU_MAIN_OSC_ON) != MCU_MAIN_OSC_ON)
{
/* Load the value of MOSCC register */
MCU_MOSCC = Mcu_GpClockSetting->ucMosccRegValue;
/* Set Main Oscillator stabilization time */
MCU_MOSCST = Mcu_GpClockSetting->ulMainOscStabTime;
/* Enable the Main Oscillator */
do
{
/* check for Main Oscilator Stop mask */
if ((Mcu_GpClockSetting->ucSelectedSTPMK & MCU_MAIN_OSC_MASKED)
== MCU_MAIN_OSC_MASKED)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Writing to write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
MCU_MOSCE = MCU_LONG_WORD_FIVE;
MCU_MOSCE = ~MCU_LONG_WORD_FIVE;
MCU_MOSCE = MCU_LONG_WORD_FIVE;
}
else
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Writing to write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
MCU_MOSCE = MCU_LONG_WORD_ONE;
MCU_MOSCE = ~MCU_LONG_WORD_ONE;
MCU_MOSCE = MCU_LONG_WORD_ONE;
}
LucCount--;
} while ((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
/* Load the stabilization count value */
LulMainClockStabCount = Mcu_GpConfigPtr->ulMainClockStabCount;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
while (((MCU_MOSCS & MCU_LONG_WORD_ONE) == MCU_LONG_WORD_ZERO) &&
(LulMainClockStabCount > MCU_ZERO))
{
LulMainClockStabCount--;
}
if ((MCU_MOSCS & MCU_LONG_WORD_SEVEN) != MCU_LONG_WORD_SEVEN)
{
/* MainOsc failed and report production error */
Dem_ReportErrorStatus(MCU_E_CLOCK_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
}
}
#endif /* (MCU_MAINOSC_ENABLE == STD_ON) */
/* Check whether the selected clock source is Sub oscillator and
* the DEM error has not occurred
*/
#if (MCU_SUBOSC_ENABLE == STD_ON)
if ((LenReturnValue == E_OK) &&
((LucSelectedSrcClk & MCU_SUB_OSC_SELECTED) == MCU_SUB_OSC_SELECTED))
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check whether SOSC is OFF */
if ((MCU_SOSCS & MCU_SUB_OSC_ON) != MCU_SUB_OSC_ON)
{
/* Set Sub Oscillator stabilization time */
MCU_SOSCST = Mcu_GpClockSetting->ulSubOscStabTime;
LucCount = MCU_FIVE;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Enable the Sub Oscillator */
do
{
/* writing to write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* check for Sub Oscilator Stop mask */
if ((Mcu_GpClockSetting->ucSelectedSTPMK & MCU_SUB_OSC_MASKED)
== MCU_SUB_OSC_MASKED)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
MCU_SOSCE = MCU_LONG_WORD_FIVE;
MCU_SOSCE = ~MCU_LONG_WORD_FIVE;
MCU_SOSCE = MCU_LONG_WORD_FIVE;
}
else
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
MCU_SOSCE = MCU_LONG_WORD_ONE;
MCU_SOSCE = ~MCU_LONG_WORD_ONE;
MCU_SOSCE = MCU_LONG_WORD_ONE;
}
LucCount--;
}while ((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
/* If CPU clock is High Ring Oscillator */
if (ClockSetting == MCU_CLK_SETTING_RINGOSC)
{
/* Load the High Ring stabilization count value */
LulSubClockStabCount = MCU_HIGH_RING_STAB_CNT;
}
/* If CPU clock is Main Oscillator */
else if (ClockSetting == MCU_CLK_SETTING_MAINOSC)
{
/* Load the Main clock stabilization count value */
LulSubClockStabCount = MCU_MAIN_CLK_STAB_CNT;
}
else
{
/* Load the PLL clock stabilization count value */
LulSubClockStabCount = MCU_PLL_CLK_STAB_CNT;
}
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
while (((MCU_SOSCS & MCU_LONG_WORD_SEVEN) != MCU_LONG_WORD_SEVEN) &&
(LulSubClockStabCount > MCU_ZERO))
{
LulSubClockStabCount--;
}
if ((MCU_SOSCS & MCU_LONG_WORD_SEVEN) != MCU_LONG_WORD_SEVEN)
{
/* SubOsc failed and report production error */
Dem_ReportErrorStatus(MCU_E_CLOCK_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
}
}
#endif /* (MCU_SUBOSC_ENABLE == STD_ON) */
/* Check whether the selected clock source is High speed Internal Ring
* Oscillator and the DEM error has not occurred
*/
#if (MCU_HIGHSPEED_RINGOSC_ENABLE == STD_ON)
if ((LenReturnValue == E_OK) &&
((LucSelectedSrcClk & MCU_8MHZ_OSC_SELECTED) == MCU_8MHZ_OSC_SELECTED))
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check whether High speed Internal Ring Oscillator is OFF */
if ((MCU_ROSCS & MCU_RING_OSC_ON) != MCU_RING_OSC_ON)
{
LucCount = MCU_FIVE;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Enable the High speed Internal Ring Oscillator */
do
{
/* writing to write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* check for High speed Internal Ring Oscillator's Stop mask */
if ((Mcu_GpClockSetting->ucSelectedSTPMK & MCU_RING_OSC_MASKED)
== MCU_RING_OSC_MASKED)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
MCU_ROSCE = MCU_LONG_WORD_FIVE;
MCU_ROSCE = ~MCU_LONG_WORD_FIVE;
MCU_ROSCE = MCU_LONG_WORD_FIVE;
}
else
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
MCU_ROSCE = MCU_LONG_WORD_ONE;
MCU_ROSCE = ~MCU_LONG_WORD_ONE;
MCU_ROSCE = MCU_LONG_WORD_ONE;
}
LucCount--;
}while ((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
}
/* High speed Internal Ring Oscillator is already ON */
else
{
LucCount = MCU_FIVE;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
do
{
/* writing to write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* check for High speed Internal Ring Oscillator's Stop mask */
if ((Mcu_GpClockSetting->ucSelectedSTPMK & MCU_RING_OSC_MASKED)
== MCU_RING_OSC_MASKED)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Enable the High speed Internal Ring Oscillator's STPMK bit */
MCU_ROSCE = MCU_LONG_WORD_FOUR;
MCU_ROSCE = ~MCU_LONG_WORD_FOUR;
MCU_ROSCE = MCU_LONG_WORD_FOUR;
}
else
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Disable the High speed Internal Ring Oscillator's STPMK bit */
MCU_ROSCE = MCU_LONG_WORD_ZERO;
MCU_ROSCE = ~MCU_LONG_WORD_ZERO;
MCU_ROSCE = MCU_LONG_WORD_ZERO;
}
LucCount--;
}while ((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
}
}
#endif /* (MCU_HIGHSPEED_RINGOSC_ENABLE == STD_ON) */
/* Check whether the selected clock source is PLL0 and
* the DEM error has not occurred
*/
#if (MCU_PLL0_ENABLE == STD_ON)
if ((LenReturnValue == E_OK) &&
((LucSelectedSrcClk & MCU_PLL0_CLOCK_SELECTED) == MCU_PLL0_CLOCK_SELECTED))
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check whether PLL0 is OFF */
if ((MCU_PLLS0 & MCU_PLL0_ON) != MCU_PLL0_ON)
{
/* Load the value of PLL control register PLLC0 */
MCU_PLLC0 = Mcu_GpClockSetting->ulPLL0ControlValue;
/* Set PLL0 stabilization time */
MCU_PLLST0 = Mcu_GpClockSetting->ulPLL0StabTime;
LucCount = MCU_FIVE;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Enable the PLL0 clock */
do
{
/* writing to write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* check for PLL0 Stop mask */
if ((Mcu_GpClockSetting->ucSelectedSTPMK & MCU_PLL0_MASKED)
== MCU_PLL0_MASKED)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
MCU_PLLE0 = MCU_LONG_WORD_FIVE;
MCU_PLLE0 = ~MCU_LONG_WORD_FIVE;
MCU_PLLE0 = MCU_LONG_WORD_FIVE;
}
else
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
MCU_PLLE0 = MCU_LONG_WORD_ONE;
MCU_PLLE0 = ~MCU_LONG_WORD_ONE;
MCU_PLLE0 = MCU_LONG_WORD_ONE;
}
LucCount--;
}while ((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
}
}
#endif /* (MCU_PLL0_ENABLE == STD_ON) */
/* Check whether the selected clock source is PLL1 and
* the DEM error has not occurred
*/
#if (MCU_PLL1_ENABLE == STD_ON)
if ((LenReturnValue == E_OK) &&
((LucSelectedSrcClk & MCU_PLL1_CLOCK_SELECTED) == MCU_PLL1_CLOCK_SELECTED))
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check whether PLL1 is OFF */
if ((MCU_PLLS1 & MCU_PLL1_ON) != MCU_PLL1_ON)
{
/* Load the value of PLL control register PLLC1 */
MCU_PLLC1 = Mcu_GpClockSetting->ulPLL1ControlValue;
/* Set PLL1 stabilization time */
MCU_PLLST1 = Mcu_GpClockSetting->ulPLL1StabTime;
LucCount = MCU_FIVE;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Enable the PLL1 clock */
do
{
/* writing to write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* check for PLL1 Stop mask */
if ((Mcu_GpClockSetting->ucSelectedSTPMK & MCU_PLL1_MASKED)
== MCU_PLL1_MASKED)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
MCU_PLLE1 = MCU_LONG_WORD_FIVE;
MCU_PLLE1 = ~MCU_LONG_WORD_FIVE;
MCU_PLLE1 = MCU_LONG_WORD_FIVE;
}
else
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
MCU_PLLE1 = MCU_LONG_WORD_ONE;
MCU_PLLE1 = ~MCU_LONG_WORD_ONE;
MCU_PLLE1 = MCU_LONG_WORD_ONE;
}
LucCount--;
}while ((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
}
}
#endif /* (MCU_PLL1_ENABLE == STD_ON) */
/* Check whether the selected clock source is PLL2 and
* the DEM error has not occurred
*/
#if (MCU_PLL2_ENABLE == STD_ON)
if ((LenReturnValue == E_OK) &&
((LucSelectedSrcClk & MCU_PLL2_CLOCK_SELECTED) == MCU_PLL2_CLOCK_SELECTED))
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check whether PLL2 is OFF */
if ((MCU_PLLS2 & MCU_PLL2_ON) != MCU_PLL2_ON)
{
/* Load the value of PLL control register PLLC2 */
MCU_PLLC2 = Mcu_GpClockSetting->ulPLL2ControlValue;
/* Set PLL2 stabilization time */
MCU_PLLST2 = Mcu_GpClockSetting->ulPLL2StabTime;
LucCount = MCU_FIVE;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Enable the PLL2 clock */
do
{
/* writing to write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* check for PLL2 Stop mask */
if ((Mcu_GpClockSetting->ucSelectedSTPMK & MCU_PLL2_MASKED)
== MCU_PLL2_MASKED)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
MCU_PLLE2 = MCU_LONG_WORD_FIVE;
MCU_PLLE2 = ~MCU_LONG_WORD_FIVE;
MCU_PLLE2 = MCU_LONG_WORD_FIVE;
}
else
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
MCU_PLLE2 = MCU_LONG_WORD_ONE;
MCU_PLLE2 = ~MCU_LONG_WORD_ONE;
MCU_PLLE2 = MCU_LONG_WORD_ONE;
}
LucCount--;
}while ((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
}
}
#endif /* (MCU_PLL2_ENABLE == STD_ON) */
/* Load CKSC registers if DEM error has not occurred */
if (LenReturnValue == E_OK)
{
/* Get the number of CKSC registers configured for Iso0*/
LucNoOfCkscReg = Mcu_GpClockSetting->ucNoOfIso0CkscReg;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Get pointer to the array of CKSC registers offset */
LpCkscRegOffset = Mcu_GpCkscRegOffset +
(Mcu_GpClockSetting->ucCkscIndexOffset);
/* Get pointer to the array of CKSC registers values */
LpCkscRegValue = Mcu_GpCkscRegValue +
(Mcu_GpClockSetting->ucCkscIndexOffset);
while (LucNoOfCkscReg > MCU_ZERO)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the configured Iso0 domain CKSC register address*/
Lpval = (P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST))
(MCU_CKSC000_BASE_ADDRESS + (*LpCkscRegOffset));
LucCount = MCU_FIVE;
do
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
MCU_PROTCMD0 = MCU_WRITE_DATA;
*Lpval = (*LpCkscRegValue);
*Lpval = ~(*LpCkscRegValue);
*Lpval = (*LpCkscRegValue);
LucCount--;
}while ((LucCount > MCU_ZERO) && (MCU_PROTS0 == MCU_ONE));
if (MCU_PROTS0 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpCkscRegOffset++;
LpCkscRegValue++;
/* Decrement number of CKSC registers */
LucNoOfCkscReg--;
}
/* Get the number of CKSC registers configured for Iso1 */
LucNoOfCkscReg = Mcu_GpClockSetting->ucNoOfIso1CkscReg;
while (LucNoOfCkscReg > MCU_ZERO)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the configured Iso1 domain CKSC register
address */
Lpval = (P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST))
(MCU_CKSC000_BASE_ADDRESS + (*LpCkscRegOffset));
LucCount = MCU_FIVE;
do
{
MCU_PROTCMD1 = MCU_WRITE_DATA;
*Lpval = (*LpCkscRegValue);
*Lpval = ~(*LpCkscRegValue);
*Lpval = (*LpCkscRegValue);
LucCount--;
}while ((LucCount > MCU_ZERO) && (MCU_PROTS1 == MCU_ONE));
if (MCU_PROTS1 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpCkscRegOffset++;
LpCkscRegValue++;
/* Decrement number of CKSC registers */
LucNoOfCkscReg--;
}
/* Get the number of CKSC registers configured in Awo */
LucNoOfCkscReg = Mcu_GpClockSetting->ucNoOfAwoCkscReg;
while (LucNoOfCkscReg > MCU_ZERO)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the configured Awo domain CKSC register
* address
*/
Lpval = (P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST))
(MCU_CKSC000_BASE_ADDRESS + (*LpCkscRegOffset));
LucCount = MCU_FIVE;
do
{
MCU_PROTCMD2 = MCU_WRITE_DATA;
*Lpval = (*LpCkscRegValue);
*Lpval = ~(*LpCkscRegValue);
*Lpval = (*LpCkscRegValue);
LucCount--;
}while ((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* Writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
/* Increment pointers to CKSC registers offset and values */
LpCkscRegOffset++;
LpCkscRegValue++;
/* Decrement number of CKSC registers */
LucNoOfCkscReg--;
}
}
/* Load CKSC registers if DEM error has not occurred */
if (LenReturnValue == E_OK)
{
/* Get the number of CKSC registers configured for Iso0*/
LucNoOfCkscReg = Mcu_GpClockSetting->ucNoOfIso0CkscReg;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Get pointer to the array of CKSC registers offset */
LpCkscRegOffset = Mcu_GpCkscRegOffset +
(Mcu_GpClockSetting->ucCkscIndexOffset);
/* Get pointer to the array of CKSC registers values */
LpCkscRegValue = Mcu_GpCkscRegValue +
(Mcu_GpClockSetting->ucCkscIndexOffset);
while ((LucNoOfCkscReg > MCU_ZERO) && (LblDemReported == MCU_FALSE))
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the configured Iso0 domain CKSC register address*/
Lpval = (P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST))
(MCU_CKSC000_BASE_ADDRESS + (*LpCkscRegOffset));
LucCount = MCU_FIVE;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/*check for activation of clock domain in CKCSTAT_mn register*/
while (((*(Lpval + MCU_LONG_WORD_ONE) & MCU_LONG_WORD_ONE)
!= MCU_LONG_WORD_ONE) && (LucCount > MCU_ZERO))
{
LucCount--;
}
/* Generate DEM error for Illegal clock ID*/
if (((*(Lpval + MCU_LONG_WORD_ONE) & MCU_LONG_WORD_ONE ) !=
MCU_LONG_WORD_ONE) &&
((*(Lpval + MCU_LONG_WORD_ONE) & MCU_CKSC_MASK_VALUE ) !=
(*LpCkscRegValue & MCU_CKSC_MASK_VALUE)))
{
Dem_ReportErrorStatus(MCU_E_CLOCK_FAILURE,
DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment pointers to CKSC registers offset and values */
else
{
LpCkscRegOffset++;
LpCkscRegValue++;
/* Decrement number of CKSC registers */
LucNoOfCkscReg--;
}
}
/* Get the number of CKSC registers configured for Iso1 */
LucNoOfCkscReg = Mcu_GpClockSetting->ucNoOfIso1CkscReg;
while ((LucNoOfCkscReg > MCU_ZERO) && (LblDemReported == MCU_FALSE))
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the configured Iso1 domain CKSC register
address */
Lpval = (P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST))
(MCU_CKSC000_BASE_ADDRESS + (*LpCkscRegOffset));
LucCount = MCU_FIVE;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/*check for activation of clock domain in CKCSTAT_mn register*/
while (((*(Lpval + MCU_LONG_WORD_ONE) & MCU_LONG_WORD_ONE)
!= MCU_LONG_WORD_ONE) && (LucCount > MCU_ZERO))
{
LucCount--;
}
/* Generate DEM error for Illegal clock ID*/
if (((*(Lpval + MCU_LONG_WORD_ONE) & MCU_LONG_WORD_ONE ) !=
MCU_LONG_WORD_ONE) &&
((*(Lpval + MCU_LONG_WORD_ONE) & MCU_CKSC_MASK_VALUE ) !=
(*LpCkscRegValue & MCU_CKSC_MASK_VALUE)))
{
Dem_ReportErrorStatus(MCU_E_CLOCK_FAILURE,
DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment pointers to CKSC registers offset and values */
else
{
LpCkscRegOffset++;
LpCkscRegValue++;
/* Decrement number of CKSC registers */
LucNoOfCkscReg--;
}
}
/* Get the number of CKSC registers configured in Awo */
LucNoOfCkscReg = Mcu_GpClockSetting->ucNoOfAwoCkscReg;
while ((LucNoOfCkscReg > MCU_ZERO) && (LblDemReported == MCU_FALSE))
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the configured Awo domain CKSC register
* address
*/
Lpval = (P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST))
(MCU_CKSC000_BASE_ADDRESS + (*LpCkscRegOffset));
LucCount = MCU_FIVE;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/*check for activation of clock domain in CKCSTAT_mn register*/
while (((*(Lpval + MCU_LONG_WORD_ONE) & MCU_LONG_WORD_ONE)
!= MCU_LONG_WORD_ONE) && (LucCount > MCU_ZERO))
{
LucCount--;
}
/* Generate DEM error for Illegal clock ID*/
if (((*(Lpval + MCU_LONG_WORD_ONE) & MCU_LONG_WORD_ONE ) !=
MCU_LONG_WORD_ONE) &&
((*(Lpval + MCU_LONG_WORD_ONE) & MCU_CKSC_MASK_VALUE ) !=
(*LpCkscRegValue & MCU_CKSC_MASK_VALUE)))
{
Dem_ReportErrorStatus(MCU_E_CLOCK_FAILURE,
DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
else
{
/* Increment pointers to CKSC registers offset and values */
LpCkscRegOffset++;
LpCkscRegValue++;
/* Decrement number of CKSC registers */
LucNoOfCkscReg--;
}
}
}
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the dividing factor value for FOUT */
MCU_FOUTDIV = Mcu_GpClockSetting->usFoutDivReg;
/* Initializing static variables */
Mcu_GulCkscA07Val = MCU_CKSCAO7_REGISTER;
/* Check if CLMA0 is enabled */
if ((LblDemReported == MCU_FALSE) && (((Mcu_GpConfigPtr->ucCLMEnable) &
MCU_CLMA0_ENABLE) == MCU_CLMA0_ENABLE))
{
/* Check if Clock monitor is disabled */
if ((MCU_CLMA0CTL0 & MCU_ONE) == MCU_ZERO)
{
if (((Mcu_GpConfigPtr->ucCLMOutputSignal) & MCU_CLMA0_ENABLE)
== MCU_CLMA0_ENABLE)
{
/* Load clock CLMA0 control register 1 with Interrupt request value */
MCU_CLMA0CTL1 = MCU_ONE;
}
else
{
/* Load clock CLMA0 control register 1 with Reset request value */
MCU_CLMA0CTL1 = MCU_ZERO;
}
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Initialize compare registers */
/* Compare High */
MCU_CLMA0CMPH = Mcu_GpConfigPtr->usCLMA0CMPH;
/* Compare Low */
MCU_CLMA0CMPL = Mcu_GpConfigPtr->usCLMA0CMPL;
LucCount = MCU_FIVE;
do
{
/* Write the write enable register */
MCU_CLMA0PCMD = MCU_WRITE_DATA;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Load clock CLMA0 control register 0 with value one in special
sequence */
MCU_CLMA0CTL0 = MCU_ONE;
MCU_CLMA0CTL0 = MCU_INVERTED_ONE;
MCU_CLMA0CTL0 = MCU_ONE;
LucCount--;
}while ((LucCount > MCU_ZERO) && (MCU_CLMA0PS == MCU_ONE));
if (MCU_CLMA0PS == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
}
}
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check if CLMA2 is enabled */
if ((LblDemReported == MCU_FALSE) &&
(((Mcu_GpConfigPtr->ucCLMEnable) & MCU_CLMA2_ENABLE) == MCU_CLMA2_ENABLE))
{
/* Check if Clock monitor is disabled */
if ((MCU_CLMA2CTL0 & MCU_ONE) == MCU_ZERO)
{
if (((Mcu_GpConfigPtr->ucCLMOutputSignal) & MCU_CLMA2_ENABLE)
== MCU_CLMA2_ENABLE)
{
/* Load clock CLMA2 control register 1 with Interrupt request value */
MCU_CLMA2CTL1 = MCU_ONE;
}
else
{
/* Load clock CLMA2 control register 1 with Reset request value */
MCU_CLMA2CTL1 = MCU_ZERO;
}
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Initialize compare registers */
/* Compare High */
MCU_CLMA2CMPH = MCU_CLMA2_CMPH;
/* Compare Low */
MCU_CLMA2CMPL = MCU_CLMA2_CMPL;
LucCount = MCU_FIVE;
do
{
/* Write the write enable register */
MCU_CLMA2PCMD = MCU_WRITE_DATA;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Load clock CLMA2 control register 0 with value one in special
* sequence
*/
MCU_CLMA2CTL0 = MCU_ONE;
MCU_CLMA2CTL0 = MCU_INVERTED_ONE;
MCU_CLMA2CTL0 = MCU_ONE;
LucCount--;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
}while ((LucCount > MCU_ZERO) && (MCU_CLMA2PS == MCU_ONE));
if (MCU_CLMA2PS == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
}
}
}
return LenReturnValue;
}
#define MCU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Mcu_DistributePllClock
**
** Service ID : 0x03
**
** Description : This service activates the PLL clock to the MCU clock
** distribution.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : void
**
** Preconditions : MCU Driver component must be initialized
**
** Remarks : Global Variable:
** Mcu_GblDriverStatus, Mcu_GpConfigPtr
** Mcu_GpClockSetting, Mcu_GpCkscRegOffset,
** Mcu_GpCkscRegValue
**
** Function Invoked : Mcu_GetPllStatus, Det_ReportError
** Dem_ReportErrorStatus
**
** Registers Used : PROTCMD0, PROTS0, PROTCMD1, PROTS1, PROTCMD2, PROTS2,
** CLMA3CTL1, CLMA3CMPH, CLMA3CMPL, CLMA3PCMD, CLMA3CTL0,
** CLMA3PS, CKSC
**
*******************************************************************************/
#define MCU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, MCU_PUBLIC_CODE) Mcu_DistributePllClock (void)
{
#if (MCU_DEV_ERROR_DETECT == STD_ON)
Mcu_PllStatusType LddPllLockStatus;
#endif /* MCU_DEV_ERROR_DETECT == STD_ON */
/* pointer to CKSC register offset */
P2CONST(uint16, AUTOMATIC, MCU_CONFIG_CONST) LpPllCkscRegOffset;
/* pointer to CKSC register value */
P2CONST(uint32, AUTOMATIC, MCU_CONFIG_CONST) LpPllCkscRegValue;
P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST) Lpval;
uint8 LucNoOfPllCkscReg;
uint8 LucCount = MCU_FIVE;
boolean LblDemReported = MCU_FALSE;
#if (MCU_DEV_ERROR_DETECT == STD_ON)
LddPllLockStatus = Mcu_GetPllStatus();
/* Report to DET, if module is not initialized */
if (Mcu_GblDriverStatus == MCU_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_DISTRIBUTEPLLCLOCK_SID,
MCU_E_UNINIT);
}
else
{
/* Do nothing */
}
/* Get the PLL status and if PLL status is 'UNLOCKED', report to DET */
if (LddPllLockStatus == MCU_PLL_UNLOCKED)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID,
MCU_DISTRIBUTEPLLCLOCK_SID, MCU_E_PLL_NOT_LOCKED);
}
/* If no DET error, continue */
else
#endif /* MCU_DEV_ERROR_DETECT == STD_ON */
{
/* Get the number of PLL CKSC registers configured for Iso0 */
LucNoOfPllCkscReg = Mcu_GpClockSetting->ucNoOfPllIso0CkscReg;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Get pointer to the array of CKSC registers offset */
LpPllCkscRegOffset = Mcu_GpCkscRegOffset +
(Mcu_GpClockSetting->ucCkscPllIndexOffset);
/* Get pointer to the array of CKSC registers values */
LpPllCkscRegValue = Mcu_GpCkscRegValue +
(Mcu_GpClockSetting->ucCkscPllIndexOffset);
while ((LucNoOfPllCkscReg > MCU_ZERO) && (LblDemReported == MCU_FALSE))
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the configured Iso0 domain pll
CKSC register address */
Lpval = (P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST))
(MCU_CKSC000_BASE_ADDRESS + (*LpPllCkscRegOffset));
do
{
MCU_PROTCMD0 = MCU_WRITE_DATA;
*Lpval = (*LpPllCkscRegValue);
*Lpval = ~(*LpPllCkscRegValue);
*Lpval = (*LpPllCkscRegValue);
LucCount--;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
}while ((LucCount > MCU_ZERO) && (MCU_PROTS0 == MCU_ONE));
if (MCU_PROTS0 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
LucCount = MCU_FIVE;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment pointers to CKSC registers offset and values */
LpPllCkscRegOffset++;
LpPllCkscRegValue++;
/* Decrement number of CKSC registers */
LucNoOfPllCkscReg--;
}
/* Get the number of Pll CKSC registers configured for Iso1 */
LucNoOfPllCkscReg = Mcu_GpClockSetting->ucNoOfPllIso1CkscReg;
while ((LucNoOfPllCkscReg > MCU_ZERO) && (LblDemReported == MCU_FALSE))
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the configured Iso1 domain pll
* CKSC register address
*/
Lpval = (P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST))
(MCU_CKSC000_BASE_ADDRESS + (*LpPllCkscRegOffset));
do
{
MCU_PROTCMD1 = MCU_WRITE_DATA;
*Lpval = (*LpPllCkscRegValue);
*Lpval = ~(*LpPllCkscRegValue);
*Lpval = (*LpPllCkscRegValue);
LucCount--;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
}while ((LucCount > MCU_ZERO) && (MCU_PROTS1 == MCU_ONE));
if (MCU_PROTS1 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
LucCount = MCU_FIVE;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment pointers to CKSC registers offset and values */
LpPllCkscRegOffset++;
LpPllCkscRegValue++;
/* Decrement number of CKSC registers */
LucNoOfPllCkscReg--;
}
/* Get the number of Pll CKSC registers configured for Awo */
LucNoOfPllCkscReg = Mcu_GpClockSetting->ucNoOfPllAwoCkscReg;
while ((LucNoOfPllCkscReg > MCU_ZERO) && (LblDemReported == MCU_FALSE))
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the configured Awo domain pll
* CKSC register address
*/
Lpval = (P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST))
(MCU_CKSC000_BASE_ADDRESS + (*LpPllCkscRegOffset));
do
{
MCU_PROTCMD2 = MCU_WRITE_DATA;
*Lpval = (*LpPllCkscRegValue);
*Lpval = ~(*LpPllCkscRegValue);
*Lpval = (*LpPllCkscRegValue);
LucCount--;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
}while ((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
LucCount = MCU_FIVE;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment pointers to CKSC registers offset and values */
LpPllCkscRegOffset++;
LpPllCkscRegValue++;
/* Decrement number of CKSC registers */
LucNoOfPllCkscReg--;
}
/* Get the number of PLL CKSC registers configured for Iso0 */
LucNoOfPllCkscReg = Mcu_GpClockSetting->ucNoOfPllIso0CkscReg;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Get pointer to the array of CKSC registers offset */
LpPllCkscRegOffset = Mcu_GpCkscRegOffset +
(Mcu_GpClockSetting->ucCkscPllIndexOffset);
/* Get pointer to the array of CKSC registers values */
LpPllCkscRegValue = Mcu_GpCkscRegValue +
(Mcu_GpClockSetting->ucCkscPllIndexOffset);
while ((LucNoOfPllCkscReg > MCU_ZERO) && (LblDemReported == MCU_FALSE))
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the configured Iso0 domain pll
CKSC register address */
Lpval = (P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST))
(MCU_CKSC000_BASE_ADDRESS + (*LpPllCkscRegOffset));
LucCount = MCU_FIVE;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/*check for activation of clock domain in CKCSTAT_mn register*/
while (((*(Lpval + MCU_LONG_WORD_ONE) & MCU_LONG_WORD_ONE)
!= MCU_LONG_WORD_ONE) && (LucCount > MCU_ZERO))
{
LucCount--;
}
/* Generate DEM error for Illegal clock ID*/
if (((*(Lpval + MCU_LONG_WORD_ONE) & MCU_LONG_WORD_ONE)
!= MCU_LONG_WORD_ONE) &&
((*(Lpval + MCU_LONG_WORD_ONE) & MCU_CKSC_MASK_VALUE) !=
(*LpPllCkscRegValue & MCU_CKSC_MASK_VALUE)))
{
Dem_ReportErrorStatus(MCU_E_CLOCK_FAILURE,
DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
else
{
LucCount = MCU_FIVE;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment pointers to CKSC registers offset and values */
LpPllCkscRegOffset++;
LpPllCkscRegValue++;
/* Decrement number of CKSC registers */
LucNoOfPllCkscReg--;
}
}
/* Get the number of Pll CKSC registers configured for Iso1 */
LucNoOfPllCkscReg = Mcu_GpClockSetting->ucNoOfPllIso1CkscReg;
while ((LucNoOfPllCkscReg > MCU_ZERO) && (LblDemReported == MCU_FALSE))
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the configured Iso1 domain pll
* CKSC register address
*/
Lpval = (P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST))
(MCU_CKSC000_BASE_ADDRESS + (*LpPllCkscRegOffset));
LucCount = MCU_FIVE;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/*check for activation of clock domain in CKCSTAT_mn register*/
while (((*(Lpval + MCU_LONG_WORD_ONE) & MCU_LONG_WORD_ONE)
!= MCU_LONG_WORD_ONE) && (LucCount > MCU_ZERO))
{
LucCount--;
}
/* Generate DEM error for Illegal clock ID*/
if (((*(Lpval + MCU_LONG_WORD_ONE) & MCU_LONG_WORD_ONE)
!= MCU_LONG_WORD_ONE) &&
((*(Lpval + MCU_LONG_WORD_ONE) & MCU_CKSC_MASK_VALUE) !=
(*LpPllCkscRegValue & MCU_CKSC_MASK_VALUE)))
{
Dem_ReportErrorStatus(MCU_E_CLOCK_FAILURE,
DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
else
{
LucCount = MCU_FIVE;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment pointers to CKSC registers offset and values */
LpPllCkscRegOffset++;
LpPllCkscRegValue++;
/* Decrement number of CKSC registers */
LucNoOfPllCkscReg--;
}
}
/* Get the number of Pll CKSC registers configured for Awo */
LucNoOfPllCkscReg = Mcu_GpClockSetting->ucNoOfPllAwoCkscReg;
while ((LucNoOfPllCkscReg > MCU_ZERO) && (LblDemReported == MCU_FALSE))
{
LucCount = MCU_FIVE;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the configured AWo domain pll
* CKSC register address
*/
Lpval = (P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST))
(MCU_CKSC000_BASE_ADDRESS + (*LpPllCkscRegOffset));
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/*check for activation of clock domain in CKCSTAT_mn register*/
while (((*(Lpval + MCU_LONG_WORD_ONE) & MCU_LONG_WORD_ONE)
!= MCU_LONG_WORD_ONE) && (LucCount > MCU_ZERO))
{
LucCount--;
}
/* Generate DEM error for Illegal clock ID*/
if (((*(Lpval + MCU_LONG_WORD_ONE) & MCU_LONG_WORD_ONE)
!= MCU_LONG_WORD_ONE) &&
((*(Lpval+MCU_LONG_WORD_ONE) & MCU_CKSC_MASK_VALUE) !=
(*LpPllCkscRegValue & MCU_CKSC_MASK_VALUE)))
{
Dem_ReportErrorStatus(MCU_E_CLOCK_FAILURE,
DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
else
{
LucCount = MCU_FIVE;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment pointers to CKSC registers offset and values */
LpPllCkscRegOffset++;
LpPllCkscRegValue++;
/* Decrement number of CKSC registers */
LucNoOfPllCkscReg--;
}
}
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check if CLMA3 is enabled */
if (((Mcu_GpConfigPtr->ucCLMEnable) & MCU_CLMA3_ENABLE) == MCU_CLMA3_ENABLE)
{
/* Check if Clock monitor is disabled */
if ((MCU_CLMA3CTL0 & MCU_ONE) == MCU_ZERO)
{
if (((Mcu_GpConfigPtr->ucCLMOutputSignal) & MCU_CLMA3_ENABLE)
== MCU_CLMA3_ENABLE)
{
/* Load clock CLMA3 control register 1 with Interrupt request value */
MCU_CLMA3CTL1 = MCU_ONE;
}
else
{
/* Load clock CLMA3 control register 1 with Reset request value */
MCU_CLMA3CTL1 = MCU_ZERO;
}
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Initialize compare registers */
/* Compare High */
MCU_CLMA3CMPH = Mcu_GpConfigPtr->usCLMA3CMPH;
/* Compare Low */
MCU_CLMA3CMPL = Mcu_GpConfigPtr->usCLMA3CMPL;
LucCount = MCU_FIVE;
do
{
/* Write the write enable register */
MCU_CLMA3PCMD = MCU_WRITE_DATA;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Load clock CLMA3 control register 0 with value one in special
sequence */
MCU_CLMA3CTL0 = MCU_ONE;
MCU_CLMA3CTL0 = MCU_INVERTED_ONE;
MCU_CLMA3CTL0 = MCU_ONE;
LucCount--;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral */
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
}while ((LucCount > MCU_ZERO) && (MCU_CLMA3PS == MCU_ONE));
if (MCU_CLMA3PS == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
}
}
}
}
}
#define MCU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Mcu_GetPllStatus
**
** Service ID : 0x04
**
** Description : This service provides the lock status of the PLL.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Mcu_PllStatusType
**
** Preconditions : MCU Driver component must be initialized
**
** Remarks : Global Variable:
** Mcu_GblDriverStatus
**
** Function Invoked : Det_ReportError
**
** Registers Used : PLLS0, PLLS1, PLLS2
**
*******************************************************************************/
#define MCU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(Mcu_PllStatusType, MCU_PUBLIC_CODE) Mcu_GetPllStatus (void)
{
Mcu_PllStatusType LddPllLockStatus = MCU_PLL_UNLOCKED;
uint8 LucSelectedSrcClk;
#if (MCU_DEV_ERROR_DETECT == STD_ON)
/* Report to DET, if module is not initialized */
if (Mcu_GblDriverStatus == MCU_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_GETPLLSTATUS_SID,
MCU_E_UNINIT);
/* Set PLL status to undefined */
LddPllLockStatus = MCU_PLL_STATUS_UNDEFINED;
}
else
#endif /* MCU_DEV_ERROR_DETECT == STD_ON */
{
/* Read the value of selected source clock registers */
LucSelectedSrcClk = Mcu_GpClockSetting->ucSelectedSrcClock;
#if (MCU_PLL0_ENABLE == STD_ON)
/* Check the lock status of PLL0 */
if ((LucSelectedSrcClk & MCU_PLL0_CLOCK_SELECTED)
== MCU_PLL0_CLOCK_SELECTED)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check CLKSTAB bit */
if ((MCU_PLLS0 & MCU_PLL_CLKSTAB_MASK) == MCU_PLL_CLKSTAB_MASK)
{
/* PLL is locked */
LddPllLockStatus = MCU_PLL_LOCKED;
}
else
{
/* PLL is not locked */
LddPllLockStatus = MCU_PLL_UNLOCKED;
}
}
if (LddPllLockStatus == MCU_PLL_UNLOCKED)
{
/* Further check of status are skipped. */
}
else
#endif /* (MCU_PLL0_ENABLE == STD_ON) */
{
#if (MCU_PLL1_ENABLE == STD_ON)
/* Check the lock status of PLL1 */
if ((LucSelectedSrcClk & MCU_PLL1_CLOCK_SELECTED)
== MCU_PLL1_CLOCK_SELECTED)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check CLKSTAB bit */
if ((MCU_PLLS1 & MCU_PLL_CLKSTAB_MASK) == MCU_PLL_CLKSTAB_MASK)
{
/* PLL is not locked */
LddPllLockStatus = MCU_PLL_LOCKED;
}
else
{
/* PLL is not locked */
LddPllLockStatus = MCU_PLL_UNLOCKED;
}
}
if (LddPllLockStatus == MCU_PLL_UNLOCKED)
{
/* Further check of status are skipped. */
}
else
#endif /* (MCU_PLL1_ENABLE == STD_ON) */
{
#if (MCU_PLL2_ENABLE == STD_ON)
/* Check the lock status of PLL2 */
if ((LucSelectedSrcClk & MCU_PLL2_CLOCK_SELECTED)
== MCU_PLL2_CLOCK_SELECTED)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check CLKSTAB bit */
if ((MCU_PLLS2 & MCU_PLL_CLKSTAB_MASK) == MCU_PLL_CLKSTAB_MASK)
{
/* PLL is not locked */
LddPllLockStatus = MCU_PLL_LOCKED;
}
else
{
/* To avoid misra warning */
/* At this timing, PLL is always not locked */
}
}
#endif /* (MCU_PLL2_ENABLE == STD_ON) */
} /* (LddPllLockStatus == MCU_PLL_UNLOCKED) for PLL1 */
} /* (LddPllLockStatus == MCU_PLL_UNLOCKED) for PLL0 */
} /* (MCU_DEV_ERROR_DETECT == STD_ON) */
return(LddPllLockStatus);
}
#define MCU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Mcu_GetResetReason
**
** Service ID : 0x05
**
** Description : The function reads the reset type from the hardware.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Mcu_ResetType
**
** Preconditions : MCU Driver component must be initialized
**
** Remarks : Global Variable:
** Mcu_GblDriverStatus
**
** Function Invoked : Det_ReportError,
** Dem_ReportErrorStatus.
**
** Registers Used : RESF, WUFCL0, WUFL0, WUFCM0, WUFM0, WUFCH0, WUFH0, PWS1,
** WUFCL1, WUFL1, WUFCM1, WUFM1, WUFCH1, WUFH1, RESFC
**
*******************************************************************************/
#define MCU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(Mcu_ResetType, MCU_PUBLIC_CODE)Mcu_GetResetReason (void)
{
Mcu_ResetType LddResetSource;
uint32 LulLoopCount;
#if (MCU_DEV_ERROR_DETECT == STD_ON)
/* Report to DET, if module is not initialized */
if (Mcu_GblDriverStatus == MCU_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_GETRESETREASON_SID,
MCU_E_UNINIT);
/* Set Reset status to undefined */
LddResetSource = MCU_RESET_UNDEFINED;
}
else
#endif /* MCU_DEV_ERROR_DETECT == STD_ON */
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers in */
/* the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
switch (MCU_RESF)
{
case MCU_POR : if (((MCU_WUFH0 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFL0 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFM0 != MCU_LONG_WORD_ZERO)) &&
((MCU_WUFH1 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFL1 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFM1 != MCU_LONG_WORD_ZERO)))
{
LddResetSource = MCU_AWO_ISO0_ISO1_WAKEUP;
LulLoopCount = MCU_LOOPCOUNT_MAX_VAL;
while (((MCU_PWS1 & MCU_PSS_ONE) == MCU_PSS_ONE) &&
(LulLoopCount != MCU_LONG_WORD_ZERO))
{
LulLoopCount--;
}
if (LulLoopCount == MCU_LONG_WORD_ZERO)
{
/* Power down mode entry failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_POWER_DOWN_MODE_FAILURE,
DEM_EVENT_STATUS_FAILED);
}
/* MISRA Rule: 11.3 */
/* Message :A cast should not be performed between a*/
/* pointer type and an integral type. */
/* Reason : This is to access the */
/* hardware registers in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it */
/* is not having any impact on code. */
/* Clear wakeup factor registers */
MCU_WUFCL0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL0);
MCU_WUFCM0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM0);
MCU_WUFCH0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH0);
MCU_WUFCL1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL1);
MCU_WUFCM1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM1);
MCU_WUFCH1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH1);
}
/* MISRA Rule: 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
else if (
(MCU_WUFH0 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFL0 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFM0 != MCU_LONG_WORD_ZERO))
{
LddResetSource = MCU_AWO_ISO0_WAKEUP;
/* Clear wakeup factor registers */
MCU_WUFCL0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL0);
MCU_WUFCM0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM0);
MCU_WUFCH0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH0);
}
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between*/
/* a pointer type and an integral type. */
/* Reason : This is to access the hardware */
/* registers in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having*/
/* any impact on code. */
else if (
(MCU_WUFH1 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFL1 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFM1 != MCU_LONG_WORD_ZERO))
{
LddResetSource = MCU_ISO1_WAKEUP;
LulLoopCount = MCU_LOOPCOUNT_MAX_VAL;
while (((MCU_PWS1 & MCU_PSS_ONE) == MCU_PSS_ONE) &&
(LulLoopCount != MCU_LONG_WORD_ZERO))
{
LulLoopCount--;
}
if (LulLoopCount == MCU_LONG_WORD_ZERO)
{
/* Power down mode entry failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_POWER_DOWN_MODE_FAILURE,
DEM_EVENT_STATUS_FAILED);
}
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed */
/* between a pointer type and an */
/* integral type. */
/* Reason : This is to access the hardware */
/* registers in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it */
/* is not having any impact on code. */
/* Clear wakeup factor registers */
MCU_WUFCL1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL1);
MCU_WUFCM1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM1);
MCU_WUFCH1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH1);
}
else
{
/* Reset is due to Power ON */
LddResetSource = MCU_POWER_ON_RESET;
}
break;
/* Software reset */
case MCU_SWR : LddResetSource = MCU_SW_RESET;
break;
/* Reset is due to overflow of watchdog timer 0 */
case MCU_WDR0 : LddResetSource = MCU_WATCHDOG0_RESET;
break;
/* Reset is due to overflow of watchdog timer 1 */
case MCU_WDR1 : LddResetSource = MCU_WATCHDOG1_RESET;
break;
/* Clock Monitor 0 reset */
case MCU_CLM0 : LddResetSource = MCU_CLM0_RESET;
break;
/* Clock Monitor 2 reset */
case MCU_CLM2 : LddResetSource = MCU_CLM2_RESET;
break;
/* Clock Monitor 3 reset */
case MCU_CLM3 : LddResetSource = MCU_CLM3_RESET;
break;
/* Low voltage indication reset */
case MCU_LVI : LddResetSource = MCU_LVI_RESET;
break;
/* Terminal reset */
case MCU_TER : LddResetSource = MCU_TERMINAL_RESET;
break;
/* Reset is due to unknown source */
default : LddResetSource = MCU_RESET_UNKNOWN;
break;
}
/* MISRA Rule: 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers in*/
/* the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Clear Reset factor register */
MCU_RESFC = MCU_RESF_CLEAR;
}
return (LddResetSource);
}
#define MCU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Mcu_GetResetRawValue
**
** Service ID : 0x06
**
** Description : The service return reset type value from the hardware
** register
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Mcu_RawResetType
**
** Preconditions : MCU Driver component must be initialized
**
** Remarks : Global Variable:
** Mcu_GblDriverStatus
**
** Function Invoked : Det_ReportError
**
** Registers Used : RESF, RESFC
**
*******************************************************************************/
#define MCU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(Mcu_RawResetType, MCU_PUBLIC_CODE) Mcu_GetResetRawValue (void)
{
Mcu_RawResetType LddResetValue;
#if (MCU_DEV_ERROR_DETECT == STD_ON)
/* Report to DET, if module is not initialized */
if (Mcu_GblDriverStatus == MCU_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_GETRESETRAWVAULE_SID,
MCU_E_UNINIT);
/* Set RESET status to uninitialized */
LddResetValue = MCU_RESET_UNINIT;
}
else
#endif /* MCU_DEV_ERROR_DETECT == STD_ON */
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers in */
/* the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the reset factor register value */
LddResetValue = (Mcu_RawResetType)MCU_RESF;
/* Clear Reset factor register */
MCU_RESFC = MCU_RESF_CLEAR;
}
return(LddResetValue);
}
#define MCU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Mcu_PerformReset
**
** Service ID : 0x07
**
** Description : This service provides microcontroller reset by accessing
** the Software reset register.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : MCU Driver component must be initialized
**
** Remarks : Global Variable:
** Mcu_GblDriverStatus
**
** Function Invoked : Det_ReportError
** Dem_ReportErrorStatus
**
** Registers Used : PROTCMD2, SWRESA, PROTS2
**
*******************************************************************************/
#if (MCU_PERFORM_RESET_API == STD_ON)
#define MCU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC (void, MCU_PUBLIC_CODE) Mcu_PerformReset (void)
{
uint8 LucSWRESCount = MCU_FIVE;
#if (MCU_DEV_ERROR_DETECT == STD_ON)
/* Report to DET, if module is not initialized */
if (Mcu_GblDriverStatus == MCU_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_PERFORMRESET_SID,
MCU_E_UNINIT);
}
else
#endif /* MCU_DEV_ERROR_DETECT == STD_ON */
{
do
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers in */
/* the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Write data to protection command register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* Write the correct value to the software reset register */
MCU_SWRESA = MCU_RES_CORRECT_VAL;
/* Write the inverted value to the software reset register */
MCU_SWRESA = MCU_RES_INVERTED_VAL;
/* Write the correct value to the software reset register */
MCU_SWRESA = MCU_RES_CORRECT_VAL;
LucSWRESCount--;
}while ((LucSWRESCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* Writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
}
}
}
#define MCU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* MCU_PERFORMRESET_API == STD_ON */
/*******************************************************************************
** Function Name : Mcu_SetMode
**
** Service ID : 0x08
**
** Description : This service activates the MCU power modes.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non Reentrant
**
** Input Parameters : McuMode - Id for power mode setting
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : MCU Driver component must be initialized
**
** Remarks : Global Variable:
** Mcu_GblDriverStatus, Mcu_GpConfigPtr
**
** Function Invoked : Mcu_DeepStopPrepare
** Det_ReportError
** Dem_ReportErrorStatus
** Mcu_CpuClockPrepare
** Mcu_ConfigureAWO7
** Mcu_RestartClocks
**
** Registers Used : OSCWUFMSK, PROTCMD3, PROTS3, WUFMSKL0, WUFMSKM0,
** WUFMSKH0, WUFMSKL1, WUFMSKM1, WUFMSKH1, WUFCL1, WUFCM1,
** WUFCH1, BURC, BURAE, PSC1, WUFL1, WUFM1, WUFH1, PWS0,
** PWS1, PROTCMD2, PSC0, PROTS2, WUFCL0, WUFL0, WUFCM0,
** WUFM0, WUFCH0, WUFH0
**
*******************************************************************************/
#define MCU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, MCU_PUBLIC_CODE) Mcu_SetMode (Mcu_ModeType McuMode)
{
P2CONST(Tdd_Mcu_ModeSetting, MCU_CONST, MCU_CONFIG_CONST) LpModeSetting;
#if (MCU_PORTGROUP_STATUS_BACKUP == STD_ON)
/* Pointer pointing to the Port control registers */
P2CONST(Tdd_Mcu_PortGroupAddress, AUTOMATIC, MCU_CONFIG_DATA) LpPortRegisters;
/* Pointer to array of RAM area */
P2VAR(uint32, AUTOMATIC, MCU_CONFIG_CONST) LpPortRamArea;
#endif
uint32 Luldeepstop;
uint32 Luliohold;
uint32 LulLoopCount;
#if (MCU_PORTGROUP_STATUS_BACKUP == STD_ON)
uint8 LucIndex;
#endif
Std_ReturnType LenReturnValue;
uint8 LucMode;
uint8 LucCount = MCU_FIVE;
uint8 LblFlag = MCU_FALSE;
boolean LblDemReported = MCU_FALSE;
#if (MCU_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
#endif
#if (MCU_DEV_ERROR_DETECT == STD_ON)
/* Initialize error status value with MCU_FALSE */
LblDetErrFlag = MCU_FALSE;
/* Report to DET, if the component is not initialized */
if (Mcu_GblDriverStatus == MCU_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_SETMODE_SID,
MCU_E_UNINIT);
/* Set the error status value to MCU_TRUE */
LblDetErrFlag = MCU_TRUE;
}
else
{
/* Do nothing */
}
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Report to DET, if Mode Setting Id is out of range */
if (McuMode >= MCU_MAX_MODE_SET)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_SETMODE_SID,
MCU_E_PARAM_MODE);
/* Set the error status value to MCU_TRUE */
LblDetErrFlag = MCU_TRUE;
}
else
{
/* Do nothing */
}
/* Check if any development error occurred */
if (LblDetErrFlag == MCU_FALSE)
#endif /* MCU_DEV_ERROR_DETECT == STD_ON */
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpModeSetting = ((P2CONST(Tdd_Mcu_ModeSetting, MCU_CONST, MCU_CONFIG_CONST))
(Mcu_GpConfigPtr->pModeSetting) + McuMode);
LucMode = LpModeSetting->ucModeType;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Clear oscillator wake-up factor mask register */
MCU_OSCWUFMSK = MCU_LONG_WORD_ZERO;
/* Write value to Enable/Disable oscillator wakeup for ISO0 and ISO1 area */
MCU_OSCWUFMSK = LpModeSetting->ulOscWufMsk;
/* Load value to IO reset register 1 to reset different ports
* before power down
*/
#if (MCU_IORES1_ENABLE == STD_ON)
do
{
/* Write the write enable register */
MCU_PROTCMD3 = MCU_WRITE_DATA;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Write protected sequence */
MCU_IORES1 = LpModeSetting->ucIOResetReg1;
MCU_IORES1 = ~(LpModeSetting->ucIOResetReg1);
MCU_IORES1 = LpModeSetting->ucIOResetReg1;
LucCount--;
}while ((LucCount > MCU_ZERO) && (MCU_PROTS3 == MCU_ONE));
if (MCU_PROTS3 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
}
#endif /* MCU_IORES1_ENABLE == STD_ON */
#if (MCU_DEV_ERROR_DETECT == STD_ON)
/* Check if the requested power mode is RUN_MODE */
if (LucMode == MCU_RUN_MODE)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* if ISO1 is already in STOP mode i.e. previous mode is
* RUN_MODE_ISO1_STOP or RUN_MODE_ISO1_DEEPSTOP
*/
if ((MCU_PWS0 == MCU_ISO0_RUN_MODE) &&
((MCU_PWS1 == MCU_MODE_ISO1_STOP)||
(MCU_PWS1 == MCU_MODE_ISO1_DEEPSTOP)))
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_SETMODE_SID,
MCU_E_INVALID_MODE);
/* Set the error status value to MCU_TRUE */
LblDetErrFlag = MCU_TRUE;
}
}
/* Check if any development error occurred */
if (LblDetErrFlag == MCU_FALSE)
#endif /* MCU_DEV_ERROR_DETECT == STD_ON */
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Clear wakeup factor registers */
MCU_WUFCL0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL0);
MCU_WUFCM0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM0);
MCU_WUFCH0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH0);
MCU_WUFCL1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL1);
MCU_WUFCM1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM1);
MCU_WUFCH1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH1);
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
if ( LucMode != MCU_HALT_MODE )
{
MCU_WUFMSKL0 = LpModeSetting->ulPowerDownWakeupTypeL0;
MCU_WUFMSKM0 = LpModeSetting->ulPowerDownWakeupTypeM0;
MCU_WUFMSKH0 = LpModeSetting->ulPowerDownWakeupTypeH0;
MCU_WUFMSKL1 = LpModeSetting->ulPowerDownWakeupTypeL1;
MCU_WUFMSKM1 = LpModeSetting->ulPowerDownWakeupTypeM1;
MCU_WUFMSKH1 = LpModeSetting->ulPowerDownWakeupTypeH1;
}
else
{
/* No action Required */
}
switch (LucMode)
{
case MCU_HALT_MODE:
/* Assembly instruction for HALT */
__asm("halt");
__asm("nop");
__asm("nop");
__asm("nop");
__asm("nop");
__asm("nop");
break;
case MCU_RUN_MODE_ISO1_STOP:
#if (MCU_DEV_ERROR_DETECT == STD_ON)
/* if ISO1 is already in STOP mode i.e. previous mode is
* RUN_MODE_ISO1_DEEPSTOP
*/
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
if (MCU_PWS1 == MCU_MODE_ISO1_DEEPSTOP)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_SETMODE_SID,
MCU_E_INVALID_MODE);
/* Set the error status value to MCU_TRUE */
LblDetErrFlag = MCU_TRUE;
}
else
#endif /* #if (MCU_DEV_ERROR_DETECT == STD_ON) */
{
LucCount = MCU_FIVE;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* STOP ISO1 area */
do
{
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Make STP bit of PSC1 register true */
MCU_PSC1 = MCU_ISO1_STOP_MODE;
MCU_PSC1 = ~MCU_ISO1_STOP_MODE;
MCU_PSC1 = MCU_ISO1_STOP_MODE;
LucCount--;
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
}while ((LucCount > MCU_ZERO) &&
(MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
report production error */
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
}
LulLoopCount = MCU_LOOPCOUNT_MAX_VAL;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
do
{
if ((MCU_WUFL1 != MCU_LONG_WORD_ZERO)
||(MCU_WUFM1 != MCU_LONG_WORD_ZERO)
||((MCU_WUFH1 & MCU_WUFH0_MASK) != MCU_LONG_WORD_ZERO))
{
LblFlag = MCU_TRUE;
}
LulLoopCount--;
/* Read PSS bit till it becomes 1 */
}while ((((MCU_PWS1 & MCU_PSS_ONE) != MCU_PSS_ONE) &&
(LulLoopCount > MCU_LONG_WORD_ZERO)) &&
(LblFlag == MCU_FALSE));
if (LulLoopCount == MCU_LONG_WORD_ZERO)
{
/* Power down mode entry failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_POWER_DOWN_MODE_FAILURE,
DEM_EVENT_STATUS_FAILED);
}
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
if (LblFlag == MCU_TRUE)
{
/* Clear Iso1 wakeup factor registers */
MCU_WUFCL1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL1);
MCU_WUFCM1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM1);
MCU_WUFCH1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH1);
}
}
break;
case MCU_STOP_MODE:
#if (MCU_DEV_ERROR_DETECT == STD_ON)
/* if ISO1 is already in DEEPSTOP mode i.e. previous mode is
* RUN_MODE_ISO1_DEEPSTOP
*/
if (MCU_PWS1 == MCU_MODE_ISO1_DEEPSTOP)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_SETMODE_SID,
MCU_E_INVALID_MODE);
/* Set the error status value to MCU_TRUE */
LblDetErrFlag = MCU_TRUE;
}
else
#endif /* #if (MCU_DEV_ERROR_DETECT == STD_ON) */
{
/* Prepare AWO7 clock for STOP mode */
Mcu_ConfigureAWO7();
/* set CPU Clock to default setting */
LenReturnValue = Mcu_CpuClockPrepare();
if (LenReturnValue == E_OK)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check if the Iso1 is already in STOP mode */
if (MCU_PWS1 == MCU_MODE_ISO1_STOP)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a*/
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers*/
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* STOP ISO0 area */
LucCount = MCU_FIVE;
do
{
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between */
/* a pointer type and an integral type. */
/* Reason : This is to access the hardware */
/* registers in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Make STP bit of PSC0 register true */
MCU_PSC0 = MCU_ISO0_STOP_MODE;
MCU_PSC0 = ~MCU_ISO0_STOP_MODE;
MCU_PSC0 = MCU_ISO0_STOP_MODE;
LucCount--;
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
}while ((LucCount > MCU_ZERO) &&
(MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
}
}
else
{
LucCount = MCU_FIVE;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a*/
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers*/
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* STOP ISO1 area */
do
{
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between */
/* a pointer type and an integral type. */
/* Reason : This is to access the hardware */
/* registers in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Make STP bit of PSC1 register true */
MCU_PSC1 = MCU_ISO1_STOP_MODE;
MCU_PSC1 = ~MCU_ISO1_STOP_MODE;
MCU_PSC1 = MCU_ISO1_STOP_MODE;
LucCount--;
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
}while ((LucCount > MCU_ZERO) &&
(MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
}
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a*/
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers*/
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* STOP ISO0 area */
LucCount = MCU_FIVE;
do
{
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between */
/* a pointer type and an integral type. */
/* Reason : This is to access the hardware */
/* registers in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Make STP bit of PSC0 register true */
MCU_PSC0 = MCU_ISO0_STOP_MODE;
MCU_PSC0 = ~MCU_ISO0_STOP_MODE;
MCU_PSC0 = MCU_ISO0_STOP_MODE;
LucCount--;
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
}while ((LucCount > MCU_ZERO) &&
(MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
}
}
/* CPU remains in Infinite loop while transition to STOP of
* ISO0 starts
*/
do
{
/* Infinite loop to wait for PWSS0PSS bit of PWS0 to 0 */
} while (((MCU_PWS0 & MCU_PWS_PSS_MSK) == MCU_PWS_PSS_MSK));
/* STOP mode wakeup processing, Wait until ISO1 is woken up */
do
{
/* Infinite loop to wait for PWSS1PSS bit of PWS1 to 0 */
}while (((MCU_PWS1 & MCU_PWS_PSS_MSK) == MCU_PWS_PSS_MSK));
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check for Awo, Iso0 and Iso1 wakeup factor registers */
if (((MCU_WUFH0 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFL0 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFM0 != MCU_LONG_WORD_ZERO)) &&
((MCU_WUFH1 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFL1 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFM1 != MCU_LONG_WORD_ZERO)))
{
/* Clear wakeup factor registers */
MCU_WUFCL0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL0);
MCU_WUFCM0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM0);
MCU_WUFCH0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH0);
MCU_WUFCL1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL1);
MCU_WUFCM1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM1);
MCU_WUFCH1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH1);
}
/* Check for Awo, Iso0 wakeup factor registers */
else if ((MCU_WUFH0 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFL0 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFM0 != MCU_LONG_WORD_ZERO))
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a*/
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers*/
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Clear Iso0 wakeup factor registers */
MCU_WUFCL0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL0);
MCU_WUFCM0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM0);
MCU_WUFCH0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH0);
}
else
{
/* To avoid MISRA warning */
}
/* Restore the AWO7 domain clock */
Mcu_ConfigureAWO7();
LenReturnValue = Mcu_CpuClockRestore();
if (LenReturnValue == E_NOT_OK)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
/* Set the error status value to MCU_TRUE */
LblDemReported = MCU_TRUE;
}
}
}
break;
case MCU_RUN_MODE_ISO1_DEEPSTOP:
#if (MCU_DEV_ERROR_DETECT == STD_ON)
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* if ISO1 is in stop mode i.e. previous mode is
* RUN_MODE_ISO1_STOP
*/
if (MCU_PWS1 == MCU_MODE_ISO1_STOP)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_SETMODE_SID,
MCU_E_INVALID_MODE);
/* Set the error status value to MCU_TRUE */
LblDetErrFlag = MCU_TRUE;
}
else
#endif /* #if (MCU_DEV_ERROR_DETECT == STD_ON) */
{
LucCount = MCU_FIVE;
#if (MCU_DEEPSTOP_WAKE_PIN == STD_ON)
/* Set the REGSTP bit along with STP and POF bits */
Luldeepstop = MCU_ISO1_DEEPSTOP_MODE_REGSTP;
#else
/* Set only the STP and POF bits */
Luldeepstop = MCU_ISO1_DEEPSTOP_MODE;
#endif/*MCU_DEEPSTOP_WAKE_PIN == STD_ON*/
do
{
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* Make the ISO1 region enter into DEEPSTOP mode */
MCU_PSC1 = Luldeepstop;
MCU_PSC1 = ~Luldeepstop;
MCU_PSC1 = Luldeepstop;
LucCount--;
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
}while ((LucCount > MCU_ZERO) &&
(MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
}
/* wait till Iso1 enters deepstop mode by verifying
* PSS=0 and ISO=1
*/
do
{
/*no action required*/
}while (((MCU_PWS1 & MCU_PWS_REG_MASK) \
!= MCU_PWS_DEEPSTOP_STS));
}
break;
case MCU_STOP_MODE_ISO1_DEEPSTOP:
#if (MCU_DEV_ERROR_DETECT == STD_ON)
/* if ISO1 is not in deepstop mode i.e. previous mode is
* RUN_MODE_ISO1_STOP
*/
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
if (MCU_PWS1 == MCU_MODE_ISO1_STOP)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_SETMODE_SID,
MCU_E_INVALID_MODE);
/* Set the error status value to MCU_TRUE */
LblDetErrFlag = MCU_TRUE;
}
else
#endif /* #if (MCU_DEV_ERROR_DETECT == STD_ON) */
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Preapare clock for AWO7 clock domain */
Mcu_ConfigureAWO7();
/* Check if the Iso1 is already in DEEPSTOP mode */
if (MCU_PWS1 == MCU_MODE_ISO1_DEEPSTOP)
{
LucCount = MCU_FIVE;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Change ISO0 from RUN to DEEPSTOP mode */
do
{
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Make STP bit of PSC0 register true */
MCU_PSC0 = MCU_ISO0_STOP_MODE;
MCU_PSC0 = ~MCU_ISO0_STOP_MODE;
MCU_PSC0 = MCU_ISO0_STOP_MODE;
LucCount--;
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
}while ((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
}
}
else
{
LucCount = MCU_FIVE;
do
{
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a*/
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers*/
/* in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* Make STP and POF bits of PSC1 register true */
MCU_PSC1 = MCU_ISO1_DEEPSTOP_MODE;
MCU_PSC1 = ~MCU_ISO1_DEEPSTOP_MODE;
MCU_PSC1 = MCU_ISO1_DEEPSTOP_MODE;
LucCount--;
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
}while ((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
}
LucCount = MCU_FIVE;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Change ISO0 from RUN to STOP mode */
do
{
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Make STP bit of PSC0 register true */
MCU_PSC0 = MCU_ISO0_STOP_MODE;
MCU_PSC0 = ~MCU_ISO0_STOP_MODE;
MCU_PSC0 = MCU_ISO0_STOP_MODE;
LucCount--;
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
}while ((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
}
}
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Clear wakeup factor registers */
if (((MCU_WUFH0 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFL0 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFM0 != MCU_LONG_WORD_ZERO)) &&
((MCU_WUFH1 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFL1 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFM1 != MCU_LONG_WORD_ZERO)))
{
/* Mask the IOHOLDCLR bit */
Luliohold = (MCU_PSC1 | MCU_IOHOLD_CLR);
LucCount = MCU_FIVE;
do
{
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a*/
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers*/
/* in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Make IOHLDCLR bit of PSC1 register true */
MCU_PSC1 = Luliohold;
MCU_PSC1 = ~Luliohold;
MCU_PSC1 = Luliohold;
LucCount--;
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
}while ((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
}
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Clear Awo, Iso0 and Iso1 wakeup factor registers */
MCU_WUFCL0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL0);
MCU_WUFCM0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM0);
MCU_WUFCH0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH0);
MCU_WUFCL1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL1);
MCU_WUFCM1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM1);
MCU_WUFCH1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH1);
}
else if ((MCU_WUFH0 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFL0 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFM0 != MCU_LONG_WORD_ZERO))
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Clear Iso0 wakeup factor registers */
MCU_WUFCL0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL0);
MCU_WUFCM0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM0);
MCU_WUFCH0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH0);
}
/* To avoid MISRA warning */
else
{
/* To avoid MISRA warning */
}
/* Restore the AWO7 domain clock */
Mcu_ConfigureAWO7();
}
break;
case MCU_DEEPSTOP_MODE:
#if (MCU_DEV_ERROR_DETECT == STD_ON)
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* If ISO1 is in stop mode i.e. previous mode is
* RUN_MODE_ISO1_STOP
*/
if (MCU_PWS1 == MCU_MODE_ISO1_STOP)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_SETMODE_SID,
MCU_E_INVALID_MODE);
/* Set the error status value to MCU_TRUE */
LblDetErrFlag = MCU_TRUE;
}
else
#endif /* #if (MCU_DEV_ERROR_DETECT == STD_ON) */
{
#if (MCU_PORTGROUP_STATUS_BACKUP == STD_ON)
/* Store PORT registers */
/* Count for the size of array in which the values at Port
* registers are to be stored for back-up before entering into
* deep-stop mode
*/
/* Get the number of Port groups configured */
LucIndex = Mcu_GpConfigPtr->ucNumOfPortGroup;
/* Get pointer to the RAM area */
LpPortRamArea = Mcu_GpConfigPtr->pPortRamArea;
/* Get pointer to the Port registers structure */
LpPortRegisters =
(P2CONST(Tdd_Mcu_PortGroupAddress, AUTOMATIC, MCU_CONFIG_DATA))
Mcu_GpConfigPtr->pPortGroupSetting;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/*Permit write access to BURAM by setting BURWE bit*/
MCU_BURC = MCU_BURWE_SET_VALUE;
do
{
/* Store the value of PSR register of the configured
* Port group in BURAM area
*/
*LpPortRamArea = LpPortRegisters->pPortGroupAddress->ulPSRn;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpPortRamArea++;
LpPortRegisters++;
LucIndex--;
}while ((LucIndex > MCU_ZERO) && (MCU_BURAE == MCU_ZERO));
if (MCU_BURAE == MCU_ONE)
{
/* writing to BURAM Area failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_BURAM_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
#endif /* #if (MCU_PORTGROUP_STATUS_BACKUP == STD_ON) */
#if (MCU_IOHOLDMASK_REQ == STD_ON)
/* To avoid automatic change to I/O buffer hold state upon
* entering DEEPSTOP */
LucCount = MCU_FIVE;
do
{
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* Make IOHOLDMASK bit of PSC0 register true */
MCU_PSC0 |= MCU_IOHOLD_MASK_CLEAR;
MCU_PSC0 |= ~MCU_IOHOLD_MASK_CLEAR;
MCU_PSC0 |= MCU_IOHOLD_MASK_CLEAR;
LucCount--;
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
}while ((LucCount > MCU_ZERO) &&
(MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
/* Set the error status value to MCU_TRUE */
LblDemReported = MCU_TRUE;
}
/* To avoid automatic change to I/O buffer hold state upon
* entering DEEPSTOP */
LucCount = MCU_FIVE;
do
{
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* Make IOHOLDMASK bit of PSC1 register true */
MCU_PSC1 |= MCU_IOHOLD_MASK_CLEAR;
MCU_PSC1 |= ~MCU_IOHOLD_MASK_CLEAR;
MCU_PSC1 |= MCU_IOHOLD_MASK_CLEAR;
LucCount--;
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
}while((LucCount > MCU_ZERO) &&
(MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
/* Set the error status value to MCU_TRUE */
LblDemReported = MCU_TRUE;
}
#endif /* #if (MCU_IOHOLDMASK_REQ == STD_ON) */
/* Check if the Iso1 is already not in DEEPSTOP mode */
if ((MCU_PWS1 != MCU_MODE_ISO1_DEEPSTOP)
&& (LblDemReported != MCU_TRUE) && (LenReturnValue == E_OK))
{
LucCount = MCU_FIVE;
#if (MCU_DEEPSTOP_WAKE_PIN == STD_ON)
/* Set the REGSTP bit along with STP and POF bits */
Luldeepstop = (MCU_ISO1_DEEPSTOP_MODE_REGSTP | MCU_PSC1);
#else
/* Set only the STP and POF bits */
Luldeepstop = (MCU_ISO1_DEEPSTOP_MODE | MCU_PSC1);
#endif/*MCU_DEEPSTOP_WAKE_PIN == STD_ON*/
do
{
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a*/
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers*/
/* in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* Make the ISO1 region enter into DEEPSTOP mode */
MCU_PSC1 = Luldeepstop;
MCU_PSC1 = ~Luldeepstop;
MCU_PSC1 = Luldeepstop;
LucCount--;
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
}while ((LucCount > MCU_ZERO) &&
(MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
}
else
{
/* no action required */
}
LblFlag = MCU_FALSE;
LulLoopCount = MCU_LOOPCOUNT_MAX_VAL;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* If wakeup is due to a wakeup factor, then just wait till
* PSS=0 and ISO=1
*/
do
{
if ((MCU_WUFL1 != MCU_LONG_WORD_ZERO)
||(MCU_WUFM1 != MCU_LONG_WORD_ZERO)
||((MCU_WUFH1 & MCU_WUFH0_MASK) != MCU_LONG_WORD_ZERO))
{
LblFlag = MCU_TRUE;
}
LulLoopCount--;
}while ((((MCU_PWS1 & MCU_PWS_REG_MASK) != MCU_PWS_DEEPSTOP_STS)
&& (LulLoopCount > MCU_LONG_WORD_ZERO))
&& (LblFlag == MCU_FALSE));
if (LulLoopCount == MCU_LONG_WORD_ZERO)
{
/*
* Power down mode entry failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_POWER_DOWN_MODE_FAILURE, \
DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
else
{
/* No action required */
}
if ((LblFlag == MCU_TRUE) && (LblDemReported == MCU_FALSE))
{
/* early wakeup of Iso1 region */
/* Restart Main Osc, High Speed IntOsc and Sub oscillator */
LenReturnValue = Mcu_RestartClocks();
if (LenReturnValue == E_OK)
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a*/
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers*/
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Clear wakeup factor registers */
MCU_WUFCL1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL1);
MCU_WUFCM1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM1);
MCU_WUFCH1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH1);
}
}
else
{
/* No action required */
}
/* Check if the Iso1 is already in DEEPSTOP mode */
if (((MCU_PWS1 & MCU_PWS_REG_MASK) == MCU_PWS_DEEPSTOP_STS) &&
(LblDemReported != MCU_TRUE)&& (LenReturnValue == E_OK))
{
/* set CPU Clock to default setting */
LenReturnValue = Mcu_CpuClockPrepare();
/* prepare the clock domains of ISO0/AWO For Deepstop mode */
Mcu_DeepStopPrepare();
/* Prepare AWO7 clock for DEEPSTOP mode */
Mcu_ConfigureAWO7();
LucCount = MCU_FIVE;
#if (MCU_DEEPSTOP_WAKE_PIN == STD_ON)
/* Set the REGSTP bit along with STP and POF bits */
Luldeepstop = (MCU_ISO0_DEEPSTOP_MODE_REGSTP | MCU_PSC0);
#else
/* Set only the STP and POF bits */
Luldeepstop = (MCU_ISO0_DEEPSTOP_MODE | MCU_PSC0);
#endif/*MCU_DEEPSTOP_WAKE_PIN == STD_ON*/
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Change ISO0 from RUN to DEEPSTOP mode */
do
{
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a*/
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers*/
/* in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Make the ISO0 region enter into DEEPSTOP mode */
MCU_PSC0 = Luldeepstop;
MCU_PSC0 = ~Luldeepstop;
MCU_PSC0 = Luldeepstop;
LucCount--;
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
}while ((LucCount > MCU_ZERO)
&& (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
do
{
/* Infinite loop to wait for PWSS0PSS bit of PWS0 to 0 */
}while (((MCU_PWS0 & MCU_PWS_DEEPSTOP_STS)
== MCU_PWS_DEEPSTOP_STS));
/* Restore the AWO7 domain clock if deepstop entry fails */
Mcu_ConfigureAWO7();
}
else
{
/* Failure in entering to Deepstop mode due to early wakeup
* report production error
*/
Dem_ReportErrorStatus(MCU_E_POWER_DOWN_MODE_FAILURE,
DEM_EVENT_STATUS_FAILED);
}
}
break;
case MCU_STOP_MODE_ISO1_ON:
#if (MCU_DEV_ERROR_DETECT == STD_ON)
/* if ISO1 is already in STOP mode i.e. previous mode is
* RUN_MODE_ISO1_STOP or RUN_MODE_ISO1_DEEPSTOP
*/
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
if ((MCU_PWS1 == MCU_MODE_ISO1_STOP)
|| (MCU_PWS1 == MCU_MODE_ISO1_DEEPSTOP))
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, MCU_SETMODE_SID,
MCU_E_INVALID_MODE);
/* Set the error status value to MCU_TRUE */
LblDetErrFlag = MCU_TRUE;
}
else
#endif /* #if (MCU_DEV_ERROR_DETECT == STD_ON) */
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Prepare AWO7 clock for STOP mode */
Mcu_ConfigureAWO7();
/* Check if Iso1 is in RUN mode */
if (MCU_PWS1 == MCU_ISO1_RUN_MODE)
{
LucCount = MCU_FIVE;
/* Change ISO0 to STOP mode */
do
{
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a*/
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers*/
/* in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Make STP bit of PSC0 register true */
MCU_PSC0 = MCU_ISO0_STOP_MODE;
MCU_PSC0 = ~MCU_ISO0_STOP_MODE;
MCU_PSC0 = MCU_ISO0_STOP_MODE;
LucCount--;
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
} while ((LucCount > MCU_ZERO)
&& (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
}
}
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
if ((MCU_WUFH0 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFL0 != MCU_LONG_WORD_ZERO) ||
(MCU_WUFM0 != MCU_LONG_WORD_ZERO))
{
/* Clear Iso0 wakeup factor registers */
MCU_WUFCL0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL0);
MCU_WUFCM0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM0);
MCU_WUFCH0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH0);
}
/* Restore the AWO7 domain clock */
Mcu_ConfigureAWO7();
}
break;
default:
break;
}
}
}
}
#define MCU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Mcu_DeepStopPrepare
**
** Service ID : None
**
** Description : This service prepares the clocks for DeepStop mode.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : none
**
** Return parameter : void
**
** Preconditions : None
**
** Remarks : Global Variable:
** Mcu_GpClockSetting, Mcu_GpCkscRegOffset
**
** Function Invoked : Dem_ReportErrorStatus
**
** Registers Used : PROTCMD0, PROTS0, PLLS2, PROTCMD2, PLLE2, PROTS2, CKSC
**
*******************************************************************************/
#define MCU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
STATIC FUNC(void, MCU_PRIVATE_CODE)Mcu_DeepStopPrepare(void)
{
/* pointer to CKSC register offset */
P2CONST(uint16, AUTOMATIC, MCU_CONFIG_CONST) LpPllCkscRegOffset;
P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST) Lpval;
uint32 LulSTPMKmask;
uint8 LucCount = MCU_FIVE;
uint8 LucNoOfPllCkscReg;
boolean LblDemReported = MCU_FALSE;
/* Get the number of PLL CKSC registers configured for Iso0*/
LucNoOfPllCkscReg = Mcu_GpClockSetting->ucNoOfPllIso0CkscReg;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Get pointer to the array of CKSC registers offset */
LpPllCkscRegOffset = Mcu_GpCkscRegOffset +
(Mcu_GpClockSetting->ucCkscPllIndexOffset);
LucCount = MCU_FIVE;
while ((LucNoOfPllCkscReg > MCU_ZERO) &&
(LblDemReported == MCU_FALSE))
{
/* MISRA Rule : 11.3 */
/*Message : A cast should not be performed between a*/
/* pointer to a volatile object and an */
/* integral type. */
/*Reason : This is to access the hardware registers*/
/* in the code. */
/*Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/*Get the pointer to the configured Iso0 domain pll
CKSC register address */
Lpval = (P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST))
(MCU_CKSC000_BASE_ADDRESS + (*LpPllCkscRegOffset));
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a*/
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers*/
/* in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
if (Lpval != ((uint32 *)MCU_CKSC000_ADDRESS))
{
/* Mask the configured STPMK Bit */
LulSTPMKmask = ((*Lpval) & MCU_LONG_WORD_ONE);
do
{
MCU_PROTCMD0 = MCU_WRITE_DATA;
*Lpval = (LulSTPMKmask | MCU_CKSC_8MHZ_INITIAL_VAL);
*Lpval = ~(LulSTPMKmask | MCU_CKSC_8MHZ_INITIAL_VAL);
*Lpval = (LulSTPMKmask | MCU_CKSC_8MHZ_INITIAL_VAL);
LucCount--;
}while ((LucCount > MCU_ZERO) &&
(MCU_PROTS0 == MCU_ONE));
if (MCU_PROTS0 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
}
LucCount = MCU_FIVE;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation*/
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/*Increment pointers to CKSC registers offset and values*/
LpPllCkscRegOffset++;
/* Decrement number of CKSC registers */
LucNoOfPllCkscReg--;
}
/* Increment the LpPllCkscRegOffset beyond Iso1 registers */
LpPllCkscRegOffset = (LpPllCkscRegOffset +
(Mcu_GpClockSetting->ucNoOfPllIso1CkscReg));
/* Get the number of PLL CKSC registers configured for AWO */
LucNoOfPllCkscReg = Mcu_GpClockSetting->ucNoOfPllAwoCkscReg;
LucCount = MCU_FIVE;
while ((LucNoOfPllCkscReg > MCU_ZERO) && (LblDemReported == MCU_FALSE))
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral*/
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the configured Iso0 domain pll
CKSC register address */
Lpval = (P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST))
(MCU_CKSC000_BASE_ADDRESS + (*LpPllCkscRegOffset));
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a*/
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers*/
/* in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
if (Lpval == (MCU_CKSC_AW06_ADDRESS))
{
do
{
MCU_PROTCMD2 = MCU_WRITE_DATA;
*Lpval = MCU_LONG_WORD_ZERO;
*Lpval = ~MCU_LONG_WORD_ZERO;
*Lpval = MCU_LONG_WORD_ZERO;
LucCount--;
}while ((LucCount > MCU_ZERO) &&
(MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
}
else
{
/* Mask the configured STPMK Bit */
LulSTPMKmask = ((*Lpval) & MCU_LONG_WORD_ONE);
do
{
MCU_PROTCMD2 = MCU_WRITE_DATA;
*Lpval = (LulSTPMKmask | MCU_CKSC_8MHZ_INITIAL_VAL);
*Lpval = ~(LulSTPMKmask | MCU_CKSC_8MHZ_INITIAL_VAL);
*Lpval = (LulSTPMKmask | MCU_CKSC_8MHZ_INITIAL_VAL);
LucCount--;
/*MISRA Rule : 11.3 */
/*Message : A cast should not be performed between a*/
/* pointer to a volatile object and an integral*/
/* type. */
/*Reason : This is to access the hardware registers*/
/* in the code. */
/*Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
}while ((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
}
LucCount = MCU_FIVE;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment pointers to CKSC registers
* offset and values */
LpPllCkscRegOffset++;
/* Decrement number of CKSC registers */
LucNoOfPllCkscReg--;
}
/* Get the number of PLL CKSC registers configured for Iso0*/
LucNoOfPllCkscReg = Mcu_GpClockSetting->ucNoOfPllIso0CkscReg;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Get pointer to the array of CKSC registers offset */
LpPllCkscRegOffset = Mcu_GpCkscRegOffset +
(Mcu_GpClockSetting->ucCkscPllIndexOffset);
LucCount = MCU_FIVE;
while ((LucNoOfPllCkscReg > MCU_ZERO) && (LblDemReported == MCU_FALSE))
{
/* MISRA Rule : 11.3 */
/*Message : A cast should not be performed between a*/
/* pointer to a volatile object and an */
/* integral type. */
/*Reason : This is to access the hardware registers*/
/* in the code. */
/*Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/*Get the pointer to the configured Iso0 domain pll
CKSC register address */
Lpval = (P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST))
(MCU_CKSC000_BASE_ADDRESS + (*LpPllCkscRegOffset));
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a*/
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers*/
/* in the code. */
/* Verification: However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
if (Lpval != ((uint32 *)MCU_CKSC000_ADDRESS))
{
LucCount = MCU_FIVE;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic.*/
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/*check for activation of clock domain in
CKCSTAT_mn register*/
while (((*(Lpval + MCU_LONG_WORD_ONE) & MCU_LONG_WORD_ONE)
!= MCU_LONG_WORD_ONE) && (LucCount > MCU_ZERO))
{
LucCount--;
}
/* Generate DEM error for Illegal clock ID*/
if (((*(Lpval + MCU_LONG_WORD_ONE) & MCU_LONG_WORD_ONE)
!= MCU_LONG_WORD_ONE) &&
((*(Lpval+MCU_LONG_WORD_ONE) & MCU_CKSC_MASK_VALUE)
!= (MCU_CKSC_8MHZ_INITIAL_VAL & MCU_CKSC_MASK_VALUE)))
{
Dem_ReportErrorStatus(MCU_E_CLOCK_FAILURE,
DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
}
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation*/
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/*Increment pointer to CKSC registers offset */
LpPllCkscRegOffset++;
/* Decrement number of CKSC registers */
LucNoOfPllCkscReg--;
}
/* Increment the LpPllCkscRegOffset beyond Iso1 registers */
LpPllCkscRegOffset = (LpPllCkscRegOffset +
(Mcu_GpClockSetting->ucNoOfPllIso1CkscReg));
/* Get the number of PLL CKSC registers configured for AWO */
LucNoOfPllCkscReg = Mcu_GpClockSetting->ucNoOfPllAwoCkscReg;
while ((LucNoOfPllCkscReg > MCU_ZERO) && (LblDemReported == MCU_FALSE))
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer to a volatile object and an integral*/
/* type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the configured Iso0 domain pll
CKSC register address */
Lpval = (P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST))
(MCU_CKSC000_BASE_ADDRESS + (*LpPllCkscRegOffset));
LucCount = MCU_FIVE;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/*check for activation of clock domain in CKCSTAT_mn register*/
if (Lpval != (MCU_CKSC_AW06_ADDRESS))
{
while (((*(Lpval + MCU_LONG_WORD_ONE) & MCU_LONG_WORD_ONE)
!= MCU_LONG_WORD_ONE) && (LucCount > MCU_ZERO))
{
LucCount--;
}
/* Generate DEM error for Illegal clock ID*/
if (((*(Lpval + MCU_LONG_WORD_ONE) & MCU_LONG_WORD_ONE)
!= MCU_LONG_WORD_ONE) &&
((*(Lpval + MCU_LONG_WORD_ONE) & MCU_CKSC_MASK_VALUE)
!= (MCU_CKSC_8MHZ_INITIAL_VAL & MCU_CKSC_MASK_VALUE)))
{
Dem_ReportErrorStatus(MCU_E_CLOCK_FAILURE,
DEM_EVENT_STATUS_FAILED);
LblDemReported = MCU_TRUE;
}
}
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment pointer to CKSC registers offset */
LpPllCkscRegOffset++;
/* Decrement number of CKSC registers */
LucNoOfPllCkscReg--;
}
}
#define MCU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Mcu_CpuClockPrepare
**
** Service ID : None
**
** Description : This service prepares the CPU clock for DEEPSTOP and
** STOP mode.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : none
**
** Return parameter : void
**
** Preconditions : None
**
** Remarks : Global Variable:
** none
**
** Function Invoked : Dem_ReportErrorStatus
**
** Registers Used : PROTCMD0, PROTS0, CKSC
**
*******************************************************************************/
#define MCU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
STATIC FUNC(Std_ReturnType, MCU_PRIVATE_CODE)Mcu_CpuClockPrepare(void)
{
P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST) LpCkscVal;
boolean LblDemReported;
Std_ReturnType LenReturnValue;
uint8 LucCount;
LblDemReported = MCU_FALSE;
/* Initialize return value with E_OK */
LenReturnValue = E_OK;
/* Set the CPU clock to default setting */
/* Get the base address of CKSC_000 clock Domain */
LpCkscVal = (P2VAR(volatile uint32, AUTOMATIC,
MCU_CONFIG_CONST))(MCU_CKSC000_ADDRESS);
Mcu_Gblckscstatus = *(LpCkscVal);
LucCount = MCU_FIVE;
do
{
MCU_PROTCMD0 = MCU_WRITE_DATA;
/*MISRA Rule :11.3 */
/*Message :A cast should not be performed between a */
/* pointer type and an integral type. */
/*Reason :This is to access the hardware registers */
/* in the code. */
/*Verification:However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Switch the CKSC_000 clock from PLL0 to
* High speed Internal Oscillator */
*LpCkscVal = MCU_CKSC000_INITIAL_VAL;
*LpCkscVal = ~MCU_CKSC000_INITIAL_VAL;
*LpCkscVal = MCU_CKSC000_INITIAL_VAL;
LucCount--;
}while ((LucCount > MCU_ZERO) &&
(MCU_PROTS0 == MCU_ONE));
if (MCU_PROTS0 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
/* Set the error status value to MCU_TRUE */
LblDemReported = MCU_TRUE;
}
LucCount = MCU_FIVE;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* check for activation of clock domain in CKCSTAT_mn
* register */
while (((*(LpCkscVal + MCU_LONG_WORD_ONE) &
MCU_LONG_WORD_ONE) != MCU_LONG_WORD_ONE)
&& (LucCount > MCU_ZERO))
{
LucCount--;
}
/* Generate DEM error for Illegal clock ID*/
if ((*(LpCkscVal + MCU_LONG_WORD_ONE) & MCU_CKSC_MASK_VALUE)
!= (*LpCkscVal & MCU_CKSC_MASK_VALUE))
{
Dem_ReportErrorStatus(MCU_E_CLOCK_FAILURE,
DEM_EVENT_STATUS_FAILED);
/* Set the error status value to MCU_TRUE */
LblDemReported = MCU_TRUE;
}
if (LblDemReported == MCU_TRUE)
{
LenReturnValue = E_NOT_OK;
}
return (LenReturnValue);
}
#define MCU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/******************************************************************************
** Function Name : Mcu_MaskClear_WakeUpFactor
**
** Service ID : 0x0A
**
** Description : This service Clears and Masks the wakeup registers
**
** Sync/Async : Synchronous
**
** Reentrancy : Non Reentrant
**
** Input Parameters : McuMode - Id for power mode setting
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : MCU Driver component must be initialized
**
** Remarks : Global Variable:
** Mcu_GblDriverStatus, Mcu_GpConfigPtr
**
** Function Invoked : Det_ReportError
**
** Registers Used : WUFMSKL0, WUFMSKM0, WUFMSKH0, WUFMSKL1, WUFMSKM1
** WUFMSKH1, WUFCL0, WUFL0, WUFCM0, WUFM0, WUFCH0, WUFH0
** WUFCL1, WUFL1, WUFCM1, WUFM1, WUFCH1, WUFH1
**
******************************************************************************/
#define MCU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, MCU_PUBLIC_CODE) Mcu_MaskClear_WakeUpFactor (Mcu_ModeType McuMode)
{
P2CONST(Tdd_Mcu_ModeSetting, MCU_CONST, MCU_CONFIG_CONST) LpModeSetting;
#if (MCU_DEV_ERROR_DETECT == STD_ON)
Mcu_ModeType LucMode;
Std_ReturnType LenDetErrFlag;
#endif
#if (MCU_DEV_ERROR_DETECT == STD_ON)
/* Initialize error status value with MCU_FALSE */
LenDetErrFlag = E_NOT_OK;
/* Report to DET, if the component is not initialized */
if (Mcu_GblDriverStatus == MCU_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, \
MCU_MASKCLEAR_WAKEUPFACTOR_SID, MCU_E_UNINIT);
LenDetErrFlag = E_OK;
}
else
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpModeSetting = \
((P2CONST(Tdd_Mcu_ModeSetting, MCU_CONST, MCU_CONFIG_CONST)) \
(Mcu_GpConfigPtr->pModeSetting) + (McuMode));
LucMode = LpModeSetting->ucModeType;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
if (LucMode != MCU_DEEPSTOP_MODE)
{
/* Report to DET */
Det_ReportError(MCU_MODULE_ID, MCU_INSTANCE_ID, \
MCU_MASKCLEAR_WAKEUPFACTOR_SID, MCU_E_PARAM_MODE);
LenDetErrFlag = E_OK;
}
}
/* Check if any development error occurred */
if (LenDetErrFlag == E_NOT_OK)
#endif /* MCU_DEV_ERROR_DETECT == STD_ON */
{
#if (MCU_DEV_ERROR_DETECT == STD_OFF)
LpModeSetting = ((P2CONST(Tdd_Mcu_ModeSetting, MCU_CONST, MCU_CONFIG_CONST))
(Mcu_GpConfigPtr->pModeSetting) + McuMode);
#endif
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Load wake-up factor register value */
MCU_WUFMSKL0 = LpModeSetting->ulPowerDownWakeupTypeL0;
MCU_WUFMSKM0 = LpModeSetting->ulPowerDownWakeupTypeM0;
MCU_WUFMSKH0 = LpModeSetting->ulPowerDownWakeupTypeH0;
MCU_WUFMSKL1 = LpModeSetting->ulPowerDownWakeupTypeL1;
MCU_WUFMSKM1 = LpModeSetting->ulPowerDownWakeupTypeM1;
MCU_WUFMSKH1 = LpModeSetting->ulPowerDownWakeupTypeH1;
/* Clear wakeup factor registers */
MCU_WUFCL0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL0);
MCU_WUFCM0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM0);
MCU_WUFCH0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH0);
MCU_WUFCL1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL1);
MCU_WUFCM1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM1);
MCU_WUFCH1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH1);
}
}
#define MCU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/******************************************************************************
** Function Name : Mcu_RestartClocks
**
** Service ID : None
**
** Description : This service restarts the clocks for wakeup processing
** of Deepstop mode .
**
** Sync/Async : Synchronous
**
** Reentrancy : Non Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : none
**
** Return parameter : void
**
** Preconditions : None
**
** Remarks : Global Variable:
** none
**
** Function Invoked : Dem_ReportErrorStatus
**
** Registers Used : MOSCST, MOSCE, MOSCS, ROSCE, PLLS0, PLLE0, PLLS1, PLLE1,
** SOSCE, SOSCS, PLLS2, PROTCMD2, PLLE2, PROTS2
**
******************************************************************************/
#define MCU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
STATIC FUNC(Std_ReturnType, MCU_PRIVATE_CODE)Mcu_RestartClocks(void)
{
Std_ReturnType LenReturnValue;
#if (MCU_MAINOSC_ENABLE == STD_ON)
uint32 LulMainClockStabCount;
#endif /* (MCU_MAINOSC_ENABLE == STD_ON) */
#if (MCU_SUBOSC_ENABLE == STD_ON)
uint32 LulSubClockStabCount;
#endif /* (MCU_SUBOSC_ENABLE == STD_ON) */
uint8 LucCount;
LenReturnValue = E_OK;
LucCount = MCU_FIVE;
#if (MCU_MAINOSC_ENABLE == STD_ON)
/* MISRA Rule :11.3 */
/* Message :A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason :This is to access the hardware registers */
/* in the code. */
/* Verification:However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check if main oscilltor is stopped before entering Deepstop */
if ((MCU_MOSCE & MCU_MAIN_OSC_MASKED) != MCU_MAIN_OSC_MASKED)
{
/* Set Main Oscillator stabilization time */
MCU_MOSCST = MCU_MAINOSC_STAB;
/* Enable the Main Oscillator */
do
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Writing to write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
MCU_MOSCE = MCU_LONG_WORD_ONE;
MCU_MOSCE = ~MCU_LONG_WORD_ONE;
MCU_MOSCE = MCU_LONG_WORD_ONE;
LucCount--;
} while((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
/* Load the stabilization count value */
LulMainClockStabCount = MCU_CKSC_STAB_COUNT;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
while (((MCU_MOSCS & MCU_LONG_WORD_ONE) == MCU_LONG_WORD_ZERO) &&
(LulMainClockStabCount > MCU_ZERO))
{
LulMainClockStabCount--;
}
if ((MCU_MOSCS & MCU_LONG_WORD_SEVEN) != MCU_LONG_WORD_SEVEN)
{
/* MainOsc failed and report production error */
Dem_ReportErrorStatus(MCU_E_CLOCK_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
}
#endif /* (MCU_MAINOSC_ENABLE == STD_ON) */
#if (MCU_HIGHSPEED_RINGOSC_ENABLE == STD_ON)
/* MISRA Rule :11.3 */
/* Message :A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason :This is to access the hardware registers */
/* in the code. */
/* Verification:However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check if Internal Ring oscilltor is stopped before entering Deepstop */
if (((MCU_ROSCE & MCU_RING_OSC_MASKED) != MCU_RING_OSC_MASKED) && \
(LenReturnValue == E_OK))
{
LucCount = MCU_FIVE;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Enable the High speed Internal Ring Oscillator */
do
{
/* writing to write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
MCU_ROSCE = MCU_LONG_WORD_ONE;
MCU_ROSCE = ~MCU_LONG_WORD_ONE;
MCU_ROSCE = MCU_LONG_WORD_ONE;
LucCount--;
}while((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
}
#endif /* (MCU_HIGHSPEED_RINGOSC_ENABLE == STD_ON) */
#if (MCU_SUBOSC_ENABLE == STD_ON)
/* MISRA Rule :11.3 */
/* Message :A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason :This is to access the hardware registers */
/* in the code. */
/* Verification:However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check if Sub oscilltor is stopped before entering Deepstop */
if (((MCU_SOSCE & MCU_SUB_OSC_MASKED ) != MCU_SUB_OSC_MASKED ) && \
(LenReturnValue == E_OK))
{
LucCount = MCU_FIVE;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Enable the Sub Oscillator */
do
{
/* writing to write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
MCU_SOSCE = MCU_LONG_WORD_ONE;
MCU_SOSCE = ~MCU_LONG_WORD_ONE;
MCU_SOSCE = MCU_LONG_WORD_ONE;
LucCount--;
}while ((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/*
* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
else
{
/* No action required */
}
/* Load the High Ring stabilization count value */
LulSubClockStabCount = MCU_HIGH_RING_STAB_CNT;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
while (((MCU_SOSCS & MCU_LONG_WORD_SEVEN) != MCU_LONG_WORD_SEVEN) && \
(LulSubClockStabCount > MCU_ZERO))
{
LulSubClockStabCount--;
}
if ((MCU_SOSCS & MCU_LONG_WORD_SEVEN) != MCU_LONG_WORD_SEVEN)
{
/* SubOsc failed and report production error */
Dem_ReportErrorStatus(MCU_E_CLOCK_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
else
{
/* No action required */
}
}
#endif /* (MCU_SUBOSC_ENABLE == STD_ON) */
#if (MCU_PLL0_ENABLE == STD_ON)
LucCount = MCU_FIVE;
/* Check if PLL is inactive */
if (((MCU_PLLS0 & MCU_PLL0_ON) != MCU_PLL0_ON) && \
(LenReturnValue == E_OK))
{
/* Enable the PLL Clock */
do
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Writing to write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
MCU_PLLE0 = MCU_LONG_WORD_ONE;
MCU_PLLE0 = ~MCU_LONG_WORD_ONE;
MCU_PLLE0 = MCU_LONG_WORD_ONE;
LucCount--;
} while((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
}
#endif /* (MCU_PLL0_ENABLE == STD_ON) */
#if (MCU_PLL1_ENABLE == STD_ON)
LucCount = MCU_FIVE;
/* Check if PLL1 is inactive */
if (((MCU_PLLS1 & MCU_PLL1_ON) != MCU_PLL1_ON) && \
(LenReturnValue == E_OK))
{
/* Enable the PLL Clock */
do
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Writing to write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
MCU_PLLE1 = MCU_LONG_WORD_ONE;
MCU_PLLE1 = ~MCU_LONG_WORD_ONE;
MCU_PLLE1 = MCU_LONG_WORD_ONE;
LucCount--;
} while((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
}
#endif /* (MCU_PLL1_ENABLE == STD_ON) */
#if (MCU_PLL2_ENABLE == STD_ON)
LucCount = MCU_FIVE;
/* Check if PLL2 is inactive */
if (((MCU_PLLS2 & MCU_PLL2_ON) != MCU_PLL2_ON) && \
(LenReturnValue == E_OK))
{
/* Enable the PLL Clock */
do
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Writing to write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
MCU_PLLE2 = MCU_LONG_WORD_ONE;
MCU_PLLE2 = ~MCU_LONG_WORD_ONE;
MCU_PLLE2 = MCU_LONG_WORD_ONE;
LucCount--;
} while((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
}
#endif /* (MCU_PLL2_ENABLE == STD_ON) */
return (LenReturnValue);
}
#define MCU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/******************************************************************************
** Function Name : Mcu_Iso1SoftWakeUp
**
** Service ID : None
**
** Description : This service is to wake up of Iso1 by software.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : none
**
** Return parameter : Std_ReturnType
**
** Preconditions : None
**
** Remarks : Global Variable:
** none
**
** Function Invoked : Dem_ReportErrorStatus
**
** Register Used : PROTCMD2, PSC1, PROTS2, WUFCL0, WUFL0, WUFCM0, WUFM0,
** WUFCH0, WUFH0, WUFCL1, WUFL1, WUFCM1, WUFM1, WUFCH1,
** WUFH1
******************************************************************************/
#define MCU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
STATIC FUNC(Std_ReturnType, MCU_PRIVATE_CODE)Mcu_Iso1SoftWakeUp(void)
{
uint32 Luliohold;
Std_ReturnType LenReturnValue = E_OK;
uint8 LucCount = MCU_FIVE;
do
{
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
/* MISRA Rule :11.3 */
/* Message :A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason :This is to access the hardware registers */
/* in the code. */
/* Verification:However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* Make ISOWU bit of PSC1 register true */
MCU_PSC1 = MCU_PSC1_ISOWU_MSK;
MCU_PSC1 = ~MCU_PSC1_ISOWU_MSK;
MCU_PSC1 = MCU_PSC1_ISOWU_MSK;
LucCount--;
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
}while ((LucCount > MCU_ZERO) &&
(MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
/* Check if no Dem is reported and the function was invoked for early
* wake-up process
*/
if (LenReturnValue == E_OK)
{
/* Mask the IOHOLDCLR bit */
Luliohold = (MCU_PSC1 | MCU_IOHOLD_CLR);
LucCount = MCU_FIVE;
do
{
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
/* MISRA Rule :11.3 */
/* Message :A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason :This is to access the hardware registers */
/* in the code. */
/* Verification:However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Write the write enable register */
MCU_PROTCMD2 = MCU_WRITE_DATA;
/* Make IOHLDCLR bit of PSC1 register true */
MCU_PSC1 = Luliohold;
MCU_PSC1 = ~Luliohold;
MCU_PSC1 = Luliohold;
LucCount--;
#if (MCU_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Mcu(MCU_PWR_MODE_PSC_PROTECTION);
#endif
}while ((LucCount > MCU_ZERO) &&
(MCU_PROTS2 == MCU_ONE));
if (MCU_PROTS2 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
LenReturnValue = E_NOT_OK;
}
/* MISRA Rule :11.3 */
/* Message :A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason :This is to access the hardware registers */
/* in the code. */
/* Verification:However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Clear wakeup factor registers for Iso0 and Iso1 */
MCU_WUFCL0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL0);
MCU_WUFCM0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM0);
MCU_WUFCH0 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH0);
MCU_WUFCL1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFL1);
MCU_WUFCM1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFM1);
MCU_WUFCH1 = (MCU_WAKEUP_FACTOR_CLR & MCU_WUFH1);
}
return (LenReturnValue);
}
#define MCU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/******************************************************************************
** Function Name : Mcu_ConfigureAWO7
**
** Service ID : None
**
** Description : This service modifies the AWO_7 clock for STOP/DEEPSTOP.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : none
**
** Return parameter : void
**
** Preconditions : None
**
** Remarks : Global Variable:
** Mcu_GulCkscA07Val
**
** Function Invoked : Dem_ReportErrorStatus
**
** Registers Used : PROTCMD2, PROTS2, CKSC
**
******************************************************************************/
#define MCU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
STATIC FUNC(void, MCU_PRIVATE_CODE)Mcu_ConfigureAWO7(void)
{
/* CKSC register value to be written */
uint32 CkscRegVal;
/* Count for register access */
uint8 LucCount;
LucCount = MCU_FIVE;
/* Check current AWO7 settings */
if (MCU_CKSCAO7_SLOW_VAL != MCU_CKSCAO7_REGISTER)
{
/* Store the CKSCA07 register value for restoring after wakeup */
Mcu_GulCkscA07Val = MCU_CKSCAO7_REGISTER;
/* Prepare for stop: select slow clock and STPMK = 0 */
CkscRegVal = MCU_CKSCAO7_SLOW_VAL;
}
else /* Wakeup from stop: restore AWO7 clock */
{
/* Checking whether the stored clock is valid */
if ((MCU_LONG_WORD_TWO == (Mcu_GulCkscA07Val & MCU_LONG_WORD_TWO)) &&
((Mcu_GulCkscA07Val & MCU_CKSCAO7_MASK) != MCU_CKSCAO7_MASK))
{
/* Stored Clock is valid */
CkscRegVal = (Mcu_GulCkscA07Val & \
(MCU_CKSCAO7_MASK | MCU_LONG_WORD_ONE) );
}
else
{
/* Stored clock is invalid use default clock */
CkscRegVal = MCU_CKSCAO7_DEFAULT_VAL;
}
}
do
{
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between */
/* pointer type and an integral type. */
/* Reason : This is to access hardware registers */
/* in the code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
MCU_PROTCMD2 = MCU_WRITE_DATA;
MCU_CKSCAO7_REGISTER = CkscRegVal;
MCU_CKSCAO7_REGISTER = ~(CkscRegVal);
MCU_CKSCAO7_REGISTER = CkscRegVal;
LucCount--;
}while((LucCount > MCU_ZERO) && (MCU_PROTS2 == MCU_ONE));
if (MCU_ONE == MCU_PROTS2)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE, DEM_EVENT_STATUS_FAILED);
}
else
{
LucCount = MCU_FIVE;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* check for activation of clock domain
in CKCSTAT_mn register */
while (((MCU_CSCSTATAO7_REGISTER & MCU_LONG_WORD_ONE)
!= MCU_LONG_WORD_ONE) && (LucCount > MCU_ZERO))
{
LucCount--;
}
/* Generate DEM error for clock setting failure */
if (((MCU_CSCSTATAO7_REGISTER & MCU_LONG_WORD_ONE ) != MCU_LONG_WORD_ONE) &&
((MCU_CSCSTATAO7_REGISTER & MCU_CKSC_MASK_VALUE ) !=
(CkscRegVal & MCU_CKSC_MASK_VALUE )))
{
Dem_ReportErrorStatus(MCU_E_CLOCK_FAILURE,
DEM_EVENT_STATUS_FAILED);
}
}
}
#define MCU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/******************************************************************************
** Function Name : Mcu_CpuClockRestore
**
** Service ID : None
**
** Description : This service Restore the CPU clock for STOP Mode.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : none
**
** Return parameter : void
**
** Preconditions : None
**
** Remarks : Global Variable:
** Mcu_Gblckscstatus
**
** Function Invoked : Dem_ReportErrorStatus
**
** Registers Used : PROTCMD0, PROTS0.
**
******************************************************************************/
#define MCU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
STATIC FUNC(Std_ReturnType, MCU_PRIVATE_CODE)Mcu_CpuClockRestore(void)
{
P2VAR(volatile uint32, AUTOMATIC, MCU_CONFIG_CONST) LpCkscVal;
uint8 LucCount;
Std_ReturnType LenReturnValue;
boolean LblCkscEnable = MCU_FALSE;
LenReturnValue = E_OK;
/* Check the status of CPU clock its in range or not before restore Clock */
if ((Mcu_Gblckscstatus >= MCU_LONG_WORD_TEN)&& \
(Mcu_Gblckscstatus <= MCU_LONG_WORD_SEVENTYFOUR))
{
/* Check whether CPU clock selected is Main oscillator Clock */
if ((Mcu_Gblckscstatus == MCU_LONG_WORD_EIGHTEEN)&& \
((MCU_MOSCS & MCU_LONG_WORD_SEVEN) == MCU_LONG_WORD_SEVEN))
{
/* Set the flag to MCU_TRUE */
LblCkscEnable = MCU_TRUE;
}
else
{
/* Set the flag to MCU_FALSE */
LblCkscEnable = MCU_FALSE;
}
/* Check whether CPU clock selected is Pll0 Clock */
if(((Mcu_Gblckscstatus > MCU_LONG_WORD_EIGHTEEN) && \
(Mcu_Gblckscstatus < MCU_LONG_WORD_SEVENTYFOUR))&&
(MCU_PLLS0 & MCU_LONG_WORD_SEVEN) == MCU_LONG_WORD_SEVEN)
{
/* Set the flag to MCU_TRUE */
LblCkscEnable = MCU_TRUE;
}
else
{
/* Set the flag to MCU_FALSE */
LblCkscEnable = MCU_FALSE;
}
/* Check whether CPU clock selected is High speed internal Clock */
if (((Mcu_Gblckscstatus >= MCU_LONG_WORD_TEN)&& \
(Mcu_Gblckscstatus <= MCU_LONG_WORD_TWENTYTWO))&&
((MCU_ROSCS & MCU_LONG_WORD_SEVEN) == MCU_LONG_WORD_SEVEN))
{
/* Set the flag to MCU_TRUE */
LblCkscEnable = MCU_TRUE;
}
else
{
/* Set the flag to MCU_FALSE */
LblCkscEnable = MCU_FALSE;
}
if (LblCkscEnable == MCU_TRUE)
{
/* Set the CPU clock to configured setting */
/* Get the base address of CKSC_000 clock Domain */
LpCkscVal = (P2VAR(volatile uint32, AUTOMATIC,
MCU_CONFIG_CONST))(MCU_CKSC000_ADDRESS);
LucCount = MCU_FIVE;
do
{
MCU_PROTCMD0 = MCU_WRITE_DATA;
/*MISRA Rule :11.3 */
/*Message :A cast should not be performed between a*/
/* pointer type and an integral type. */
/*Reason :This is to access the hardware registers*/
/* in the code. */
/*Verification:However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Switch the CKSC_000 clock from PLL0 to
* High speed Internal Oscillator */
*LpCkscVal = Mcu_Gblckscstatus;
*LpCkscVal = ~Mcu_Gblckscstatus;
*LpCkscVal = Mcu_Gblckscstatus;
LucCount--;
}while ((LucCount > MCU_ZERO) &&
(MCU_PROTS0 == MCU_ONE));
if (MCU_PROTS0 == MCU_ONE)
{
/* writing to write-protected register failed and
* report production error
*/
Dem_ReportErrorStatus(MCU_E_WRITE_FAILURE,
DEM_EVENT_STATUS_FAILED);
/* Set the error status value to E_NOT_OK */
LenReturnValue = E_NOT_OK;
}
}
else
{
/* Set the error status value to E_NOT_OK */
LenReturnValue = E_NOT_OK;
}
}
return (LenReturnValue);
}
#define MCU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Adc/Adc_Cfg.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* File name = Adc_Cfg.h */
/* Version = 3.1.2 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains pre-compile time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.1.7
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_ADC_V308_140113_HEADLAMP.arxml
* FK4_4010_MCU_V308_140113_HEADLAMP.arxml
* GENERATED ON: 14 Jan 2014 - 09:27:57
*/
#ifndef ADC_CFG_H
#define ADC_CFG_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define ADC_CFG_AR_MAJOR_VERSION 3
#define ADC_CFG_AR_MINOR_VERSION 0
#define ADC_CFG_AR_PATCH_VERSION 1
/* File version information */
#define ADC_CFG_SW_MAJOR_VERSION 3
#define ADC_CFG_SW_MINOR_VERSION 1
/*******************************************************************************
** Common Published Information **
*******************************************************************************/
#define ADC_AR_MAJOR_VERSION_VALUE 3
#define ADC_AR_MINOR_VERSION_VALUE 0
#define ADC_AR_PATCH_VERSION_VALUE 1
#define ADC_SW_MAJOR_VERSION_VALUE 3
#define ADC_SW_MINOR_VERSION_VALUE 1
#define ADC_SW_PATCH_VERSION_VALUE 3
#define ADC_VENDOR_ID_VALUE 23
#define ADC_MODULE_ID_VALUE 123
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Instance ID of the ADC Driver */
#define ADC_INSTANCE_ID_VALUE 0
/* Enables/Disables Development error detection */
#define ADC_DEV_ERROR_DETECT STD_OFF
/* Enables/Disables GetVersionInfo API */
#define ADC_VERSION_INFO_API STD_OFF
/* Enables/Disables the inclusion of Adc_DeInit API */
#define ADC_DEINIT_API STD_OFF
/* Enables/Disables the inclusion of first come first serve
mechanism */
#define ADC_ENABLE_QUEUING STD_OFF
/* Enables/Disables Adc_StartGroupConversion and Adc_StopGroupConversion
functions */
#define ADC_ENABLE_START_STOP_GROUP_API STD_ON
/* Enables/Disables Adc_EnableHardwareTrigger and
Adc_DisableHardwareTrigger functions */
#define ADC_HW_TRIGGER_API STD_OFF
/* Enables/Disables Adc_ReadGroup function */
#define ADC_READ_GROUP_API STD_OFF
/* Enables/Disables Notification functions */
#define ADC_GRP_NOTIF_CAPABILITY STD_OFF
/* Enables/Disables priority mechanism functions */
#define ADC_PRIORITY_IMPLEMENTATION ADC_PRIORITY_NONE
/* Number of hardware units configured */
#define ADC_MAX_HW_UNITS 2
/* Enables/Disables DMA ISR for DMA channel 1 */
#define ADC_DMA_MODE_ENABLE STD_OFF
/* Enables/Disables the enter/exit critical section functionality */
#define ADC_CRITICAL_SECTION_PROTECTION STD_ON
/* Enables/Disables ISR for CG0 unit of HW 0 */
#define ADC0_CG0_ISR_API STD_ON
/* Enables/Disables ISR for CG1 unit of HW 0 */
#define ADC0_CG1_ISR_API STD_OFF
/* Enables/Disables ISR for CG2 unit of HW 0 */
#define ADC0_CG2_ISR_API STD_OFF
/* Enables/Disables ISR for CG0 unit of HW 1 */
#define ADC1_CG0_ISR_API STD_ON
/* Enables/Disables ISR for CG1 unit of HW 1 */
#define ADC1_CG1_ISR_API STD_OFF
/* Enables/Disables ISR for CG2 unit of HW 1 */
#define ADC1_CG2_ISR_API STD_OFF
/* Enables/Disables DMA ISR for DMA channel 0 */
#define ADC_DMA_ISR_CH0_API STD_OFF
/* Enables/Disables DMA ISR for DMA channel 1 */
#define ADC_DMA_ISR_CH1_API STD_OFF
/* Enables/Disables DMA ISR for DMA channel 2 */
#define ADC_DMA_ISR_CH2_API STD_OFF
/* Enables/Disables DMA ISR for DMA channel 3 */
#define ADC_DMA_ISR_CH3_API STD_OFF
/* Enables/Disables DMA ISR for DMA channel 4 */
#define ADC_DMA_ISR_CH4_API STD_OFF
/* Enables/Disables DMA ISR for DMA channel 5 */
#define ADC_DMA_ISR_CH5_API STD_OFF
/* Enables/Disables DMA ISR for DMA channel 6 */
#define ADC_DMA_ISR_CH6_API STD_OFF
/* Enables/Disables DMA ISR for DMA channel 7 */
#define ADC_DMA_ISR_CH7_API STD_OFF
/* Enables/Disables DMA ISR for DMA channel 8 */
#define ADC_DMA_ISR_CH8_API STD_OFF
/* Enables/Disables DMA ISR for DMA channel 9 */
#define ADC_DMA_ISR_CH9_API STD_OFF
/* Enables/Disables DMA ISR for DMA channel 10 */
#define ADC_DMA_ISR_CH10_API STD_OFF
/* Enables/Disables DMA ISR for DMA channel 11 */
#define ADC_DMA_ISR_CH11_API STD_OFF
/* Enables/Disables DMA ISR for DMA channel 12 */
#define ADC_DMA_ISR_CH12_API STD_OFF
/* Enables/Disables DMA ISR for DMA channel 13 */
#define ADC_DMA_ISR_CH13_API STD_OFF
/* Enables/Disables DMA ISR for DMA channel 14 */
#define ADC_DMA_ISR_CH14_API STD_OFF
/* Enables/Disables DMA ISR for DMA channel 15 */
#define ADC_DMA_ISR_CH15_API STD_OFF
/* Maximum number of Groups configured */
#define ADC_MAX_GROUPS 2
/* Enables/Disables the diagnostic channel functionality */
#define ADC_DIAG_CHANNEL_SUPPORTED STD_OFF
/* Enables/Disables the timer connection functionality */
#define ADC_TO_TIMER_CONNECT_SUPPORT STD_OFF
/* Number of CGm units enabled */
#define ADC_NUMBER_OF_CG_UNITS (uint8)1
/* Represents CPU core */
#define ADC_CPU_CORE ADC_E2M
/* ADC Channel Group Handles */
#define AdcGroup0 0x00
#define AdcGroup1 0x01
/* Configuration Set Handles */
#define AdcConfigSet0 &Adc_GstConfiguration[0]
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* ADC_CFG_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Fee/Fee.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Fee.c */
/* Version = 3.0.9a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains API function implementations of FEE Component */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 05-Nov-2009 : Initial version
* V3.0.1: 10-Nov-2009 : As per SCR 118, API Fee_Cancel is updated
* V3.0.2: 20-Nov-2009 : As per SCR 148, API Fee_MainFunction is updated
* V3.0.3: 09-Feb-2010 : As per SCR 184 and 188, following changes are made:
* 1. The APIs Fee_Init and Fee_MainFunction are
* updated for FEE_STARTUP_INTERNAL
* 2. The API Fee_EraseImmediateBlock is updated for the
* GucState and the end notification.
* 3. SchM_Enter and SchM_Exit are added for the APIs
* Fee_Read, Fee_Write and Fee_InvalidateBlock.
* 4. SchM_Enter and SchM_Exit are removed from
* Fee_GetStatus and Fee_MainFunction, during the Starup
* process.
* 5. In Fee_GetStatus API, the check for
* "driverStatus_str.operationStatus_enu ==
* EEL_OPERATION_BUSY" is replaced by
* "Fee_GstVar.GucState != FEE_IDLE"
* V3.0.4: 01-Mar-2010 : As per SCR 205, following changes are made:
* 1. MEMIF_JOB_OK is removed in
* Fee_MainFunction for the FEE_STARTUP condition.
* 2. Misra comments are added in Fee_Init API.
* V3.0.5: 05-Mar-2010 : As per SCR 218, in Fee_Init and Fee_MainFunction
* EEL_Handler is invoked before EEL_Execute.
* V3.0.6: 12-Mar-2010 : As per SCR 223, description of the APIs is updated.
* V3.0.7: 01-Apr-2010 : As per SCR 234, the APIs Fee_Read, Fee_Write
* Fee_InvalidateBlock and Fee_EraseImmediateBlock are
* updated for retrieving the index of configured
* FeeBlockNumber from array Fee_GstBlockConfiguration.
* V3.0.8: 24-Jun-2010 : As per SCR 287, following changes are made:
* 1. The APIs Fee_GetStatus, Fee_MainFunction are
* updated.
* 2. Comments for invalidate command is corrected.
* V3.0.9: 10-Jul-2010 : As per SCR 301, comment is updated for the Format
* command in the API Fee_MainFunction.
* V3.0.9a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Fee.h"
#include "Fee_Types.h"
#include "Fee_InternalFct.h"
#include "Fee_Ram.h"
#if (FEE_DEV_ERROR_DETECT == STD_ON)
#include "Det.h"
#endif
//#include "Dem.h"
#if(FEE_CRITICAL_SECTION_PROTECTION == STD_ON)
//#include "SchM_Fee.h"
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define FEE_C_AR_MAJOR_VERSION FEE_AR_MAJOR_VERSION_VALUE
#define FEE_C_AR_MINOR_VERSION FEE_AR_MINOR_VERSION_VALUE
#define FEE_C_AR_PATCH_VERSION FEE_AR_PATCH_VERSION_VALUE
/* File version information */
#define FEE_C_SW_MAJOR_VERSION 3
#define FEE_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (FEE_AR_MAJOR_VERSION != FEE_C_AR_MAJOR_VERSION)
#error "Fee.c : Mismatch in Specification Major Version"
#endif
#if (FEE_AR_MINOR_VERSION != FEE_C_AR_MINOR_VERSION)
#error "Fee.c : Mismatch in Specification Minor Version"
#endif
#if (FEE_AR_PATCH_VERSION != FEE_C_AR_PATCH_VERSION)
#error "Fee.c : Mismatch in Specification Patch Version"
#endif
#if (FEE_SW_MAJOR_VERSION != FEE_C_SW_MAJOR_VERSION)
#error "Fee.c : Mismatch in Major Version"
#endif
#if (FEE_SW_MINOR_VERSION != FEE_C_SW_MINOR_VERSION)
#error "Fee.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Fee_Init
**
** Service ID : 0x00
**
** Description : This API performs the initialization of FEE software
** component.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Non Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Fee_GstVar, Fee_GblInitStatus
**
** Function(s) invoked:
** FAL_Init, EEL_Init, EEL_Startup, EEL_Handler,
** EEL_Execute, EEL_GetDriverStatus, Det_ReportError
** Dem_ReportErrorStatus
**
*******************************************************************************/
#define FEE_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, FEE_PUBLIC_CODE) Fee_Init(void)
{
volatile fal_status_t LenFalStatus;
volatile eel_status_t LenEelStatus;
#if (FEE_STARTUP_INTERNAL == STD_ON)
eel_driver_status_t driverStatus_str;
#endif
boolean LblInitFail;
/* Update the default value of flag as initialization pass */
LblInitFail = FEE_FALSE;
#if (FEE_DEV_ERROR_DETECT == STD_ON)
/* Check if the FEE Component is already initialized */
if(Fee_GblInitStatus == FEE_INITIALIZED)
{
/* Report Error to DET */
Det_ReportError(FEE_MODULE_ID, FEE_INSTANCE_ID, FEE_INIT_SID,
FEE_E_ALREADY_INITIALIZED);
}
else
#endif /* End of (FEE_DEV_ERROR_DETECT == STD_ON) */
{
/* Invoke the initialization function of FAL */
LenFalStatus = FAL_Init(&eelApp_falConfig_enu);
/* Check if LenFalStatus is FAL_OK */
if(LenFalStatus == FAL_OK)
{
/* Invoke the initialization function of EEL */
LenEelStatus = EEL_Init(&eelApp_eelConfig,EEL_OPERATION_MODE_NORMAL);
/* Check if LenEelStatus is EEL_OK */
if(LenEelStatus == EEL_OK)
{
/* Invoke the startup function of EEL */
LenEelStatus = EEL_Startup();
/* Check if LenEelStatus is EEL_OK */
if(LenEelStatus == EEL_OK)
{
#if (FEE_STARTUP_INTERNAL == STD_ON)
do
{
/* Invoke the Handler function */
EEL_Handler();
/* Invoke EEL_GetDriverStatus function to get driver status */
(void)EEL_GetDriverStatus(&driverStatus_str);
/* Check operation status is EEL_OPERATION_PASSIVE */
if(driverStatus_str.operationStatus_enu == EEL_OPERATION_PASSIVE)
{
/* Report failure of startup to DEM */
Dem_ReportErrorStatus((Dem_EventIdType)FEE_E_STARTUP_FAILED,
(Dem_EventStatusType)DEM_EVENT_STATUS_FAILED);
/* Update the flag for initialization fail */
LblInitFail = FEE_TRUE;
}
#if (FEE_AUTO_FORMAT_FLASH == STD_ON)
/* Check backround status is EEL_ERR_POOL_INCONSISTENT */
if(driverStatus_str.backgroundStatus_enu ==
EEL_ERR_POOL_INCONSISTENT)
{
/* If no active section is found, update the command to Format */
Fee_GstVar.GstRequest.command_enu = EEL_CMD_FORMAT;
/* Set job result to MEMIF_BLOCK_INCONSISTENT */
Fee_GstVar.GenJobResult = MEMIF_BLOCK_INCONSISTENT;
/* Update the flag for initialization fail */
LblInitFail = FEE_FALSE;
/*
* Invoke the Handler function to proceed EEL state for format
* acceptance
*/
EEL_Handler();
/*
* Invoke the API to perform the operation based on updated
* command
*/
EEL_Execute(&Fee_GstVar.GstRequest);
do
{
/* Invoke the Handler function */
EEL_Handler();
}while((Fee_GstVar.GstRequest.status_enu == EEL_BUSY));
/* Check request status is EEL_OK */
if(Fee_GstVar.GstRequest.status_enu == EEL_OK)
{
/* Invoke the initialization function of EEL */
LenEelStatus =
EEL_Init(&eelApp_eelConfig, EEL_OPERATION_MODE_NORMAL);
/* MISRA Rule : 1.1 */
/* Message : Nesting of control statements */
/* exceeds 15 */
/* Reason : It is used to achieve better */
/* throughput instead of invoking */
/* a function call. */
/* Verification : However, part of the code */
/* is verified with compiler and */
/* it is not having any impact. */
/* Check LenEelStatus is EEL_OK */
if(LenEelStatus == EEL_OK)
{
/* Invoke the startup function of EEL */
LenEelStatus = EEL_Startup();
/* Check LenEelStatus is EEL_OK */
if(LenEelStatus != EEL_OK)
{
/* Update the flag for initialization fail */
LblInitFail = FEE_TRUE;
}
}
/* MISRA Rule : 1.1 */
/* Message : Nesting of control statements */
/* exceeds 15 */
/* Reason : It is used to achieve better */
/* throughput instead of invoking */
/* a function call. */
/* Verification : However, part of the code */
/* is verified with compiler and */
/* it is not having any impact. */
else
{
/* Update the flag for initialization fail */
LblInitFail = FEE_TRUE;
}
}
else
{
/* Update the flag for initialization fail */
LblInitFail = FEE_TRUE;
/* Report failure of format job request to DEM */
Dem_ReportErrorStatus((Dem_EventIdType)FEE_FORMAT_FAILED,
(Dem_EventStatusType)DEM_EVENT_STATUS_FAILED);
}
} /* End of (driverStatus_str.backgroundStatus_enu ==
EEL_ERR_POOL_INCONSISTENT) */
#endif /* End of (FEE_AUTO_FORMAT_FLASH == STD_ON) */
}
#if (FEE_STARTUP_LIMITED_ACCESS == STD_OFF)
/* Wait until the system is completely up and running (or error) */
while((driverStatus_str.accessStatus_enu != EEL_ACCESS_UNLOCKED) &&
(LblInitFail == FEE_FALSE));
#else
/* Wait until early read/write is possible (or error) */
while((driverStatus_str.accessStatus_enu != EEL_ACCESS_READ_WRITE) &&
(LblInitFail == FEE_FALSE));
#endif /* End of else part of
* (FEE_STARTUP_LIMITED_ACCESS == STD_OFF)
*/
/* Is LblInitFail false, indicating initialization is successfull */
if (LblInitFail == FEE_FALSE)
{
/*
* Initialize the current state, job result and previous job
* request state
*/
Fee_GstVar.GucState = FEE_IDLE;
Fee_GstVar.GenJobResult = MEMIF_JOB_OK;
Fee_GstVar.GucPreviousJobState = FEE_JOB_COMPLETED;
#if (FEE_DEV_ERROR_DETECT == STD_ON)
Fee_GblInitStatus = FEE_INITIALIZED;
#endif
}
#else /* else part of (FEE_STARTUP_INTERNAL == STD_ON) */
/*
* Initialize the current state, job result and previous job
* request state
*/
Fee_GstVar.GucState = FEE_STARTUP;
Fee_GstVar.GenJobResult = MEMIF_JOB_OK;
Fee_GstVar.GucPreviousJobState = FEE_JOB_COMPLETED;
/*
* This is used to check the initialization of the component
* only if DET is enabled
*/
#if (FEE_DEV_ERROR_DETECT == STD_ON)
Fee_GblInitStatus = FEE_INITIALIZED;
#endif
#endif /* End of else part of (FEE_STARTUP_INTERNAL == STD_ON) */
}
else
{
/* Update the flag for initialization fail */
LblInitFail = FEE_TRUE;
}
}
else
{
/* Update the flag for initialization fail */
LblInitFail = FEE_TRUE;
}
}
else
{
/* Update the flag for initialization fail */
LblInitFail = FEE_TRUE;
}
/* Check LblInitFail for initialization fail */
if(LblInitFail == FEE_TRUE)
{
/*
* Initialize the current state, job result and previous job
* request state
*/
Fee_GstVar.GucState = FEE_UNINIT;
Fee_GstVar.GenJobResult = MEMIF_JOB_OK;
Fee_GstVar.GucPreviousJobState = FEE_JOB_COMPLETED;
}
}
}
#define FEE_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Fee_SetMode
**
** Service ID : 0x01
**
** Description : This API does not provide any functionality to the user
**
** Sync/Async : Synchronous
**
** Re-entrancy : Non Reentrant
**
** Input Parameters : Mode
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
**
** Function(s) invoked:
** None
**
*******************************************************************************/
#define FEE_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, FEE_PUBLIC_CODE) Fee_SetMode(MemIf_ModeType Mode)
{
/* This API does not provide any functionality to the user */
}
#define FEE_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Fee_Read
**
** Service ID : 0x02
**
** Description : Service for calling the read function of the
** underlying Flash Emulation Library
**
** Sync/Async : Asynchronous
**
** Re-entrancy : Non Reentrant
**
** Input Parameters : BlockNumber, BlockOffset, DataBufferPtr, Length
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : LenReqResult
**
** Preconditions : FEE software component should be initialized
**
** Remarks : Global Variable(s):
** Fee_GblInitStatus, Fee_GstBlockConfiguration,
** Fee_GstVar
**
** Function(s) invoked:
** Det_ReportError, Fee_BlockCfgLookUp, EEL_Execute
** SchM_Enter_Fee, SchM_Exit_Fee
**
*******************************************************************************/
#define FEE_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC (Std_ReturnType, FEE_PUBLIC_CODE) Fee_Read (uint16 BlockNumber,
uint16 BlockOffset, P2VAR(uint8, AUTOMATIC, FEE_APPL_DATA) DataBufferPtr,
uint16 Length)
{
P2VAR(eel_request_t, AUTOMATIC, FEE_PRIVATE_DATA)LpStRequest;
Std_ReturnType LenReqResult;
#if (FEE_DEV_ERROR_DETECT == STD_ON)
P2CONST(Tdd_Fee_BlockConfigType, AUTOMATIC, FEE_PRIVATE_CONST)LpBlockConfig;
uint16 LusBlockIdx;
#endif
LenReqResult = E_OK;
/* Report DET error if the module is uninitialized */
#if (FEE_DEV_ERROR_DETECT == STD_ON)
if(Fee_GblInitStatus != FEE_INITIALIZED)
{
/* Report Error to DET */
Det_ReportError(FEE_MODULE_ID, FEE_INSTANCE_ID, FEE_READ_SID,
FEE_E_UNINIT);
/* Set return value LenReqResult to E_NOT_OK */
LenReqResult = E_NOT_OK;
}
/*
* Retrieve the index of the parameter BlockNumber from the array
* "Fee_GstBlockConfiguration"
*/
LusBlockIdx = Fee_BlockCfgLookUp(BlockNumber);
/*
* Report invalid block number DET error if the block number is not configured
*/
if(LusBlockIdx == FEE_INVALID_BLOCK_IDX)
{
/* Report Error to DET */
Det_ReportError(FEE_MODULE_ID, FEE_INSTANCE_ID, FEE_READ_SID,
FEE_E_INVALID_BLOCK_NO);
/* Set return value LenReqResult to E_NOT_OK */
LenReqResult = E_NOT_OK;
}
else
{
/* Get the pointer to Block Configuration array */
LpBlockConfig = &Fee_GstBlockConfiguration[LusBlockIdx];
/*
* Report invalid block length DET error if the block length is
* not correct
*/
if((BlockOffset + Length) > LpBlockConfig->usFeeBlockSize)
{
/* Report Error to DET */
Det_ReportError(FEE_MODULE_ID, FEE_INSTANCE_ID, FEE_READ_SID,
FEE_E_INVALID_BLOCK_LEN);
/* Set return value LenReqResult to E_NOT_OK */
LenReqResult = E_NOT_OK;
}
}
/* Check return value LenReqResult is E_OK */
if(LenReqResult == E_OK)
#endif
{
#if (FEE_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Fee(FEE_STATUS_PROTECTION);
#endif
/* Check if no request is in progress */
if(Fee_GstVar.GucState == FEE_IDLE)
{
LpStRequest = &Fee_GstVar.GstRequest;
/* Setup the calling structure for invoking read function of EEL */
LpStRequest->address_pu08 = DataBufferPtr;
LpStRequest->identifier_u16 = BlockNumber;
LpStRequest->length_u16 = Length;
LpStRequest->offset_u16 = BlockOffset;
LpStRequest->command_enu = EEL_CMD_READ;
/* Invoke EEL_Execute function with request structure */
EEL_Execute(LpStRequest);
/* Check if the current request is accepted by EEL */
if(LpStRequest->status_enu == EEL_BUSY)
{
/* Set return value LenReqResult is E_OK */
LenReqResult = E_OK;
/* Update the result to job pending */
Fee_GstVar.GenJobResult = MEMIF_JOB_PENDING;
/* Set current state GucState is FEE_BUSY_FLASH_OPERATION */
Fee_GstVar.GucState = FEE_BUSY_FLASH_OPERATION;
}
else
{
/* Set return value LenReqResult is E_NOT_OK */
LenReqResult = E_NOT_OK;
}
}
/* Check if the current operation during cancel request is in progress */
else if(Fee_GstVar.GucState == FEE_JOB_CANCELLED)
{
/*
* Set the state to indicate that a read/write/invalidate request is
* accepted when the current operation is in progress while processing
* cancel request
*/
Fee_GstVar.GucPreviousJobState = FEE_JOB_INPROG;
/*
* Store the calling structure for processing request after
* cancel completion
*/
LpStRequest = &Fee_GstVar.GstNewReq;
LpStRequest->address_pu08 = DataBufferPtr;
LpStRequest->length_u16 = Length;
LpStRequest->offset_u16 = BlockOffset;
LpStRequest->command_enu = EEL_CMD_READ;
LpStRequest->identifier_u16 = BlockNumber;
/* Update the result to job pending */
Fee_GstVar.GenJobResult = MEMIF_JOB_PENDING;
}
else
{
/* Set return value LenReqResult is E_NOT_OK */
LenReqResult = E_NOT_OK;
}
#if (FEE_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Fee(FEE_STATUS_PROTECTION);
#endif
} /* End of else part of if (LenReqResult == E_OK) */
return(LenReqResult);
}
#define FEE_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Fee_Write
**
** Service ID : 0x03
**
** Description : Service for calling the write function of the underlying
** driver
**
** Sync/Async : Asynchronous
**
** Re-entrancy : Non Reentrant
**
** Input Parameters : BlockNumber, DataBufferPtr
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : LenReqResult
**
** Preconditions : FEE software component should be initialized
**
** Remarks : Global Variable(s):
** Fee_GblInitStatus, Fee_GstBlockConfiguration,
** Fee_GstVar
**
** Function(s) invoked:
** Det_ReportError, Fee_BlockCfgLookUp, EEL_Execute
** SchM_Enter_Fee, SchM_Exit_Fee
**
*******************************************************************************/
#define FEE_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC (Std_ReturnType, FEE_PUBLIC_CODE) Fee_Write(
uint16 BlockNumber, P2VAR(uint8, AUTOMATIC, FEE_APPL_DATA)DataBufferPtr)
{
P2CONST(Tdd_Fee_BlockConfigType, AUTOMATIC, FEE_PRIVATE_CONST)LpBlockConfig;
P2VAR(eel_request_t, AUTOMATIC, FEE_PRIVATE_DATA)LpStRequest;
uint16 LusBlockIdx;
Std_ReturnType LenReqResult;
boolean LblImmData;
LenReqResult = E_OK;
/*
* Retrieve the index of the parameter BlockNumber from the array
* "Fee_GstBlockConfiguration"
*/
LusBlockIdx = Fee_BlockCfgLookUp(BlockNumber);
/* Report DET error if the module is uninitialized */
#if (FEE_DEV_ERROR_DETECT == STD_ON)
if(Fee_GblInitStatus != FEE_INITIALIZED)
{
/* Report Error to DET */
Det_ReportError(FEE_MODULE_ID, FEE_INSTANCE_ID, FEE_WRITE_SID,
FEE_E_UNINIT);
/* Set return value LenReqResult to E_NOT_OK */
LenReqResult = E_NOT_OK;
}
/*
* Report invalid block number DET error if the block number is not configured
*/
if(LusBlockIdx == FEE_INVALID_BLOCK_IDX)
{
/* Report Error to DET */
Det_ReportError(FEE_MODULE_ID, FEE_INSTANCE_ID, FEE_WRITE_SID,
FEE_E_INVALID_BLOCK_NO);
/* Set return value LenReqResult to E_NOT_OK */
LenReqResult = E_NOT_OK;
}
/* Check return value LenReqResult is E_OK */
if(LenReqResult == E_OK)
#endif
{
/* Get the pointer to Block Configuration array */
LpBlockConfig = &Fee_GstBlockConfiguration[LusBlockIdx];
#if (FEE_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Fee(FEE_STATUS_PROTECTION);
#endif
/* Check if no request is in progress */
if(Fee_GstVar.GucState == FEE_IDLE)
{
LpStRequest = &Fee_GstVar.GstRequest;
/* Setup the calling structure for invoking write function of EEL */
LblImmData = LpBlockConfig->blFeeImmediateData;
LpStRequest->address_pu08 = DataBufferPtr;
LpStRequest->length_u16 = LpBlockConfig->usFeeBlockSize;
LpStRequest->identifier_u16 = BlockNumber;
LpStRequest->offset_u16 = FEE_ZERO;
/* Check immediate data is FEE_TRUE */
if(LblImmData == FEE_TRUE)
{
/* Setup the calling structure for invoking write function of EEL */
LpStRequest->command_enu = EEL_CMD_WRITE_IMM;
}
else
{
/* Setup the calling structure for invoking write function of EEL */
LpStRequest->command_enu = EEL_CMD_WRITE;
}
/* Invoke EEL_Execute function with request structure */
EEL_Execute(LpStRequest);
/* Check if the current request is accepted by EEL */
if (LpStRequest->status_enu == EEL_BUSY)
{
/* Set return value LenReqResult is E_OK */
LenReqResult = E_OK;
/* Update the result to job pending */
Fee_GstVar.GenJobResult = MEMIF_JOB_PENDING;
/* Set current state GucState is FEE_BUSY_FLASH_OPERATION */
Fee_GstVar.GucState = FEE_BUSY_FLASH_OPERATION;
}
else
{
/* Set return value LenReqResult is E_NOT_OK */
LenReqResult = E_NOT_OK;
}
}
/* Check if the current operation during cancel request is in progress */
else if(Fee_GstVar.GucState == FEE_JOB_CANCELLED)
{
/* Update the block type based on the configured block type */
LblImmData = LpBlockConfig->blFeeImmediateData;
/* Set new request to current request */
LpStRequest = &Fee_GstVar.GstNewReq;
/*
* Store the calling structure for processing request after
* cancel completion
*/
LpStRequest->address_pu08 = DataBufferPtr;
LpStRequest->length_u16 = LpBlockConfig->usFeeBlockSize;
LpStRequest->offset_u16 = FEE_ZERO;
LpStRequest->identifier_u16 = BlockNumber;
/* Check immediate data is FEE_TRUE */
if(LblImmData == FEE_TRUE)
{
/* Setup the calling structure for invoking write function of EEL */
LpStRequest->command_enu = EEL_CMD_WRITE_IMM;
}
else
{
/* Setup the calling structure for invoking write function of EEL */
LpStRequest->command_enu = EEL_CMD_WRITE;
}
/*
* Set the state to indicate that a read/write/invalidate request is
* accepted when the current operation is in progress while processing
* cancel request
*/
Fee_GstVar.GucPreviousJobState = FEE_JOB_INPROG;
/* Update the result to job pending */
Fee_GstVar.GenJobResult = MEMIF_JOB_PENDING;
}
else
{
/* Set return value LenReqResult is E_NOT_OK */
LenReqResult = E_NOT_OK;
}
#if (FEE_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Fee(FEE_STATUS_PROTECTION);
#endif
} /* End of else part of if (LenReqResult == E_OK) */
return(LenReqResult);
}
#define FEE_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Fee_Cancel
**
** Service ID : 0x04
**
** Description : Service for canceling the current request that is being
** processed.
**
** Sync/Async : Asynchronous
**
** Re-entrancy : Non Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : FEE software component should be initialized
**
** Remarks : Global Variable(s):
** Fee_GstVar, Fee_GblInitStatus
**
** Function(s) invoked:
** Det_ReportError, SchM_Enter_Fee, SchM_Exit_Fee
**
*******************************************************************************/
#define FEE_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, FEE_PUBLIC_CODE) Fee_Cancel(void)
{
/* Report DET error if the module is uninitialized */
#if (FEE_DEV_ERROR_DETECT == STD_ON)
if (Fee_GblInitStatus != FEE_INITIALIZED)
{
/* Report Error to DET */
Det_ReportError(FEE_MODULE_ID, FEE_INSTANCE_ID, FEE_CANCEL_SID,
FEE_E_UNINIT);
}
else
#endif
{
/* Check if any request is in progress */
if(Fee_GstVar.GucState != FEE_IDLE)
{
#if (FEE_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Fee(FEE_STATUS_PROTECTION);
#endif
/* Set the state to FEE_JOB_CANCELLED */
Fee_GstVar.GucState = FEE_JOB_CANCELLED;
#if (FEE_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Fee(FEE_STATUS_PROTECTION);
#endif
/* Set job result to MEMIF_JOB_CANCELLED */
Fee_GstVar.GenJobResult = MEMIF_JOB_CANCELLED;
}
}
}
#define FEE_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Fee_GetStatus
**
** Service ID : 0x05
**
** Description : Service for reading the status of FEE software component
** or EEL.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Non Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : LenStatus
**
** Preconditions : FEE software component should be initialized
**
** Remarks : Global Variable(s):
** Fee_GstVar, Fee_GblInitStatus
**
** Function(s) invoked:
** Det_ReportError, EEL_GetDriverStatus
**
******************************************************************************/
#define FEE_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(MemIf_StatusType, FEE_PUBLIC_CODE) Fee_GetStatus(void)
{
MemIf_StatusType LenStatus;
eel_driver_status_t driverStatus_str;
/* Initialize the status as busy internal */
LenStatus = MEMIF_BUSY_INTERNAL;
/* Report DET error if the module is uninitialized */
#if (FEE_DEV_ERROR_DETECT == STD_ON)
if (Fee_GblInitStatus != FEE_INITIALIZED)
{
/* Report Error to DET */
Det_ReportError(FEE_MODULE_ID, FEE_INSTANCE_ID, FEE_GETSTATUS_SID,
FEE_E_UNINIT);
/* Set status to MEMIF_UNINIT */
LenStatus = MEMIF_UNINIT;
}
else
#endif
{
/* Invoke EEL_GetDriverStatus function to get driver status */
(void)EEL_GetDriverStatus(&driverStatus_str);
/*
* To report idle status, check if the EEL Driver is idle
* (or passive after error) and Fee itself is idle
*/
if(((driverStatus_str.operationStatus_enu == EEL_OPERATION_IDLE) ||
(driverStatus_str.operationStatus_enu == EEL_OPERATION_PASSIVE)) &&
(Fee_GstVar.GucState == FEE_IDLE))
{
/* Set status to MEMIF_IDLE */
LenStatus = MEMIF_IDLE;
}
/* Check if Fee is busy */
else if(Fee_GstVar.GucState != FEE_IDLE)
{
/*
* Check the Fee state to report the status as Idle when the driver is
* busy due to ongoing request during cancel processing
*/
if(Fee_GstVar.GucState == FEE_JOB_CANCELLED)
{
/* Set status to MEMIF_IDLE */
LenStatus = MEMIF_IDLE;
}
else
{
/* Set status to MEMIF_BUSY */
LenStatus = MEMIF_BUSY;
}
}
else
{
/* To avoid MISRA warnings */
}
}
return(LenStatus);
}
#define FEE_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Fee_GetJobResult
**
** Service ID : 0x06
**
** Description : Service for reading the job result of current request
**
** Sync/Async : Synchronous
**
** Re-entrancy : Non Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : LenJobResult
**
** Preconditions : FEE software component should be initialized
**
** Remarks : Global Variable(s):
** Fee_GstVar, Fee_GblInitStatus
**
** Function(s) invoked:
** Det_ReportError
**
******************************************************************************/
#define FEE_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(MemIf_JobResultType, FEE_PUBLIC_CODE) Fee_GetJobResult(void)
{
MemIf_JobResultType LenJobResult;
/* Report DET error if the module is uninitialized */
#if (FEE_DEV_ERROR_DETECT == STD_ON)
if (Fee_GblInitStatus != FEE_INITIALIZED)
{
/* Report Error to DET */
Det_ReportError(FEE_MODULE_ID, FEE_INSTANCE_ID, FEE_GETJOBRESULT_SID,
FEE_E_UNINIT);
/* Set job result to MEMIF_JOB_FAILED */
LenJobResult = MEMIF_JOB_FAILED;
}
else
#endif
{
/* Return the current job result */
LenJobResult = Fee_GstVar.GenJobResult;
}
return(LenJobResult);
}
#define FEE_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Fee_InvalidateBlock
**
** Service ID : 0x07
**
** Description : Service for invalidating the configured block
**
** Sync/Async : Asynchronous
**
** Re-entrancy : Non Reentrant
**
** Input Parameters : BlockNumber
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : LenReqResult
**
** Preconditions : FEE software component should be initialized
**
** Remarks : Global Variable(s):
** Fee_GblInitStatus, Fee_GstVar, Fee_GstBlockConfiguration
**
** Function(s) invoked:
** Det_ReportError, Fee_BlockCfgLookUp, EEL_Execute,
** SchM_Enter_Fee, SchM_Exit_Fee
**
*******************************************************************************/
#define FEE_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(Std_ReturnType, FEE_PUBLIC_CODE) Fee_InvalidateBlock (uint16 BlockNumber)
{
P2CONST(Tdd_Fee_BlockConfigType, AUTOMATIC, FEE_PRIVATE_CONST)LpBlockConfig;
P2VAR(eel_request_t, AUTOMATIC, FEE_PRIVATE_DATA)LpStRequest;
Std_ReturnType LenReqResult;
uint16 LusBlockIdx;
boolean LblImmData;
LenReqResult = E_OK;
/*
* Retrieve the index of the parameter BlockNumber from the array
* "Fee_GstBlockConfiguration"
*/
LusBlockIdx = Fee_BlockCfgLookUp(BlockNumber);
/* Report DET error if the module is uninitialized */
#if (FEE_DEV_ERROR_DETECT == STD_ON)
if(Fee_GblInitStatus != FEE_INITIALIZED)
{
/* Report Error to DET */
Det_ReportError(FEE_MODULE_ID, FEE_INSTANCE_ID, FEE_INVALIDATEBLOCK_SID,
FEE_E_UNINIT);
/* Set return value LenReqResult to E_NOT_OK */
LenReqResult = E_NOT_OK;
}
/*
* Report invalid block number DET error if the block number is not configured
*/
if(LusBlockIdx == FEE_INVALID_BLOCK_IDX)
{
/* Report Error to DET */
Det_ReportError(FEE_MODULE_ID, FEE_INSTANCE_ID, FEE_INVALIDATEBLOCK_SID,
FEE_E_INVALID_BLOCK_NO);
/* Set return value LenReqResult to E_NOT_OK */
LenReqResult = E_NOT_OK;
}
/* Check return value LenReqResult is E_OK */
if(LenReqResult == E_OK)
#endif
{
/* Get the pointer to Block Configuration array */
LpBlockConfig = &Fee_GstBlockConfiguration[LusBlockIdx];
#if (FEE_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Fee(FEE_STATUS_PROTECTION);
#endif
/* Check if no request is in progress */
if(Fee_GstVar.GucState == FEE_IDLE)
{
/* Update the block type based on the configured block type */
LblImmData = LpBlockConfig->blFeeImmediateData;
LpStRequest = &Fee_GstVar.GstRequest;
/* Setup calling structure for invoking invalidate function of EEL */
LpStRequest->identifier_u16 = BlockNumber;
/* Check immediate data is FEE_TRUE */
if(LblImmData == FEE_TRUE)
{
/* Setup calling structure for invoking invalidate function of EEL */
LpStRequest->command_enu = EEL_CMD_INVALIDATE_IMM;
}
else
{
/* Setup calling structure for invoking invalidate function of EEL */
LpStRequest->command_enu = EEL_CMD_INVALIDATE;
}
/* Invoke EEL_Execute function with request structure */
EEL_Execute(LpStRequest);
/* Check if the current request is accepted by EEL */
if (LpStRequest->status_enu == EEL_BUSY)
{
/* Update return value LenReqResult to E_OK */
LenReqResult = E_OK;
/* Update the result to job pending */
Fee_GstVar.GenJobResult = MEMIF_JOB_PENDING;
/* Set current state GucState is FEE_BUSY_FLASH_OPERATION */
Fee_GstVar.GucState = FEE_BUSY_FLASH_OPERATION;
}
else
{
/* Set return value LenReqResult is E_NOT_OK */
LenReqResult = E_NOT_OK;
}
}
/* Check if the current operation during cancel request is in progress */
else if(Fee_GstVar.GucState == FEE_JOB_CANCELLED)
{
/* Update the block type based on the configured block type */
LblImmData = LpBlockConfig->blFeeImmediateData;
/* Set the new request to current request */
LpStRequest = &Fee_GstVar.GstNewReq;
/*
* Store the calling structure for processing request after
* cancel completion
*/
LpStRequest->identifier_u16 = BlockNumber;
/* Check immediate data is FEE_TRUE */
if(LblImmData == FEE_TRUE)
{
/*
* Setup the calling structure for invoking invalidate function
* of EEL
*/
LpStRequest->command_enu = EEL_CMD_INVALIDATE_IMM;
}
else
{
/*
* Setup the calling structure for invoking invalidate function
* of EEL
*/
LpStRequest->command_enu = EEL_CMD_INVALIDATE;
}
/*
* Set the state to indicate that a read/write/invalidate request is
* accepted when the current operation is in progress while processing
* cancel request
*/
Fee_GstVar.GucPreviousJobState = FEE_JOB_INPROG;
/* Update job result to MEMIF_JOB_PENDING */
Fee_GstVar.GenJobResult = MEMIF_JOB_PENDING;
}
else
{
/* Set return value LenReqResult is E_NOT_OK */
LenReqResult = E_NOT_OK;
}
#if (FEE_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Fee(FEE_STATUS_PROTECTION);
#endif
}
return(LenReqResult);
}
#define FEE_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Fee_GetVersionInfo
**
** Service ID : 0x08
**
** Description : This API reads the version information of FEE software
** component.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Non Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : VersionInfoPtr
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
**
** Function(s) invoked:
** Det_ReportError
**
*******************************************************************************/
#if (FEE_VERSION_INFO_API == STD_ON)
#define FEE_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, FEE_PUBLIC_CODE)Fee_GetVersionInfo
(P2VAR(Std_VersionInfoType, AUTOMATIC, FEE_APPL_DATA)VersionInfoPtr)
{
#if (FEE_DEV_ERROR_DETECT == STD_ON)
/* Check if parameter passed is equal to Null pointer */
if(VersionInfoPtr == NULL_PTR)
{
/* Report error to DET */
Det_ReportError(FEE_MODULE_ID, FEE_INSTANCE_ID, FEE_GET_VERSION_INFO_SID,
FEE_E_PARAM_POINTER);
}
else
#endif /* (FEE_DEV_ERROR_DETECT == STD_ON) */
{
/* Copy the vendor Id */
VersionInfoPtr->vendorID = FEE_VENDOR_ID;
/* Copy the module Id */
VersionInfoPtr->moduleID = FEE_MODULE_ID;
/* Copy the instance Id */
VersionInfoPtr->instanceID = FEE_INSTANCE_ID;
/* Copy Software Major Version */
VersionInfoPtr->sw_major_version = FEE_SW_MAJOR_VERSION;
/* Copy Software Minor Version */
VersionInfoPtr->sw_minor_version = FEE_SW_MINOR_VERSION;
/* Copy Software Patch Version */
VersionInfoPtr->sw_patch_version = FEE_SW_PATCH_VERSION;
}
}
#define FEE_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* (FEE_VERSION_INFO_API == STD_ON) */
/*******************************************************************************
** Function Name : Fee_EraseImmediateBlock
**
** Service ID : 0x09
**
** Description : Service for erasing block. This API will not provide any
** functionality to the user. It returns E_OK and updates
** the job result as MEMIF_JOB_OK asynchronously
**
** Sync/Async : Asynchronous
**
** Re-entrancy : Non Reentrant
**
** Input Parameters : BlockNumber
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : LenReqResult
**
** Preconditions : FEE software component should be initialized
**
** Remarks : Global Variable(s):
** Fee_GblInitStatus, Fee_GstVar
**
** Function(s) invoked:
** Det_ReportError, Fee_BlockCfgLookUp,
** pFee_JobEndNotification
**
*******************************************************************************/
#define FEE_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(Std_ReturnType, FEE_PUBLIC_CODE) Fee_EraseImmediateBlock
(uint16 BlockNumber)
{
Std_ReturnType LenReqResult;
#if (FEE_DEV_ERROR_DETECT == STD_ON)
uint16 LusBlockIdx;
#endif
/* Checks if callback is configured and invokes the callback function */
#if (FEE_UPPER_LAYER_NOTIFICATION == STD_ON)
/* Pointer to function pointer structure */
P2CONST(Tdd_Fee_FuncType, AUTOMATIC, FEE_PRIVATE_CONST) LpFuncNotification;
/* Initialize the notification function pointer */
LpFuncNotification = &Fee_GstFunctionNotification;
#endif
LenReqResult = E_OK;
/* Report DET error if the module is uninitialized */
#if (FEE_DEV_ERROR_DETECT == STD_ON)
if (Fee_GblInitStatus != FEE_INITIALIZED)
{
/* Report error to DET */
Det_ReportError(FEE_MODULE_ID, FEE_INSTANCE_ID, FEE_ERASEIMMEDIATEBLOCK_SID,
FEE_E_UNINIT);
/* Set return value LenReqResult to E_NOT_OK */
LenReqResult = E_NOT_OK;
}
/*
* Retrieve the index of the parameter BlockNumber from the array
* "Fee_GstBlockConfiguration"
*/
LusBlockIdx = Fee_BlockCfgLookUp(BlockNumber);
/*
* Report invalid block number DET error if the block number is not configured
*/
if(LusBlockIdx == FEE_INVALID_BLOCK_IDX)
{
/* Report error to DET */
Det_ReportError(FEE_MODULE_ID, FEE_INSTANCE_ID, FEE_ERASEIMMEDIATEBLOCK_SID,
FEE_E_INVALID_BLOCK_NO);
/* Set return value LenReqResult to E_NOT_OK */
LenReqResult = E_NOT_OK;
}
/* Check LenReqResult is E_OK */
if(LenReqResult == E_OK)
#endif
{
if((Fee_GstVar.GucState != FEE_IDLE) &&
(Fee_GstVar.GucState != FEE_JOB_CANCELLED))
{
/* Set return value LenReqResult to E_NOT_OK */
LenReqResult = E_NOT_OK;
}
#if (FEE_UPPER_LAYER_NOTIFICATION == STD_ON)
/* Check current state is FEE_IDLE or FEE_JOB_CANCELLED */
else
{
/*
* Notify the upper layer for completion of Erase request if Notification
* for the upper layer is configured. Erase request is accepted only
* when no request is in progress
*/
/* Invoke the successful callback notification */
LpFuncNotification->pFee_JobEndNotification();
}
#endif
}
return(LenReqResult);
}
#define FEE_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Fee_MainFunction
**
** Service ID : 0x12
**
** Description : This scheduler function will asynchronously handle the
** requested jobs and the internal management operations
**
** Sync/Async : NA
**
** Re-entrancy : NA
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Fee_GstVar
**
** Function(s) invoked:
** EEL_Init, EEL_Startup, EEL_Handler, EEL_Execute,
** Fee_EndProcessBlock, EEL_GetDriverStatus,
** SchM_Enter_Fee, SchM_Exit_Fee, Dem_ReportErrorStatus
**
*******************************************************************************/
#define FEE_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, FEE_PUBLIC_CODE) Fee_MainFunction(void)
{
boolean LblEndProcess;
eel_status_t LenStatus;
#if(FEE_STARTUP_INTERNAL == STD_OFF)
eel_status_t LenEelStatus;
eel_driver_status_t driverStatus_str;
#endif
/* Set end process flag to FEE_FALSE */
LblEndProcess = FEE_FALSE;
/* Invoke the Handler function */
EEL_Handler();
#if(FEE_STARTUP_INTERNAL == STD_OFF)
/* Check current state is FEE_STARTUP */
if(Fee_GstVar.GucState == FEE_STARTUP)
{
/* Invoke EEL_GetDriverStatus function to get driver status */
(void)EEL_GetDriverStatus(&driverStatus_str);
#if (FEE_STARTUP_LIMITED_ACCESS == STD_OFF)
/* Wait until the system is completely up and running (or error) */
if(driverStatus_str.accessStatus_enu == EEL_ACCESS_UNLOCKED)
{
/* Set current state to FEE_IDLE */
Fee_GstVar.GucState = FEE_IDLE;
}
#else /* else part of (FEE_STARTUP_LIMITED_ACCESS == STD_OFF) */
/* Wait until early read/write is possible (or error) */
if(driverStatus_str.accessStatus_enu == EEL_ACCESS_READ_WRITE)
{
/* Set current state to FEE_IDLE */
Fee_GstVar.GucState = FEE_IDLE;
}
#endif/* End of (FEE_STARTUP_LIMITED_ACCESS == STD_OFF) */
#if (FEE_AUTO_FORMAT_FLASH == STD_ON)
/* Check backround status is EEL_ERR_POOL_INCONSISTENT */
if(driverStatus_str.backgroundStatus_enu == EEL_ERR_POOL_INCONSISTENT)
{
/* Setup the calling structure for invoking format function of EEL */
Fee_GstVar.GstRequest.command_enu = EEL_CMD_FORMAT;
/* Set job result to MEMIF_BLOCK_INCONSISTENT */
Fee_GstVar.GenJobResult = MEMIF_BLOCK_INCONSISTENT;
/*
* Invoke the Handler function to proceed EEL state for format
* acceptance
*/
EEL_Handler();
/* Invoke the API to perform the operation based on updated command */
EEL_Execute(&Fee_GstVar.GstRequest);
/* Check request status is EEL_BUSY */
if(Fee_GstVar.GstRequest.status_enu == EEL_BUSY)
{
/* Update current state to FEE_FORMAT */
Fee_GstVar.GucState = FEE_FORMAT;
}
/* Check request status is EEL_OK */
else if(Fee_GstVar.GstRequest.status_enu == EEL_OK)
{
/* Invoke the initialization function of EEL */
LenEelStatus = EEL_Init(&eelApp_eelConfig, EEL_OPERATION_MODE_NORMAL);
/* Check LenEelStatus is EEL_OK */
if(LenEelStatus == EEL_OK)
{
/* Invoke the startup function of EEL */
LenEelStatus = EEL_Startup();
/* Check LenEelStatus is EEL_OK */
if(LenEelStatus == EEL_OK)
{
/* Update current state to FEE_STARTUP */
Fee_GstVar.GucState = FEE_STARTUP;
}
}
}
else
{
/* Update current state to FEE_UNINIT */
Fee_GstVar.GucState = FEE_UNINIT;
/* Report failure of format request to DEM */
//Dem_ReportErrorStatus((Dem_EventIdType)FEE_FORMAT_FAILED,
//(Dem_EventStatusType)DEM_EVENT_STATUS_FAILED);
}
}
#endif /* End of (FEE_AUTO_FORMAT_FLASH == STD_ON) */
/* Check operation status is EEL_OPERATION_PASSIVE */
if(driverStatus_str.operationStatus_enu == EEL_OPERATION_PASSIVE)
{
/* Report failure of startup to DEM */
//Dem_ReportErrorStatus((Dem_EventIdType)FEE_E_STARTUP_FAILED,
// (Dem_EventStatusType)DEM_EVENT_STATUS_FAILED);
}
}
#if (FEE_AUTO_FORMAT_FLASH == STD_ON)
/* Check current state is FEE_FORMAT */
else if(Fee_GstVar.GucState == FEE_FORMAT)
{
/* Check request status is not EEL_BUSY */
if(Fee_GstVar.GstRequest.status_enu != EEL_BUSY)
{
/* Check request status is EEL_OK */
if(Fee_GstVar.GstRequest.status_enu == EEL_OK)
{
/* Invoke the initialization function of EEL */
LenEelStatus = EEL_Init(&eelApp_eelConfig, EEL_OPERATION_MODE_NORMAL);
/* Check LenEelStatus is EEL_OK*/
if(LenEelStatus == EEL_OK)
{
/* Invoke the startup function of EEL */
LenEelStatus = EEL_Startup();
/* Check LenEelStatus is EEL_OK*/
if(LenEelStatus == EEL_OK)
{
/* Update current state to FEE_STARTUP */
Fee_GstVar.GucState = FEE_STARTUP;
}
}
}
else
{
/* Update current state to FEE_UNINIT */
Fee_GstVar.GucState = FEE_UNINIT;
/* Report failure of format request to DEM */
//Dem_ReportErrorStatus((Dem_EventIdType)FEE_FORMAT_FAILED,
//(Dem_EventStatusType)DEM_EVENT_STATUS_FAILED);
}
} /* End of (Fee_GstVar.GstRequest.status_enu != EEL_BUSY) */
}
#endif /* End of (FEE_AUTO_FORMAT_FLASH == STD_ON) */
else
#endif /* End of (FEE_STARTUP_INTERNAL == STD_OFF) */
{
/* Check if the current request issued to EEL is complete */
if(Fee_GstVar.GstRequest.status_enu != EEL_BUSY)
{
/* Check if the ongoing job before the cancel request is processed */
if(Fee_GstVar.GucPreviousJobState == FEE_JOB_INPROG)
{
/*
* Process the operation (read/write/invalidate) requested when the
* cancel processing was happening in background
*/
Fee_GstVar.GstRequest = Fee_GstVar.GstNewReq;
/*
* Invoke the function to perform pending read/write/invalidate
* operation
*/
/* Invoke the API to perform the operation based on updated command */
EEL_Execute(&Fee_GstVar.GstRequest);
/* Check if the request is accepted by EEL */
if (Fee_GstVar.GstRequest.status_enu == EEL_BUSY)
{
#if (FEE_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Enter_Fee(FEE_STATUS_PROTECTION);
#endif
/* Update current state to FEE_BUSY_FLASH_OPERATION */
Fee_GstVar.GucState = FEE_BUSY_FLASH_OPERATION;
#if (FEE_CRITICAL_SECTION_PROTECTION == STD_ON)
SchM_Exit_Fee(FEE_STATUS_PROTECTION);
#endif
}
else
{
/* Update the request status */
LenStatus = Fee_GstVar.GstRequest.status_enu;
/* Set LblEndProcess flag to FEE_TRUE */
LblEndProcess = FEE_TRUE;
}
/* Update previous job state to FEE_JOB_COMPLETED */
Fee_GstVar.GucPreviousJobState = FEE_JOB_COMPLETED;
}
/* Check current state is FEE_JOB_CANCELLED */
else if(Fee_GstVar.GucState == FEE_JOB_CANCELLED)
{
/* Update current state to FEE_IDLE */
Fee_GstVar.GucState = FEE_IDLE;
}
/* Check current state is FEE_BUSY_FLASH_OPERATION */
else if(Fee_GstVar.GucState == FEE_BUSY_FLASH_OPERATION)
{
/* Update the request status */
LenStatus = Fee_GstVar.GstRequest.status_enu;
/* Set LblEndProcess flag to FEE_TRUE */
LblEndProcess = FEE_TRUE;
}
else
{
/* Loop added to avoid QAC warning */
}
} /* End of if (GstRequest.status_enu != EEL_BUSY) */
} /* End of else part of (Fee_GstVar.GucState == FEE_STARTUP) */
/* Check LblEndProcess is not FEE_FALSE */
if (LblEndProcess != FEE_FALSE)
{
/*
* Update the result to be returned to upper layer based on result
* returned by the EEL
*/
/* MISRA Rule : 9.1 */
/* Message : The variable '-identifier-' is possibly unset */
/* at this point. */
/* Reason : 'LenStatus' is updated whenever the status_enu */
/* is updated by the EEL_Handler function. */
/* Verification : However, the part of the code is verified */
/* manually and it is not having any impact on code.*/
switch(LenStatus)
{
case EEL_OK:
case EEL_ERR_BLOCK_EXCLUDED:
case EEL_ERR_FIX_DONE:
case EEL_ERR_ERASESUSPEND_OVERFLOW:
/* Set job result to MEMIF_JOB_OK */
Fee_GstVar.GenJobResult = MEMIF_JOB_OK;
break;
case EEL_ERR_NO_INSTANCE:
/*
* Set job result to MEMIF_BLOCK_INVALID, either no DS corresponding
* to the ID could be found or the data has been invalidated explicitely
*/
Fee_GstVar.GenJobResult = MEMIF_BLOCK_INVALID;
break;
default:
/* Set job result to MEMIF_JOB_FAILED */
Fee_GstVar.GenJobResult = MEMIF_JOB_FAILED;
break;
} /* end of switch (LenStatus) */
/* End the processing of the current request */
Fee_EndProcessBlock(Fee_GstVar.GenJobResult);
} /* End of (LblEndProcess != FEE_FALSE)*/
} /* End of Main function */
#define FEE_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Adc/Adc_PBcfg.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* File name = Adc_PBcfg.c */
/* Version = 3.1.2 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains post-build time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.1.7
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_ADC_V308_140113_HEADLAMP.arxml
* FK4_4010_MCU_V308_140113_HEADLAMP.arxml
* GENERATED ON: 14 Jan 2014 - 09:27:57
*/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Adc_PBTypes.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification version information */
#define ADC_PBCFG_C_AR_MAJOR_VERSION 3
#define ADC_PBCFG_C_AR_MINOR_VERSION 0
#define ADC_PBCFG_C_AR_PATCH_VERSION 1
/* File version information */
#define ADC_PBCFG_C_SW_MAJOR_VERSION 3
#define ADC_PBCFG_C_SW_MINOR_VERSION 1
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (ADC_PBTYPES_AR_MAJOR_VERSION != ADC_PBCFG_C_AR_MAJOR_VERSION)
#error "Adc_PBcfg.c : Mismatch in Specification Major Version"
#endif
#if (ADC_PBTYPES_AR_MINOR_VERSION != ADC_PBCFG_C_AR_MINOR_VERSION)
#error "Adc_PBcfg.c : Mismatch in Specification Minor Version"
#endif
#if (ADC_PBTYPES_AR_PATCH_VERSION != ADC_PBCFG_C_AR_PATCH_VERSION)
#error "Adc_PBcfg.c : Mismatch in Specification Patch Version"
#endif
#if (ADC_SW_MAJOR_VERSION != ADC_PBCFG_C_SW_MAJOR_VERSION)
#error "Adc_PBcfg.c : Mismatch in Major Version"
#endif
#if (ADC_SW_MINOR_VERSION != ADC_PBCFG_C_SW_MINOR_VERSION)
#error "Adc_PBcfg.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
#define ADC_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* RAM Allocation of Channel group data */
VAR(Tdd_Adc_ChannelGroupRamData,ADC_NOINIT_DATA) Adc_GstGroupRamData[2];
/* RAM Allocation of hardware unit data */
VAR(Tdd_Adc_HwUnitRamData, ADC_NOINIT_DATA) Adc_GstHwUnitRamData[2];
/* RAM Allocation of Group Runtime data */
VAR(Tdd_Adc_RunTimeData, ADC_NOINIT_DATA) Adc_GstRunTimeData[2];
#define ADC_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
#define ADC_START_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
/* RAM Initialization of ADC Channel Configuration */
CONST(Adc_ConfigType, ADC_CONST) Adc_GstConfiguration[] =
{
/* Configuration 0 - AdcConfigSet0 */
{
/* ulStartOfDbToc */
0x05DEC308,
/* pHWUnitConfig */
&Adc_GstHWUnitConfig[0],
/* pGroupConfig */
&Adc_GstGroupConfig[0],
/* pGroupRamData */
&Adc_GstGroupRamData[0],
/* pHwUnitRamData */
&Adc_GstHwUnitRamData[0],
/* pRunTimeData */
&Adc_GstRunTimeData[0],
/* ucMaxSwTriggGroups */
0x02
}
};
#define ADC_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
#define ADC_START_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
/* Structure IMR Register address and mask value */
CONST(Tdd_AdcImrAddMaskConfigType, ADC_CONST) Adc_GstImrAddMask[] =
{
/* 0 - ADA0_CG0 */
{
/* pImrIntpAddress */
(P2VAR(uint8, AUTOMATIC, ADC_CONFIG_DATA)) 0xFFFF640Cul,
/* ucImrMask */
0xDF
},
/* 1 - ADA1_CG0 */
{
/* pImrIntpAddress */
(P2VAR(uint8, AUTOMATIC, ADC_CONFIG_DATA)) 0xFFFF6411ul,
/* ucImrMask */
0x7F
}
};
/* Structure for each Hardware Unit Configuration */
CONST(Tdd_Adc_HwUnitConfigType, ADC_CONST) Adc_GstHWUnitConfig[] =
{
/* 0 - AdcConfigSet0_ADA0 */
{
/* pUserBaseAddress */
(P2VAR(Tdd_AdcConfigUserRegisters, AUTOMATIC, ADC_CONFIG_DATA)) 0xFF81D000ul,
/* pOsBaseAddress */
(P2VAR(Tdd_AdcConfigOsRegisters, AUTOMATIC, ADC_CONFIG_DATA)) 0xFF81D100ul,
/* pAdcResult */
(P2VAR(uint32, AUTOMATIC, ADC_CONFIG_DATA)) 0xFF81D03Cul,
/* pIntpAddress */
(P2VAR(uint16, AUTOMATIC, ADC_CONFIG_DATA)) 0xFFFF60CAul,
/* pImrAddMask */
&Adc_GstImrAddMask[0],
/* ulHwUnitSettings */
0x00000001,
/* ucStabilzationCount */
0x08
},
/* 1 - AdcConfigSet0_ADA1 */
{
/* pUserBaseAddress */
(P2VAR(Tdd_AdcConfigUserRegisters, AUTOMATIC, ADC_CONFIG_DATA)) 0xFF81E000ul,
/* pOsBaseAddress */
(P2VAR(Tdd_AdcConfigOsRegisters, AUTOMATIC, ADC_CONFIG_DATA)) 0xFF81E100ul,
/* pAdcResult */
(P2VAR(uint32, AUTOMATIC, ADC_CONFIG_DATA)) 0xFF81E060ul,
/* pIntpAddress */
(P2VAR(uint16, AUTOMATIC, ADC_CONFIG_DATA)) 0xFFFF611Eul,
/* pImrAddMask */
&Adc_GstImrAddMask[1],
/* ulHwUnitSettings */
0x00000001,
/* ucStabilzationCount */
0x08
}
};
/* Structure for each Group Configuration */
CONST(Tdd_Adc_GroupConfigType, ADC_CONST) Adc_GstGroupConfig[] =
{
/* Index: 0 - AdcGroup0 */
{
/* pChannelToGroup */
&Adc_GaaChannelToGroup[0],
/* ulChannelList */
0x00000C03,
/* ddGroupAccessMode */
ADC_ACCESS_MODE_SINGLE,
/* ddNumberofSamples */
0x01,
/* ucHwUnit */
0x00,
/* ucHwCGUnit */
ADC_CG0,
/* ucResultAccessMode */
ADC_ISR_ACCESS,
/* ucConversionMode */
ADC_ONCE,
/* ucChannelCount */
0x04
},
/* Index: 1 - AdcGroup1 */
{
/* pChannelToGroup */
&Adc_GaaChannelToGroup[4],
/* ulChannelList */
0x00000E00,
/* ddGroupAccessMode */
ADC_ACCESS_MODE_SINGLE,
/* ddNumberofSamples */
0x01,
/* ucHwUnit */
0x01,
/* ucHwCGUnit */
ADC_CG0,
/* ucResultAccessMode */
ADC_ISR_ACCESS,
/* ucConversionMode */
ADC_ONCE,
/* ucChannelCount */
0x03
}
};
/* Structure for each Group Configuration */
/* CONST(Tdd_Adc_HWGroupTriggType, ADC_CONST) Adc_GstHWGroupTrigg[]; */
/* Structure for each Group Configuration */
/* CONST(Tdd_Adc_DmaUnitConfig, ADC_CONST) Adc_GstDmaUnitConfig[]; */
/* Channel list */
CONST(Adc_ChannelType, ADC_CONFIG_CONST) Adc_GaaChannelToGroup[] =
{
/* Channels assigned to Group: 0 */
0x00, 0x01, 0x0A, 0x0B,
/* Channels assigned to Group: 1 */
0x00, 0x01, 0x02
};
/* Mapping of DMA channel Id to the HW unit */
/* CONST(Adc_HwUnitType, ADC_CONFIG_CONST) Adc_GaaHwUnit[]; */
/* Mapping of DMA channel Id to the CGm unit */
/* CONST(uint8, ADC_CONFIG_CONST) Adc_GaaCGUnit[]; */
#define ADC_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Port/Port_Version.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Port_Version.h */
/* Version = 3.1.4 */
/* Date = 10-Jul-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains macros required for checking versions of modules */
/* included by PORT Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 27-Jul-2009 : Initial Version
* V3.1.0: 26-Jul-2011 : Initial Version DK4-H variant
* V3.1.1: 15-Sep-2011 : As per the DK-4H requirements
* 1. Added DK4-H specific JTAG information.
* 2. Added compiler switch for USE_UPD70F3529 device
* name.
* V3.1.2: 16-Feb-2012 : Merged the fixes done for Fx4L.
* V3.1.3: 06-Jun-2012 : As per SCR 033, File version is changed.
* V3.1.4: 10-Jul-2012 : As per SCR 047, File version is changed.
*/
/******************************************************************************/
#ifndef PORT_VERSION_H
#define PORT_VERSION_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Port.h"
#if(PORT_CRITICAL_SECTION_PROTECTION == STD_ON)
#include "SchM.h"
#endif
#if (PORT_DEV_ERROR_DETECT == STD_ON)
#include "Det.h"
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define PORT_VERSION_AR_MAJOR_VERSION PORT_AR_MAJOR_VERSION_VALUE
#define PORT_VERSION_AR_MINOR_VERSION PORT_AR_MINOR_VERSION_VALUE
#define PORT_VERSION_AR_PATCH_VERSION PORT_AR_PATCH_VERSION_VALUE
/* File version information */
#define PORT_VERSION_SW_MAJOR_VERSION 3
#define PORT_VERSION_SW_MINOR_VERSION 1
#define PORT_VERSION_SW_PATCH_VERSION 4
#if (PORT_SW_MAJOR_VERSION != PORT_VERSION_SW_MAJOR_VERSION)
#error "Software major version of Port_Version.h and Port.h did not match!"
#endif
#if ( PORT_SW_MINOR_VERSION!= PORT_VERSION_SW_MINOR_VERSION)
#error "Software minor version of Port_Version.h and Port.h did not match!"
#endif
/* Included files AUTOSAR specification version */
#define PORT_SCHM_AR_MAJOR_VERSION 1
#define PORT_SCHM_AR_MINOR_VERSION 1
#if (PORT_DEV_ERROR_DETECT == STD_ON)
#define PORT_DET_AR_MAJOR_VERSION 2
#define PORT_DET_AR_MINOR_VERSION 2
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* PORT_VERSION_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Pwm/Pwm_Irq.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Pwm_Irq.h */
/* Version = 3.1.3a */
/* Date = 23-Apr-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2013 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of API information. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 18-Aug-2009 : Initial version
* V3.0.1: 02-Jul-2010 : As per SCR 290, the following changes are made:
* 1. The macro definitions are added to support
* TAUB and TAUC timer units.
* 2. The extern declarations of the interrupt
* functions are added to support TAUB and TAUC
* timer units.
* 3. File is updated to support ISR Category
* configurable by a pre-compile option.
* V3.0.2: 25-Jul-2010 : As per SCR 305, ISR Category options are updated
* from MODE to TYPE.
* V3.0.3: 25-Oct-2010 : As per SCR 372, Function Prototypes for TAUJ1 and
* TAUJ2 Unit Channels are corrected for
* MCAL_ISR_TYPE_TOOLCHAIN ISR category.
* V3.1.0: 26-Jul-2011 : Ported for the DK4 variant.
* V3.1.1: 21-Sep-2011 : Corrected the location of the TAUB0_CHx_ISR, x=0..15
* under the compiler switch PWM_TAUB_UNIT_USED
* V3.1.2: 05-Mar-2012 : Merged the fixes done for Fx4L PWM driver
* V3.1.3: 06-Jun-2012 : As per SCR 034, Compiler version is removed from
* Environment section.
* V3.1.3a: 23-Apr-2013 : As per Mantis #11228, inclusion location of Os.h
* is changed.
*/
/******************************************************************************/
#ifndef PWM_IRQ_H
#define PWM_IRQ_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/* The default option for ISR Category MCAL_ISR_TYPE_TOOLCHAIN */
#ifndef PWM_INTERRUPT_TYPE
#define PWM_INTERRUPT_TYPE MCAL_ISR_TYPE_TOOLCHAIN
#endif
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
/* Use OS */
//#include "Os.h"
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* Version identification */
#define PWM_IRQ_AR_MAJOR_VERSION PWM_AR_MAJOR_VERSION_VALUE
#define PWM_IRQ_AR_MINOR_VERSION PWM_AR_MINOR_VERSION_VALUE
#define PWM_IRQ_AR_PATCH_VERSION PWM_AR_PATCH_VERSION_VALUE
/* File version information */
#define PWM_IRQ_SW_MAJOR_VERSION 3
#define PWM_IRQ_SW_MINOR_VERSION 1
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (PWM_SW_MAJOR_VERSION != PWM_IRQ_SW_MAJOR_VERSION)
#error "Pwm_Irq.h : Mismatch in Major Version"
#endif
#if (PWM_SW_MINOR_VERSION != PWM_IRQ_SW_MINOR_VERSION)
#error "Pwm_Irq.h : Mismatch in Minor Version"
#endif
/* Channel Mapping for TAUA Unit Channels */
#define PWM_TAUA0_CH0 0x00
#define PWM_TAUA0_CH1 0x01
#define PWM_TAUA0_CH2 0x02
#define PWM_TAUA0_CH3 0x03
#define PWM_TAUA0_CH4 0x04
#define PWM_TAUA0_CH5 0x05
#define PWM_TAUA0_CH6 0x06
#define PWM_TAUA0_CH7 0x07
#define PWM_TAUA0_CH8 0x08
#define PWM_TAUA0_CH9 0x09
#define PWM_TAUA0_CH10 0x0A
#define PWM_TAUA0_CH11 0x0B
#define PWM_TAUA0_CH12 0x0C
#define PWM_TAUA0_CH13 0x0D
#define PWM_TAUA0_CH14 0x0E
#define PWM_TAUA0_CH15 0x0F
#define PWM_TAUA1_CH0 0x10
#define PWM_TAUA1_CH1 0x11
#define PWM_TAUA1_CH2 0x12
#define PWM_TAUA1_CH3 0x13
#define PWM_TAUA1_CH4 0x14
#define PWM_TAUA1_CH5 0x15
#define PWM_TAUA1_CH6 0x16
#define PWM_TAUA1_CH7 0x17
#define PWM_TAUA1_CH8 0x18
#define PWM_TAUA1_CH9 0x19
#define PWM_TAUA1_CH10 0x1A
#define PWM_TAUA1_CH11 0x1B
#define PWM_TAUA1_CH12 0x1C
#define PWM_TAUA1_CH13 0x1D
#define PWM_TAUA1_CH14 0x1E
#define PWM_TAUA1_CH15 0x1F
#define PWM_TAUA2_CH0 0x20
#define PWM_TAUA2_CH1 0x21
#define PWM_TAUA2_CH2 0x22
#define PWM_TAUA2_CH3 0x23
#define PWM_TAUA2_CH4 0x24
#define PWM_TAUA2_CH5 0x25
#define PWM_TAUA2_CH6 0x26
#define PWM_TAUA2_CH7 0x27
#define PWM_TAUA2_CH8 0x28
#define PWM_TAUA2_CH9 0x29
#define PWM_TAUA2_CH10 0x2A
#define PWM_TAUA2_CH11 0x2B
#define PWM_TAUA2_CH12 0x2C
#define PWM_TAUA2_CH13 0x2D
#define PWM_TAUA2_CH14 0x2E
#define PWM_TAUA2_CH15 0x2F
#define PWM_TAUA3_CH0 0x30
#define PWM_TAUA3_CH1 0x31
#define PWM_TAUA3_CH2 0x32
#define PWM_TAUA3_CH3 0x33
#define PWM_TAUA3_CH4 0x34
#define PWM_TAUA3_CH5 0x35
#define PWM_TAUA3_CH6 0x36
#define PWM_TAUA3_CH7 0x37
#define PWM_TAUA3_CH8 0x38
#define PWM_TAUA3_CH9 0x39
#define PWM_TAUA3_CH10 0x3A
#define PWM_TAUA3_CH11 0x3B
#define PWM_TAUA3_CH12 0x3C
#define PWM_TAUA3_CH13 0x3D
#define PWM_TAUA3_CH14 0x3E
#define PWM_TAUA3_CH15 0x3F
#define PWM_TAUA4_CH0 0x40
#define PWM_TAUA4_CH1 0x41
#define PWM_TAUA4_CH2 0x42
#define PWM_TAUA4_CH3 0x43
#define PWM_TAUA4_CH4 0x44
#define PWM_TAUA4_CH5 0x45
#define PWM_TAUA4_CH6 0x46
#define PWM_TAUA4_CH7 0x47
#define PWM_TAUA4_CH8 0x48
#define PWM_TAUA4_CH9 0x49
#define PWM_TAUA4_CH10 0x4A
#define PWM_TAUA4_CH11 0x4B
#define PWM_TAUA4_CH12 0x4C
#define PWM_TAUA4_CH13 0x4D
#define PWM_TAUA4_CH14 0x4E
#define PWM_TAUA4_CH15 0x4F
#define PWM_TAUA5_CH0 0x50
#define PWM_TAUA5_CH1 0x51
#define PWM_TAUA5_CH2 0x52
#define PWM_TAUA5_CH3 0x53
#define PWM_TAUA5_CH4 0x54
#define PWM_TAUA5_CH5 0x55
#define PWM_TAUA5_CH6 0x56
#define PWM_TAUA5_CH7 0x57
#define PWM_TAUA5_CH8 0x58
#define PWM_TAUA5_CH9 0x59
#define PWM_TAUA5_CH10 0x5A
#define PWM_TAUA5_CH11 0x5B
#define PWM_TAUA5_CH12 0x5C
#define PWM_TAUA5_CH13 0x5D
#define PWM_TAUA5_CH14 0x5E
#define PWM_TAUA5_CH15 0x5F
#define PWM_TAUA6_CH0 0x60
#define PWM_TAUA6_CH1 0x61
#define PWM_TAUA6_CH2 0x62
#define PWM_TAUA6_CH3 0x63
#define PWM_TAUA6_CH4 0x64
#define PWM_TAUA6_CH5 0x65
#define PWM_TAUA6_CH6 0x66
#define PWM_TAUA6_CH7 0x67
#define PWM_TAUA6_CH8 0x68
#define PWM_TAUA6_CH9 0x69
#define PWM_TAUA6_CH10 0x6A
#define PWM_TAUA6_CH11 0x6B
#define PWM_TAUA6_CH12 0x6C
#define PWM_TAUA6_CH13 0x6D
#define PWM_TAUA6_CH14 0x6E
#define PWM_TAUA6_CH15 0x6F
#define PWM_TAUA7_CH0 0x70
#define PWM_TAUA7_CH1 0x71
#define PWM_TAUA7_CH2 0x72
#define PWM_TAUA7_CH3 0x73
#define PWM_TAUA7_CH4 0x74
#define PWM_TAUA7_CH5 0x75
#define PWM_TAUA7_CH6 0x76
#define PWM_TAUA7_CH7 0x77
#define PWM_TAUA7_CH8 0x78
#define PWM_TAUA7_CH9 0x79
#define PWM_TAUA7_CH10 0x7A
#define PWM_TAUA7_CH11 0x7B
#define PWM_TAUA7_CH12 0x7C
#define PWM_TAUA7_CH13 0x7D
#define PWM_TAUA7_CH14 0x7E
#define PWM_TAUA7_CH15 0x7F
#define PWM_TAUA8_CH0 0x80
#define PWM_TAUA8_CH1 0x81
#define PWM_TAUA8_CH2 0x82
#define PWM_TAUA8_CH3 0x83
#define PWM_TAUA8_CH4 0x84
#define PWM_TAUA8_CH5 0x85
#define PWM_TAUA8_CH6 0x86
#define PWM_TAUA8_CH7 0x87
#define PWM_TAUA8_CH8 0x88
#define PWM_TAUA8_CH9 0x89
#define PWM_TAUA8_CH10 0x8A
#define PWM_TAUA8_CH11 0x8B
#define PWM_TAUA8_CH12 0x8C
#define PWM_TAUA8_CH13 0x8D
#define PWM_TAUA8_CH14 0x8E
#define PWM_TAUA8_CH15 0x8F
/* Channel Mapping for TAUB Unit Channels */
#define PWM_TAUB0_CH0 0x00
#define PWM_TAUB0_CH1 0x01
#define PWM_TAUB0_CH2 0x02
#define PWM_TAUB0_CH3 0x03
#define PWM_TAUB0_CH4 0x04
#define PWM_TAUB0_CH5 0x05
#define PWM_TAUB0_CH6 0x06
#define PWM_TAUB0_CH7 0x07
#define PWM_TAUB0_CH8 0x08
#define PWM_TAUB0_CH9 0x09
#define PWM_TAUB0_CH10 0x0A
#define PWM_TAUB0_CH11 0x0B
#define PWM_TAUB0_CH12 0x0C
#define PWM_TAUB0_CH13 0x0D
#define PWM_TAUB0_CH14 0x0E
#define PWM_TAUB0_CH15 0x0F
#define PWM_TAUB1_CH0 0x10
#define PWM_TAUB1_CH1 0x11
#define PWM_TAUB1_CH2 0x12
#define PWM_TAUB1_CH3 0x13
#define PWM_TAUB1_CH4 0x14
#define PWM_TAUB1_CH5 0x15
#define PWM_TAUB1_CH6 0x16
#define PWM_TAUB1_CH7 0x17
#define PWM_TAUB1_CH8 0x18
#define PWM_TAUB1_CH9 0x19
#define PWM_TAUB1_CH10 0x1A
#define PWM_TAUB1_CH11 0x1B
#define PWM_TAUB1_CH12 0x1C
#define PWM_TAUB1_CH13 0x1D
#define PWM_TAUB1_CH14 0x1E
#define PWM_TAUB1_CH15 0x1F
#define PWM_TAUB2_CH0 0x20
#define PWM_TAUB2_CH1 0x21
#define PWM_TAUB2_CH2 0x22
#define PWM_TAUB2_CH3 0x23
#define PWM_TAUB2_CH4 0x24
#define PWM_TAUB2_CH5 0x25
#define PWM_TAUB2_CH6 0x26
#define PWM_TAUB2_CH7 0x27
#define PWM_TAUB2_CH8 0x28
#define PWM_TAUB2_CH9 0x29
#define PWM_TAUB2_CH10 0x2A
#define PWM_TAUB2_CH11 0x2B
#define PWM_TAUB2_CH12 0x2C
#define PWM_TAUB2_CH13 0x2D
#define PWM_TAUB2_CH14 0x2E
#define PWM_TAUB2_CH15 0x2F
/* Channel Mapping for TAUC Unit Channels */
#define PWM_TAUC2_CH0 0x20
#define PWM_TAUC2_CH1 0x21
#define PWM_TAUC2_CH2 0x22
#define PWM_TAUC2_CH3 0x23
#define PWM_TAUC2_CH4 0x24
#define PWM_TAUC2_CH5 0x25
#define PWM_TAUC2_CH6 0x26
#define PWM_TAUC2_CH7 0x27
#define PWM_TAUC2_CH8 0x28
#define PWM_TAUC2_CH9 0x29
#define PWM_TAUC2_CH10 0x2A
#define PWM_TAUC2_CH11 0x2B
#define PWM_TAUC2_CH12 0x2C
#define PWM_TAUC2_CH13 0x2D
#define PWM_TAUC2_CH14 0x2E
#define PWM_TAUC2_CH15 0x2F
#define PWM_TAUC3_CH0 0x30
#define PWM_TAUC3_CH1 0x31
#define PWM_TAUC3_CH2 0x32
#define PWM_TAUC3_CH3 0x33
#define PWM_TAUC3_CH4 0x34
#define PWM_TAUC3_CH5 0x35
#define PWM_TAUC3_CH6 0x36
#define PWM_TAUC3_CH7 0x37
#define PWM_TAUC3_CH8 0x38
#define PWM_TAUC3_CH9 0x39
#define PWM_TAUC3_CH10 0x3A
#define PWM_TAUC3_CH11 0x3B
#define PWM_TAUC3_CH12 0x3C
#define PWM_TAUC3_CH13 0x3D
#define PWM_TAUC3_CH14 0x3E
#define PWM_TAUC3_CH15 0x3F
#define PWM_TAUC4_CH0 0x40
#define PWM_TAUC4_CH1 0x41
#define PWM_TAUC4_CH2 0x42
#define PWM_TAUC4_CH3 0x43
#define PWM_TAUC4_CH4 0x44
#define PWM_TAUC4_CH5 0x45
#define PWM_TAUC4_CH6 0x46
#define PWM_TAUC4_CH7 0x47
#define PWM_TAUC4_CH8 0x48
#define PWM_TAUC4_CH9 0x49
#define PWM_TAUC4_CH10 0x4A
#define PWM_TAUC4_CH11 0x4B
#define PWM_TAUC4_CH12 0x4C
#define PWM_TAUC4_CH13 0x4D
#define PWM_TAUC4_CH14 0x4E
#define PWM_TAUC4_CH15 0x4F
#define PWM_TAUC5_CH0 0x50
#define PWM_TAUC5_CH1 0x51
#define PWM_TAUC5_CH2 0x52
#define PWM_TAUC5_CH3 0x53
#define PWM_TAUC5_CH4 0x54
#define PWM_TAUC5_CH5 0x55
#define PWM_TAUC5_CH6 0x56
#define PWM_TAUC5_CH7 0x57
#define PWM_TAUC5_CH8 0x58
#define PWM_TAUC5_CH9 0x59
#define PWM_TAUC5_CH10 0x5A
#define PWM_TAUC5_CH11 0x5B
#define PWM_TAUC5_CH12 0x5C
#define PWM_TAUC5_CH13 0x5D
#define PWM_TAUC5_CH14 0x5E
#define PWM_TAUC5_CH15 0x5F
#define PWM_TAUC6_CH0 0x60
#define PWM_TAUC6_CH1 0x61
#define PWM_TAUC6_CH2 0x62
#define PWM_TAUC6_CH3 0x63
#define PWM_TAUC6_CH4 0x64
#define PWM_TAUC6_CH5 0x65
#define PWM_TAUC6_CH6 0x66
#define PWM_TAUC6_CH7 0x67
#define PWM_TAUC6_CH8 0x68
#define PWM_TAUC6_CH9 0x69
#define PWM_TAUC6_CH10 0x6A
#define PWM_TAUC6_CH11 0x6B
#define PWM_TAUC6_CH12 0x6C
#define PWM_TAUC6_CH13 0x6D
#define PWM_TAUC6_CH14 0x6E
#define PWM_TAUC6_CH15 0x6F
#define PWM_TAUC7_CH0 0x70
#define PWM_TAUC7_CH1 0x71
#define PWM_TAUC7_CH2 0x72
#define PWM_TAUC7_CH3 0x73
#define PWM_TAUC7_CH4 0x74
#define PWM_TAUC7_CH5 0x75
#define PWM_TAUC7_CH6 0x76
#define PWM_TAUC7_CH7 0x77
#define PWM_TAUC7_CH8 0x78
#define PWM_TAUC7_CH9 0x79
#define PWM_TAUC7_CH10 0x7A
#define PWM_TAUC7_CH11 0x7B
#define PWM_TAUC7_CH12 0x7C
#define PWM_TAUC7_CH13 0x7D
#define PWM_TAUC7_CH14 0x7E
#define PWM_TAUC7_CH15 0x7F
#define PWM_TAUC8_CH0 0x80
#define PWM_TAUC8_CH1 0x81
#define PWM_TAUC8_CH2 0x82
#define PWM_TAUC8_CH3 0x83
#define PWM_TAUC8_CH4 0x84
#define PWM_TAUC8_CH5 0x85
#define PWM_TAUC8_CH6 0x86
#define PWM_TAUC8_CH7 0x87
#define PWM_TAUC8_CH8 0x88
#define PWM_TAUC8_CH9 0x89
#define PWM_TAUC8_CH10 0x8A
#define PWM_TAUC8_CH11 0x8B
#define PWM_TAUC8_CH12 0x8C
#define PWM_TAUC8_CH13 0x8D
#define PWM_TAUC8_CH14 0x8E
#define PWM_TAUC8_CH15 0x8F
/* Channel Mapping for TAUJ Unit Channels */
#define PWM_TAUJ0_CH0 0x90
#define PWM_TAUJ0_CH1 0x91
#define PWM_TAUJ0_CH2 0x92
#define PWM_TAUJ0_CH3 0x93
#define PWM_TAUJ1_CH0 0x94
#define PWM_TAUJ1_CH1 0x95
#define PWM_TAUJ1_CH2 0x96
#define PWM_TAUJ1_CH3 0x97
#define PWM_TAUJ2_CH0 0x98
#define PWM_TAUJ2_CH1 0x99
#define PWM_TAUJ2_CH2 0x9A
#define PWM_TAUJ2_CH3 0x9B
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
#if (PWM_TAUA_UNIT_USED == STD_ON)/*PWM_TAUA_UNIT_USED == STD_ON*/
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH15_ISR(void);
#endif /*PWM_TAUA_UNIT_USED == STD_ON*/
#if (PWM_TAUB_UNIT_USED == STD_ON)/*PWM_TAUB_UNIT_USED == STD_ON*/
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH15_ISR(void);
#endif /*PWM_TAUB_UNIT_USED == STD_ON*/
#if (PWM_TAUC_UNIT_USED == STD_ON)/*PWM_TAUC_UNIT_USED == STD_ON*/
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH15_ISR(void);
#endif /*PWM_TAUC_UNIT_USED == STD_ON*/
#if (PWM_TAUJ_UNIT_USED == STD_ON)/*PWM_TAUJ_UNIT_USED == STD_ON*/
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ0_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ0_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ0_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ0_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ1_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ1_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ1_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ1_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ2_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ2_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ2_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ2_CH3_ISR(void);
#endif /*PWM_TAUJ_UNIT_USED == STD_ON*/
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
#if (PWM_TAUA_UNIT_USED == STD_ON)/*PWM_TAUA_UNIT_USED == STD_ON*/
extern FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH15_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH15_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH15_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH15_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH15_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH15_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH15_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH15_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH15_ISR(void);
#endif /*PWM_TAUA_UNIT_USED == STD_ON*/
#if (PWM_TAUB_UNIT_USED == STD_ON)/*PWM_TAUB_UNIT_USED == STD_ON*/
extern FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH15_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH15_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH15_ISR(void);
#endif /*PWM_TAUB_UNIT_USED == STD_ON*/
#if (PWM_TAUC_UNIT_USED == STD_ON)/*PWM_TAUC_UNIT_USED == STD_ON*/
extern FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH15_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH15_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH15_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH15_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH15_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH15_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH4_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH5_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH6_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH7_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH8_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH9_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH10_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH11_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH12_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH13_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH14_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH15_ISR(void);
#endif /*PWM_TAUC_UNIT_USED == STD_ON*/
#if (PWM_TAUJ_UNIT_USED == STD_ON)/*PWM_TAUJ_UNIT_USED == STD_ON*/
extern FUNC(void, PWM_PUBLIC_CODE) TAUJ0_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUJ0_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUJ0_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUJ0_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUJ1_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUJ1_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUJ1_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUJ1_CH3_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUJ2_CH0_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUJ2_CH1_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUJ2_CH2_ISR(void);
extern FUNC(void, PWM_PUBLIC_CODE) TAUJ2_CH3_ISR(void);
#endif /*PWM_TAUJ_UNIT_USED == STD_ON*/
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
/* Do nothing to avoid error */
#else
#error "PWM_INTERRUPT_TYPE not set."
#endif /* End of PWM_INTERRUPT_TYPE */
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* PWM_IRQ_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Adc/Adc_Version.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Adc_Version.c */
/* Version = 3.1.2a */
/* Date = 19-Feb-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2013 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains code for version checking for modules included by ADC */
/* Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 10-Jul-2009 : Initial version
*
* V3.0.1: 12-Oct-2009 : As per SCR 052, the following changes are made
* 1. Template changes are made.
*
* V3.1.0: 27-Jul-2011 : Modified for DK-4
* V3.1.1: 14-Feb-2012 : Merged the fixes done for Fx4L Adc driver
*
* V3.1.2: 04-Jun-2012 : As per SCR 019, the following changes are made
* 1. Compiler version is removed from environment
* section.
* 2. File version is changed.
* V3.1.2a: 19-Feb-2013 : Software patch version Information is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Adc.h" /* ADC Driver Header File */
#include "Adc_Version.h" /* ADC Version Header File */
#if(ADC_DEV_ERROR_DETECT == STD_ON)
#include "Det.h" /* DET Header File */
#endif
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
#include "SchM.h" /* Scheduler Header File */
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification version information */
#define ADC_VERSION_C_AR_MAJOR_VERSION ADC_AR_MAJOR_VERSION_VALUE
#define ADC_VERSION_C_AR_MINOR_VERSION ADC_AR_MINOR_VERSION_VALUE
#define ADC_VERSION_C_AR_PATCH_VERSION ADC_AR_PATCH_VERSION_VALUE
/* File version information */
#define ADC_VERSION_C_SW_MAJOR_VERSION 3
#define ADC_VERSION_C_SW_MINOR_VERSION 1
#define ADC_VERSION_C_SW_PATCH_VERSION 3
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (ADC_VERSION_AR_MAJOR_VERSION != ADC_VERSION_C_AR_MAJOR_VERSION)
#error "Adc_Version.c : Mismatch in Specification Major Version"
#endif
#if (ADC_VERSION_AR_MINOR_VERSION != ADC_VERSION_C_AR_MINOR_VERSION)
#error "Adc_Version.c : Mismatch in Specification Minor Version"
#endif
#if (ADC_VERSION_AR_PATCH_VERSION != ADC_VERSION_C_AR_PATCH_VERSION)
#error "Adc_Version.c : Mismatch in Specification Patch Version"
#endif
#if (ADC_VERSION_SW_MAJOR_VERSION != ADC_VERSION_C_SW_MAJOR_VERSION)
#error "Adc_Version.c : Mismatch in Major Version"
#endif
#if (ADC_VERSION_SW_MINOR_VERSION != ADC_VERSION_C_SW_MINOR_VERSION)
#error "Adc_Version.c : Mismatch in Minor Version"
#endif
#if(ADC_DEV_ERROR_DETECT == STD_ON)
#if (DET_AR_MAJOR_VERSION != ADC_DET_AR_MAJOR_VERSION)
#error "Det.h : Mismatch in Specification Major Version"
#endif
#if (DET_AR_MINOR_VERSION != ADC_DET_AR_MINOR_VERSION)
#error "Det.h : Mismatch in Specification Minor Version"
#endif
#endif
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
#if (SCHM_AR_MAJOR_VERSION != ADC_SCHM_AR_MAJOR_VERSION)
#error "SchM.h : Mismatch in Specification Major Version"
#endif
#if (SCHM_AR_MINOR_VERSION != ADC_SCHM_AR_MINOR_VERSION)
#error "SchM.h : Mismatch in Specification Minor Version"
#endif
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Gpt.dp/Gpt_Cfg.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* File name = Gpt_Cfg.h */
/* Version = 3.1.2 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains pre-compile time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.1.6
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_GPT_V308_140113_HEADLAMP.arxml
* GENERATED ON: 15 Jan 2014 - 13:14:57
*/
#ifndef GPT_CFG_H
#define GPT_CFG_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define GPT_CFG_AR_MAJOR_VERSION 2
#define GPT_CFG_AR_MINOR_VERSION 2
#define GPT_CFG_AR_PATCH_VERSION 0
/*
* File version information
*/
#define GPT_CFG_SW_MAJOR_VERSION 3
#define GPT_CFG_SW_MINOR_VERSION 1
/*******************************************************************************
** Common Published Information **
*******************************************************************************/
#define GPT_AR_MAJOR_VERSION_VALUE 2
#define GPT_AR_MINOR_VERSION_VALUE 2
#define GPT_AR_PATCH_VERSION_VALUE 0
#define GPT_SW_MAJOR_VERSION_VALUE 3
#define GPT_SW_MINOR_VERSION_VALUE 1
#define GPT_SW_PATCH_VERSION_VALUE 2
#define GPT_VENDOR_ID_VALUE 23
#define GPT_MODULE_ID_VALUE 100
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Instance ID of the Gpt Component*/
#define GPT_INSTANCE_ID_VALUE 0
/* Enables/Disables Development error detection */
#define GPT_DEV_ERROR_DETECT STD_OFF
/* Enables/Disables wakeup source reporting */
#define GPT_REPORT_WAKEUP_SOURCE STD_OFF
/* Enables/Disables the inclusion of Gpt_DeInit API */
#define GPT_DE_INIT_API STD_ON
/* Enables/Disables inclusion of Gpt_GetTimeElapsed API */
#define GPT_TIME_ELAPSED_API STD_ON
/* Enables/Disables inclusion of Gpt_GetTimeRemaining API */
#define GPT_TIME_REMAINING_API STD_ON
/* Enables/Disables GetVersionInfo API */
#define GPT_VERSION_INFO_API STD_OFF
/* Enables/Disables inclusion of Gpt_EnableNotification
and Gpt_DisableNotification */
#define GPT_ENABLE_DISABLE_NOTIFICATION_API STD_ON
/* Enables/Disables inclusion of Gpt_SetMode, Gpt_EnableWakeup and
Gpt_DisableWakeup */
#define GPT_WAKEUP_FUNCTIONALITY_API STD_OFF
/* Enable/disable the Critical section protection */
#define GPT_CRITICAL_SECTION_PROTECTION STD_ON
/* Enable/disable the setting of Prescaler, baudrate and
blConfigurePrescaler by the GPT Driver */
#define GPT_CONFIG_PRESCALER_SUPPORTED STD_OFF
/* Enable/Disable the TAUA unit depending on the TAUA channels configured */
#define GPT_TAUA_UNIT_USED STD_OFF
/* Enable/Disable the TAUB unit depending on the TAUB channels configured */
#define GPT_TAUB_UNIT_USED STD_OFF
/* Enable/Disable the TAUC unit depending on the TAUC channels configured */
#define GPT_TAUC_UNIT_USED STD_OFF
/* Enable/Disable the TAUJ unit depending on the TAUJ channels configured */
#define GPT_TAUJ_UNIT_USED STD_ON
/* Enable/Disable the GPT OSTM unit depending on the OSTM channel */
#define GPT_OSTM_UNIT_USED STD_OFF
/* Total number of GPT TAUA and TAUJ units configured */
#define GPT_TOTAL_TAU_UNITS_CONFIGURED 1
/* Total number of GPT TAUA units configured */
#define GPT_TOTAL_TAUA_UNITS_CONFIG 0
/* Total number of GPT TAUB units configured */
#define GPT_TOTAL_TAUB_UNITS_CONFIG 0
/* Total number of GPT TAUC units configured */
#define GPT_TOTAL_TAUC_UNITS_CONFIG 0
/* Total number of GPT TAUJ units configured */
#define GPT_TOTAL_TAUJ_UNITS_CONFIG 1
/* Total number of GPT TAUA channels configured */
#define GPT_TOTAL_TAUA_CHANNELS_CONFIG 0
/* Total number of GPT TAUB channels configured */
#define GPT_TOTAL_TAUB_CHANNELS_CONFIG 0
/* Total number of GPT TAUC channels configured */
#define GPT_TOTAL_TAUC_CHANNELS_CONFIG 0
/* Total number of GPT TAUA, TAUB and TAUC channels configured */
#define GPT_TOTAL_TAUABC_CHANNELS_CONFIG 0
/* Total number of GPT TAUA, TAUB and TAUC units configured */
#define GPT_TOTAL_TAUABC_UNITS_CONFIG 0
/* Total number of GPT TAUJ channels configured */
#define GPT_TOTAL_TAUJ_CHANNELS_CONFIG 1
/* Total number of GPT Channels configured */
#define GPT_TOTAL_CHANNELS_CONFIG 1
/* Total number of GPT OSTM unit depending on the OSTM channel configured */
#define GPT_TOTAL_OSTM_UNITS_CONFIGURED 0
/* Maximum GPT Channel ID configure */
#define GPT_MAX_CHANNEL_ID_CONFIGURED 144
/* Macros for enabling/disabling ISRS */
#define GPT_OSTM0_CH0_ISR_API STD_OFF
#define GPT_OSTM1_CH0_ISR_API STD_OFF
#define GPT_TAUA0_CH0_ISR_API STD_OFF
#define GPT_TAUA0_CH10_ISR_API STD_OFF
#define GPT_TAUA0_CH11_ISR_API STD_OFF
#define GPT_TAUA0_CH12_ISR_API STD_OFF
#define GPT_TAUA0_CH13_ISR_API STD_OFF
#define GPT_TAUA0_CH14_ISR_API STD_OFF
#define GPT_TAUA0_CH15_ISR_API STD_OFF
#define GPT_TAUA0_CH1_ISR_API STD_OFF
#define GPT_TAUA0_CH2_ISR_API STD_OFF
#define GPT_TAUA0_CH3_ISR_API STD_OFF
#define GPT_TAUA0_CH4_ISR_API STD_OFF
#define GPT_TAUA0_CH5_ISR_API STD_OFF
#define GPT_TAUA0_CH6_ISR_API STD_OFF
#define GPT_TAUA0_CH7_ISR_API STD_OFF
#define GPT_TAUA0_CH8_ISR_API STD_OFF
#define GPT_TAUA0_CH9_ISR_API STD_OFF
#define GPT_TAUA1_CH0_ISR_API STD_OFF
#define GPT_TAUA1_CH10_ISR_API STD_OFF
#define GPT_TAUA1_CH11_ISR_API STD_OFF
#define GPT_TAUA1_CH12_ISR_API STD_OFF
#define GPT_TAUA1_CH13_ISR_API STD_OFF
#define GPT_TAUA1_CH14_ISR_API STD_OFF
#define GPT_TAUA1_CH15_ISR_API STD_OFF
#define GPT_TAUA1_CH1_ISR_API STD_OFF
#define GPT_TAUA1_CH2_ISR_API STD_OFF
#define GPT_TAUA1_CH3_ISR_API STD_OFF
#define GPT_TAUA1_CH4_ISR_API STD_OFF
#define GPT_TAUA1_CH5_ISR_API STD_OFF
#define GPT_TAUA1_CH6_ISR_API STD_OFF
#define GPT_TAUA1_CH7_ISR_API STD_OFF
#define GPT_TAUA1_CH8_ISR_API STD_OFF
#define GPT_TAUA1_CH9_ISR_API STD_OFF
#define GPT_TAUA2_CH0_ISR_API STD_OFF
#define GPT_TAUA2_CH10_ISR_API STD_OFF
#define GPT_TAUA2_CH11_ISR_API STD_OFF
#define GPT_TAUA2_CH12_ISR_API STD_OFF
#define GPT_TAUA2_CH13_ISR_API STD_OFF
#define GPT_TAUA2_CH14_ISR_API STD_OFF
#define GPT_TAUA2_CH15_ISR_API STD_OFF
#define GPT_TAUA2_CH1_ISR_API STD_OFF
#define GPT_TAUA2_CH2_ISR_API STD_OFF
#define GPT_TAUA2_CH3_ISR_API STD_OFF
#define GPT_TAUA2_CH4_ISR_API STD_OFF
#define GPT_TAUA2_CH5_ISR_API STD_OFF
#define GPT_TAUA2_CH6_ISR_API STD_OFF
#define GPT_TAUA2_CH7_ISR_API STD_OFF
#define GPT_TAUA2_CH8_ISR_API STD_OFF
#define GPT_TAUA2_CH9_ISR_API STD_OFF
#define GPT_TAUA3_CH0_ISR_API STD_OFF
#define GPT_TAUA3_CH10_ISR_API STD_OFF
#define GPT_TAUA3_CH11_ISR_API STD_OFF
#define GPT_TAUA3_CH12_ISR_API STD_OFF
#define GPT_TAUA3_CH13_ISR_API STD_OFF
#define GPT_TAUA3_CH14_ISR_API STD_OFF
#define GPT_TAUA3_CH15_ISR_API STD_OFF
#define GPT_TAUA3_CH1_ISR_API STD_OFF
#define GPT_TAUA3_CH2_ISR_API STD_OFF
#define GPT_TAUA3_CH3_ISR_API STD_OFF
#define GPT_TAUA3_CH4_ISR_API STD_OFF
#define GPT_TAUA3_CH5_ISR_API STD_OFF
#define GPT_TAUA3_CH6_ISR_API STD_OFF
#define GPT_TAUA3_CH7_ISR_API STD_OFF
#define GPT_TAUA3_CH8_ISR_API STD_OFF
#define GPT_TAUA3_CH9_ISR_API STD_OFF
#define GPT_TAUA4_CH0_ISR_API STD_OFF
#define GPT_TAUA4_CH10_ISR_API STD_OFF
#define GPT_TAUA4_CH11_ISR_API STD_OFF
#define GPT_TAUA4_CH12_ISR_API STD_OFF
#define GPT_TAUA4_CH13_ISR_API STD_OFF
#define GPT_TAUA4_CH14_ISR_API STD_OFF
#define GPT_TAUA4_CH15_ISR_API STD_OFF
#define GPT_TAUA4_CH1_ISR_API STD_OFF
#define GPT_TAUA4_CH2_ISR_API STD_OFF
#define GPT_TAUA4_CH3_ISR_API STD_OFF
#define GPT_TAUA4_CH4_ISR_API STD_OFF
#define GPT_TAUA4_CH5_ISR_API STD_OFF
#define GPT_TAUA4_CH6_ISR_API STD_OFF
#define GPT_TAUA4_CH7_ISR_API STD_OFF
#define GPT_TAUA4_CH8_ISR_API STD_OFF
#define GPT_TAUA4_CH9_ISR_API STD_OFF
#define GPT_TAUA5_CH0_ISR_API STD_OFF
#define GPT_TAUA5_CH10_ISR_API STD_OFF
#define GPT_TAUA5_CH11_ISR_API STD_OFF
#define GPT_TAUA5_CH12_ISR_API STD_OFF
#define GPT_TAUA5_CH13_ISR_API STD_OFF
#define GPT_TAUA5_CH14_ISR_API STD_OFF
#define GPT_TAUA5_CH15_ISR_API STD_OFF
#define GPT_TAUA5_CH1_ISR_API STD_OFF
#define GPT_TAUA5_CH2_ISR_API STD_OFF
#define GPT_TAUA5_CH3_ISR_API STD_OFF
#define GPT_TAUA5_CH4_ISR_API STD_OFF
#define GPT_TAUA5_CH5_ISR_API STD_OFF
#define GPT_TAUA5_CH6_ISR_API STD_OFF
#define GPT_TAUA5_CH7_ISR_API STD_OFF
#define GPT_TAUA5_CH8_ISR_API STD_OFF
#define GPT_TAUA5_CH9_ISR_API STD_OFF
#define GPT_TAUA6_CH0_ISR_API STD_OFF
#define GPT_TAUA6_CH10_ISR_API STD_OFF
#define GPT_TAUA6_CH11_ISR_API STD_OFF
#define GPT_TAUA6_CH12_ISR_API STD_OFF
#define GPT_TAUA6_CH13_ISR_API STD_OFF
#define GPT_TAUA6_CH14_ISR_API STD_OFF
#define GPT_TAUA6_CH15_ISR_API STD_OFF
#define GPT_TAUA6_CH1_ISR_API STD_OFF
#define GPT_TAUA6_CH2_ISR_API STD_OFF
#define GPT_TAUA6_CH3_ISR_API STD_OFF
#define GPT_TAUA6_CH4_ISR_API STD_OFF
#define GPT_TAUA6_CH5_ISR_API STD_OFF
#define GPT_TAUA6_CH6_ISR_API STD_OFF
#define GPT_TAUA6_CH7_ISR_API STD_OFF
#define GPT_TAUA6_CH8_ISR_API STD_OFF
#define GPT_TAUA6_CH9_ISR_API STD_OFF
#define GPT_TAUA7_CH0_ISR_API STD_OFF
#define GPT_TAUA7_CH10_ISR_API STD_OFF
#define GPT_TAUA7_CH11_ISR_API STD_OFF
#define GPT_TAUA7_CH12_ISR_API STD_OFF
#define GPT_TAUA7_CH13_ISR_API STD_OFF
#define GPT_TAUA7_CH14_ISR_API STD_OFF
#define GPT_TAUA7_CH15_ISR_API STD_OFF
#define GPT_TAUA7_CH1_ISR_API STD_OFF
#define GPT_TAUA7_CH2_ISR_API STD_OFF
#define GPT_TAUA7_CH3_ISR_API STD_OFF
#define GPT_TAUA7_CH4_ISR_API STD_OFF
#define GPT_TAUA7_CH5_ISR_API STD_OFF
#define GPT_TAUA7_CH6_ISR_API STD_OFF
#define GPT_TAUA7_CH7_ISR_API STD_OFF
#define GPT_TAUA7_CH8_ISR_API STD_OFF
#define GPT_TAUA7_CH9_ISR_API STD_OFF
#define GPT_TAUA8_CH0_ISR_API STD_OFF
#define GPT_TAUA8_CH10_ISR_API STD_OFF
#define GPT_TAUA8_CH11_ISR_API STD_OFF
#define GPT_TAUA8_CH12_ISR_API STD_OFF
#define GPT_TAUA8_CH13_ISR_API STD_OFF
#define GPT_TAUA8_CH14_ISR_API STD_OFF
#define GPT_TAUA8_CH15_ISR_API STD_OFF
#define GPT_TAUA8_CH1_ISR_API STD_OFF
#define GPT_TAUA8_CH2_ISR_API STD_OFF
#define GPT_TAUA8_CH3_ISR_API STD_OFF
#define GPT_TAUA8_CH4_ISR_API STD_OFF
#define GPT_TAUA8_CH5_ISR_API STD_OFF
#define GPT_TAUA8_CH6_ISR_API STD_OFF
#define GPT_TAUA8_CH7_ISR_API STD_OFF
#define GPT_TAUA8_CH8_ISR_API STD_OFF
#define GPT_TAUA8_CH9_ISR_API STD_OFF
#define GPT_TAUB0_CH0_ISR_API STD_OFF
#define GPT_TAUB0_CH10_ISR_API STD_OFF
#define GPT_TAUB0_CH11_ISR_API STD_OFF
#define GPT_TAUB0_CH12_ISR_API STD_OFF
#define GPT_TAUB0_CH13_ISR_API STD_OFF
#define GPT_TAUB0_CH14_ISR_API STD_OFF
#define GPT_TAUB0_CH15_ISR_API STD_OFF
#define GPT_TAUB0_CH1_ISR_API STD_OFF
#define GPT_TAUB0_CH2_ISR_API STD_OFF
#define GPT_TAUB0_CH3_ISR_API STD_OFF
#define GPT_TAUB0_CH4_ISR_API STD_OFF
#define GPT_TAUB0_CH5_ISR_API STD_OFF
#define GPT_TAUB0_CH6_ISR_API STD_OFF
#define GPT_TAUB0_CH7_ISR_API STD_OFF
#define GPT_TAUB0_CH8_ISR_API STD_OFF
#define GPT_TAUB0_CH9_ISR_API STD_OFF
#define GPT_TAUB1_CH0_ISR_API STD_OFF
#define GPT_TAUB1_CH10_ISR_API STD_OFF
#define GPT_TAUB1_CH11_ISR_API STD_OFF
#define GPT_TAUB1_CH12_ISR_API STD_OFF
#define GPT_TAUB1_CH13_ISR_API STD_OFF
#define GPT_TAUB1_CH14_ISR_API STD_OFF
#define GPT_TAUB1_CH15_ISR_API STD_OFF
#define GPT_TAUB1_CH1_ISR_API STD_OFF
#define GPT_TAUB1_CH2_ISR_API STD_OFF
#define GPT_TAUB1_CH3_ISR_API STD_OFF
#define GPT_TAUB1_CH4_ISR_API STD_OFF
#define GPT_TAUB1_CH5_ISR_API STD_OFF
#define GPT_TAUB1_CH6_ISR_API STD_OFF
#define GPT_TAUB1_CH7_ISR_API STD_OFF
#define GPT_TAUB1_CH8_ISR_API STD_OFF
#define GPT_TAUB1_CH9_ISR_API STD_OFF
#define GPT_TAUB2_CH0_ISR_API STD_OFF
#define GPT_TAUB2_CH10_ISR_API STD_OFF
#define GPT_TAUB2_CH11_ISR_API STD_OFF
#define GPT_TAUB2_CH12_ISR_API STD_OFF
#define GPT_TAUB2_CH13_ISR_API STD_OFF
#define GPT_TAUB2_CH14_ISR_API STD_OFF
#define GPT_TAUB2_CH15_ISR_API STD_OFF
#define GPT_TAUB2_CH1_ISR_API STD_OFF
#define GPT_TAUB2_CH2_ISR_API STD_OFF
#define GPT_TAUB2_CH3_ISR_API STD_OFF
#define GPT_TAUB2_CH4_ISR_API STD_OFF
#define GPT_TAUB2_CH5_ISR_API STD_OFF
#define GPT_TAUB2_CH6_ISR_API STD_OFF
#define GPT_TAUB2_CH7_ISR_API STD_OFF
#define GPT_TAUB2_CH8_ISR_API STD_OFF
#define GPT_TAUB2_CH9_ISR_API STD_OFF
#define GPT_TAUC2_CH0_ISR_API STD_OFF
#define GPT_TAUC2_CH10_ISR_API STD_OFF
#define GPT_TAUC2_CH11_ISR_API STD_OFF
#define GPT_TAUC2_CH12_ISR_API STD_OFF
#define GPT_TAUC2_CH13_ISR_API STD_OFF
#define GPT_TAUC2_CH14_ISR_API STD_OFF
#define GPT_TAUC2_CH15_ISR_API STD_OFF
#define GPT_TAUC2_CH1_ISR_API STD_OFF
#define GPT_TAUC2_CH2_ISR_API STD_OFF
#define GPT_TAUC2_CH3_ISR_API STD_OFF
#define GPT_TAUC2_CH4_ISR_API STD_OFF
#define GPT_TAUC2_CH5_ISR_API STD_OFF
#define GPT_TAUC2_CH6_ISR_API STD_OFF
#define GPT_TAUC2_CH7_ISR_API STD_OFF
#define GPT_TAUC2_CH8_ISR_API STD_OFF
#define GPT_TAUC2_CH9_ISR_API STD_OFF
#define GPT_TAUC3_CH0_ISR_API STD_OFF
#define GPT_TAUC3_CH10_ISR_API STD_OFF
#define GPT_TAUC3_CH11_ISR_API STD_OFF
#define GPT_TAUC3_CH12_ISR_API STD_OFF
#define GPT_TAUC3_CH13_ISR_API STD_OFF
#define GPT_TAUC3_CH14_ISR_API STD_OFF
#define GPT_TAUC3_CH15_ISR_API STD_OFF
#define GPT_TAUC3_CH1_ISR_API STD_OFF
#define GPT_TAUC3_CH2_ISR_API STD_OFF
#define GPT_TAUC3_CH3_ISR_API STD_OFF
#define GPT_TAUC3_CH4_ISR_API STD_OFF
#define GPT_TAUC3_CH5_ISR_API STD_OFF
#define GPT_TAUC3_CH6_ISR_API STD_OFF
#define GPT_TAUC3_CH7_ISR_API STD_OFF
#define GPT_TAUC3_CH8_ISR_API STD_OFF
#define GPT_TAUC3_CH9_ISR_API STD_OFF
#define GPT_TAUC4_CH0_ISR_API STD_OFF
#define GPT_TAUC4_CH10_ISR_API STD_OFF
#define GPT_TAUC4_CH11_ISR_API STD_OFF
#define GPT_TAUC4_CH12_ISR_API STD_OFF
#define GPT_TAUC4_CH13_ISR_API STD_OFF
#define GPT_TAUC4_CH14_ISR_API STD_OFF
#define GPT_TAUC4_CH15_ISR_API STD_OFF
#define GPT_TAUC4_CH1_ISR_API STD_OFF
#define GPT_TAUC4_CH2_ISR_API STD_OFF
#define GPT_TAUC4_CH3_ISR_API STD_OFF
#define GPT_TAUC4_CH4_ISR_API STD_OFF
#define GPT_TAUC4_CH5_ISR_API STD_OFF
#define GPT_TAUC4_CH6_ISR_API STD_OFF
#define GPT_TAUC4_CH7_ISR_API STD_OFF
#define GPT_TAUC4_CH8_ISR_API STD_OFF
#define GPT_TAUC4_CH9_ISR_API STD_OFF
#define GPT_TAUC5_CH0_ISR_API STD_OFF
#define GPT_TAUC5_CH10_ISR_API STD_OFF
#define GPT_TAUC5_CH11_ISR_API STD_OFF
#define GPT_TAUC5_CH12_ISR_API STD_OFF
#define GPT_TAUC5_CH13_ISR_API STD_OFF
#define GPT_TAUC5_CH14_ISR_API STD_OFF
#define GPT_TAUC5_CH15_ISR_API STD_OFF
#define GPT_TAUC5_CH1_ISR_API STD_OFF
#define GPT_TAUC5_CH2_ISR_API STD_OFF
#define GPT_TAUC5_CH3_ISR_API STD_OFF
#define GPT_TAUC5_CH4_ISR_API STD_OFF
#define GPT_TAUC5_CH5_ISR_API STD_OFF
#define GPT_TAUC5_CH6_ISR_API STD_OFF
#define GPT_TAUC5_CH7_ISR_API STD_OFF
#define GPT_TAUC5_CH8_ISR_API STD_OFF
#define GPT_TAUC5_CH9_ISR_API STD_OFF
#define GPT_TAUC6_CH0_ISR_API STD_OFF
#define GPT_TAUC6_CH10_ISR_API STD_OFF
#define GPT_TAUC6_CH11_ISR_API STD_OFF
#define GPT_TAUC6_CH12_ISR_API STD_OFF
#define GPT_TAUC6_CH13_ISR_API STD_OFF
#define GPT_TAUC6_CH14_ISR_API STD_OFF
#define GPT_TAUC6_CH15_ISR_API STD_OFF
#define GPT_TAUC6_CH1_ISR_API STD_OFF
#define GPT_TAUC6_CH2_ISR_API STD_OFF
#define GPT_TAUC6_CH3_ISR_API STD_OFF
#define GPT_TAUC6_CH4_ISR_API STD_OFF
#define GPT_TAUC6_CH5_ISR_API STD_OFF
#define GPT_TAUC6_CH6_ISR_API STD_OFF
#define GPT_TAUC6_CH7_ISR_API STD_OFF
#define GPT_TAUC6_CH8_ISR_API STD_OFF
#define GPT_TAUC6_CH9_ISR_API STD_OFF
#define GPT_TAUC7_CH0_ISR_API STD_OFF
#define GPT_TAUC7_CH10_ISR_API STD_OFF
#define GPT_TAUC7_CH11_ISR_API STD_OFF
#define GPT_TAUC7_CH12_ISR_API STD_OFF
#define GPT_TAUC7_CH13_ISR_API STD_OFF
#define GPT_TAUC7_CH14_ISR_API STD_OFF
#define GPT_TAUC7_CH15_ISR_API STD_OFF
#define GPT_TAUC7_CH1_ISR_API STD_OFF
#define GPT_TAUC7_CH2_ISR_API STD_OFF
#define GPT_TAUC7_CH3_ISR_API STD_OFF
#define GPT_TAUC7_CH4_ISR_API STD_OFF
#define GPT_TAUC7_CH5_ISR_API STD_OFF
#define GPT_TAUC7_CH6_ISR_API STD_OFF
#define GPT_TAUC7_CH7_ISR_API STD_OFF
#define GPT_TAUC7_CH8_ISR_API STD_OFF
#define GPT_TAUC7_CH9_ISR_API STD_OFF
#define GPT_TAUC8_CH0_ISR_API STD_OFF
#define GPT_TAUC8_CH10_ISR_API STD_OFF
#define GPT_TAUC8_CH11_ISR_API STD_OFF
#define GPT_TAUC8_CH12_ISR_API STD_OFF
#define GPT_TAUC8_CH13_ISR_API STD_OFF
#define GPT_TAUC8_CH14_ISR_API STD_OFF
#define GPT_TAUC8_CH15_ISR_API STD_OFF
#define GPT_TAUC8_CH1_ISR_API STD_OFF
#define GPT_TAUC8_CH2_ISR_API STD_OFF
#define GPT_TAUC8_CH3_ISR_API STD_OFF
#define GPT_TAUC8_CH4_ISR_API STD_OFF
#define GPT_TAUC8_CH5_ISR_API STD_OFF
#define GPT_TAUC8_CH6_ISR_API STD_OFF
#define GPT_TAUC8_CH7_ISR_API STD_OFF
#define GPT_TAUC8_CH8_ISR_API STD_OFF
#define GPT_TAUC8_CH9_ISR_API STD_OFF
#define GPT_TAUJ0_CH0_ISR_API STD_ON
#define GPT_TAUJ0_CH1_ISR_API STD_OFF
#define GPT_TAUJ0_CH2_ISR_API STD_OFF
#define GPT_TAUJ0_CH3_ISR_API STD_OFF
#define GPT_TAUJ1_CH0_ISR_API STD_OFF
#define GPT_TAUJ1_CH1_ISR_API STD_OFF
#define GPT_TAUJ1_CH2_ISR_API STD_OFF
#define GPT_TAUJ1_CH3_ISR_API STD_OFF
#define GPT_TAUJ2_CH0_ISR_API STD_OFF
#define GPT_TAUJ2_CH1_ISR_API STD_OFF
#define GPT_TAUJ2_CH2_ISR_API STD_OFF
#define GPT_TAUJ2_CH3_ISR_API STD_OFF
/* GPT Channel Handles */
#define GptChannelConfiguration0 (uint8)0x90
/* Configuration Set Handles */
#define GptChannelConfigSet0 &Gpt_GstConfiguration[0]
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* GPT_CFG_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/NvM/NvM.c
/**
\defgroup MODULE_NvM NvM
Non-volatile Memory Management Module.
*/
/*@{*/
/***************************************************************************//**
\file NvM.c
\brief the interface of Non-volatile Memory Management Module
\author Lvsf
\version 1.0
\date 2012-3-28
\warning Copyright (C), 2012, PATAC.
*//*----------------------------------------------------------------------------
\history
<No.> <author> <time> <version> <description>
1 Lvsf 2012-3-28 1.0 Create
*******************************************************************************/
/*******************************************************************************
Include Files
*******************************************************************************/
#include "NvM_Queue.h"
#include "NvM_JobProc.h"
#include "NvM_Cbk.h"
#include "NvM.h"
/*******************************************************************************
Macro Definition
*******************************************************************************/
/*******************************************************************************
Type Definition
*******************************************************************************/
/*******************************************************************************
Prototype Declaration
*******************************************************************************/
/*******************************************************************************
Variable Definition
*******************************************************************************/
/**
\var uint8 NvM_RWC_Flags
Read all/write all/cancel wirte all request flag.
*/
uint8 NvM_RWC_Flags;
/**
\var RamBlock_t NvM_BlockMngmtArea[BLOCK_TOTAL]
Block management information buffer.
*/
RamBlock_t NvM_BlockMngmtArea[BLOCK_TOTAL];
/*******************************************************************************
Function Definition
*******************************************************************************/
/***************************************************************************//**
\fn void NvM_Init( void )
\author Lvsf
\date 2012-3-14
\brief Init NvM all internal variables.
*******************************************************************************/
void NvM_Init( void )
{
uint16 BlockId;
NvM_RWC_Flags = 0;
NvM_BlockMngmtArea[0].NvRamErrorStatus = NVM_REQ_OK;
for(BlockId = 1; BlockId < BLOCK_TOTAL; BlockId++)
{
NvM_BlockMngmtArea[BlockId].DeviceId = 0;
NvM_BlockMngmtArea[BlockId].ServiceId = 0;
NvM_BlockMngmtArea[BlockId].NvDataIndex = 0;
NvM_BlockMngmtArea[BlockId].BlockOffset = 0;
NvM_BlockMngmtArea[BlockId].Length = NvM_Config[BlockId].Length;
NvM_BlockMngmtArea[BlockId].BlockId = BlockId;
NvM_BlockMngmtArea[BlockId].WriteNvRamOnce = 0;
NvM_BlockMngmtArea[BlockId].NvRamAttributes = 0;
NvM_BlockMngmtArea[BlockId].RamBlockDataAddr = NvM_Config[BlockId].RamAddr1;
NvM_BlockMngmtArea[BlockId].NvRamErrorStatus = NVM_REQ_OK;
}
NvM_ClearJob();
NvM_JobProcInit();
}
/***************************************************************************//**
\fn void NvM_SetDataIndex( uint16 BlockId, uint8 DataIndex)
\author Lvsf
\date 2012-3-14
\brief Setting the DataIndex of a dataset NVRAM block.
\param[in] BlockId: Block ID
\param[in] DataIndex:Data Index
*******************************************************************************/
void NvM_SetDataIndex( uint16 BlockId, uint8 DataIndex )
{
if(NVM_STATE_UNINIT != NvM_TaskState)
{
if ((BLOCK_TOTAL > BlockId) && (0 < BlockId))
{
NvM_BlockMngmtArea[BlockId].NvDataIndex = DataIndex;
}
else
{
}
}
else
{
}
}
/***************************************************************************//**
\fn void NvM_GetDataIndex( uint16 BlockId, uint8* DataIndexPtr)
\author Lvsf
\date 2012-3-14
\brief Getting the currently set DataIndex of a dataset NVRAM block.
\param[in] BlockId :Block ID
\param[out] DataIndexPtr :DataIndex Pointer
*******************************************************************************/
void NvM_GetDataIndex( uint16 BlockId, uint8* DataIndexPtr )
{
if ((NVM_STATE_UNINIT != NvM_TaskState)
&&(BLOCK_TOTAL > BlockId)
&&(0 < BlockId)
&&(NULL != DataIndexPtr)
&&(NVM_REQ_PENDING != NvM_BlockMngmtArea[BlockId].NvRamErrorStatus))
{
*DataIndexPtr = NvM_BlockMngmtArea[BlockId].NvDataIndex ;
}
else
{
}
}
/***************************************************************************//**
\fn void NvM_SetBlockProtection( uint16 BlockId, boolean ProtectionEnabled )
\author Lvsf
\date 2012-3-14
\brief Setting/resetting the write protection for a NV block.
\param[in] BlockId:Block ID
\param[in] ProtectionEnabled: Write Protection should be enable or disable
*******************************************************************************/
void NvM_SetBlockProtection( uint16 BlockId, boolean ProtectionEnabled )
{
if ((NVM_STATE_UNINIT != NvM_TaskState)
&&(BLOCK_TOTAL > BlockId)
&&(0 < BlockId)
&&(NVM_REQ_PENDING != NvM_BlockMngmtArea[BlockId].NvRamErrorStatus)
&&(NVM_BLOCK_WRITE_BLOCK_ONCE_ON != NvM_BlockMngmtArea[BlockId].WriteNvRamOnce))
{
if (ProtectionEnabled)
{
NvM_BlockMngmtArea[BlockId].NvRamAttributes |= NVM_WR_PROT_SET;
}
else
{
NvM_BlockMngmtArea[BlockId].NvRamAttributes &= NVM_WR_PROT_CL;
}
}
else
{
}
}
/***************************************************************************//**
\fn void NvM_GetErrorStatus(uint16 BlockId, uint8* RequestResultPtr)
\author Lvsf
\date 2012-3-14
\brief Service to read the block dependent error/status information.
\param[in] BlockId:Block ID
\param[out] RequestResultPtr:pointer to where to store request result
*******************************************************************************/
void NvM_GetErrorStatus( uint16 BlockId, uint8* RequestResultPtr )
{
if ((NVM_STATE_UNINIT != NvM_TaskState)
&&(BLOCK_TOTAL > BlockId)
&&(0 < BlockId)
&&(NULL != RequestResultPtr))
{
*RequestResultPtr = NvM_BlockMngmtArea[BlockId].NvRamErrorStatus;
}
else
{
}
}
/***************************************************************************//**
\fn void NvM_SetRamBlockStatus( uint16 BlockId, boolean BlockChanged )
\author Lvsf
\date 2012-3-14
\brief Setting the RAM block status of an NVRAM block.
\param[in] BlockId:Block ID
\param[in] BlockChanged:Ram Block as changed or unchanged
*******************************************************************************/
void NvM_SetRamBlockStatus(uint16 BlockId, boolean BlockChanged)
{
if ((NVM_STATE_UNINIT != NvM_TaskState)
&&(BLOCK_TOTAL > BlockId)
&&(0 < BlockId)
&&(NVM_REQ_PENDING != NvM_BlockMngmtArea[BlockId].NvRamErrorStatus )
&&(NULL != NvM_BlockMngmtArea[BlockId].RamBlockDataAddr ))
{
if (BlockChanged)
{
/* set block changed and valid */
NvM_BlockMngmtArea[BlockId].NvRamAttributes
|= (NVM_STATE_CHANGED_SET | NVM_STATE_VALID_SET);
}
else
{
/* set block unchanged */
NvM_BlockMngmtArea[BlockId].NvRamAttributes
&= (NVM_STATE_CHANGED_CL & NVM_STATE_VALID_CL);
}
}
else
{
}
}
/***************************************************************************//**
\fn Std_ReturnType NvM_ReadBlock(uint16 BlockId, uint8* NvM_DstPtr)
\author Lvsf
\date 2012-3-14
\brief Copy the data of the NV block to its corresponding RAM block.
\param[in] BlockId: Block ID
\param[out] NvM_DstPtr:Pointer to RAM data block
\return Std_RetrunType:E_OK/E_NOT_OK, request has been acceptd or not
*******************************************************************************/
Std_ReturnType NvM_ReadBlock(uint16 BlockId, uint8* NvM_DstPtr)
{
Std_ReturnType ret = E_NOT_OK;
if ((NVM_STATE_UNINIT != NvM_TaskState)
&&(BLOCK_TOTAL > BlockId)
&&(0 < BlockId)
&&(NVM_REQ_PENDING != NvM_BlockMngmtArea[BlockId].NvRamErrorStatus )
&&(NULL != NvM_DstPtr))
{
if (NvM_QueueJob(BlockId, NVM_READ_BLOCK,NvM_DstPtr))
{
NvM_BlockMngmtArea[BlockId].NvRamAttributes
&= (NVM_STATE_VALID_CL & NVM_STATE_CHANGED_CL);
ret = E_OK;
}
else
{
}
}
else
{
}
return ret;
}
/***************************************************************************//**
\fn Std_ReturnType NvM_WriteBlock( uint16 BlockId, const uint8* NvM_SrcPtr )
\author Lvsf
\date 2012-3-14
\brief Copy the data of the RAM block to its corresponding NV block.
\param[in] BlockId: Block ID
\param[in] NvM_SrcPtr:Pointer to RAM data block
\return Std_RetrunType:E_OK/E_NOT_OK.request has been acceptd or not
*******************************************************************************/
Std_ReturnType NvM_WriteBlock(uint16 BlockId, uint8* NvM_SrcPtr)
{
Std_ReturnType ret = E_NOT_OK;
if ( (NVM_STATE_UNINIT != NvM_TaskState)
&&(BLOCK_TOTAL > BlockId)
&&(0 < BlockId)
&&(NULL != NvM_SrcPtr)
&&((NvM_BlockMngmtArea[BlockId].NvRamAttributes & NVM_WR_PROT_SET) == 0)
&&((NvM_BlockMngmtArea[BlockId].NvRamAttributes & NVM_LOCK_STAT_SET) == 0)
&&(NVM_REQ_PENDING != NvM_BlockMngmtArea[BlockId].NvRamErrorStatus ))
{
if (NvM_QueueJob(BlockId, NVM_WRITE_BLOCK, NvM_SrcPtr))
{
/* set the ram block status valid and changed */
NvM_BlockMngmtArea[BlockId].NvRamAttributes
|= (NVM_STATE_VALID_SET | NVM_STATE_CHANGED_SET);
ret = E_OK;
}
else
{
}
}
else
{
}
return ret;
}
/***************************************************************************//**
\fn Std_ReturnType NvM_RestoreBlockDefaults(uint16 BlockId,uint8* NvM_DestPtr)
\author Lvsf
\date 2012-3-14
\brief Restore the default data to its corresponding RAM block.
\param[in] BlockId:Block ID
\param[out] NvM_DestPtr:Pointer to RAM data block
\return Std_ReturnType:E_OK/E_NOT_OK.request has been acceptd or not
*******************************************************************************/
Std_ReturnType NvM_RestoreBlockDefaults( uint16 BlockId, uint8* NvM_DestPtr )
{
Std_ReturnType ret;
if ( (NVM_STATE_UNINIT != NvM_TaskState)
&&(BLOCK_TOTAL > BlockId)
&&(0 < BlockId)
&&(NULL != NvM_DestPtr)
&&(NVM_REQ_PENDING != NvM_BlockMngmtArea[BlockId].NvRamErrorStatus ))
{
if (NvM_QueueJob(BlockId,NVM_READ_BLOCK, NvM_DestPtr))
{
NvM_BlockMngmtArea[BlockId].NvRamAttributes &=
(NVM_STATE_VALID_CL & NVM_STATE_CHANGED_CL);
ret = E_OK;
}
else
{
ret = E_NOT_OK;
}
}
else
{
ret = E_NOT_OK;
}
return ret;
}
/***************************************************************************//**
\fn Std_ReturnType NvM_EraseNvBlock( uint16 BlockId )
\author Lvsf
\date 2012-3-14
\brief Erase a NV block.
\param[in] BlockId:Block ID
\return Std_ReturnType:E_OK/E_NOT_OK.request has been acceptd or not
*******************************************************************************/
Std_ReturnType NvM_EraseNvBlock( uint16 BlockId )
{
Std_ReturnType ret;
if ( (NVM_STATE_UNINIT != NvM_TaskState)
&&(BLOCK_TOTAL > BlockId)
&&(0 < BlockId)
&&((NvM_BlockMngmtArea[BlockId].NvRamAttributes & NVM_WR_PROT_SET) == 0)
&&((NvM_BlockMngmtArea[BlockId].NvRamAttributes & NVM_LOCK_STAT_SET) == 0)
&&(NVM_REQ_PENDING != NvM_BlockMngmtArea[BlockId].NvRamErrorStatus ))
{
if (NvM_QueueJob(BlockId, NVM_ERASE_BLOCK , NULL))
{
ret = E_OK;
}
else
{
ret = E_NOT_OK;
}
}
else
{
ret = E_NOT_OK;
}
return ret;
}
/***************************************************************************//**
\fn Std_ReturnType NvM_InvalidateNvBlock( uint16 BlockId )
\author Lvsf
\date 2012-3-14
\brief Service to invalidate a NV block.
\param[in] BlockId:Block ID
\return Std_ReturnType:E_OK/E_NOT_OK.request has been acceptd or not
*******************************************************************************/
Std_ReturnType NvM_InvalidateNvBlock( uint16 BlockId )
{
Std_ReturnType ret = E_NOT_OK;
if ((NVM_STATE_UNINIT != NvM_TaskState)
&&(BLOCK_TOTAL > BlockId)
&&(0 < BlockId)
&&((NvM_BlockMngmtArea[BlockId].NvRamAttributes & NVM_WR_PROT_SET) == 0)
&&((NvM_BlockMngmtArea[BlockId].NvRamAttributes & NVM_LOCK_STAT_SET) == 0)
&&(NVM_REQ_PENDING != NvM_BlockMngmtArea[BlockId].NvRamErrorStatus ))
{
if (NvM_QueueJob(BlockId, NVM_INVALIDATE_NV_BLOCK , NULL))
{
ret = E_OK;
}
else
{
}
}
else
{
}
return ret;
}
/***************************************************************************//**
\fn void NvM_ReadAll( void )
\author lsf
\date 2012-3-14
\brief Initiates a multi block read request.
*******************************************************************************/
void NvM_ReadAll( void )
{
if ((NVM_STATE_UNINIT != NvM_TaskState)
&&(NVM_REQ_PENDING != NvM_BlockMngmtArea[0].NvRamErrorStatus))
{
if (NvM_QueueJob(0, NVM_READ_ALL , NULL))
{
NvM_RWC_Flags |= NVM_APIFLAG_READ_ALL_SET;
NvM_BlockMngmtArea[0].NvRamErrorStatus = NVM_REQ_PENDING ;
}
else
{
}
}
else
{
}
}
/***************************************************************************//**
\fn void NvM_WriteAll ( void )
\author Lvsf
\date 2012-3-14
\brief Initiates a multi block write request.
*******************************************************************************/
void NvM_WriteAll ( void )
{
if ((NVM_STATE_UNINIT != NvM_TaskState)
&&(NVM_REQ_PENDING != NvM_BlockMngmtArea[0].NvRamErrorStatus))
{
if (NvM_QueueJob(0, NVM_WRITE_ALL , NULL))
{
NvM_RWC_Flags &= NVM_APIFLAG_CANCEL_WR_ALL_CL;
NvM_RWC_Flags |= NVM_APIFLAG_WRITE_ALL_SET;
NvM_BlockMngmtArea[0].NvRamErrorStatus = NVM_REQ_PENDING;
}
else
{
}
}
else
{
}
}
/***************************************************************************//**
\fn void NvM_CancelWriteAll( void )
\author Lvsf
\date 2012-3-14
\brief Cancel running NvM_WriteAll request.
*******************************************************************************/
void NvM_CancelWriteAll( void )
{
if (NVM_STATE_UNINIT != NvM_TaskState)
{
if(NVM_WRITE_ALL == NvM_CurrentBlockInfo.ServiceId)
{
NvM_RWC_Flags |= NVM_APIFLAG_CANCEL_WR_ALL_SET;
NvM_RWC_Flags &= NVM_APIFLAG_WRITE_ALL_CL;
}
else
{
}
}
else
{
}
}
/***************************************************************************//**
\fn void NvM_JobEndNotification( void )
\author Lvsf
\date 2012-3-14
\brief Function to be used by the underlying memory abstraction to
signal end of job without error.
*******************************************************************************/
void NvM_JobEndNotification( void )
{
if((NvM_RWC_Flags & NVM_APIFLAG_WRITE_ALL_SET)
||(NvM_RWC_Flags & NVM_APIFLAG_READ_ALL_SET))
{
if((BLOCK_TOTAL-1) == NvM_CurrentBlockInfo.BlockId)
{
if(NVM_READ_ALL == NvM_CurrentBlockInfo.ServiceId)
{
NvM_RWC_Flags &= NVM_APIFLAG_READ_ALL_CL;
}
else
{
NvM_RWC_Flags &= NVM_APIFLAG_WRITE_ALL_CL;
NvM_RWC_Flags &= NVM_APIFLAG_CANCEL_WR_ALL_CL;
}
NvM_CurrentBlockInfo.BlockState = NVM_REQ_OK;
NvM_BlockMngmtArea[0].NvRamErrorStatus = NVM_REQ_OK;
}
else
{
NvM_CurrentBlockInfo.BlockState = NVM_REQ_PENDING;
NvM_BlockMngmtArea[0].NvRamErrorStatus = NVM_REQ_PENDING;
}
}
else
{
NvM_CurrentBlockInfo.BlockState = NVM_REQ_OK;
NvM_CurrentBlockInfo.LastResult = NVM_REQ_OK;
NvM_BlockMngmtArea[NvM_CurrentBlockInfo.BlockId].NvRamErrorStatus =
NVM_REQ_OK;
}
NvM_TaskState = NVM_STATE_IDLE;
}
/***************************************************************************//**
\fn void NvM_JobErrorNotification( void )
\author Lvsf
\date 2012-3-14
\brief Function to be used by the underlying memory abstraction to
signal end of job with error.
*******************************************************************************/
void NvM_JobErrorNotification( void )
{
switch(MemIf_GetJobResult(NvM_CurrentBlockInfo.DeviceId))
{
case MEMIF_BLOCK_INCONSISTENT:
NvM_CurrentBlockInfo.LastResult = NVM_REQ_INTEGRITY_FAILED;
break;
case MEMIF_BLOCK_INVALID:
NvM_CurrentBlockInfo.LastResult = NVM_REQ_NV_INVALIDATED;
break;
default:
NvM_CurrentBlockInfo.LastResult = NVM_REQ_NOT_OK;
}
if((NvM_RWC_Flags & NVM_APIFLAG_WRITE_ALL_SET)
||(NvM_RWC_Flags & NVM_APIFLAG_READ_ALL_SET))
{
if((BLOCK_TOTAL-1) == NvM_CurrentBlockInfo.BlockId)
{
if(NVM_READ_ALL == NvM_CurrentBlockInfo.ServiceId)
{
NvM_RWC_Flags &= NVM_APIFLAG_READ_ALL_CL;
}
else
{
NvM_RWC_Flags &= NVM_APIFLAG_WRITE_ALL_CL;
NvM_RWC_Flags &= NVM_APIFLAG_CANCEL_WR_ALL_CL;
}
NvM_CurrentBlockInfo.BlockState = NvM_CurrentBlockInfo.LastResult;
}
else
{
NvM_CurrentBlockInfo.BlockState = NVM_REQ_PENDING;
}
}
else
{
NvM_CurrentBlockInfo.BlockState = NVM_REQ_NOT_OK;
NvM_CurrentBlockInfo.LastResult = NVM_REQ_NOT_OK;
NvM_BlockMngmtArea[NvM_CurrentBlockInfo.BlockId].NvRamErrorStatus =
NvM_CurrentBlockInfo.LastResult;
}
NvM_TaskState = NVM_STATE_IDLE;
}
/***************************************************************************//**
\fn void NvM_MainFunction(void)
\author Lvsf
\date 2012-3-15
\brief Performing the processing of the NvM's job
*******************************************************************************/
void NvM_MainFunction(void)
{
if (NVM_STATE_UNINIT != NvM_TaskState)
{
NvM_Fsm();
}
else
{
}
}
/*@}*/
<file_sep>/BSP/MCAL/NvM/NvM_JobProc.h
/**
\addtogroup MODULE_NvM NvM
Non-volatile Memory Management Module.
*/
/*@{*/
/***************************************************************************//**
\file NvM_JobProc.h
\brief Type and API declaration of job Process.
\author lsf
\version 1.0
\date 2012-3-5
\warning Copyright (C), 2012, PATAC.
*//*----------------------------------------------------------------------------
\history
<No.> <author> <time> <version> <description>
1 lsf 2012-3-14 1.0 Create
*******************************************************************************/
#ifndef _NvM_JobProc_H
#define _NvM_JobProc_H
/*******************************************************************************
Include Files
*******************************************************************************/
#include "NvM.h"
#include "NvM_Queue.h"
/*******************************************************************************
Macro Definition
*******************************************************************************/
/*******************************************************************************
Type Definition
*******************************************************************************/
typedef uint8 NvM_StateActionType;
typedef uint8 NvM_ServiceIdType;
/**
\struct NvM_BlockInfoType
job processing structure: contains all information related to
the processing of one certain job
*/
typedef struct
{
uint8* BlockRamPtr;
uint8 DeviceId;
uint8 BlockState;
uint8 LastResult;
uint16 BlockId;
uint8 ServiceId;
uint16 Length;
uint16 BlockOffset;
} NvM_BlockInfo_t;
/**
\enum NvM_StateType
the operation status
*/
typedef enum
{
NVM_STATE_UNINIT = 0, /* Block not init */
NVM_STATE_IDLE, /* Block Idle */
NVM_STATE_READ, /* Read Block */
NVM_STATE_WRITE, /* Write Block */
NVM_STATE_ERASE, /* Erase Block */
NVM_STATE_READALL, /* Read all */
NVM_STATE_WRITEALL, /* Write All */
NVM_STATE_FSM_DEFAULT /* Other State */
}NvM_State_t;
/*******************************************************************************
Prototype Declaration
*******************************************************************************/
extern NvM_State_t NvM_TaskState;
extern NvM_BlockInfo_t NvM_CurrentBlockInfo;
extern void NvM_JobProcInit(void);
extern void NvM_Fsm(void);
extern void NvM_FsmAction(void);
#endif /* #ifndef _NvM_H */
/*@}*/
<file_sep>/BSP/MCAL/Can/Can_PBTypes.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Can_PBTypes.h */
/* Version = 3.0.3a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2008-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of AUTOSAR CAN Post Build time parameters. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12.12.2008 : Initial Version
* V3.0.1: 21.10.2009 : Updated compiler version as per
* SCR ANMCANLINFR3_SCR_031.
* V3.0.2: 11.05.2010 : Can_AFCan_GaaConfigType is added for multiple
* configuration support as per ANMCANLINFR3_SCR_060.
* V3.0.3: 12.09.2010 : As per ANMCANLINFR3_SCR_083, Can_AFCan_GstConfigType
* is removed.
* V3.0.3a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
#ifndef CAN_PBTYPES_H
#define CAN_PBTYPES_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Can.h" /* CAN Driver Module header file */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define CAN_PBTYPES_AR_MAJOR_VERSION 2
#define CAN_PBTYPES_AR_MINOR_VERSION 2
#define CAN_PBTYPES_AR_PATCH_VERSION 2
/* File version information */
#define CAN_PBTYPES_SW_MAJOR_VERSION 3
#define CAN_PBTYPES_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Hardware Recieve Handle Structure */
typedef struct STagTdd_Can_AFCan_Hrh
{
/* Pointer to Base Address of 8-bit Message Buffer Registers */
P2VAR(Tdd_Can_AFCan_8bit_MsgBuffer, AUTOMATIC, CAN_AFCAN_CONFIG_DATA)
pMsgBuffer8bit;
/* Pointer to Base Address of 16-bit Message Buffer Registers */
P2VAR(Tdd_Can_AFCan_16bit_MsgBuffer, AUTOMATIC, CAN_AFCAN_CONFIG_DATA)
pMsgBuffer16bit;
/* Pointer to Base Address of 32-bit Message Buffer Registers */
P2VAR(Tdd_Can_AFCan_32bit_MsgBuffer, AUTOMATIC, CAN_AFCAN_CONFIG_DATA)
pMsgBuffer32bit;
/* CAN-ID */
#if(CAN_STANDARD_CANID == STD_OFF)
/* CAN-ID Low */
uint16 usCanIdLow;
#endif
/* CAN-ID High */
uint16 usCanIdHigh;
/* Receive : MCONF Register */
uint8 ucMConfigReg;
}Tdd_Can_AFCan_Hrh;
/* Hardware Transmit Handle Structure */
typedef struct STagTdd_Can_AFCan_Hth
{
/* Pointer to Base Address of 8-bit Message Buffer Registers */
P2VAR(Tdd_Can_AFCan_8bit_MsgBuffer, AUTOMATIC, CAN_AFCAN_CONFIG_DATA)
pMsgBuffer8bit;
/* Pointer to Base Address of 16-bit Message Buffer Registers */
P2VAR(Tdd_Can_AFCan_16bit_MsgBuffer, AUTOMATIC, CAN_AFCAN_CONFIG_DATA)
pMsgBuffer16bit;
/* Pointer to Base Address of 32-bit Message Buffer Registers */
P2VAR(Tdd_Can_AFCan_32bit_MsgBuffer, AUTOMATIC, CAN_AFCAN_CONFIG_DATA)
pMsgBuffer32bit;
/* Store CanTxPduId */
P2VAR(PduIdType, AUTOMATIC, CAN_AFCAN_CONFIG_DATA)pCanTxPduId;
#if(CAN_MULTIPLEX_TRANSMISSION == STD_ON)
/* Access Flag */
P2VAR(uint8, AUTOMATIC, CAN_AFCAN_CONFIG_DATA)pHwAccessFlag;
#endif
/* ucController */
uint8 ucController;
}Tdd_Can_AFCan_Hth;
/*******************************************************************************
** Extern declarations for Global Data **
*******************************************************************************/
#define CAN_AFCAN_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* Global array for byte allocation */
extern VAR(uint8,CAN_AFCAN_NOINIT_DATA)Can_AFCan_GaaPBByteArray[];
/* Global array to store CanTxPduId */
extern VAR(PduIdType,CAN_AFCAN_NOINIT_DATA)Can_AFCan_GaaCanTxPduId[];
#if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
/* Global array for storing the Tx Cancellation status of BasicCan Hth */
extern VAR(uint8, CAN_AFCAN_NOINIT_DATA) Can_AFCan_GaaTxCancelStsFlgs[];
#endif
#define CAN_AFCAN_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
/* Global array for Hth structure */
extern CONST(Tdd_Can_AFCan_Hth,CAN_AFCAN_CONST) Can_AFCan_GaaHth[];
/* Global array for Hrh structure */
extern CONST(Tdd_Can_AFCan_Hrh,CAN_AFCAN_CONST) Can_AFCan_GaaHrh[];
/* Global array for filter mask structure */;
extern CONST(Tdd_Can_AFCan_HwFilterMask, CAN_AFCAN_CONST)
Can_AFCan_GaaFilterMask[];
/* Global array for ControllerIdArray */
extern CONST(uint8, CAN_AFCAN_CONST) Can_AFCan_GaaCntrlArrayId[];
#if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
/* Global array for BasicCanHth Id*/
extern CONST(uint8, CAN_AFCAN_CONST) Can_AFCan_GaaBasicCanHth[];
#endif
#define CAN_AFCAN_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* CAN_PBTYPES_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Can/CanIf_Cbk.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = CanIf_Cbk.c */
/* Version = 3.0.0a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2008-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of CAN Interface Call-back functions. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision History **
*******************************************************************************/
/*
* V3.0.0: 12.12.2008 : Initial Version
* V3.0.0a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "CanIf_Cbk.h"
/*******************************************************************************
** Version Check **
*******************************************************************************/
/*******************************************************************************
** Global Data **
*******************************************************************************/
uint8 GlobalCanRxData[2][8] = {
{0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff},
{0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}
};
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** CanIf_RxIndication **
*******************************************************************************/
void CanIf_RxIndication(uint8 Hrh, Can_IdType CanId, uint8 CanDlc,
const uint8* CanSduPtr)
{
uint8 * GpCanSduRxDataOPtr;
GpCanSduRxDataOPtr = GlobalCanRxData[Hrh];
while(CanDlc != 0)
{
/* Transfer the data from the corresponding message data byte register */
*(GpCanSduRxDataOPtr) = *(CanSduPtr);
GpCanSduRxDataOPtr++;
CanSduPtr++;
/* Decrement the DLC length */
CanDlc--;
}
}
/*******************************************************************************
** CanIf_TxConfirmation **
*******************************************************************************/
void CanIf_TxConfirmation(PduIdType CanTxPduId)
{
}
/*******************************************************************************
CanIf_ControllerBusOff
*******************************************************************************/
void CanIf_ControllerBusOff (uint8 Controller)
{
}
/*******************************************************************************
CanIf_ReadRxData
*******************************************************************************/
void CanIf_ReadRxData(uint8 Hrh,uint8 Dlc,uint8 * CanSduRxDataO)
{
uint8 * GpCanSduRxDataOPtr;
GpCanSduRxDataOPtr = GlobalCanRxData[Hrh];
while(Dlc != 0)
{
/* Transfer the data from the corresponding message data byte register */
*(CanSduRxDataO) = *(GpCanSduRxDataOPtr);
GpCanSduRxDataOPtr++;
CanSduRxDataO++;
/* Decrement the DLC length */
Dlc--;
}
}
/*******************************************************************************
End of the file
*******************************************************************************/
<file_sep>/BSP/MCAL/Icu/Icu_Irq.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Icu_Irq.c */
/* Version = 3.0.2a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains ISR functions for all Timers and External Interrupts of */
/* the ICU Driver Component */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 26-Aug-2009 : Initial version
*
* V3.0.1: 28-Jun-2010 : As per SCR 286, following changes are made:
* 1. ISRs for Timer Array Unit B are added.
* 2. File is updated to support an ISR Category
* support configurable by a pre-compile option.
*
* V3.0.2: 20-Jul-2010 : As per SCR 308, ICU_INTERRUPT_MODE is renamed
* as ICU_INTERRUPT_TYPE.
* V3.0.2a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Icu.h"
#include "Icu_Irq.h"
#include "Icu_PBTypes.h"
#include "Icu_LLDriver.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define ICU_IRQ_C_AR_MAJOR_VERSION ICU_AR_MAJOR_VERSION_VALUE
#define ICU_IRQ_C_AR_MINOR_VERSION ICU_AR_MINOR_VERSION_VALUE
#define ICU_IRQ_C_AR_PATCH_VERSION ICU_AR_PATCH_VERSION_VALUE
/* File version information */
#define ICU_IRQ_C_SW_MAJOR_VERSION 3
#define ICU_IRQ_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (ICU_IRQ_AR_MAJOR_VERSION != ICU_IRQ_C_AR_MAJOR_VERSION)
#error "Icu_Irq.c : Mismatch in Specification Major Version"
#endif
#if (ICU_IRQ_AR_MINOR_VERSION != ICU_IRQ_C_AR_MINOR_VERSION)
#error "Icu_Irq.c : Mismatch in Specification Minor Version"
#endif
#if (ICU_IRQ_AR_PATCH_VERSION != ICU_IRQ_C_AR_PATCH_VERSION)
#error "Icu_Irq.c : Mismatch in Specification Patch Version"
#endif
#if (ICU_IRQ_SW_MAJOR_VERSION != ICU_IRQ_C_SW_MAJOR_VERSION)
#error "Icu_Irq.c : Mismatch in Major Version"
#endif
#if (ICU_IRQ_SW_MINOR_VERSION != ICU_IRQ_C_SW_MINOR_VERSION)
#error "Icu_Irq.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : TAUAn_CHm_ISR
**
** Service ID : None
**
** Description : These are Interrupt Service routines for the Timer
** TAUA, where n represents TAU number and
** m represents channel number associated with each
** TAU.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
**
** Function(s) invoked:
** Icu_TimerIsr
**
*******************************************************************************/
#if (ICU_TAUA0_CH0_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH0_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA0_CH0);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA0_CH0_ISR_API == STD_ON) */
#if (ICU_TAUA0_CH1_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH1_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA0_CH1);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA0_CH1_ISR_API == STD_ON) */
#if (ICU_TAUA0_CH2_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH2_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA0_CH2);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA0_CH2_ISR_API == STD_ON) */
#if (ICU_TAUA0_CH3_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH3_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA0_CH3);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA0_CH3_ISR_API == STD_ON) */
#if (ICU_TAUA0_CH4_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH4_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA0_CH4);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA0_CH4_ISR_API == STD_ON) */
#if (ICU_TAUA0_CH5_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH5_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA0_CH5);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA0_CH5_ISR_API == STD_ON) */
#if (ICU_TAUA0_CH6_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH6_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA0_CH6);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA0_CH6_ISR_API == STD_ON) */
#if (ICU_TAUA0_CH7_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH7_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA0_CH7);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA0_CH7_ISR_API == STD_ON) */
#if (ICU_TAUA0_CH8_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH8_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA0_CH8);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA0_CH8_ISR_API == STD_ON) */
#if (ICU_TAUA0_CH9_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH9_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA0_CH9);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA0_CH9_ISR_API == STD_ON) */
#if (ICU_TAUA0_CH10_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH10_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA0_CH10);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA0_CH10_ISR_API == STD_ON) */
#if (ICU_TAUA0_CH11_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH11_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA0_CH11);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA0_CH11_ISR_API == STD_ON) */
#if (ICU_TAUA0_CH12_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH12_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA0_CH12);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA0_CH12_ISR_API == STD_ON) */
#if (ICU_TAUA0_CH13_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH13_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA0_CH13);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA0_CH13_ISR_API == STD_ON) */
#if (ICU_TAUA0_CH14_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH14_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA0_CH14);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA0_CH14_ISR_API == STD_ON) */
#if (ICU_TAUA0_CH15_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH15_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA0_CH15);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA0_CH15_ISR_API == STD_ON) */
#if (ICU_TAUA1_CH0_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH0_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA1_CH0);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA1_CH0_ISR_API == STD_ON) */
#if (ICU_TAUA1_CH1_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH1_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA1_CH1);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA1_CH1_ISR_API == STD_ON) */
#if (ICU_TAUA1_CH2_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH2_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA1_CH2);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA1_CH2_ISR_API == STD_ON) */
#if (ICU_TAUA1_CH3_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH3_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA1_CH3);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA1_CH3_ISR_API == STD_ON) */
#if (ICU_TAUA1_CH4_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH4_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA1_CH4);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA1_CH4_ISR_API == STD_ON) */
#if (ICU_TAUA1_CH5_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH5_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA1_CH5);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA1_CH5_ISR_API == STD_ON) */
#if (ICU_TAUA1_CH6_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH6_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA1_CH6);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA1_CH6_ISR_API == STD_ON) */
#if (ICU_TAUA1_CH7_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH7_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA1_CH7);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA1_CH7_ISR_API == STD_ON) */
#if (ICU_TAUA1_CH8_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH8_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA1_CH8);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA1_CH8_ISR_API == STD_ON) */
#if (ICU_TAUA1_CH9_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH9_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA1_CH9);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA1_CH9_ISR_API == STD_ON) */
#if (ICU_TAUA1_CH10_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH10_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA1_CH10);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA1_CH10_ISR_API == STD_ON) */
#if (ICU_TAUA1_CH11_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH11_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA1_CH11);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA1_CH11_ISR_API == STD_ON) */
#if (ICU_TAUA1_CH12_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH12_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA1_CH12);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA1_CH12_ISR_API == STD_ON) */
#if (ICU_TAUA1_CH13_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH13_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA1_CH13);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA1_CH13_ISR_API == STD_ON) */
#if (ICU_TAUA1_CH14_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH14_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA1_CH14);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA1_CH14_ISR_API == STD_ON) */
#if (ICU_TAUA1_CH15_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH15_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA1_CH15);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA1_CH15_ISR_API == STD_ON) */
#if (ICU_TAUA2_CH0_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH0_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA2_CH0);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA2_CH0_ISR_API == STD_ON) */
#if (ICU_TAUA2_CH1_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH1_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA2_CH1);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA2_CH1_ISR_API == STD_ON) */
#if (ICU_TAUA2_CH2_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH2_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA2_CH2);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA2_CH2_ISR_API == STD_ON) */
#if (ICU_TAUA2_CH3_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH3_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA2_CH3);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA2_CH3_ISR_API == STD_ON) */
#if (ICU_TAUA2_CH4_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH4_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA2_CH4);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA2_CH4_ISR_API == STD_ON) */
#if (ICU_TAUA2_CH5_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH5_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA2_CH5);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA2_CH5_ISR_API == STD_ON) */
#if (ICU_TAUA2_CH6_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH6_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA2_CH6);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA2_CH6_ISR_API == STD_ON) */
#if (ICU_TAUA2_CH7_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH7_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA2_CH7);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA2_CH7_ISR_API == STD_ON) */
#if (ICU_TAUA2_CH8_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH8_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA2_CH8);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA2_CH8_ISR_API == STD_ON) */
#if (ICU_TAUA2_CH9_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH9_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA2_CH9);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA2_CH9_ISR_API == STD_ON) */
#if (ICU_TAUA2_CH10_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH10_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA2_CH10);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA2_CH10_ISR_API == STD_ON) */
#if (ICU_TAUA2_CH11_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH11_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA2_CH11);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA2_CH11_ISR_API == STD_ON) */
#if (ICU_TAUA2_CH12_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH12_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA2_CH12);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA2_CH12_ISR_API == STD_ON) */
#if (ICU_TAUA2_CH13_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH13_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA2_CH13);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA2_CH13_ISR_API == STD_ON) */
#if (ICU_TAUA2_CH14_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH14_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA2_CH14);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA2_CH14_ISR_API == STD_ON) */
#if (ICU_TAUA2_CH15_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH15_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA2_CH15);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA2_CH15_ISR_API == STD_ON) */
#if (ICU_TAUA3_CH0_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH0_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA3_CH0);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA3_CH0_ISR_API == STD_ON) */
#if (ICU_TAUA3_CH1_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH1_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA3_CH1);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA3_CH1_ISR_API == STD_ON) */
#if (ICU_TAUA3_CH2_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH2_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA3_CH2);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA3_CH2_ISR_API == STD_ON) */
#if (ICU_TAUA3_CH3_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH3_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA3_CH3);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA3_CH3_ISR_API == STD_ON) */
#if (ICU_TAUA3_CH4_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH4_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA3_CH4);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA3_CH4_ISR_API == STD_ON) */
#if (ICU_TAUA3_CH5_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH5_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA3_CH5);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA3_CH5_ISR_API == STD_ON) */
#if (ICU_TAUA3_CH6_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH6_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA3_CH6);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA3_CH6_ISR_API == STD_ON) */
#if (ICU_TAUA3_CH7_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH7_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA3_CH7);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA3_CH7_ISR_API == STD_ON) */
#if (ICU_TAUA3_CH8_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH8_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA3_CH8);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA3_CH8_ISR_API == STD_ON) */
#if (ICU_TAUA3_CH9_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH9_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA3_CH9);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA3_CH9_ISR_API == STD_ON) */
#if (ICU_TAUA3_CH10_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH10_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA3_CH10);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA3_CH10_ISR_API == STD_ON) */
#if (ICU_TAUA3_CH11_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH11_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA3_CH11);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA3_CH11_ISR_API == STD_ON) */
#if (ICU_TAUA3_CH12_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH12_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA3_CH12);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA3_CH12_ISR_API == STD_ON) */
#if (ICU_TAUA3_CH13_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH13_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA3_CH13);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA3_CH13_ISR_API == STD_ON) */
#if (ICU_TAUA3_CH14_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH14_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA3_CH14);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA3_CH14_ISR_API == STD_ON) */
#if (ICU_TAUA3_CH15_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH15_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA3_CH15);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA3_CH15_ISR_API == STD_ON) */
#if (ICU_TAUA4_CH0_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH0_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA4_CH0);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA4_CH0_ISR_API == STD_ON) */
#if (ICU_TAUA4_CH1_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH1_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA4_CH1);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA4_CH1_ISR_API == STD_ON) */
#if (ICU_TAUA4_CH2_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH2_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA4_CH2);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA4_CH2_ISR_API == STD_ON) */
#if (ICU_TAUA4_CH3_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH3_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA4_CH3);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA4_CH3_ISR_API == STD_ON) */
#if (ICU_TAUA4_CH4_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH4_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA4_CH4);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA4_CH4_ISR_API == STD_ON) */
#if (ICU_TAUA4_CH5_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH5_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA4_CH5);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA4_CH5_ISR_API == STD_ON) */
#if (ICU_TAUA4_CH6_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH6_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA4_CH6);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA4_CH6_ISR_API == STD_ON) */
#if (ICU_TAUA4_CH7_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH7_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA4_CH7);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA4_CH7_ISR_API == STD_ON) */
#if (ICU_TAUA4_CH8_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH8_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA4_CH8);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA4_CH8_ISR_API == STD_ON) */
#if (ICU_TAUA4_CH9_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH9_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA4_CH9);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA4_CH9_ISR_API == STD_ON) */
#if (ICU_TAUA4_CH10_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH10_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA4_CH10);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA4_CH10_ISR_API == STD_ON) */
#if (ICU_TAUA4_CH11_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH11_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA4_CH11);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA4_CH11_ISR_API == STD_ON) */
#if (ICU_TAUA4_CH12_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH12_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA4_CH12);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA4_CH12_ISR_API == STD_ON) */
#if (ICU_TAUA4_CH13_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH13_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA4_CH13);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA4_CH13_ISR_API == STD_ON) */
#if (ICU_TAUA4_CH14_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH14_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA4_CH14);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA4_CH14_ISR_API == STD_ON) */
#if (ICU_TAUA4_CH15_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH15_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA4_CH15);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA4_CH15_ISR_API == STD_ON) */
#if (ICU_TAUA5_CH0_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH0_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA5_CH0);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA5_CH0_ISR_API == STD_ON) */
#if (ICU_TAUA5_CH1_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH1_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA5_CH1);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA5_CH1_ISR_API == STD_ON) */
#if (ICU_TAUA5_CH2_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH2_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA5_CH2);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA5_CH2_ISR_API == STD_ON) */
#if (ICU_TAUA5_CH3_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH3_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA5_CH3);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA5_CH3_ISR_API == STD_ON) */
#if (ICU_TAUA5_CH4_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH4_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA5_CH4);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA5_CH4_ISR_API == STD_ON) */
#if (ICU_TAUA5_CH5_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH5_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA5_CH5);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA5_CH5_ISR_API == STD_ON) */
#if (ICU_TAUA5_CH6_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH6_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA5_CH6);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA5_CH6_ISR_API == STD_ON) */
#if (ICU_TAUA5_CH7_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH7_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA5_CH7);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA5_CH7_ISR_API == STD_ON) */
#if (ICU_TAUA5_CH8_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH8_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA5_CH8);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA5_CH8_ISR_API == STD_ON) */
#if (ICU_TAUA5_CH9_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH9_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA5_CH9);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA5_CH9_ISR_API == STD_ON) */
#if (ICU_TAUA5_CH10_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH10_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA5_CH10);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA5_CH10_ISR_API == STD_ON) */
#if (ICU_TAUA5_CH11_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH11_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA5_CH11);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA5_CH11_ISR_API == STD_ON) */
#if (ICU_TAUA5_CH12_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH12_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA5_CH12);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA5_CH12_ISR_API == STD_ON) */
#if (ICU_TAUA5_CH13_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH13_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA5_CH13);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA5_CH13_ISR_API == STD_ON) */
#if (ICU_TAUA5_CH14_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH14_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA5_CH14);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA5_CH14_ISR_API == STD_ON) */
#if (ICU_TAUA5_CH15_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH15_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA5_CH15);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA5_CH15_ISR_API == STD_ON) */
#if (ICU_TAUA6_CH0_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH0_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA6_CH0);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA6_CH0_ISR_API == STD_ON) */
#if (ICU_TAUA6_CH1_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH1_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA6_CH1);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA6_CH1_ISR_API == STD_ON) */
#if (ICU_TAUA6_CH2_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH2_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA6_CH2);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA6_CH2_ISR_API == STD_ON) */
#if (ICU_TAUA6_CH3_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH3_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA6_CH3);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA6_CH3_ISR_API == STD_ON) */
#if (ICU_TAUA6_CH4_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH4_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA6_CH4);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA6_CH4_ISR_API == STD_ON) */
#if (ICU_TAUA6_CH5_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH5_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA6_CH5);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA6_CH5_ISR_API == STD_ON) */
#if (ICU_TAUA6_CH6_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH6_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA6_CH6);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA6_CH6_ISR_API == STD_ON) */
#if (ICU_TAUA6_CH7_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH7_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA6_CH7);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA6_CH7_ISR_API == STD_ON) */
#if (ICU_TAUA6_CH8_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH8_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA6_CH8);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA6_CH8_ISR_API == STD_ON) */
#if (ICU_TAUA6_CH9_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH9_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA6_CH9);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA6_CH9_ISR_API == STD_ON) */
#if (ICU_TAUA6_CH10_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH10_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA6_CH10);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA6_CH10_ISR_API == STD_ON) */
#if (ICU_TAUA6_CH11_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH11_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA6_CH11);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA6_CH11_ISR_API == STD_ON) */
#if (ICU_TAUA6_CH12_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH12_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA6_CH12);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA6_CH12_ISR_API == STD_ON) */
#if (ICU_TAUA6_CH13_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH13_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA6_CH13);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA6_CH13_ISR_API == STD_ON) */
#if (ICU_TAUA6_CH14_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH14_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA6_CH14);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA6_CH14_ISR_API == STD_ON) */
#if (ICU_TAUA6_CH15_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH15_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA6_CH15);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA6_CH15_ISR_API == STD_ON) */
#if (ICU_TAUA7_CH0_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH0_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA7_CH0);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA7_CH0_ISR_API == STD_ON) */
#if (ICU_TAUA7_CH1_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH1_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA7_CH1);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA7_CH1_ISR_API == STD_ON) */
#if (ICU_TAUA7_CH2_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH2_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA7_CH2);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA7_CH2_ISR_API == STD_ON) */
#if (ICU_TAUA7_CH3_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH3_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA7_CH3);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA7_CH3_ISR_API == STD_ON) */
#if (ICU_TAUA7_CH4_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH4_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA7_CH4);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA7_CH4_ISR_API == STD_ON) */
#if (ICU_TAUA7_CH5_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH5_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA7_CH5);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA7_CH5_ISR_API == STD_ON) */
#if (ICU_TAUA7_CH6_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH6_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA7_CH6);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA7_CH6_ISR_API == STD_ON) */
#if (ICU_TAUA7_CH7_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH7_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA7_CH7);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA7_CH7_ISR_API == STD_ON) */
#if (ICU_TAUA7_CH8_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH8_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA7_CH8);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA7_CH8_ISR_API == STD_ON) */
#if (ICU_TAUA7_CH9_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH9_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA7_CH9);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA7_CH9_ISR_API == STD_ON) */
#if (ICU_TAUA7_CH10_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH10_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA7_CH10);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA7_CH10_ISR_API == STD_ON) */
#if (ICU_TAUA7_CH11_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH11_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA7_CH11);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA7_CH11_ISR_API == STD_ON) */
#if (ICU_TAUA7_CH12_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH12_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA7_CH12);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA7_CH12_ISR_API == STD_ON) */
#if (ICU_TAUA7_CH13_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH13_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA7_CH13);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA7_CH13_ISR_API == STD_ON) */
#if (ICU_TAUA7_CH14_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH14_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA7_CH14);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA7_CH14_ISR_API == STD_ON) */
#if (ICU_TAUA7_CH15_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH15_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA7_CH15);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA7_CH15_ISR_API == STD_ON) */
#if (ICU_TAUA8_CH0_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH0_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA8_CH0);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA8_CH0_ISR_API == STD_ON) */
#if (ICU_TAUA8_CH1_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH1_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA8_CH1);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA8_CH1_ISR_API == STD_ON) */
#if (ICU_TAUA8_CH2_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH2_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA8_CH2);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA8_CH2_ISR_API == STD_ON) */
#if (ICU_TAUA8_CH3_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH3_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA8_CH3);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA8_CH3_ISR_API == STD_ON) */
#if (ICU_TAUA8_CH4_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH4_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA8_CH4);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA8_CH4_ISR_API == STD_ON) */
#if (ICU_TAUA8_CH5_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH5_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA8_CH5);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA8_CH5_ISR_API == STD_ON) */
#if (ICU_TAUA8_CH6_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH6_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA8_CH6);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA8_CH6_ISR_API == STD_ON) */
#if (ICU_TAUA8_CH7_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH7_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA8_CH7);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA8_CH7_ISR_API == STD_ON) */
#if (ICU_TAUA8_CH8_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH8_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA8_CH8);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA8_CH8_ISR_API == STD_ON) */
#if (ICU_TAUA8_CH9_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH9_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA8_CH9);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA8_CH9_ISR_API == STD_ON) */
#if (ICU_TAUA8_CH10_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH10_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA8_CH10);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA8_CH10_ISR_API == STD_ON) */
#if (ICU_TAUA8_CH11_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH11_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA8_CH11);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA8_CH11_ISR_API == STD_ON) */
#if (ICU_TAUA8_CH12_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH12_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA8_CH12);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA8_CH12_ISR_API == STD_ON) */
#if (ICU_TAUA8_CH13_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH13_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA8_CH13);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA8_CH13_ISR_API == STD_ON) */
#if (ICU_TAUA8_CH14_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH14_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA8_CH14);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA8_CH14_ISR_API == STD_ON) */
#if (ICU_TAUA8_CH15_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH15_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUA8_CH15);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUA8_CH15_ISR_API == STD_ON) */
/*******************************************************************************
** Function Name : TAUBn_CHm_ISR
**
** Service ID : None
**
** Description : These are Interrupt Service routines for the Timer
** TAUB, where n represents TAU number and
** m represents channel number associated with each
** TAU.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
**
** Function(s) invoked:
** Icu_TimerIsr
**
*******************************************************************************/
#if (ICU_TAUB1_CH0_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH0_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB1_CH0);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB1_CH0_ISR_API == STD_ON) */
#if (ICU_TAUB1_CH1_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH1_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB1_CH1);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB1_CH1_ISR_API == STD_ON) */
#if (ICU_TAUB1_CH2_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH2_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB1_CH2);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB1_CH2_ISR_API == STD_ON) */
#if (ICU_TAUB1_CH3_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH3_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB1_CH3);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB1_CH3_ISR_API == STD_ON) */
#if (ICU_TAUB1_CH4_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH4_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB1_CH4);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB1_CH4_ISR_API == STD_ON) */
#if (ICU_TAUB1_CH5_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH5_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB1_CH5);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB1_CH5_ISR_API == STD_ON) */
#if (ICU_TAUB1_CH6_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH6_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB1_CH6);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB1_CH6_ISR_API == STD_ON) */
#if (ICU_TAUB1_CH7_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH7_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB1_CH7);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB1_CH7_ISR_API == STD_ON) */
#if (ICU_TAUB1_CH8_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH8_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB1_CH8);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB1_CH8_ISR_API == STD_ON) */
#if (ICU_TAUB1_CH9_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH9_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB1_CH9);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB1_CH9_ISR_API == STD_ON) */
#if (ICU_TAUB1_CH10_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH10_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB1_CH10);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB1_CH10_ISR_API == STD_ON) */
#if (ICU_TAUB1_CH11_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH11_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB1_CH11);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB1_CH11_ISR_API == STD_ON) */
#if (ICU_TAUB1_CH12_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH12_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB1_CH12);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB1_CH12_ISR_API == STD_ON) */
#if (ICU_TAUB1_CH13_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH13_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB1_CH13);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB1_CH13_ISR_API == STD_ON) */
#if (ICU_TAUB1_CH14_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH14_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB1_CH14);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB1_CH14_ISR_API == STD_ON) */
#if (ICU_TAUB1_CH15_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH15_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB1_CH15);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB1_CH15_ISR_API == STD_ON) */
#if (ICU_TAUB2_CH0_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH0_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB2_CH0);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB2_CH0_ISR_API == STD_ON) */
#if (ICU_TAUB2_CH1_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH1_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB2_CH1);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB2_CH1_ISR_API == STD_ON) */
#if (ICU_TAUB2_CH2_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH2_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB2_CH2);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB2_CH2_ISR_API == STD_ON) */
#if (ICU_TAUB2_CH3_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH3_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB2_CH3);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB2_CH3_ISR_API == STD_ON) */
#if (ICU_TAUB2_CH4_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH4_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB2_CH4);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB2_CH4_ISR_API == STD_ON) */
#if (ICU_TAUB2_CH5_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH5_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB2_CH5);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB2_CH5_ISR_API == STD_ON) */
#if (ICU_TAUB2_CH6_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH6_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB2_CH6);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB2_CH6_ISR_API == STD_ON) */
#if (ICU_TAUB2_CH7_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH7_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB2_CH7);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB2_CH7_ISR_API == STD_ON) */
#if (ICU_TAUB2_CH8_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH8_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB2_CH8);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB2_CH8_ISR_API == STD_ON) */
#if (ICU_TAUB2_CH9_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH9_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB2_CH9);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB2_CH9_ISR_API == STD_ON) */
#if (ICU_TAUB2_CH10_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH10_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB2_CH10);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB2_CH10_ISR_API == STD_ON) */
#if (ICU_TAUB2_CH11_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH11_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB2_CH11);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB2_CH11_ISR_API == STD_ON) */
#if (ICU_TAUB2_CH12_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH12_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB2_CH12);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB2_CH12_ISR_API == STD_ON) */
#if (ICU_TAUB2_CH13_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH13_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB2_CH13);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB2_CH13_ISR_API == STD_ON) */
#if (ICU_TAUB2_CH14_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH14_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB2_CH14);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB2_CH14_ISR_API == STD_ON) */
#if (ICU_TAUB2_CH15_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH15_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUB2_CH15);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUB2_CH15_ISR_API == STD_ON) */
#if (ICU_TAUJ0_CH0_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ0_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ0_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUJ0_CH0_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUJ0_CH0);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUJ0_CH0_ISR_API == STD_ON) */
#if (ICU_TAUJ0_CH1_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ0_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ0_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUJ0_CH1_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUJ0_CH1);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUJ0_CH1_ISR_API == STD_ON) */
#if (ICU_TAUJ0_CH2_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ0_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ0_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUJ0_CH2_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUJ0_CH2);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUJ0_CH2_ISR_API == STD_ON) */
#if (ICU_TAUJ0_CH3_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ0_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ0_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUJ0_CH3_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUJ0_CH3);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUJ0_CH3_ISR_API == STD_ON) */
#if (ICU_TAUJ1_CH0_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ1_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ1_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUJ1_CH0_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUJ1_CH0);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUJ1_CH0_ISR_API == STD_ON) */
#if (ICU_TAUJ1_CH1_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ1_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ1_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUJ1_CH1_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUJ1_CH1);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUJ1_CH1_ISR_API == STD_ON) */
#if (ICU_TAUJ1_CH2_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ1_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ1_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUJ1_CH2_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUJ1_CH2);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUJ1_CH2_ISR_API == STD_ON) */
#if (ICU_TAUJ1_CH3_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ1_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ1_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUJ1_CH3_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUJ1_CH3);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUJ1_CH3_ISR_API == STD_ON) */
#if (ICU_TAUJ2_CH0_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ2_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ2_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUJ2_CH0_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUJ2_CH0);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUJ2_CH0_ISR_API == STD_ON) */
#if (ICU_TAUJ2_CH1_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ2_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ2_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUJ2_CH1_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUJ2_CH1);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUJ2_CH1_ISR_API == STD_ON) */
#if (ICU_TAUJ2_CH2_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ2_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ2_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUJ2_CH2_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUJ2_CH2);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUJ2_CH2_ISR_API == STD_ON) */
#if (ICU_TAUJ2_CH3_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ2_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ2_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) TAUJ2_CH3_ISR(void)
#endif
{
Icu_TimerIsr(ICU_TAUJ2_CH3);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_TAUJ2_CH3_ISR_API == STD_ON) */
/*******************************************************************************
** Function Name : EXTERNAL_INTERRUPT_n_ISR
**
** Service ID : None
**
** Description : These are Interrupt Service routines for the External
** Interrupts where n represents instances of external
** interrupts (0 to 15).
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
**
** Function(s) invoked:
** Icu_ExternalInterruptIsr
**
*******************************************************************************/
#if (ICU_EXT_INTP_0_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(EXTERNAL_INTERRUPT_0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_0_ISR(void)
#endif
{
Icu_ExternalInterruptIsr(ICU_EXTP_INTP_0);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_EXT_INTP_0_ISR_API == STD_ON) */
#if (ICU_EXT_INTP_1_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(EXTERNAL_INTERRUPT_1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_1_ISR(void)
#endif
{
Icu_ExternalInterruptIsr(ICU_EXTP_INTP_1);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_EXT_INTP_1_ISR_API == STD_ON) */
#if (ICU_EXT_INTP_2_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(EXTERNAL_INTERRUPT_2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_2_ISR(void)
#endif
{
Icu_ExternalInterruptIsr(ICU_EXTP_INTP_2);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_EXT_INTP_2_ISR_API == STD_ON) */
#if (ICU_EXT_INTP_3_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(EXTERNAL_INTERRUPT_3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_3_ISR(void)
#endif
{
Icu_ExternalInterruptIsr(ICU_EXTP_INTP_3);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_EXT_INTP_3_ISR_API == STD_ON) */
#if (ICU_EXT_INTP_4_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(EXTERNAL_INTERRUPT_4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_4_ISR(void)
#endif
{
Icu_ExternalInterruptIsr(ICU_EXTP_INTP_4);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_EXT_INTP_4_ISR_API == STD_ON) */
#if (ICU_EXT_INTP_5_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(EXTERNAL_INTERRUPT_5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_5_ISR(void)
#endif
{
Icu_ExternalInterruptIsr(ICU_EXTP_INTP_5);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_EXT_INTP_5_ISR_API == STD_ON) */
#if (ICU_EXT_INTP_6_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(EXTERNAL_INTERRUPT_6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_6_ISR(void)
#endif
{
Icu_ExternalInterruptIsr(ICU_EXTP_INTP_6);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_EXT_INTP_6_ISR_API == STD_ON) */
#if (ICU_EXT_INTP_7_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(EXTERNAL_INTERRUPT_7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_7_ISR(void)
#endif
{
Icu_ExternalInterruptIsr(ICU_EXTP_INTP_7);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_EXT_INTP_7_ISR_API == STD_ON) */
#if (ICU_EXT_INTP_8_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(EXTERNAL_INTERRUPT_8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_8_ISR(void)
#endif
{
Icu_ExternalInterruptIsr(ICU_EXTP_INTP_8);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_EXT_INTP_8_ISR_API == STD_ON) */
#if (ICU_EXT_INTP_9_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(EXTERNAL_INTERRUPT_9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_9_ISR(void)
#endif
{
Icu_ExternalInterruptIsr(ICU_EXTP_INTP_9);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_EXT_INTP_9_ISR_API == STD_ON) */
#if (ICU_EXT_INTP_10_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(EXTERNAL_INTERRUPT_10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_10_ISR(void)
#endif
{
Icu_ExternalInterruptIsr(ICU_EXTP_INTP_10);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_EXT_INTP_10_ISR_API == STD_ON) */
#if (ICU_EXT_INTP_11_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(EXTERNAL_INTERRUPT_11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_11_ISR(void)
#endif
{
Icu_ExternalInterruptIsr(ICU_EXTP_INTP_11);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_EXT_INTP_11_ISR_API == STD_ON) */
#if (ICU_EXT_INTP_12_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(EXTERNAL_INTERRUPT_12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_12_ISR(void)
#endif
{
Icu_ExternalInterruptIsr(ICU_EXTP_INTP_12);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_EXT_INTP_12_ISR_API == STD_ON) */
#if (ICU_EXT_INTP_13_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(EXTERNAL_INTERRUPT_13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_13_ISR(void)
#endif
{
Icu_ExternalInterruptIsr(ICU_EXTP_INTP_13);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_EXT_INTP_13_ISR_API == STD_ON) */
#if (ICU_EXT_INTP_14_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(EXTERNAL_INTERRUPT_14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_14_ISR(void)
#endif
{
Icu_ExternalInterruptIsr(ICU_EXTP_INTP_14);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_EXT_INTP_14_ISR_API == STD_ON) */
#if (ICU_EXT_INTP_15_ISR_API == STD_ON)
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(EXTERNAL_INTERRUPT_15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_15_ISR(void)
#endif
{
Icu_ExternalInterruptIsr(ICU_EXTP_INTP_15);
}
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (ICU_EXT_INTP_15_ISR_API == STD_ON) */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Generic/V850_Types/mak/necv850_types_defs.mak
# REGISTRY
#######################################################################
#
CC_INCLUDE_PATH += $(NECV850TYPES_CORE_PATH)\inc
CPP_INCLUDE_PATH +=
ASM_INCLUDE_PATH +=
PREPROCESSOR_DEFINES +=
#######################################################################
<file_sep>/BSP/MCAL/Icu/Icu.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Icu.h */
/* Version = 3.0.3a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains macros, ICU type definitions, structure data types and */
/* API function prototypes of ICU Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 26-Aug-2009 : Initial version
*
* V3.0.1: 29-Oct-2009 : As per SCR 074, 'Std_Types.h' is included.
*
* V3.0.2: 28-Jun-2010 : As per SCR 286, structure "Icu_ConfigType" is
* updated to support Timer Array Unit B.
*
* V3.0.3: 20-Jul-2010 : As per SCR 308, the structure 'Icu_ConfigType' is
* updated with pre-compile options for timer channels.
* V3.0.3a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
#ifndef ICU_H
#define ICU_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Std_Types.h" /* AUTOSAR standard types */
#include "Icu_Cfg.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define ICU_AR_MAJOR_VERSION ICU_AR_MAJOR_VERSION_VALUE
#define ICU_AR_MINOR_VERSION ICU_AR_MINOR_VERSION_VALUE
#define ICU_AR_PATCH_VERSION ICU_AR_PATCH_VERSION_VALUE
/*
* File version information
*/
#define ICU_SW_MAJOR_VERSION ICU_SW_MAJOR_VERSION_VALUE
#define ICU_SW_MINOR_VERSION ICU_SW_MINOR_VERSION_VALUE
#define ICU_SW_PATCH_VERSION ICU_SW_PATCH_VERSION_VALUE
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Vendor and Module IDs */
#define ICU_VENDOR_ID ICU_VENDOR_ID_VALUE
#define ICU_MODULE_ID ICU_MODULE_ID_VALUE
#define ICU_INSTANCE_ID ICU_INSTANCE_ID_VALUE
/* Service IDs */
/* Service ID of Icu_Init */
#define ICU_INIT_SID (uint8)0x00
/* Service ID of Icu_DeInit */
#define ICU_DEINIT_SID (uint8)0x01
/* Service ID of Icu_SetMode */
#define ICU_SET_MODE_SID (uint8)0x02
/* Service ID of Icu_DisableWakeup */
#define ICU_DISABLE_WAKEUP_SID (uint8)0x03
/* Service ID of Icu_EnableWakeup */
#define ICU_ENABLE_WAKEUP_SID (uint8)0x04
/* Service ID of Icu_SetActivationCondition */
#define ICU_SET_ACTIVATION_CONDITION_SID (uint8)0x05
/* Service ID of Icu_DisableNotification */
#define ICU_DISABLE_NOTIFICATION_SID (uint8)0x06
/* Service ID of Icu_EnableNotification */
#define ICU_ENABLE_NOTIFICATION_SID (uint8)0x07
/* Service ID of Icu_GetInputState */
#define ICU_GET_INPUT_STATE_SID (uint8)0x08
/* Service ID of Icu_StartTimestamp */
#define ICU_START_TIMESTAMP_SID (uint8)0x09
/* Service ID of Icu_StopTimestamp */
#define ICU_STOP_TIMESTAMP_SID (uint8)0x0A
/* Service ID of Icu_GetTimestampIndex */
#define ICU_GET_TIMESTAMP_INDEX_SID (uint8)0x0B
/* Service ID of Icu_ResetEdgeCount */
#define ICU_RESET_EDGE_COUNT_SID (uint8)0x0C
/* Service ID of Icu_EnableEdgeCount */
#define ICU_ENABLE_EDGE_COUNT_SID (uint8)0x0D
/* Service ID of Icu_DisableEdgeCount */
#define ICU_DISABLE_EDGE_COUNT_SID (uint8)0x0E
/* Service ID of Icu_GetEdgeNumbers */
#define ICU_GET_EDGE_NUMBERS_SID (uint8)0x0F
/* Service ID of Icu_GetTimeElapsed */
#define ICU_GET_TIME_ELAPSED_SID (uint8)0x10
/* Service ID of Icu_GetDutyCycleValues */
#define ICU_GET_DUTY_CYCLE_VALUES_SID (uint8)0x11
/* Service ID of Icu_GetVersionInfo */
#define ICU_GET_VERSION_INFO_SID (uint8)0x12
/* Service ID of Icu_StartSignalMeasurement */
#define ICU_START_SIGNAL_MEASUREMENT_SID (uint8)0x13
/* Service ID of Icu_StopSignalMeasurement */
#define ICU_STOP_SIGNAL_MEASUREMENT_SID (uint8)0x14
/*******************************************************************************
** DET Error Codes **
*******************************************************************************/
/* DET code to report a wrong parameter passed to Icu_Init API
*/
#define ICU_E_PARAM_CONFIG (uint8)0x0A
/* DET code to report that API service used with an invalid Channel Identifier
* or Channel is not configured for the functionality of the calling API.
*/
#define ICU_E_PARAM_CHANNEL (uint8)0x0B
/* DET code to report that API service used with an invalid
* or not feasible activation.
*/
#define ICU_E_PARAM_ACTIVATION (uint8)0x0C
/* DET code to report that API service used with an invalid
* application-buffer pointer.
*/
#define ICU_E_PARAM_BUFFER_PTR (uint8)0x0D
/* DET code to report that API service used with an invalid buffer size
*/
#define ICU_E_PARAM_BUFFER_SIZE (uint8)0x0E
/* DET code to report that API service Icu_SetMode used
* with an invalid operation mode
*/
#define ICU_E_PARAM_MODE (uint8)0x0F
/* DET code to report that API service used without module initialization
*/
#define ICU_E_UNINIT (uint8)0x14
/* DET code to report that the API Icu_StopTimestamp used
* on a channel which was not started or already stopped.
*/
#define ICU_E_NOT_STARTED (uint8)0x15
/* DET code to report that the API Icu_SetMode used
* during a running operation.
*/
#define ICU_E_BUSY_OPERATION (uint8)0x16
/* DET code to report that ICU is already initialized
* when Icu_Init() is called
*/
#define ICU_E_ALREADY_INITIALIZED (uint8)0x17
/* API service Icu_Init called without a database is reported using following
* error code
*/
#define ICU_E_INVALID_DATABASE (uint8)0xEF
/* DET code to report that the API Icu_GetVersionInfo invoked
* with a null pointer.
*/
#define ICU_E_PARAM_POINTER (uint8)0xF0
/* DET code to report that Icu API service Icu_DisableNotification
* is invoked for the channelfor which the notification is already disabled
*/
#define ICU_E_ALREADY_DISABLED (uint8)0xF1
/* DET code to report that Icu API service Icu_EnableNotification
* is invoked for the channelfor which the notification is already enabled
*/
#define ICU_E_ALREADY_ENABLED (uint8)0xF2
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Numeric identifier of an ICU Channel */
typedef uint8 Icu_ChannelType;
/* Definition of the type of activation of an ICU Channel */
typedef enum Icu_ActivationType
{
ICU_FALLING_EDGE,
ICU_RISING_EDGE,
ICU_BOTH_EDGES
} Icu_ActivationType;
/* Width of the buffer for storing time in terms of timer ticks */
typedef uint32 Icu_ValueType;
/* Input state of an ICU channel */
typedef enum Icu_InputStateType
{
ICU_IDLE,
ICU_ACTIVE
} Icu_InputStateType;
/* Operation Mode of the ICU Module */
typedef enum Icu_ModeType
{
ICU_MODE_NORMAL,
ICU_MODE_SLEEP
} Icu_ModeType;
/* Type which contains the values needed for calculating duty cycles */
typedef struct STag_Icu_DutyCycleType
{
Icu_ValueType ActiveTime;
Icu_ValueType PeriodTime;
} Icu_DutyCycleType;
/* Type to abstract the return value of the service Icu_GetTimestampIndex() */
typedef uint16 Icu_IndexType;
/* Type to abstract the return value of the service Icu_GetEdgeNumbers() */
typedef uint16 Icu_EdgeNumberType;
/* Definition of the measurement mode type */
typedef enum Icu_MeasurementModeType
{
ICU_MODE_SIGNAL_EDGE_DETECT,
ICU_MODE_SIGNAL_MEASUREMENT,
ICU_MODE_TIMESTAMP,
ICU_MODE_EDGE_COUNTER
} Icu_MeasurementModeType;
/* Definition of the signal measurement property type */
typedef enum Icu_SignalMeasurementPropertyType
{
ICU_LOW_TIME,
ICU_HIGH_TIME,
ICU_PERIOD_TIME,
ICU_DUTY_CYCLE
} Icu_SignalMeasurementPropertyType;
/* Definition of the timestamp measurement property type */
typedef enum Icu_TimestampBufferType
{
ICU_LINEAR_BUFFER,
ICU_CIRCULAR_BUFFER
} Icu_TimestampBufferType;
/* Data Structure for ICU for Initializing the ICU Module */
typedef struct STagTdd_Icu_ConfigType
{
/* Database start value */
uint32 ulStartOfDbToc;
/* Pointer to ICU driver channel configuration */
P2CONST(void, AUTOMATIC, ICU_CONFIG_CONST) pChannelConfig;
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)||\
(ICU_TAUB_UNIT_USED == STD_ON))
/* Pointer to ICU driver Timer channel configuration */
P2CONST(void, AUTOMATIC, ICU_CONFIG_CONST) pTimerChannelConfig;
/* Pointer to ICU hardware unit configuration */
P2CONST(void, AUTOMATIC, ICU_CONFIG_CONST) pHWUnitConfig;
#endif
/* Pointer to Previous input configuration */
#if(ICU_PREVIOUS_INPUT_USED == STD_ON)
P2CONST(void, AUTOMATIC, ICU_CONFIG_CONST) pPrevInputConfig;
#endif
/* Pointer to the address of internal RAM data */
P2VAR (void, AUTOMATIC, ICU_CONFIG_DATA) pRamAddress;
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)||\
(ICU_TAUB_UNIT_USED == STD_ON))
/* Pointer to the address of Signal Measure RAM data */
P2VAR (void, AUTOMATIC, ICU_CONFIG_DATA) pSignalMeasureAddress;
/* Pointer to the address of TimeStamp RAM data */
P2VAR (void, AUTOMATIC, ICU_CONFIG_DATA) pTimeStampAddress;
/* Pointer to the address of Edge Count RAM data */
P2VAR (void, AUTOMATIC, ICU_CONFIG_DATA) pEdgeCountRamAddress;
#endif
/* Pointer variable for ICU Channel Map */
P2CONST(uint8, ICU_CONST, ICU_CONFIG_CONST) pChannelMap;
} Icu_ConfigType;
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, ICU_PUBLIC_CODE) Icu_Init
(P2CONST(Icu_ConfigType, AUTOMATIC, ICU_APPL_CONST) ConfigPtr);
#if (ICU_DE_INIT_API == STD_ON)
extern FUNC(void, ICU_PUBLIC_CODE) Icu_DeInit(void);
#endif
#if (ICU_SET_MODE_API == STD_ON)
extern FUNC(void, ICU_PUBLIC_CODE) Icu_SetMode(Icu_ModeType Mode);
#endif
#if (ICU_DISABLE_WAKEUP_API == STD_ON)
extern FUNC(void, ICU_PUBLIC_CODE) Icu_DisableWakeup(Icu_ChannelType Channel);
#endif
#if(ICU_ENABLE_WAKEUP_API == STD_ON)
extern FUNC(void, ICU_PUBLIC_CODE) Icu_EnableWakeup(Icu_ChannelType Channel);
#endif
extern FUNC(void, ICU_PUBLIC_CODE) Icu_SetActivationCondition
(Icu_ChannelType Channel, Icu_ActivationType Activation);
extern FUNC(void, ICU_PUBLIC_CODE) Icu_DisableNotification
(Icu_ChannelType Channel);
extern FUNC(void, ICU_PUBLIC_CODE) Icu_EnableNotification
(Icu_ChannelType Channel);
#if (ICU_GET_INPUT_STATE_API == STD_ON)
extern FUNC(Icu_InputStateType, ICU_PUBLIC_CODE) Icu_GetInputState
(Icu_ChannelType Channel);
#endif
#if (ICU_TIMESTAMP_API == STD_ON)
extern FUNC(void, ICU_PUBLIC_CODE) Icu_StartTimestamp(Icu_ChannelType Channel,
P2VAR (Icu_ValueType, AUTOMATIC, ICU_APPL_DATA)BufferPtr,
uint16 BufferSize, uint16 NotifyInterval);
extern FUNC(void, ICU_PUBLIC_CODE) Icu_StopTimestamp (Icu_ChannelType Channel);
extern FUNC(Icu_IndexType, ICU_PUBLIC_CODE) Icu_GetTimestampIndex
(Icu_ChannelType Channel);
#endif
#if(ICU_EDGE_COUNT_API == STD_ON)
extern FUNC(void, ICU_PUBLIC_CODE) Icu_ResetEdgeCount(Icu_ChannelType Channel);
extern FUNC(void, ICU_PUBLIC_CODE) Icu_EnableEdgeCount(Icu_ChannelType Channel);
extern FUNC(void, ICU_PUBLIC_CODE) Icu_DisableEdgeCount
(Icu_ChannelType Channel);
extern FUNC(Icu_EdgeNumberType, ICU_PUBLIC_CODE) Icu_GetEdgeNumbers
(Icu_ChannelType Channel);
#endif
#if (ICU_SIGNAL_MEASUREMENT_API == STD_ON)
extern FUNC(void, ICU_PUBLIC_CODE) Icu_StartSignalMeasurement
(Icu_ChannelType Channel);
extern FUNC(void, ICU_PUBLIC_CODE) Icu_StopSignalMeasurement
(Icu_ChannelType Channel);
#endif
#if(ICU_GET_TIME_ELAPSED_API == STD_ON)
extern FUNC(Icu_ValueType, ICU_PUBLIC_CODE) Icu_GetTimeElapsed
(Icu_ChannelType Channel);
#endif
#if (ICU_GET_DUTY_CYCLE_VALUES_API == STD_ON)
extern FUNC(void, ICU_PUBLIC_CODE)
Icu_GetDutyCycleValues(Icu_ChannelType Channel,
P2VAR(Icu_DutyCycleType, AUTOMATIC, ICU_APPL_DATA) DutyCycleValues);
#endif
#if (ICU_GET_VERSION_INFO_API == STD_ON)
extern FUNC(void, ICU_PUBLIC_CODE)Icu_GetVersionInfo
(P2VAR(Std_VersionInfoType, AUTOMATIC, ICU_APPL_DATA) versioninfo);
#endif
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define ICU_START_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
/* Declaration for ICU Database */
extern CONST(Icu_ConfigType, ICU_CONST) Icu_GstConfiguration[];
#define ICU_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
#endif /* ICU_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/APP/LEDLightControl/LEDLightControlRTE.h
#ifndef _LEDLightControlRTE_H
#define _LEDLightControlRTE_H
#include "Std_Types.h"
void GetParkLampSwitch(void);
BOOL GetLowBeamSwitch(void);
BOOL GetHighBeamSwitch(void);
BOOL GetDRLSwitch(void);
BOOL GetTurnLampSwitch(void);
BOOL GetCornerLampSwitch(void);
BOOL GetCornerLampSwitch(void);
BOOL GetCityModeSwitchSwitch(void);
BOOL GetHighSpeedModeSwitchSwitch(void);
BOOL GetBadWeatherModeSwitchSwitch(void);
void SetParkLampOut(void);
BOOL GetParkLampOut(void);
void ClrParkLampOut(void);
void SetDRLOut(void);
BOOL GetDRLOut(void);
void ClrDRLOut(void);
void SetHighBeamOut(void);
BOOL GetHighBeamOut(void);
void ClrHighBeamOut(void);
void SetLowBeamOut(void);
BOOL GetLowBeamOut(void);
void ClrLowBeamOut(void);
void SetTurnLampOut(void);
BOOL GetTurnLampOut(void);
void ClrTurnLampOut(void);
void SetCornerLampOut(void);
BOOL GetCornerLampOut(void);
void ClrCornerLampOut(void);
void SetCityModeOut(void);
BOOL GetCityModeOut(void);
void ClrCityModeOut(void);
void SetHighSpeedModeOut(void);
BOOL GetHighSpeedModeOut(void);
void ClrHighSpeedModeOut(void);
void SetBadWeatherModeOut(void);
BOOL GetBadWeatherModeOut(void);
void ClrBadWeatherModeOut(void);
#endif
<file_sep>/BSP/MCAL/Adc/Adc_Ram.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Adc_Ram.c */
/* Version = 3.1.4 */
/* Date = 20-Mar-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2013 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Global variable definitions */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 10-Jul-2009 : Initial version
*
* V3.0.1: 12-Oct-2009 : As per SCR 052, the following changes are made
* 1. Template changes are made.
* 2. Arrays Adc_GaaOperationClrMask and
* Adc_GaaExtTrigClrMask are removed.
* 3. Variables Adc_GaaOperationMask and
* Adc_GucMaxDmaChannels are added.
*
* V3.0.2: 05-Nov-2009 : As per SCR 088, MISRA comment is added
*
* V3.0.3: 02-Dec-2009 : As per SCR 157, the following changes are made
* 1. Adc_GpRunTimeData declaration is changed.
* 2. Adc_GucPopFrmQueue is put within pre-compile
* option.
* 3. Adc_GpDmaHWUnitMapping, Adc_GpDmaCGUnitMapping
* are added.
*
* V3.0.4: 05-Jan-2010 : As per SCR 179, Adc_GucResultRead and
* Adc_GblSampleComp are deleted.
*
* V3.0.5: 01-Jul-2010 : As per SCR 295, Adc_GaaStreamEnableMask[],
* Adc_GaaOperationMask[] and
* Adc_GaaCGmConvStatusMask[] are moved to individual
* files where they are used.
*
* V3.1.0: 27-Jul-2011 : Modified for DK-4
* V3.1.1: 04-Oct-2011 : Added comments for the violation of MISRA rule 19.1
* V3.1.2: 14-Feb-2012 : Merged the fixes done for Fx4L Adc driver
*
* V3.1.3: 04-Jun-2012 : As per SCR 019, the following changes are made
* 1. Compiler version is removed from environment
* section.
* 2. File version is changed.
* V3.1.4: 20-Mar-2013 : As per SCR 083, the following changes are made
* 1. "Adc_GaaHwUnitStatus" is added.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Adc.h"
#include "Adc_PBTypes.h"
#include "Adc_LTTypes.h"
#include "Adc_Ram.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification version information */
#define ADC_RAM_C_AR_MAJOR_VERSION ADC_AR_MAJOR_VERSION_VALUE
#define ADC_RAM_C_AR_MINOR_VERSION ADC_AR_MINOR_VERSION_VALUE
#define ADC_RAM_C_AR_PATCH_VERSION ADC_AR_PATCH_VERSION_VALUE
/* File version information */
#define ADC_RAM_C_SW_MAJOR_VERSION 3
#define ADC_RAM_C_SW_MINOR_VERSION 1
#define ADC_RAM_C_SW_PATCH_VERSION 3
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (ADC_RAM_AR_MAJOR_VERSION != ADC_RAM_C_AR_MAJOR_VERSION)
#error "Adc_Ram.c : Mismatch in Specification Major Version"
#endif
#if (ADC_RAM_AR_MINOR_VERSION != ADC_RAM_C_AR_MINOR_VERSION)
#error "Adc_Ram.c : Mismatch in Specification Minor Version"
#endif
#if (ADC_RAM_AR_PATCH_VERSION != ADC_RAM_C_AR_PATCH_VERSION)
#error "Adc_Ram.c : Mismatch in Specification Patch Version"
#endif
#if (ADC_RAM_SW_MAJOR_VERSION != ADC_RAM_C_SW_MAJOR_VERSION)
#error "Adc_Ram.c : Mismatch in Major Version"
#endif
#if (ADC_RAM_SW_MINOR_VERSION != ADC_RAM_C_SW_MINOR_VERSION)
#error "Adc_Ram.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
#define ADC_START_SEC_VAR_NOINIT_UNSPECIFIED
/* MISRA Rule : 19.1 */
/* Message : #include statements in a file */
/* should only be preceded by other*/
/* preprocessor directives or */
/* comments. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
#include "MemMap.h"
/* MISRA Rule : 8.5 */
/* Message : There shall be no definitions of*/
/* : objects or functions in a */
/* : header file */
/* Reason : Extern declaration is given */
/* : in the header file Adc_Ram.h */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Global database pointer */
P2CONST(Adc_ConfigType, ADC_CONST, ADC_CONFIG_CONST)
Adc_GpConfigPtr;
/* Global pointer variable for hardware unit configuration */
P2CONST(Tdd_Adc_HwUnitConfigType, ADC_CONST, ADC_CONFIG_CONST)
Adc_GpHwUnitConfig;
/* Global pointer variable for group configuration */
P2CONST(Tdd_Adc_GroupConfigType, ADC_CONST, ADC_CONFIG_CONST)
Adc_GpGroupConfig;
#if (ADC_HW_TRIGGER_API == STD_ON)
/* Global pointer variable for HW group configuration */
P2CONST(Tdd_Adc_HWGroupTriggType, ADC_CONST, ADC_CONFIG_CONST)
Adc_GpHWGroupTrigg;
#endif
#if (ADC_DMA_MODE_ENABLE == STD_ON)
/* Global pointer variable for HW group configuration */
P2CONST(Tdd_Adc_DmaUnitConfig, ADC_CONST, ADC_CONFIG_CONST)
Adc_GpDmaUnitConfig;
/* Global pointer to DMA HW unit array mapping */
P2CONST(Adc_HwUnitType, ADC_CONST, ADC_CONFIG_CONST)
Adc_GpDmaHWUnitMapping;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* Global pointer to DMA CG unit array mapping */
P2CONST(uint8, ADC_CONST, ADC_CONFIG_CONST)
Adc_GpDmaCGUnitMapping;
#endif
#endif /* #if (ADC_DMA_MODE_ENABLE == STD_ON) */
/* Global pointer variable for group ram data */
P2VAR(Tdd_Adc_ChannelGroupRamData, ADC_NOINIT_DATA, ADC_CONFIG_DATA)
Adc_GpGroupRamData;
/* Global pointer variable for hardware unit ram data */
P2VAR(Tdd_Adc_HwUnitRamData, ADC_NOINIT_DATA, ADC_CONFIG_DATA)
Adc_GpHwUnitRamData;
/* Global pointer variable for runtime ram data */
P2VAR(Tdd_Adc_RunTimeData, ADC_NOINIT_DATA, ADC_CONFIG_DATA)
Adc_GpRunTimeData;
/* Indicates max no of SW triggered groups configured */
VAR(boolean, ADC_NOINIT_DATA) Adc_GaaHwUnitStatus[10];
#define ADC_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"/* PRQA S 5087 */
#define ADC_START_SEC_VAR_NOINIT_8BIT
#include "MemMap.h"/* PRQA S 5087 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* Indicates the group is popped out of the queue */
VAR(uint8, ADC_NOINIT_DATA) Adc_GucPopFrmQueue;
#endif
/* Indicates max no of SW triggered groups configured */
VAR(uint8, ADC_NOINIT_DATA) Adc_GucMaxSwTriggGroups;
#if (ADC_DMA_MODE_ENABLE == STD_ON)
/* Indicates no of DMA channel Ids configured */
VAR(uint8, ADC_NOINIT_DATA) Adc_GucMaxDmaChannels;
#endif
#define ADC_STOP_SEC_VAR_NOINIT_8BIT
#include "MemMap.h"/* PRQA S 5087 */
#define ADC_START_SEC_VAR_1BIT
#include "MemMap.h"/* PRQA S 5087 */
#if (ADC_DEV_ERROR_DETECT == STD_ON)
/* Holds the status of Initialisation */
VAR(boolean, ADC_INIT_DATA) Adc_GblDriverStatus = ADC_FALSE;
#endif
#define ADC_STOP_SEC_VAR_1BIT
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/APP/LEDLightControl/LEDLightControlRTE.c
#include "Std_Types.h"
#include "IoHwAb_Api.h"
BOOL GetParkLampSwitch(void)
{
BOOL L_Result=false;
L_Result=IoHwAb_ILParkLampControl();
return L_Result;
}
BOOL GetLowBeamSwitch(void)
{
BOOL L_Result=false;
L_Result=IoHwAb_ILLowBeamControl();
return L_Result;
}
BOOL GetHighBeamSwitch(void)
{
BOOL L_Result=false;
L_Result=IoHwAb_ILHighBeamControl();
return L_Result;
}
BOOL GetDRLSwitch(void)
{
BOOL L_Result=false;
L_Result=IoHwAb_ILDRLControl();
return L_Result;
}
BOOL GetTurnLampSwitch(void)
{
BOOL L_Result=false;
L_Result=IoHwAb_ILTurnLeftControl();
return L_Result;
}
BOOL GetCornerLampSwitch(void)
{
BOOL L_Result=false;
L_Result=IoHwAb_ILBendingLeftControl();
return L_Result;
}
BOOL GetCityModeSwitchSwitch(void)
{
BOOL L_Result=false;
L_Result=IoHwAb_ILVLevelCityModeControl();
return L_Result;
}
BOOL GetHighSpeedModeSwitchSwitch(void)
{
BOOL L_Result=false;
L_Result=IoHwAb_ILELevelHighSpeedModeControl();
return L_Result;
}
BOOL GetBadWeatherModeSwitchSwitch(void)
{
BOOL L_Result=false;
L_Result=IoHwAb_ILWLevelBadWeatherControl();
return L_Result;
}
BOOL VeLED_b_ParkLampOutFlg=0;
void SetParkLampOut(void)
{
VeLED_b_ParkLampOutFlg=true;
}
BOOL GetParkLampOut(void)
{
return VeLED_b_ParkLampOutFlg;
}
void ClrParkLampOut(void)
{
VeLED_b_ParkLampOutFlg=false;
}
BOOL VeLED_b_DRLOutFlg=0;
void SetDRLOut(void)
{
VeLED_b_DRLOutFlg=true;
}
BOOL GetDRLOut(void)
{
return VeLED_b_DRLOutFlg;
}
void ClrDRLOut(void)
{
VeLED_b_DRLOutFlg=false;
}
BOOL VeLED_b_HighBeamOutFlg=0;
void SetHighBeamOut(void)
{
VeLED_b_HighBeamOutFlg=true;
}
BOOL GetHighBeamOut(void)
{
return VeLED_b_HighBeamOutFlg;
}
void ClrHighBeamOut(void)
{
VeLED_b_HighBeamOutFlg=false;
}
BOOL VeLED_b_LowBeamOutFlg=0;
void SetLowBeamOut(void)
{
VeLED_b_LowBeamOutFlg=true;
}
BOOL GetLowBeamOut(void)
{
return VeLED_b_LowBeamOutFlg;
}
void ClrLowBeamOut(void)
{
VeLED_b_LowBeamOutFlg=false;
}
BOOL VeLED_b_TurnLampOutFlg=0;
void SetTurnLampOut(void)
{
VeLED_b_TurnLampOutFlg=true;
}
BOOL GetTurnLampOut(void)
{
return VeLED_b_TurnLampOutFlg;
}
void ClrTurnLampOut(void)
{
VeLED_b_TurnLampOutFlg=false;
}
BOOL VeLED_b_CornerLampOutFlg=0;
void SetCornerLampOut(void)
{
VeLED_b_CornerLampOutFlg=true;
}
BOOL GetCornerLampOut(void)
{
return VeLED_b_CornerLampOutFlg;
}
void ClrCornerLampOut(void)
{
VeLED_b_CornerLampOutFlg=false;
}
BOOL VeLED_b_CityModeLampOutFlg=0;
void SetCityModeOut(void)
{
VeLED_b_CityModeLampOutFlg=true;
}
BOOL GetCityModeOut(void)
{
return VeLED_b_CityModeLampOutFlg;
}
void ClrCityModeOut(void)
{
VeLED_b_CityModeLampOutFlg=false;
}
BOOL VeLED_b_HighSpeedLampOutFlg=0;
void SetHighSpeedModeOut(void)
{
VeLED_b_HighSpeedLampOutFlg=true;
}
BOOL GetHighSpeedModeOut(void)
{
return VeLED_b_HighSpeedLampOutFlg;
}
BOOL ClrHighSpeedModeOut(void)
{
VeLED_b_HighSpeedLampOutFlg=false;
}
BOOL VeLED_b_BadWeatherLampOutFlg=0;
void SetBadWeatherModeOut(void)
{
VeLED_b_BadWeatherLampOutFlg=true;
}
BOOL GetBadWeatherModeOut(void)
{
return VeLED_b_BadWeatherLampOutFlg;
}
BOOL ClrBadWeatherModeOut(void)
{
VeLED_b_BadWeatherLampOutFlg=false;
}
<file_sep>/BSP/MCAL/Generic/Compiler/GHS/V516c/Compiler_Config/mak/ghs_necv850_defs.mak
################################################################################
# INTERNAL REQUIRED CONFIGURATION
#
# COMPILER_INSTALL_DIR
#
COMPILER_INSTALL_DIR=C:\GHS\multi516C
################################################################################
# REQUIRED (in base_make)
#
# CC
# LINKER
# DBLINKER
# CONVERTER
# GHS Compiler Driver for compiling source files
CC="$(COMPILER_INSTALL_DIR)\ccv850e.exe"
# GHS Compiler Driver for assembling the startup files
ASM="$(COMPILER_INSTALL_DIR)\ccv850e.exe"
# GHS Compiler Driver for linking the object files and startup code
LINKER="$(COMPILER_INSTALL_DIR)\ccv850e.exe"
# GHS Linker for linking the object files without startup code
DBLINKER="$(COMPILER_INSTALL_DIR)\elxr.exe"
# GHS Code converter to generate motorola S-Record file
CONVERTER="$(COMPILER_INSTALL_DIR)\gsrec.exe"
################################################################################
ASM_FILE_SUFFIX = 850
OBJ_FILE_SUFFIX = o
ASM_OBJ_FILE_SUFFIX = ao
LST_FILE_SUFFIX = lst
PRE_FILE_SUFFIX = pre
MAP_FILE_SUFFIX = map
S_RECORD_SUFFIX = s37
EXE_FILE_SUFFIX = out
C_FILE_SUFFIX = c
################################################################################
# REGISTRY
#
CC_INCLUDE_PATH += $(GHS_CORE_PATH)\Compiler_Config\inc
CPP_INCLUDE_PATH +=
ASM_INCLUDE_PATH +=
PREPROCESSOR_DEFINES +=
################################################################################
# Directory to store the Assembly List file and the Preprocessor file #
################################################################################
export TEXTPATH=$(OBJECT_OUTPUT_PATH)
export OBJPATH=$(OBJECT_OUTPUT_PATH)
################################################################################
<file_sep>/BSP/MCAL/Port/Port_PBcfg.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* file name = Port_PBcfg.c */
/* Version = 3.1.4 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains Post-Build time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.1.7a
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: PORT_REV2_HEADLAMP_V308_UPD4010_140619.arxml
* GENERATED ON: 19 Jun 2014 - 16:59:42
*/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Port_PBTypes.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define PORT_PBCFG_C_AR_MAJOR_VERSION 3
#define PORT_PBCFG_C_AR_MINOR_VERSION 0
#define PORT_PBCFG_C_AR_PATCH_VERSION 1
/* File version information */
#define PORT_PBCFG_C_SW_MAJOR_VERSION 3
#define PORT_PBCFG_C_SW_MINOR_VERSION 1
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (PORT_PBTYPES_AR_MAJOR_VERSION != PORT_PBCFG_C_AR_MAJOR_VERSION)
#error "Port_PBcfg.c : Mismatch in Specification Major Version"
#endif
#if (PORT_PBTYPES_AR_MINOR_VERSION != PORT_PBCFG_C_AR_MINOR_VERSION)
#error "Port_PBcfg.c : Mismatch in Specification Minor Version"
#endif
#if (PORT_PBTYPES_AR_PATCH_VERSION != PORT_PBCFG_C_AR_PATCH_VERSION)
#error "Port_PBcfg.c : Mismatch in Specification Patch Version"
#endif
#if (PORT_SW_MAJOR_VERSION != PORT_PBCFG_C_SW_MAJOR_VERSION)
#error "Port_PBcfg.c : Mismatch in Major Version"
#endif
#if (PORT_SW_MINOR_VERSION != PORT_PBCFG_C_SW_MINOR_VERSION)
#error "Port_PBcfg.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
#define PORT_START_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
/* The following structure indicates the starting point of database */
CONST(Port_ConfigType, PORT_CONST) Port_GstConfiguration[] =
{
/* Configuration 0 - 0 */
{
/* ulStartOfDbToc */
0x05DF0308,
/* pPortNumRegs */
&Port_Num_Regs[0],
/* pPortNumFuncCtrlRegs */
&Port_Num_FuncCtrlRegs[0],
/* pPortNumPMSRRegs */
&Port_Num_PMSRRegs[0],
/* pPortJRegs */
&Port_JTAG_Regs[0],
/* pPortJFuncCtrlRegs */
&Port_JTAG_FuncCtrlRegs[0],
/* pPortJPMSRRegs */
&Port_JTAG_PMSRRegs[0],
/* pPinDirChangeable */
NULL_PTR,
/* pPinModeChangeableGroups */
NULL_PTR,
/* pPinModeChangeableDetails */
NULL_PTR,
/* ucNoOfNumPSRRegs */
0x0B,
/* ucNoOfNumPMCSRRegs */
0x0A,
/* ucNoOfNumOther16BitRegs */
0x3C,
/* ucNoOfNumPODCRegs */
0x0B,
/* ucNoOfNumPDSCRegs */
0x07,
/* ucNoOfNumPUCCRegs */
0x00,
/* ucNoOfNumPSBCRegs */
0x00,
/* ucNoOfNumFuncCtrlRegs */
0x10,
/* ucNoOfJFuncCtrlRegs */
0x01,
/* ucNoOfPinsDirChangeable */
0x00,
/* ucNoOfPinsModeChangeable */
0x00
}
};
#define PORT_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
#define PORT_START_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
/*
* Array of structures of all port group registers, except PMSR, PFCE, PFC and
* PMCSR, in the sequence of PSR, PIS, PISE, PISA, PIBC, PIPC, PU, PD, PBDC,
* PODC, PDSC, PUCC and PSBC.
*/
CONST(Tdd_Port_Regs, PORT_CONST) Port_Num_Regs[] =
{
/* 0 - ConfigSet_0_Port_Group_0_Register_PSR_0 */
{
/* usRegAddrOffset */
0x0100,
/* usInitModeRegVal */
0x0000
},
/* 1 - ConfigSet_0_Port_Group_1_Register_PSR_1 */
{
/* usRegAddrOffset */
0x0104,
/* usInitModeRegVal */
0x0000
},
/* 2 - ConfigSet_0_Port_Group_2_Register_PSR_2 */
{
/* usRegAddrOffset */
0x0108,
/* usInitModeRegVal */
0x0000
},
/* 3 - ConfigSet_0_Port_Group_3_Register_PSR_3 */
{
/* usRegAddrOffset */
0x010C,
/* usInitModeRegVal */
0x0001
},
/* 4 - ConfigSet_0_Port_Group_4_Register_PSR_4 */
{
/* usRegAddrOffset */
0x0110,
/* usInitModeRegVal */
0x0000
},
/* 5 - ConfigSet_0_Port_Group_10_Register_PSR_10 */
{
/* usRegAddrOffset */
0x0128,
/* usInitModeRegVal */
0xA000
},
/* 6 - ConfigSet_0_Port_Group_11_Register_PSR_11 */
{
/* usRegAddrOffset */
0x012C,
/* usInitModeRegVal */
0x0000
},
/* 7 - ConfigSet_0_Port_Group_12_Register_PSR_12 */
{
/* usRegAddrOffset */
0x0130,
/* usInitModeRegVal */
0x0003
},
/* 8 - ConfigSet_0_Port_Group_21_Register_PSR_21 */
{
/* usRegAddrOffset */
0x0154,
/* usInitModeRegVal */
0x0200
},
/* 9 - ConfigSet_0_Port_Group_25_Register_PSR_25 */
{
/* usRegAddrOffset */
0x0164,
/* usInitModeRegVal */
0x0000
},
/* 10 - ConfigSet_0_Port_Group_27_Register_PSR_27 */
{
/* usRegAddrOffset */
0x016C,
/* usInitModeRegVal */
0x0008
},
/* 11 - ConfigSet_0_Port_Group_0_Register_PIS_0 */
{
/* usRegAddrOffset */
0x0700,
/* usInitModeRegVal */
0x0000
},
/* 12 - ConfigSet_0_Port_Group_1_Register_PIS_1 */
{
/* usRegAddrOffset */
0x0704,
/* usInitModeRegVal */
0x0000
},
/* 13 - ConfigSet_0_Port_Group_2_Register_PIS_2 */
{
/* usRegAddrOffset */
0x0708,
/* usInitModeRegVal */
0x0000
},
/* 14 - ConfigSet_0_Port_Group_3_Register_PIS_3 */
{
/* usRegAddrOffset */
0x070C,
/* usInitModeRegVal */
0x0000
},
/* 15 - ConfigSet_0_Port_Group_4_Register_PIS_4 */
{
/* usRegAddrOffset */
0x0710,
/* usInitModeRegVal */
0x0000
},
/* 16 - ConfigSet_0_Port_Group_21_Register_PIS_21 */
{
/* usRegAddrOffset */
0x0754,
/* usInitModeRegVal */
0x0000
},
/* 17 - ConfigSet_0_Port_Group_25_Register_PIS_25 */
{
/* usRegAddrOffset */
0x0764,
/* usInitModeRegVal */
0x0000
},
/* 18 - ConfigSet_0_Port_Group_27_Register_PIS_27 */
{
/* usRegAddrOffset */
0x076C,
/* usInitModeRegVal */
0x0000
},
/* 19 - ConfigSet_0_Port_Group_0_Register_PISE_0 */
{
/* usRegAddrOffset */
0x0800,
/* usInitModeRegVal */
0x0000
},
/* 20 - ConfigSet_0_Port_Group_1_Register_PISE_1 */
{
/* usRegAddrOffset */
0x0804,
/* usInitModeRegVal */
0x0000
},
/* 21 - ConfigSet_0_Port_Group_2_Register_PISE_2 */
{
/* usRegAddrOffset */
0x0808,
/* usInitModeRegVal */
0x0000
},
/* 22 - ConfigSet_0_Port_Group_3_Register_PISE_3 */
{
/* usRegAddrOffset */
0x080C,
/* usInitModeRegVal */
0x0000
},
/* 23 - ConfigSet_0_Port_Group_4_Register_PISE_4 */
{
/* usRegAddrOffset */
0x0810,
/* usInitModeRegVal */
0x0000
},
/* 24 - ConfigSet_0_Port_Group_21_Register_PISE_21 */
{
/* usRegAddrOffset */
0x0854,
/* usInitModeRegVal */
0x0000
},
/* 25 - ConfigSet_0_Port_Group_25_Register_PISE_25 */
{
/* usRegAddrOffset */
0x0864,
/* usInitModeRegVal */
0x0000
},
/* 26 - ConfigSet_0_Port_Group_27_Register_PISE_27 */
{
/* usRegAddrOffset */
0x086C,
/* usInitModeRegVal */
0x0000
},
/* 27 - ConfigSet_0_Port_Group_0_Register_PIBC_0 */
{
/* usRegAddrOffset */
0x0000,
/* usInitModeRegVal */
0x0001
},
/* 28 - ConfigSet_0_Port_Group_1_Register_PIBC_1 */
{
/* usRegAddrOffset */
0x0004,
/* usInitModeRegVal */
0x0000
},
/* 29 - ConfigSet_0_Port_Group_2_Register_PIBC_2 */
{
/* usRegAddrOffset */
0x0008,
/* usInitModeRegVal */
0x0000
},
/* 30 - ConfigSet_0_Port_Group_3_Register_PIBC_3 */
{
/* usRegAddrOffset */
0x000C,
/* usInitModeRegVal */
0x0000
},
/* 31 - ConfigSet_0_Port_Group_4_Register_PIBC_4 */
{
/* usRegAddrOffset */
0x0010,
/* usInitModeRegVal */
0x0000
},
/* 32 - ConfigSet_0_Port_Group_10_Register_PIBC_10 */
{
/* usRegAddrOffset */
0x0028,
/* usInitModeRegVal */
0x0000
},
/* 33 - ConfigSet_0_Port_Group_11_Register_PIBC_11 */
{
/* usRegAddrOffset */
0x002C,
/* usInitModeRegVal */
0x0000
},
/* 34 - ConfigSet_0_Port_Group_12_Register_PIBC_12 */
{
/* usRegAddrOffset */
0x0030,
/* usInitModeRegVal */
0x0002
},
/* 35 - ConfigSet_0_Port_Group_21_Register_PIBC_21 */
{
/* usRegAddrOffset */
0x0054,
/* usInitModeRegVal */
0x0000
},
/* 36 - ConfigSet_0_Port_Group_25_Register_PIBC_25 */
{
/* usRegAddrOffset */
0x0064,
/* usInitModeRegVal */
0x7FE2
},
/* 37 - ConfigSet_0_Port_Group_27_Register_PIBC_27 */
{
/* usRegAddrOffset */
0x006C,
/* usInitModeRegVal */
0x0007
},
/* 38 - ConfigSet_0_Port_Group_0_Register_PIPC_0 */
{
/* usRegAddrOffset */
0x0200,
/* usInitModeRegVal */
0x0000
},
/* 39 - ConfigSet_0_Port_Group_1_Register_PIPC_1 */
{
/* usRegAddrOffset */
0x0204,
/* usInitModeRegVal */
0x0000
},
/* 40 - ConfigSet_0_Port_Group_3_Register_PIPC_3 */
{
/* usRegAddrOffset */
0x020C,
/* usInitModeRegVal */
0x0000
},
/* 41 - ConfigSet_0_Port_Group_4_Register_PIPC_4 */
{
/* usRegAddrOffset */
0x0210,
/* usInitModeRegVal */
0x0000
},
/* 42 - ConfigSet_0_Port_Group_21_Register_PIPC_21 */
{
/* usRegAddrOffset */
0x0254,
/* usInitModeRegVal */
0x0000
},
/* 43 - ConfigSet_0_Port_Group_25_Register_PIPC_25 */
{
/* usRegAddrOffset */
0x0264,
/* usInitModeRegVal */
0x0000
},
/* 44 - ConfigSet_0_Port_Group_0_Register_PU_0 */
{
/* usRegAddrOffset */
0x0300,
/* usInitModeRegVal */
0x0000
},
/* 45 - ConfigSet_0_Port_Group_1_Register_PU_1 */
{
/* usRegAddrOffset */
0x0304,
/* usInitModeRegVal */
0x0000
},
/* 46 - ConfigSet_0_Port_Group_2_Register_PU_2 */
{
/* usRegAddrOffset */
0x0308,
/* usInitModeRegVal */
0x0000
},
/* 47 - ConfigSet_0_Port_Group_3_Register_PU_3 */
{
/* usRegAddrOffset */
0x030C,
/* usInitModeRegVal */
0x0000
},
/* 48 - ConfigSet_0_Port_Group_4_Register_PU_4 */
{
/* usRegAddrOffset */
0x0310,
/* usInitModeRegVal */
0x0000
},
/* 49 - ConfigSet_0_Port_Group_21_Register_PU_21 */
{
/* usRegAddrOffset */
0x0354,
/* usInitModeRegVal */
0x0000
},
/* 50 - ConfigSet_0_Port_Group_25_Register_PU_25 */
{
/* usRegAddrOffset */
0x0364,
/* usInitModeRegVal */
0x0000
},
/* 51 - ConfigSet_0_Port_Group_27_Register_PU_27 */
{
/* usRegAddrOffset */
0x036C,
/* usInitModeRegVal */
0x0000
},
/* 52 - ConfigSet_0_Port_Group_0_Register_PD_0 */
{
/* usRegAddrOffset */
0x0400,
/* usInitModeRegVal */
0x0000
},
/* 53 - ConfigSet_0_Port_Group_1_Register_PD_1 */
{
/* usRegAddrOffset */
0x0404,
/* usInitModeRegVal */
0x0000
},
/* 54 - ConfigSet_0_Port_Group_2_Register_PD_2 */
{
/* usRegAddrOffset */
0x0408,
/* usInitModeRegVal */
0x0000
},
/* 55 - ConfigSet_0_Port_Group_3_Register_PD_3 */
{
/* usRegAddrOffset */
0x040C,
/* usInitModeRegVal */
0x0000
},
/* 56 - ConfigSet_0_Port_Group_4_Register_PD_4 */
{
/* usRegAddrOffset */
0x0410,
/* usInitModeRegVal */
0x0000
},
/* 57 - ConfigSet_0_Port_Group_21_Register_PD_21 */
{
/* usRegAddrOffset */
0x0454,
/* usInitModeRegVal */
0x0000
},
/* 58 - ConfigSet_0_Port_Group_25_Register_PD_25 */
{
/* usRegAddrOffset */
0x0464,
/* usInitModeRegVal */
0x0000
},
/* 59 - ConfigSet_0_Port_Group_27_Register_PD_27 */
{
/* usRegAddrOffset */
0x046C,
/* usInitModeRegVal */
0x0000
},
/* 60 - ConfigSet_0_Port_Group_0_Register_PBDC_0 */
{
/* usRegAddrOffset */
0x0100,
/* usInitModeRegVal */
0x0000
},
/* 61 - ConfigSet_0_Port_Group_1_Register_PBDC_1 */
{
/* usRegAddrOffset */
0x0104,
/* usInitModeRegVal */
0x0000
},
/* 62 - ConfigSet_0_Port_Group_2_Register_PBDC_2 */
{
/* usRegAddrOffset */
0x0108,
/* usInitModeRegVal */
0x0000
},
/* 63 - ConfigSet_0_Port_Group_3_Register_PBDC_3 */
{
/* usRegAddrOffset */
0x010C,
/* usInitModeRegVal */
0x0000
},
/* 64 - ConfigSet_0_Port_Group_4_Register_PBDC_4 */
{
/* usRegAddrOffset */
0x0110,
/* usInitModeRegVal */
0x0000
},
/* 65 - ConfigSet_0_Port_Group_10_Register_PBDC_10 */
{
/* usRegAddrOffset */
0x0128,
/* usInitModeRegVal */
0x0000
},
/* 66 - ConfigSet_0_Port_Group_11_Register_PBDC_11 */
{
/* usRegAddrOffset */
0x012C,
/* usInitModeRegVal */
0x0000
},
/* 67 - ConfigSet_0_Port_Group_12_Register_PBDC_12 */
{
/* usRegAddrOffset */
0x0130,
/* usInitModeRegVal */
0x0000
},
/* 68 - ConfigSet_0_Port_Group_21_Register_PBDC_21 */
{
/* usRegAddrOffset */
0x0154,
/* usInitModeRegVal */
0x0000
},
/* 69 - ConfigSet_0_Port_Group_25_Register_PBDC_25 */
{
/* usRegAddrOffset */
0x0164,
/* usInitModeRegVal */
0x0000
},
/* 70 - ConfigSet_0_Port_Group_27_Register_PBDC_27 */
{
/* usRegAddrOffset */
0x016C,
/* usInitModeRegVal */
0x0000
},
/* 71 - ConfigSet_0_Port_Group_0_Register_PODC_0 */
{
/* usRegAddrOffset */
0x0500,
/* usInitModeRegVal */
0x0000
},
/* 72 - ConfigSet_0_Port_Group_1_Register_PODC_1 */
{
/* usRegAddrOffset */
0x0504,
/* usInitModeRegVal */
0x0000
},
/* 73 - ConfigSet_0_Port_Group_2_Register_PODC_2 */
{
/* usRegAddrOffset */
0x0508,
/* usInitModeRegVal */
0x0000
},
/* 74 - ConfigSet_0_Port_Group_3_Register_PODC_3 */
{
/* usRegAddrOffset */
0x050C,
/* usInitModeRegVal */
0x0000
},
/* 75 - ConfigSet_0_Port_Group_4_Register_PODC_4 */
{
/* usRegAddrOffset */
0x0510,
/* usInitModeRegVal */
0x0000
},
/* 76 - ConfigSet_0_Port_Group_10_Register_PODC_10 */
{
/* usRegAddrOffset */
0x0528,
/* usInitModeRegVal */
0x0000
},
/* 77 - ConfigSet_0_Port_Group_11_Register_PODC_11 */
{
/* usRegAddrOffset */
0x052C,
/* usInitModeRegVal */
0x0000
},
/* 78 - ConfigSet_0_Port_Group_12_Register_PODC_12 */
{
/* usRegAddrOffset */
0x0530,
/* usInitModeRegVal */
0x0000
},
/* 79 - ConfigSet_0_Port_Group_21_Register_PODC_21 */
{
/* usRegAddrOffset */
0x0554,
/* usInitModeRegVal */
0x0000
},
/* 80 - ConfigSet_0_Port_Group_25_Register_PODC_25 */
{
/* usRegAddrOffset */
0x0564,
/* usInitModeRegVal */
0x0000
},
/* 81 - ConfigSet_0_Port_Group_27_Register_PODC_27 */
{
/* usRegAddrOffset */
0x056C,
/* usInitModeRegVal */
0x0000
},
/* 82 - ConfigSet_0_Port_Group_0_Register_PDSC_0 */
{
/* usRegAddrOffset */
0x0600,
/* usInitModeRegVal */
0x0000
},
/* 83 - ConfigSet_0_Port_Group_1_Register_PDSC_1 */
{
/* usRegAddrOffset */
0x0604,
/* usInitModeRegVal */
0x0000
},
/* 84 - ConfigSet_0_Port_Group_2_Register_PDSC_2 */
{
/* usRegAddrOffset */
0x0608,
/* usInitModeRegVal */
0x0000
},
/* 85 - ConfigSet_0_Port_Group_3_Register_PDSC_3 */
{
/* usRegAddrOffset */
0x060C,
/* usInitModeRegVal */
0x0000
},
/* 86 - ConfigSet_0_Port_Group_4_Register_PDSC_4 */
{
/* usRegAddrOffset */
0x0610,
/* usInitModeRegVal */
0x0000
},
/* 87 - ConfigSet_0_Port_Group_25_Register_PDSC_25 */
{
/* usRegAddrOffset */
0x0664,
/* usInitModeRegVal */
0x0000
},
/* 88 - ConfigSet_0_Port_Group_27_Register_PDSC_27 */
{
/* usRegAddrOffset */
0x066C,
/* usInitModeRegVal */
0x0000
}
};
/*
* Array of structures of all function control port group registers, in the
* sequence of PFCE, PFC and PMCSR.
*/
CONST(Tdd_Port_FuncCtrlRegs, PORT_CONST) Port_Num_FuncCtrlRegs[] =
{
/* 0 - ConfigSet_0_Port_Group_0_PFCE_Register_0 */
{
/* usRegAddrOffset */
0x0600,
/* usInitModeRegVal */
0x0002,
/* usSetModeRegVal */
0x0002
},
/* 1 - ConfigSet_0_Port_Group_1_PFCE_Register_1 */
{
/* usRegAddrOffset */
0x0604,
/* usInitModeRegVal */
0x0000,
/* usSetModeRegVal */
0x0000
},
/* 2 - ConfigSet_0_Port_Group_2_PFCE_Register_2 */
{
/* usRegAddrOffset */
0x0608,
/* usInitModeRegVal */
0x0000,
/* usSetModeRegVal */
0x0000
},
/* 3 - ConfigSet_0_Port_Group_3_PFCE_Register_3 */
{
/* usRegAddrOffset */
0x060C,
/* usInitModeRegVal */
0x01A0,
/* usSetModeRegVal */
0x0000
},
/* 4 - ConfigSet_0_Port_Group_4_PFCE_Register_4 */
{
/* usRegAddrOffset */
0x0610,
/* usInitModeRegVal */
0x0000,
/* usSetModeRegVal */
0x0000
},
/* 5 - ConfigSet_0_Port_Group_21_PFCE_Register_21 */
{
/* usRegAddrOffset */
0x0654,
/* usInitModeRegVal */
0x0150,
/* usSetModeRegVal */
0x0000
},
/* 6 - ConfigSet_0_Port_Group_25_PFCE_Register_25 */
{
/* usRegAddrOffset */
0x0664,
/* usInitModeRegVal */
0x0000,
/* usSetModeRegVal */
0x0000
},
/* 7 - ConfigSet_0_Port_Group_27_PFCE_Register_27 */
{
/* usRegAddrOffset */
0x066C,
/* usInitModeRegVal */
0x0000,
/* usSetModeRegVal */
0x0000
},
/* 8 - ConfigSet_0_Port_Group_0_PFC_Register_0 */
{
/* usRegAddrOffset */
0x0500,
/* usInitModeRegVal */
0x0000,
/* usSetModeRegVal */
0x0000
},
/* 9 - ConfigSet_0_Port_Group_1_PFC_Register_1 */
{
/* usRegAddrOffset */
0x0504,
/* usInitModeRegVal */
0x0000,
/* usSetModeRegVal */
0x0000
},
/* 10 - ConfigSet_0_Port_Group_2_PFC_Register_2 */
{
/* usRegAddrOffset */
0x0508,
/* usInitModeRegVal */
0x0000,
/* usSetModeRegVal */
0x0000
},
/* 11 - ConfigSet_0_Port_Group_3_PFC_Register_3 */
{
/* usRegAddrOffset */
0x050C,
/* usInitModeRegVal */
0x01A0,
/* usSetModeRegVal */
0x0000
},
/* 12 - ConfigSet_0_Port_Group_4_PFC_Register_4 */
{
/* usRegAddrOffset */
0x0510,
/* usInitModeRegVal */
0x0000,
/* usSetModeRegVal */
0x0000
},
/* 13 - ConfigSet_0_Port_Group_21_PFC_Register_21 */
{
/* usRegAddrOffset */
0x0554,
/* usInitModeRegVal */
0x0150,
/* usSetModeRegVal */
0x0000
},
/* 14 - ConfigSet_0_Port_Group_25_PFC_Register_25 */
{
/* usRegAddrOffset */
0x0564,
/* usInitModeRegVal */
0x0000,
/* usSetModeRegVal */
0x0000
},
/* 15 - ConfigSet_0_Port_Group_27_PFC_Register_27 */
{
/* usRegAddrOffset */
0x056C,
/* usInitModeRegVal */
0x0000,
/* usSetModeRegVal */
0x0000
},
/* 16 - ConfigSet_0_Port_Group_0_PMCSR_Register_0 */
{
/* usRegAddrOffset */
0x0900,
/* usInitModeRegVal */
0x0372,
/* usSetModeRegVal */
0x0022
},
/* 17 - ConfigSet_0_Port_Group_1_PMCSR_Register_1 */
{
/* usRegAddrOffset */
0x0904,
/* usInitModeRegVal */
0x0054,
/* usSetModeRegVal */
0x0000
},
/* 18 - ConfigSet_0_Port_Group_2_PMCSR_Register_2 */
{
/* usRegAddrOffset */
0x0908,
/* usInitModeRegVal */
0x0000,
/* usSetModeRegVal */
0x0000
},
/* 19 - ConfigSet_0_Port_Group_3_PMCSR_Register_3 */
{
/* usRegAddrOffset */
0x090C,
/* usInitModeRegVal */
0x03FA,
/* usSetModeRegVal */
0x0000
},
/* 20 - ConfigSet_0_Port_Group_4_PMCSR_Register_4 */
{
/* usRegAddrOffset */
0x0910,
/* usInitModeRegVal */
0x0A2D,
/* usSetModeRegVal */
0x0000
},
/* 21 - ConfigSet_0_Port_Group_10_PMCSR_Register_10 */
{
/* usRegAddrOffset */
0x0928,
/* usInitModeRegVal */
0x0000,
/* usSetModeRegVal */
0x0000
},
/* 22 - ConfigSet_0_Port_Group_12_PMCSR_Register_12 */
{
/* usRegAddrOffset */
0x0930,
/* usInitModeRegVal */
0x0000,
/* usSetModeRegVal */
0x0000
},
/* 23 - ConfigSet_0_Port_Group_21_PMCSR_Register_21 */
{
/* usRegAddrOffset */
0x0954,
/* usInitModeRegVal */
0x0150,
/* usSetModeRegVal */
0x0000
},
/* 24 - ConfigSet_0_Port_Group_25_PMCSR_Register_25 */
{
/* usRegAddrOffset */
0x0964,
/* usInitModeRegVal */
0x0000,
/* usSetModeRegVal */
0x0000
},
/* 25 - ConfigSet_0_Port_Group_27_PMCSR_Register_27 */
{
/* usRegAddrOffset */
0x096C,
/* usInitModeRegVal */
0x0000,
/* usSetModeRegVal */
0x0000
}
};
/* Array of structures for 32-Bit PMSR Registers*/
CONST(Tdd_Port_PMSRRegs, PORT_CONST) Port_Num_PMSRRegs[] =
{
/* 0 - ConfigSet_0_Port_Group_0_PMSR0_0 */
{
/* ulMaskAndConfigValue */
0xFFFFFA6F,
/* usRegAddrOffset */
0x0800,
/* usInitModeRegVal */
0xFA6F
},
/* 1 - ConfigSet_0_Port_Group_1_PMSR1_1 */
{
/* ulMaskAndConfigValue */
0xFFFFE02A,
/* usRegAddrOffset */
0x0804,
/* usInitModeRegVal */
0xE02A
},
/* 2 - ConfigSet_0_Port_Group_2_PMSR2_2 */
{
/* ulMaskAndConfigValue */
0xFFFF0007,
/* usRegAddrOffset */
0x0808,
/* usInitModeRegVal */
0x0007
},
/* 3 - ConfigSet_0_Port_Group_3_PMSR3_3 */
{
/* ulMaskAndConfigValue */
0xFFFF0125,
/* usRegAddrOffset */
0x080C,
/* usInitModeRegVal */
0x0125
},
/* 4 - ConfigSet_0_Port_Group_4_PMSR4_4 */
{
/* ulMaskAndConfigValue */
0xFFFF05D2,
/* usRegAddrOffset */
0x0810,
/* usInitModeRegVal */
0x05D2
},
/* 5 - ConfigSet_0_Port_Group_10_PMSR10_5 */
{
/* ulMaskAndConfigValue */
0xFFFF5FC0,
/* usRegAddrOffset */
0x0828,
/* usInitModeRegVal */
0x5FC0
},
/* 6 - ConfigSet_0_Port_Group_11_PMSR11_6 */
{
/* ulMaskAndConfigValue */
0xFFFF00FF,
/* usRegAddrOffset */
0x082C,
/* usInitModeRegVal */
0x00FF
},
/* 7 - ConfigSet_0_Port_Group_12_PMSR12_7 */
{
/* ulMaskAndConfigValue */
0xFFFFFF50,
/* usRegAddrOffset */
0x0830,
/* usInitModeRegVal */
0xFF50
},
/* 8 - ConfigSet_0_Port_Group_21_PMSR21_8 */
{
/* ulMaskAndConfigValue */
0xFFFF0EAC,
/* usRegAddrOffset */
0x0854,
/* usInitModeRegVal */
0x0EAC
},
/* 9 - ConfigSet_0_Port_Group_25_PMSR25_9 */
{
/* ulMaskAndConfigValue */
0xFFFFFFFF,
/* usRegAddrOffset */
0x0864,
/* usInitModeRegVal */
0xFFFF
},
/* 10 - ConfigSet_0_Port_Group_27_PMSR27_10 */
{
/* ulMaskAndConfigValue */
0xFFFF003F,
/* usRegAddrOffset */
0x086C,
/* usInitModeRegVal */
0x003F
}
};
/*
* Array of structures of all Alphabetic port group registers, except PMSR,
* PFCE, PFC and PMCSR, in the sequence of PSR, PIS, PISE, PISA, PIBC, PIPC, PU,
* PD, PBDC, PODC, PDSC, PUCC and PSBC.
*/
/* CONST(Tdd_Port_Regs, PORT_CONST) Port_Alpha_Regs[]; */
/*
* Array of structures of Alphabetic registers of all function control
* port group registers, in the
* sequence of PFCE, PFC and PMCSR.
*/
/* CONST(Tdd_Port_FuncCtrlRegs, PORT_CONST) Port_Alpha_FuncCtrlRegs[];*/
/* Array of structures for 32-Bit PMSR Registers */
/* CONST(Tdd_Port_PMSRRegs, PORT_CONST) Port_Alpha_PMSRRegs[]; */
/*
* Array of structures of all JTAG port group registers, except PMSR,
* PFCE, PFC and PMCSR, in the sequence of PSR, PIS, PISE, PISA, PIBC, PIPC, PU,
* PD, PBDC, PODC, PDSC, PUCC and PSBC.
*/
CONST(Tdd_Port_Regs, PORT_CONST) Port_JTAG_Regs[] =
{
/* 0 - ConfigSet_0_Port_Group_0_Register_JPSR_0 */
{
/* usRegAddrOffset */
0x0010,
/* usInitModeRegVal */
0x0000
},
/* 1 - ConfigSet_0_Port_Group_0_Register_JPIS_0 */
{
/* usRegAddrOffset */
0x0070,
/* usInitModeRegVal */
0x0000
},
/* 2 - ConfigSet_0_Port_Group_0_Register_JPISE_0 */
{
/* usRegAddrOffset */
0x0080,
/* usInitModeRegVal */
0x0000
},
/* 3 - ConfigSet_0_Port_Group_0_Register_JPIBC_0 */
{
/* usRegAddrOffset */
0x0000,
/* usInitModeRegVal */
0x0000
},
/* 4 - ConfigSet_0_Port_Group_0_Register_JPU_0 */
{
/* usRegAddrOffset */
0x0030,
/* usInitModeRegVal */
0x0000
},
/* 5 - ConfigSet_0_Port_Group_0_Register_JPD_0 */
{
/* usRegAddrOffset */
0x0040,
/* usInitModeRegVal */
0x0000
},
/* 6 - ConfigSet_0_Port_Group_0_Register_JPBDC_0 */
{
/* usRegAddrOffset */
0x0010,
/* usInitModeRegVal */
0x0000
},
/* 7 - ConfigSet_0_Port_Group_0_Register_JPODC_0 */
{
/* usRegAddrOffset */
0x0050,
/* usInitModeRegVal */
0x0000
},
/* 8 - ConfigSet_0_Port_Group_0_Register_JPDSC_0 */
{
/* usRegAddrOffset */
0x0060,
/* usInitModeRegVal */
0x0000
}
};
/*
* Array of structures of all function control port group registers, in the
* sequence of PFCE, PFC and PMCSR.
*/
CONST(Tdd_Port_FuncCtrlRegs, PORT_CONST) Port_JTAG_FuncCtrlRegs[] =
{
/* 0 - ConfigSet_0_Port_Group_0_JPFC_Register_0 */
{
/* usRegAddrOffset */
0x0050,
/* usInitModeRegVal */
0x0000,
/* usSetModeRegVal */
0x0000
},
/* 1 - ConfigSet_0_Port_Group_0_JPMCSR_Register_0 */
{
/* usRegAddrOffset */
0x0090,
/* usInitModeRegVal */
0x0000,
/* usSetModeRegVal */
0x0000
}
};
/* Array of structures for 32-Bit PMSR Registers */
CONST(Tdd_Port_PMSRRegs, PORT_CONST) Port_JTAG_PMSRRegs[] =
{
/* 0 - ConfigSet_0_Port_Group_0_JPMSR0_0 */
{
/* ulMaskAndConfigValue */
0xFFFF003C,
/* usRegAddrOffset */
0x0080,
/* usInitModeRegVal */
0x003C
}
};
/*
* Array provides information of port groups which contain run time mode
* changeable port pins.
*/
/* CONST(Tdd_Port_PinModeChangeableGroups, PORT_CONST) \
Port_GstSetModeGroupsList[]; */
/*
* Array contains details of port pins, whose mode can be changed during run
* time.
*/
/* CONST(Tdd_Port_PinModeChangeableDetails, PORT_CONST) \
Port_GstSetModePinDetailsList[]; */
/*
* Array contains list of port pins whose direction can be changed during
* run time.
*/
/* CONST(Tdd_Port_PinsDirChangeable, PORT_CONST) \
Port_GstPinDirChangeableList[]; */
/* Array of structures for Digital Filter registers */
/* CONST(Tdd_Port_DNFARegs, PORT_CONST) Port_DNFARegs[]; */
/* Array for Analog Filter registers */
/* CONST(Tdd_Port_FCLARegs, PORT_CONST) Port_FCLARegs[]; */
#define PORT_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Can/Can_Cfg.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Can_Cfg.h */
/* Version = 3.0.0 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains pre-compile time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: : Initial version
*/
/******************************************************************************/
/*******************************************************************************
** CAN Driver Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.0.13a
*/
#ifndef CAN_CFG_H
#define CAN_CFG_H
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_MCU_V304_130427.arxml
* EcuM_Can.arxml
* FK4_4010_CAN_TST.arxml
* GENERATED ON: 24 Jul 2013 - 16:51:03
*/
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* Autosar Specification Version Information */
#define CAN_CFG_AR_MAJOR_VERSION 2
#define CAN_CFG_AR_MINOR_VERSION 2
#define CAN_CFG_AR_PATCH_VERSION 2
/* File Version Information */
#define CAN_CFG_SW_MAJOR_VERSION 3
#define CAN_CFG_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Common Published Information */
#define CAN_AR_MAJOR_VERSION_VALUE 2
#define CAN_AR_MINOR_VERSION_VALUE 2
#define CAN_AR_PATCH_VERSION_VALUE 2
#define CAN_SW_MAJOR_VERSION_VALUE 3
#define CAN_SW_MINOR_VERSION_VALUE 0
#define CAN_SW_PATCH_VERSION_VALUE 0
/* CAN Module Id */
#define CAN_MODULE_ID_VALUE (uint16)80
/* CAN Vendor Id */
#define CAN_VENDOR_ID_VALUE (uint16)23
/* CAN Instance Id */
#define CAN_INSTANCE_ID_VALUE (uint8)0
/* Pre-compile option for Development Error Detect */
#define CAN_DEV_ERROR_DETECT STD_ON
/* Pre-compile option for Standard CAN-ID */
#define CAN_STANDARD_CANID STD_ON
/* Pre-compile option for Multiplexed Transmission */
#define CAN_MULTIPLEX_TRANSMISSION STD_OFF
/* Pre-compile option for Version Info API */
#define CAN_VERSION_INFO_API STD_OFF
/* Pre-compile option for Can Wakeup Support */
#define CAN_WAKEUP_SUPPORT STD_ON
/* Pre-compile option for Can Transmit Cancellation Support */
#define CAN_HW_TRANSMIT_CANCELLATION_SUPPORT STD_OFF
/* Pre-compile option for Can Wakeup Interrupts Tied */
#define CAN_WAKEUP_INTERRUPTS_TIED STD_ON
/* Pre-compile option for Busoff Period */
#define CAN_MAINFUNCTION_BUSOFF_PERIOD 1
/* Pre-compile option for Read Period */
#define CAN_MAINFUNCTION_READ_PERIOD 1
/* Pre-compile option for Wakeup Period */
#define CAN_MAINFUNCTION_WAKEUP_PERIOD 1
/* Pre-compile option for Write Period */
#define CAN_MAINFUNCTION_WRITE_PERIOD 1
/* Pre-compile option for Busoff Interrupt */
#define CAN_CONTROLLER1_BUSOFF_INTERRUPT STD_OFF
#define CAN_CONTROLLER0_BUSOFF_INTERRUPT STD_OFF
#define CAN_CONTROLLER2_BUSOFF_INTERRUPT STD_OFF
#define CAN_CONTROLLER3_BUSOFF_INTERRUPT STD_OFF
#define CAN_CONTROLLER4_BUSOFF_INTERRUPT STD_OFF
#define CAN_CONTROLLER5_BUSOFF_INTERRUPT STD_OFF
/* Pre-compile option for Wakeup Interrupt */
#define CAN_CONTROLLER1_WAKEUP_INTERRUPT STD_OFF
#define CAN_CONTROLLER0_WAKEUP_INTERRUPT STD_OFF
#define CAN_CONTROLLER2_WAKEUP_INTERRUPT STD_OFF
#define CAN_CONTROLLER3_WAKEUP_INTERRUPT STD_OFF
#define CAN_CONTROLLER4_WAKEUP_INTERRUPT STD_OFF
#define CAN_CONTROLLER5_WAKEUP_INTERRUPT STD_OFF
/* Pre-compile option for Rx Interrupt */
#define CAN_CONTROLLER1_RX_INTERRUPT STD_OFF
#define CAN_CONTROLLER0_RX_INTERRUPT STD_OFF
#define CAN_CONTROLLER2_RX_INTERRUPT STD_OFF
#define CAN_CONTROLLER3_RX_INTERRUPT STD_OFF
#define CAN_CONTROLLER4_RX_INTERRUPT STD_OFF
#define CAN_CONTROLLER5_RX_INTERRUPT STD_OFF
/* Pre-compile option for Tx Interrupt */
#define CAN_CONTROLLER1_TX_INTERRUPT STD_OFF
#define CAN_CONTROLLER0_TX_INTERRUPT STD_OFF
#define CAN_CONTROLLER2_TX_INTERRUPT STD_OFF
#define CAN_CONTROLLER3_TX_INTERRUPT STD_OFF
#define CAN_CONTROLLER4_TX_INTERRUPT STD_OFF
#define CAN_CONTROLLER5_TX_INTERRUPT STD_OFF
/* Pre-compile option for Tx Polling */
#define CAN_TX_POLLING STD_ON
/* Pre-compile option for Rx Polling */
#define CAN_RX_POLLING STD_ON
/* Pre-compile option for BusOff Polling */
#define CAN_BUSOFF_POLLING STD_ON
/* Pre-compile option for Wakeup Polling */
#define CAN_WAKEUP_POLLING STD_ON
/*******************************************************************************
** Global Data **
*******************************************************************************/
/* Timeout Count */
#define CAN_TIMEOUT_COUNT (uint16)2000
/* Maximum number of Controllers */
#define CAN_MAX_NUMBER_OF_CONTROLLER (uint8_least)2
typedef uint16 Can_IdType;
/*******************************************************************************
** Handles **
*******************************************************************************/
/* Hardware Objects Configuration Handle */
#define CanHardwareObject_1 0
#define CanHardwareObject_2 1
#define CanHardwareObject_3 2
#define CanHardwareObject_4 3
/* CAN Controller Configuration Handle */
#define CanController_1 0
#define CanController_2 1
/* Configuration Set Handles */
#define CanConfigSet_1 &Can_AFCan_GaaConfigType[0]
/* CAN Controller Configuration Handles */
#define CanControllerCanConfigSet_1 &Can_AFCan_GaaControllerConfigType[0]
#endif /* CAN_CFG_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/SERV/Os/Sys_RuntimeHandler.h
/*****************************************************************************
| File Name: Sys_Runtimehandler.h
|
| Description: head file of Sys_Runtimehandler.C
|
|-----------------------------------------------------------------------------
| PATAC Confidential
|-----------------------------------------------------------------------------
|
| This software is copyright is proprietary of
| Pan Asia Technical Automotive Company(PATAC).
| All rights are reserved by PATAC.
|
|-----------------------------------------------------------------------------
| A U T H O R I D E N T I T Y
|-----------------------------------------------------------------------------
| Initials Name Company
| -------- -------------------- ---------------------------------------
| FRED <NAME> PATAC
|
|-----------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|-----------------------------------------------------------------------------
| Date Version Author Description
| ---------- -------- ------ ----------------------------------------------
| 2012-04-15 01.00.00 zephan Creation
|****************************************************************************/
#ifndef __SYS_RUNTIME_H
#define __SYS_RUNTIME_H
#include "platform_types.h"
#include "tcb.h"
#define EN_RUNTM_STAT
#define EN_STKCHK
#define PRD_RUNTM
#define ISR_RUNTM
#ifndef PRD_TSKQUEUE
#define PRD_TSKQUEUE
#endif
typedef struct TagRunTm
{
/* UINT32 begin_stamp;
UINT32 end_stamp;*/
UINT32 current_runtime;
#ifdef EN_RUNTM_STAT
UINT32 max_runtime;
UINT32 avg_runtime;
UINT32 tot_runtime;
UINT8 sample_num;
#endif
} TagRunTm_Info;
typedef struct PrdRunTm
{
UINT32 allowed_deviation;
UINT32 bucket;
UINT32 NextEp;
UINT32 min_runtime;
}PrdRunTm_Info;
#ifdef PRD_TSKQUEUE
enum RunTmTarget
{
CeTag_PrdTskdummy = 0,/*idle task*/
CeTag_PrdTsk2p5,
CeTag_PrdTsk5A,
CeTag_PrdTsk5B,
CeTag_PrdTsk10A,
CeTag_PrdTsk10B,
CeTag_PrdTsk20,
CeTag_UserTst0,
CeTag_UserTst1,
CeTag_UserTst2,
CeTag_UserTst3,
CeTag_UserTst4,
CeTag_UserTst5,
CeTag_AllTag
};
#define PRDTSK_OFFSET CeTag_PrdTskdummy
#endif
#define ISR_OFFSET CeTag_UserTst0
extern UINT32 GetCurHwTimer(void);
extern void Sys_EnterIdleClbk(void);
extern void Sys_ExitIdleCblk(void);
#define SysSrvc_GetCurStamp() GetCurHwTimer()
#define SysSrvc_CalcRunTm(lststamp,curstamp) ((curstamp) - (lststamp))
extern TagRunTm_Info VaSysSrvc_TagRuntmCheck[];
void SysSrvc_GetRunTmStat(TagRunTm_Info * pruntmtag,UINT32 curtm);
#endif
<file_sep>/BSP/MCAL/Pwm/Pwm.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Pwm.c */
/* Version = 3.1.5 */
/* Date = 05-Nov-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* API function implementations of PWM Driver Component */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 18-Aug-2009 : Initial version
* V3.0.1: 28-Oct-2009 : Updated as per the SCR 054
* Pwm_HW_Callback function added
* V3.0.2: 07-Apr-2010 : As per SCR 243, the APIs Pwm_SetDutyCycle,
* Pwm_SetPeriodAndDuty, Pwm_SetOutputToIdle,
* Pwm_GetOutputState, Pwm_DisableNotification,
* Pwm_EnableNotification are updated for the
* initialization of the RAM variable after
* successful initialization of the module.
* V3.0.3: 02-Jul-2010 : As per SCR 290, Pwm_Init is updated to support
* TAUB and TAUC timer units.
* V3.0.4: 25-Jul-2010 : As per SCR 305, precompile options PWM_TAUB_UNIT_USED
* and PWM_TAUC_UNIT_USED are added in Pwm_Init API.
* V3.0.5: 29-Apr-2011 : As per SCR 435, Pwm_SetPeriodAndDuty and
* Pwm_SetDutyCycle APIs are added with new DET checks
* for Period and Duty values.
* V3.1.0: 26-Jul-2011 : Ported for the DK4 variant.
* V3.1.1: 04-Oct-2011 : Added comments for the violation of MISRA rule 19.1.
* V3.1.2: 12-Jan-2012 :TEL have fixed The Issues reported by mantis id
* : #4246,#4210,#4207,#4206,#4202,#4259,#4257,#4248.
* V3.1.3: 05-Mar-2012 : Merged the fixes done for Fx4L PWM driver
* V3.1.4: 06-Jun-2012 : As per SCR 034, following changes are made:
* 1. Pwm_GetVersionInfo API is removed and implemented
* as macro.
* 2. Conditional check for DET errors is corrected.
* 3. Compiler version is removed from Environment
* section.
* 4. Pwm_SetPeriodAndDuty Api is updated for DET error
* check when Period is 0.
* V3.1.5: 05-Nov-2012 : As per MNT_0007541, section "Remarks" is updated for
* APIs "Pwm_SetPeriodAndDuty", "Pwm_SetOutputToIdle".
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Pwm.h"
#include "Pwm_LLDriver.h"
#include "Pwm_Ram.h"
#if(PWM_DEV_ERROR_DETECT == STD_ON)
#include "Det.h"
#endif
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
#include "SchM_Pwm.h"
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification version information */
#define PWM_C_AR_MAJOR_VERSION PWM_AR_MAJOR_VERSION_VALUE
#define PWM_C_AR_MINOR_VERSION PWM_AR_MINOR_VERSION_VALUE
#define PWM_C_AR_PATCH_VERSION PWM_AR_PATCH_VERSION_VALUE
/* File version information */
#define PWM_C_SW_MAJOR_VERSION 3
#define PWM_C_SW_MINOR_VERSION 1
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (PWM_AR_MAJOR_VERSION != PWM_C_AR_MAJOR_VERSION)
#error "Pwm.c : Mismatch in Specification Major Version"
#endif
#if (PWM_AR_MINOR_VERSION != PWM_C_AR_MINOR_VERSION)
#error "Pwm.c : Mismatch in Specification Minor Version"
#endif
#if (PWM_AR_PATCH_VERSION != PWM_C_AR_PATCH_VERSION)
#error "Pwm.c : Mismatch in Specification Patch Version"
#endif
#if (PWM_SW_MAJOR_VERSION != PWM_C_SW_MAJOR_VERSION)
#error "Pwm.c : Mismatch in Major Version"
#endif
#if (PWM_SW_MINOR_VERSION != PWM_C_SW_MINOR_VERSION)
#error "Pwm.c : Mismatch in Minor Version"
#endif
/******************************************************************************
** Global Data **
******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Pwm_Init
**
** Service ID : 0x00
**
** Description : This API performs the initialisation of PWM Driver
** component.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Non-Reentrant
**
** Input Parameters : ConfigPtr
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Pwm_GblDriverStatus, Pwm_GpTAUABCUnitConfig,
** Pwm_GpTAUJUnitConfig, Pwm_GpChannelConfig,
** Pwm_GpSynchStartConfig, Pwm_GpChannelTimerMap
** Pwm_GpNotifStatus, Pwm_GpChannelIdleStatus
** Function(s) invoked:
** Det_ReportError, Pwm_HW_Init
*******************************************************************************/
#define PWM_START_SEC_PUBLIC_CODE
/* MISRA Rule : 19.1 */
/* Message : #include statements in a file */
/* should only be preceded by other*/
/* preprocessor directives or */
/* comments. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
#include "MemMap.h"
FUNC(void, PWM_PUBLIC_CODE) Pwm_Init
(P2CONST(Pwm_ConfigType, AUTOMATIC, PWM_APPL_CONST) ConfigPtr)
{
#if (PWM_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
LblDetErrFlag = PWM_FALSE;
/* Check if the PWM Driver is already initialized */
if(PWM_INITIALIZED == Pwm_GblDriverStatus)
{
/* Report Error to DET */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_INIT_SID,
PWM_E_ALREADY_INITIALIZED);
/* Set error status flag to true */
LblDetErrFlag = PWM_TRUE;
}
/* Check if ConfigPtr is NULL_PTR */
if (NULL_PTR == ConfigPtr)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_INIT_SID,
PWM_E_PARAM_CONFIG);
/* Set error status flag to true */
LblDetErrFlag = PWM_TRUE;
}
else
{
/* For Misra Compliance */
}
if(PWM_FALSE == LblDetErrFlag)
#endif /* End of (PWM_DEV_ERROR_DETECT == STD_ON) */
{
/* MISRA Rule : 1.2 */
/* Message : Dereferencing pointer value that is */
/* apparently NULL. */
/* Reason : "Config" pointer is checked and verified */
/* when DET is switched STD_ON. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Check if the database is present */
if(PWM_DBTOC_VALUE == ConfigPtr->ulStartOfDbToc)
{
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
/* MISRA Rule : 1.2 */
/* Message : Dereferencing pointer value that is */
/* apparently NULL. */
/* Reason : "Config" pointer is checked and verified */
/* when DET is switched STD_ON. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/*
* Save the start of TAUA/TAUB/TAUC Unit Configuration in the global
* pointer
*/
Pwm_GpTAUABCUnitConfig = ConfigPtr->pTAUABCUnitConfig;
#endif
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/* Save the start of TAUJ Unit Configuration in the global pointer */
Pwm_GpTAUJUnitConfig = ConfigPtr->pTAUJUnitConfig;
#endif
/* Save the start of channel Configuration in the global pointer */
Pwm_GpChannelConfig = ConfigPtr->pChannelConfig;
#if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON)
/* Save the start of synch start Configuration in the global pointer */
Pwm_GpSynchStartConfig = ConfigPtr->pSynchStartConfig;
#endif
/* Save the start of channel-timer map in the global pointer */
Pwm_GpChannelTimerMap = ConfigPtr->pChannelTimerMap;
#if (PWM_NOTIFICATION_SUPPORTED == STD_ON)
/* Save the start of Notification status array in the global pointer */
Pwm_GpNotifStatus = ConfigPtr->pNotifStatus;
#endif
/* Save the start of Idle state status array in the global pointer */
Pwm_GpChannelIdleStatus = ConfigPtr->pChannelIdleStatus;
/* Initialize all PWM channels */
Pwm_HW_Init();
#if (PWM_DEV_ERROR_DETECT == STD_ON)
/* Set PWM Driver status to initialized */
Pwm_GblDriverStatus = PWM_INITIALIZED;
#endif
}
#if (PWM_DEV_ERROR_DETECT == STD_ON)
/* If there is no valid database present */
else
{
/* Report to DET */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID,PWM_INIT_SID,
PWM_E_INVALID_DATABASE);
}
#endif /* End of (PWM_DEV_ERROR_DETECT == STD_ON) */
} /* End of if(LblDetErrFlag == PWM_FALSE) */
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Pwm_DeInit
**
** Service ID : 0x01
**
** Description : This service performs de-initialisation of the PWM
** Driver component.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Non-Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : 1.PWM Driver should be initialized.
** 2.This API is available only if the pre-compile option
** PWM_DE_INIT_API is STD_ON.
**
** Remarks : Global Variable(s):
** Pwm_GblDriverStatus
** Function(s) invoked:
** Det_ReportError, Pwm_HW_DeInit
*******************************************************************************/
#if (PWM_DE_INIT_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, PWM_PUBLIC_CODE) Pwm_DeInit(void)
{
#if (PWM_DEV_ERROR_DETECT == STD_ON)
/* Check if PWM Driver is initialized */
if (Pwm_GblDriverStatus != PWM_INITIALIZED)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_DEINIT_SID,
PWM_E_UNINIT);
}
else
#endif /* End of (PWM_DEV_ERROR_DETECT == STD_ON) */
{
/* De-Initialise all PWM channels */
Pwm_HW_DeInit();
#if (PWM_DEV_ERROR_DETECT == STD_ON)
/* Set PWM Driver status to uninitialized */
Pwm_GblDriverStatus = PWM_UNINITIALIZED;
#endif
}
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* End of (PWM_DE_INIT_API == STD_ON) */
/*******************************************************************************
** Function Name : Pwm_SetDutyCycle
**
** Service ID : 0x02
**
** Description : This API is used to set the required Duty cycle for a
** PWM channel.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : ChannelNumber, DutyCycle.
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : 1.PWM Driver should be initialized.
** 2.This API is available only if the pre-compile
** option PWM_SET_DUTY_CYCLE_API is STD_ON.
**
** Remarks : Global Variable(s):
** Pwm_GblDriverStatus, Pwm_GpChannelTimerMap
** Function(s) invoked:
** Det_ReportError, Pwm_HW_SetDuty
*******************************************************************************/
#if (PWM_SET_DUTY_CYCLE_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, PWM_PUBLIC_CODE) Pwm_SetDutyCycle
(Pwm_ChannelType ChannelNumber, uint16 DutyCycle)
{
Pwm_ChannelType LddChannelId;
#if (PWM_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
LblDetErrFlag = PWM_FALSE;
/* Check if PWM Driver is initialized */
if (Pwm_GblDriverStatus != PWM_INITIALIZED)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_SET_DUTYCYCLE_SID,
PWM_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = PWM_TRUE;
}
/* Check ChannelNumber is in the valid range */
if (ChannelNumber > PWM_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_SET_DUTYCYCLE_SID,
PWM_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = PWM_TRUE;
}
/* Check for valid Duty range */
if (DutyCycle > MAX_DUTY_CYCLE)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_SET_DUTYCYCLE_SID,
PWM_E_PARAM_VALUE);
/* Set error status flag to true */
LblDetErrFlag = PWM_TRUE;
}
else
{
/* For Misra Compliance */
}
if(PWM_FALSE == LblDetErrFlag)
#endif /* #if (PWM_DEV_ERROR_DETECT == STD_ON) */
{
LddChannelId = Pwm_GpChannelTimerMap[ChannelNumber];
#if(PWM_DEV_ERROR_DETECT == STD_ON)
/* Check ChannelNumber is configured */
if (PWM_CHANNEL_UNCONFIGURED == LddChannelId)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_SET_DUTYCYCLE_SID,
PWM_E_PARAM_CHANNEL);
}
else
#endif
{
/* Set the Duty cycle for the required channel */
Pwm_HW_SetDutyCycle(LddChannelId, DutyCycle);
}
}
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* End of (PWM_SET_DUTY_CYCLE_API == STD_ON) */
/*******************************************************************************
** Function Name : Pwm_SetPeriodAndDuty
**
** Service ID : 0x03
**
** Description : This API is used to set the required Period and Duty
** cycle for a PWM channel.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : ChannelNumber, Period, DutyCycle.
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : 1.PWM Driver should be initialized.
** 2.This API is available only if the pre-compile
** option PWM_SET_PERIOD_AND_DUTY_API is STD_ON.
**
** Remarks : Global Variable(s):
** Pwm_GblDriverStatus, Pwm_GpChannelConfig,
** Pwm_GpChannelTimerMap
** Function(s) invoked:
** Det_ReportError, Pwm_HW_SetPeriodAndDuty
*******************************************************************************/
#if (PWM_SET_PERIOD_AND_DUTY_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, PWM_PUBLIC_CODE) Pwm_SetPeriodAndDuty
(Pwm_ChannelType ChannelNumber, Pwm_PeriodType Period, uint16 DutyCycle)
{
#if (PWM_DEV_ERROR_DETECT == STD_ON)
/* Pointer pointing to the channel configuration */
P2CONST(Tdd_Pwm_ChannelConfigType,AUTOMATIC,PWM_CONFIG_CONST)LpChannel;
#endif
Pwm_ChannelType LddChannelId;
#if (PWM_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
LblDetErrFlag = PWM_FALSE;
/* Check if PWM Driver is initialized */
if (Pwm_GblDriverStatus != PWM_INITIALIZED)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_SET_PERIODANDDUTY_SID,
PWM_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = PWM_TRUE;
}
/* Check ChannelNumber is in the valid range */
if (ChannelNumber > PWM_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_SET_PERIODANDDUTY_SID,
PWM_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = PWM_TRUE;
}
/* Check for valid Period */
if (((PWM_TAUJ_UNIT_USED != STD_ON) \
&& (Period > PWM_TAUABC_MAX_PERIOD_VALUE)) || \
(PWM_ZERO == Period))
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_SET_PERIODANDDUTY_SID,
PWM_E_PARAM_VALUE);
/* Set error status flag to true */
LblDetErrFlag = PWM_TRUE;
}
/* Check for valid Duty range */
if (DutyCycle > MAX_DUTY_CYCLE)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_SET_PERIODANDDUTY_SID,
PWM_E_PARAM_VALUE);
/* Set error status flag to true */
LblDetErrFlag = PWM_TRUE;
}
else
{
/* For Misra Compliance */
}
if(PWM_FALSE == LblDetErrFlag)
#endif /* #if (PWM_DEV_ERROR_DETECT == STD_ON) */
{
LddChannelId = Pwm_GpChannelTimerMap[ChannelNumber];
#if (PWM_DEV_ERROR_DETECT == STD_ON)
LpChannel = &Pwm_GpChannelConfig[LddChannelId];
/* Check ChannelNumber is configured */
if (PWM_CHANNEL_UNCONFIGURED == LddChannelId)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_SET_PERIODANDDUTY_SID,
PWM_E_PARAM_CHANNEL);
}
/* Check if Channel configured in Master Mode and Check if the Channel
* is of fixed period type
*/
else if ((PWM_MASTER_CHANNEL == LpChannel->uiTimerMode) &&
((PWM_FIXED_PERIOD == LpChannel->enClassType) ||
(PWM_FIXED_PERIOD_SHIFTED == LpChannel->enClassType)))
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID,
PWM_SET_PERIODANDDUTY_SID, PWM_E_PERIOD_UNCHANGEABLE);
}
else
#endif
{
/* Set Period and Duty cycle for the required channel */
Pwm_HW_SetPeriodAndDuty(LddChannelId, Period, DutyCycle);
}
}
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* End of (PWM_SET_PERIOD_AND_DUTY_API == STD_ON) */
/*******************************************************************************
** Function Name : Pwm_SetOutputToIdle
**
** Service ID : 0x04
**
** Description : This API is used to set the output of PWM channel to
** its configured Idle state.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : ChannelNumber
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : 1.PWM Driver should be initialized.
** 2.This API is available only if the pre-compile option
** PWM_SET_OUTPUT_TO_IDLE_API is STD_ON.
**
** Remarks : Global Variable(s):
** Pwm_GblDriverStatus
** Function(s) invoked:
** Det_ReportError, Pwm_HW_SetOutputToIdle
*******************************************************************************/
#if (PWM_SET_OUTPUT_TO_IDLE_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, PWM_PUBLIC_CODE) Pwm_SetOutputToIdle
(Pwm_ChannelType ChannelNumber)
{
Pwm_ChannelType LddChannelId;
#if (PWM_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
LblDetErrFlag = PWM_FALSE;
/* Check if PWM Driver is initialized */
if (Pwm_GblDriverStatus != PWM_INITIALIZED)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_SET_OUTPUTTOIDLE_SID,
PWM_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = PWM_TRUE;
}
/* Check ChannelNumber is in the valid range */
if (ChannelNumber > PWM_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_SET_OUTPUTTOIDLE_SID,
PWM_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = PWM_TRUE;
}
else
{
/* For Misra Compliance */
}
if(PWM_FALSE == LblDetErrFlag)
#endif /* End of (PWM_DEV_ERROR_DETECT == STD_ON) */
{
LddChannelId = Pwm_GpChannelTimerMap[ChannelNumber];
#if (PWM_DEV_ERROR_DETECT == STD_ON)
/* Check ChannelNumber is configured */
if (PWM_CHANNEL_UNCONFIGURED == LddChannelId)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_SET_OUTPUTTOIDLE_SID,
PWM_E_PARAM_CHANNEL);
}
else
#endif /* End of (PWM_DEV_ERROR_DETECT == STD_ON) */
{
/* Set the output of a channel to its Idle state */
Pwm_HW_SetOutputToIdle(LddChannelId);
}
}
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* End of (PWM_SET_OUTPUT_TO_IDLE_API == STD_ON) */
/*******************************************************************************
** Function Name : Pwm_GetOutputState
**
** Service ID : 0x05
**
** Description : This API is used to get the output state of PWM
** channel.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : ChannelNumber
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Pwm_OutputStateType (PWM_LOW / PWM_HIGH)
**
** Preconditions : 1.PWM Driver should be initialized.
** 2.This API is available only if the pre-compile
** option PWM_GET_OUTPUT_STATE_API is STD_ON.
**
** Remarks : Global Variable(s):
** Pwm_GblDriverStatus
** Function(s) invoked:
** Det_ReportError, Pwm_HW_GetOutputState
*******************************************************************************/
#if (PWM_GET_OUTPUT_STATE_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(Pwm_OutputStateType, PWM_PUBLIC_CODE) Pwm_GetOutputState
(Pwm_ChannelType ChannelNumber)
{
Pwm_ChannelType LddChannelId;
Pwm_OutputStateType LddRetOutputState;
#if (PWM_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
LblDetErrFlag = PWM_FALSE;
/* Initialise the return value in case of DET error */
LddRetOutputState = PWM_LOW;
/* Check if PWM Driver is initialized */
if (Pwm_GblDriverStatus != PWM_INITIALIZED)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_GET_OUTPUTSTATE_SID,
PWM_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = PWM_TRUE;
}
/* Check ChannelNumber is in the valid range */
if (ChannelNumber > PWM_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_GET_OUTPUTSTATE_SID,
PWM_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = PWM_TRUE;
}
else
{
/* For Misra Compliance */
}
if(PWM_FALSE == LblDetErrFlag)
#endif /* End of (PWM_DEV_ERROR_DETECT == STD_ON) */
{
LddChannelId = Pwm_GpChannelTimerMap[ChannelNumber];
#if (PWM_DEV_ERROR_DETECT == STD_ON)
/* Check ChannelNumber is configured */
if (PWM_CHANNEL_UNCONFIGURED == LddChannelId)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_GET_OUTPUTSTATE_SID,
PWM_E_PARAM_CHANNEL);
}
else
#endif /* End of (PWM_DEV_ERROR_DETECT == STD_ON) */
{
/* Get the output state of a PWM channel */
LddRetOutputState = Pwm_HW_GetOutputState(LddChannelId);
}
}
return LddRetOutputState;
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* End of (PWM_GET_OUTPUT_STATE_API == STD_ON) */
/*******************************************************************************
** Function Name : Pwm_DisableNotification
**
** Service ID : 0x06
**
** Description : This API is used to disable the notifications of a
** PWM channel.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : ChannelNumber
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : 1.PWM Driver should be initialized.
** 2.This API is available only if the pre-compile option
** PWM_NOTIFICATION_SUPPORTED is STD_ON.
**
** Remarks : Global Variable(s):
** Pwm_GblDriverStatus, Pwm_GpChannelTimerMap,
** Pwm_GpChannelConfig, Pwm_GpNotifStatus
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
#if(PWM_NOTIFICATION_SUPPORTED == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, PWM_PUBLIC_CODE) Pwm_DisableNotification
(Pwm_ChannelType ChannelNumber)
{
Pwm_ChannelType LddChannelId;
/* Pointer to channel configuration */
P2CONST(Tdd_Pwm_ChannelConfigType,AUTOMATIC,PWM_CONFIG_CONST)LpChannelConfig;
#if (PWM_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
LblDetErrFlag = PWM_FALSE;
/* Check if PWM Driver is initialized */
if (Pwm_GblDriverStatus != PWM_INITIALIZED)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID,
PWM_DISABLENOTIFICATION_SID,PWM_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = PWM_TRUE;
}
/* Check ChannelNumber is in the valid range */
if (ChannelNumber > PWM_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID,
PWM_DISABLENOTIFICATION_SID,PWM_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = PWM_TRUE;
}
else
{
/* For Misra Compliance */
}
if(PWM_FALSE == LblDetErrFlag)
#endif /* End of (PWM_DEV_ERROR_DETECT == STD_ON) */
{
LddChannelId = Pwm_GpChannelTimerMap[ChannelNumber];
#if (PWM_DEV_ERROR_DETECT == STD_ON)
/* Check ChannelNumber is configured */
if (PWM_CHANNEL_UNCONFIGURED == LddChannelId)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID,
PWM_DISABLENOTIFICATION_SID,PWM_E_PARAM_CHANNEL);
}
/* Check the notification is already disabled */
else if (PWM_FALSE == Pwm_GpNotifStatus[LddChannelId])
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID,
PWM_DISABLENOTIFICATION_SID,PWM_E_ALREADY_DISABLED);
}
else
#endif /* End of (PWM_DEV_ERROR_DETECT == STD_ON) */
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpChannelConfig = Pwm_GpChannelConfig + LddChannelId;
/* Check whether any notifications is configured for this channel */
if (PWM_NO_CBK_CONFIGURED != LpChannelConfig->ucNotificationConfig)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data */
/* will give implementation defined results */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this warning */
/* is generated by the QAC tool V6.2.1 as */
/* an indirect result of integral promotion */
/* in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is */
/* verified manually and it is not having */
/* any impact. */
/* Disabling the interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlRegs) |=
~(LpChannelConfig->ucImrMaskValue);
/* Notification is disabled */
Pwm_GpNotifStatus[LddChannelId] = PWM_FALSE;
}
else
{
/* For Misra Compliance */
}
}
}
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* End of (PWM_NOTIFICATION_SUPPORTED == STD_ON) */
/*******************************************************************************
** Function Name : Pwm_EnableNotification
**
** Service ID : 0x07
**
** Description : This API is used to enable the notifications for a
** PWM channel.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : ChannelNumber, Notification
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : 1.PWM Driver should be initialized.
** 2.This API is available only if the pre-compile option
** PWM_NOTIFICATION_SUPPORTED is STD_ON.
**
** Remarks : Global Variable(s):
** Pwm_GblDriverStatus, Pwm_GpChannelTimerMap,
** Pwm_GpChannelConfig, Pwm_GpNotifStatus
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
#if (PWM_NOTIFICATION_SUPPORTED == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, PWM_PUBLIC_CODE) Pwm_EnableNotification
(Pwm_ChannelType ChannelNumber, Pwm_EdgeNotificationType Notification)
{
/* Pointer to channel configuration */
P2CONST(Tdd_Pwm_ChannelConfigType,AUTOMATIC,PWM_CONFIG_CONST)LpChannelConfig;
Pwm_ChannelType LddChannelId;
#if (PWM_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
LblDetErrFlag = PWM_FALSE;
/* Check if PWM Driver is initialized */
if (PWM_INITIALIZED != Pwm_GblDriverStatus)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_ENABLENOTIFICATION_SID,
PWM_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = PWM_TRUE;
}
/* Check ChannelNumber is in the valid range */
if (ChannelNumber > PWM_MAX_CHANNEL_ID_CONFIGURED)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID, PWM_ENABLENOTIFICATION_SID,
PWM_E_PARAM_CHANNEL);
/* Set error status flag to true */
LblDetErrFlag = PWM_TRUE;
}
else
{
/* For Misra Compliance */
}
if(PWM_FALSE == LblDetErrFlag)
#endif /* End of (PWM_DEV_ERROR_DETECT == STD_ON) */
{
LddChannelId = Pwm_GpChannelTimerMap[ChannelNumber];
#if (PWM_DEV_ERROR_DETECT == STD_ON)
/* Check ChannelNumber is configured */
if (PWM_CHANNEL_UNCONFIGURED == LddChannelId)
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID,
PWM_ENABLENOTIFICATION_SID, PWM_E_PARAM_CHANNEL);
}
else if (PWM_TRUE == Pwm_GpNotifStatus[LddChannelId])
{
/* Report to DET module */
Det_ReportError(PWM_MODULE_ID, PWM_INSTANCE_ID,
PWM_ENABLENOTIFICATION_SID, PWM_E_ALREADY_ENABLED);
}
else
#endif /* #if (PWM_DEV_ERROR_DETECT == STD_ON) */
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpChannelConfig = Pwm_GpChannelConfig + LddChannelId;
/* Check for channel in the Slave Mode */
if(PWM_MASTER_CHANNEL != LpChannelConfig->uiTimerMode)
{
if(PWM_BOTH_EDGES == Notification)
{
/* Check whether any notification is configured for this channel */
if(PWM_NO_CBK_CONFIGURED != LpChannelConfig->ucNotificationConfig)
{
/* Set the Notification enable status as PWM_TRUE
* for this channel
*/
Pwm_GpNotifStatus[LddChannelId] = PWM_TRUE;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data */
/* will give implementation defined */
/* results. */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this */
/* warning is generated by the QAC tool */
/* V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is */
/* verified manually and it is not having */
/* any impact. */
/* Check whether the interrupt channel is enable */
if ((*(LpChannelConfig->pImrIntrCntlRegs)
| ~(LpChannelConfig->ucImrMaskValue)) != PWM_ZERO)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data */
/* will give implementation defined */
/* results. */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this */
/* warning is generated by the QAC tool */
/* V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is */
/* verified manually and it is not having */
/* any impact. */
/* Disabling the interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlRegs) |=
~(LpChannelConfig->ucImrMaskValue);
/* Clearing the interrupt request flag */
*(LpChannelConfig->pIntrCntlRegs) &= PWM_CLEAR_INT_REQUEST_FLAG;
/* Enable the interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlRegs) &=
LpChannelConfig->ucImrMaskValue;
}
}
else
{
/* For Misra Compliance */
}
/* Get Master's channel ID */
LddChannelId -= LpChannelConfig->ucMasterOffset;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Get Master's channel Config */
LpChannelConfig -= LpChannelConfig->ucMasterOffset;
/* Check whether any notification is configured for this channel */
if(PWM_NO_CBK_CONFIGURED != LpChannelConfig->ucNotificationConfig)
{
/* Set the Notification enable status as PWM_TRUE
* for Master channel
*/
Pwm_GpNotifStatus[LddChannelId] = PWM_TRUE;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data */
/* will give implementation defined */
/* results. */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this */
/* warning is generated by the QAC tool */
/* V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is */
/* verified manually and it is not having */
/* any impact. */
/* Check whether the interrupt channel is enable */
if ((*(LpChannelConfig->pImrIntrCntlRegs)
| ~(LpChannelConfig->ucImrMaskValue)) != PWM_ZERO)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data */
/* will give implementation defined */
/* results. */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this */
/* warning is generated by the QAC tool */
/* V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is */
/* verified manually and it is not having */
/* any impact. */
/* Disabling the interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlRegs) |=
~(LpChannelConfig->ucImrMaskValue);
/* Clearing the interrupt request flag */
*(LpChannelConfig->pIntrCntlRegs) &= PWM_CLEAR_INT_REQUEST_FLAG;
/* Enable the interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlRegs) &=
LpChannelConfig->ucImrMaskValue;
}
}
else
{
/* For Misra Compliance */
}
}
else if (PWM_RISING_EDGE == Notification)
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Get Master's channel Config */
LpChannelConfig -= LpChannelConfig->ucMasterOffset;
/* Get Master's channel ID */
LddChannelId -= LpChannelConfig->ucMasterOffset;
/* Check whether any notification is configured for this channel */
if(PWM_NO_CBK_CONFIGURED != LpChannelConfig->ucNotificationConfig)
{
/* Set the Notification enable status as PWM_TRUE
* for this channel
*/
Pwm_GpNotifStatus[LddChannelId] = PWM_TRUE;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data */
/* will give implementation defined */
/* results. */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this */
/* warning is generated by the QAC tool */
/* V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is */
/* verified manually and it is not having */
/* any impact. */
/* Check whether the interrupt channel is enable */
if ((*(LpChannelConfig->pImrIntrCntlRegs)
| ~(LpChannelConfig->ucImrMaskValue)) != PWM_ZERO)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data */
/* will give implementation defined */
/* results. */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this */
/* warning is generated by the QAC tool */
/* V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is */
/* verified manually and it is not having */
/* any impact. */
/* Disabling the interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlRegs) |=
~(LpChannelConfig->ucImrMaskValue);
/* Clearing the interrupt request flag */
*(LpChannelConfig->pIntrCntlRegs) &= PWM_CLEAR_INT_REQUEST_FLAG;
/* Enable the interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlRegs) &=
LpChannelConfig->ucImrMaskValue;
}
}
}
/* For FALLING EDGE Notification */
else
{
/* Set the Notification enable status as PWM_TRUE
* for this channel
*/
Pwm_GpNotifStatus[LddChannelId] = PWM_TRUE;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data */
/* will give implementation defined results */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this warning */
/* is generated by the QAC tool V6.2.1 as */
/* an indirect result of integral promotion */
/* in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is */
/* verified manually and it is not having */
/* any impact. */
/* Check whether the interrupt channel is enable */
if ((*(LpChannelConfig->pImrIntrCntlRegs)
| ~(LpChannelConfig->ucImrMaskValue)) != PWM_ZERO)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data */
/* will give implementation defined results */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this warning */
/* is generated by */
/* the QAC tool V6.2.1 as an indirect result*/
/* of integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is */
/* verified manually and it is not having */
/* any impact. */
/* Disabling the interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlRegs) |=
~(LpChannelConfig->ucImrMaskValue);
/* Clearing the interrupt request flag */
*(LpChannelConfig->pIntrCntlRegs) &= PWM_CLEAR_INT_REQUEST_FLAG;
/* Enable the interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlRegs) &=
LpChannelConfig->ucImrMaskValue;
}
}
}/* End of if(PWM_MASTER_CHANNEL != LpChannelConfig->uiTimerMode) */
else
{
/* For Misra Compliance */
}
}
} /* End of if(LblDetErrFlag == PWM_FALSE) */
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* End of (PWM_NOTIFICATION_SUPPORTED == STD_ON) */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/IoHwAb/IoHwAb_ADC.c
/*****************************************************************************
|File Name: Switch.c
|
|Description: Switch input handle subsystem.
|
|-----------------------------------------------------------------------------
| PATAC Confidential
|-----------------------------------------------------------------------------
|
| This software is copyright is proprietary of Pan Asia Technical Automotive Company(PATAC).
| All rights are reserved by PATAC.
|
|-----------------------------------------------------------------------------
| A U T H O R I D E N T I T Y
|-----------------------------------------------------------------------------
| Initials Name Company
| ------------------------------------ ---------------------------------------
|
|
|-----------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|-----------------------------------------------------------------------------
| Date Version Author Description
|---------- -------- ------ ----------------------------------------------
|2009-05-18 01.00.00 WH Creation
*****************************************************************************/
/******************************************************************************
** Include Section **
******************************************************************************/
#include "IoHwAb_Switch.h"
#include "string.h"
#include "Std_Macro.h"
#include "Com.h"
#include "PnNm_Manager.h"
//#include "Kam.h"
/*******************************************************************************
| Macro Definition
|******************************************************************************/
#define CeIoHwAb_u_NullAdRangeId 0xFF
#define IoHwAb_GetBatVoltRaw() 1200u
#define IoHwAb_GetBatVoltFlt() 1200u
#define IoHwAb_GetBatVoltStat() TRUE
/*******************************************************************************
| Enum Definition
|******************************************************************************/
/*******************************************************************************
| Typedef Definition
|******************************************************************************/
/*******************************************************************************
| Global variables Declaration
|******************************************************************************/
TeADSW_GrupStat VaADSW_h_GrupStat[SWGRUP_NUM];
uint16 VaSW_w_AdGrupTimer[SWGRUP_NUM];
TeSW_CmmnStat VaSW_h_CmmnStat[SWID_NUM];
TeSW_CmmnFailFlags VaSW_h_CmmnFFlg[SWID_NUM];
uint8 VaSW_u_OBDIStat[(OBDI_Num+7)/8];
/*AD switch enum value raw, init to zero*/
UINT8 VaSW_e_GrupSwEnumRaw[SWGRUP_NUM];
/*AD switch enum value filted, init to zero*/
UINT8 VaSW_e_GrupSwEnumFlt[SWGRUP_NUM];
/*******************************************************************************
| Static local variables Declaration
|******************************************************************************/
//#pragma DATA_SEG RUN_KAM
TeSW_CmmnStat RaSW_h_CmmnStat[SWID_NUM];
//#pragma DATA_SEG DEFAULT
/*Switch timer for debounce(digital) and stuck check(digital/analog)*/
static uint16 VaSW_w_CmmnTimer[SWID_NUM];
/*******************************************************************************
| Static Local Functions Declaration
|******************************************************************************/
#if 0
void SetSW_GrupDtc(uint8 GrupId, uint8 RngId);
void ClrSW_GrupDtc(uint8 GrupId);
void SetSW_AdDiagGrup(uint8 GrupId, uint8 RngId);
void SetSW_AdDiagRng(uint8 GrupId, uint8 RngId);
#endif
#if 0
static void UpdtSW_OBDIStatus(void);
static uint8 GetSW_u_StuckStat(uint8 SwId);
static void TrigSW_EvtOnChng(uint8 SwId);
#endif
static void DtrmSW_NonAdTypeRaw(void);
static void UpdtSW_FltStat(uint8 LeSW_u_SwId);
static void DtrmSW_Status(void);
static void DtrmSW_sendsignal(void);
static void DtrmSW_AdTypeRaw(void);
static uint8 GetSW_u_AdRangeRaw(uint8 GrupId);
static void UpdtSW_AdRangeFlt(uint8 GrupId, uint8 Le_u_AdRangeIdRaw);
static void UpdtSW_AdDscrtStat(uint8 GrupId);
extern uint32 App_READ_Buffer_JOB1[1];
/*******************************************************************************
| Extern variables and functions declaration
|******************************************************************************/
/*******************************************************************************
| Function Source Code
|******************************************************************************/
/****************************************************************************************
| NAME: SwtAb_Handler
| CALLED BY: IoHwAb_SchM10ms
| PRECONDITIONS:
| INPUT PARAMETERS:
| RETURN VALUE: NA
| DESCRIPTION: process switch task
****************************************************************************************/
void SwtAb_Handler(void)
{
DtrmSW_NonAdTypeRaw();
DtrmSW_AdTypeRaw();
DtrmSW_Status();
DtrmSW_sendsignal();
//UpdtSW_OBDIStatus();
}
/****************************************************************************************
| NAME: DtrmSW_NonAdTypeRaw
| CALLED BY: SwtAb_Handler(10 ms task schedule)
| PRECONDITIONS:
| INPUT PARAMETERS: NA
| RETURN VALUE: NA
| DESCRIPTION: Determine digital switch status (non-AD type switches).
****************************************************************************************/
static void DtrmSW_NonAdTypeRaw(void)
{
uint8 Le_u_SwId;
for(Le_u_SwId = 0; Le_u_SwId < SWID_NUM; Le_u_SwId++)
{
/*determine switch raw input*/
if(FALSE == SWCFG_ENABLED(Le_u_SwId))
{
SW_RAW(Le_u_SwId) = 0;
}
/*determine switch raw input by switch type and config*/
else if(SW_CHANNEL_TYPE_DIO == SWCFG_CHANNEL_TYPE(Le_u_SwId))
{
if((SWCFG_PRS_IS_HIGH(Le_u_SwId) && (STD_HIGH==Dio_ReadChannel(SWCFG_CHANNEL_ID(Le_u_SwId)))) ||
((FALSE == SWCFG_PRS_IS_HIGH(Le_u_SwId)) && (STD_LOW==Dio_ReadChannel(SWCFG_CHANNEL_ID(Le_u_SwId)))))
{
SW_RAW(Le_u_SwId) = 1;
}
else
{
SW_RAW(Le_u_SwId) = 0;
}
}
else if(SW_CHANNEL_TYPE_SPI == SWCFG_CHANNEL_TYPE(Le_u_SwId))
{
if((SWCFG_PRS_IS_HIGH(Le_u_SwId) && (STD_HIGH==Read_Buf_Bit((uint8 *)App_READ_Buffer_JOB1,SWCFG_CHANNEL_ID(Le_u_SwId)))) ||
((FALSE == SWCFG_PRS_IS_HIGH(Le_u_SwId)) && (STD_LOW==Read_Buf_Bit((uint8 *)App_READ_Buffer_JOB1,SWCFG_CHANNEL_ID(Le_u_SwId)))))
{
SW_RAW(Le_u_SwId) = 1;
}
else
{
SW_RAW(Le_u_SwId) = 0;
}
}
else
{
/*TODO: other type switches like SPI or I2C*/
}
}/*parsing next digital switch*/
}
/****************************************************************************************
| NAME: UpdtSW_FltStat
| CALLED BY:
| PRECONDITIONS:
| INPUT PARAMETERS: LeSW_u_SwId - Switch ID #
| RETURN VALUE: NA
| DESCRIPTION: determine switch status after diagnostic.
| call this rountine after switch is debouced.
****************************************************************************************/
static void UpdtSW_FltStat(uint8 LeSW_u_SwId)
{
/*Set once inactive flag when debounced and not pressed
* Set learned flag when debouce pass and once inactive requirement pass
* If switch is no need once-inactive, also set learn flag.
*/
if(FALSE == SW_RAW(LeSW_u_SwId))
{
SET_SW_ONCEINACTV(LeSW_u_SwId);
SET_SW_LEARNED(LeSW_u_SwId);
}
if(FALSE == SWCFG_INACTV_BFRUSE(LeSW_u_SwId))
{
SET_SW_LEARNED(LeSW_u_SwId);
}
/*update switch filtered status after learned and stuck checked
* if switch error, or not learned, use default value instead
*/
if(IS_SW_LEARNED(LeSW_u_SwId))
{
SW_FLT(LeSW_u_SwId) = SW_RAW(LeSW_u_SwId);
}
else
{
SW_FLT(LeSW_u_SwId) = SWCFG_DEFAULT_VAL(LeSW_u_SwId);
}
/*set valid flag after debounce*/
VeSW_b_PrsdStatValid(LeSW_u_SwId) = TRUE;
/*change toggle flag when filtered switch changed from unpressed to pressed.
* it is set without consider switch type, however, toggle state is mainly used with momentary switch.
*/
if(SW_FLT(LeSW_u_SwId) &&
(FALSE == SW_FLT_LAST(LeSW_u_SwId)))
{
TOGGLE_SW(LeSW_u_SwId);
}
}
/****************************************************************************************
| NAME: TrigSW_EvtOnChng
| CALLED BY:
| PRECONDITIONS:
| INPUT PARAMETERS:
| RETURN VALUE: NA
| DESCRIPTION: Detect switch change event and update last switch filtered state
****************************************************************************************/
static void TrigSW_EvtOnChng(uint8 SwId)
{
if(SW_FLT_LAST(SwId) != SW_FLT(SwId))
{
if(TRUE == SW_FLT(SwId))
{
SetSW_Event(SWCFG_EVENTID_PRESS(SwId));
}
else
{
SetSW_Event(SWCFG_EVENTID_RELEASE(SwId));
}
SetSW_Event(SWCFG_EVENTID_CHANGE(SwId));
SW_FLT_LAST(SwId) = SW_FLT(SwId); //save history filterd switch status
}
}
/****************************************************************************************
| NAME: DtrmSW_AdTypeRaw
| CALLED BY: SwtAb_Handler(10 ms task)
| PRECONDITIONS:
| INPUT PARAMETERS: NA
| RETURN VALUE: NA
| DESCRIPTION: Determine ADSW group status and switch status
****************************************************************************************/
static void DtrmSW_AdTypeRaw(void)
{
uint8 GrupId;
uint8 Le_u_AdRangeIdRaw;
for(GrupId = 0; GrupId < SWGRUP_NUM; GrupId++)
{
Le_u_AdRangeIdRaw = GetSW_u_AdRangeRaw(GrupId);
/*undefined range (illegal range), note short to battery/ground and open circuit should be defiined*/
if(CeIoHwAb_u_NullAdRangeId == Le_u_AdRangeIdRaw)
{
/*keep the previous value*/
}
else
{
VaSW_e_GrupSwEnumRaw[GrupId] = KaADSW_h_GrupInfo[GrupId].e_p_AdRngCal[Le_u_AdRangeIdRaw].m_e_SwEnum;
}
UpdtSW_AdRangeFlt(GrupId, Le_u_AdRangeIdRaw);
UpdtSW_AdDscrtStat(GrupId);
}
}
/****************************************************************************************
| NAME: GetSW_u_AdRangeRaw
| CALLED BY: DtrmSW_AdType
| PRECONDITIONS:
| INPUT PARAMETERS: GrupId - AD group ID #
| RETURN VALUE:
| DESCRIPTION:
****************************************************************************************/
static uint8 GetSW_u_AdRangeRaw(uint8 GrupId)
{
uint8 Le_u_AdRangeIdTemp;
uint8 Le_u_AdRangeIdRaw;
uint16 Le_w_ConvertedAdRaw;
uint32 dwTmp;
/*convert the AD raw Value to reference value*/
dwTmp = *KaADSW_h_GrupInfo[GrupId].mp_w_AdRaw;
dwTmp = dwTmp * KaADSW_h_GrupInfo[GrupId].e_w_SrcVoltRef /
*KaADSW_h_GrupInfo[GrupId].e_p_SrcVolt;
if(dwTmp > ADC_CONF_RES)
{
Le_w_ConvertedAdRaw = ADC_CONF_RES;
}
else
{
Le_w_ConvertedAdRaw = (uint16)dwTmp;
}
/*find current AD value in range list to match one of the AD range of this switch
*if match, save the ID and exit searching
*matched range index means related switches are pressed.
*/
Le_u_AdRangeIdRaw = CeIoHwAb_u_NullAdRangeId;
/*range is allowed crossing over each other, in this case, history range take higher priority.*/
/*note, AD switch has possibly in previous voltage range in real world, so we always check the previous region first*/
Le_u_AdRangeIdTemp = VaADSW_h_GrupStat[GrupId].m_u_PrevAdRangeId;
if((Le_u_AdRangeIdTemp < SWCFG_ADRNG_SIZE(GrupId)) &&
(Le_w_ConvertedAdRaw >= KaADSW_h_GrupInfo[GrupId].e_p_AdRngCal[Le_u_AdRangeIdTemp].wAD_Range_Low) &&
(Le_w_ConvertedAdRaw <= KaADSW_h_GrupInfo[GrupId].e_p_AdRngCal[Le_u_AdRangeIdTemp].wAD_Range_High))
{
Le_u_AdRangeIdRaw = Le_u_AdRangeIdTemp;
}
/*If not in history range, low index range take higher priority*/
/*Note AD range region may overlapped with each other, in this case, lower range has higher priority*/
else
{
for(Le_u_AdRangeIdTemp = 0; Le_u_AdRangeIdTemp < SWCFG_ADRNG_SIZE(GrupId); Le_u_AdRangeIdTemp++)
{
if((Le_w_ConvertedAdRaw >= KaADSW_h_GrupInfo[GrupId].e_p_AdRngCal[Le_u_AdRangeIdTemp].wAD_Range_Low) &&
(Le_w_ConvertedAdRaw <= KaADSW_h_GrupInfo[GrupId].e_p_AdRngCal[Le_u_AdRangeIdTemp].wAD_Range_High))
{
Le_u_AdRangeIdRaw = Le_u_AdRangeIdTemp;
break;
}
}
}
return Le_u_AdRangeIdRaw;
}
/****************************************************************************************
| NAME: UpdtSW_AdRangeFlt
| CALLED BY: DtrmSW_AdType
| PRECONDITIONS:
| INPUT PARAMETERS: GrupId - AD group ID #
| Le_u_AdRangeIdRaw - current AD input Range Id, Note: RngId maybe a illegal ID!
| RETURN VALUE:
| DESCRIPTION: determine discrete switch due to group id and range id when debounce time pass.
****************************************************************************************/
static void UpdtSW_AdRangeFlt(uint8 GrupId, uint8 Le_u_AdRangeIdRaw)
{
uint8 Le_u_CurrAdRangeId_Flt;
uint8 Le_u_PrevAdRangeId_Flt;
Le_u_PrevAdRangeId_Flt = VaADSW_h_GrupStat[GrupId].m_u_AdRangeId_Flt;
/*update group timer and last group id*/
if(Le_u_AdRangeIdRaw != VaADSW_h_GrupStat[GrupId].m_u_PrevAdRangeId)
{
VaSW_w_AdGrupTimer[GrupId] = 0;
VaADSW_h_GrupStat[GrupId].m_u_PrevAdRangeId = Le_u_AdRangeIdRaw;
}
else
{
if(VaSW_w_AdGrupTimer[GrupId] < 0xFFFF)
{
VaSW_w_AdGrupTimer[GrupId] ++;
}
}
/*update filtered range ID and set a flag if group range is debounced*/
/*note AD switch stuck diagnostic is also detected in common switch module*/
if(VaSW_w_AdGrupTimer[GrupId] >= KaADSW_h_GrupInfo[GrupId].e_w_SwDbcTime)
{
Le_u_CurrAdRangeId_Flt = Le_u_AdRangeIdRaw;
VaADSW_h_GrupStat[GrupId].m_u_AdRangeId_Flt = Le_u_CurrAdRangeId_Flt;
VaSW_e_GrupSwEnumFlt[GrupId] = VaSW_e_GrupSwEnumRaw[GrupId];
}
/*EVENT- range changed event occur, set event ID and update last filtered range ID*/
if(Le_u_CurrAdRangeId_Flt != Le_u_PrevAdRangeId_Flt)
{
SetSW_Event(SWCFG_ADGRUP_EVENTID_RNGCHNG(GrupId));
//SetSW_Event(SWCFG_ADGRUP_EVENTID_RNGCHNG_ARR(GrupId,Le_u_CurrAdRangeId_Flt));
}
}
/****************************************************************************************
| NAME: UpdtSW_AdDscrtStat
| CALLED BY: DtrmSW_AdType
| PRECONDITIONS:
| INPUT PARAMETERS: GrupId - AD group ID #
| RETURN VALUE:
| DESCRIPTION: determine discrete switch due to group id and range id when debounce time pass.
****************************************************************************************/
static void UpdtSW_AdDscrtStat(uint8 GrupId)
{
//uint8 Le_u_AdRangeIdFlt;
//TeSW_CmmnFailFlags Le_h_CmmnFFlg;
// uint8 Le_u_SwIdBitMask;
//const uint8 * DATA_FAR Lp_u_AdSwId;
//TeSW_AdRangeType Le_e_AdRangeType;
//uint8 SwId;
#if 0
Le_u_AdRangeIdFlt = VaADSW_h_GrupStat[GrupId].m_u_AdRangeId_Flt;
Le_e_AdRangeType = KaADSW_h_GrupInfo[GrupId].e_p_AdRngCal[Le_u_AdRangeIdFlt].m_e_AdRangeType;
Lp_u_AdSwId = &KaADSW_h_GrupInfo[GrupId].e_p_SwId[0];
Le_u_SwIdBitMask = KaADSW_h_GrupInfo[GrupId].e_p_AdRngCal[Le_u_AdRangeIdFlt].e_u_BitMask;
/*Update some failure flags of all related discrete switches when AD range is debounced*/
if(Lp_u_AdSwId != NULL)
{
SwId = *Lp_u_AdSwId;
}
else
{
SwId = CeIoHwAb_e_SwIdNull;
}
while(CeIoHwAb_e_SwIdNull != SwId)
{
SET_SW_DBCPASS(SwId);
/*get descrete input when range id is defined(although it may be defined as illeage range)*/
if(Le_u_AdRangeIdFlt != CeIoHwAb_u_NullAdRangeId)
{
/*Update discrete switch raw value*/
SW_RAW(SwId) = ((Le_u_SwIdBitMask & 0x01) > 0);
Le_u_SwIdBitMask >>= 1;
/*Update releated switches' failure flag by this range property*/
Le_h_CmmnFFlg.Byte = VaSW_h_CmmnFFlg[SwId].Byte;
Le_h_CmmnFFlg.Bits.e_b_ShrtBat = (CeIoHwAb_e_AdRangeIllegal == Le_e_AdRangeType); /*defined illegal range*/
Le_h_CmmnFFlg.Bits.e_b_ShrtBat = (CeIoHwAb_e_AdRangeShortBat == Le_e_AdRangeType);
Le_h_CmmnFFlg.Bits.e_b_ShrtGnd = (CeIoHwAb_e_AdRangeShortGnd == Le_e_AdRangeType);
Le_h_CmmnFFlg.Bits.e_b_OpenC = (CeIoHwAb_e_AdRangeOpenLoad== Le_e_AdRangeType);
}
/*clear switch Raw value if in undefined-range*/
else
{
SW_RAW(SwId) = FALSE;
Le_h_CmmnFFlg.Bits.e_b_IllglRng = 1; /*un-defined illegal range*/
}
/*Update Failure flags of each related switch*/
VaSW_h_CmmnFFlg[SwId].Byte = Le_h_CmmnFFlg.Byte;
/*next switch ID*/
Lp_u_AdSwId++;
SwId = *Lp_u_AdSwId;
}
#endif
}
/****************************************************************************************
| NAME: DtrmSW_Status
| CALLED BY: 10 ms task schedule
| PRECONDITIONS: Raw input is determined
| INPUT PARAMETERS: NA
| RETURN VALUE: NA
| DESCRIPTION: Determine filtered switch status by raw input.
****************************************************************************************/
static void DtrmSW_Status(void)
{
uint8 Le_u_SwId;
uint16 LeSW_w_StatusTimer;
boolean LeSW_b_Stucked; /*this local var is for speed optimizing*/
boolean LeSW_b_MaxPrsTimeout; /*this local var is for speed optimizing*/
boolean LeSW_b_VoltOutRange; /*this local var is for speed optimizing*/
/*x10 scaled battery voltage*/
uint8 Le_u_BatVolt;
for(Le_u_SwId=0; Le_u_SwId<SWID_NUM; Le_u_SwId++)
{
LeSW_w_StatusTimer = VaSW_w_CmmnTimer[Le_u_SwId]; /*save for later use, this local var is for speed optimizing*/
/*reset timer if raw input changed; if no change, increase counter*/
if(SW_RAW_LAST(Le_u_SwId) != SW_RAW(Le_u_SwId))
{
LeSW_w_StatusTimer = 0;
CLR_SW_DBCPASS(Le_u_SwId);
}
else if(LeSW_w_StatusTimer < 0xFFFF)
{
LeSW_w_StatusTimer++;
}
else
{}
VaSW_w_CmmnTimer[Le_u_SwId] = LeSW_w_StatusTimer;
/*Diagnostic if momentary switches is stucked or timeout the max pressed time*/
/*if momentary switch is pressed, check the counter and determine the failure status*/
LeSW_b_MaxPrsTimeout = 0;
LeSW_b_Stucked = 0;
if(SWCFG_MOMENTARY(Le_u_SwId) && SW_RAW(Le_u_SwId))
{
if((SWCFG_MAXPRSTIME(Le_u_SwId) > 0) &&
(LeSW_w_StatusTimer >= SWCFG_MAXPRSTIME(Le_u_SwId)))
{
LeSW_b_MaxPrsTimeout = 1;
}
else
{
LeSW_b_MaxPrsTimeout = 0;
}
if((SWCFG_STUCKTIME(Le_u_SwId) > 0) &&
(LeSW_w_StatusTimer >= SWCFG_STUCKTIME(Le_u_SwId)))
{
LeSW_b_Stucked = 1;
}
else
{
LeSW_b_Stucked = 0;
}
VaSW_h_CmmnFFlg[Le_u_SwId].Bits.e_b_MaxPrsTim = LeSW_b_MaxPrsTimeout;
VaSW_h_CmmnFFlg[Le_u_SwId].Bits.e_b_Stck = LeSW_b_Stucked;
}
/*determine if switch voltage range is OK*/
if(IoHwAb_GetBatVoltStat())
{
Le_u_BatVolt = IoHwAb_GetBatVoltFlt() /10u;
if((Le_u_BatVolt < SWCFG_BAT_VOLT_LOW(Le_u_SwId)) ||
(Le_u_BatVolt > SWCFG_BAT_VOLT_HIGH(Le_u_SwId)))
{
LeSW_b_VoltOutRange = TRUE;
}
else
{
LeSW_b_VoltOutRange = FALSE;
}
VaSW_h_CmmnFFlg[Le_u_SwId].Bits.e_b_BVOR = LeSW_b_VoltOutRange;
}
/*if diagnostic info show error, use default value as filtered value
* else, use debouced value as filtered value
* Note battery voltage has affectted the raw value, not directly affect debounced value here.
*/
if(LeSW_b_MaxPrsTimeout || LeSW_b_Stucked)
{
SW_FLT(Le_u_SwId) = FALSE;
}
else if(LeSW_b_VoltOutRange)
{
if(CeSW_FA_UseTrue == SWCFG_BAT_VOLT_ERRACT(Le_u_SwId))
{
SW_FLT(Le_u_SwId) = TRUE;
}
else if(CeSW_FA_UseFalse == SWCFG_BAT_VOLT_ERRACT(Le_u_SwId))
{
SW_FLT(Le_u_SwId) = FALSE;
}
else
{/*use history value*/}
}
else if((FALSE == GET_SW_DBCPASS(Le_u_SwId)) &&
(LeSW_w_StatusTimer >= SWCFG_DBCTIME(Le_u_SwId)))
{
SET_SW_DBCPASS(Le_u_SwId);
UpdtSW_FltStat(Le_u_SwId);
}
else
{}
/*save last switch status*/
SW_RAW_LAST(Le_u_SwId) = SW_RAW(Le_u_SwId);
/* Detect switch change event and update last switch filtered state */
TrigSW_EvtOnChng(Le_u_SwId);
}
}
static void DtrmSW_sendsignal(void)
{
boolean_T FlToPsSwAtv = (boolean_T)0 ;
static boolean_T FlToPsSwAtv_last = (boolean_T)0;
boolean_T WSWshSwAtv = (boolean_T)0 ;
static boolean_T WSWshSwAtv_last = (boolean_T)0 ;
boolean_T RrClosAjarSwAct = (boolean_T)0 ;
static boolean_T RrClosAjarSwAct_last = (boolean_T)0 ;
/*
boolean_T PDAjrSwAtv = (boolean_T)0;
static boolean_T PDAjrSwAtv_last = (boolean_T)0;
boolean_T DDAjrSwAtv = (boolean_T)0;
static boolean_T DDAjrSwAtv_last = (boolean_T)0;
*/
boolean_T HdStV = (boolean_T)0;
static boolean_T HdStV_last = (boolean_T)0;
FlToPsSwAtv = PnRte_Read_ElsFtpFlt();
if(FlToPsSwAtv != FlToPsSwAtv_last)
{
//Com_SendSignal(Com_Com_FlToPsSwAtv__Lighting_Status_BB__BB, &FlToPsSwAtv);
PN_SendSingleSignal(Com_Com_FlToPsSwAtv__Lighting_Status_BB__BB, &FlToPsSwAtv, TRUE, ComM_UserPN03);
FlToPsSwAtv_last = FlToPsSwAtv;
}
WSWshSwAtv = PnRte_Read_WipWndShieldWashFlt();
if(WSWshSwAtv != WSWshSwAtv_last)
{
Com_SendSignal(Com_Com_WSWshSwAtv__Wipe_Wash_Status_BB__BB, &WSWshSwAtv);
WSWshSwAtv_last = WSWshSwAtv;
}
RrClosAjarSwAct = PnRte_Read_EcRearClsrOpnFlt() ;
if(RrClosAjarSwAct != RrClosAjarSwAct_last)
{
Com_SendSignal(Com_Com_RrClosAjarSwAct__Rear_Closure_Ajar_Switch_Status__BB, &RrClosAjarSwAct);
RrClosAjarSwAct_last = RrClosAjarSwAct;
}
/*
PDAjrSwAtv = IoHwAb_GetIDL21();
if(PDAjrSwAtv != PDAjrSwAtv_last )
{
Com_SendSignal(Com_Com_PDAjrSwAtv__Passenger_Door_Status_BB__BB, &PDAjrSwAtv);
PDAjrSwAtv_last = PDAjrSwAtv;
}
DDAjrSwAtv = IoHwAb_GetIDL20();
if(DDAjrSwAtv != DDAjrSwAtv_last)
{
Com_SendSignal(Com_Com_DDAjrSwAtv__Driver_Door_Status__BB, &DDAjrSwAtv);
}
*/
HdStV = IoHwAb_GetIA3Isg();
if(HdStV != HdStV_last)
{
Com_SendSignal(Com_Com_HdStV__Hood_Status_BB__BB, &HdStV);
HdStV_last = HdStV;
}
}
#if 0
/****************************************************************************************
| NAME: InitSW_OnSysRst
| CALLED BY: System reset initialization, after KAM initialized.
| PRECONDITIONS:
| INPUT PARAMETERS:
| RETURN VALUE:
| DESCRIPTION:
****************************************************************************************/
void InitSW_OnSysRst(void)
{
uint8 i;
boolean bTemp;
/*Copy KAM value if KAM integration is OK*/
if(FALSE == GetKAM_b_RunKamRstFlg())
{
(void)memcpy((uint8 *)VaSW_h_CmmnStat,
(uint8 *)RaSW_h_CmmnStat, SWID_NUM * sizeof(TeSW_CmmnStat));
}
for(i=0;i<SWID_NUM;i++)
{
/*when KAM reset, or switch is not KAM Enable, init switch with default value*/
if((FALSE == SWCFG_KAM_ENABLE(i)) ||
(TRUE == GetKAM_b_RunKamRstFlg()))
{
bTemp = SWCFG_DEFAULT_VAL(i);
SW_STATUS(i) = 0x0000;
SW_FLT(i) = bTemp;
SW_FLT_LAST(i) = bTemp;
}
}
}
/****************************************************************************************
| NAME: SavSW_PreSysSleep
| CALLED BY: Before enter sleep.
| PRECONDITIONS:
| INPUT PARAMETERS:
| RETURN VALUE:
| DESCRIPTION:
****************************************************************************************/
void SavSW_PreSysSleep(void)
{
PutKAM_ArrayData((uint8 *)RaSW_h_CmmnStat,
(uint8 *)VaSW_h_CmmnStat, SWID_NUM * sizeof(TeSW_CmmnStat));
}
/****************************************************************************************
| NAME: ProcSW_PreSleep
| CALLED BY:
| PRECONDITIONS:
| INPUT PARAMETERS:
| RETURN VALUE: NA
| DESCRIPTION: process switch before goto sleep.
****************************************************************************************/
void ProcSW_PreSleep(void)
{
/*add KAM variables*/
}
/****************************************************************************************
| NAME: UpdtSW_OBDIStatus
| CALLED BY: SwtAb_Handler (10ms)
| PRECONDITIONS:
| INPUT PARAMETERS:
| RETURN VALUE: NA
| DESCRIPTION: on board digital input switch status
****************************************************************************************/
static void UpdtSW_OBDIStatus(void)
{
uint8 uOBDIid;
uint8 uDinReg;
uint8 uOffset;
TeSW_h_OBDIInfo *LpSW_h_OBDIInfo;
LpSW_h_OBDIInfo = KaSW_h_OBDIInfo;
for(uOBDIid=0;uOBDIid<OBDI_Num;uOBDIid++)
{
if(LpSW_h_OBDIInfo->e_b_Enable)
{
uDinReg = *(LpSW_h_OBDIInfo->e_p_Port);
uOffset = LpSW_h_OBDIInfo->e_u_Offset;
if((uDinReg & (1<< uOffset)) > 0)
{
SetOBDI_Stat(uOBDIid, TRUE);
}
else
{
SetOBDI_Stat(uOBDIid, FALSE);
}
}
LpSW_h_OBDIInfo++;
}
}
/****************************************************************************************
| NAME: ScanSW_WkupPort
| CALLED BY: ProcPWR_SleepWake() : API wakeup or EPM sleep-awake task
| PRECONDITIONS:
| INPUT PARAMETERS:
| RETURN VALUE: Switch ID whick wake up system
| 255 - no wakeup port active
| DESCRIPTION:
****************************************************************************************/
uint8 ScanSW_WkupPort(void)
{
uint8 uSwId;
uint8 uDgtlSwId;
uint8 uWkupTyp;
TeSW_CmmnSwInfo * Lp_h_CmmSwInfo; /*near pointer*/
uint8 Le_u_BatVolt;
boolean bLastSwRawStat;
boolean bCurSwRawStat;
boolean bWkupActive=FALSE;
uint8 Ret;
Le_u_BatVolt = VePWR_h_BatVolt.e_w_ScaledBatVolt /10;
for(uSwId=0;uSwId<SWID_NUM;uSwId++)
{
Lp_h_CmmSwInfo = &KaSW_h_CmmnSwInfo[uSwId];
uWkupTyp = Lp_h_CmmSwInfo->e_h_CmmnMisc.Bits.e_u2_WkupTyp;
/*Get switch handle id from list, only digital wake up port are supported*/
if((CeSW_u_WkupTypNoWkup != uWkupTyp) &&
(uSwId <= SWID_DIGITAL_LAST))
{
uDgtlSwId = uSwId;
/*determine switch raw input by powermode*/
if((TRUE == SWCFG_ENABLED(uDgtlSwId)) &&
(Le_u_BatVolt >= KaSW_h_DgtlSwInfo[uDgtlSwId].e_u_BatVoltLo) &&
(Le_u_BatVolt <= KaSW_h_DgtlSwInfo[uDgtlSwId].e_u_BatVoltHi))
{
/*check if switch is pressed this time (not consider debouce here)*/
if((SWCFG_PRS_IS_HIGH(uDgtlSwId) &&
Read_Buf_Bit(DGTLSW_DATASRC(uDgtlSwId), DGTLSW_BITIDX(uDgtlSwId)) )||
((FALSE == SWCFG_PRS_IS_HIGH(uDgtlSwId)) &&
(FALSE == Read_Buf_Bit(DGTLSW_DATASRC(uDgtlSwId), DGTLSW_BITIDX(uDgtlSwId)))) )
{
bCurSwRawStat = TRUE;
}
else
{
bCurSwRawStat = FALSE;
}
/*Compare Raw State and determine if wakeup*/
bLastSwRawStat = SW_RAW(uSwId);
SW_RAW(uSwId) = bCurSwRawStat;
if((bLastSwRawStat != bCurSwRawStat) &&
(((CeSW_u_WkupTypPosEdge == uWkupTyp) && (TRUE==bCurSwRawStat)) ||
((CeSW_u_WkupTypNegEdge == uWkupTyp) && (FALSE==bCurSwRawStat)) ||
(CeSW_u_WkupTypBiEdge == uWkupTyp)) )
{
bWkupActive = TRUE;
break; /*exit for*/
}
}
}
}
if(bWkupActive)
{
Ret = uSwId;
}
else
{
Ret = 255;
}
return Ret;
}
#endif
<file_sep>/BSP/Include/SchM_ComM.h
#ifndef SCHM_COMM_H
#define SCHM_COMM_H
#include "SchM.h"
#include "SchM_Types.h"
#include "SchM_Cfg.h"
#define COMM_EXCLUSIVE_AREA_0 SCHM_EA_SUSPENDALLINTERRUPTS
#define COMM_EXCLUSIVE_AREA_1 SCHM_EA_SUSPENDALLINTERRUPTS
# define SchM_Enter_ComM(ExclusiveArea) \
SCHM_ENTER_EXCLUSIVE(ExclusiveArea)
# define SchM_Exit_ComM(ExclusiveArea) \
SCHM_EXIT_EXCLUSIVE(ExclusiveArea)
#endif /* SCHM_COMM_H */
<file_sep>/BSP/MCAL/Gpt.dp/Gpt.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Gpt.h */
/* Version = 3.1.3 */
/* Date = 06-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains macros, GPT type definitions, structure data types and */
/* API function prototypes of GPT Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/******************************************************************************
** Revision Control History **
******************************************************************************/
/*
* V3.0.0: 23-Oct-2009 : Initial Version
* V3.0.1: 09-Nov-2009 : Std_Types.h is included.
* V3.0.2: 25-Feb-2010 : As per SCR 194, precompile option for TAU is added
* in the structure "Gpt_ConfigType" for the member
* "pTAUUnitConfig".
* V3.0.3: 23-Jun-2010 : As per SCR 281, structure "Gpt_ConfigType" is
* updated to support TAUB and TAUC timer units.
* V3.0.4: 28-Jul-2010 : As per SCR 317, Std_Types.h is removed.
* V3.0.5: 13-Sep-2010 : As per SCR 353, Std_Types.h is included.
* V3.1.0: 27-July-2011 : Modified software version to 3.1.0
* V3.1.2: 16-Feb-2012 : Merged the fixes done for Fx4L Gpt driver
* V3.1.3: 06-Jun-2012 : As per SCR 029, following changes are made:
* 1. Gpt software patch version is updated.
* 2. API Gpt_GetVersionInfo is implemented as macro.
* 3. Environment section is updated to remove
* compiler version.
*/
/*****************************************************************************/
#ifndef GPT_H
#define GPT_H
/******************************************************************************
** Include Section **
******************************************************************************/
#include "Std_Types.h"
#include "Gpt_Cfg.h"
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
#include "EcuM_Cbk.h"
#endif
/******************************************************************************
** Version Information **
******************************************************************************/
/* Version identification */
#define GPT_VENDOR_ID GPT_VENDOR_ID_VALUE
#define GPT_MODULE_ID GPT_MODULE_ID_VALUE
#define GPT_INSTANCE_ID GPT_INSTANCE_ID_VALUE
/* AUTOSAR specification version information */
#define GPT_AR_MAJOR_VERSION GPT_AR_MAJOR_VERSION_VALUE
#define GPT_AR_MINOR_VERSION GPT_AR_MINOR_VERSION_VALUE
#define GPT_AR_PATCH_VERSION GPT_AR_PATCH_VERSION_VALUE
/* File version information */
#define GPT_SW_MAJOR_VERSION 3
#define GPT_SW_MINOR_VERSION 1
#define GPT_SW_PATCH_VERSION 2
#if (GPT_CFG_SW_MAJOR_VERSION != GPT_SW_MAJOR_VERSION)
#error "Software major version of Gpt.h and Gpt_Cfg.h did not match!"
#endif
#if (GPT_CFG_SW_MINOR_VERSION!= GPT_SW_MINOR_VERSION )
#error "Software minor version of Gpt.h and Gpt_Cfg.h did not match!"
#endif
/******************************************************************************
** Global Symbols **
******************************************************************************/
/******************************************************************************
** Service IDs **
******************************************************************************/
/* Service Id of Gpt_GetVersionInfo */
#define GPT_GET_VERSION_INFO_SID (uint8)0x00
/* Service Id of Gpt_Init */
#define GPT_INIT_SID (uint8)0x01
/* Service Id of Gpt_DeInit */
#define GPT_DEINIT_SID (uint8)0x02
/* Service Id of Gpt_GetTimeElapsed */
#define GPT_GET_TIME_ELAPSED_SID (uint8)0x03
/* Service Id of Gpt_GetTimeRemaining */
#define GPT_GET_TIME_REMAINING_SID (uint8)0x04
/* Service Id of Gpt_StartTimer */
#define GPT_START_TIMER_SID (uint8)0x05
/* Service Id of Gpt_StopTimer */
#define GPT_STOP_TIMER_SID (uint8)0x06
/* Service Id of Gpt_EnableNotification */
#define GPT_ENABLE_NOTIFY_SID (uint8)0x07
/* Service Id of Gpt_DisableNotification */
#define GPT_DISABLE_NOTIFY_SID (uint8)0x08
/* Service Id of Gpt_SetMode */
#define GPT_SET_MODE_SID (uint8)0x09
/* Service Id of Gpt_DisableWakeup */
#define GPT_DISABLE_WAKEUP_SID (uint8)0x0A
/* Service Id of Gpt_EnableWakeup */
#define GPT_ENABLE_WAKEUP_SID (uint8)0x0B
/* Service Id of Gpt_Cbk_CheckWakeup */
#define GPT_CBK_CHECK_WAKEUP_SID (uint8)0x0C
/******************************************************************************
** DET Error Codes **
******************************************************************************/
/* DET code to report uninitialized state */
#define GPT_E_UNINIT (uint8)0x0A
/* DET code to report Timer is already running */
#define GPT_E_BUSY (uint8)0x0B
/* DET code to report Timer has not been started yet */
#define GPT_E_NOT_STARTED (uint8)0x0C
/* DET code to report Timer already Initialized */
#define GPT_E_ALREADY_INITIALIZED (uint8)0x0D
/* DET code to report invalid Channel Identifier */
#define GPT_E_PARAM_CHANNEL (uint8)0x14
/* DET code to report invalid timer value */
#define GPT_E_PARAM_VALUE (uint8)0x15
/* DET code to report Gpt_Init called with NULL as parameter */
#define GPT_E_PARAM_CONFIG (uint8)0x1E
/* DET code to report invalid mode parameter */
#define GPT_E_PARAM_MODE (uint8)0x1F
/* DET code to report invalid database */
#define GPT_E_INVALID_DATABASE (uint8)0xEF
/* DET code to report Gpt_GetVersionInfo called with NULL as parameter */
#define GPT_E_PARAM_POINTER (uint8)0xF0
/* DET code to report that Gpt API service Gpt_DisableNotification
* is invoked for the channel for which the notification is already disabled
*/
#define GPT_E_ALREADY_DISABLED (uint8)0xF1
/* DET code to report that Gpt API service Gpt_EnableNotification
* is invoked for the channelfor which the notification is already enabled
*/
#define GPT_E_ALREADY_ENABLED (uint8)0xF2
/******************************************************************************
** Global Data Types **
******************************************************************************/
/* Type describing the timeout value */
typedef uint32 Gpt_ValueType;
/* Type describing the channel ID */
typedef uint8 Gpt_ChannelType;
/* Type describing the GPT modes */
typedef enum GptModeType
{
GPT_MODE_NORMAL = 0,
GPT_MODE_SLEEP
} Gpt_ModeType;
/* Data Structure for GPT required for Initializing the GPT timer unit */
typedef struct STagGpt_ConfigType
{
/* Database start value */
uint32 ulStartOfDbToc;
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON) \
|| (GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON))
/* Pointer to GPT driver channel configuration */
P2CONST(void, AUTOMATIC, GPT_CONFIG_CONST) pTAUUnitConfig;
#endif
/* Pointer to GPT driver channel configuration */
P2CONST(void, AUTOMATIC, GPT_CONFIG_CONST) pChannelConfig;
/* Pointer to address of Timer to channel index array */
P2CONST(uint8, AUTOMATIC, GPT_CONFIG_CONST)pChannelTimerMap;
/* Pointer to address of internal RAM data */
P2VAR(void, AUTOMATIC, GPT_CONFIG_DATA) pChannelRamAddress;
} Gpt_ConfigType;
/******************************************************************************
** Function Prototypes **
******************************************************************************/
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
#if (GPT_VERSION_INFO_API == STD_ON)
#define Gpt_GetVersionInfo(versioninfo)\
{\
(versioninfo)->vendorID = (uint16)GPT_VENDOR_ID; \
(versioninfo)->moduleID = (uint16)GPT_MODULE_ID; \
(versioninfo)->instanceID = (uint8)GPT_INSTANCE_ID; \
(versioninfo)->sw_major_version = GPT_SW_MAJOR_VERSION; \
(versioninfo)->sw_minor_version = GPT_SW_MINOR_VERSION; \
(versioninfo)->sw_patch_version = GPT_SW_PATCH_VERSION; \
}
#endif
extern FUNC(void, GPT_PUBLIC_CODE) Gpt_Init
(P2CONST(Gpt_ConfigType, AUTOMATIC, GPT_APPL_CONST) configPtr);
#if (GPT_DE_INIT_API == STD_ON)
extern FUNC (void, GPT_PUBLIC_CODE) Gpt_DeInit (void);
#endif
#if (GPT_TIME_ELAPSED_API == STD_ON)
extern FUNC(Gpt_ValueType, GPT_PUBLIC_CODE) Gpt_GetTimeElapsed
(Gpt_ChannelType channel);
#endif
#if (GPT_TIME_REMAINING_API == STD_ON)
extern FUNC(Gpt_ValueType, GPT_PUBLIC_CODE) Gpt_GetTimeRemaining
(Gpt_ChannelType channel);
#endif
extern FUNC(void, GPT_PUBLIC_CODE) Gpt_StartTimer
(Gpt_ChannelType channel, Gpt_ValueType value);
extern FUNC(void, GPT_PUBLIC_CODE) Gpt_StopTimer
(Gpt_ChannelType channel);
#if (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON )
extern FUNC(void, GPT_PUBLIC_CODE) Gpt_EnableNotification
(Gpt_ChannelType channel);
#endif
#if (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
extern FUNC(void, GPT_PUBLIC_CODE) Gpt_DisableNotification
(Gpt_ChannelType channel);
#endif
#if ((GPT_REPORT_WAKEUP_SOURCE == STD_ON) \
&& (GPT_WAKEUP_FUNCTIONALITY_API == STD_ON))
extern FUNC(void, GPT_PUBLIC_CODE) Gpt_SetMode
(Gpt_ModeType mode);
#endif
#if ((GPT_REPORT_WAKEUP_SOURCE == STD_ON) \
&& (GPT_WAKEUP_FUNCTIONALITY_API == STD_ON))
extern FUNC(void, GPT_PUBLIC_CODE) Gpt_DisableWakeup
(Gpt_ChannelType channel);
#endif
#if ((GPT_REPORT_WAKEUP_SOURCE == STD_ON) \
&& (GPT_WAKEUP_FUNCTIONALITY_API == STD_ON))
extern FUNC(void, GPT_PUBLIC_CODE) Gpt_EnableWakeup
(Gpt_ChannelType channel);
#endif
#if ((GPT_REPORT_WAKEUP_SOURCE == STD_ON) \
&& (GPT_WAKEUP_FUNCTIONALITY_API == STD_ON))
extern FUNC(void, GPT_PUBLIC_CODE)Gpt_Cbk_CheckWakeup
(EcuM_WakeupSourceType wakeupSource);
#endif
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define GPT_START_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
extern CONST(Gpt_ConfigType, GPT_CONST) Gpt_GstConfiguration[];
#define GPT_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
#endif /* GPT_H */
/******************************************************************************
** End of File **
******************************************************************************/
<file_sep>/BSP/MCAL/Generic/Compiler/GHS/V516c/Compiler_Config/mak/ghs_necv850_rules.mak
#######################################################################
# REGISTRY
#
CC_FILES_TO_BUILD +=
MAKE_DEBUG_RULES += debug_ghs_makefile
#######################################################################
# Command to print debug information #
#######################################################################
debug_ghs_makefile:
@echo GHS_CORE_PATH = $(GHS_CORE_PATH)
@echo COMPILER_INSTALL_DIR = $(COMPILER_INSTALL_DIR)
@echo CC = $(CC)
@echo CFLAGS = $(CFLAGS)
@echo MAKELIB = $(MAKELIB)
#######################################################################
<file_sep>/BSP/MCAL/Adc/Adc_PBTypes.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Adc_PBTypes.h */
/* Version = 3.1.2 */
/* Date = 04-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains the type definitions of Post-build Time Parameters */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 10-Jul-2009 : Initial version
*
* V3.0.1: 12-Oct-2009 : As per SCR 052, the following changes are made
* 1. Unnecessary macros are removed and macros
* required are added.
* 2. IO structure required for PIC macro is added and
* Tdd_Adc_HWGroupTriggType is updated for PIC macro
* enhancement.
* 3. Tdd_Adc_HwUnitConfigType, Tdd_Adc_GroupConfigType,
* Tdd_Adc_HwUnitRamData are updated.
* 4. Size of the array in the extern of
* Adc_GstRunTimeData is updated.
*
* V3.0.2: 05-Nov-2009 : As per SCR 088, I/O structure is updated to have
* separate base address for USER and OS registers.
*
* V3.0.3: 02-Dec-2009 : As per SCR 157, the following changes are made
* 1. Structure Tdd_Adc_DmaUnitConfig is updated.
* 2. Adc_GpRunTimeData declaration is changed.
*
* V3.0.4: 05-Jan-2010 : As per SCR 179, Tdd_Adc_ChannelGroupRamData
* structure is updated.
*
* V3.0.5: 26-Feb-2010 : As per SCR 200, the following changes are made:
* 1. A macro ADC_CLEAR_CHANNEL_LIST is added.
* 2. Queue related RAM variables and parameters are
* optimized by adding pre-compile option.
*
* V3.0.6: 01-Jul-2010 : As per SCR 295, interrupt control register is
* replaced by IMR register.
*
* V3.0.7: 20-Jul-2010 : As per SCR 309, following changes are made:
* 1. In structure Tdd_Adc_GroupConfigType, new
* parameter ucDmaChannelIndex is added.
* 2. In structure Tdd_Adc_HwUnitConfigType, parameter
* pCGmDmaConfig is deleted.
*
* V3.0.8: 28-Jul-2010 : As per SCR 316, following changes are made:
* 1. pIntpAddress parameter is added to
* structure Tdd_Adc_HwUnitConfigType, which will be
* used to clear the pending interrupts.
* 2. Macro ADC_CLEAR_INT_REQUEST_FLAG is added.
*
* V3.1.0: 27-Jul-2011 : Modified for DK-4.
* V3.1.1: 14-Feb-2012 : Merged the fixes done for Fx4L Adc driver.
*
* V3.1.2: 04-Jun-2012 : As per SCR 019, following changes are made:
* 1. New macro ADC_NO_DMA_CHANNEL_INDEX is added.
* 2. Compiler version is removed from environment
* section.
* 3. File version is changed.
*/
/******************************************************************************/
#ifndef ADC_PBTYPES_H
#define ADC_PBTYPES_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Adc.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define ADC_PBTYPES_AR_MAJOR_VERSION ADC_AR_MAJOR_VERSION_VALUE
#define ADC_PBTYPES_AR_MINOR_VERSION ADC_AR_MINOR_VERSION_VALUE
#define ADC_PBTYPES_AR_PATCH_VERSION ADC_AR_PATCH_VERSION_VALUE
/* File version information */
#define ADC_PBTYPES_SW_MAJOR_VERSION 3
#define ADC_PBTYPES_SW_MINOR_VERSION 1
#define ADC_PBTYPES_SW_PATCH_VERSION 2
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (ADC_SW_MAJOR_VERSION != ADC_PBTYPES_SW_MAJOR_VERSION)
#error "Software major version of Adc_PBTypes.h and Adc.h did not match!"
#endif
#if (ADC_SW_MINOR_VERSION != ADC_PBTYPES_SW_MINOR_VERSION)
#error "Software minor version of Adc_PBTypes.h and Adc.h did not match!"
#endif
#define ADC_DBTOC_VALUE \
((ADC_VENDOR_ID_VALUE << 22) | \
(ADC_MODULE_ID_VALUE << 14) | \
(ADC_SW_MAJOR_VERSION_VALUE << 8) | \
(ADC_SW_MINOR_VERSION_VALUE << 3))
#define ADC_FALSE (uint8)0
#define ADC_TRUE (uint8)1
#define ADC_ZERO (uint8)0
#define ADC_ONE (uint8)1
#define ADC_TWO (uint8)2
#define ADC_THREE (uint8)3
#define ADC_FOUR (uint8)4
#define ADC_FIVE (uint8)5
#define ADC_ZERO_SHORT (uint16)0
#define ADC_ZERO_LONG (uint32)0
/* Adc Conversion operation */
#define ADC_CONTINUOUS (uint8)0
#define ADC_ONCE (uint8)1
/* Start/Stop ADC Conversion macros */
#define ADC_START_CONVERSION (uint8)0x01
#define ADC_STOP_CONVERSION (uint8)0x01
#define ADC_RESULT_FLAG_MASK (uint8)0x00
/* Complete channel list mask */
#define ADC_COMPLETE_CHANNEL_MASK (uint32)0xFFFFFFFFul
/* Clear channel list mask */
#define ADC_CLEAR_CHANNEL_LIST (uint32)0x00000000ul
/* Queue status macros */
#define ADC_QUEUE_EMPTY (uint8)0
#define ADC_QUEUE_FILLED (uint8)1
#define ADC_QUEUE_FULL (uint8)2
/* ADC enable */
#define ADC_ENABLE_BIT (uint16)0x0080
/* ADC disable */
#define ADC_DISABLE_BIT (uint16)0xFF7F
/* DMA disable */
#define ADC_DMA_DISABLE (uint8)0xFE
/* DMA enable */
#define ADC_DMA_ENABLE (uint8)0x01
/* DMA channel not configured */
#define ADC_NO_DMA_CHANNEL_INDEX (uint8)0xFF
/* DMA transfer request */
#define ADC_DMA_TRANSFER (uint16)0x0001
/* DMA source chip select */
#define ADC_DMA_SRC_SELECT (uint16)0x0002
/* DMA destination chip select */
#define ADC_DMA_DEST_SELECT (uint16)0x0002
/* DMA setting value */
#define ADC_DMA_SETTINGS (uint16)0x2081
/* DMA MLE bit set mask value */
#define ADC_DMA_CONTINUOUS (uint16)0x1000
/* DMA MLE bit set mask value */
#define ADC_DMA_ONCE (uint16)0xEFFF
/* DMA mask to avoid reading from next location */
#define ADC_DMA_CLEAR_NEXT (uint16)0x7FFF
/* DMA mask to read from next location */
#define ADC_DMA_SET_NEXT (uint16)0x8000
/* DMA mask to set the INF bit */
#define ADC_DMA_SET_INF (uint16)0x0800
/* DMA transfer completion status */
#define ADC_DMA_TRANSFER_COMPLETION (uint8)0x80
/* DMA transfer completion status clear */
#define ADC_DMA_TRANSFER_CLEAR (uint8)0x7F
/* Streaming number of samples mask */
#define ADC_DUMMY (uint16)0x0000
#define ADC_ONE_TIME_CONVERSION (uint16)0x0000
#define ADC_TWO_TIME_CONVERSION (uint16)0x0001
#define ADC_THREE_TIME_CONVERSION (uint16)0x0002
#define ADC_FOUR_TIME_CONVERSION (uint16)0x0003
/* Macro to clear the interrupt request flag EIRFn */
#define ADC_CLEAR_INT_REQUEST_FLAG (uint16)0xEFFF
/* Streaming clear mask */
#define ADC_CG0_STREAM_CLEAR_MASK (uint16)0xFFFC
#define ADC_CG1_STREAM_CLEAR_MASK (uint16)0xFFF3
#define ADC_CG2_STREAM_CLEAR_MASK (uint16)0xFFCF
/* Operation mode and Trans mode clear mask */
#define ADC_OPERATION_CLEAR_MASK (uint32)0xFFCFFFEFul
/* Operation mode enable mask */
#define ADC_CG0_CONV_ONCE (uint32)0x00200010ul
#define ADC_CG0_CONV_CONTINUOUS (uint32)0x00300010ul
/* External and Timer Trigger clear mask */
#define ADC_CG0_EXTTRIG_CLEAR_MASK (uint32)0xF3FFFFFFul
/* ADC CGm unit macros */
#define ADC_CG0 (uint8)0x00
#define ADC_CG1 (uint8)0x01
#define ADC_CG2 (uint8)0x02
/* ADC CGm unit conversion status macro */
#define ADC_CG0_CONV_STATUS_MASK (uint16)0x0001
#define ADC_CG1_CONV_STATUS_MASK (uint16)0x0002
#define ADC_CG2_CONV_STATUS_MASK (uint16)0x0004
#define ADC_HW_UNIT_STATUS (uint16)0x0007
/* ADC Result access */
#define ADC_DMA_ACCESS (uint8)0x00
#define ADC_ISR_ACCESS (uint8)0x01
/* CPU core of the device under test */
#define ADC_E2M 0
#define ADC_E2K 1
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Union for accessing the 16-bit converted digital values from 32-bit **
** register. This Union is also used for reading 32-bit address and writing **
** into two 16-bit registers in case of DMA. **
*******************************************************************************/
typedef union
{
uint32 Value;
struct
{
uint16 LoByte;
uint16 HiByte;
}UChar;
}UInt;
/*******************************************************************************
** Structure for HW Unit Registers, which are used to read or write **
** the status or configured values for proper working of the ADC driver **
*******************************************************************************/
typedef struct STagTdd_AdcConfigUserRegisters
{
uint32 volatile ulADCAnCGm[3];
uint32 volatile ulADCAnIOCm[3];
uint32 aaReserved1[5];
uint16 volatile ulADCAnSTR2;
uint16 aaReserved2[55];
uint16 volatile usADCAnDGCR;
uint16 aaReserved3[3];
uint8 volatile ucADCAnTRG0[1];
uint8 aaReserved4[15];
uint8 volatile ucADCAnTRG4[1];
uint8 aaReserved5[39];
uint16 volatile usADCAnDGCTL0;
} Tdd_AdcConfigUserRegisters;
typedef struct STagTdd_AdcConfigOsRegisters
{
uint16 volatile usADCAnCTL0;
uint16 aaReserved7;
uint32 volatile ulADCAnCTL1;
uint16 volatile usADCAnTSELm[3];
uint16 aaReserved8[3];
uint8 volatile ucADCAnCNT;
} Tdd_AdcConfigOsRegisters;
/*******************************************************************************
** Structure for PIC macro registers setting the TAUA0 and TAUA1 timer **
** interrupts **
*******************************************************************************/
typedef struct STagTdd_AdcPicRegisters
{
uint16 volatile usPIC0ADTEN40n[1];
uint16 aaReserved1[5];
uint16 volatile usPIC0ADTEN41n[1];
} Tdd_AdcPicRegisters;
/*******************************************************************************
** Structure for DMAC Registers, which are used to read or write **
** the status or configured values for proper working of the DMAC **
*******************************************************************************/
typedef struct STagAdc_DmaRegs
{
#if(ADC_CPU_CORE == ADC_E2M)
/* Transfer request select register */
uint16 volatile usDTRSn;
uint16 aaReserved1;
#endif
/* Address for source address register */
uint32 volatile ulDSAn;
/* Source chip select register */
uint16 volatile usDSCn;
uint16 aaReserved2;
/* Address for next lower source address register */
uint16 volatile usDNSAnL;
/* Address for next higher source address register */
uint16 volatile usDNSAnH;
uint16 aaReserved3[2];
/* Address for lower destination address register */
uint32 volatile ulDDAn;
/* Destination chip select register */
uint16 volatile usDDCn;
uint16 aaReserved4;
/* Address for next lower destination address register */
uint16 volatile usDNDAnL;
/* Address for next higher destination address register */
uint16 volatile usDNDAnH;
uint16 aaReserved5;
/* Transfer count register */
uint16 volatile usDTCn;
/* Transfer next count register */
uint16 volatile usDNTCn;
uint16 volatile usDTCCn;
/* Transfer control register */
uint16 volatile usDTCTn;
/* Transfer status register */
uint8 volatile ucDTSn;
} Tdd_Adc_DmaAddrRegs;
/*******************************************************************************
** Structure for DMA channel configuration for CGm unit **
*******************************************************************************/
#if (ADC_DMA_MODE_ENABLE == STD_ON)
typedef struct STagTdd_Adc_DmaUnitConfig
{
/* Address for DMA control registers */
P2VAR(Tdd_Adc_DmaAddrRegs, AUTOMATIC, ADC_CONFIG_DATA)pDmaCntlRegBase;
/* Address for DMA IMR control registers */
P2VAR(void, AUTOMATIC, ADC_CONFIG_DATA)pDmaImrIntCntlReg;
/* Address for DTFR control registers */
P2VAR(void,AUTOMATIC,ADC_CONFIG_DATA)pDmaDTFRRegAddr;
/* DMA channel Id mask */
uint16 usDmaChannelMask;
/* DMA Buffer register of CGm */
uint32 ulDmaBuffRegCGm;
/* DTFR register value */
uint16 usDmaDtfrRegValue;
/* Imr register mask value for the DMA channel */
uint8 ucDmaImrMask;
} Tdd_Adc_DmaUnitConfig;
#endif
/*******************************************************************************
** Structure for IMR register address and corresponding mask generation. **
*******************************************************************************/
typedef struct STagTdd_AdcImrAddMaskConfigType
{
P2VAR(uint8, AUTOMATIC, ADC_CONFIG_DATA) pImrIntpAddress;
uint8 ucImrMask;
}Tdd_AdcImrAddMaskConfigType;
/*******************************************************************************
** Structure for HW Unit configuration **
*******************************************************************************/
typedef struct STagTdd_Adc_HwUnitConfigType
{
/* Pointer to user base address of ADC Control registers */
P2VAR(Tdd_AdcConfigUserRegisters, AUTOMATIC, ADC_CONFIG_DATA)
pUserBaseAddress;
/* Pointer to os base address of ADC Control registers */
P2VAR(Tdd_AdcConfigOsRegisters, AUTOMATIC, ADC_CONFIG_DATA) pOsBaseAddress;
#if (ADC_TO_TIMER_CONNECT_SUPPORT == STD_ON)
/* Pointer to base address of PIC Control registers */
P2VAR(Tdd_AdcPicRegisters, AUTOMATIC, ADC_CONFIG_DATA) pPicBaseAddress;
#endif
/* Pointer to base address of ADC Result Register */
P2VAR(uint32, AUTOMATIC, ADC_CONFIG_DATA) pAdcResult;
/* Pointer to ADC HW unit CG0 interrupt control register */
P2VAR(uint16, AUTOMATIC, ADC_CONFIG_DATA) pIntpAddress;
/* Pointer to CG0 ADC IMR register and Mask value */
P2CONST(Tdd_AdcImrAddMaskConfigType, AUTOMATIC, ADC_CONFIG_DATA) pImrAddMask;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
/* Pointer to the Priority Queue */
P2VAR(Adc_GroupType, AUTOMATIC, ADC_CONFIG_DATA) pQueue;
#endif
/*
* Bit 24 = 0/1 indicates right/left alignment of conversion result
* Bit 17 = 0/1 indicates off/on discharge control
* Bit 16 = 0 indicates do not clear conversion result after read-out
* Bit 15 = 0/1 indicates 12/10 bit resolution mode
* Bit 11, 10,9,8 = A/D frequency configuration
* Bit 3 = 0/1 indicates OFF/ON ADC buffer amplifier
* Bit 0 = 1 indicating ADC Power ON
*/
/* The following values should be generated only if priority configured
* is ADC_PRIORITY_HW or ADC_PRIORITY_HW_SW other wise the value should be
* generated as zero */
/*
* Group mapped to CG2 unit
* Bit 31,30 = 00 if the group(s) mapped is SW triggered
* = 01 if the group mapped is HW triggered and rising edge
* = 10 if the group mapped is HW triggered and falling edge
* = 11 if the group mapped is HW triggered and both edge
* Group mapped to CG1 unit
* Bit 29,28 = 00 if the group(s) mapped is SW triggered
* = 01 if the group mapped is HW triggered and rising edge
* = 10 if the group mapped is HW triggered and falling edge
* = 11 if the group mapped is HW triggered and both edge
* Group mapped to CG0 unit
* Bit 27,26 = 00 if the group(s) mapped is SW triggered
* = 01 if the group mapped is HW triggered and rising edge
* = 10 if the group mapped is HW triggered and falling edge
* = 11 if the group mapped is HW triggered and both edge
* Bit 21,20 = 10 if all the group(s) mapped to CG0 unit are one-shot
* = 11 if all the group(s) mapped to CG0 unit are continuous
* Bit 6 = 0/1 indicates immediately/finished transition of CG2 unit to halt
* Bit 5 = 0/1 indicates immediately/finished transition of CG1 unit to
* CG2/halt
* Bit 4 = 0/1 indicates immediately/finished transition of CG0 unit to
* CG1/CG2/halt
*/
uint32 ulHwUnitSettings;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* Enable mask for configuration no of samples */
uint16 usStreamEnableMask;
#endif
#if(ADC_DIAG_CHANNEL_SUPPORTED == STD_ON)
/* Self-Diagnostic reference voltage setting */
uint16 usDiagnosticValue;
#endif
/* Stabilization counter value */
uint8 ucStabilzationCount;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_ENABLE_QUEUING == STD_ON))
/* Maximum Queue Size when software priority or
first come first serve mechanism is enabled */
uint8 ucAdcQueueSize;
#endif
} Tdd_Adc_HwUnitConfigType;
/*******************************************************************************
** Structure for Group configuration **
*******************************************************************************/
typedef struct STagTdd_Adc_GroupConfigType
{
/* Pointer to the first channel of the group */
P2CONST(uint8, AUTOMATIC, ADC_CONFIG_DATA) pChannelToGroup;
/* Channel list */
uint32 ulChannelList;
/* Result access mode configuration - Single or Streaming Buffer */
Adc_GroupAccessModeType ddGroupAccessMode;
/* Number of Samples in Streaming Access Mode */
Adc_StreamNumSampleType ddNumberofSamples;
#if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW)
/* Replacement mechanism, which is used on ADC group level */
Adc_GroupReplacementType ddGroupReplacement;
#endif
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* Software Priority configured for the group */
Adc_GroupPriorityType ddGroupPriority;
#endif
/* Index of the hardware unit to which the group belongs */
uint8 ucHwUnit;
/* CGm unit to which group is configured */
uint8 ucHwCGUnit;
#if (ADC_DMA_MODE_ENABLE == STD_ON)
/* Index of the DMA channel Id configured for this group in the array
Adc_GstDmaUnitConfig[] */
uint8 ucDmaChannelIndex;
#endif
/* Result access by DMA or ISR */
uint8 ucResultAccessMode;
/* Conversion is continuous or only once */
uint8 ucConversionMode;
/* Number of channels configured in the group */
uint8 ucChannelCount;
} Tdd_Adc_GroupConfigType;
/*******************************************************************************
** Structure for HW trigger group configuration **
*******************************************************************************/
#if (ADC_HW_TRIGGER_API == STD_ON)
typedef struct STagTdd_Adc_HWGroupTriggType
{
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))
/* CGm unit external trigger enable value */
uint32 ulExtTrigEnableMask;
#endif
/* ADC Unit HW Trigger Mask value */
uint16 usHWTriggerMask;
#if (ADC_TO_TIMER_CONNECT_SUPPORT == STD_ON)
/* TAUA0 interrupts configured mask value */
uint16 usTAUA0TriggerMask;
/* TAUA1 interrupts configured mask value */
uint16 usTAUA1TriggerMask;
#endif
} Tdd_Adc_HWGroupTriggType;
#endif
/*******************************************************************************
** Structure for channel group RAM data **
*******************************************************************************/
typedef struct STagTdd_Adc_ChannelGroupRamData
{
/* ADC Group's Buffer Pointer */
P2VAR(Adc_ValueGroupType, AUTOMATIC, ADC_PUBLIC_CODE) pChannelBuffer;
/* Stores the conversion status of the requested group */
Adc_StatusType ddGroupStatus;
#if (ADC_GRP_NOTIF_CAPABILITY == STD_ON)
/* Stores the Group Notification Status */
uint8 ucNotifyStatus;
#endif
#if (ADC_DEV_ERROR_DETECT == STD_ON)
/* Stores the buffer pointer initialization Status */
uint8 ucBufferStatus;
#endif
#if (ADC_HW_TRIGGER_API == STD_ON)
/* Stores the enable hardware trigger status */
uint8 ucHwTriggStatus;
#endif
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* Stores the channel count converted before getting interrupted by
higher priority group */
uint8 ucReChannelsCompleted;
/* Stores the count of conversion rounds completed before
getting interrupted by higher priority group */
uint8 ucReSamplesCompleted;
#endif
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
/* Stored the status if the group is present in queue */
uint8 ucGrpPresent;
#endif
/* Indicates if the conversion of all the samples are completed */
boolean blSampleComp;
/* Indicates if the ADC_COMPLETED status has to be prevented once the
Group reaches the status of ADC_STREAM_COMPLETED */
boolean blResultRead;
} Tdd_Adc_ChannelGroupRamData;
/*******************************************************************************
** Structure for HW unit RAM data **
*******************************************************************************/
typedef struct STagTdd_Adc_HwUnitRamData
{
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))
/* Stores the current conversion group */
Adc_GroupType ddCurrentConvGroup[1];
#else
/* Stores the current conversion group */
Adc_GroupType ddCurrentConvGroup[3];
#endif
#if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW)
/* Stores the current conversion group priority */
Adc_GroupPriorityType ddCurrentPriority[1];
#elif (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)
/* Stores the current conversion group priority */
Adc_GroupPriorityType ddCurrentPriority[3];
#endif
#if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW)
/* Stores Trigger source type of the current conversion group SW/HW */
Adc_TriggerSourceType ddTrigSource;
#endif
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
/* Stores the queue status */
uint8 ucQueueStatus;
/* Stores the queue counter */
uint8 ucQueueCounter;
#endif
} Tdd_Adc_HwUnitRamData;
/*******************************************************************************
** Structure for run time data **
*******************************************************************************/
typedef struct STagTdd_Adc_RunTimeData
{
/* ADC Group's Buffer Pointer */
P2VAR(uint16, AUTOMATIC, ADC_CONFIG_DATA) pBuffer;
/* ADC Group's channel Pointer */
P2CONST(uint8, AUTOMATIC, ADC_CONFIG_DATA) pChannel;
/* Stores the count of number of channels in the group */
uint8 ucChannelCount;
/* Stores the count of conversion completed channels */
uint8 ucChannelsCompleted;
/* Stores the count of streaming samples */
uint8 ucStreamingSamples;
/* Stores the count of conversion completed samples */
uint8 ucSamplesCompleted;
} Tdd_Adc_RunTimeData;
/*******************************************************************************
** Extern declarations for Global Data **
*******************************************************************************/
#define ADC_START_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
/* Declaration for Hardware Unit Configuration */
extern CONST(Tdd_Adc_HwUnitConfigType, ADC_CONST) Adc_GstHWUnitConfig[];
/* Declaration for Group Configuration */
extern CONST(Tdd_Adc_GroupConfigType, ADC_CONST) Adc_GstGroupConfig[];
#if (ADC_HW_TRIGGER_API == STD_ON)
/* Declaration for HW Group Configuration */
extern CONST(Tdd_Adc_HWGroupTriggType, ADC_CONST) Adc_GstHWGroupTrigg[];
#endif
#if (ADC_DMA_MODE_ENABLE == STD_ON)
/* Declaration for DMA Channel Configuration */
extern CONST(Tdd_Adc_DmaUnitConfig, ADC_CONST) Adc_GstDmaUnitConfig[];
/* Declaration for DMA Channel to HW unit mapping Configuration */
extern CONST(Adc_HwUnitType, ADC_CONFIG_CONST) Adc_GaaHwUnit[];
/* Declaration for DMA Channel to CGm unit mapping Configuration */
extern CONST(uint8, ADC_CONFIG_CONST) Adc_GaaCGUnit[];
#endif
/* Declaration for Channel to Group Configuration */
extern CONST(Adc_ChannelType, ADC_CONFIG_CONST) Adc_GaaChannelToGroup[];
/* Structure IMR Register address and mask value */
extern CONST(Tdd_AdcImrAddMaskConfigType, ADC_CONFIG_CONST) Adc_GstImrAddMask[];
#define ADC_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
#define ADC_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* RAM Allocation of Group data */
extern VAR(Tdd_Adc_ChannelGroupRamData, ADC_NOINIT_DATA) Adc_GstGroupRamData[];
/* RAM Allocation of hardware unit data */
extern VAR(Tdd_Adc_HwUnitRamData, ADC_NOINIT_DATA) Adc_GstHwUnitRamData[];
/* RAM Allocation of Group Runtime data */
extern VAR(Tdd_Adc_RunTimeData, ADC_NOINIT_DATA) Adc_GstRunTimeData[];
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
/* Hardware Unit Queue Size */
extern VAR(Adc_GroupType, ADC_NOINIT_DATA) Adc_HwUnitPriorityQueue[];
#endif
#define ADC_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* ADC_PBTYPES_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Adc/Adc_Version.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Adc_Version.h */
/* Version = 3.1.2 */
/* Date = 04-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains macros required for checking versions of modules */
/* included by ADC Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 10-Jul-2009 : Initial version
*
* V3.0.1: 12-Oct-2009 : As per SCR 052, the following changes are made
* 1. Template changes are made.
*
* V3.1.0: 27-July-2011 : Modified for DK-4
* V3.1.1: 14-Feb-2012 : Merged the fixes done for Fx4L Adc driver
*
* V3.1.2: 04-Jun-2012 : As per SCR 019, the following changes are made
* 1. Compiler version is removed from environment
* section.
* 2. File version is changed.
*/
/******************************************************************************/
#ifndef ADC_VERSION_H
#define ADC_VERSION_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define ADC_VERSION_AR_MAJOR_VERSION ADC_AR_MAJOR_VERSION_VALUE
#define ADC_VERSION_AR_MINOR_VERSION ADC_AR_MINOR_VERSION_VALUE
#define ADC_VERSION_AR_PATCH_VERSION ADC_AR_PATCH_VERSION_VALUE
/*
* File version information
*/
#define ADC_VERSION_SW_MAJOR_VERSION 3
#define ADC_VERSION_SW_MINOR_VERSION 1
#define ADC_VERSION_SW_PATCH_VERSION 2
/* Included Files AUTOSAR Specification Version */
#if(ADC_DEV_ERROR_DETECT == STD_ON)
#define ADC_DET_AR_MAJOR_VERSION 2
#define ADC_DET_AR_MINOR_VERSION 2
#endif
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
#define ADC_SCHM_AR_MAJOR_VERSION 1
#define ADC_SCHM_AR_MINOR_VERSION 1
#endif
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (ADC_SW_MAJOR_VERSION != ADC_VERSION_SW_MAJOR_VERSION)
#error "Software major version of Adc_Version.h and Adc.h did not match!"
#endif
#if (ADC_SW_MINOR_VERSION!= ADC_VERSION_SW_MINOR_VERSION)
#error "Software minor version of Adc_Version.h and Adc.h did not match!"
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
#endif /* ADC_VERSION_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Mcu.dp/Mcu_PBTypes.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Mcu_PBTypes.h */
/* Version = 3.0.9 */
/* Date = 18-Jul-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2010-2013 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains the type definitions of Post-build Time Parameters */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Fx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 02-Jul-2010 : Initial Version
*
* V3.0.1: 28-Jul-2010 : As per SCR 320 following changes are made,
* 1 ucFoutDivReg element added in Tdd_Mcu_ClockSetting
* 2 MCU_ISO1_DEEPSTOP_MODE_REGSTP and
* MCU_ISO0_DEEPSTOP_MODE_REGSTP macros added with
* precompile option of MCU_DEEPSTOP_WAKE_PIN.
* 3 MCU_FOUT_DISABLE_MASK and MCU_VCPC_ENABLE_VALUE
* macros are added.
*
* V3.0.2: 06-Jan-2011 : As per SCR 392 following macros are added,
* MCU_CKSC_AW06_ADDRESS,
* and MCU_CKSC_8MHZ_INITIAL_VAL.
*
* V3.0.3: 25-Feb-2011 : As per SCR 420 MCU_WRITE_DATA macro value modified.
*
* V3.0.4: 17-Jun-2011 : As per SCR 468 following changes are made
* 1 Data types corrected for elements in
* Tdd_Mcu_ClockSetting and Tdd_Mcu_ModeSetting
* data structures.
* 2 MCU_INVERTED_ZERO and MCU_VCPC_ENABLE_MASK macros are
* added.
* 3 Precompile option added for voltage comparator and IO
* Reset register related data elements and macros.
*
* V3.0.5: 29-Jun-2011 : As per SCR 481, MCU_INVERTED_ZERO macro is removed.
* V3.0.5a: 18-Oct-2011 : Copyright is updated.
*
* V3.0.6: 17-May-2012 : As per SCR 014, following changes are made:
* 1 Precompile options added for elements
* ulPLL2ControlValue, ulSubOscStabTime and
* ulPLL2StabTime in Tdd_Mcu_ClockSetting structure.
* 2 MCU_CKSC000_PLL_LOW_VAL, MCU_CKSC000_PLL_HIGH_VAL
* and MCU_PLL_DISABLE macros are removed and macro
* MCU_PWS_PSS_MSK is added.
*
* V3.0.7: 15-Mar-2013 : As per SCR 091, The following changes have been made,
* 1. Alignment is changed as per code guidelines.
* 2. As per OPCN requirement, Macro added for
* Mcu_ConfigureAWO7 API.
* 3. As mantis #5465, Macro "MCU_PSC1_ISOWU_MSK" is Added
* as part of Mcu_Iso1SoftWakeUp API.
* 4. "MCU_MAINOSC_STAB" Macro is added as part of
* Mcu_RestartClocks API.
* 5. "MCU_CKSC_STAB_COUNT" macro is added as part of the
* Mcu_RestartClocks API.
* 6. MCU_IOHOLD_MASK_CLEAR macro is added.
* V3.0.8: 12-Jul-2013 : As per mantis 11731 and SCR xxx, following changes
* are made:
* Macro "MCU_LONG_WORD_EIGHTEEN and
* MCU_LONG_WORD_SEVENTYFOUR" are added.
* V3.0.9: 18-Jul-2013 : As per Mantis 11731 and SCR xxx Mcaro
* "MCU_LONG_WORD_TEN and MCU_LONG_WORD_TWENTYTWO"
* are added.
*/
/******************************************************************************/
#ifndef MCU_PBTYPES_H
#define MCU_PBTYPES_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Mcu.h" /* To include the component file */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define MCU_PBTYPES_AR_MAJOR_VERSION MCU_AR_MAJOR_VERSION_VALUE
#define MCU_PBTYPES_AR_MINOR_VERSION MCU_AR_MINOR_VERSION_VALUE
#define MCU_PBTYPES_AR_PATCH_VERSION MCU_AR_PATCH_VERSION_VALUE
/* File version information */
#define MCU_PBTYPES_SW_MAJOR_VERSION 3
#define MCU_PBTYPES_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Macros to avoid Magic numbers */
#define MCU_DBTOC_VALUE \
((MCU_VENDOR_ID_VALUE << 22) | \
(MCU_MODULE_ID_VALUE << 14) | \
(MCU_SW_MAJOR_VERSION_VALUE << 8) | \
(MCU_SW_MINOR_VERSION_VALUE << 3))
#define MCU_CLMA2_CMPH (uint16)0x0272
#define MCU_CLMA2_CMPL (uint16)0x01C6
#define MCU_ZERO (uint8)0x00
#define MCU_LONG_WORD_ZERO (uint32)0x00000000ul
#define MCU_LONG_WORD_ONE (uint32)0x00000001ul
#define MCU_LONG_WORD_TWO (uint32)0x00000002ul
#define MCU_LONG_WORD_FOUR (uint32)0x00000004ul
#define MCU_LONG_WORD_FIVE (uint32)0x00000005ul
#define MCU_LONG_WORD_SEVEN (uint32)0x00000007ul
#define MCU_LONG_WORD_TEN (uint32)0x0000000Aul
#define MCU_LONG_WORD_TWENTYTWO (uint32)0x00000022ul
#define MCU_LONG_WORD_EIGHTEEN (uint32)0x00000018ul
#define MCU_LONG_WORD_SEVENTYFOUR (uint32)0x00000074ul
#define MCU_WAKEUP_FACTOR_CLR (uint32)0xFFFFFFFFul
#define MCU_IOHOLD_MASK (uint32)0x00000002ul
#define MCU_PSC1_ISOWU_MSK (uint32)0x00000004ul
#define MCU_PSS_ONE (uint32)0x00000080ul
#define MCU_PSS_ZERO (uint32)0x00000001ul
#define MCU_ONE (uint8)0x01
#define MCU_INVERTED_ONE (uint8)0xFE
#define MCU_FIVE (uint8)0x05
#define MCU_RESF_CLEAR (uint32)0x000001EFul
#define MCU_IOHOLD_MASK_CLEAR (uint32)0x00000020ul
#define MCU_INITIALIZED (uint8)0x01
#define MCU_UNINITIALIZED (uint8)0x00
#define MCU_TRUE (uint8)0x01
#define MCU_FALSE (uint8)0x00
/* Value for selection of clock source as MainOSC */
#define MCU_MAIN_OSC_SELECTED (uint8)0x01
/* Value for selection of clock source as SubOSC */
#define MCU_SUB_OSC_SELECTED (uint8)0x02
/* Value for selection of clock source as 8 MHz */
#define MCU_8MHZ_OSC_SELECTED (uint8)0x04
/* Value for selection of clock source as PLL0 */
#define MCU_PLL0_CLOCK_SELECTED (uint8)0x08
/* Value for selection of clock source as PLL1 */
#define MCU_PLL1_CLOCK_SELECTED (uint8)0x10
/* Value for selection of clock source as PLL2 */
#define MCU_PLL2_CLOCK_SELECTED (uint8)0x20
/* Value for invalid setting*/
#define MCU_INVALID_SETTING (uint8)0xFF
/* Definition of uninitialized RESET value */
#define MCU_RESET_UNINIT (uint8)0xFF
/* Definition for Reset source check values */
#define MCU_POR (uint32)0x00000000ul
#define MCU_SWR (uint32)0x00000001ul
#define MCU_WDR0 (uint32)0x00000002ul
#define MCU_WDR1 (uint32)0x00000004ul
#define MCU_CLM0 (uint32)0x00000008ul
#define MCU_CLM2 (uint32)0x00000020ul
#define MCU_CLM3 (uint32)0x00000040ul
#define MCU_LVI (uint32)0x00000080ul
#define MCU_TER (uint32)0x00000100ul
#define MCU_DEBR (uint32)0x00000200ul
/* Data to be written to the protection command register to enable
* writing to the write protected register
*/
#define MCU_WRITE_DATA (uint8)0xA5
/* Definitions of values to be written to Software reset register
* to perform reset
*/
#define MCU_RES_CORRECT_VAL (uint32)0x00000001ul
#define MCU_RES_INVERTED_VAL (uint32)0xFFFFFFFEul
/* Maximum number of Clock setting */
#define MCU_MAX_CLK_SET (uint8)0x03
/* Maximum number of Mode setting */
#define MCU_MAX_MODE_SET (uint8)0x08
#define MCU_MAIN_OSC_MASKED (uint8)0x01
#define MCU_SUB_OSC_MASKED (uint8)0x02
#define MCU_RING_OSC_MASKED (uint8)0x04
#define MCU_PLL0_MASKED (uint8)0x08
#define MCU_PLL1_MASKED (uint8)0x10
#define MCU_PLL2_MASKED (uint8)0x20
#define MCU_MAIN_OSC_ON (uint32)0x00000002ul
#define MCU_SUB_OSC_ON (uint32)0x00000002ul
#define MCU_RING_OSC_ON (uint32)0x00000002ul
#define MCU_PLL0_ON (uint32)0x00000002ul
#define MCU_PLL1_ON (uint32)0x00000002ul
#define MCU_PLL2_ON (uint32)0x00000002ul
#define MCU_ISO1_STOP_MODE (uint32)0x00000001ul
#define MCU_ISO0_STOP_MODE (uint32)0x00000001ul
#define MCU_MAINOSC_STAB (uint32)0x0000000Ful
#define MCU_CKSC_STAB_COUNT (uint32)0x0000FFFFul
/* Defines for AWO7 clock modifications in STOP and DEEPSTOP mode */
#define MCU_CKSCAO7_REGISTER *((volatile uint32 *)0xFF422070ul)
#define MCU_CSCSTATAO7_REGISTER *((volatile uint32 *)0xFF422074ul)
#define MCU_CKSCAO7_MASK (uint32)0x0000000Eul
#define MCU_CKSCAO7_SLOW_VAL (uint32)0x0000000Aul
#define MCU_CKSCAO7_DEFAULT_VAL (uint32)0x00000006ul
#if (MCU_DEEPSTOP_WAKE_PIN == STD_ON)
#define MCU_ISO1_DEEPSTOP_MODE_REGSTP (uint32)0x00000013ul
#define MCU_ISO0_DEEPSTOP_MODE_REGSTP (uint32)0x00000013ul
#endif
#define MCU_ISO1_DEEPSTOP_MODE (uint32)0x00000003ul
#define MCU_ISO0_DEEPSTOP_MODE (uint32)0x00000003ul
#define MCU_IOHOLD_CLR (uint32)0x00000008ul
#define MCU_PSS_ZERO_ISO_ONE (uint32)0x00000001ul
#define MCU_POWER_ON_MASK (uint32)0x00000004ul
#define MCU_CLMA0_ENABLE (uint8)0x01
#define MCU_CLMA2_ENABLE (uint8)0x04
#define MCU_CLMA3_ENABLE (uint8)0x08
#define MCU_LONG_WORD_THREE (uint32)0x00000003ul
#define MCU_ISO0_RUN_MODE (uint32)0x00000001ul
#define MCU_ISO1_RUN_MODE (uint32)0x00000001ul
#define MCU_MODE_ISO1_STOP (uint32)0x00000081ul
#define MCU_MODE_ISO1_DEEPSTOP (uint32)0x00000082ul
#define MCU_PWS_REG_MASK (uint32)0x00000081ul
#define MCU_PWS_DEEPSTOP_STS (uint32)0x00000080ul
#define MCU_WUFH0_MASK (uint32)0x00007FFFul
#define MCU_PLL_CLKSTAB_MASK (uint32)0x00000001ul
#define MCU_BURWE_SET_VALUE (uint8)0x01
#define MCU_ROSCE_STPMK (uint32)0x00000004ul
#define MCU_LOOPCOUNT_MAX_VAL (uint32)0xFFFFFFFFul
#define MCU_MSB_MASK (uint32)0xFFFF0000ul
#define MCU_HIGH_RING_STAB_CNT (uint32)0x85099E00ul
#define MCU_MAIN_CLK_STAB_CNT (uint32)0xC78E6D00ul
#define MCU_PLL_CLK_STAB_CNT (uint32)0xFFFFFFFFul
#define MCU_CKSC_MASK_VALUE (uint32)0xFFFFFFFEul
#define MCU_PSC1_POF_MASK (uint32)0x00000002ul
#define MCU_FOUT_DISABLE_MASK (uint16)0x0000
#if ((MCU_VCPC0CTL0_ENABLE == STD_ON) || (MCU_VCPC0CTL1_ENABLE == STD_ON))
#define MCU_VCPC_ENABLE_VALUE (uint8)0x80
#define MCU_VCPC_ENABLE_MASK (uint8)0x7F
#endif
#define MCU_CKSC000_ADDRESS ((uint32)0xFF426000ul)
#define MCU_CKSC000_INITIAL_VAL (uint32)0x00000074ul
#define MCU_CKSC_AW06_ADDRESS ((uint32 *)0xFF422060ul)
#define MCU_CKSC_8MHZ_INITIAL_VAL (uint32)0x0000000Eul
#define MCU_PWS_PSS_MSK (uint32)0x00000080ul
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Port Control Registers Data Structure **
*******************************************************************************/
typedef struct STagMcuPortRegisters
{
uint32 ulPSRn;
} Tdd_Mcu_PortRegisters;
/*******************************************************************************
** Clock Setting Data Structure **
*******************************************************************************/
typedef struct STagMcuClockSetting
{
/* Details of PLL/SSCG for PLL0*/
uint32 ulPLL0ControlValue;
/* Details of PLL/SSCG for PLL1*/
uint32 ulPLL1ControlValue;
#if (MCU_PLL2_ENABLE == STD_ON)
/* Details of PLL/SSCG for PLL2*/
uint32 ulPLL2ControlValue;
#endif
#if (MCU_SUBOSC_ENABLE == STD_ON)
/* Sub Oscillator Stabilization Time */
uint32 ulSubOscStabTime;
#endif
/* PLL0 Oscillator Stabilization Time */
uint32 ulPLL0StabTime;
/* PLL1 Oscillator Stabilization Time */
uint32 ulPLL1StabTime;
#if (MCU_PLL2_ENABLE == STD_ON)
/* PLL2 Oscillator Stabilization Time */
uint32 ulPLL2StabTime;
#endif
/* Main Oscillator Stabilization Time */
uint32 ulMainOscStabTime;
/* FOUT Clock Divider register */
uint16 usFoutDivReg;
/* Details of selected clock sources */
uint8 ucSelectedSrcClock;
/* Value for MOSCC register */
uint8 ucMosccRegValue;
/* Selection of STPMK bit in all clock sources */
uint8 ucSelectedSTPMK;
/* Value of number of clock registers ISo0 selected */
uint8 ucNoOfIso0CkscReg;
/* Value of number of clock registers ISo1 selected */
uint8 ucNoOfIso1CkscReg;
/* Value of number of clock registers for AWO selected */
uint8 ucNoOfAwoCkscReg;
/* Value of number of PLL clock registers ISo0 selected */
uint8 ucNoOfPllIso0CkscReg;
/* Value of number of PLL clock registers for ISo1 selected */
uint8 ucNoOfPllIso1CkscReg;
/* Value of number of PLL clock registers for AWO selected */
uint8 ucNoOfPllAwoCkscReg;
/* CKSC Index offset */
uint8 ucCkscIndexOffset;
/* PLL CKSC Index offset */
uint8 ucCkscPllIndexOffset;
} Tdd_Mcu_ClockSetting;
/*******************************************************************************
**Structure pointing to the Pn register address of each Port group configured **
*******************************************************************************/
typedef struct STagMcuPortGroupAddress
{
P2VAR(Tdd_Mcu_PortRegisters, AUTOMATIC, MCU_CONFIG_DATA)pPortGroupAddress;
} Tdd_Mcu_PortGroupAddress;
/*******************************************************************************
** Power Mode Setting Data Structure **
*******************************************************************************/
typedef struct STagMcuModeSetting
{
/* Value of Power Down Wakeup Type for ISO0 L0Area */
uint32 ulPowerDownWakeupTypeL0;
/* Value of Power Down Wakeup Type for ISO0 M0Area */
uint32 ulPowerDownWakeupTypeM0;
/* Value of Power Down Wakeup Type for ISO0 H0Area */
uint32 ulPowerDownWakeupTypeH0;
/* Value of Power Down Wakeup Type for ISO1 L1Area */
uint32 ulPowerDownWakeupTypeL1;
/* Value of Power Down Wakeup Type for ISO1 M1Area */
uint32 ulPowerDownWakeupTypeM1;
/* Value of Power Down Wakeup Type for ISO1 H1Area */
uint32 ulPowerDownWakeupTypeH1;
/* Value to Enable/Disable wakeup for ISO0 and ISO1 area */
uint32 ulOscWufMsk;
/* Value of Power Down Mode control register0 */
uint8 ucPSC0RegValue;
/* Value of Power Down Mode control register1 */
uint8 ucPSC1RegValue;
#if(MCU_IORES0_ENABLE == STD_ON)
/* IO reset register0 to reset different ports before power down */
uint8 ucIOResetReg0;
#endif /* #if(MCU_IORES0_ENABLE == STD_ON) */
#if(MCU_IORES1_ENABLE == STD_ON)
/* IO reset register1 to reset different ports before power down */
uint8 ucIOResetReg1;
#endif /* #if(MCU_IORES1_ENABLE == STD_ON) */
/* Power down modes */
uint8 ucModeType;
} Tdd_Mcu_ModeSetting;
/*******************************************************************************
** Extern declarations for Global Data **
*******************************************************************************/
#define MCU_START_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
/* Global array for offset of configured CKSC registers */
extern CONST(uint16, MCU_CONST)Mcu_GaaCkscRegOffset[];
/* Global array for the value of configured CKSC registers */
extern CONST(uint32, MCU_CONST)Mcu_GaaCkscRegValue[];
/* Global array for Clock Setting Configuration */
extern CONST(Tdd_Mcu_ClockSetting, MCU_CONST) Mcu_GstClockSetting[];
/* Global array for Mode Setting Configuration */
extern CONST(Tdd_Mcu_ModeSetting, MCU_CONST) Mcu_GstModeSetting[];
/* Global array for Clock setting Index Mapping */
extern CONST(uint8, MCU_CONST)Mcu_GaaClkSettingIndexMap[];
/* Global array of port registers */
extern CONST(Tdd_Mcu_PortGroupAddress, MCU_CONST) Mcu_GaaPortGroup[];
#define MCU_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
#define MCU_START_SEC_BURAM_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* Global RAM array for back up of Port group registers */
extern VAR(uint32, MCU_CONFIG_DATA) Mcu_GaaRamPortGroup[];
#define MCU_STOP_SEC_BURAM_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* MCU_PBTYPES_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Pwm/Pwm_LTTypes.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Pwm_LTTypes.h */
/* Version = 3.1.2 */
/* Date = 06-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of AUTOSAR PWM Link Time Parameters */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 18-Aug-2009 : Initial version
* V3.0.1: 25-Jul-2010 : As per SCR 305, indentation is updated for the
* structure "Tdd_Pwm_NotificationType".
* V3.1.0: 26-Jul-2011 : Ported for the DK4 variant.
* V3.1.1: 05-Mar-2012 : Merged the fixes done for Fx4L PWM driver
* V3.1.2: 06-Jun-2012 : As per SCR 034, Compiler version is removed from
* Environment section.
*/
/******************************************************************************/
#ifndef PWM_LTTYPES_H
#define PWM_LTTYPES_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Pwm.h"
#include "Pwm_Cbk.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification information */
#define PWM_LTTYPES_AR_MAJOR_VERSION PWM_AR_MAJOR_VERSION_VALUE
#define PWM_LTTYPES_AR_MINOR_VERSION PWM_AR_MINOR_VERSION_VALUE
#define PWM_LTTYPES_AR_PATCH_VERSION PWM_AR_PATCH_VERSION_VALUE
/* File version information */
#define PWM_LTTYPES_SW_MAJOR_VERSION 3
#define PWM_LTTYPES_SW_MINOR_VERSION 1
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (PWM_SW_MAJOR_VERSION != PWM_LTTYPES_SW_MAJOR_VERSION)
#error "Pwm_LTTypes.h : Mismatch in Major Version"
#endif
#if (PWM_SW_MINOR_VERSION != PWM_LTTYPES_SW_MINOR_VERSION)
#error "Pwm_LTTypes.h : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Structure of function pointer for Callback notification function */
typedef struct STagPwm_NotificationType
{
/* Pointer to callback notification */
P2FUNC (void, PWM_APPL_CODE, pPwmEdgeNotifPtr)(void);
}Tdd_Pwm_NotificationType;
/*******************************************************************************
** Extern declarations for Global Data **
*******************************************************************************/
#define PWM_START_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/* Declaration for PWM Channel Callback functions Configuration */
extern CONST(Tdd_Pwm_NotificationType, PWM_CONST) Pwm_GstChannelNotifFunc[];
#define PWM_STOP_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* PWM_LTTYPES_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Port/Port_Cfg.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* File name = Port_Cfg.h */
/* Version = 3.0.4 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains pre-compile time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.1.7a
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: PORT_REV2_HEADLAMP_V308_UPD4010_140619.arxml
* GENERATED ON: 19 Jun 2014 - 16:59:42
*/
#ifndef PORT_CFG_H
#define PORT_CFG_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define PORT_CFG_AR_MAJOR_VERSION 3
#define PORT_CFG_AR_MINOR_VERSION 0
#define PORT_CFG_AR_PATCH_VERSION 1
/* File version information */
#define PORT_CFG_SW_MAJOR_VERSION 3
#define PORT_CFG_SW_MINOR_VERSION 1
/*******************************************************************************
** Common Published Information **
*******************************************************************************/
#define PORT_AR_MAJOR_VERSION_VALUE 3
#define PORT_AR_MINOR_VERSION_VALUE 0
#define PORT_AR_PATCH_VERSION_VALUE 1
#define PORT_SW_MAJOR_VERSION_VALUE 3
#define PORT_SW_MINOR_VERSION_VALUE 1
#define PORT_SW_PATCH_VERSION_VALUE 5
#define PORT_MODULE_ID_VALUE 124
#define PORT_VENDOR_ID_VALUE 23
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Instance ID of the PORT Driver Component */
#define PORT_INSTANCE_ID_VALUE 0
/* Enables/Disables Development error detect */
#define PORT_DEV_ERROR_DETECT STD_OFF
/* Enables/Disables Port_SetPinDirection API */
#define PORT_SET_PIN_DIRECTION_API STD_ON
/* Enables/Disables Port_SetPinMode API */
#define PORT_SET_PIN_MODE_API STD_ON
/* Enables/Disables Port_GetVersionInfo API */
#define PORT_VERSION_INFO_API STD_ON
/* Enable/Disable the enter/exit critical section functionality */
#define PORT_CRITICAL_SECTION_PROTECTION STD_OFF
/* Enables/Disables the checking of port pin backup status */
#define PORT_PIN_STATUS_BACKUP STD_OFF
/* Pre-compile option for the PSC0 */
#define PORT_PSC0_ENABLE STD_ON
/* Pre-compile option for the PSC1 */
#define PORT_PSC1_ENABLE STD_ON
/* Pre-compile option for the PWS0 */
#define PORT_PWS0_ENABLE STD_ON
/* Pre-compile option for the PWS1 */
#define PORT_PWS1_ENABLE STD_ON
/* Pre-compile option for the IORES0 */
#define PORT_IORES0_ENABLE STD_OFF
/* Pre-compile option for Device name */
#define USE_UPD70F3580 STD_OFF
/* Pre-compile option for Device name */
#define USE_UPD70F3529 STD_OFF
/* Availability of numeric port groups */
#define PORT_NUM_PORT_GROUPS_AVAILABLE STD_ON
/* Availability of alphabetic port groups */
#define PORT_ALPHA_PORT_GROUPS_AVAILABLE STD_OFF
/* Enables/Disables Port_GetVersionInfo API */
#define PORT_JTAG_PORT_GROUPS_AVAILABLE STD_ON
/* The following constant contains total number of pins configured */
#define PORT_TOTAL_NUMBER_OF_PINS (uint16)128
/* The following constant contains total number of JPSR registers */
#define PORT_JTAG_PSR_REGS (uint8)1
/* The following constant contains total number of JPMCSR registers */
#define PORT_JTAG_PMCSR_REGS (uint8)1
/* The following constant contains total number of JPODC registers */
#define PORT_JTAG_PODC_REGS (uint8)1
/* The following constant contains total number of JPDSC registers */
#define PORT_JTAG_PDSC_REGS (uint8)1
/* The following constant contains total number of JPUCC registers */
#define PORT_JTAG_PUCC_REGS (uint8)0
/* The following constant contains total number of JPSBC registers */
#define PORT_JTAG_PSBC_REGS (uint8)0
/* The following constant contains total number of 8 bit JTAG registers */
#define PORT_JTAG_OTHER_8BIT_REGS (uint8)6
/* Base Address of numeric port */
#define PORT_USER_BASE_ADDRESS_NUMERIC (uint32)0xFF400000ul
/* Os Address of numeric port */
#define PORT_OS_BASE_ADDRESS_NUMERIC (uint32)0xFF404000ul
/* Base Address of JTAG port */
#define PORT_USER_BASE_ADDRESS_JTAG (uint32)0xFF440000ul
/* Os Address of JTAG port */
#define PORT_OS_BASE_ADDRESS_JTAG (uint32)0xFF440400ul
/* Protection Command Register 2 */
#define PORT_PROTCMD2 *((volatile uint8 *)0xFF420300ul)
/* Protection status register2 */
#define PORT_PROTS2 *((volatile uint8 *)0xFF420304ul)
/* Power save control register 0 */
#define PORT_PSC0 *((volatile uint32 *)0xFF420000ul)
/* Power save control register 1 */
#define PORT_PSC1 *((volatile uint32 *)0xFF420008ul)
/* Power status register 0 */
#define PORT_PWS0 *((volatile uint32 *)0xFF420004ul)
/* Power status register 1 */
#define PORT_PWS1 *((volatile uint32 *)0xFF42000Cul)
/* Availability of DNFA noise elimination registers */
#define PORT_DNFA_REG_CONFIG STD_OFF
/* Availability of FCLA noise elimination registers */
#define PORT_FCLA_REG_CONFIG STD_OFF
/* Availability of Digital noise filter sampling clock control register */
#define PORT_DNFS_AVAILABLE STD_OFF
/* Port Pin Handles */
#define PortGroup0_PortPin20 (uint16)0
#define PortGroup0_PortPin130 (uint16)1
#define PortGroup0_PortPin110 (uint16)2
#define PortGroup0_PortPin70 (uint16)3
#define PortGroup0_PortPin100 (uint16)4
#define PortGroup0_PortPin80 (uint16)5
#define PortGroup0_PortPin150 (uint16)6
#define PortGroup0_PortPin10 (uint16)7
#define PortGroup0_PortPin60 (uint16)8
#define PortGroup0_PortPin40 (uint16)9
#define PortGroup0_PortPin30 (uint16)10
#define PortGroup0_PortPin120 (uint16)11
#define PortGroup0_PortPin00 (uint16)12
#define PortGroup0_PortPin90 (uint16)13
#define PortGroup0_PortPin140 (uint16)14
#define PortGroup0_PortPin50 (uint16)15
#define PortGroup1_PortPin20 (uint16)16
#define PortGroup1_PortPin60 (uint16)17
#define PortGroup1_PortPin40 (uint16)18
#define PortGroup1_PortPin110 (uint16)19
#define PortGroup1_PortPin140 (uint16)20
#define PortGroup1_PortPin120 (uint16)21
#define PortGroup1_PortPin80 (uint16)22
#define PortGroup1_PortPin90 (uint16)23
#define PortGroup1_PortPin130 (uint16)24
#define PortGroup1_PortPin70 (uint16)25
#define PortGroup1_PortPin150 (uint16)26
#define PortGroup1_PortPin50 (uint16)27
#define PortGroup1_PortPin100 (uint16)28
#define PortGroup1_PortPin30 (uint16)29
#define PortGroup1_PortPin10 (uint16)30
#define PortGroup2_PortPin00 (uint16)31
#define PortGroup2_PortPin10 (uint16)32
#define PortGroup2_PortPin20 (uint16)33
#define PortGroup3_PortPin50 (uint16)34
#define PortGroup3_PortPin30 (uint16)35
#define PortGroup3_PortPin70 (uint16)36
#define PortGroup3_PortPin80 (uint16)37
#define PortGroup3_PortPin10 (uint16)38
#define PortGroup3_PortPin20 (uint16)39
#define PortGroup3_PortPin60 (uint16)40
#define PortGroup3_PortPin40 (uint16)41
#define PortGroup3_PortPin00 (uint16)42
#define PortGroup3_PortPin90 (uint16)43
#define PortGroup4_PortPin100 (uint16)44
#define PortGroup4_PortPin90 (uint16)45
#define PortGroup4_PortPin00 (uint16)46
#define PortGroup4_PortPin80 (uint16)47
#define PortGroup4_PortPin60 (uint16)48
#define PortGroup4_PortPin10 (uint16)49
#define PortGroup4_PortPin70 (uint16)50
#define PortGroup4_PortPin110 (uint16)51
#define PortGroup4_PortPin50 (uint16)52
#define PortGroup4_PortPin30 (uint16)53
#define PortGroup4_PortPin20 (uint16)54
#define PortGroup4_PortPin40 (uint16)55
#define PortGroup10_PortPin80 (uint16)56
#define PortGroup10_PortPin120 (uint16)57
#define PortGroup10_PortPin110 (uint16)58
#define PortGroup10_PortPin90 (uint16)59
#define PortGroup10_PortPin150 (uint16)60
#define PortGroup10_PortPin60 (uint16)61
#define PortGroup10_PortPin70 (uint16)62
#define PortGroup10_PortPin130 (uint16)63
#define PortGroup10_PortPin100 (uint16)64
#define PortGroup10_PortPin140 (uint16)65
#define PortGroup11_PortPin10 (uint16)66
#define PortGroup11_PortPin50 (uint16)67
#define PortGroup11_PortPin60 (uint16)68
#define PortGroup11_PortPin20 (uint16)69
#define PortGroup11_PortPin70 (uint16)70
#define PortGroup11_PortPin00 (uint16)71
#define PortGroup11_PortPin30 (uint16)72
#define PortGroup11_PortPin40 (uint16)73
#define PortGroup12_PortPin50 (uint16)74
#define PortGroup12_PortPin70 (uint16)75
#define PortGroup12_PortPin110 (uint16)76
#define PortGroup12_PortPin00 (uint16)77
#define PortGroup12_PortPin90 (uint16)78
#define PortGroup12_PortPin20 (uint16)79
#define PortGroup12_PortPin150 (uint16)80
#define PortGroup12_PortPin80 (uint16)81
#define PortGroup12_PortPin140 (uint16)82
#define PortGroup12_PortPin30 (uint16)83
#define PortGroup12_PortPin100 (uint16)84
#define PortGroup12_PortPin60 (uint16)85
#define PortGroup12_PortPin40 (uint16)86
#define PortGroup12_PortPin130 (uint16)87
#define PortGroup12_PortPin120 (uint16)88
#define PortGroup12_PortPin10 (uint16)89
#define PortGroup21_PortPin100 (uint16)90
#define PortGroup21_PortPin60 (uint16)91
#define PortGroup21_PortPin50 (uint16)92
#define PortGroup21_PortPin80 (uint16)93
#define PortGroup21_PortPin110 (uint16)94
#define PortGroup21_PortPin30 (uint16)95
#define PortGroup21_PortPin70 (uint16)96
#define PortGroup21_PortPin20 (uint16)97
#define PortGroup21_PortPin40 (uint16)98
#define PortGroup21_PortPin90 (uint16)99
#define PortGroup25_PortPin140 (uint16)100
#define PortGroup25_PortPin70 (uint16)101
#define PortGroup25_PortPin60 (uint16)102
#define PortGroup25_PortPin100 (uint16)103
#define PortGroup25_PortPin50 (uint16)104
#define PortGroup25_PortPin30 (uint16)105
#define PortGroup25_PortPin20 (uint16)106
#define PortGroup25_PortPin00 (uint16)107
#define PortGroup25_PortPin40 (uint16)108
#define PortGroup25_PortPin80 (uint16)109
#define PortGroup25_PortPin110 (uint16)110
#define PortGroup25_PortPin120 (uint16)111
#define PortGroup25_PortPin130 (uint16)112
#define PortGroup25_PortPin10 (uint16)113
#define PortGroup25_PortPin90 (uint16)114
#define PortGroup25_PortPin150 (uint16)115
#define PortGroup27_PortPin20 (uint16)116
#define PortGroup27_PortPin50 (uint16)117
#define PortGroup27_PortPin30 (uint16)118
#define PortGroup27_PortPin00 (uint16)119
#define PortGroup27_PortPin40 (uint16)120
#define PortGroup27_PortPin10 (uint16)121
#define PortGroupJtag0_PortPin10 (uint16)122
#define PortGroupJtag0_PortPin50 (uint16)123
#define PortGroupJtag0_PortPin00 (uint16)124
#define PortGroupJtag0_PortPin20 (uint16)125
#define PortGroupJtag0_PortPin40 (uint16)126
#define PortGroupJtag0_PortPin30 (uint16)127
/* Configuration Set Handles */
#define PortConfigSet0 &Port_GstConfiguration[0]
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* PORT_CFG_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/APP/LEDTemperature/LEDTemperatureRTE.c
#include "Std_Types.h"
UINT16 LEDTemperature_w_ADC1=0;
void SetLEDTemperature_ADCValue1(UINT16 Value)
{
LEDTemperature_w_ADC1=Value;
}
UINT16 GetLEDTemperature_ADCValue1(void)
{
return LEDTemperature_w_ADC1;
}
UINT16 LEDTemperature_w_ADC2=0;
void SetLEDTemperature_ADCValue2(UINT16 Value)
{
LEDTemperature_w_ADC2=Value;
}
UINT16 GetLEDTemperature_ADCValue2(void)
{
return LEDTemperature_w_ADC2;
}
UINT16 GetLEDTemperature_Value1(void)
{
//return VeLED_sw_TempFlt1;
}
UINT16 GetLEDTemperature_Value2(void)
{
//return VeLED_sw_TempFlt2;
}
UINT8 GetLEDTempPWMDutyOut1(void)
{
//return VeLED_sw_TempPWMDutyOut1;
}
UINT8 GetLEDTempPWMDutyOut2(void)
{
//return VeLED_sw_TempPWMDutyOut2;
}
<file_sep>/BSP/Common/Compiler/string.h
#ifndef _STRING_H
#define _STRING_H
#include "CompilerSelect.h"
#if COMPILER_GHS
/*lib file libstartup.a include all the functions in string.h, so you need only to include the libstartup.a to your project.*/
#elif COMPILER_CX
#include <string.h>
#else
#error "Compiler is not selected!"
#endif
#endif
/*EOF*/
<file_sep>/BSP/Include/SchM_CanIf.h
#ifndef SCHM_CANIF_H
#define SCHM_CANIF_H
#include "SchM.h"
#include "SchM_Types.h"
#include "SchM_Cfg.h"
#define CANIF_EXCLUSIVE_AREA_0 SCHM_EA_SUSPENDALLINTERRUPTS
#define CANIF_EXCLUSIVE_AREA_1 SCHM_EA_SUSPENDALLINTERRUPTS
#define CANIF_EXCLUSIVE_AREA_2 SCHM_EA_SUSPENDALLINTERRUPTS
#define CANIF_EXCLUSIVE_AREA_3 SCHM_EA_SUSPENDALLINTERRUPTS
#define CANIF_EXCLUSIVE_AREA_4 SCHM_EA_SUSPENDALLINTERRUPTS
# define SchM_Enter_CanIf(ExclusiveArea) \
SCHM_ENTER_EXCLUSIVE(ExclusiveArea)
# define SchM_Exit_CanIf(ExclusiveArea) \
SCHM_EXIT_EXCLUSIVE(ExclusiveArea)
#endif /* SCHM_CANIF_H */
/* STOPSINGLE_OF_MULTIPLE */
/************ Organi, Version 3.9.0 Vector-Informatik GmbH ************/
<file_sep>/BSP/MCAL/Pwm/Pwm_LLDriver.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Pwm_LLDriver.c */
/* Version = 3.1.10 */
/* Date = 06-Sep-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2013 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Low level Driver code of the PWM Driver Component */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 18-Aug-2009 : Initial version
*
* V3.0.1: 28-Oct-2009 : As per SCR 054, Pwm_HW_Callback function is added.
*
* V3.0.2: 05-Nov-2009 : As per SCR 088, I/O structure is updated to have
* separate base address for USER and OS registers.
*
* V3.0.3: 02-Jul-2010 : As per SCR 290, the functions Pwm_HW_Init,
* Pwm_HW_DeInit, Pwm_HW_SetDutyCycle,
* Pwm_HW_SetDuty_FixedPeriodShifted,
* Pwm_HW_SetPeriodAndDuty, Pwm_HW_SetOutputToIdle,
* Pwm_HW_GetOutputState and Pwm_HW_CalculateDuty are
* updated for the implementation of TAUB and TAUC
* timers.
*
* V3.0.4: 25-Jul-2010 : As per SCR 305, precompile option PWM_TAUA_UNIT_USED
* is added for the BRS register settings in function
* Pwm_HW_Init
*
* V3.0.5: 02-Aug-2010 : As per SCR 329, implementation DLYAEN register is
* made.
*
* V3.0.6: 10-Feb-2011 : As per SCR 417, In Pwm_HW_GetOutputState api
* functionality of masking is corrected by using bit
* wise "&" operator.
*
* V3.0.7: 29-Apr-2011 : As per SCR 435, In Functions Pwm_HW_Init and
* Pwm_HW_CalculateDuty calculation of Period and Duty
* are modified.
*
* V3.0.8: 21-Jun-2011 : As per SCR 478, the functions Pwm_HW_Init,
* Pwm_HW_DeInit, Pwm_HW_SetDutyCycle,
* Pwm_HW_SetDuty_FixedPeriodShifted,
* Pwm_HW_SetPeriodAndDuty, Pwm_HW_SetOutputToIdle and
* Pwm_HW_GetOutputState are
* modified for the implementation of change in size of
* Registers from 16 bit to 8 bit.
* V3.1.0: 26-Jul-2011 : Ported for the DK4 variant.
* V3.1.1: 04-Oct-2011 : Added comments for the violation of MISRA rule 19.1.
* V3.1.2: 12-Jan-2012 : TEL have fixed The Issues reported by mantis id
* : #4246,#4210,#4207,#4206,#4202,#4259,#4257,#4248.
* V3.1.3: 05-Mar-2012 : Merged the fixes done for Fx4L PWM driver
* V3.1.4: 31-Mar-2012 : Corrected disabling Interrupt processing in function
* Pwm_HW_DeInit
* V3.1.5: 11-Jun-2012 : As per SCR 034, following changes are made:
* 1. Compiler version is removed from Environment
* section.
* 2. Check routine of simultaneous rewrite flag is
* added in Pwm_HW_SetDutyCycle,
* Pwm_HW_SetDuty_FixedPeriodShifted and
* Pwm_HW_SetPeriodAndDuty functions.
* 3. Inclusion of Dem.h is added.
* 4. Functionality of channel stop trigger register
* TAUJnTT is corrected in Pwm_HW_DeInit function.
*
* As per MANTIS #4820, Pwm_HW_Init is updated:
* 1. Setting the SSER register is moved after setting
* TAUA/B/C register.
* As per MANTIS #4818, Pwm_HW_DeInit is updated:
* 1. Remove the decision operation for idle level.
* As per MANTIS #4819, Pwm_HW_Init is updated:
* 1. Remove the unnecessary setting of pDlyCompRegs.
*
* V3.1.6: 12-Jul-2012 : As per SCR 051, following changes are made:
* 1. Sequence of Timer Unit setting and PIC0SSER0,
* PIC0SSER2 is correct in Pwm_HW_Init.
* 2. Handling of PWM_CRITICAL_SECTION_PROTECTION is
* corrected in Pwm_HW_Init.
*
* V3.1.7: 30-Jul-2012 : As per SCR 070, following changes are made:
* 1. Pre-compile option for timer units corrected in
* Pwm_HW_Init.
* 2. Functionality related to LucSaveCount is
* corrected in Pwm_HW_Init.
* V3.1.8: 05-Nov-2012 : As per MNT_0007541,
* 1.Comment added at each "#endif".
* 2.Access of registers "usTAUABnTOC,usTAUABCnTOL,
* usTAUABCnRDE, usTAUABCnTOE,usTAUABCnTS,ucTAUJnRDE,
* ucTAUJnTOE,ucTAUJnTT,ucTAUJnTS and ucTAUJnRDT" are
* modified.
* V3.1.9: 20-Dec-2012 : As per MNT_0008440, following changes are made:
* 1.AS per MANTIS #4905, setting order of delay macro
* is corrected in functions "Pwm_HW_Init" and
* "Pwm_HW_DeInit".
* 2.As per MANTIS #8519 access of registers "ucTAUJnTT,
* ucTAUJnTS and ucTAUJnRDT" are corrected.
* 3.As per MANTIS #8211 handling of
* PWM_CRITICAL_SECTION_PROTECTION is corrected in
* Pwm_HW_Init.
* 4.As per MANTIS #7882 functions "Pwm_HW_SetDutyCycle"
* and "Pwm_HW_SetPeriodAndDuty" are updated.
* 5.As per MANTIS #4829 function "Pwm_HW_DeInit" is
* modified.
* V3.1.10; 06-Sep-2013 : As per MNT_0004821, checking of RSF and report to
* DEM are removed from the APIs Pwm_HW_SetDutyCycle,
* Pwm_HW_SetDuty_FixedPeriodShifted and
* Pwm_HW_SetPeriodAndDuty.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Pwm.h"
#include "Pwm_Ram.h"
#include "Pwm_LLDriver.h"
#include "Pwm_LTTypes.h"
#include "Dem.h"
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
#include "SchM_Pwm.h"
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification version information */
#define PWM_LLDRIVER_C_AR_MAJOR_VERSION PWM_AR_MAJOR_VERSION_VALUE
#define PWM_LLDRIVER_C_AR_MINOR_VERSION PWM_AR_MINOR_VERSION_VALUE
#define PWM_LLDRIVER_C_AR_PATCH_VERSION PWM_AR_PATCH_VERSION_VALUE
/* File version information */
#define PWM_LLDRIVER_C_SW_MAJOR_VERSION 3
#define PWM_LLDRIVER_C_SW_MINOR_VERSION 1
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (PWM_LLDRIVER_AR_MAJOR_VERSION != PWM_LLDRIVER_C_AR_MAJOR_VERSION)
#error "Pwm_LLDriver.c : Mismatch in Specification Major Version"
#endif
#if (PWM_LLDRIVER_AR_MINOR_VERSION != PWM_LLDRIVER_C_AR_MINOR_VERSION)
#error "Pwm_LLDriver.c : Mismatch in Specification Minor Version"
#endif
#if (PWM_LLDRIVER_AR_PATCH_VERSION != PWM_LLDRIVER_C_AR_PATCH_VERSION)
#error "Pwm_LLDriver.c : Mismatch in Specification Patch Version"
#endif
#if (PWM_SW_MAJOR_VERSION != PWM_LLDRIVER_C_SW_MAJOR_VERSION)
#error "Pwm_LLDriver.c : Mismatch in Major Version"
#endif
#if (PWM_SW_MINOR_VERSION != PWM_LLDRIVER_C_SW_MINOR_VERSION)
#error "Pwm_LLDriver.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Pwm_HW_Init
**
** Service ID : NA
**
** Description : This is PWM Driver Component support function.
** This function sets the clock prescaler,PWM mode,
** Period, Duty cycle and polarity for all configured
** channels. This function also disables the interrupts
** (Notifications) and resets the interrupt request
** pending flags.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : NA
**
** Remarks : Global Variable(s):
** Pwm_GpTAUABCUnitConfig, Pwm_GpTAUJUnitConfig,
** Pwm_GpSynchStartConfig,Pwm_GpChannelConfig,
** Pwm_GpNotifStatus, Pwm_GpChannelIdleStatus.
** Function(s) invoked:
** SchM_Enter_Pwm, SchM_Exit_Pwm
*******************************************************************************/
#define PWM_START_SEC_PRIVATE_CODE
/* MISRA Rule : 19.1 */
/* Message : #include statements in a file */
/* should only be preceded by other*/
/* preprocessor directives or */
/* comments. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
#include "MemMap.h"
FUNC(void, PWM_PRIVATE_CODE) Pwm_HW_Init(void)
{
/* Pointer to the channel configuration */
P2CONST(Tdd_Pwm_ChannelConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpChannelConfig;
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
/* Pointer pointing to the TAUA/TAUB/TAUC Unit configuration */
P2CONST(Tdd_Pwm_TAUABCUnitConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpTAUABCUnitConfig;
/* Pointer pointing to the TAUA/TAUB/TAUC Unit user control registers */
P2VAR(Tdd_Pwm_TAUABCUnitUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCUnitUserReg;
/* Pointer pointing to the TAUA/TAUB/TAUC Unit OS control registers */
P2VAR(Tdd_Pwm_TAUABCUnitOsRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCUnitOsReg;
/* Pointer used for TAUA/TAUB/TAUC channel control registers */
P2VAR(Tdd_Pwm_TAUABCChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCChannelReg;
/* Pointer used for TAUA/TAUB/TAUC Master channel control registers */
P2VAR(Tdd_Pwm_TAUABCChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCMasterChannelReg;
/* Pointer to the TAUA/TAUB/TAUC Channel Properties structure */
P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCProperties;
#endif /* #if((PWM_TAUA_UNIT_USED == STD_ON) || \
(PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON)) */
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/* Pointer pointing to the TAUJ Unit configuration */
P2CONST(Tdd_Pwm_TAUJUnitConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpTAUJUnitConfig;
/* Pointer pointing to the TAUJ Unit user control registers */
P2VAR(Tdd_Pwm_TAUJUnitUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUJUnitUserReg;
/* Pointer pointing to the TAUJ Unit os control registers */
P2VAR(Tdd_Pwm_TAUJUnitOsRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUJUnitOsReg;
/* Pointer used for TAUJ channel control registers */
P2VAR(Tdd_Pwm_TAUJChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUJChannelReg;
/* Pointer used for TAUJ Master channel control registers */
P2VAR(Tdd_Pwm_TAUJChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUJMasterChannelReg;
/* Pointer to the TAUJ Channel Properties structure */
P2VAR(Tdd_Pwm_TAUJProperties, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUJProperties;
/* MISRA Msg : 3:3197 */
/* Message : This initialization is redundant */
/* The value of 'LucSaveCount' is */
/* never used before being modified. */
/* Reason : This is done to initialise */
/* variables with specific values */
/* before they are used. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Save count from the TAUA/TAUB/TAUC channel loop */
uint8_least LucSaveCount = PWM_ZERO;
#endif /* #if(PWM_TAUJ_UNIT_USED == STD_ON) */
#if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON)
/* Pointer to the structure for Synchronous start between TAU Units */
P2CONST(Tdd_PwmTAUSynchStartUseType, AUTOMATIC, PWM_CONFIG_CONST)
LpTAUSynchStart;
uint16 LusSyncMask;
#endif
Pwm_PeriodType LddMasterPeriod;
Pwm_PeriodType LddSlaveDuty;
uint16 LusChannelOutput;
/* MISRA Msg : 3:3197 */
/* Message : This initialization is redundant */
/* The value of 'LucCount' is */
/* never used before being modified. */
/* Reason : This is done to initialise */
/* variables with specific values */
/* before they are used. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
uint8_least LucCount = PWM_ZERO;
uint8 LucVar;
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
/* Update the TAUA/TAUB/TAUC config pointer to point to the current TAU */
LpTAUABCUnitConfig = Pwm_GpTAUABCUnitConfig;
#endif
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/* Update the TAUJ config pointer to point to the current TAUJ */
LpTAUJUnitConfig = Pwm_GpTAUJUnitConfig;
#endif
#if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON)
/*
* Update the SynchStart config pointer to point to the current
* SynchStart
*/
LpTAUSynchStart = Pwm_GpSynchStartConfig;
#endif
LpChannelConfig = Pwm_GpChannelConfig;
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#if(PWM_DELAY_MACRO_SUPPORT == STD_ON)
/* Load the Delay Divider value */
PWM_DELAY_DIVIDER_REG = PWM_DELAY_DIVIDER;
/* Loop to set the attributes of TAUA/TAUB/TAUC channels */
for(LucCount = PWM_ZERO; LucCount < PWM_TOTAL_TAUABC_CHANNELS_CONFIG;
LucCount++)
{
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUA/TAUB/TAUC channel properties */
LpTAUABCProperties =
(P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
/* Check whether the delay is configured for the particular timer channel */
if(LpTAUABCProperties->pDlyCompRegs != NULL_PTR)
{
/*
* Load the Delay value in to the Delay compare register
* of the Delay Macro.
*/
*(LpTAUABCProperties->pDlyCompRegs) = LpTAUABCProperties->usDelayValue;
}
/* Increment the pointer to the next channel */
LpChannelConfig++;
}
LpChannelConfig = Pwm_GpChannelConfig;
#endif /* End of (PWM_DELAY_MACRO_SUPPORT == STD_ON) */
/*
* Loop to set
* 1. The configured prescaler for the TAUA, TAUB, TAUC units and
* 2. The bits of Delay control register for the channels that are configured
* with Delay value for the TAUA, TAUB, TAUC units
*/
for(LucCount = PWM_ZERO; LucCount < PWM_TOTAL_TAUABC_UNITS_CONFIG; LucCount++)
{
#if(PWM_CONFIG_PRESCALER_SUPPORTED == STD_ON)
/*
* Check for Prescaler setting by the PWM module for TAUAn/TAUBn/TAUCn
* Unit
*/
if(PWM_TRUE == LpTAUABCUnitConfig->blConfigurePrescaler)
{
/* Get the pointer to the TAUA/TAUB/TAUC OS control registers */
LpTAUABCUnitOsReg = LpTAUABCUnitConfig->pTAUABCUnitOsCntlRegs;
/* Load the configured prescaler value */
LpTAUABCUnitOsReg->usTAUABCnTPS = LpTAUABCUnitConfig->usPrescaler;
#if(PWM_TAUA_UNIT_USED == STD_ON)
if(PWM_HW_TAUA == LpTAUABCUnitConfig->uiPwmTAUType)
{
/* Load the configured baudrate value */
LpTAUABCUnitOsReg->ucTAUAnBRS = LpTAUABCUnitConfig->ucBaudRate;
}
else
{
/* For Misra Compliance */
}
#endif
}
else
{
/* For Misra Compliance */
}
#endif /* End of (PWM_CONFIG_PRESCALER_SUPPORTED == STD_ON) */
#if(PWM_DELAY_MACRO_SUPPORT == STD_ON)
if(NULL_PTR != LpTAUABCUnitConfig->pDelayCntlRegs)
{
/*
* Set the corresponding bits of the Delay control register
* for the channels configured with Delay value
*/
*(LpTAUABCUnitConfig->pDelayCntlRegs) |=
LpTAUABCUnitConfig->ulDelayEnableMask;
}
else
{
/* For Misra Compliance */
}
#endif /* End of (PWM_DELAY_MACRO_SUPPORT == STD_ON) */
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next TAUA/TAUB/TAUC Unit */
LpTAUABCUnitConfig++;
}
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif /* End of ((PWM_TAUA_UNIT_USED == STD_ON) ||
* (PWM_TAUB_UNIT_USED == STD_ON) || (PWM_TAUC_UNIT_USED == STD_ON))
*/
#if(PWM_TAUJ_UNIT_USED == STD_ON)
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#if(PWM_CONFIG_PRESCALER_SUPPORTED == STD_ON)
/* Loop to set the configured prescaler for the TAUJ units */
for(LucCount = PWM_ZERO; LucCount < PWM_TOTAL_TAUJ_UNITS_CONFIG; LucCount++)
{
/* Check for Prescaler setting by the PWM module for TAUJn Unit */
if(PWM_TRUE == LpTAUJUnitConfig->blConfigurePrescaler)
{
LpTAUJUnitOsReg = LpTAUJUnitConfig->pTAUJUnitOsCntlRegs;
/* Load the configured prescaler value */
LpTAUJUnitOsReg->usTAUJnTPS = LpTAUJUnitConfig->usPrescaler;
/* Load the configured baudrate value */
LpTAUJUnitOsReg->ucTAUJnBRS = LpTAUJUnitConfig->ucBaudRate;
}
else
{
/* For Misra Compliance */
}
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next TAUJ Unit */
LpTAUJUnitConfig++;
}
#endif /* End of (PWM_CONFIG_PRESCALER_SUPPORTED == STD_ON) */
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif /* End of (PWM_TAUJ_UNIT_USED == STD_ON) */
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* Loop to set the attributes of TAUA/TAUB/TAUC channels */
for(LucCount = PWM_ZERO; LucCount < PWM_TOTAL_TAUABC_CHANNELS_CONFIG;
LucCount++)
{
LpTAUABCChannelReg =
(P2VAR(Tdd_Pwm_TAUABCChannelUserRegs, AUTOMATIC, PWM_CONFIG_CONST))
LpChannelConfig->pCntlRegs;
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUA/TAUB/TAUC channel properties */
LpTAUABCProperties =
(P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
/* Check for channel in the Master Mode */
if(PWM_MASTER_CHANNEL == LpChannelConfig->uiTimerMode)
{
/*
* Update the CMORm register of Master with the
* usCMORegSettingsMask based on the configuration
*/
*LpChannelConfig->pCMORRegs = LpChannelConfig->usCMORegSettingsMask;
/*
* Update the CDRm register with default period based on the
* configuration
*/
LpTAUABCChannelReg->usTAUABCnCDRm =
(uint16)(LpTAUABCProperties->ddDefaultPeriodOrDuty - 1);
}
/* Channel in Slave Mode */
else
{
/* Master offset from the slave channel */
LucVar = LpChannelConfig->ucMasterOffset;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Pointer to the Master channel registers */
LpTAUABCMasterChannelReg =
(P2VAR(Tdd_Pwm_TAUABCChannelUserRegs, AUTOMATIC, PWM_CONFIG_CONST))
(LpChannelConfig-LucVar)->pCntlRegs;
/* Get Master's period */
LddMasterPeriod = LpTAUABCMasterChannelReg->usTAUABCnCDRm;
/* Get Slave's Duty */
LddSlaveDuty = LpTAUABCProperties->ddDefaultPeriodOrDuty;
/* Get the TAU Type in to the local variable */
LucVar = LpChannelConfig->uiPwmTAUType;
/*
* Update the CMORm register of Slave with the usCMORegSettingsMask
* based on the configuration
*/
*LpChannelConfig->pCMORRegs = LpChannelConfig->usCMORegSettingsMask;
/* Load the Absolute duty value in to the CDR Register */
LpTAUABCChannelReg->usTAUABCnCDRm = (uint16)
Pwm_HW_CalculateDuty(LddMasterPeriod, LddSlaveDuty, LucVar);
}
#if (PWM_NOTIFICATION_SUPPORTED == STD_ON)
/* Check the Notification is configured for the current channel */
if (PWM_NO_CBK_CONFIGURED != LpChannelConfig->ucNotificationConfig)
{
/* Clearing the interrupt request flag */
*(LpChannelConfig->pIntrCntlRegs) &= PWM_CLEAR_INT_REQUEST_FLAG;
/* Enable the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlRegs) &= LpChannelConfig->ucImrMaskValue;
}
else
{
/* For Misra Compliance */
}
/* Set the Notification status as PWM_FALSE */
Pwm_GpNotifStatus[LucCount] = PWM_FALSE;
#endif /* #if (PWM_NOTIFICATION_SUPPORTED == STD_ON) */
/* Initialise the Idle state status of this channel as PWM_FALSE */
Pwm_GpChannelIdleStatus[LucCount] = PWM_FALSE;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next channel */
LpChannelConfig++;
} /* End of TAUA/TAUB/TAUC Channels 'for' loop */
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif /* End of ((PWM_TAUA_UNIT_USED == STD_ON) ||
(PWM_TAUB_UNIT_USED == STD_ON) ||
(PWM_TAUC_UNIT_USED == STD_ON)) */
#if(PWM_TAUJ_UNIT_USED == STD_ON)
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
LucSaveCount = LucCount;
for(LucCount = PWM_ZERO; LucCount < PWM_TOTAL_TAUJ_CHANNELS_CONFIG;
LucCount++)
{
LpTAUJChannelReg =
(P2VAR(Tdd_Pwm_TAUJChannelUserRegs, AUTOMATIC, PWM_CONFIG_CONST))
LpChannelConfig->pCntlRegs;
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
LpTAUJProperties =
(P2VAR(Tdd_Pwm_TAUJProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
/* Check for channel in the Master Mode*/
if(PWM_MASTER_CHANNEL == LpChannelConfig->uiTimerMode)
{
/* Update the CMORm register of Master with the
* usCMORegSettingsMask based on the configuration
*/
*LpChannelConfig->pCMORRegs = LpChannelConfig->usCMORegSettingsMask;
/* Update the CDRm register with default period based on the
* configuration
*/
LpTAUJChannelReg->ulTAUJnCDRm =
(LpTAUJProperties->ddDefaultPeriodOrDuty - 1);
}
/* Channel in Slave Mode */
else
{
/* Master offset from the slave channel */
LucVar = LpChannelConfig->ucMasterOffset;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Pointer to the Master channel registers */
LpTAUJMasterChannelReg =
(P2VAR(Tdd_Pwm_TAUJChannelUserRegs, AUTOMATIC, PWM_CONFIG_CONST))
(LpChannelConfig-LucVar)->pCntlRegs;
/* Get Master's period */
LddMasterPeriod = LpTAUJMasterChannelReg->ulTAUJnCDRm;
/* Get Slave's Duty */
LddSlaveDuty = LpTAUJProperties->ddDefaultPeriodOrDuty;
/* Get the TAU Type in to the local variable */
LucVar = LpChannelConfig->uiPwmTAUType;
/*
* Update the CMORm register of Slave with the usCMORegSettingsMask
* based on the configuration
*/
*LpChannelConfig->pCMORRegs = LpChannelConfig->usCMORegSettingsMask;
LpTAUJChannelReg->ulTAUJnCDRm =
Pwm_HW_CalculateDuty(LddMasterPeriod, LddSlaveDuty, LucVar);
}
#if(PWM_NOTIFICATION_SUPPORTED == STD_ON)
/* Check the Notification is configured for the current channel */
if (PWM_NO_CBK_CONFIGURED != LpChannelConfig->ucNotificationConfig)
{
/* Clearing the interrupt request flag */
*(LpChannelConfig->pIntrCntlRegs) &= PWM_CLEAR_INT_REQUEST_FLAG;
/* Enable the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlRegs) &= LpChannelConfig->ucImrMaskValue;
}
else
{
/* For Misra Compliance */
}
/* Set the Notification status as PWM_FALSE */
Pwm_GpNotifStatus[LucSaveCount] = PWM_FALSE;
#endif
/* Initialise the Idle state status of this channel as PWM_FALSE */
Pwm_GpChannelIdleStatus[LucSaveCount] = PWM_FALSE;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer for the next channel */
LpChannelConfig++;
LucSaveCount++;
}/* End of TAUJ channels for loop */
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif /* End of (PWM_TAUJ_UNIT_USED == STD_ON) */
#if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON)
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/*
* Loop to enable synchronous start between TAU units for the channels that
* are configured for the synchronous start operation
*/
for(LucCount = PWM_ZERO; LucCount < (uint8_least)
PWM_TOTAL_UNITS_FOR_SYNCHSTART; LucCount++)
{
/*
* Set the bits of the corresponding channel of the respective
* Timer Unit as configured for the synchronous start
*/
*(LpTAUSynchStart->pPICCntlRegs)|= LpTAUSynchStart->usSyncTAUMask;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation performed on */
/* pointer. */
/* Reason : Increment operator is used to achieve better */
/* throughput. */
/* Verification : However, part of the code is verified */
/* manually and it is not having any impact. */
/* Increment the pointer to the next Synchronous start Unit */
LpTAUSynchStart++;
}
/* Update the synchronous start pointer */
LpTAUSynchStart = Pwm_GpSynchStartConfig;
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif /* End of (PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON) */
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* Update the TAUA/TAUB/TAUC unit config pointer */
LpTAUABCUnitConfig = Pwm_GpTAUABCUnitConfig;
for(LucCount = PWM_ZERO; LucCount < PWM_TOTAL_TAUABC_UNITS_CONFIG;
LucCount++)
{
/*
* Update the pointer for the base address of the TAUA/TAUB/TAUC unit
* registers
*/
LpTAUABCUnitUserReg = LpTAUABCUnitConfig->pTAUABCUnitUserCntlRegs;
LpTAUABCUnitOsReg = LpTAUABCUnitConfig->pTAUABCUnitOsCntlRegs;
/* Set the corresponding bits as per the configured Idle state */
LusChannelOutput = LpTAUABCUnitUserReg->usTAUABCnTO;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
LusChannelOutput &= ~LpTAUABCUnitConfig->usTAUChannelMask;
LusChannelOutput |= LpTAUABCUnitConfig->usTOMask;
LpTAUABCUnitUserReg->usTAUABCnTO = LusChannelOutput;
/* Set the Mode (Synchronous/Independent channel operation mode)*/
LpTAUABCUnitOsReg->usTAUABCnTOM |= LpTAUABCUnitConfig->usTOMMask;
#if((PWM_TAUA_UNIT_USED == STD_ON)||(PWM_TAUB_UNIT_USED == STD_ON))
/* Check whether the current channel not belongs to TUAC */
if(PWM_HW_TAUC != LpTAUABCUnitConfig->uiPwmTAUType)
{
/*
* set the corresponding bits to specify the TOm (channel output bit)
* operation mode.
*/
LpTAUABCUnitOsReg->usTAUABnTOC |= LpTAUABCUnitConfig->usTOCMask;
}
else
{
/* For Misra Compliance */
}
#endif
/* Set the corresponding bits as per the configured Polarity */
LpTAUABCUnitUserReg->usTAUABCnTOL |= LpTAUABCUnitConfig->usTOLMask;
/*
* Set the corresponding bits to Enable simultaneous rewrite of
* the data register.
*/
LpTAUABCUnitOsReg->usTAUABCnRDE |= LpTAUABCUnitConfig->usTAUChannelMask;
/* Set the corresponding bits to enable/disable TOm operation */
LpTAUABCUnitUserReg->usTAUABCnTOE |= LpTAUABCUnitConfig->usTOEMask;
#if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON)
/* Check TAUA0 channels configured for Synchronous start */
if(PWM_TAUA0 == LpTAUSynchStart->ucTAUUnitType)
{
/*
* Set the channel bits that are not configured for
* synchronous start, to enable the count operation
*/
LpTAUABCUnitUserReg->usTAUABCnTS =
(LpTAUABCUnitConfig->usTAUChannelMask ^ LpTAUSynchStart->usSyncTAUMask);
}
/* Check TAUA1 channels configured for Synchronous start */
else if(PWM_TAUA1 == LpTAUSynchStart->ucTAUUnitType)
{
/*
* Set the channel bits that are not configured for
* synchronous start, to enable the count operation
*/
LpTAUABCUnitUserReg->usTAUABCnTS =
(LpTAUABCUnitConfig->usTAUChannelMask ^ LpTAUSynchStart->usSyncTAUMask);
}
else
{
/* Set the corresponding channel bit to enable the count operation */
LpTAUABCUnitUserReg->usTAUABCnTS = LpTAUABCUnitConfig->usTAUChannelMask;
}
/* MISRA Rule : 13.7 */
/* Message : The result of this logical operation is always */
/* 'true'. The value of this control expression is */
/* always 'true'. */
/* Reason : This is used for a counting operation. */
/* Verification : However, part of the code is verified manually */
/* and it is not giving any impact */
if(LucCount < PWM_TWO)
{
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation performed on */
/* pointer. */
/* Reason : Increment operator is used to achieve better */
/* throughput. */
/* Verification : However, part of the code is verified manually*/
/* and it is not having any impact. */
/* Increment the pointer for the next Synchronous start Unit */
LpTAUSynchStart++;
}
else
{
/* For Misra Compliance */
}
#else
/* Set the corresponding channel bit to enable the count operation */
LpTAUABCUnitUserReg->usTAUABCnTS = LpTAUABCUnitConfig->usTAUChannelMask;
#endif /* #if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON) */
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer for the next TAUA/TAUB/TAUC Unit */
LpTAUABCUnitConfig++;
}/* End of TAUA/TAUB/TAUC Units 'for' loop */
#if(PWM_DELAY_MACRO_SUPPORT == STD_ON)
/*
* Enable the corresponding bit in DLYAEN register based on the number of
* units enabled for Delay Macro
*/
PWM_DELAY_ENABLE_REG = PWM_DELAY_ENABLE_VALUE;
#endif
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif /* End of ((PWM_TAUA_UNIT_USED == STD_ON) ||
(PWM_TAUB_UNIT_USED == STD_ON) ||
(PWM_TAUC_UNIT_USED == STD_ON)) */
/* Check for TAUJ Units Used */
#if(PWM_TAUJ_UNIT_USED == STD_ON)
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON)
/* Update the synchronous start pointer */
LpTAUSynchStart = Pwm_GpSynchStartConfig;
/* Check for the TAUJ Unit*/
if(PWM_TAUJ == LpTAUSynchStart->ucTAUUnitType)
{
/* Get the synchronous mask value */
LusSyncMask = LpTAUSynchStart->usSyncTAUMask;
}
else
{
LucCount = PWM_ZERO;
do
{
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next synchronous start unit */
LpTAUSynchStart++;
LucCount++;
}while((LpTAUSynchStart->ucTAUUnitType != PWM_TAUJ) &&
(LucCount< (uint8_least)PWM_TOTAL_UNITS_FOR_SYNCHSTART));
/* Get the synchronous mask value */
LusSyncMask = LpTAUSynchStart->usSyncTAUMask;
}
#endif /* #if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON) */
/* Update the TAUJ Unit config pointer to point to the current TAUJ */
LpTAUJUnitConfig = Pwm_GpTAUJUnitConfig;
for(LucCount = PWM_ZERO; LucCount < PWM_TOTAL_TAUJ_UNITS_CONFIG;
LucCount++)
{
/*
* Update the pointer for the base address of the TAUJ
* unit registers
*/
LpTAUJUnitUserReg = LpTAUJUnitConfig->pTAUJUnitUserCntlRegs;
LpTAUJUnitOsReg = LpTAUJUnitConfig->pTAUJUnitOsCntlRegs;
/* Set the corresponding bits as per the configured Idle state */
LusChannelOutput = (uint8)LpTAUJUnitUserReg->ucTAUJnTO;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
LusChannelOutput &= ((uint8)(~LpTAUJUnitConfig->usTAUChannelMask));
LusChannelOutput |= ((uint8)LpTAUJUnitConfig->usTOMask);
LpTAUJUnitUserReg->ucTAUJnTO = (uint8)LusChannelOutput;
/* Set the Mode (Synchronous/Independent channel operation mode)*/
LpTAUJUnitOsReg->ucTAUJnTOM |= ((uint8)LpTAUJUnitConfig->usTOMMask);
/*
* set the corresponding bits to specify the TOm (channel output bit)
* operation mode.
*/
LpTAUJUnitOsReg->ucTAUJnTOC &=
((uint8)(~LpTAUJUnitConfig->usTAUChannelMask));
/* Set the corresponding bits as per the configured Polarity */
LpTAUJUnitUserReg->ucTAUJnTOL |= ((uint8)LpTAUJUnitConfig->usTOLMask);
/*
* Set the corresponding bits to Enable simultaneous rewrite of
* the data register.
*/
LpTAUJUnitOsReg->ucTAUJnRDE |= (uint8)LpTAUJUnitConfig->usTAUChannelMask;
/* Set the corresponding bits to enable/disable TOm operation */
LpTAUJUnitUserReg->ucTAUJnTOE |= ((uint8)LpTAUJUnitConfig->usTOEMask);
#if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON)
/* Check TAUJ channels configured for Synchronous start */
if(PWM_TAUJ == LpTAUSynchStart->ucTAUUnitType)
{
/*
* Set the channel bits that are not configured for
* synchronous start, to enable the count operation
*/
LpTAUJUnitUserReg->ucTAUJnTS =
((uint8)(LpTAUJUnitConfig->usTAUChannelMask ^ (LusSyncMask &
PWM_SYNCH_TAUJ_MASK)));
LusSyncMask = LusSyncMask >> PWM_FOUR;
}
else
{
/*
* Set the corresponding channel bit to enable the count
* operation
*/
LpTAUJUnitUserReg->ucTAUJnTS =
((uint8)LpTAUJUnitConfig->usTAUChannelMask);
}
#else
/*
* Set the corresponding channel bit to enable the count
* operation
*/
LpTAUJUnitUserReg->ucTAUJnTS =
((uint8)LpTAUJUnitConfig->usTAUChannelMask);
#endif /* #if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON) */
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer for the next TAUJ Unit */
LpTAUJUnitConfig++;
}/* End of TAUJ Units for loop */
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif /* End of (PWM_TAUJ_UNIT_USED == STD_ON) */
#if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON)
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/*
* load the register PIC0SST with 0x01 to start the timers
* synchronously
*/
PWM_SYNCH_START_TRIGGER_REG = PWM_ONE;
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif /* End of (PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON)*/
}
#define PWM_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Pwm_HW_DeInit
**
** Service ID : NA
**
** Description : This is PWM Driver Component support function.
** This function de-initialises all the PWM channels by
** setting to their configured Idle state, disabling the
** notifications, resetting all the registers and
** stopping the PWM mode of operation of corresponding
** timer.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : NA
**
** Remarks : Global Variable(s):
** Pwm_GpTAUAUnitConfig, Pwm_GpTAUJUnitConfig,
** Pwm_GpSynchStartConfig,Pwm_GpChannelConfig,
** Pwm_GpNotifStatus, Pwm_GpChannelIdleStatus
** Function(s) invoked:
** SchM_Enter_Pwm, SchM_Exit_Pwm
*******************************************************************************/
#if (PWM_DE_INIT_API == STD_ON)
#define PWM_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, PWM_PRIVATE_CODE) Pwm_HW_DeInit(void)
{
#if(((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON)))
/* Pointer pointing to the TAUA/TAUB/TAUC Unit configuration */
P2CONST(Tdd_Pwm_TAUABCUnitConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpTAUABCUnitConfig;
/* Pointer pointing to the TAUA/TAUB/TAUC Unit user control registers */
P2VAR(Tdd_Pwm_TAUABCUnitUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCUnitUserReg;
/* Pointer pointing to the TAUA/TAUB/TAUC Unit os control registers */
P2VAR(Tdd_Pwm_TAUABCUnitOsRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCUnitOsReg;
/* Pointer used for TAUA/TAUB/TAUC channel control registers */
P2VAR(Tdd_Pwm_TAUABCChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCChannelReg;
#if(PWM_DELAY_MACRO_SUPPORT == STD_ON)
/* Pointer to the TAUA/TAUB/TAUC Channel Properties structure */
P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCProperties;
#endif
#endif /* #if(((PWM_TAUA_UNIT_USED == STD_ON) || \
(PWM_TAUB_UNIT_USED == STD_ON) || \\
(PWM_TAUC_UNIT_USED == STD_ON))) */
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/* Pointer pointing to the TAUJ Unit configuration */
P2CONST(Tdd_Pwm_TAUJUnitConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpTAUJUnitConfig;
/* Pointer pointing to the TAUJ Unit user control registers */
P2VAR(Tdd_Pwm_TAUJUnitUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUJUnitUserReg;
/* Pointer pointing to the TAUJ Unit os control registers */
P2VAR(Tdd_Pwm_TAUJUnitOsRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUJUnitOsReg;
/* Pointer used for TAUJ channel control registers */
P2VAR(Tdd_Pwm_TAUJChannelUserRegs,AUTOMATIC,PWM_CONFIG_DATA)
LpTAUJChannelReg;
/* Save count from the TAUA/TAUB/TAUC channel loop */
uint8_least LucSaveCount = PWM_ZERO;
#endif
#if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON)
/*
* Pointer pointing to the structure for Synchronous start between
* TAU Units
*/
P2CONST(Tdd_PwmTAUSynchStartUseType, AUTOMATIC, PWM_CONFIG_CONST)
LpTAUSynchStart;
#endif
/* Pointer pointing to the channel configuration */
P2CONST(Tdd_Pwm_ChannelConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpChannelConfig;
uint16 LusChannelOutput;
uint8_least LucCount;
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
/* Update the TAUA/TAUB/TAUC config pointer to point to the current TAU */
LpTAUABCUnitConfig = Pwm_GpTAUABCUnitConfig;
#endif
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/* Update the TAUJ config pointer to point to the current TAUJ */
LpTAUJUnitConfig = Pwm_GpTAUJUnitConfig;
#endif
#if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON)
LpTAUSynchStart = Pwm_GpSynchStartConfig;
#endif
LpChannelConfig = Pwm_GpChannelConfig;
/* Check for TAUA/TAUB/TAUC Units Used*/
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
for(LucCount = PWM_ZERO; LucCount < PWM_TOTAL_TAUABC_UNITS_CONFIG; LucCount++)
{
#if(PWM_DELAY_MACRO_SUPPORT == STD_ON)
if(NULL_PTR != LpTAUABCUnitConfig->pDelayCntlRegs)
{
/*
* Reset the corresponding bits of the Delay control register
* for the channels configured with Delay value
*/
*(LpTAUABCUnitConfig->pDelayCntlRegs) &=
~LpTAUABCUnitConfig->ulDelayEnableMask;
}
else
{
/* For Misra Compliance */
}
#endif /* End of (PWM_DELAY_MACRO_SUPPORT == STD_ON) */
/*
* Update the pointer for the base address of the TAUA/TAUB/TAUC
* unit registers
*/
LpTAUABCUnitUserReg = LpTAUABCUnitConfig->pTAUABCUnitUserCntlRegs;
/*
* Update the pointer for the base address of the TAUA/TAUB/TAUC
* unit registers
*/
LpTAUABCUnitOsReg = LpTAUABCUnitConfig->pTAUABCUnitOsCntlRegs;
/* Set the configured channel bits to disable the count operation */
LpTAUABCUnitUserReg->usTAUABCnTT = LpTAUABCUnitConfig->usTAUChannelMask;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Reset all the configured channels registers */
LpTAUABCUnitOsReg->usTAUABCnTOM &= ~LpTAUABCUnitConfig->usTAUChannelMask;
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON))
/* Check if current unit not belongs to TAUC */
if( PWM_HW_TAUC != LpTAUABCUnitConfig->uiPwmTAUType)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
LpTAUABCUnitOsReg->usTAUABnTOC &= ~LpTAUABCUnitConfig->usTAUChannelMask;
}
else
{
/* For Misra Compliance */
}
#endif
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
LpTAUABCUnitUserReg->usTAUABCnTOL &= ~LpTAUABCUnitConfig->usTAUChannelMask;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
LpTAUABCUnitUserReg->usTAUABCnTOE &= ~LpTAUABCUnitConfig->usTAUChannelMask;
/* Set channel output to its configured Idle state */
LusChannelOutput = LpTAUABCUnitUserReg->usTAUABCnTO;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
LusChannelOutput &= ~LpTAUABCUnitConfig->usTAUChannelMask;
LusChannelOutput |= LpTAUABCUnitConfig->usTOMask;
LpTAUABCUnitUserReg->usTAUABCnTO = LusChannelOutput;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
LpTAUABCUnitOsReg->usTAUABCnRDE &= ~LpTAUABCUnitConfig->usTAUChannelMask;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next TAUA/TAUB/TAUC unit */
LpTAUABCUnitConfig++;
}
/* Loop to reset the attributes of TAUA/TAUB/TAUC channels */
for(LucCount = PWM_ZERO; LucCount < PWM_TOTAL_TAUABC_CHANNELS_CONFIG;
LucCount++)
{
LpTAUABCChannelReg =
(P2VAR(Tdd_Pwm_TAUABCChannelUserRegs, AUTOMATIC, PWM_CONFIG_CONST))
LpChannelConfig->pCntlRegs;
#if(PWM_DELAY_MACRO_SUPPORT == STD_ON)
LpTAUABCProperties =
(P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_CONST))
LpChannelConfig->pChannelProp;
/* Load the Delay value in to the Delay Compare register */
if(NULL_PTR != LpTAUABCProperties->pDlyCompRegs)
{
/* Reset the Delay compare register of the Delay Macro */
*(LpTAUABCProperties->pDlyCompRegs) = PWM_RESET_WORD;
}
else
{
/* For Misra Compliance */
}
#endif /* End of (PWM_DELAY_MACRO_SUPPORT == STD_ON) */
/* Reset the CMORm register of the configured channel*/
*LpChannelConfig->pCMORRegs = PWM_RESET_WORD;
/* Reset the CDRm register of the configured channel */
LpTAUABCChannelReg->usTAUABCnCDRm = PWM_RESET_WORD;
#if(PWM_NOTIFICATION_SUPPORTED == STD_ON)
/* Check the Notification is configured for the current channel */
if(PWM_NO_CBK_CONFIGURED != LpChannelConfig->ucNotificationConfig)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disabling the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlRegs) |= \
~(LpChannelConfig->ucImrMaskValue);
}
else
{
/* For Misra Compliance */
}
/* CDR Notification status of this channel to PWM_FALSE */
Pwm_GpNotifStatus[LucCount] = PWM_FALSE;
#endif
/* Set the Idle state status of this channel as PWM_TRUE */
Pwm_GpChannelIdleStatus[LucCount] = PWM_TRUE;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next channel */
LpChannelConfig++;
}/* End of TAUA/TAUB/TAUC Channels 'for' loop */
#if(PWM_TAUJ_UNIT_USED == STD_ON)
LucSaveCount = LucCount;
#endif
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif /* End of ((PWM_TAUA_UNIT_USED == STD_ON) ||
(PWM_TAUB_UNIT_USED == STD_ON) ||
(PWM_TAUC_UNIT_USED == STD_ON))) */
/* check for TAUJ Units Used*/
#if(PWM_TAUJ_UNIT_USED == STD_ON)
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
for(LucCount = PWM_ZERO; LucCount < PWM_TOTAL_TAUJ_UNITS_CONFIG;
LucCount++)
{
/* Update pointer for the base address of the TAUJ unit registers */
LpTAUJUnitUserReg = LpTAUJUnitConfig->pTAUJUnitUserCntlRegs;
LpTAUJUnitOsReg = LpTAUJUnitConfig->pTAUJUnitOsCntlRegs;
/* Set the configured channel bits to disable the count operation */
LpTAUJUnitUserReg->ucTAUJnTT =
((uint8)(LpTAUJUnitConfig->usTAUChannelMask));
/* Reset all the configured channels registers */
LpTAUJUnitOsReg->ucTAUJnTOM &=
((uint8)(~LpTAUJUnitConfig->usTAUChannelMask));
LpTAUJUnitOsReg->ucTAUJnTOC &=
((uint8)(~LpTAUJUnitConfig->usTAUChannelMask));
LpTAUJUnitUserReg->ucTAUJnTOL &=
((uint8)(~LpTAUJUnitConfig->usTAUChannelMask));
LpTAUJUnitUserReg->ucTAUJnTOE &=
((uint8)(~LpTAUJUnitConfig->usTAUChannelMask));
/* Set channel output to its configured Idle state */
LusChannelOutput = (uint8)LpTAUJUnitUserReg->ucTAUJnTO;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
LusChannelOutput &= ((uint8)(~LpTAUJUnitConfig->usTAUChannelMask));
LusChannelOutput |= ((uint8)LpTAUJUnitConfig->usTOMask);
LpTAUJUnitUserReg->ucTAUJnTO = (uint8)LusChannelOutput;
LpTAUJUnitOsReg->ucTAUJnRDE &=
((uint8)(~LpTAUJUnitConfig->usTAUChannelMask));
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to next TAUJ unit */
LpTAUJUnitConfig++;
}/* End of TAUJ units 'for' loop */
for(LucCount = PWM_ZERO; LucCount < PWM_TOTAL_TAUJ_CHANNELS_CONFIG;
LucCount++)
{
LpTAUJChannelReg =
(P2VAR(Tdd_Pwm_TAUJChannelUserRegs, AUTOMATIC, PWM_CONFIG_CONST))
LpChannelConfig->pCntlRegs;
/* Reset the CMORm register of the configured channel*/
*LpChannelConfig->pCMORRegs = PWM_RESET_WORD;
/* Reset the CDRm register of the configured channel */
LpTAUJChannelReg->ulTAUJnCDRm = PWM_RESET_LONG_WORD;
#if(PWM_NOTIFICATION_SUPPORTED == STD_ON)
/* Check the Notification is configured for the current channel */
if (PWM_NO_CBK_CONFIGURED != LpChannelConfig->ucNotificationConfig)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disabling the Interrupt processing */
*(LpChannelConfig->pImrIntrCntlRegs) |= \
~(LpChannelConfig->ucImrMaskValue);
}
else
{
/* For Misra Compliance */
}
/* Reset CDR Notification status of this channel */
Pwm_GpNotifStatus[LucSaveCount] = PWM_FALSE;
#endif
/* Set the Idle state status of this channel as PWM_TRUE */
Pwm_GpChannelIdleStatus[LucSaveCount] = PWM_TRUE;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next channel */
LpChannelConfig++;
LucSaveCount++;
}/* End of TAUJ channels 'for' loop */
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif /* End of (PWM_TAUJ_UNIT_USED == STD_ON) */
#if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON)
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
for(LucCount = PWM_ZERO; LucCount < PWM_TOTAL_UNITS_FOR_SYNCHSTART;
LucCount++)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Reset synchronous start between TAU Units */
*(LpTAUSynchStart->pPICCntlRegs) &= ~LpTAUSynchStart->usSyncTAUMask;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpTAUSynchStart++;
}
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif /* End of (PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON) */
}
#define PWM_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* End of (PWM_DE_INIT_API == STD_ON) */
/*******************************************************************************
** Function Name : Pwm_HW_SetDutyCycle
**
** Service ID : NA
**
** Description : This is PWM Driver Component support function.
** This function updates the duty cycle counter value in
** the hardware registers.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : LddChannelId, LusDutyCycle
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : NA
**
** Remarks : Global Variable(s):
** Pwm_GpTAUAUnitConfig, Pwm_GpTAUJUnitConfig,
** Pwm_GpChannelConfig,Pwm_GpChannelIdleStatus
** Function(s) invoked:
** Pwm_HW_SetDuty_FixedPeriodShifted,
** SchM_Enter_Pwm, SchM_Exit_Pwm
*******************************************************************************/
#if (PWM_SET_DUTY_CYCLE_API == STD_ON)
#define PWM_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, PWM_PRIVATE_CODE) Pwm_HW_SetDutyCycle
(Pwm_ChannelType LddChannelId, uint16 LusDutyCycle)
{
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
/* Pointer pointing to the TAUA/TAUB/TAUC Unit configuration */
P2CONST(Tdd_Pwm_TAUABCUnitConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpTAUABCUnitConfig;
/* Pointer pointing to the TAUA/TAUB/TAUC Unit control registers */
P2VAR(Tdd_Pwm_TAUABCUnitUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCUnitUserReg;
/* Pointer used for TAUA/TAUB/TAUC channel control registers */
P2VAR(Tdd_Pwm_TAUABCChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCChannelReg;
/* Pointer to the TAUA/TAUB/TAUC Channel Properties structure */
P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCProperties;
#endif
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/* Pointer pointing to the TAUJ Unit configuration */
P2CONST(Tdd_Pwm_TAUJUnitConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpTAUJUnitConfig;
/* Pointer pointing to the TAUJ Unit control registers */
P2VAR(Tdd_Pwm_TAUJUnitUserRegs, AUTOMATIC, PWM_CONFIG_CONST)
LpTAUJUnitUserReg;
/* Pointer used for TAUJ channel control registers */
P2VAR(Tdd_Pwm_TAUJChannelUserRegs, AUTOMATIC, PWM_CONFIG_CONST)
LpTAUJChannelReg;
/* Pointer to the TAUJ Channel Properties structure */
P2VAR(Tdd_Pwm_TAUJProperties, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUJProperties;
#endif
/* Pointer pointing to the channel configuration */
P2CONST(Tdd_Pwm_ChannelConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpChannelConfig;
Pwm_PeriodType LddMasterPeriod;
uint8 LucVar;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Initialise a pointer to the channel configuration */
LpChannelConfig = Pwm_GpChannelConfig + LddChannelId;
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON))
/* Check for the channel Class Type */
if(PWM_FIXED_PERIOD_SHIFTED == LpChannelConfig->enClassType)
{
/*
* Set Duty cycle for the required channel in FixedPeriodShifted
* Class Type
*/
Pwm_HW_SetDuty_FixedPeriodShifted(LddChannelId, LusDutyCycle);
}
else
#endif
{
/* Check for the channel in Master Mode */
if(PWM_MASTER_CHANNEL == LpChannelConfig->uiTimerMode)
{
#if(((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON)) && (PWM_TAUJ_UNIT_USED == STD_ON))
/* Check whether the channel belongs to TAUA/TAUB/TAUC */
if((PWM_HW_TAUA == LpChannelConfig->uiPwmTAUType) ||
(PWM_HW_TAUB == LpChannelConfig->uiPwmTAUType) ||
(PWM_HW_TAUC == LpChannelConfig->uiPwmTAUType))
#endif
{
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) \
|| (PWM_TAUC_UNIT_USED == STD_ON))
/*
* Initialise a pointer to the Master's control register
* configuration of TAUA/TAUB/TAUC
*/
LpTAUABCChannelReg =
(P2VAR(Tdd_Pwm_TAUABCChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA))
(LpChannelConfig->pCntlRegs);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Fetch the pointer to the current TAUA/TAUB/TAUC Unit config */
LpTAUABCUnitConfig = Pwm_GpTAUABCUnitConfig +
LpChannelConfig->ucTimerUnitIndex;
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUA/TAUB/TAUC channel properties */
LpTAUABCProperties =
(P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
/* Fetch the pointer to the current TAUA/TAUB/TAUC Unit Registers */
LpTAUABCUnitUserReg = LpTAUABCUnitConfig->pTAUABCUnitUserCntlRegs;
/* Get the master's period */
LddMasterPeriod = LpTAUABCChannelReg->usTAUABCnCDRm;
/* Get the TAU Type in to the local variable */
LucVar = LpChannelConfig->uiPwmTAUType;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the slave channel */
LpChannelConfig++;
/* Increment the channel Id*/
LddChannelId++;
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
while(LddChannelId < PWM_TOTAL_TAUABC_CHANNELS_CONFIG)
{
if(LpChannelConfig->uiTimerMode != PWM_MASTER_CHANNEL)
{
/*
* Initialise a pointer to the slave's control register
* configuration of TAUA/TAUB/TAUC
*/
LpTAUABCChannelReg = (P2VAR(Tdd_Pwm_TAUABCChannelUserRegs,
AUTOMATIC, PWM_CONFIG_DATA))(LpChannelConfig->pCntlRegs);
/* Check whether the channel is set to its Idle state */
if(PWM_TRUE == Pwm_GpChannelIdleStatus[LddChannelId])
{
/* Stop the counter operation */
LpTAUABCUnitUserReg->usTAUABCnTT =
LpTAUABCProperties->usChannelMask;
/* Enable the output of the current channel */
LpTAUABCUnitUserReg->usTAUABCnTOE |=
LpTAUABCProperties->usChannelMask;
/* Restart the counter operation */
LpTAUABCUnitUserReg->usTAUABCnTS =
LpTAUABCProperties->usChannelMask;
/* Set the Idle state of the channel to PWM_FALSE */
Pwm_GpChannelIdleStatus[LddChannelId] = PWM_FALSE;
}
/* Load the Absolute duty value in to the CDR Register */
LpTAUABCChannelReg->usTAUABCnCDRm =
(uint16)Pwm_HW_CalculateDuty(LddMasterPeriod, LusDutyCycle, LucVar);
/*
* Set the corresponding channel Trigger bit to specifies
* the channel for which simultaneous rewrite is executed
*/
LpTAUABCUnitUserReg->usTAUABCnRDT =
LpTAUABCProperties->usChannelMask;
/* Increment the channel Id */
LddChannelId++;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next channel */
LpChannelConfig++;
}
else
{
break;
}
}
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif /* End of (((PWM_TAUA_UNIT_USED == STD_ON) ||
(PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
&& (PWM_TAUJ_UNIT_USED == STD_ON)) */
}/* End of if((LpChannelConfig->uiPwmTAUType == PWM_HW_TAUA) ||
(LpChannelConfig->uiPwmTAUType == PWM_HW_TAUB) ||
(LpChannelConfig->uiPwmTAUType == PWM_HW_TAUC)) */
#if(((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON)) && (PWM_TAUJ_UNIT_USED == STD_ON))
else
#endif
{
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/*
* Initialise a pointer to the Master's control register
* configuration of TAUJ
*/
LpTAUJChannelReg =
(P2VAR(Tdd_Pwm_TAUJChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA))
(LpChannelConfig->pCntlRegs);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Fetch the pointer to the current TAUJ Unit config */
LpTAUJUnitConfig = Pwm_GpTAUJUnitConfig +
LpChannelConfig->ucTimerUnitIndex;
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUJ channel properties */
LpTAUJProperties =
(P2VAR(Tdd_Pwm_TAUJProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
/* Fetch the pointer to the current TAUJ Unit Registers */
LpTAUJUnitUserReg = LpTAUJUnitConfig->pTAUJUnitUserCntlRegs;
/* Get the master's period */
LddMasterPeriod = LpTAUJChannelReg->ulTAUJnCDRm;
/* Get the TAU Type in to the local variable */
LucVar = LpChannelConfig->uiPwmTAUType;
/* Increment the channel Id */
LddChannelId++;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next channel */
LpChannelConfig++;
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
while(LddChannelId < PWM_TOTAL_CHANNELS_CONFIGURED)
{
if(LpChannelConfig->uiTimerMode != PWM_MASTER_CHANNEL)
{
/* Initialise a pointer to the slave's control register
* configuration of TAUJ
*/
LpTAUJChannelReg = (P2VAR(Tdd_Pwm_TAUJChannelUserRegs,
AUTOMATIC, PWM_CONFIG_DATA)) (LpChannelConfig->pCntlRegs);
/* Check whether the channel is set to its Idle state */
if (PWM_TRUE == Pwm_GpChannelIdleStatus[LddChannelId])
{
/* Stop the counter operation */
LpTAUJUnitUserReg->ucTAUJnTT = LpTAUJProperties->ucChannelMask;
/* Enable the output of the current channel */
LpTAUJUnitUserReg->ucTAUJnTOE |= LpTAUJProperties->ucChannelMask;
/* Restart the counter operation */
LpTAUJUnitUserReg->ucTAUJnTS = LpTAUJProperties->ucChannelMask;
/* Set the Idle state of the channel to PWM_FALSE */
Pwm_GpChannelIdleStatus[LddChannelId] = PWM_FALSE;
}
else
{
/* For Misra Compliance */
}
LpTAUJChannelReg->ulTAUJnCDRm = \
Pwm_HW_CalculateDuty(LddMasterPeriod, LusDutyCycle, LucVar);
/*
* Set the corresponding channel Trigger bit to specifies
* the channel for which simultaneous rewrite is executed
*/
LpTAUJUnitUserReg->ucTAUJnRDT = LpTAUJProperties->ucChannelMask;
/* Increment the channel Id */
LddChannelId++;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next channel */
LpChannelConfig++;
}
else
{
break;
}
}
/* End of TAUJ Slave Channels */
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif /* End of (PWM_TAUJ_UNIT_USED == STD_ON)*/
}/* End of TAUJ Unit type*/
}/* End of if(LpChannelConfig->uiTimerMode == PWM_MASTER_CHANNEL)*/
/* Channel is slave */
else
{
#if(((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON)) && (PWM_TAUJ_UNIT_USED == STD_ON))
/* Check whether the channel belongs to TAUA/TAUB/TAUC */
if((PWM_HW_TAUA == LpChannelConfig->uiPwmTAUType) ||
(PWM_HW_TAUB == LpChannelConfig->uiPwmTAUType) ||
(PWM_HW_TAUC == LpChannelConfig->uiPwmTAUType))
#endif
{
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) \
|| (PWM_TAUC_UNIT_USED == STD_ON))
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Fetch the pointer to the current TAUA/TAUB/TAUC Unit config */
LpTAUABCUnitConfig = Pwm_GpTAUABCUnitConfig +
LpChannelConfig->ucTimerUnitIndex;
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUA/TAUB/TAUC channel properties */
LpTAUABCProperties =
(P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
/* Fetch the pointer to the current TAUA/TAUB/TAUC Unit Registers */
LpTAUABCUnitUserReg = LpTAUABCUnitConfig->pTAUABCUnitUserCntlRegs;
/* Get the offset of the Master from the slave channel */
LucVar = LpChannelConfig->ucMasterOffset;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/*
* Initialise a pointer to the Master's control register
* configuration of TAUA/TAUB/TAUC
*/
LpTAUABCChannelReg =
(P2VAR(Tdd_Pwm_TAUABCChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA))
((LpChannelConfig-LucVar)->pCntlRegs);
/* Get the master's period */
LddMasterPeriod = LpTAUABCChannelReg->usTAUABCnCDRm;
/* Get the TAU Type in to the local variable */
LucVar = LpChannelConfig->uiPwmTAUType;
/*
* Initialise a pointer to the slave's control register
* configuration of TAUA/TAUB/TAUC
*/
LpTAUABCChannelReg =
(P2VAR(Tdd_Pwm_TAUABCChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA))
(LpChannelConfig->pCntlRegs);
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* Check whether the channel is set to its Idle state */
if(PWM_TRUE == Pwm_GpChannelIdleStatus[LddChannelId])
{
/* Stop the counter operation */
LpTAUABCUnitUserReg->usTAUABCnTT =
LpTAUABCProperties->usChannelMask;
/* Enable the output of the current channel */
LpTAUABCUnitUserReg->usTAUABCnTOE |=
LpTAUABCProperties->usChannelMask;
/* Restart the counter operation */
LpTAUABCUnitUserReg->usTAUABCnTS =
LpTAUABCProperties->usChannelMask;
/* Set the Idle state of the channel to PWM_FALSE */
Pwm_GpChannelIdleStatus[LddChannelId] = PWM_FALSE;
}
else
{
/* For Misra Compliance */
}
/* Load the Absolute duty value in to the CDR Register */
LpTAUABCChannelReg->usTAUABCnCDRm = (uint16)
Pwm_HW_CalculateDuty(LddMasterPeriod, LusDutyCycle, LucVar);
/*
* Set the corresponding channel Trigger bit to specifies the
* channel for which simultaneous rewrite is executed
*/
LpTAUABCUnitUserReg->usTAUABCnRDT = LpTAUABCProperties->usChannelMask;
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif /* End of ((PWM_TAUA_UNIT_USED == STD_ON) ||
(PWM_TAUB_UNIT_USED == STD_ON) ||
(PWM_TAUC_UNIT_USED == STD_ON)) */
}/* End of ((LpChannelConfig->uiPwmTAUType == PWM_HW_TAUA) ||
(LpChannelConfig->uiPwmTAUType == PWM_HW_TAUB) ||
(LpChannelConfig->uiPwmTAUType == PWM_HW_TAUC)) */
#if(((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON)) && (PWM_TAUJ_UNIT_USED == STD_ON))
/* channel belongs to TAUJ */
else
#endif
{
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Fetch the pointer to the current TAUJ Unit config */
LpTAUJUnitConfig = Pwm_GpTAUJUnitConfig +
LpChannelConfig->ucTimerUnitIndex;
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUJ channel properties */
LpTAUJProperties =
(P2VAR(Tdd_Pwm_TAUJProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
/* Fetch the pointer to the current TAUJ Unit Registers */
LpTAUJUnitUserReg = LpTAUJUnitConfig->pTAUJUnitUserCntlRegs;
/* Get the offset of the Master from the slave channel */
LucVar = LpChannelConfig->ucMasterOffset;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/*
* Initialise a pointer to the Master's control register
* configuration of TAUJ
*/
LpTAUJChannelReg =
(P2VAR(Tdd_Pwm_TAUJChannelUserRegs,AUTOMATIC, PWM_CONFIG_DATA))
((LpChannelConfig-LucVar)->pCntlRegs);
/* Get the master's period */
LddMasterPeriod = LpTAUJChannelReg->ulTAUJnCDRm;
/* Get the TAU Type in to the local variable */
LucVar = LpChannelConfig->uiPwmTAUType;
/*
* Initialise a pointer to the slave's control register
* configuration of TAUJ
*/
LpTAUJChannelReg =
(P2VAR(Tdd_Pwm_TAUJChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA))
(LpChannelConfig->pCntlRegs);
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* Check whether the channel is set to its Idle state */
if(PWM_TRUE == Pwm_GpChannelIdleStatus[LddChannelId])
{
/* Stop the counter operation */
LpTAUJUnitUserReg->ucTAUJnTT = LpTAUJProperties->ucChannelMask;
/* Enable the output of the current channel */
LpTAUJUnitUserReg->ucTAUJnTOE |= LpTAUJProperties->ucChannelMask;
/* Restart the counter operation */
LpTAUJUnitUserReg->ucTAUJnTS = LpTAUJProperties->ucChannelMask;
/* Set the Idle state of the channel to PWM_FALSE */
Pwm_GpChannelIdleStatus[LddChannelId] = PWM_FALSE;
}
else
{
/* For Misra Compliance */
}
/* Load the Absolute Duty in to the CDR register */
LpTAUJChannelReg->ulTAUJnCDRm =
Pwm_HW_CalculateDuty(LddMasterPeriod, LusDutyCycle, LucVar);
/*
* Set the corresponding channel Trigger bit to specifies the
* channel for which simultaneous rewrite is executed
*/
LpTAUJUnitUserReg->ucTAUJnRDT = LpTAUJProperties->ucChannelMask;
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif/* End of (PWM_TAUJ_UNIT_USED == STD_ON) */
}/* End of TAUJ Unit type */
}/* End of the Slave channel */
}/* End of Variable and Fixed Period Class Type */
}
#define PWM_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* End of (PWM_SET_DUTY_CYCLE_API == STD_ON) */
/*******************************************************************************
** Function Name : Pwm_HW_SetDuty_FixedPeriodShifted
**
** Service ID : NA
**
** Description : This is PWM Driver Component support function.
** This function updates the duty cycle for
** FixedPeriodShifted ClassType channels of TAUA Units.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : LddChannelId, LusDutyCycle
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : NA
**
** Remarks : Global Variable(s):
** Pwm_GpTAUAUnitConfig, Pwm_GpChannelConfig,
** Pwm_GpChannelIdleStatus
** Function(s) invoked:
** SchM_Enter_Pwm, SchM_Exit_Pwm
*******************************************************************************/
#if ((PWM_SET_DUTY_CYCLE_API == STD_ON) && ((PWM_TAUA_UNIT_USED == STD_ON) || \
(PWM_TAUB_UNIT_USED == STD_ON)))
#define PWM_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC (void, PWM_PRIVATE_CODE) Pwm_HW_SetDuty_FixedPeriodShifted
(Pwm_ChannelType LddChannelId, uint16 LusDutyCycle)
{
/* Pointer pointing to the TAUA/TAUB Unit configuration */
P2CONST(Tdd_Pwm_TAUABCUnitConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpTAUABUnitConfig;
/* Pointer pointing to the TAUA/TAUB Unit control registers */
P2VAR(Tdd_Pwm_TAUABCUnitUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABUnitUserReg;
/* Pointer used for TAUA/TAUB channel control registers */
P2VAR(Tdd_Pwm_TAUABCChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABChannelReg;
/* Pointer pointing to the channel configuration */
P2CONST(Tdd_Pwm_ChannelConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpChannelConfig;
/* Pointer to the TAUA/TAUB/TAUC Channel Properties structure */
P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCProperties;
Pwm_PeriodType LddMasterPeriod;
uint16 LusChannelMask;
uint8_least LucCount;
uint8 LucVar;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Initialise a pointer to the channel configuration */
LpChannelConfig = Pwm_GpChannelConfig + LddChannelId;
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUA/TAUB/TAUC channel properties */
LpTAUABCProperties =
(P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
/* Check whether the channel in Master mode */
if(PWM_MASTER_CHANNEL == LpChannelConfig->uiTimerMode)
{
/* Get the channel mask for the particular channel */
LusChannelMask = LpTAUABCProperties->usChannelMask;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Fetch the pointer to the current TAUA/TAUB Unit config */
LpTAUABUnitConfig = Pwm_GpTAUABCUnitConfig +
LpChannelConfig->ucTimerUnitIndex;
/* Fetch the pointer to the current TAUA/TAUB Unit Registers */
LpTAUABUnitUserReg = LpTAUABUnitConfig->pTAUABCUnitUserCntlRegs;
/*
* Initialise a pointer to the Master's control register
* configuration of TAUA/TAUB
*/
LpTAUABChannelReg =
(P2VAR(Tdd_Pwm_TAUABCChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA))
(LpChannelConfig->pCntlRegs);
/* Get the master's period */
LddMasterPeriod = LpTAUABChannelReg->usTAUABCnCDRm;
/* Get the TAU Type in to the local variable */
LucVar = LpChannelConfig->uiPwmTAUType;
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
for(LucCount = PWM_ONE; LucCount <= PWM_THREE; LucCount++)
{
/* Increment the channel Id */
LddChannelId++;
/* Check whether LddChannelId is valid */
if(LddChannelId < PWM_TOTAL_TAUABC_CHANNELS_CONFIG)
{
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the channel for the next channel */
LpChannelConfig++;
/*
* Initialise a pointer to the slave's control register
* configuration of TAUA/TAUB
*/
LpTAUABChannelReg =
(P2VAR(Tdd_Pwm_TAUABCChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA))
(LpChannelConfig->pCntlRegs);
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUA/TAUB/TAUC channel properties */
LpTAUABCProperties =
(P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
/* Check for the Slave1 and Slave3 channels */
if((LucCount == PWM_ONE) || (LucCount == PWM_THREE))
{
/* Check whether the channel is set to its Idle state */
if(Pwm_GpChannelIdleStatus[LddChannelId] == PWM_TRUE)
{
/* Stop the counter operation */
LpTAUABUnitUserReg->usTAUABCnTT = \
LpTAUABCProperties->usChannelMask;
/* Enable the output of the current channel */
LpTAUABUnitUserReg->usTAUABCnTOE |= \
LpTAUABCProperties->usChannelMask;
/* Restart the counter operation */
LpTAUABUnitUserReg->usTAUABCnTS = \
LpTAUABCProperties->usChannelMask;
/* Set the Idle state of the channel to PWM_FALSE */
Pwm_GpChannelIdleStatus[LddChannelId] = PWM_FALSE;
}
}
/* Load the Absolute duty value in to the CDR Register */
LpTAUABChannelReg->usTAUABCnCDRm = (uint16)
Pwm_HW_CalculateDuty(LddMasterPeriod, LusDutyCycle, LucVar);
}
else
{
/* Invalid channel, exit to avoid invalid access*/
break;
}
}
/*
* Set the corresponding channel Trigger bit to specifies the
* channel for which simultaneous rewrite is executed
*/
LpTAUABUnitUserReg->usTAUABCnRDT = LusChannelMask;
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
}/* End of if(LpChannelConfig->uiTimerMode == PWM_MASTER_CHANNEL) */
else
{
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/*
* Initialise a pointer to the Master's control register
* configuration of TAUA/TAUB
*/
LpTAUABChannelReg =
(P2VAR(Tdd_Pwm_TAUABCChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA))
((LpChannelConfig-(LpChannelConfig->ucMasterOffset))->pCntlRegs);
/* Get the master's period */
LddMasterPeriod = LpTAUABChannelReg->usTAUABCnCDRm;
/* Get the TAU Type in to the local variable */
LucVar = LpChannelConfig->uiPwmTAUType;
/*
* Initialise a pointer to the slave's control register
* configuration of TAUA/TAUB
*/
LpTAUABChannelReg =
(P2VAR(Tdd_Pwm_TAUABCChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA))
(LpChannelConfig->pCntlRegs);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Fetch the pointer to the current TAUA/TAUB Unit config */
LpTAUABUnitConfig = Pwm_GpTAUABCUnitConfig +
LpChannelConfig->ucTimerUnitIndex;
/* Fetch the pointer to the current TAUA/TAUB Unit Registers */
LpTAUABUnitUserReg = LpTAUABUnitConfig->pTAUABCUnitUserCntlRegs;
/* Get the masters channel ID*/
LddChannelId -= LpChannelConfig->ucMasterOffset;
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Get the Master channel config pointer*/
LpChannelConfig = LpChannelConfig-LpChannelConfig->ucMasterOffset;
/* Get the channel mask from the channel configuration */
LusChannelMask = LpTAUABCProperties->usChannelMask;
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/*
* Loop to set salve 1 and salve 2 of the particular Master for the
* 3 consecutive channels configured in fixed period shifted classtype
*/
for(LucCount = PWM_ONE; LucCount <= PWM_THREE; LucCount++)
{
/* Increment the channel Id */
LddChannelId++;
/* Check whether LddChannelId is valid */
if(LddChannelId < PWM_TOTAL_TAUABC_CHANNELS_CONFIG)
{
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next channel */
LpChannelConfig++;
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUA/TAUB/TAUC channel properties */
LpTAUABCProperties =
(P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
/* Check for Salve 1 or Slave 3 of the Master */
if((LucCount == PWM_ONE) || (LucCount == PWM_THREE))
{
/* Check whether the channel is set to its Idle state */
if(Pwm_GpChannelIdleStatus[LddChannelId] == PWM_TRUE)
{
/* Stop the counter operation */
LpTAUABUnitUserReg->usTAUABCnTT = LpTAUABCProperties->usChannelMask;
/* Enable the output of the current channel */
LpTAUABUnitUserReg->usTAUABCnTOE |= \
LpTAUABCProperties->usChannelMask;
/* Restart the counter operation */
LpTAUABUnitUserReg->usTAUABCnTS = LpTAUABCProperties->usChannelMask;
/* Set the Idle state of the channel to PWM_FALSE */
Pwm_GpChannelIdleStatus[LddChannelId] = PWM_FALSE;
}
}
}
else
{
/* Invalid channel, exit to avoid invalid access*/
break;
}
}
/* Load the Absolute duty value in to the CDR Register */
LpTAUABChannelReg->usTAUABCnCDRm = (uint16)
Pwm_HW_CalculateDuty(LddMasterPeriod, LusDutyCycle, LucVar);
/*
* Set the corresponding channel Trigger bit to specifies the
* channel for which simultaneous rewrite is executed
*/
LpTAUABUnitUserReg->usTAUABCnRDT = LusChannelMask;
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
}/* End of the channel in slave Mode */
}
#define PWM_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* End of ((PWM_SET_DUTY_CYCLE_API == STD_ON) &&
((PWM_TAUA_UNIT_USED == STD_ON) || \
(PWM_TAUB_UNIT_USED == STD_ON))) */
/*******************************************************************************
** Function Name : Pwm_HW_SetPeriodAndDuty
**
** Service ID : NA
**
** Description : This is PWM Driver Component support function.
** This function updates the Period and Duty cycle
** counter value in the hardware registers.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : LddChannelId, LddPeriod, LusDutyCycle
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : NA
**
** Remarks : Global Variable(s):
** Pwm_GpTAUAUnitConfig, Pwm_GpTAUJUnitConfig,
** Pwm_GpChannelConfig, Pwm_GpChannelIdleStatus
** Function(s) invoked:
** Pwm_HW_SetDutyCycle,
** SchM_Enter_Pwm, SchM_Exit_Pwm
*******************************************************************************/
#if (PWM_SET_PERIOD_AND_DUTY_API == STD_ON)
#define PWM_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, PWM_PRIVATE_CODE) Pwm_HW_SetPeriodAndDuty
(Pwm_ChannelType LddChannelId, Pwm_PeriodType LddPeriod, uint16 LusDutyCycle)
{
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
/* Pointer pointing to the TAUA/TAUB/TAUC Unit configuration */
P2CONST(Tdd_Pwm_TAUABCUnitConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpTAUABCUnitConfig;
/* Pointer pointing to the TAUA/TAUB/TAUC Unit user control registers */
P2VAR(Tdd_Pwm_TAUABCUnitUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCUnitUserReg;
/* Pointer used for TAUA/TAUB/TAUC channel control registers */
P2VAR(Tdd_Pwm_TAUABCChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCChannelReg;
/* Pointer to the TAUA/TAUB/TAUC Channel Properties structure */
P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCProperties;
#endif
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/* Pointer pointing to the TAUJ Unit configuration */
P2CONST(Tdd_Pwm_TAUJUnitConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpTAUJUnitConfig;
/* Pointer pointing to the TAUJ Unit control registers */
P2VAR(Tdd_Pwm_TAUJUnitUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUJUnitUserReg;
/* Pointer used for TAUJ channel control registers */
P2VAR(Tdd_Pwm_TAUJChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUJChannelReg;
/* Pointer to the TAUJ Channel Properties structure */
P2VAR(Tdd_Pwm_TAUJProperties, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUJProperties;
#endif
/* Pointer pointing to the channel configuration */
P2CONST(Tdd_Pwm_ChannelConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpChannelConfig;
uint16 LusMasterChannelMask;
uint8 LucVar;
/* MISRA Rule : 17.4 */
/* Message : Array indexing shall be the only allowed */
/* form of pointer arithmetic. */
/* Reason : To access the channel parameters */
/* Verification : However, part of the code */
/* is verified manually and */
/* it is not having any impact. */
LpChannelConfig = Pwm_GpChannelConfig + LddChannelId;
/*
* Set the period if the channel is master and
* set the duty of all the slaves of that master
*/
if(PWM_MASTER_CHANNEL == LpChannelConfig->uiTimerMode)
{
#if(((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON)) && (PWM_TAUJ_UNIT_USED == STD_ON))
/* Check whether the channel belongs to TAUA/TAUB/TAUC */
if((PWM_HW_TAUA == LpChannelConfig->uiPwmTAUType) ||
(PWM_HW_TAUB == LpChannelConfig->uiPwmTAUType) ||
(PWM_HW_TAUC == LpChannelConfig->uiPwmTAUType))
#endif
{
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
/*
* Initialise a pointer to the control register
* configuration of TAUA/TAUB/TAUC
*/
LpTAUABCChannelReg =
(P2VAR(Tdd_Pwm_TAUABCChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA))
(LpChannelConfig->pCntlRegs);
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Fetch the pointer to the current TAUA/TAUB/TAUC Unit config */
LpTAUABCUnitConfig = Pwm_GpTAUABCUnitConfig +
LpChannelConfig->ucTimerUnitIndex;
/* Fetch the pointer to the current TAUA/TAUB/TAUC Unit Registers */
LpTAUABCUnitUserReg = LpTAUABCUnitConfig->pTAUABCUnitUserCntlRegs;
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUA/TAUB/TAUC channel properties */
LpTAUABCProperties =
(P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
/* Get the TAU Type in to the local variable */
LucVar = LpChannelConfig->uiPwmTAUType;
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* Decrement the period value */
LddPeriod--;
/* Load the period value in to the CDR register of the
* master channel
*/
LpTAUABCChannelReg->usTAUABCnCDRm = (uint16)LddPeriod;
/* Get the Channel Mask of the Master channel for RDT register */
LusMasterChannelMask = LpTAUABCProperties->usChannelMask;
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* Increment the channel Id */
LddChannelId++;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next channel*/
LpChannelConfig++;
while(LddChannelId < PWM_TOTAL_TAUABC_CHANNELS_CONFIG)
{
if(LpChannelConfig->uiTimerMode != PWM_MASTER_CHANNEL)
{
/*
* Initialise a pointer to the slave's control register
* configuration of TAUA/TAUB/TAUC
*/
LpTAUABCChannelReg =
(P2VAR(Tdd_Pwm_TAUABCChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA))
(LpChannelConfig->pCntlRegs);
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUA/TAUB/TAUC channel properties */
LpTAUABCProperties =
(P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* Check whether the channel is set to its Idle state */
if(Pwm_GpChannelIdleStatus[LddChannelId] == PWM_TRUE)
{
/* Stop the counter operation */
LpTAUABCUnitUserReg->usTAUABCnTT =
LpTAUABCProperties->usChannelMask;
/* Enable the output of the current channel */
LpTAUABCUnitUserReg->usTAUABCnTOE |=
LpTAUABCProperties->usChannelMask;
/* Restart the counter operation */
LpTAUABCUnitUserReg->usTAUABCnTS =
LpTAUABCProperties->usChannelMask;
/* Set the Idle state of the channel to PWM_FALSE */
Pwm_GpChannelIdleStatus[LddChannelId] = PWM_FALSE;
}
/* Load the Absolute duty value in to the CDR Register */
LpTAUABCChannelReg->usTAUABCnCDRm = (uint16)
Pwm_HW_CalculateDuty(LddPeriod, LusDutyCycle, LucVar);
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* Increment the channel*/
LddChannelId++;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next channel*/
LpChannelConfig++;
}
else
{
break;
}
}
/* End of TAUA/TAUB/TAUC Slave channels */
/*
* Set the corresponding channels Trigger bits to specifies the
* channels for which simultaneous rewrite is executed
*/
LpTAUABCUnitUserReg->usTAUABCnRDT = LusMasterChannelMask;
#endif/* End of ((PWM_TAUA_UNIT_USED == STD_ON) ||
* (PWM_TAUB_UNIT_USED == STD_ON) || (PWM_TAUC_UNIT_USED == STD_ON))
*/
}/* End of if((LpChannelConfig->uiPwmTAUType == PWM_HW_TAUA) ||
(LpChannelConfig->uiPwmTAUType == PWM_HW_TAUB) ||
(LpChannelConfig->uiPwmTAUType == PWM_HW_TAUC)) */
#if(((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON)) && (PWM_TAUJ_UNIT_USED == STD_ON))
/* channel belongs to TAUJ */
else
#endif
{
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/*
* Initialise a pointer to the control register
* configuration of TAUJ
*/
LpTAUJChannelReg =
(P2VAR(Tdd_Pwm_TAUJChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA))
(LpChannelConfig->pCntlRegs);
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUJ channel properties */
LpTAUJProperties =
(P2VAR(Tdd_Pwm_TAUJProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
/* MISRA Rule : 17.4 */
/* Message : Array indexing shall be the only */
/* allowed form of pointer arithmetic. */
/* Reason : To access the channel parameters */
/* Verification : However, part of the code */
/* is verified manually and */
/* it is not having any impact. */
/* Fetch the pointer to the current TAUJ Unit config */
LpTAUJUnitConfig = Pwm_GpTAUJUnitConfig +
LpChannelConfig->ucTimerUnitIndex;
/* Fetch the pointer to the current TAUJ Unit Registers */
LpTAUJUnitUserReg = LpTAUJUnitConfig->pTAUJUnitUserCntlRegs;
/* Get the TAU Type in to the local variable */
LucVar = LpChannelConfig->uiPwmTAUType;
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* Decrement the period value */
LddPeriod--;
/*
* Load the period value in to the CDR register of the
* master channel
*/
LpTAUJChannelReg->ulTAUJnCDRm = LddPeriod;
/* Get the Channel Mask of the Master channel for RDT register */
LusMasterChannelMask = (uint16)LpTAUJProperties->ucChannelMask;
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* Increment the channel Id */
LddChannelId++;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next channel*/
LpChannelConfig++;
while(LddChannelId < PWM_TOTAL_CHANNELS_CONFIGURED)
{
if(LpChannelConfig->uiTimerMode != PWM_MASTER_CHANNEL)
{
/*
* Initialise a pointer to the slave's control register
* configuration of TAUJ
*/
LpTAUJChannelReg =
(P2VAR(Tdd_Pwm_TAUJChannelUserRegs, AUTOMATIC, PWM_CONFIG_DATA))
(LpChannelConfig->pCntlRegs);
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUJ channel properties */
LpTAUJProperties =
(P2VAR(Tdd_Pwm_TAUJProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* Check whether the channel is set to its Idle state */
if(PWM_TRUE == Pwm_GpChannelIdleStatus[LddChannelId])
{
/* Stop the counter operation */
LpTAUJUnitUserReg->ucTAUJnTT = LpTAUJProperties->ucChannelMask;
/* Enable the output of the current channel */
LpTAUJUnitUserReg->ucTAUJnTOE |= LpTAUJProperties->ucChannelMask;
/* Restart the counter operation */
LpTAUJUnitUserReg->ucTAUJnTS = LpTAUJProperties->ucChannelMask;
/* Set the Idle state of the channel to PWM_FALSE */
Pwm_GpChannelIdleStatus[LddChannelId] = PWM_FALSE;
}
else
{
/* For Misra Compliance */
}
/* Load the Absolute duty value in to the CDR Register */
LpTAUJChannelReg->ulTAUJnCDRm =
Pwm_HW_CalculateDuty(LddPeriod, LusDutyCycle, LucVar);
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* Increment the channel */
LddChannelId++;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next channel*/
LpChannelConfig++;
}
else
{
break;
}
}
/* End of TAUJ Slave channels */
/*
* Set the corresponding channels Trigger bits to specifies the
* channels for which simultaneous rewrite is executed
*/
LpTAUJUnitUserReg->ucTAUJnRDT = (uint8)LusMasterChannelMask;
#endif/* End of (PWM_TAUJ_UNIT_USED == STD_ON) */
}/* End of TAUJ Unit type */
}/* End of if(LpChannelConfig->uiTimerMode == PWM_MASTER_CHANNEL) */
/* Set the Duty cycle of the requested channel if Slave */
else
{
/* Set the Duty cycle for the slave channel */
Pwm_HW_SetDutyCycle(LddChannelId, LusDutyCycle);
}
}
#define PWM_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* End of (PWM_SET_PERIOD_AND_DUTY_API == STD_ON) */
/*******************************************************************************
** Function Name : Pwm_HW_SetOutputToIdle
**
** Service ID : NA
**
** Description : This is PWM Driver Component support function.
** This function sets the output of a required channel to
** its configured Idle state.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : LddChannelId
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : NA
**
** Remarks : Global Variable(s):
** Pwm_GpTAUAUnitConfig, Pwm_GpTAUJUnitConfig,
** Pwm_GpChannelConfig, Pwm_GpChannelIdleStatus
** Function(s) invoked:
** SchM_Enter_Pwm, SchM_Exit_Pwm
*******************************************************************************/
#if (PWM_SET_OUTPUT_TO_IDLE_API == STD_ON)
#define PWM_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, PWM_PRIVATE_CODE) Pwm_HW_SetOutputToIdle
(Pwm_ChannelType LddChannelId)
{
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
/* Pointer pointing to the TAUA/TAUB/TAUC Unit configuration */
P2CONST(Tdd_Pwm_TAUABCUnitConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpTAUABCUnitConfig;
/* Pointer pointing to the TAUA/TAUB/TAUC Unit user control registers */
P2VAR(Tdd_Pwm_TAUABCUnitUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCUnitUserReg;
/* Pointer to the TAUA/TAUB/TAUC Channel Properties structure */
P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCProperties;
#endif
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/* Pointer pointing to the TAUJ Unit configuration */
P2CONST(Tdd_Pwm_TAUJUnitConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpTAUJUnitConfig;
/* Pointer pointing to the TAUJ Unit control registers */
P2VAR(Tdd_Pwm_TAUJUnitUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUJUnitUserReg;
/* Pointer to the TAUJ Channel Properties structure */
P2VAR(Tdd_Pwm_TAUJProperties, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUJProperties;
#endif
/* Pointer pointing to the channel configuration */
P2CONST(Tdd_Pwm_ChannelConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpChannelConfig;
uint8_least LucCount;
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
uint8 LucVar;
#endif
/* MISRA Rule : 17.4 */
/* Message : Array indexing shall be the only allowed */
/* form of pointer arithmetic. */
/* Reason : To access the channel parameters */
/* Verification : However, part of the code */
/* is verified manually and */
/* it is not having any impact. */
/* Get the pointer to the channel configuration */
LpChannelConfig = Pwm_GpChannelConfig + LddChannelId;
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
/* Check whether the current channel is TAUA/TAUB/TAUC */
if((PWM_HW_TAUA == LpChannelConfig->uiPwmTAUType) ||
(PWM_HW_TAUB == LpChannelConfig->uiPwmTAUType) ||
(PWM_HW_TAUC == LpChannelConfig->uiPwmTAUType))
{
/* MISRA Rule : 17.4 */
/* Message : Array indexing shall be the only allowed */
/* form of pointer arithmetic. */
/* Reason : To access the channel parameters */
/* Verification : However, part of the code */
/* is verified manually and */
/* it is not having any impact. */
/* Fetch the pointer to the current TAUA/TAUB/TAUC Unit config */
LpTAUABCUnitConfig = Pwm_GpTAUABCUnitConfig +
LpChannelConfig->ucTimerUnitIndex;
/* Fetch the pointer to the current TAUA/TAUB/TAUC Unit Registers */
LpTAUABCUnitUserReg = LpTAUABCUnitConfig->pTAUABCUnitUserCntlRegs;
}
else
{
/* For Misra Compliance */
}
#endif
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/* Check whether the current channel is TAUJ */
if(PWM_HW_TAUJ == LpChannelConfig->uiPwmTAUType)
{
/* MISRA Rule : 17.4 */
/* Message : Array indexing shall be the only allowed */
/* form of pointer arithmetic. */
/* Reason : To access the channel parameters */
/* Verification : However, part of the code */
/* is verified manually and */
/* it is not having any impact. */
/* Fetch the pointer to the current TAUJ Unit config */
LpTAUJUnitConfig = Pwm_GpTAUJUnitConfig +
LpChannelConfig->ucTimerUnitIndex;
/* Fetch the pointer to the current TAUJ Unit Registers */
LpTAUJUnitUserReg = LpTAUJUnitConfig->pTAUJUnitUserCntlRegs;
}
else
{
/* For Misra Compliance */
}
#endif
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON))
/* Check for the current channel Class Type is in Fixed Period Shifted */
if(PWM_FIXED_PERIOD_SHIFTED == LpChannelConfig->enClassType)
{
/* Check for the channel is in slave mode */
if(PWM_SLAVE_CHANNEL == LpChannelConfig->uiTimerMode)
{
/* Get the Master channel offset from the slave */
LucVar = LpChannelConfig->ucMasterOffset;
/* Get the Master channel ID */
LddChannelId -= LucVar;
/* MISRA Rule : 17.4 */
/* Message : Array indexing shall be the only allowed */
/* form of pointer arithmetic. */
/* Reason : To access the channel parameters */
/* Verification : However, part of the code */
/* is verified manually and */
/* it is not having any impact. */
/* Get the pointer to the Master channel config */
LpChannelConfig = LpChannelConfig-LucVar;
}
else
{
/* For Misra Compliance */
}
for(LucCount = PWM_ONE; LucCount <= PWM_THREE; LucCount++)
{
/* Increment the channel Id */
LddChannelId++;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next channel */
LpChannelConfig++;
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUA/TAUB/TAUC channel properties */
LpTAUABCProperties =
(P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
if((PWM_ONE == LucCount) || (PWM_THREE == LucCount))
{
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* MISRA Rule : 9.1 */
/* Message : All automatic variables shall */
/* have been assigned a value */
/* before being used. */
/* Reason : This part of the code will be */
/* visited only when the channel is */
/* of TAUA Unit and is of Fixed */
/* Period Shifted ClassType. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Stop the counter operation */
LpTAUABCUnitUserReg->usTAUABCnTT = LpTAUABCProperties->usChannelMask;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be */
/* applied to operands whose */
/* underlying type is signed. */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this */
/* warning is generated by the QAC */
/* tool V6.2.1 as an indirect result */
/* of integral promotion in complex */
/* bitwise operations */
/* Verification : However, this part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Set the corresponding channel bit to disable TOm operation */
LpTAUABCUnitUserReg->usTAUABCnTOE &= ~LpTAUABCProperties->usChannelMask;
/* Restart the counter operation */
LpTAUABCUnitUserReg->usTAUABCnTS = LpTAUABCProperties->usChannelMask;
if((uint8)PWM_LOW == LpChannelConfig->uiIdleLevel)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be */
/* applied to operands whose */
/* underlying type is signed. */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this */
/* warning is generated by the QAC */
/* tool V6.2.1 as an indirect result */
/* of integral promotion in complex */
/* bitwise operations */
/* Verification : However, this part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Reset the corresponding bit if Idle state is LOW */
LpTAUABCUnitUserReg->usTAUABCnTO &=
~LpTAUABCProperties->usChannelMask;
}
else
{
/* Set the corresponding bit if Idle state is HIGH */
LpTAUABCUnitUserReg->usTAUABCnTO |= LpTAUABCProperties->usChannelMask;
}
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* Set the Idle state status of this channel as PWM_TRUE */
Pwm_GpChannelIdleStatus[LddChannelId] = PWM_TRUE;
}/* End of if((PWM_ONE == LucCount) || (PWM_THREE == LucCount)) */
else
{
/* For Misra Compliance */
}
}/* End of for(LucCount = PWM_ONE; PWM_THREE >= LucCount; LucCount++) */
}/* End of if(PWM_FIXED_PERIOD_SHIFTED == LpChannelConfig->enClassType) */
/* Is the current channel Class Type is in Fixed / Variable Period */
else
#endif /* #if((PWM_TAUA_UNIT_USED == STD_ON) || \
(PWM_TAUB_UNIT_USED == STD_ON)) */
{
/* Check whether the channel is in Slave Mode */
if(PWM_SLAVE_CHANNEL == LpChannelConfig->uiTimerMode)
{
#if(((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON)) && (PWM_TAUJ_UNIT_USED == STD_ON))
/* Check whether the channel belongs to TAUA/TAUB/TAUC */
if((PWM_HW_TAUA == LpChannelConfig->uiPwmTAUType) ||
(PWM_HW_TAUB == LpChannelConfig->uiPwmTAUType) ||
(PWM_HW_TAUC == LpChannelConfig->uiPwmTAUType))
#endif
{
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) \
|| (PWM_TAUC_UNIT_USED == STD_ON))
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUA/TAUB/TAUC channel properties */
LpTAUABCProperties =
(P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
/* Stop the counter operation */
LpTAUABCUnitUserReg->usTAUABCnTT = LpTAUABCProperties->usChannelMask;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be */
/* applied to operands whose */
/* underlying type is signed. */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this */
/* warning is generated by the QAC */
/* tool V6.2.1 as an indirect result */
/* of integral promotion in complex */
/* bitwise operations */
/* Verification : However, this part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Set the corresponding channel bit to disable TOm operation */
LpTAUABCUnitUserReg->usTAUABCnTOE &= ~LpTAUABCProperties->usChannelMask;
/* Restart the counter operation */
LpTAUABCUnitUserReg->usTAUABCnTS = LpTAUABCProperties->usChannelMask;
if((uint8)PWM_LOW == LpChannelConfig->uiIdleLevel)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be */
/* applied to operands whose */
/* underlying type is signed. */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this */
/* warning is generated by the QAC */
/* tool V6.2.1 as an indirect result */
/* of integral promotion in complex */
/* bitwise operations */
/* Verification : However, this part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Reset the corresponding bit if Idle state is LOW */
LpTAUABCUnitUserReg->usTAUABCnTO &=
~LpTAUABCProperties->usChannelMask;
}
else
{
/* Set the corresponding bit if Idle state is HIGH */
LpTAUABCUnitUserReg->usTAUABCnTO |= LpTAUABCProperties->usChannelMask;
}
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif/* End of #if((PWM_TAUA_UNIT_USED == STD_ON) ||
(PWM_TAUB_UNIT_USED == STD_ON) ||
(PWM_TAUC_UNIT_USED == STD_ON)) */
}
#if(((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON)) && (PWM_TAUJ_UNIT_USED == STD_ON))
/* channel belongs to TAUJ */
else
#endif
{
#if(PWM_TAUJ_UNIT_USED == STD_ON)
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUJ channel properties */
LpTAUJProperties =
(P2VAR(Tdd_Pwm_TAUJProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
/* MISRA Rule : 9.1 */
/* Message : All automatic variables shall */
/* have been assigned a value */
/* before being used. */
/* Reason : This part of the code will be */
/* visited only when the channel is */
/* of TAUJ Unit. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Stop the counter operation */
LpTAUJUnitUserReg->ucTAUJnTT = LpTAUJProperties->ucChannelMask;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be */
/* applied to operands whose */
/* underlying type is signed. */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this */
/* warning is generated by the QAC */
/* tool V6.2.1 as an indirect result */
/* of integral promotion in complex */
/* bitwise operations */
/* Verification : However, this part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Set the corresponding channel bit to disable TOm operation */
LpTAUJUnitUserReg->ucTAUJnTOE &= ~LpTAUJProperties->ucChannelMask;
/* Restart the counter operation */
LpTAUJUnitUserReg->ucTAUJnTS = LpTAUJProperties->ucChannelMask;
if((uint8)PWM_LOW == LpChannelConfig->uiIdleLevel)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be */
/* applied to operands whose */
/* underlying type is signed. */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this */
/* warning is generated by the QAC */
/* tool V6.2.1 as an indirect result */
/* of integral promotion in complex */
/* bitwise operations */
/* Verification : However, this part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Reset the corresponding bit if Idle state is LOW */
LpTAUJUnitUserReg->ucTAUJnTO &= ~LpTAUJProperties->ucChannelMask;
}
else
{
/* Set the corresponding bit if Idle state is HIGH */
LpTAUJUnitUserReg->ucTAUJnTO |= LpTAUJProperties->ucChannelMask;
}
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif/* End of (PWM_TAUJ_UNIT_USED == STD_ON) */
}
/* Set the Idle state status of this channel as PWM_TRUE */
Pwm_GpChannelIdleStatus[LddChannelId] = PWM_TRUE;
}/* End of if(LpChannelConfig->uiTimerMode == PWM_SLAVE_CHANNEL) */
/* Channel in Master Mode*/
else
{
#if(((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON)) && (PWM_TAUJ_UNIT_USED == STD_ON))
/* Check if channel belongs to TAUA/TAUB/TAUC */
if((PWM_HW_TAUA == LpChannelConfig->uiPwmTAUType) ||
(PWM_HW_TAUB == LpChannelConfig->uiPwmTAUType) ||
(PWM_HW_TAUC == LpChannelConfig->uiPwmTAUType))
#endif
{
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) \
|| (PWM_TAUC_UNIT_USED == STD_ON))
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpChannelConfig++;
LddChannelId++;
for(LucCount=PWM_ONE;
(PWM_MASTER_CHANNEL != LpChannelConfig->uiTimerMode)
&& (LucCount<PWM_TOTAL_TAUABC_CHANNELS_CONFIG); LucCount++)
{
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUA/TAUB/TAUC channel properties */
LpTAUABCProperties =
(P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
/* Stop the counter operation */
LpTAUABCUnitUserReg->usTAUABCnTT =
LpTAUABCProperties->usChannelMask;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be */
/* applied to operands whose */
/* underlying type is signed. */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this */
/* warning is generated by the QAC */
/* tool V6.2.1 as an indirect result */
/* of integral promotion in complex */
/* bitwise operations */
/* Verification : However, this part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Set corresponding channel bit to disable TOm operation */
LpTAUABCUnitUserReg->usTAUABCnTOE &=
~LpTAUABCProperties->usChannelMask;
/* Restart the counter operation */
LpTAUABCUnitUserReg->usTAUABCnTS =
LpTAUABCProperties->usChannelMask;
if((uint8)PWM_LOW == LpChannelConfig->uiIdleLevel)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be */
/* applied to operands whose */
/* underlying type is signed. */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this */
/* warning is generated by the QAC */
/* tool V6.2.1 as an indirect result */
/* of integral promotion in complex */
/* bitwise operations */
/* Verification : However, this part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Reset the corresponding bit if Idle state is LOW */
LpTAUABCUnitUserReg->usTAUABCnTO &=
~LpTAUABCProperties->usChannelMask;
}
else
{
/* Set the corresponding bit if Idle state is HIGH */
LpTAUABCUnitUserReg->usTAUABCnTO |=
LpTAUABCProperties->usChannelMask;
}
/* Set the Idle state status of this channel as PWM_TRUE */
Pwm_GpChannelIdleStatus[LddChannelId] = PWM_TRUE;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next channel */
LpChannelConfig++;
/* Increment the channel Id */
LddChannelId++;
}
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif/* End of ((PWM_TAUA_UNIT_USED == STD_ON) ||
(PWM_TAUB_UNIT_USED == STD_ON) ||
(PWM_TAUC_UNIT_USED == STD_ON)) */
}/* End of if((LpChannelConfig->uiPwmTAUType == PWM_HW_TAUA) ||
(LpChannelConfig->uiPwmTAUType == PWM_HW_TAUB) ||
(LpChannelConfig->uiPwmTAUType == PWM_HW_TAUC)) */
#if(((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON)) && (PWM_TAUJ_UNIT_USED == STD_ON))
/* channel belongs to TAUJ*/
else
#endif
{
#if(PWM_TAUJ_UNIT_USED == STD_ON)
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the channel to the next channel */
LpChannelConfig++;
/* Increment the channel Id */
LddChannelId++;
for(LucCount=PWM_ONE;
(PWM_MASTER_CHANNEL != LpChannelConfig->uiTimerMode)
&& (LucCount<PWM_TOTAL_TAUJ_CHANNELS_CONFIG); LucCount++ )
{
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUJ channel properties */
LpTAUJProperties =
(P2VAR(Tdd_Pwm_TAUJProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
/* Stop the counter operation */
LpTAUJUnitUserReg->ucTAUJnTT = LpTAUJProperties->ucChannelMask;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be */
/* applied to operands whose */
/* underlying type is signed. */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this */
/* warning is generated by the QAC */
/* tool V6.2.1 as an indirect result */
/* of integral promotion in complex */
/* bitwise operations */
/* Verification : However, this part of the code is */
/* verified manually and it is not */
/* having any impact. */
/*
* Set the corresponding channel bit to disable TOm
* operation
*/
LpTAUJUnitUserReg->ucTAUJnTOE &= ~LpTAUJProperties->ucChannelMask;
/* Restart the counter operation */
LpTAUJUnitUserReg->ucTAUJnTS = LpTAUJProperties->ucChannelMask;
if((uint8)PWM_LOW == LpChannelConfig->uiIdleLevel)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be */
/* applied to operands whose */
/* underlying type is signed. */
/* Reason : Though the bitwise operation is */
/* performed on unsigned data, this */
/* warning is generated by the QAC */
/* tool V6.2.1 as an indirect result */
/* of integral promotion in complex */
/* bitwise operations */
/* Verification : However, this part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Reset the corresponding bit if Idle state is LOW */
LpTAUJUnitUserReg->ucTAUJnTO &= ~LpTAUJProperties->ucChannelMask;
}
else
{
/* Set the corresponding bit if Idle state is HIGH */
LpTAUJUnitUserReg->ucTAUJnTO |= LpTAUJProperties->ucChannelMask;
}
/* Set the Idle state status of this channel as PWM_TRUE */
Pwm_GpChannelIdleStatus[LddChannelId] = PWM_TRUE;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next channel */
LpChannelConfig++;
/* Increment the channel Id */
LddChannelId++;
}/* End of 'for' LpChannelConfig->uiTimerMode != PWM_MASTER_CHANNEL
&& LucCount<PWM_TOTAL_TAUJ_CHANNELS_CONFIG */
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif/* End of (PWM_TAUJ_UNIT_USED == STD_ON) */
}/* End of the TAUJ Unit Type */
}/* End of if channel is in Master Mode */
}/* End of if(LpChannelConfig->enClassType != PWM_FIXED_PERIOD_SHIFTED) */
}
#define PWM_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* End of (PWM_SET_OUTPUT_TO_IDLE_API == STD_ON) */
/*******************************************************************************
** Function Name : Pwm_HW_GetOutputState
**
** Service ID : NA
**
** Description : This is PWM Driver Component support function.
** This function gets the outputstate of a PWM channel.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : LddChannelId
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Pwm_OutputStateType (PWM_LOW / PWM_HIGH)
**
** Preconditions : NA
**
** Remarks : Global Variable(s):
** Pwm_GpTAUAUnitConfig, Pwm_GpTAUJUnitConfig,
** Pwm_GpChannelConfig, Pwm_GpChannelIdleStatus
** Function(s) invoked:
** SchM_Enter_Pwm, SchM_Exit_Pwm
*******************************************************************************/
#if (PWM_GET_OUTPUT_STATE_API == STD_ON)
#define PWM_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(Pwm_OutputStateType, PWM_PRIVATE_CODE) Pwm_HW_GetOutputState
(Pwm_ChannelType LddChannelId)
{
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
/* Pointer pointing to the TAUA/TAUB/TAUC Unit configuration */
P2CONST(Tdd_Pwm_TAUABCUnitConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpTAUABCUnitConfig;
/* Pointer pointing to the TAUA Unit user control registers */
P2VAR(Tdd_Pwm_TAUABCUnitUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCUnitUserReg;
/* Pointer to the TAUA/TAUB/TAUC Channel Properties structure */
P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUABCProperties;
#endif
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/* Pointer pointing to the TAUJ Unit configuration */
P2CONST(Tdd_Pwm_TAUJUnitConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpTAUJUnitConfig;
/* Pointer pointing to the TAUJ Unit control registers */
P2VAR(Tdd_Pwm_TAUJUnitUserRegs, AUTOMATIC, PWM_CONFIG_DATA) LpTAUJUnitUserReg;
/* Pointer to the TAUJ Channel Properties structure */
P2VAR(Tdd_Pwm_TAUJProperties, AUTOMATIC, PWM_CONFIG_DATA)
LpTAUJProperties;
#endif
/* Pointer pointing to the channel configuration */
P2CONST(Tdd_Pwm_ChannelConfigType, AUTOMATIC, PWM_CONFIG_CONST)
LpChannelConfig;
Pwm_OutputStateType LenRetOutputState;
/* MISRA Rule : 17.4 */
/* Message : Array indexing shall be the only allowed */
/* form of pointer arithmetic. */
/* Reason : To access the channel parameters */
/* Verification : However, part of the code */
/* is verified manually and */
/* it is not having any impact. */
LpChannelConfig = Pwm_GpChannelConfig + LddChannelId;
/* Default return output state */
LenRetOutputState = PWM_LOW;
/* Check whether the channel is in Slave Mode */
if(PWM_SLAVE_CHANNEL == LpChannelConfig->uiTimerMode)
{
/* Check whether this channel output is set to Idle state */
if(PWM_TRUE == Pwm_GpChannelIdleStatus[LddChannelId])
{
LenRetOutputState = (Pwm_OutputStateType)LpChannelConfig->uiIdleLevel;
}
/* If the channel output is not in Idle state */
else
{
#if(((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON)) && (PWM_TAUJ_UNIT_USED == STD_ON))
/* Check whether the channel belongs to TAUA/TAUB/TAUC */
if((PWM_HW_TAUA == LpChannelConfig->uiPwmTAUType) ||
(PWM_HW_TAUB == LpChannelConfig->uiPwmTAUType) ||
(PWM_HW_TAUC == LpChannelConfig->uiPwmTAUType))
#endif
{
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) \
|| (PWM_TAUC_UNIT_USED == STD_ON))
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Fetch the pointer to the current TAUA/TAUB/TAUC Unit config */
LpTAUABCUnitConfig = Pwm_GpTAUABCUnitConfig +
LpChannelConfig->ucTimerUnitIndex;
/* Fetch the pointer to the current TAUA/TAUB/TAUC Unit Registers */
LpTAUABCUnitUserReg = LpTAUABCUnitConfig->pTAUABCUnitUserCntlRegs;
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUA/TAUB/TAUC channel properties */
LpTAUABCProperties =
(P2VAR(Tdd_Pwm_TAUABCProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/* Condition to check current output state of the slave channel */
if(((LpTAUABCUnitUserReg->usTAUABCnTO) &
(LpTAUABCProperties->usChannelMask)) ==
LpTAUABCProperties->usChannelMask)
{
LenRetOutputState = PWM_HIGH;
}
else
{
/* For Misra Compliance */
}
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif/* End of ((PWM_TAUA_UNIT_USED == STD_ON) ||
(PWM_TAUB_UNIT_USED == STD_ON) ||
(PWM_TAUC_UNIT_USED == STD_ON)) */
}
#if(((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON)) && (PWM_TAUJ_UNIT_USED == STD_ON))
else
#endif
{
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Fetch the pointer to the current TAUJ Unit config */
LpTAUJUnitConfig = Pwm_GpTAUJUnitConfig +
LpChannelConfig->ucTimerUnitIndex;
/* Fetch the pointer to the current TAUJ Unit Registers */
LpTAUJUnitUserReg = LpTAUJUnitConfig->pTAUJUnitUserCntlRegs;
/* MISRA Rule : 11.5 */
/* Message : Dangerous pointer cast results in loss of */
/* const qualification. */
/* Reason : This is to achieve throughput in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Get the pointer to the TAUJ channel properties */
LpTAUJProperties =
(P2VAR(Tdd_Pwm_TAUJProperties, AUTOMATIC, PWM_CONFIG_DATA))
LpChannelConfig->pChannelProp;
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Pwm(PWM_REGISTERS_PROTECTION);
#endif
/*
* Condition to check the current output state of the
* slave channel
*/
if(((LpTAUJUnitUserReg->ucTAUJnTO) &
(LpTAUJProperties->ucChannelMask)) == LpTAUJProperties->ucChannelMask)
{
LenRetOutputState = PWM_HIGH;
}
else
{
/* For Misra Compliance */
}
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Pwm(PWM_REGISTERS_PROTECTION);
#endif
#endif/* End of (PWM_TAUJ_UNIT_USED == STD_ON) */
}
}/* End of 'else' part of
"if (PWM_TRUE == Pwm_GpChannelIdleStatus[LddChannelId])" */
}/* End of if(PWM_SLAVE_CHANNEL == LpChannelConfig->uiTimerMode) */
else
{
/* For Misra Compliance */
}
return LenRetOutputState;
}
#define PWM_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* End of (PWM_GET_OUTPUT_STATE_API == STD_ON) */
/*******************************************************************************
** Function Name : Pwm_HW_CalculateDuty
**
** Service ID : NA
**
** Description : This is PWM Driver Component support function.
** This function Calculates Absolute duty for the
** PWM channel.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : LddAbsolutePeriod, LddRelativeDuty, LucTAUType
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Pwm_PeriodType
**
** Preconditions : NA
**
** Remarks : Global Variable(s):
** None
** Function(s) invoked:
** None
*******************************************************************************/
#define PWM_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(Pwm_PeriodType, PWM_PRIVATE_CODE) Pwm_HW_CalculateDuty
(Pwm_PeriodType LddAbsolutePeriod, Pwm_PeriodType LddRelativeDuty,
uint8 LucTAUType)
{
Pwm_PeriodType LddAbsoluteDuty;
#if(PWM_TAUJ_UNIT_USED == STD_ON)
Pwm_PeriodType LddCorrectionPeriod;
#endif
if(MAX_DUTY_CYCLE == LddRelativeDuty)
{
#if(((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON)) && (PWM_TAUJ_UNIT_USED == STD_ON))
if((PWM_HW_TAUA == LucTAUType) || (PWM_HW_TAUB == LucTAUType) ||
(PWM_HW_TAUC == LucTAUType))
#endif
{
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) \
|| (PWM_TAUC_UNIT_USED == STD_ON))
/*
* If Duty is 100%, Update (CDRm (master channel)
* setting value + 1) value in the CDRm register
*/
LddAbsoluteDuty = (uint16)LddAbsolutePeriod + 1;
#endif
}
#if(((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON)) && (PWM_TAUJ_UNIT_USED == STD_ON))
else
#endif
{
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/*
* If Duty is 100%, Update (CDRm (master channel)
* setting value + 1) value in the CDRm register
*/
LddAbsoluteDuty = LddAbsolutePeriod + 1;
#endif
}
}
else if(MIN_DUTY_CYCLE == LddRelativeDuty)
{
/* If Duty is 0%, Update 0x0000 value in the CDRm register */
LddAbsoluteDuty = MIN_DUTY_CYCLE;
}
else
{
/* Increment the period values since the CDR(master)
was loaded with 1 less */
LddAbsolutePeriod++;
#if(((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON)) && (PWM_TAUJ_UNIT_USED == STD_ON))
if((PWM_HW_TAUA == LucTAUType) || (PWM_HW_TAUB == LucTAUType) ||
(PWM_HW_TAUC == LucTAUType))
#endif
{
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) \
|| (PWM_TAUC_UNIT_USED == STD_ON))
/*
* If Duty is between 0x0000 and 0x8000, AbsoluteDutyCycle =
* ((uint32)AbsolutePeriodTime * RelativeDutyCycle) >> 15
*/
/* MISRA Rule : 12.7 */
/* Message : A right shift on signed data may be an */
/* arithmetic or a logical shift. */
/* Reason : Though the shift operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion, in a special situation */
/* arises when unsigned char and unsigned short */
/* objects are the operands of a shift operator.*/
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
LddAbsoluteDuty = (uint16)
((LddAbsolutePeriod * LddRelativeDuty) >> PWM_DUTY_CALC_DIV);
#endif
}
#if(((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON)) && (PWM_TAUJ_UNIT_USED == STD_ON))
else
#endif
{
#if(PWM_TAUJ_UNIT_USED == STD_ON)
if(LddAbsolutePeriod > PWM_PERIOD_LIMIT)
{
/*
* If Period > 0xFFFF and Duty is between 0x0000 and 0x8000
*/
LddCorrectionPeriod = LddAbsolutePeriod & PWM_CORRECTION_MASK;
LddAbsoluteDuty = (uint32)
(((LddAbsolutePeriod >> PWM_DUTY_CALC_DIV) * LddRelativeDuty) + \
((LddCorrectionPeriod * LddRelativeDuty) >> PWM_DUTY_CALC_DIV));
}
else
{
/*
* If Duty is between 0x0000 and 0x8000, AbsoluteDutyCycle =
* ((uint32)AbsolutePeriodTime * RelativeDutyCycle) >> 15
*/
LddAbsoluteDuty =
(LddAbsolutePeriod * LddRelativeDuty) >> PWM_DUTY_CALC_DIV;
}
#endif
}
}
return LddAbsoluteDuty;
}
#define PWM_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Pwm_HW_Callback
**
** Service ID : NA
**
** Description : This routine is used to invoke the callback
** notification.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : LucChannelIdx
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : NA
**
** Remarks : Global Variable(s):
** Pwm_GpChannelConfig
** Function(s) invoked:
** None
*******************************************************************************/
#if(PWM_NOTIFICATION_SUPPORTED == STD_ON)
#define PWM_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, PWM_PRIVATE_CODE) Pwm_HW_Callback(Pwm_ChannelType LucChannelIdx)
{
P2CONST(Tdd_Pwm_NotificationType, AUTOMATIC, PWM_APPL_CODE) LpChannelFunc;
uint8 LucChIdx;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LucChIdx = *(Pwm_GpChannelTimerMap + LucChannelIdx);
/* check if Notification status is enabled for this channel */
if(PWM_TRUE == Pwm_GpNotifStatus[LucChIdx])
{
LucChIdx = Pwm_GpChannelConfig[LucChIdx].ucNotificationConfig;
LpChannelFunc = &Pwm_GstChannelNotifFunc[LucChIdx];
LpChannelFunc->pPwmEdgeNotifPtr();
}
else
{
/* For Misra Compliance */
}
}
#define PWM_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* End of (PWM_NOTIFICATION_SUPPORTED == STD_ON) */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Port/Port_Version.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Port_Version.c */
/* Version = 3.1.3 */
/* Date = 06-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains code for version checking for modules included by PORT */
/* Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 27-Jul-2009 : Initial Version
* V3.1.0: 26-Jul-2011 : Initial Version DK4 variant
* V3.1.1: 15-Sep-2011 : As per the DK-4H requirements
* 1. Added DK4-H specific JTAG information.
* 2. Added compiler switch for USE_UPD70F3529 device
* name.
* V3.1.2: 16-Feb-2012 : Merged the fixes done for Fx4L.
* V3.1.3: 06-Jun-2012 : As per SCR 033, Compiler version is removed from
* Environment section.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Port_Version.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define PORT_VERSION_C_AR_MAJOR_VERSION PORT_AR_MAJOR_VERSION_VALUE
#define PORT_VERSION_C_AR_MINOR_VERSION PORT_AR_MINOR_VERSION_VALUE
#define PORT_VERSION_C_AR_PATCH_VERSION PORT_AR_PATCH_VERSION_VALUE
/* File version information */
#define PORT_VERSION_C_SW_MAJOR_VERSION 3
#define PORT_VERSION_C_SW_MINOR_VERSION 1
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (PORT_VERSION_AR_MAJOR_VERSION != PORT_VERSION_C_AR_MAJOR_VERSION)
#error "Port_Version.c : Mismatch in Specification Major Version"
#endif
#if (PORT_VERSION_AR_MINOR_VERSION != PORT_VERSION_C_AR_MINOR_VERSION)
#error "Port_Version.c : Mismatch in Specification Minor Version"
#endif
#if (PORT_VERSION_AR_PATCH_VERSION != PORT_VERSION_C_AR_PATCH_VERSION)
#error "Port_Version.c : Mismatch in Specification Patch Version"
#endif
#if (PORT_SW_MAJOR_VERSION != PORT_VERSION_C_SW_MAJOR_VERSION)
#error "Port_Version.c : Mismatch in Major Version"
#endif
#if (PORT_SW_MINOR_VERSION!= PORT_VERSION_C_SW_MINOR_VERSION)
#error "Port_Version.c : Mismatch in Minor Version"
#endif
#if(PORT_CRITICAL_SECTION_PROTECTION == STD_ON)
#if (SCHM_AR_MAJOR_VERSION != PORT_SCHM_AR_MAJOR_VERSION)
#error "SchM.h : Mismatch in Specification Major Version"
#endif
#if (SCHM_AR_MINOR_VERSION != PORT_SCHM_AR_MINOR_VERSION)
#error "SchM.h : Mismatch in Specification Minor Version"
#endif
#endif
#if (PORT_DEV_ERROR_DETECT == STD_ON)
#if (DET_AR_MAJOR_VERSION != PORT_DET_AR_MAJOR_VERSION)
#error "Det.h : Mismatch in Specification Major Version"
#endif
#if (DET_AR_MINOR_VERSION != PORT_DET_AR_MINOR_VERSION)
#error "Det.h : Mismatch in Specification Minor Version"
#endif
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/BSW/Dem/Dem_IntErrId.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Dem_IntErrId.h */
/* Version = 3.0.5 */
/* Date = 08-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file is a stub for DEM component . */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 05-Aug-2009 : Initial Version
*
* V3.0.1: 13-Apr-2010 : MCU_E_BURAM_WRITE_FAILURE macro added
* MCU_E_POWER_DOWN_MODE_FAILURE macro added
*
* V3.0.2: 03-Jan-2011 : FLS_E_COMPARE_FAILED macro added
*
* V3.0.3: 17-Jun-2011 : FEE_E_READ_FAILED and FEE_E_WRITE_FAILED
* macros are added
*
* V3.0.3a: 01-Aug-2011 : FLS_E_SET_FREQUENCY_FAILED macro is added
*
* V3.0.4: 29-Sep-2011 : PWM_E_REWRITE_FAILED macro added.
* SPI_E_TIMEOUT is added.
* Copyright is updated.
*
* V3.0.5: 08-Jun-2012 : 1. Copyright Information is changed.
* 2. Compiler version is removed from Environment
* section.
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
#ifndef DEM_INTERRID_H
#define DEM_INTERRID_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification Version Information */
#define DEM_INTERRID_AR_MAJOR_VERSION 2
#define DEM_INTERRID_AR_MINOR_VERSION 2
#define DEM_INTERRID_AR_PATCH_VERSION 1
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
#define FR_E_ACCESS (uint8)0x0B
#define CANIF_E_INVALID_TXPDUID (uint8)0x28
#define CANIF_E_INVALID_RXPDUID (uint8)0x32
#define CANIF_E_FULL_TX_BUFFER (uint8)0x3C
#define CANIF_E_STOPPED (uint8)0x46
#define CAN_E_TIMEOUT (uint8)0x50
#define WDG_23_DRIVERA_E_DISABLE_REJECTED (uint8)0x60
#define WDG_23_DRIVERA_E_MODE_SWITCH_FAILED (uint8)0x70
#define WDG_23_DRVA_E_MODE_SWITCH_FAILED 50
#define WDG_23_DRVA_E_DISABLE_REJECTED 60
#define WDG_23_DRVB_E_MODE_SWITCH_FAILED 50
#define WDG_23_DRVB_E_DISABLE_REJECTED 60
#define MCU_E_CLOCK_FAILURE (uint8)40
#define MCU_E_WRITE_FAILURE (uint8)50
#define MCU_E_BURAM_WRITE_FAILURE (uint8)60
#define MCU_E_POWER_DOWN_MODE_FAILURE (uint8)70
#define PWM_E_REWRITE_FAILED 40
#define PORT_E_WRITE_FAILURE (uint8)41
#define SPI_E_SEQ_FAILED 34
#define SPI_E_TIMEOUT 35
#define FLS_E_ERASE_FAILED 31
#define FLS_E_WRITE_FAILED 30
#define FLS_E_READ_FAILED 33
#define FLS_E_COMPARE_FAILED 34
#define FLS_E_SET_FREQUENCY_FAILED 35
#define FEE_E_WRITE_FAILED 30
#define FEE_E_READ_FAILED 33
#define FEE_FORMAT_FAILED 34
#define FEE_E_STARTUP_FAILED 35
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* DEM_INTERRRID_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/IoHwAb/IoHwAb_Switch.h
/*******************************************************************************
| File Name: kam.h
| Description: Keep Alive Memory define and handler
|-------------------------------------------------------------------------------
| (c) This software is the proprietary of Pan Asia Technical Automotive Company (PATAC).
| All rights are reserved by PATAC.
|-------------------------------------------------------------------------------
| Initials Name Company
| -------- -------------------- -----------------------------------------
| XXX XXXX PATAC
|-------------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|-------------------------------------------------------------------------------
| Date Version Author Description
| ---------- -------- ------ -------------------------------------------
|2009-05-18 01.00.00 WH Creation
|2009-07-02 01.00.01 WH Add comments
|2009-07-24 01.00.02 WH Add switch input edge event trigger
|2009-08-25 01.00.03 WH Devide edge event trigger into two parts: rising edge and falling edge
|2009-11-16 01.00.04 WH Add e_b_KamEnable in TeSW_CmmnSwMisc, that means try
| to use KAM value when system reset occour.
| Delete SWCFG_DGTL_PASSTIM and e_w_PassTim in TeSW_DgtlSwInfo
|2010-04-22 01.01.00 WH Add e_b_DisableCtrl flag, so other task can use this control bit to disable a switch handle.
|2011-08-10 02.00.00 WH Revised for Clea+, autosar MCAL
|******************************************************************************/
#ifndef SWITCH_H
#define SWITCH_H
/*******************************************************************************
| Other Header File Inclusion
|******************************************************************************/
//#include "Std_Types.h"
#include "Platform_Types.h"
#include "IoHwAb_SwitchCfg.h"
#include "IoHwAb_Private.h"
#include "Sys_QueueHandler.h" /*use OS event*/
#include "Dio.h"
#include "Adc.h"
#include "Api_SchdTbl.h"
/*******************************************************************************
| Compile Option or configuration Section (for test/debug)
|******************************************************************************/
/*Event ID is used by OS, it can be set to 16bit or 8bit due to OS config*/
#define OS_EVENTID_TYPE uint16
/*API Configuration*/
#define ADC_CONF_VRH 5.0f //ADC reference voltage high
#define ADC_CONF_VRL 0.0f //ADC reference voltage low
#define ADC_CONF_RES 4095 //ADC resolution: 10bit = 1023, 12bit = 4095
#define ADC_CONF_TASKTIME 5 //ms, ADSW task time slice
#define SWCFG_DIGITAL_TASKSLICE 5 //ms, digital switch task time slice
#define INVALID_DTC_ID 0
#define SW_CHANNEL_TYPE_DIO 0
#define SW_CHANNEL_TYPE_SPI 1
#define SW_CHANNEL_TYPE_ADC 2
#define INVALID_EVENT_ID 0 /*invalid Event ID is zero because OS dummy event value is zero*/
/*A macro for calculate number of array members*/
#define LENGTH_OF_ARRAY(x) ((sizeof (x)) / (sizeof ((x)[0])))
/*******************************************************************************
| Macro Definition
|******************************************************************************/
#define IS_SW_PRSD(x) VaSW_h_CmmnStat[x].Bits.e_b_SwPrsdFlt
#define IS_SW_SIG(x) VaSW_h_CmmnStat[x].Bits.e_b_SwPrsdRaw //ADD BY shiqs
#define VeSW_b_PrsdStatValid(x) VaSW_h_CmmnStat[x].Bits.e_b_SwPrsdFltValid
#define IS_SW_LEARNED(x) VaSW_h_CmmnStat[x].Bits.e_b_Learned
/*get the switch current pressed status, if not momentary switch, just filtered pressed signal, if momentary,
read toggle status*/
#define READ_SW_COMPOUND_SATUS(x) (KaSW_h_CmmnSwInfo[x].e_h_CmmnMisc.Bits.e_b_Momentary ?\
VaSW_h_CmmnStat[x].Bits.e_b_TgglStat:\
VaSW_h_CmmnStat[x].Bits.e_b_SwPrsdFlt)
/*******************************************************************************
| Typedef Definition
|******************************************************************************/
/*switch fault failsoft actions:
| >: use history value as switch value
| >: use TRUE as switch value
| >: use FALSE as switch value
*/
typedef enum
{
CeSW_FA_UseHstry,
CeSW_FA_UseTrue,
CeSW_FA_UseFalse
} TeSW_FaultActn;
typedef union
{
uint8 Byte;
struct
{
unsigned b1_Enabled :1; /*enabled/disabled this switch*/
unsigned b1_PrsIsHigh :1; /*when switch pressed, port is high or low, this is for DIO type switches only */
unsigned e_b_Momentary :1; /*momentary switch need no stuck diagnose*/
unsigned e_b_InactvBfrUse :1; /*for some switch, it will possibly always be stuck,
then we require to detect inactive signal first before thinking it is active*/
unsigned e_b_DftVal :1; /*default value when failsoft like stuck, short to ground/battery, etc.*/
unsigned e_b_KamEnable :1; /*if enable, attempt to use KAM value first when system reset*/
/*CeSW_u_WkupTyp...
*0 - no wakeup port
*1 - posedge wakeup (inactive->active)
*2 - negedge wakeup (active->inactive)
*3 - biedge wakeup (both edge)*/
unsigned e_u2_WkupTyp :2;
} Bits;
} TeSW_CmmnSwMisc;
#define CeSW_u_WkupTypNoWkup 0 /*no wakeup or wakeup by interrupt */
#define CeSW_u_WkupTypPosEdge 1
#define CeSW_u_WkupTypNegEdge 2
#define CeSW_u_WkupTypBiEdge 3
/*switch common information -note: not support Failure type byte here!
|2010-5-14 comments: all DTC diagnostic is moved to DTC handler!here also do
|stuck diagnose
*/
typedef struct
{
uint8 m_u_ChannelType; /*0-DIO channel, 1-SPI channel */
uint8 m_u_ChannelId; /*DIO channel ID, or spi channel ID offset*/
/*Switches shall work in the range of battery voltage, if the switch is not feeded by
|battery power, find the relation with battery voltage and convert it.
|e_u_BatVoltLo - low limit, x10 scaled voltage, i.e. 10.2V -> 102
|e_u_BatVoltHi - high limit, x10 scaled voltage, i.e. 10.2V -> 102
|e_u_BatVoltErrAct - If switches leave the legal range, keep the value specified here.
*/
uint8 e_u_BatVoltLo;
uint8 e_u_BatVoltHi;
uint8 e_u_BatVoltErrAct; /*Use the value in TeSW_FaultActn, but declared as u8 */
uint16 e_w_StckTim; //ms, stuck time, if latched switch, this parameter is not used
uint16 e_w_MaxPrsdTim; //ms, max pressed time, stuck pending if time exceed. if latched switch, this parameter is not used
uint8 e_u_DbcTim; /*ms, debouce time*/
TeSW_CmmnSwMisc e_h_CmmnMisc; //mometary, inactive before use, default value
OS_EVENTID_TYPE m_t_EvtId_Chng;
OS_EVENTID_TYPE m_t_EvtId_Press; //event ID on switch rising edge, used by OS
OS_EVENTID_TYPE m_t_EvtId_Release; //event ID on switch falling edge, used by OS
} TeSW_CmmnSwInfo;
#define SWCFG_CHANNEL_TYPE(x) KaSW_h_CmmnSwInfo[x].m_u_ChannelType
#define SWCFG_CHANNEL_ID(x) KaSW_h_CmmnSwInfo[x].m_u_ChannelId
#define SWCFG_BAT_VOLT_HIGH(x) KaSW_h_CmmnSwInfo[x].e_u_BatVoltHi
#define SWCFG_BAT_VOLT_LOW(x) KaSW_h_CmmnSwInfo[x].e_u_BatVoltLo
#define SWCFG_BAT_VOLT_ERRACT(x) KaSW_h_CmmnSwInfo[x].e_u_BatVoltErrAct
#define SWCFG_ENABLED(x) KaSW_h_CmmnSwInfo[x].e_h_CmmnMisc.Bits.b1_Enabled
#define SWCFG_PRS_IS_HIGH(x) KaSW_h_CmmnSwInfo[x].e_h_CmmnMisc.Bits.b1_PrsIsHigh
#define SWCFG_INACTV_BFRUSE(x) KaSW_h_CmmnSwInfo[x].e_h_CmmnMisc.Bits.e_b_InactvBfrUse
#define SWCFG_MOMENTARY(x) KaSW_h_CmmnSwInfo[x].e_h_CmmnMisc.Bits.e_b_Momentary
#define SWCFG_DIAG_STUCK_EN(x) KaSW_h_CmmnSwInfo[x].e_h_DiagEn.Bits.e_b_StckDiagEn
#define SWCFG_DBCTIME(x) KaSW_h_CmmnSwInfo[x].e_u_DbcTim
#define SWCFG_STUCKTIME(x) KaSW_h_CmmnSwInfo[x].e_w_StckTim
#define SWCFG_MAXPRSTIME(x) KaSW_h_CmmnSwInfo[x].e_w_MaxPrsdTim
#define SWCFG_DEFAULT_VAL(x) KaSW_h_CmmnSwInfo[x].e_h_CmmnMisc.Bits.e_b_DftVal
#define SWCFG_KAM_ENABLE(x) KaSW_h_CmmnSwInfo[x].e_h_CmmnMisc.Bits.e_b_KamEnable
#define SWCFG_STCKDTC(x) KaSW_h_CmmnSwInfo[x].e_w_StckDtcId
#define SWCFG_EVENTID_CHANGE(x) KaSW_h_CmmnSwInfo[x].m_t_EvtId_Chng
#define SWCFG_EVENTID_PRESS(x) KaSW_h_CmmnSwInfo[x].m_t_EvtId_Press
#define SWCFG_EVENTID_RELEASE(x) KaSW_h_CmmnSwInfo[x].m_t_EvtId_Release
typedef union
{
uint8 Byte;
struct
{
unsigned e_b_ShrtBat :1;
unsigned e_b_ShrtGnd :1;
unsigned e_b_OpenC :1; //open circuit
unsigned e_b_Stck :1; /*stuck, over stuck time*/
unsigned e_b_MaxPrsTim:1; /*Over max press time*/
unsigned e_b_IllglRng :1; //illegal range
unsigned e_b_BVOR:1; /*battery voltage out of range*/
} Bits;
} TeSW_CmmnFailFlags;
#define SW_FAILTYPE_SHRTBAT 0x01
#define SW_FAILTYPE_SHRTGND 0x02
#define SW_FAILTYPE_OC 0x04
#define SW_FAILTYPE_STUCK 0x08
#define SW_FAILTYPE_ILLGRNG 0x10
/*digital switch diagnostic states*/
typedef enum
{
SW_DIAG_NOT_READY,
SW_DIAG_PASS_PENDING,
SW_DIAG_PASS,
SW_DIAG_STUCK_PENDING,
SW_DIAG_STUCK
} TeSW_DgtlDiagStat;
typedef union
{
uint16 Word;
struct
{
unsigned e_b_SwPrsdFlt : 1; /*the SW is pressed after filtering*/
unsigned e_b_SwPrsdFltValid :1; /*indicate if filtered value is valid*/
unsigned e_b_SwPrsdFltLast : 1; /*save last filtered status for judging toggle purpose*/
unsigned e_b_SwPrsdRaw : 1;
unsigned e_b_SwPrsdRawLast : 1; //last raw value
unsigned e_b_DbcPass :1; //flag indicate switch level is debouced
unsigned e_b_OnceInactv :1; /* If the switch must wait for inactive first before
thinking active is valid. Save once inactive or not here */
unsigned e_b_TgglStat :1; //toggle status, for momentary switch, press once, TRUE, press again, FALSE
unsigned bSWJustPressed :1; //this is for momentary switch, which acts after it is fully released, it should be reset by requster
unsigned e_b_Learned :1; //set learned flag when input is determined first time when power up/wake up.
} Bits;
} TeSW_CmmnStat;
#define IS_SW_ONCEINACTV(x) VaSW_h_CmmnStat[x].Bits.e_b_OnceInactv
#define IS_SW_DBCPASS(x) VaSW_h_CmmnStat[x].Bits.e_b_DbcPass
#define CLR_SW_STAT(x) { VaSW_h_CmmnStat[x].Word = 0x0000;}
#define SET_SW_LEARNED(x) {VaSW_h_CmmnStat[x].Bits.e_b_Learned = 1;}
#define SET_SW_DBCPRSD(x) {VaSW_h_CmmnStat[x].Bits.e_b_SwPrsdDbc = 1;}
#define GET_SW_DBCPASS(x) VaSW_h_CmmnStat[x].Bits.e_b_DbcPass
#define SET_SW_DBCPASS(x) {VaSW_h_CmmnStat[x].Bits.e_b_DbcPass = 1;}
#define CLR_SW_DBCPASS(x) {VaSW_h_CmmnStat[x].Bits.e_b_DbcPass = 0;}
#define SET_SW_TOGGLE(x) {VaSW_h_CmmnStat[x].Bits.e_b_TgglStat = 1;}
#define CLR_SW_TOGGLE(x) {VaSW_h_CmmnStat[x].Bits.e_b_TgglStat = 0;}
#define TOGGLE_SW(x) {VaSW_h_CmmnStat[x].Bits.e_b_TgglStat = !VaSW_h_CmmnStat[x].Bits.e_b_TgglStat;}
#define SET_SW_ONCEINACTV(x) {VaSW_h_CmmnStat[x].Bits.e_b_OnceInactv = 1;}
#define SW_RAW(x) VaSW_h_CmmnStat[x].Bits.e_b_SwPrsdRaw
#define SW_RAW_LAST(x) VaSW_h_CmmnStat[x].Bits.e_b_SwPrsdRawLast
#define SW_FLT(x) VaSW_h_CmmnStat[x].Bits.e_b_SwPrsdFlt
#define SW_FLT_LAST(x) VaSW_h_CmmnStat[x].Bits.e_b_SwPrsdFltLast
#define SW_STATUS(x) VaSW_h_CmmnStat[x].Word
/**************************************************************************
** Can't Configurable Region **
***************************************************************************/
typedef enum
{
SW_ADDIAG_NOT_READY,
SW_ADDIAG_PASS,
SW_ADDIAG_PASS_DELAY,
SW_ADDIAG_FAIL,
SW_ADDIAG_FAIL_DELAY
} TeSW_AdDiagStat;
/*AD range failure flag is used for calibration.
|For indicating the purpose of define the range.
|Flag a debounced AD range with "illegal" if it is in a illegal range.
|x - TRUE(1) or FALSE(0)
*/
typedef union
{
uint8 AllBits;
struct
{
unsigned e_b_Illegal:1; /*is it an illegal range?*/
unsigned e_b_ShrtGnd:1; /*is it a short to ground range?*/
unsigned e_b_ShrtBat:1; /*is it a short to battery range?*/
unsigned e_b_OpenC:1; /*is it a open circuit range?*/
} Bits;
} TeSW_AdRngFFlg;
#define AdRng_Illegal(x) (x)
#define AdRng_ShrtGnd(x) ((x)<<1)
#define AdRng_ShrtBat(x) ((x)<<2)
#define AdRng_OpenC(x) ((x)<<3)
/*Create Log 20110822 wanghui:
* this is a CAL attribution, indicating if it is a illegal range or normal range.
*/
typedef enum
{
CeIoHwAb_e_AdRangeNormal, /*AD value is in normal range*/
CeIoHwAb_e_AdRangeIllegal, /*AD value is in illegal range*/
CeIoHwAb_e_AdRangeShortGnd, /*AD value is in short to ground range*/
CeIoHwAb_e_AdRangeShortBat,
CeIoHwAb_e_AdRangeOpenLoad,
CeIoHwAb_e_AdRangeOverLoad,
CeIoHwAb_e_AdRangeNum
} TeSW_AdRangeType;
/*Change Log 20110822 wanghui:
*(1) remove e_w_DtcCode, e_w_PassDelay and e_w_FailDelay because all DTCs is handlered by DTC module,
* in switch module, only error flags should be determined.
*(2) rename e_h_FFlg as m_h_AdRangeType, because this CAL is to indicate if it is a illegal range or normal range.
*/
typedef struct
{
uint16 wAD_Range_Low; //the lower value of spefic AD Range, i.e. value within 0 ~ 1023
uint16 wAD_Range_High; //the upper value of spefic AD Range, i.e. value within 0 ~ 1023
uint8 e_u_BitMask; //List the switch combination to show which switch is active
uint8 m_e_SwEnum; /*convert AD range to enum switch value*/
TeSW_AdRangeType m_e_AdRangeType;
} TeSW_AdRngCal;
/*Change Log 20110822 wanghui:
*(1) remove member e_u_SwNum because switches in one AD channel is enumed and end with a null switch, so
* size is no longer nessesary.
*(2) remove member e_w_DtcCode because all DTCs is handlered by DTC module, in switch module, only error
* flags should be determined.
*(3) e_w_FailDelay and e_w_PassDelay are removed because change (2).
*(4) e_p_RngDiagStat and e_p_RngDiagTimer are removed because change (2).
*/
typedef struct
{
/*The AD value ready status is not considered here, because its ready latency after startup is very short.
And the Ad sample should be run conitnuously at background*/
uint16 *mp_w_AdRaw; /*point to RAM where store the sampled AD sw input value */
uint16 e_w_SrcVoltRef; /*this is the standard AD value assumed as the pull up source, for example,
5V or 12V, please up scaled by 100 times*/
uint16 *e_p_SrcVolt; /*point to RAM where store the sampled ref pull up voltage value, up scaled by
100 */
const uint8 *e_p_SwId; /*first switch in the list of Input_Switches_t, others must be just next to this one*/
TeSW_AdRngCal const * e_p_AdRngCal; /*point to mapping info array*/
uint8 e_u_RngArrSize; /*total number of AD switch mapping information, dimension of the array*/
uint16 e_w_SwDbcTime; /*the debouce time to take input as stable status, in ms*/
const OS_EVENTID_TYPE e_t_EvntId_RngChng; //range change event ID
//const OS_EVENTID_TYPE *e_t_EvntId_RngChng; //range change event ID
} TeADSW_GrupInfo;
#define SWCFG_ADGRUP_PASSPNDNG_TIME(x) KaADSW_h_GrupInfo[x].e_w_PassPendingTime
#define SWCFG_ADGRUP_DBC_TIME(x) KaADSW_h_GrupInfo[x].e_w_SwDbcTime
#define SWCFG_ADRNG_SIZE(groupId) KaADSW_h_GrupInfo[groupId].e_u_RngArrSize
#define SWCFG_ADGRUP_EVENTID_RNGCHNG(groupId) KaADSW_h_GrupInfo[groupId].e_t_EvntId_RngChng
#define SWCFG_ADGRUP_EVENTID_RNGCHNG_ARR(groupId, EvtId) KaADSW_h_GrupInfo[groupId].e_t_EvntId_RngChng[EvtId]
/*AD range ID data structure*/
typedef struct
{
uint8 m_u_PrevAdRangeId; /*AD range id raw value in previous task cycle*/
uint8 m_u_AdRangeId_Flt; /*AD range id filtered value in current task cycle*/
} TeADSW_GrupStat;
/*******************************************************************************
| Global Variables with extern linkage
|******************************************************************************/
extern TeADSW_GrupStat VaADSW_h_GrupStat[SWGRUP_NUM];
extern TeSW_CmmnStat VaSW_h_CmmnStat[SWID_NUM];
extern TeSW_CmmnFailFlags VaSW_h_CmmnFFlg[SWID_NUM];
extern uint8 VaSW_u_OBDIStat[(OBDI_Num+7)/8];
extern uint16 VeSW_w_BatVoltRef;
#if 0
/*uOBDI_ID*/
#define GetOBDI_Stat(uOBDI_ID) Read_Buf_Bit(VaSW_u_OBDIStat,uOBDI_ID)
/*uOBDI_ID-
*bVal - TRUE/FALSE
*/
#define SetOBDI_Stat(uOBDI_ID, bVal) Ctrl_Buf_Bit(VaSW_u_OBDIStat,uOBDI_ID,bVal)
#endif
#define CAL_START_CAL1_SECT
#include "MemMap.h"
extern const TeADSW_GrupInfo KaADSW_h_GrupInfo[SWGRUP_NUM];
extern const TeSW_CmmnSwInfo KaSW_h_CmmnSwInfo[SWID_NUM];
extern const TeSW_h_OBDIInfo KaSW_h_OBDIInfo[OBDI_Num];
#define CAL_STOP_CAL1_SECT
#include "MemMap.h"
//#pragma DATA_SEG RUN_KAM
extern TeSW_CmmnStat RaSW_h_CmmnStat[SWID_NUM];
//#pragma DATA_SEG DEFAULT
/*******************************************************************************
| Global Function Prototypes
|******************************************************************************/
void InitSW_OnSysRst(void);
void ResetSW_DiagStat(void);
void SavSW_PreSysSleep(void);
void SwtAb_Handler(void);
uint8 ScanSW_WkupPort(void);
#endif
<file_sep>/BSP/MCAL/Generic/Compiler/GHS/Translation_File/Translation_Fx4.h
/*============================================================================*/
/* Project = AUTOSAR NEC Xx4 MCAL Components */
/* File name = Translation_Fx4.h */
/* Version = 3.0.15a */
/* Date = 22-Sep-2010 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2010 by NEC Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This translation file maps device file macros with user defined (NEC_Xx4) */
/* macros. Generator uses this translation file inorder to avoid hardcoding */
/* of base addressess or the usage of device header file macros directly. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* NEC Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by NEC. Any warranty */
/* is expressly disclaimed and excluded by NEC, either expressed or implied, */
/* including but not limited to those for non-infringement of intellectual */
/* property, merchantability and/or fitness for the particular purpose. */
/* */
/* NEC shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall NEC be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. NEC shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by NEC in connection with the Product(s) and/or the */
/* Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Fx4 */
/* Compiler: GHS V5.1.6c */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 22-Jun-2010 : Initial version
* V3.0.1: 23-Jun-2010 : Macros for port module added.
* V3.0.2: 30-Jun-2010 : Macros for ICU and ADC Driver are added.
* V3.0.3: 02-Jul-2010 : Macros for ADC and Timers are updated to have the
* interrupt number on left hand side.
* V3.0.4: 06-Jul-2010 : Macros for MCU updated.
* V3.0.5: 07-Jul-2010 : HW Unit 1 Macros for ADC added.
* V3.0.6: 08-Jul-2010 : HW Unit 1 channel Macros for ADC added.
* V3.0.7: 09-Jul-2010 : Macros for SPI are added.
* V3.0.8: 13-Jul-2010 : Macros for PORT are added.
* V3.0.9: 19-Jul-2010 : Macros for LIN are updated.
* V3.0.10: 21-Jul-2010 : Macros for ICU updated.
* V3.0.11: 26-Jul-2010 : Macros for DLY and PIC Macro are added for PWM.
* V3.0.12: 28-Jul-2010 : Macro NEC_DLYA0CMPm is updated to NEC_DLYA0CMP0m
* Macros for MCU added.
* V3.0.13: 29-Jul-2010 : Macros for CAN updated.
* V3.0.14: 02-Aug-2010 : Macro NEC_DLYAEN is added for PWM module.
* V3.0.15: 03-Sep-2010 : Macros for ICU are updated for Previous Input
* control register.
* V3.0.15a: 22-Sep-2010 : Macros for ICU are updated for External Interrupt
* edge detection registers(INTP11-INTP15)
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Macros for Watchdog Driver **
*******************************************************************************/
#define NEC_WDTA0WDTE WDTA0WDTE
#define NEC_WDTA0EVAC WDTA0EVAC
#define NEC_WDTA0REF WDTA0REF
#define NEC_WDTA0MD WDTA0MD
#define NEC_WDTA1WDTE WDTA1WDTE
#define NEC_WDTA1EVAC WDTA1EVAC
#define NEC_WDTA1REF WDTA1REF
#define NEC_WDTA1MD WDTA1MD
/*******************************************************************************
** Macros for ADC Driver **
*******************************************************************************/
#define NEC_DTRS0 DTRS0
#define NEC_DTRS1 DTRS1
#define NEC_DTRS2 DTRS2
#define NEC_DTRS3 DTRS3
#define NEC_DTRS4 DTRS4
#define NEC_DTRS5 DTRS5
#define NEC_DTRS6 DTRS6
#define NEC_DTRS7 DTRS7
#define NEC_DSA0L DSA0L
#define NEC_DSA1L DSA1L
#define NEC_DSA2L DSA2L
#define NEC_DSA3L DSA3L
#define NEC_DSA4L DSA4L
#define NEC_DSA5L DSA5L
#define NEC_DSA6L DSA6L
#define NEC_DSA7L DSA7L
#define NEC_ADCA0DB0CR ADCA0DB0CR
#define NEC_ADCA0DB1CR ADCA0DB1CR
#define NEC_ADCA0DB2CR ADCA0DB2CR
#define NEC_ADCA1DB0CR ADCA1DB0CR
#define NEC_ADCA1DB1CR ADCA1DB1CR
#define NEC_ADCA1DB2CR ADCA1DB2CR
#define NEC_DMACT0IC_119 ICDMA0
#define NEC_DMACT1IC_120 ICDMA1
#define NEC_DMACT2IC_121 ICDMA2
#define NEC_DMACT3IC_122 ICDMA3
#define NEC_DMACT4IC_123 ICDMA4
#define NEC_DMACT5IC_124 ICDMA5
#define NEC_DMACT6IC_125 ICDMA6
#define NEC_DMACT7IC_126 ICDMA7
#define NEC_ADCA0CG0 ADCA0CG0
#define NEC_ADCA0CTL0 ADCA0CTL0
#define NEC_ADCA1CG0 ADCA1CG0
#define NEC_ADCA1CTL0 ADCA1CTL0
#define NEC_ADCA0C00CR ADCA0C00CR
#define NEC_ADCA0C01CR ADCA0C01CR
#define NEC_ADCA0C02CR ADCA0C02CR
#define NEC_ADCA0C03CR ADCA0C03CR
#define NEC_ADCA0C04CR ADCA0C04CR
#define NEC_ADCA0C05CR ADCA0C05CR
#define NEC_ADCA0C06CR ADCA0C06CR
#define NEC_ADCA0C07CR ADCA0C07CR
#define NEC_ADCA0C08CR ADCA0C08CR
#define NEC_ADCA0C09CR ADCA0C09CR
#define NEC_ADCA0C10CR ADCA0C10CR
#define NEC_ADCA0C11CR ADCA0C11CR
#define NEC_ADCA0C12CR ADCA0C12CR
#define NEC_ADCA0C13CR ADCA0C13CR
#define NEC_ADCA0C14CR ADCA0C14CR
#define NEC_ADCA0C15CR ADCA0C15CR
#define NEC_ADCA0C16CR ADCA0C16CR
#define NEC_ADCA0C17CR ADCA0C17CR
#define NEC_ADCA0C18CR ADCA0C18CR
#define NEC_ADCA0C19CR ADCA0C19CR
#define NEC_ADCA0C20CR ADCA0C20CR
#define NEC_ADCA0C21CR ADCA0C21CR
#define NEC_ADCA0C22CR ADCA0C22CR
#define NEC_ADCA0C23CR ADCA0C23CR
#define NEC_ADCA0C24CR ADCA0C24CR
#define NEC_ADCA0DGCR ADCA0DGCR
#define NEC_ADCA1C00CR ADCA1C00CR
#define NEC_ADCA1C01CR ADCA1C01CR
#define NEC_ADCA1C02CR ADCA1C02CR
#define NEC_ADCA1C03CR ADCA1C03CR
#define NEC_ADCA1C04CR ADCA1C04CR
#define NEC_ADCA1C05CR ADCA1C05CR
#define NEC_ADCA1C06CR ADCA1C06CR
#define NEC_ADCA1C07CR ADCA1C07CR
#define NEC_ADCA1C08CR ADCA1C08CR
#define NEC_ADCA1C09CR ADCA1C09CR
#define NEC_ADCA1C10CR ADCA1C10CR
#define NEC_ADCA1C11CR ADCA1C11CR
#define NEC_ADCA1C12CR ADCA1C12CR
#define NEC_ADCA1C13CR ADCA1C13CR
#define NEC_ADCA1C14CR ADCA1C14CR
#define NEC_ADCA1C15CR ADCA1C15CR
#define NEC_ADCA1C16CR ADCA1C16CR
#define NEC_ADCA1C17CR ADCA1C17CR
#define NEC_ADCA1C18CR ADCA1C18CR
#define NEC_ADCA1C19CR ADCA1C19CR
#define NEC_ADCA1C20CR ADCA1C20CR
#define NEC_ADCA1C21CR ADCA1C21CR
#define NEC_ADCA1C22CR ADCA1C22CR
#define NEC_ADCA1C23CR ADCA1C23CR
#define NEC_ADCA1C24CR ADCA1C24CR
#define NEC_ADCA1DGCR ADCA1DGCR
#define NEC_ADCA0TG0IC_101_102_103 ICADCA0I0
#define NEC_ADCA1TG0IC_143_144_145 ICADCA1I0
#define NEC_DTFR0 DTFR0
#define NEC_DTFR1 DTFR1
#define NEC_DTFR2 DTFR2
#define NEC_DTFR3 DTFR3
#define NEC_DTFR4 DTFR4
#define NEC_DTFR5 DTFR5
#define NEC_DTFR6 DTFR6
#define NEC_DTFR7 DTFR7
#define NEC_DRQCLR DRQCLR
/*******************************************************************************
** Common Macros for ICU, GPT and PWM Drivers **
*******************************************************************************/
/* Base address of the TAUA0 channel 0 registers structure */
#define NEC_TAUA0CDR0 TAUA0CDR0
/* Base address of the TAUA0 channel 1 registers structure */
#define NEC_TAUA0CDR1 TAUA0CDR1
/* Base address of the TAUA0 channel 2 registers structure */
#define NEC_TAUA0CDR2 TAUA0CDR2
/* Base address of the TAUA0 channel 3 registers structure */
#define NEC_TAUA0CDR3 TAUA0CDR3
/* Base address of the TAUA0 channel 4 registers structure */
#define NEC_TAUA0CDR4 TAUA0CDR4
/* Base address of the TAUA0 channel 5 registers structure */
#define NEC_TAUA0CDR5 TAUA0CDR5
/* Base address of the TAUA0 channel 6 registers structure */
#define NEC_TAUA0CDR6 TAUA0CDR6
/* Base address of the TAUA0 channel 7 registers structure */
#define NEC_TAUA0CDR7 TAUA0CDR7
/* Base address of the TAUA0 channel 8 registers structure */
#define NEC_TAUA0CDR8 TAUA0CDR8
/* Base address of the TAUA0 channel 9 registers structure */
#define NEC_TAUA0CDR9 TAUA0CDR9
/* Base address of the TAUA0 channel 10 registers structure */
#define NEC_TAUA0CDR10 TAUA0CDR10
/* Base address of the TAUA0 channel 11 registers structure */
#define NEC_TAUA0CDR11 TAUA0CDR11
/* Base address of the TAUA0 channel 12 registers structure */
#define NEC_TAUA0CDR12 TAUA0CDR12
/* Base address of the TAUA0 channel 13 registers structure */
#define NEC_TAUA0CDR13 TAUA0CDR13
/* Base address of the TAUA0 channel 14 registers structure */
#define NEC_TAUA0CDR14 TAUA0CDR14
/* Base address of the TAUA0 channel 15 registers structure */
#define NEC_TAUA0CDR15 TAUA0CDR15
/* Base address of the TAUA1 channel 0 registers structure */
#define NEC_TAUA1CDR0 TAUA1CDR0
/* Base address of the TAUA1 channel 1 registers structure */
#define NEC_TAUA1CDR1 TAUA1CDR1
/* Base address of the TAUA1 channel 2 registers structure */
#define NEC_TAUA1CDR2 TAUA1CDR2
/* Base address of the TAUA1 channel 3 registers structure */
#define NEC_TAUA1CDR3 TAUA1CDR3
/* Base address of the TAUA1 channel 4 registers structure */
#define NEC_TAUA1CDR4 TAUA1CDR4
/* Base address of the TAUA1 channel 5 registers structure */
#define NEC_TAUA1CDR5 TAUA1CDR5
/* Base address of the TAUA1 channel 6 registers structure */
#define NEC_TAUA1CDR6 TAUA1CDR6
/* Base address of the TAUA1 channel 7 registers structure */
#define NEC_TAUA1CDR7 TAUA1CDR7
/* Base address of the TAUA1 channel 8 registers structure */
#define NEC_TAUA1CDR8 TAUA1CDR8
/* Base address of the TAUA1 channel 9 registers structure */
#define NEC_TAUA1CDR9 TAUA1CDR9
/* Base address of the TAUA1 channel 10 registers structure */
#define NEC_TAUA1CDR10 TAUA1CDR10
/* Base address of the TAUA1 channel 11 registers structure */
#define NEC_TAUA1CDR11 TAUA1CDR11
/* Base address of the TAUA1 channel 12 registers structure */
#define NEC_TAUA1CDR12 TAUA1CDR12
/* Base address of the TAUA1 channel 13 registers structure */
#define NEC_TAUA1CDR13 TAUA1CDR13
/* Base address of the TAUA1 channel 14 registers structure */
#define NEC_TAUA1CDR14 TAUA1CDR14
/* Base address of the TAUA1 channel 15 registers structure */
#define NEC_TAUA1CDR15 TAUA1CDR15
/* Base address of the TAUA2 channel 0 registers structure */
#define NEC_TAUA2CDR0 TAUA2CDR0
/* Base address of the TAUA2 channel 1 registers structure */
#define NEC_TAUA2CDR1 TAUA2CDR1
/* Base address of the TAUA2 channel 2 registers structure */
#define NEC_TAUA2CDR2 TAUA2CDR2
/* Base address of the TAUA2 channel 3 registers structure */
#define NEC_TAUA2CDR3 TAUA2CDR3
/* Base address of the TAUA2 channel 4 registers structure */
#define NEC_TAUA2CDR4 TAUA2CDR4
/* Base address of the TAUA2 channel 5 registers structure */
#define NEC_TAUA2CDR5 TAUA2CDR5
/* Base address of the TAUA2 channel 6 registers structure */
#define NEC_TAUA2CDR6 TAUA2CDR6
/* Base address of the TAUA2 channel 7 registers structure */
#define NEC_TAUA2CDR7 TAUA2CDR7
/* Base address of the TAUA2 channel 8 registers structure */
#define NEC_TAUA2CDR8 TAUA2CDR8
/* Base address of the TAUA2 channel 9 registers structure */
#define NEC_TAUA2CDR9 TAUA2CDR9
/* Base address of the TAUA2 channel 10 registers structure */
#define NEC_TAUA2CDR10 TAUA2CDR10
/* Base address of the TAUA2 channel 11 registers structure */
#define NEC_TAUA2CDR11 TAUA2CDR11
/* Base address of the TAUA2 channel 12 registers structure */
#define NEC_TAUA2CDR12 TAUA2CDR12
/* Base address of the TAUA2 channel 13 registers structure */
#define NEC_TAUA2CDR13 TAUA2CDR13
/* Base address of the TAUA2 channel 14 registers structure */
#define NEC_TAUA2CDR14 TAUA2CDR14
/* Base address of the TAUA2 channel 15 registers structure */
#define NEC_TAUA2CDR15 TAUA2CDR15
/* Base address of the TAUA3 channel 0 registers structure */
#define NEC_TAUA3CDR0 TAUA3CDR0
/* Base address of the TAUA3 channel 1 registers structure */
#define NEC_TAUA3CDR1 TAUA3CDR1
/* Base address of the TAUA3 channel 2 registers structure */
#define NEC_TAUA3CDR2 TAUA3CDR2
/* Base address of the TAUA3 channel 3 registers structure */
#define NEC_TAUA3CDR3 TAUA3CDR3
/* Base address of the TAUA3 channel 4 registers structure */
#define NEC_TAUA3CDR4 TAUA3CDR4
/* Base address of the TAUA3 channel 5 registers structure */
#define NEC_TAUA3CDR5 TAUA3CDR5
/* Base address of the TAUA3 channel 6 registers structure */
#define NEC_TAUA3CDR6 TAUA3CDR6
/* Base address of the TAUA3 channel 7 registers structure */
#define NEC_TAUA3CDR7 TAUA3CDR7
/* Base address of the TAUA3 channel 8 registers structure */
#define NEC_TAUA3CDR8 TAUA3CDR8
/* Base address of the TAUA3 channel 9 registers structure */
#define NEC_TAUA3CDR9 TAUA3CDR9
/* Base address of the TAUA3 channel 10 registers structure */
#define NEC_TAUA3CDR10 TAUA3CDR10
/* Base address of the TAUA3 channel 11 registers structure */
#define NEC_TAUA3CDR11 TAUA3CDR11
/* Base address of the TAUA3 channel 12 registers structure */
#define NEC_TAUA3CDR12 TAUA3CDR12
/* Base address of the TAUA3 channel 13 registers structure */
#define NEC_TAUA3CDR13 TAUA3CDR13
/* Base address of the TAUA3 channel 14 registers structure */
#define NEC_TAUA3CDR14 TAUA3CDR14
/* Base address of the TAUA3 channel 15 registers structure */
#define NEC_TAUA3CDR15 TAUA3CDR15
/* Base address of the TAUA4 channel 0 registers structure */
#define NEC_TAUA4CDR0 TAUA4CDR0
/* Base address of the TAUA4 channel 1 registers structure */
#define NEC_TAUA4CDR1 TAUA4CDR1
/* Base address of the TAUA4 channel 2 registers structure */
#define NEC_TAUA4CDR2 TAUA4CDR2
/* Base address of the TAUA4 channel 3 registers structure */
#define NEC_TAUA4CDR3 TAUA4CDR3
/* Base address of the TAUA4 channel 4 registers structure */
#define NEC_TAUA4CDR4 TAUA4CDR4
/* Base address of the TAUA4 channel 5 registers structure */
#define NEC_TAUA4CDR5 TAUA4CDR5
/* Base address of the TAUA4 channel 6 registers structure */
#define NEC_TAUA4CDR6 TAUA4CDR6
/* Base address of the TAUA4 channel 7 registers structure */
#define NEC_TAUA4CDR7 TAUA4CDR7
/* Base address of the TAUA4 channel 8 registers structure */
#define NEC_TAUA4CDR8 TAUA4CDR8
/* Base address of the TAUA4 channel 9 registers structure */
#define NEC_TAUA4CDR9 TAUA4CDR9
/* Base address of the TAUA4 channel 10 registers structure */
#define NEC_TAUA4CDR10 TAUA4CDR10
/* Base address of the TAUA4 channel 11 registers structure */
#define NEC_TAUA4CDR11 TAUA4CDR11
/* Base address of the TAUA4 channel 12 registers structure */
#define NEC_TAUA4CDR12 TAUA4CDR12
/* Base address of the TAUA4 channel 13 registers structure */
#define NEC_TAUA4CDR13 TAUA4CDR13
/* Base address of the TAUA4 channel 14 registers structure */
#define NEC_TAUA4CDR14 TAUA4CDR14
/* Base address of the TAUA4 channel 15 registers structure */
#define NEC_TAUA4CDR15 TAUA4CDR15
/* Base address of the TAUB1 channel 0 registers structure */
#define NEC_TAUB1CDR0 TAUB1CDR0
/* Base address of the TAUB1 channel 1 registers structure */
#define NEC_TAUB1CDR1 TAUB1CDR1
/* Base address of the TAUB1 channel 2 registers structure */
#define NEC_TAUB1CDR2 TAUB1CDR2
/* Base address of the TAUB1 channel 3 registers structure */
#define NEC_TAUB1CDR3 TAUB1CDR3
/* Base address of the TAUB1 channel 4 registers structure */
#define NEC_TAUB1CDR4 TAUB1CDR4
/* Base address of the TAUB1 channel 5 registers structure */
#define NEC_TAUB1CDR5 TAUB1CDR5
/* Base address of the TAUB1 channel 6 registers structure */
#define NEC_TAUB1CDR6 TAUB1CDR6
/* Base address of the TAUB1 channel 7 registers structure */
#define NEC_TAUB1CDR7 TAUB1CDR7
/* Base address of the TAUB1 channel 8 registers structure */
#define NEC_TAUB1CDR8 TAUB1CDR8
/* Base address of the TAUB1 channel 9 registers structure */
#define NEC_TAUB1CDR9 TAUB1CDR9
/* Base address of the TAUB1 channel 10 registers structure */
#define NEC_TAUB1CDR10 TAUB1CDR10
/* Base address of the TAUB1 channel 11 registers structure */
#define NEC_TAUB1CDR11 TAUB1CDR11
/* Base address of the TAUB1 channel 12 registers structure */
#define NEC_TAUB1CDR12 TAUB1CDR12
/* Base address of the TAUB1 channel 13 registers structure */
#define NEC_TAUB1CDR13 TAUB1CDR13
/* Base address of the TAUB1 channel 14 registers structure */
#define NEC_TAUB1CDR14 TAUB1CDR14
/* Base address of the TAUB1 channel 15 registers structure */
#define NEC_TAUB1CDR15 TAUB1CDR15
/* Base address of the TAUC2 channel 0 registers structure */
#define NEC_TAUC2CDR0 TAUC2CDR0
/* Base address of the TAUC2 channel 1 registers structure */
#define NEC_TAUC2CDR1 TAUC2CDR1
/* Base address of the TAUC2 channel 2 registers structure */
#define NEC_TAUC2CDR2 TAUC2CDR2
/* Base address of the TAUC2 channel 3 registers structure */
#define NEC_TAUC2CDR3 TAUC2CDR3
/* Base address of the TAUC2 channel 4 registers structure */
#define NEC_TAUC2CDR4 TAUC2CDR4
/* Base address of the TAUC2 channel 5 registers structure */
#define NEC_TAUC2CDR5 TAUC2CDR5
/* Base address of the TAUC2 channel 6 registers structure */
#define NEC_TAUC2CDR6 TAUC2CDR6
/* Base address of the TAUC2 channel 7 registers structure */
#define NEC_TAUC2CDR7 TAUC2CDR7
/* Base address of the TAUC2 channel 8 registers structure */
#define NEC_TAUC2CDR8 TAUC2CDR8
/* Base address of the TAUC2 channel 9 registers structure */
#define NEC_TAUC2CDR9 TAUC2CDR9
/* Base address of the TAUC2 channel 10 registers structure */
#define NEC_TAUC2CDR10 TAUC2CDR10
/* Base address of the TAUC2 channel 11 registers structure */
#define NEC_TAUC2CDR11 TAUC2CDR11
/* Base address of the TAUC2 channel 12 registers structure */
#define NEC_TAUC2CDR12 TAUC2CDR12
/* Base address of the TAUC2 channel 13 registers structure */
#define NEC_TAUC2CDR13 TAUC2CDR13
/* Base address of the TAUC2 channel 14 registers structure */
#define NEC_TAUC2CDR14 TAUC2CDR14
/* Base address of the TAUC2 channel 15 registers structure */
#define NEC_TAUC2CDR15 TAUC2CDR15
/* Base address of the TAUC3 channel 0 registers structure */
#define NEC_TAUC3CDR0 TAUC3CDR0
/* Base address of the TAUC3 channel 1 registers structure */
#define NEC_TAUC3CDR1 TAUC3CDR1
/* Base address of the TAUC3 channel 2 registers structure */
#define NEC_TAUC3CDR2 TAUC3CDR2
/* Base address of the TAUC3 channel 3 registers structure */
#define NEC_TAUC3CDR3 TAUC3CDR3
/* Base address of the TAUC3 channel 4 registers structure */
#define NEC_TAUC3CDR4 TAUC3CDR4
/* Base address of the TAUC3 channel 5 registers structure */
#define NEC_TAUC3CDR5 TAUC3CDR5
/* Base address of the TAUC3 channel 6 registers structure */
#define NEC_TAUC3CDR6 TAUC3CDR6
/* Base address of the TAUC3 channel 7 registers structure */
#define NEC_TAUC3CDR7 TAUC3CDR7
/* Base address of the TAUC3 channel 8 registers structure */
#define NEC_TAUC3CDR8 TAUC3CDR8
/* Base address of the TAUC3 channel 9 registers structure */
#define NEC_TAUC3CDR9 TAUC3CDR9
/* Base address of the TAUC3 channel 10 registers structure */
#define NEC_TAUC3CDR10 TAUC3CDR10
/* Base address of the TAUC3 channel 11 registers structure */
#define NEC_TAUC3CDR11 TAUC3CDR11
/* Base address of the TAUC3 channel 12 registers structure */
#define NEC_TAUC3CDR12 TAUC3CDR12
/* Base address of the TAUC3 channel 13 registers structure */
#define NEC_TAUC3CDR13 TAUC3CDR13
/* Base address of the TAUC3 channel 14 registers structure */
#define NEC_TAUC3CDR14 TAUC3CDR14
/* Base address of the TAUC3 channel 15 registers structure */
#define NEC_TAUC3CDR15 TAUC3CDR15
/* Base address of the TAUC4 channel 0 registers structure */
#define NEC_TAUC4CDR0 TAUC4CDR0
/* Base address of the TAUC4 channel 1 registers structure */
#define NEC_TAUC4CDR1 TAUC4CDR1
/* Base address of the TAUC4 channel 2 registers structure */
#define NEC_TAUC4CDR2 TAUC4CDR2
/* Base address of the TAUC4 channel 3 registers structure */
#define NEC_TAUC4CDR3 TAUC4CDR3
/* Base address of the TAUC4 channel 4 registers structure */
#define NEC_TAUC4CDR4 TAUC4CDR4
/* Base address of the TAUC4 channel 5 registers structure */
#define NEC_TAUC4CDR5 TAUC4CDR5
/* Base address of the TAUC4 channel 6 registers structure */
#define NEC_TAUC4CDR6 TAUC4CDR6
/* Base address of the TAUC4 channel 7 registers structure */
#define NEC_TAUC4CDR7 TAUC4CDR7
/* Base address of the TAUC4 channel 8 registers structure */
#define NEC_TAUC4CDR8 TAUC4CDR8
/* Base address of the TAUC4 channel 9 registers structure */
#define NEC_TAUC4CDR9 TAUC4CDR9
/* Base address of the TAUC4 channel 10 registers structure */
#define NEC_TAUC4CDR10 TAUC4CDR10
/* Base address of the TAUC4 channel 11 registers structure */
#define NEC_TAUC4CDR11 TAUC4CDR11
/* Base address of the TAUC4 channel 12 registers structure */
#define NEC_TAUC4CDR12 TAUC4CDR12
/* Base address of the TAUC4 channel 13 registers structure */
#define NEC_TAUC4CDR13 TAUC4CDR13
/* Base address of the TAUC4 channel 14 registers structure */
#define NEC_TAUC4CDR14 TAUC4CDR14
/* Base address of the TAUC4 channel 15 registers structure */
#define NEC_TAUC4CDR15 TAUC4CDR15
/* Base address of the TAUC5 channel 0 registers structure */
#define NEC_TAUC5CDR0 TAUC5CDR0
/* Base address of the TAUC5 channel 1 registers structure */
#define NEC_TAUC5CDR1 TAUC5CDR1
/* Base address of the TAUC5 channel 2 registers structure */
#define NEC_TAUC5CDR2 TAUC5CDR2
/* Base address of the TAUC5 channel 3 registers structure */
#define NEC_TAUC5CDR3 TAUC5CDR3
/* Base address of the TAUC5 channel 4 registers structure */
#define NEC_TAUC5CDR4 TAUC5CDR4
/* Base address of the TAUC5 channel 5 registers structure */
#define NEC_TAUC5CDR5 TAUC5CDR5
/* Base address of the TAUC5 channel 6 registers structure */
#define NEC_TAUC5CDR6 TAUC5CDR6
/* Base address of the TAUC5 channel 7 registers structure */
#define NEC_TAUC5CDR7 TAUC5CDR7
/* Base address of the TAUC5 channel 8 registers structure */
#define NEC_TAUC5CDR8 TAUC5CDR8
/* Base address of the TAUC5 channel 9 registers structure */
#define NEC_TAUC5CDR9 TAUC5CDR9
/* Base address of the TAUC5 channel 10 registers structure */
#define NEC_TAUC5CDR10 TAUC5CDR10
/* Base address of the TAUC5 channel 11 registers structure */
#define NEC_TAUC5CDR11 TAUC5CDR11
/* Base address of the TAUC5 channel 12 registers structure */
#define NEC_TAUC5CDR12 TAUC5CDR12
/* Base address of the TAUC5 channel 13 registers structure */
#define NEC_TAUC5CDR13 TAUC5CDR13
/* Base address of the TAUC5 channel 14 registers structure */
#define NEC_TAUC5CDR14 TAUC5CDR14
/* Base address of the TAUC5 channel 15 registers structure */
#define NEC_TAUC5CDR15 TAUC5CDR15
/* Base address of the TAUC6 channel 0 registers structure */
#define NEC_TAUC6CDR0 TAUC6CDR0
/* Base address of the TAUC6 channel 1 registers structure */
#define NEC_TAUC6CDR1 TAUC6CDR1
/* Base address of the TAUC6 channel 2 registers structure */
#define NEC_TAUC6CDR2 TAUC6CDR2
/* Base address of the TAUC6 channel 3 registers structure */
#define NEC_TAUC6CDR3 TAUC6CDR3
/* Base address of the TAUC6 channel 4 registers structure */
#define NEC_TAUC6CDR4 TAUC6CDR4
/* Base address of the TAUC6 channel 5 registers structure */
#define NEC_TAUC6CDR5 TAUC6CDR5
/* Base address of the TAUC6 channel 6 registers structure */
#define NEC_TAUC6CDR6 TAUC6CDR6
/* Base address of the TAUC6 channel 7 registers structure */
#define NEC_TAUC6CDR7 TAUC6CDR7
/* Base address of the TAUC6 channel 8 registers structure */
#define NEC_TAUC6CDR8 TAUC6CDR8
/* Base address of the TAUC6 channel 9 registers structure */
#define NEC_TAUC6CDR9 TAUC6CDR9
/* Base address of the TAUC6 channel 10 registers structure */
#define NEC_TAUC6CDR10 TAUC6CDR10
/* Base address of the TAUC6 channel 11 registers structure */
#define NEC_TAUC6CDR11 TAUC6CDR11
/* Base address of the TAUC6 channel 12 registers structure */
#define NEC_TAUC6CDR12 TAUC6CDR12
/* Base address of the TAUC6 channel 13 registers structure */
#define NEC_TAUC6CDR13 TAUC6CDR13
/* Base address of the TAUC6 channel 14 registers structure */
#define NEC_TAUC6CDR14 TAUC6CDR14
/* Base address of the TAUC6 channel 15 registers structure */
#define NEC_TAUC6CDR15 TAUC6CDR15
/* Base address of the TAUJ0 channel 0 registers structure */
#define NEC_TAUJ0CDR0 TAUJ0CDR0
/* Base address of the TAUJ0 channel 1 registers structure */
#define NEC_TAUJ0CDR1 TAUJ0CDR1
/* Base address of the TAUJ0 channel 2 registers structure */
#define NEC_TAUJ0CDR2 TAUJ0CDR2
/* Base address of the TAUJ0 channel 3 registers structure */
#define NEC_TAUJ0CDR3 TAUJ0CDR3
/* Base address of the TAUJ1 channel 0 registers structure */
#define NEC_TAUJ1CDR0 TAUJ1CDR0
/* Base address of the TAUJ1 channel 1 registers structure */
#define NEC_TAUJ1CDR1 TAUJ1CDR1
/* Base address of the TAUJ1 channel 2 registers structure */
#define NEC_TAUJ1CDR2 TAUJ1CDR2
/* Base address of the TAUJ1 channel 3 registers structure */
#define NEC_TAUJ1CDR3 TAUJ1CDR3
/* Base address of the TAUJ2 channel 0 registers structure */
#define NEC_TAUJ2CDR0 TAUJ2CDR0
/* Base address of the TAUJ2 channel 1 registers structure */
#define NEC_TAUJ2CDR1 TAUJ2CDR1
/* Base address of the TAUJ2 channel 2 registers structure */
#define NEC_TAUJ2CDR2 TAUJ2CDR2
/* Base address of the TAUJ2 channel 3 registers structure */
#define NEC_TAUJ2CDR3 TAUJ2CDR3
/* Base address of the TAUA Unit user control registers structure */
#define NEC_TAUA0TOL TAUA0TOL
#define NEC_TAUA1TOL TAUA1TOL
#define NEC_TAUA2TOL TAUA2TOL
#define NEC_TAUA3TOL TAUA3TOL
#define NEC_TAUA4TOL TAUA4TOL
/* Base address of the TAUA Unit OS control registers structure */
#define NEC_TAUA0TPS TAUA0TPS
#define NEC_TAUA1TPS TAUA1TPS
#define NEC_TAUA2TPS TAUA2TPS
#define NEC_TAUA3TPS TAUA3TPS
#define NEC_TAUA4TPS TAUA4TPS
/* Base address of the TAUB Unit user control registers structure */
#define NEC_TAUB1TOL TAUB1TOL
/* Base address of the TAUC Unit user control registers structure */
#define NEC_TAUC2TOL TAUC2TOL
#define NEC_TAUC3TOL TAUC3TOL
#define NEC_TAUC4TOL TAUC4TOL
#define NEC_TAUC5TOL TAUC5TOL
#define NEC_TAUC6TOL TAUC6TOL
/* Base address of the TAUB Unit user control registers structure */
#define NEC_TAUB1TPS TAUB1TPS
/* Base address of the TAUB Unit user control registers structure */
#define NEC_TAUC2TPS TAUC2TPS
#define NEC_TAUC3TPS TAUC3TPS
#define NEC_TAUC4TPS TAUC4TPS
#define NEC_TAUC5TPS TAUC5TPS
#define NEC_TAUC6TPS TAUC6TPS
/* Base address of the TAUJ Unit user control registers structure for PWM */
#define NEC_TAUJ0TE TAUJ0TE
#define NEC_TAUJ1TE TAUJ1TE
#define NEC_TAUJ2TE TAUJ2TE
/* Base address of the TAUJ Unit user control registers structure for GPT */
#define NEC_TAUJ0TS TAUJ0TS
#define NEC_TAUJ1TS TAUJ1TS
#define NEC_TAUJ2TS TAUJ2TS
/* Base address of the TAUJ Unit OS control registers structure */
#define NEC_TAUJ0TPS TAUJ0TPS
#define NEC_TAUJ1TPS TAUJ1TPS
#define NEC_TAUJ2TPS TAUJ2TPS
/* Base address of the TAUA0 registers structure */
#define NEC_TAUA0CMOR0 TAUA0CMOR0
#define NEC_TAUA0CMOR1 TAUA0CMOR1
#define NEC_TAUA0CMOR2 TAUA0CMOR2
#define NEC_TAUA0CMOR3 TAUA0CMOR3
#define NEC_TAUA0CMOR4 TAUA0CMOR4
#define NEC_TAUA0CMOR5 TAUA0CMOR5
#define NEC_TAUA0CMOR6 TAUA0CMOR6
#define NEC_TAUA0CMOR7 TAUA0CMOR7
#define NEC_TAUA0CMOR8 TAUA0CMOR8
#define NEC_TAUA0CMOR9 TAUA0CMOR9
#define NEC_TAUA0CMOR10 TAUA0CMOR10
#define NEC_TAUA0CMOR11 TAUA0CMOR11
#define NEC_TAUA0CMOR12 TAUA0CMOR12
#define NEC_TAUA0CMOR13 TAUA0CMOR13
#define NEC_TAUA0CMOR14 TAUA0CMOR14
#define NEC_TAUA0CMOR15 TAUA0CMOR15
/* Base address of the TAUA1 registers structure */
#define NEC_TAUA1CMOR0 TAUA1CMOR0
#define NEC_TAUA1CMOR1 TAUA1CMOR1
#define NEC_TAUA1CMOR2 TAUA1CMOR2
#define NEC_TAUA1CMOR3 TAUA1CMOR3
#define NEC_TAUA1CMOR4 TAUA1CMOR4
#define NEC_TAUA1CMOR5 TAUA1CMOR5
#define NEC_TAUA1CMOR6 TAUA1CMOR6
#define NEC_TAUA1CMOR7 TAUA1CMOR7
#define NEC_TAUA1CMOR8 TAUA1CMOR8
#define NEC_TAUA1CMOR9 TAUA1CMOR9
#define NEC_TAUA1CMOR10 TAUA1CMOR10
#define NEC_TAUA1CMOR11 TAUA1CMOR11
#define NEC_TAUA1CMOR12 TAUA1CMOR12
#define NEC_TAUA1CMOR13 TAUA1CMOR13
#define NEC_TAUA1CMOR14 TAUA1CMOR14
#define NEC_TAUA1CMOR15 TAUA1CMOR15
/* Base address of the TAUA2 registers structure */
#define NEC_TAUA2CMOR0 TAUA2CMOR0
#define NEC_TAUA2CMOR1 TAUA2CMOR1
#define NEC_TAUA2CMOR2 TAUA2CMOR2
#define NEC_TAUA2CMOR3 TAUA2CMOR3
#define NEC_TAUA2CMOR4 TAUA2CMOR4
#define NEC_TAUA2CMOR5 TAUA2CMOR5
#define NEC_TAUA2CMOR6 TAUA2CMOR6
#define NEC_TAUA2CMOR7 TAUA2CMOR7
#define NEC_TAUA2CMOR8 TAUA2CMOR8
#define NEC_TAUA2CMOR9 TAUA2CMOR9
#define NEC_TAUA2CMOR10 TAUA2CMOR10
#define NEC_TAUA2CMOR11 TAUA2CMOR11
#define NEC_TAUA2CMOR12 TAUA2CMOR12
#define NEC_TAUA2CMOR13 TAUA2CMOR13
#define NEC_TAUA2CMOR14 TAUA2CMOR14
#define NEC_TAUA2CMOR15 TAUA2CMOR15
/* Base address of the TAUA3 registers structure */
#define NEC_TAUA3CMOR0 TAUA3CMOR0
#define NEC_TAUA3CMOR1 TAUA3CMOR1
#define NEC_TAUA3CMOR2 TAUA3CMOR2
#define NEC_TAUA3CMOR3 TAUA3CMOR3
#define NEC_TAUA3CMOR4 TAUA3CMOR4
#define NEC_TAUA3CMOR5 TAUA3CMOR5
#define NEC_TAUA3CMOR6 TAUA3CMOR6
#define NEC_TAUA3CMOR7 TAUA3CMOR7
#define NEC_TAUA3CMOR8 TAUA3CMOR8
#define NEC_TAUA3CMOR9 TAUA3CMOR9
#define NEC_TAUA3CMOR10 TAUA3CMOR10
#define NEC_TAUA3CMOR11 TAUA3CMOR11
#define NEC_TAUA3CMOR12 TAUA3CMOR12
#define NEC_TAUA3CMOR13 TAUA3CMOR13
#define NEC_TAUA3CMOR14 TAUA3CMOR14
#define NEC_TAUA3CMOR15 TAUA3CMOR15
/* Base address of the TAUA4 registers structure */
#define NEC_TAUA4CMOR0 TAUA4CMOR0
#define NEC_TAUA4CMOR1 TAUA4CMOR1
#define NEC_TAUA4CMOR2 TAUA4CMOR2
#define NEC_TAUA4CMOR3 TAUA4CMOR3
#define NEC_TAUA4CMOR4 TAUA4CMOR4
#define NEC_TAUA4CMOR5 TAUA4CMOR5
#define NEC_TAUA4CMOR6 TAUA4CMOR6
#define NEC_TAUA4CMOR7 TAUA4CMOR7
#define NEC_TAUA4CMOR8 TAUA4CMOR8
#define NEC_TAUA4CMOR9 TAUA4CMOR9
#define NEC_TAUA4CMOR10 TAUA4CMOR10
#define NEC_TAUA4CMOR11 TAUA4CMOR11
#define NEC_TAUA4CMOR12 TAUA4CMOR12
#define NEC_TAUA4CMOR13 TAUA4CMOR13
#define NEC_TAUA4CMOR14 TAUA4CMOR14
#define NEC_TAUA4CMOR15 TAUA4CMOR15
/* Base address of the TAUB1 registers structure */
#define NEC_TAUB1CMOR0 TAUB1CMOR0
#define NEC_TAUB1CMOR1 TAUB1CMOR1
#define NEC_TAUB1CMOR2 TAUB1CMOR2
#define NEC_TAUB1CMOR3 TAUB1CMOR3
#define NEC_TAUB1CMOR4 TAUB1CMOR4
#define NEC_TAUB1CMOR5 TAUB1CMOR5
#define NEC_TAUB1CMOR6 TAUB1CMOR6
#define NEC_TAUB1CMOR7 TAUB1CMOR7
#define NEC_TAUB1CMOR8 TAUB1CMOR8
#define NEC_TAUB1CMOR9 TAUB1CMOR9
#define NEC_TAUB1CMOR10 TAUB1CMOR10
#define NEC_TAUB1CMOR11 TAUB1CMOR11
#define NEC_TAUB1CMOR12 TAUB1CMOR12
#define NEC_TAUB1CMOR13 TAUB1CMOR13
#define NEC_TAUB1CMOR14 TAUB1CMOR14
#define NEC_TAUB1CMOR15 TAUB1CMOR15
/* Base address of the TAUC2 registers structure */
#define NEC_TAUC2CMOR0 TAUC2CMOR0
#define NEC_TAUC2CMOR1 TAUC2CMOR1
#define NEC_TAUC2CMOR2 TAUC2CMOR2
#define NEC_TAUC2CMOR3 TAUC2CMOR3
#define NEC_TAUC2CMOR4 TAUC2CMOR4
#define NEC_TAUC2CMOR5 TAUC2CMOR5
#define NEC_TAUC2CMOR6 TAUC2CMOR6
#define NEC_TAUC2CMOR7 TAUC2CMOR7
#define NEC_TAUC2CMOR8 TAUC2CMOR8
#define NEC_TAUC2CMOR9 TAUC2CMOR9
#define NEC_TAUC2CMOR10 TAUC2CMOR10
#define NEC_TAUC2CMOR11 TAUC2CMOR11
#define NEC_TAUC2CMOR12 TAUC2CMOR12
#define NEC_TAUC2CMOR13 TAUC2CMOR13
#define NEC_TAUC2CMOR14 TAUC2CMOR14
#define NEC_TAUC2CMOR15 TAUC2CMOR15
/* Base address of the TAUC3 registers structure */
#define NEC_TAUC3CMOR0 TAUC3CMOR0
#define NEC_TAUC3CMOR1 TAUC3CMOR1
#define NEC_TAUC3CMOR2 TAUC3CMOR2
#define NEC_TAUC3CMOR3 TAUC3CMOR3
#define NEC_TAUC3CMOR4 TAUC3CMOR4
#define NEC_TAUC3CMOR5 TAUC3CMOR5
#define NEC_TAUC3CMOR6 TAUC3CMOR6
#define NEC_TAUC3CMOR7 TAUC3CMOR7
#define NEC_TAUC3CMOR8 TAUC3CMOR8
#define NEC_TAUC3CMOR9 TAUC3CMOR9
#define NEC_TAUC3CMOR10 TAUC3CMOR10
#define NEC_TAUC3CMOR11 TAUC3CMOR11
#define NEC_TAUC3CMOR12 TAUC3CMOR12
#define NEC_TAUC3CMOR13 TAUC3CMOR13
#define NEC_TAUC3CMOR14 TAUC3CMOR14
#define NEC_TAUC3CMOR15 TAUC3CMOR15
/* Base address of the TAUC4 registers structure */
#define NEC_TAUC4CMOR0 TAUC4CMOR0
#define NEC_TAUC4CMOR1 TAUC4CMOR1
#define NEC_TAUC4CMOR2 TAUC4CMOR2
#define NEC_TAUC4CMOR3 TAUC4CMOR3
#define NEC_TAUC4CMOR4 TAUC4CMOR4
#define NEC_TAUC4CMOR5 TAUC4CMOR5
#define NEC_TAUC4CMOR6 TAUC4CMOR6
#define NEC_TAUC4CMOR7 TAUC4CMOR7
#define NEC_TAUC4CMOR8 TAUC4CMOR8
#define NEC_TAUC4CMOR9 TAUC4CMOR9
#define NEC_TAUC4CMOR10 TAUC4CMOR10
#define NEC_TAUC4CMOR11 TAUC4CMOR11
#define NEC_TAUC4CMOR12 TAUC4CMOR12
#define NEC_TAUC4CMOR13 TAUC4CMOR13
#define NEC_TAUC4CMOR14 TAUC4CMOR14
#define NEC_TAUC4CMOR15 TAUC4CMOR15
/* Base address of the TAUC5 registers structure */
#define NEC_TAUC5CMOR0 TAUC5CMOR0
#define NEC_TAUC5CMOR1 TAUC5CMOR1
#define NEC_TAUC5CMOR2 TAUC5CMOR2
#define NEC_TAUC5CMOR3 TAUC5CMOR3
#define NEC_TAUC5CMOR4 TAUC5CMOR4
#define NEC_TAUC5CMOR5 TAUC5CMOR5
#define NEC_TAUC5CMOR6 TAUC5CMOR6
#define NEC_TAUC5CMOR7 TAUC5CMOR7
#define NEC_TAUC5CMOR8 TAUC5CMOR8
#define NEC_TAUC5CMOR9 TAUC5CMOR9
#define NEC_TAUC5CMOR10 TAUC5CMOR10
#define NEC_TAUC5CMOR11 TAUC5CMOR11
#define NEC_TAUC5CMOR12 TAUC5CMOR12
#define NEC_TAUC5CMOR13 TAUC5CMOR13
#define NEC_TAUC5CMOR14 TAUC5CMOR14
#define NEC_TAUC5CMOR15 TAUC5CMOR15
/* Base address of the TAUC6 registers structure */
#define NEC_TAUC6CMOR0 TAUC6CMOR0
#define NEC_TAUC6CMOR1 TAUC6CMOR1
#define NEC_TAUC6CMOR2 TAUC6CMOR2
#define NEC_TAUC6CMOR3 TAUC6CMOR3
#define NEC_TAUC6CMOR4 TAUC6CMOR4
#define NEC_TAUC6CMOR5 TAUC6CMOR5
#define NEC_TAUC6CMOR6 TAUC6CMOR6
#define NEC_TAUC6CMOR7 TAUC6CMOR7
#define NEC_TAUC6CMOR8 TAUC6CMOR8
#define NEC_TAUC6CMOR9 TAUC6CMOR9
#define NEC_TAUC6CMOR10 TAUC6CMOR10
#define NEC_TAUC6CMOR11 TAUC6CMOR11
#define NEC_TAUC6CMOR12 TAUC6CMOR12
#define NEC_TAUC6CMOR13 TAUC6CMOR13
#define NEC_TAUC6CMOR14 TAUC6CMOR14
#define NEC_TAUC6CMOR15 TAUC6CMOR15
/* Base address of the TAUC7 registers structure */
#define NEC_TAUC7CMOR0 TAUC7CMOR0
#define NEC_TAUC7CMOR1 TAUC7CMOR1
#define NEC_TAUC7CMOR2 TAUC7CMOR2
#define NEC_TAUC7CMOR3 TAUC7CMOR3
#define NEC_TAUC7CMOR4 TAUC7CMOR4
#define NEC_TAUC7CMOR5 TAUC7CMOR5
#define NEC_TAUC7CMOR6 TAUC7CMOR6
#define NEC_TAUC7CMOR7 TAUC7CMOR7
#define NEC_TAUC7CMOR8 TAUC7CMOR8
#define NEC_TAUC7CMOR9 TAUC7CMOR9
#define NEC_TAUC7CMOR10 TAUC7CMOR10
#define NEC_TAUC7CMOR11 TAUC7CMOR11
#define NEC_TAUC7CMOR12 TAUC7CMOR12
#define NEC_TAUC7CMOR13 TAUC7CMOR13
#define NEC_TAUC7CMOR14 TAUC7CMOR14
#define NEC_TAUC7CMOR15 TAUC7CMOR15
/* Base address of the TAUJ0 registers structure */
#define NEC_TAUJ0CMOR0 TAUJ0CMOR0
#define NEC_TAUJ0CMOR1 TAUJ0CMOR1
#define NEC_TAUJ0CMOR2 TAUJ0CMOR2
#define NEC_TAUJ0CMOR3 TAUJ0CMOR3
/* Base address of the TAUJ1 registers structure */
#define NEC_TAUJ1CMOR0 TAUJ1CMOR0
#define NEC_TAUJ1CMOR1 TAUJ1CMOR1
#define NEC_TAUJ1CMOR2 TAUJ1CMOR2
#define NEC_TAUJ1CMOR3 TAUJ1CMOR3
/* Base address of the TAUJ2 registers structure */
#define NEC_TAUJ2CMOR0 TAUJ2CMOR0
#define NEC_TAUJ2CMOR1 TAUJ2CMOR1
#define NEC_TAUJ2CMOR2 TAUJ2CMOR2
#define NEC_TAUJ2CMOR3 TAUJ2CMOR3
/* Interrupt control registers for TAUA */
#define NEC_ICTAUA0I0_20 ICTAUA0I0
#define NEC_ICTAUA0I1_21 ICTAUA0I1
#define NEC_ICTAUA0I2_22 ICTAUA0I2
#define NEC_ICTAUA0I3_23 ICTAUA0I3
#define NEC_ICTAUA0I4_24 ICTAUA0I4
#define NEC_ICTAUA0I5_25 ICTAUA0I5
#define NEC_ICTAUA0I6_26 ICTAUA0I6
#define NEC_ICTAUA0I7_27 ICTAUA0I7
#define NEC_ICTAUA0I8_28 ICTAUA0I8
#define NEC_ICTAUA0I9_29 ICTAUA0I9
#define NEC_ICTAUA0I10_30 ICTAUA0I10
#define NEC_ICTAUA0I11_31 ICTAUA0I11
#define NEC_ICTAUA0I12_32 ICTAUA0I12
#define NEC_ICTAUA0I13_33 ICTAUA0I13
#define NEC_ICTAUA0I14_34 ICTAUA0I14
#define NEC_ICTAUA0I15_35 ICTAUA0I15
#define NEC_ICTAUA1I0 ICTAUA1I0
#define NEC_ICTAUA1I1 ICTAUA1I1
#define NEC_ICTAUA1I2 ICTAUA1I2
#define NEC_ICTAUA1I3 ICTAUA1I3
#define NEC_ICTAUA1I4 ICTAUA1I4
#define NEC_ICTAUA1I5 ICTAUA1I5
#define NEC_ICTAUA1I6 ICTAUA1I6
#define NEC_ICTAUA1I7 ICTAUA1I7
#define NEC_ICTAUA1I8 ICTAUA1I8
#define NEC_ICTAUA1I9 ICTAUA1I9
#define NEC_ICTAUA1I10 ICTAUA1I10
#define NEC_ICTAUA1I11 ICTAUA1I11
#define NEC_ICTAUA1I12 ICTAUA1I12
#define NEC_ICTAUA1I13 ICTAUA1I13
#define NEC_ICTAUA1I14 ICTAUA1I14
#define NEC_ICTAUA1I15 ICTAUA1I15
#define NEC_ICTAUA2I0 ICTAUA2I0
#define NEC_ICTAUA2I1 ICTAUA2I1
#define NEC_ICTAUA2I2 ICTAUA2I2
#define NEC_ICTAUA2I3 ICTAUA2I3
#define NEC_ICTAUA2I4 ICTAUA2I4
#define NEC_ICTAUA2I5 ICTAUA2I5
#define NEC_ICTAUA2I6 ICTAUA2I6
#define NEC_ICTAUA2I7 ICTAUA2I7
#define NEC_ICTAUA2I8 ICTAUA2I8
#define NEC_ICTAUA2I9 ICTAUA2I9
#define NEC_ICTAUA2I10 ICTAUA2I10
#define NEC_ICTAUA2I11 ICTAUA2I11
#define NEC_ICTAUA2I12 ICTAUA2I12
#define NEC_ICTAUA2I13 ICTAUA2I13
#define NEC_ICTAUA2I14 ICTAUA2I14
#define NEC_ICTAUA2I15 ICTAUA2I15
#define NEC_ICTAUA3I0 ICTAUA3I0
#define NEC_ICTAUA3I1 ICTAUA3I1
#define NEC_ICTAUA3I2 ICTAUA3I2
#define NEC_ICTAUA3I3 ICTAUA3I3
#define NEC_ICTAUA3I4 ICTAUA3I4
#define NEC_ICTAUA3I5 ICTAUA3I5
#define NEC_ICTAUA3I6 ICTAUA3I6
#define NEC_ICTAUA3I7 ICTAUA3I7
#define NEC_ICTAUA3I8 ICTAUA3I8
#define NEC_ICTAUA3I9 ICTAUA3I9
#define NEC_ICTAUA3I10 ICTAUA3I10
#define NEC_ICTAUA3I11 ICTAUA3I11
#define NEC_ICTAUA3I12 ICTAUA3I12
#define NEC_ICTAUA3I13 ICTAUA3I13
#define NEC_ICTAUA3I14 ICTAUA3I14
#define NEC_ICTAUA3I15 ICTAUA3I15
#define NEC_ICTAUA4I0 ICTAUA4I0
#define NEC_ICTAUA4I1 ICTAUA4I1
#define NEC_ICTAUA4I2 ICTAUA4I2
#define NEC_ICTAUA4I3 ICTAUA4I3
#define NEC_ICTAUA4I4 ICTAUA4I4
#define NEC_ICTAUA4I5 ICTAUA4I5
#define NEC_ICTAUA4I6 ICTAUA4I6
#define NEC_ICTAUA4I7 ICTAUA4I7
#define NEC_ICTAUA4I8 ICTAUA4I8
#define NEC_ICTAUA4I9 ICTAUA4I9
#define NEC_ICTAUA4I10 ICTAUA4I10
#define NEC_ICTAUA4I11 ICTAUA4I11
#define NEC_ICTAUA4I12 ICTAUA4I12
#define NEC_ICTAUA4I13 ICTAUA4I13
#define NEC_ICTAUA4I14 ICTAUA4I14
#define NEC_ICTAUA4I15 ICTAUA4I15
/* Interrupt control registers for TAUB */
#define NEC_ICTAUB1I0_36 ICTAUB1I0
#define NEC_ICTAUB1I1_37 ICTAUB1I1
#define NEC_ICTAUB1I2_38 ICTAUB1I2
#define NEC_ICTAUB1I3_39 ICTAUB1I3
#define NEC_ICTAUB1I4_40 ICTAUB1I4
#define NEC_ICTAUB1I5_41 ICTAUB1I5
#define NEC_ICTAUB1I6_42 ICTAUB1I6
#define NEC_ICTAUB1I7_43 ICTAUB1I7
#define NEC_ICTAUB1I8_44 ICTAUB1I8
#define NEC_ICTAUB1I9_45 ICTAUB1I9
#define NEC_ICTAUB1I10_46 ICTAUB1I10
#define NEC_ICTAUB1I11_47 ICTAUB1I11
#define NEC_ICTAUB1I12_48 ICTAUB1I12
#define NEC_ICTAUB1I13_49 ICTAUB1I13
#define NEC_ICTAUB1I14_50 ICTAUB1I14
#define NEC_ICTAUB1I15_51 ICTAUB1I15
/* Interrupt control registers for TAUC */
#define NEC_ICTAUC2I0_52 ICTAUC2I0
#define NEC_ICTAUC2I1_53 ICTAUC2I1
#define NEC_ICTAUC2I2_54 ICTAUC2I2
#define NEC_ICTAUC2I3_55 ICTAUC2I3
#define NEC_ICTAUC2I4_56 ICTAUC2I4
#define NEC_ICTAUC2I5_57 ICTAUC2I5
#define NEC_ICTAUC2I6_58 ICTAUC2I6
#define NEC_ICTAUC2I7_59 ICTAUC2I7
#define NEC_ICTAUC2I8_60 ICTAUC2I8
#define NEC_ICTAUC2I9_61 ICTAUC2I9
#define NEC_ICTAUC2I10_62 ICTAUC2I10
#define NEC_ICTAUC2I11_63 ICTAUC2I11
#define NEC_ICTAUC2I12_64 ICTAUC2I12
#define NEC_ICTAUC2I13_65 ICTAUC2I13
#define NEC_ICTAUC2I14_66 ICTAUC2I14
#define NEC_ICTAUC2I15_67 ICTAUC2I15
#define NEC_ICTAUC3I0_68 ICTAUC3I0
#define NEC_ICTAUC3I1_69 ICTAUC3I1
#define NEC_ICTAUC3I2_70 ICTAUC3I2
#define NEC_ICTAUC3I3_71 ICTAUC3I3
#define NEC_ICTAUC3I4_72 ICTAUC3I4
#define NEC_ICTAUC3I5_73 ICTAUC3I5
#define NEC_ICTAUC3I6_74 ICTAUC3I6
#define NEC_ICTAUC3I7_75 ICTAUC3I7
#define NEC_ICTAUC3I8_76 ICTAUC3I8
#define NEC_ICTAUC3I9_77 ICTAUC3I9
#define NEC_ICTAUC3I10_78 ICTAUC3I10
#define NEC_ICTAUC3I11_79 ICTAUC3I11
#define NEC_ICTAUC3I12_80 ICTAUC3I12
#define NEC_ICTAUC3I13_81 ICTAUC3I13
#define NEC_ICTAUC3I14_82 ICTAUC3I14
#define NEC_ICTAUC3I15_83 ICTAUC3I15
#define NEC_ICTAUC4I0_84 ICTAUC4I0
#define NEC_ICTAUC4I1_85 ICTAUC4I1
#define NEC_ICTAUC4I2_86 ICTAUC4I2
#define NEC_ICTAUC4I3_87 ICTAUC4I3
#define NEC_ICTAUC4I4_88 ICTAUC4I4
#define NEC_ICTAUC4I5_89 ICTAUC4I5
#define NEC_ICTAUC4I6_90 ICTAUC4I6
#define NEC_ICTAUC4I7_91 ICTAUC4I7
#define NEC_ICTAUC4I8_92 ICTAUC4I8
#define NEC_ICTAUC4I9_93 ICTAUC4I9
#define NEC_ICTAUC4I10_94 ICTAUC4I10
#define NEC_ICTAUC4I11_95 ICTAUC4I11
#define NEC_ICTAUC4I12_96 ICTAUC4I12
#define NEC_ICTAUC4I13_97 ICTAUC4I13
#define NEC_ICTAUC4I14_98 ICTAUC4I14
#define NEC_ICTAUC4I15_99 ICTAUC4I15
/*#define NEC_ICTAUC5I0 ICTAUC5I0
#define NEC_ICTAUC5I1 ICTAUC5I1
#define NEC_ICTAUC5I2 ICTAUC5I2
#define NEC_ICTAUC5I3 ICTAUC5I3
#define NEC_ICTAUC5I4 ICTAUC5I4
#define NEC_ICTAUC5I5 ICTAUC5I5
#define NEC_ICTAUC5I6 ICTAUC5I6
#define NEC_ICTAUC5I7 ICTAUC5I7
#define NEC_ICTAUC5I8 ICTAUC5I8
#define NEC_ICTAUC5I9 ICTAUC5I9
#define NEC_ICTAUC5I10 ICTAUC5I10
#define NEC_ICTAUC5I11 ICTAUC5I11
#define NEC_ICTAUC5I12 ICTAUC5I12
#define NEC_ICTAUC5I13 ICTAUC5I13
#define NEC_ICTAUC5I14 ICTAUC5I14
#define NEC_ICTAUC5I15 ICTAUC5I15
#define NEC_ICTAUC6I0 ICTAUC6I0
#define NEC_ICTAUC6I1 ICTAUC6I1
#define NEC_ICTAUC6I2 ICTAUC6I2
#define NEC_ICTAUC6I3 ICTAUC6I3
#define NEC_ICTAUC6I4 ICTAUC6I4
#define NEC_ICTAUC6I5 ICTAUC6I5
#define NEC_ICTAUC6I6 ICTAUC6I6
#define NEC_ICTAUC6I7 ICTAUC6I7
#define NEC_ICTAUC6I8 ICTAUC6I8
#define NEC_ICTAUC6I9 ICTAUC6I9
#define NEC_ICTAUC6I10 ICTAUC6I10
#define NEC_ICTAUC6I11 ICTAUC6I11
#define NEC_ICTAUC6I12 ICTAUC6I12
#define NEC_ICTAUC6I13 ICTAUC6I13
#define NEC_ICTAUC6I14 ICTAUC6I14
#define NEC_ICTAUC6I15 ICTAUC6I15 */
/* Interrupt control registers for TAUJ */
#define NEC_ICTAUJ0I0_135 ICTAUJ0I0
#define NEC_ICTAUJ0I1_136 ICTAUJ0I1
#define NEC_ICTAUJ0I2_137 ICTAUJ0I2
#define NEC_ICTAUJ0I3_138 ICTAUJ0I3
#define NEC_ICTAUJ1I0_139 ICTAUJ1I0
#define NEC_ICTAUJ1I1_140 ICTAUJ1I1
#define NEC_ICTAUJ1I2_141 ICTAUJ1I2
#define NEC_ICTAUJ1I3_142 ICTAUJ1I3
#define NEC_ICTAUJ2I0 ICTAUJ2I0
#define NEC_ICTAUJ2I1 ICTAUJ2I1
#define NEC_ICTAUJ2I2 ICTAUJ2I2
#define NEC_ICTAUJ2I3 ICTAUJ2I3
/* Interrupt control registers for OSTM0 */
#define NEC_ICOSTM0IIC ICOSTM0_147
/*******************************************************************************
** Macros for PWM Driver **
*******************************************************************************/
/* Delay Macro Control Registers */
#define NEC_DLYA0CTL0 DLYA0CTL00
#define NEC_DLYA0CTL1 DLYA0CTL01
#define NEC_DLYA0CMP00 DLYA0CMP00
#define NEC_DLYA0CMP01 DLYA0CMP01
#define NEC_DLYA0CMP02 DLYA0CMP02
#define NEC_DLYA0CMP03 DLYA0CMP03
#define NEC_DLYA0CMP04 DLYA0CMP04
#define NEC_DLYA0CMP05 DLYA0CMP05
#define NEC_DLYA0CMP06 DLYA0CMP06
#define NEC_DLYA0CMP07 DLYA0CMP07
#define NEC_DLYA0CMP10 DLYA0CMP10
#define NEC_DLYA0CMP11 DLYA0CMP11
#define NEC_DLYA0CMP12 DLYA0CMP12
#define NEC_DLYA0CMP13 DLYA0CMP13
#define NEC_DLYA0CMP14 DLYA0CMP14
#define NEC_DLYA0CMP15 DLYA0CMP15
#define NEC_DLYA0CMP16 DLYA0CMP16
#define NEC_DLYA0CMP17 DLYA0CMP17
#define NEC_DLYA0CMP20 DLYA0CMP20
#define NEC_DLYA0CMP21 DLYA0CMP21
#define NEC_DLYA0CMP22 DLYA0CMP22
#define NEC_DLYA0CMP23 DLYA0CMP23
#define NEC_DLYA0CMP24 DLYA0CMP24
#define NEC_DLYA0CMP25 DLYA0CMP25
#define NEC_DLYA0CMP26 DLYA0CMP26
#define NEC_DLYA0CMP27 DLYA0CMP27
#define NEC_DLYA0CMP30 DLYA0CMP30
#define NEC_DLYA0CMP31 DLYA0CMP31
#define NEC_DLYA0CMP32 DLYA0CMP32
#define NEC_DLYA0CMP33 DLYA0CMP33
#define NEC_DLYA0CMP34 DLYA0CMP34
#define NEC_DLYA0CMP35 DLYA0CMP35
#define NEC_DLYA0CMP36 DLYA0CMP36
#define NEC_DLYA0CMP37 DLYA0CMP37
#define NEC_DLYA0CMP40 DLYA0CMP40
#define NEC_DLYA0CMP41 DLYA0CMP41
#define NEC_DLYA0CMP42 DLYA0CMP42
#define NEC_DLYA0CMP43 DLYA0CMP43
#define NEC_DLYA0CMP44 DLYA0CMP44
#define NEC_DLYA0CMP45 DLYA0CMP45
#define NEC_DLYA0CMP46 DLYA0CMP46
#define NEC_DLYA0CMP47 DLYA0CMP47
#define NEC_DLYA0CMP50 DLYA0CMP50
#define NEC_DLYA0CMP51 DLYA0CMP51
#define NEC_DLYA0CMP52 DLYA0CMP52
#define NEC_DLYA0CMP53 DLYA0CMP53
#define NEC_DLYA0CMP54 DLYA0CMP54
#define NEC_DLYA0CMP55 DLYA0CMP55
#define NEC_DLYA0CMP56 DLYA0CMP56
#define NEC_DLYA0CMP57 DLYA0CMP57
#define NEC_DLYA0CMP60 DLYA0CMP60
#define NEC_DLYA0CMP61 DLYA0CMP61
#define NEC_DLYA0CMP62 DLYA0CMP62
#define NEC_DLYA0CMP63 DLYA0CMP63
#define NEC_DLYA0CMP64 DLYA0CMP64
#define NEC_DLYA0CMP65 DLYA0CMP65
#define NEC_DLYA0CMP66 DLYA0CMP66
#define NEC_DLYA0CMP67 DLYA0CMP67
#define NEC_DLYA0CMP70 DLYA0CMP70
#define NEC_DLYA0CMP71 DLYA0CMP71
#define NEC_DLYA0CMP72 DLYA0CMP72
#define NEC_DLYA0CMP73 DLYA0CMP73
#define NEC_DLYA0CMP74 DLYA0CMP74
#define NEC_DLYA0CMP75 DLYA0CMP75
#define NEC_DLYA0CMP76 DLYA0CMP76
#define NEC_DLYA0CMP77 DLYA0CMP77
/* Delay enable register */
#define NEC_DLYAEN DLYAEN
/* Synchronous start of TAU Units registers */
/* Synchronous Start Trigger Register */
#define NEC_PIC0SST PIC0SST
/* Synchronous Start Enable Register 0 for TAUA0 */
#define NEC_PIC0SSER0 PIC0SSER0
/* Synchronous Start Enable Register 1 for TAUA1 */
#define NEC_PIC0SSER1 PIC0SSER1
/* Synchronous Start Enable Register 2 for TAUJ0 and TAUJ1 */
#define NEC_PIC0SSER2 PIC0SSER2
/* Address for the PMCA register */
#define NEC_PMCA0CTL1 PMCA0CTL1
/*******************************************************************************
** Macros for ICU Driver **
*******************************************************************************/
/* Interrupt control registers for External Interrupts */
#define NEC_ICP0_9 ICP0
#define NEC_ICP1_10 ICP1
#define NEC_ICP2_11 ICP2
#define NEC_ICP3_12 ICP3
#define NEC_ICP4_13 ICP4
#define NEC_ICP5_14 ICP5
#define NEC_ICP6_15 ICP6
#define NEC_ICP7_16 ICP7
#define NEC_ICP8_17 ICP8
#define NEC_ICP9_18 ICP9
#define NEC_ICP10_19 ICP10
#define NEC_ICP11_208 ICP11
#define NEC_ICP12_209 ICP12
#define NEC_ICP13_210 ICP13
#define NEC_ICP14_211 ICP14
#define NEC_ICP15_212 ICP15
/* External Interrupt edge detection registers */
#define NEC_FCLA_INTP0 FCLA0CTL0
#define NEC_FCLA_INTP1 FCLA0CTL1
#define NEC_FCLA_INTP2 FCLA0CTL2
#define NEC_FCLA_INTP3 FCLA0CTL3
#define NEC_FCLA_INTP4 FCLA0CTL4
#define NEC_FCLA_INTP5 FCLA0CTL5
#define NEC_FCLA_INTP6 FCLA0CTL6
#define NEC_FCLA_INTP7 FCLA0CTL7
#define NEC_FCLA_INTP8 FCLA1CTL0
#define NEC_FCLA_INTP9 FCLA1CTL1
#define NEC_FCLA_INTP10 FCLA1CTL2
#define NEC_FCLA_INTP11 FCLA1CTL3
#define NEC_FCLA_INTP12 FCLA1CTL4
#define NEC_FCLA_INTP13 FCLA1CTL5
#define NEC_FCLA_INTP14 FCLA1CTL6
#define NEC_FCLA_INTP15 FCLA1CTL7
/* Previous Input control registers */
#define NEC_TISLTA0 TISLTA0
/*******************************************************************************
** Macros for GPT Driver **
*******************************************************************************/
/* Base address of the OSTM0 channel 0 registers structure */
#define NEC_OSTM0CMP OSTM0CMP
/* Base address of the OSTM0 channel 0 registers structure */
#define NEC_OSTM0CTL OSTM0CTL
/*******************************************************************************
** Macros for FLS Software Component **
*******************************************************************************/
#define NEC_FLMDCNT FLMDCNT
#define NEC_FLMDPCMD FLMDPCMD
/*******************************************************************************
** Macros for PORT Driver **
*******************************************************************************/
#define NEC_P0 P0
#define NEC_PSR0 PSR0
#define NEC_PPR0 PPR0
#define NEC_PM0 PM0
#define NEC_PMC0 PMC0
#define NEC_PFC0 PFC0
#define NEC_PFCE0 PFCE0
#define NEC_PNOT0 PNOT0
#define NEC_PMSR0 PMSR0
#define NEC_PMCSR0 PMCSR0
#define NEC_PIBC0 PIBC0
#define NEC_PBDC0 PBDC0
#define NEC_PIPC0 PIPC0
#define NEC_PU0 PU0
#define NEC_PD0 PD0
#define NEC_PODC0 PODC0
#define NEC_PDSC0 PDSC0
#define NEC_PIS0 PIS0
#define NEC_PISE0 PISE0
#define NEC_PPROTS0 PPROTS0
#define NEC_PPCMD0 PPCMD0
#define NEC_P1 P1
#define NEC_PSR1 PSR1
#define NEC_PPR1 PPR1
#define NEC_PM1 PM1
#define NEC_PMC1 PMC1
#define NEC_PFC1 PFC1
#define NEC_PFCE1 PFCE1
#define NEC_PNOT1 PNOT1
#define NEC_PMSR1 PMSR1
#define NEC_PMCSR1 PMCSR1
#define NEC_PIBC1 PIBC1
#define NEC_PBDC1 PBDC1
#define NEC_PIPC1 PIPC1
#define NEC_PU1 PU1
#define NEC_PD1 PD1
#define NEC_PODC1 PODC1
#define NEC_PDSC1 PDSC1
#define NEC_PIS1 PIS1
#define NEC_PISE1 PISE1
#define NEC_PPROTS1 PPROTS1
#define NEC_PPCMD1 PPCMD1
#define NEC_P2 P2
#define NEC_PSR2 PSR2
#define NEC_PPR2 PPR2
#define NEC_PM2 PM2
#define NEC_PMC2 PMC2
#define NEC_PFC2 PFC2
#define NEC_PFCE2 PFCE2
#define NEC_PNOT2 PNOT2
#define NEC_PMSR2 PMSR2
#define NEC_PMCSR2 PMCSR2
#define NEC_PIBC2 PIBC2
#define NEC_PBDC2 PBDC2
#define NEC_PIPC2 PIPC2
#define NEC_PU2 PU2
#define NEC_PD2 PD2
#define NEC_PODC2 PODC2
#define NEC_PDSC2 PDSC2
#define NEC_PIS2 PIS2
#define NEC_PISE2 PISE2
#define NEC_PPROTS2 PPROTS2
#define NEC_PPCMD2 PPCMD2
#define NEC_PROTCMD2 PROTCMD2
#define NEC_PROTS2 PROTS2
#define NEC_P3 P3
#define NEC_PSR3 PSR3
#define NEC_PPR3 PPR3
#define NEC_PM3 PM3
#define NEC_PMC3 PMC3
#define NEC_PFC3 PFC3
#define NEC_PFCE3 PFCE3
#define NEC_PNOT3 PNOT3
#define NEC_PMSR3 PMSR3
#define NEC_PMCSR3 PMCSR3
#define NEC_PIBC3 PIBC3
#define NEC_PBDC3 PBDC3
#define NEC_PIPC3 PIPC3
#define NEC_PU3 PU3
#define NEC_PD3 PD3
#define NEC_PODC3 PODC3
#define NEC_PDSC3 PDSC3
#define NEC_PIS3 PIS3
#define NEC_PISE3 PISE3
#define NEC_PPROTS3 PPROTS3
#define NEC_PPCMD3 PPCMD3
#define NEC_P4 P4
#define NEC_PSR4 PSR4
#define NEC_PPR4 PPR4
#define NEC_PM4 PM4
#define NEC_PMC4 PMC4
#define NEC_PFC4 PFC4
#define NEC_PFCE4 PFCE4
#define NEC_PNOT4 PNOT4
#define NEC_PMSR4 PMSR4
#define NEC_PMCSR4 PMCSR4
#define NEC_PIBC4 PIBC4
#define NEC_PBDC4 PBDC4
#define NEC_PIPC4 PIPC4
#define NEC_PU4 PU4
#define NEC_PD4 PD4
#define NEC_PODC4 PODC4
#define NEC_PDSC4 PDSC4
#define NEC_PIS4 PIS4
#define NEC_PISE4 PISE4
#define NEC_PPROTS4 PPROTS4
#define NEC_PPCMD4 PPCMD4
#define NEC_P10 P10
#define NEC_PSR10 PSR10
#define NEC_PPR10 PPR10
#define NEC_PM10 PM10
#define NEC_PMC10 PMC10
#define NEC_PNOT10 PNOT10
#define NEC_PMSR10 PMSR10
#define NEC_PMCSR10 PMCSR10
#define NEC_PIBC10 PIBC10
#define NEC_PBDC10 PBDC10
#define NEC_PODC10 PODC10
#define NEC_PPROTS10 PPROTS10
#define NEC_PPCMD10 PPCMD10
#define NEC_P11 P11
#define NEC_PSR11 PSR11
#define NEC_PPR11 PPR11
#define NEC_PM11 PM11
#define NEC_PMC11 PMC11
#define NEC_PNOT11 PNOT11
#define NEC_PMSR11 PMSR11
#define NEC_PIBC11 PIBC11
#define NEC_PBDC11 PBDC11
#define NEC_PODC11 PODC11
#define NEC_PPROTS11 PPROTS11
#define NEC_PPCMD11 PPCMD11
#define NEC_P12 P12
#define NEC_PSR12 PSR12
#define NEC_PPR12 PPR12
#define NEC_PM12 PM12
#define NEC_PMC12 PMC12
#define NEC_PNOT12 PNOT12
#define NEC_PMSR12 PMSR12
#define NEC_PMCSR12 PMCSR12
#define NEC_PIBC12 PIBC12
#define NEC_PBDC12 PBDC12
#define NEC_PODC12 PODC12
#define NEC_PPROTS12 PPROTS12
#define NEC_PPCMD12 PPCMD12
#define NEC_P13 P13
#define NEC_PSR13 PSR13
#define NEC_PPR13 PPR13
#define NEC_PM13 PM13
#define NEC_PMC13 PMC13
#define NEC_PFC13 PFC13
#define NEC_PFCE13 PFCE13
#define NEC_PNOT13 PNOT13
#define NEC_PMSR13 PMSR13
#define NEC_PMCSR13 PMCSR13
#define NEC_PIBC13 PIBC13
#define NEC_PBDC13 PBDC13
#define NEC_PODC13 PODC13
#define NEC_PPROTS13 PPROTS13
#define NEC_PPCMD13 PPCMD13
#define NEC_P21 P21
#define NEC_PSR21 PSR21
#define NEC_PPR21 PPR21
#define NEC_PM21 PM21
#define NEC_PMC21 PMC21
#define NEC_PFC21 PFC21
#define NEC_PFCE21 PFCE21
#define NEC_PNOT21 PNOT21
#define NEC_PMSR21 PMSR21
#define NEC_PMCSR21 PMCSR21
#define NEC_PIBC21 PIBC21
#define NEC_PBDC21 PBDC21
#define NEC_PIPC21 PIPC21
#define NEC_PU21 PU21
#define NEC_PD21 PD21
#define NEC_PODC21 PODC21
#define NEC_PDSC21 PDSC21
#define NEC_PIS21 PIS21
#define NEC_PISE21 PISE21
#define NEC_PPROTS21 PPROTS21
#define NEC_PPCMD21 PPCMD21
#define NEC_P24 P24
#define NEC_PSR24 PSR24
#define NEC_PPR24 PPR24
#define NEC_PM24 PM24
#define NEC_PMC24 PMC24
#define NEC_PFC24 PFC24
#define NEC_PFCE24 PFCE24
#define NEC_PNOT24 PNOT24
#define NEC_PMSR24 PMSR24
#define NEC_PMCSR24 PMCSR24
#define NEC_PIBC24 PIBC24
#define NEC_PBDC24 PBDC24
#define NEC_PIPC24 PIPC24
#define NEC_PU24 PU24
#define NEC_PD24 PD24
#define NEC_PODC24 PODC24
#define NEC_PDSC24 PDSC24
#define NEC_PIS24 PIS24
#define NEC_PISE24 PISE24
#define NEC_PPROTS24 PPROTS24
#define NEC_PPCMD24 PPCMD24
#define NEC_P25 P25
#define NEC_PSR25 PSR25
#define NEC_PPR25 PPR25
#define NEC_PM25 PM25
#define NEC_PMC25 PMC25
#define NEC_PFC25 PFC25
#define NEC_PFCE25 PFCE25
#define NEC_PNOT25 PNOT25
#define NEC_PMSR25 PMSR25
#define NEC_PMCSR25 PMCSR25
#define NEC_PIBC25 PIBC25
#define NEC_PBDC25 PBDC25
#define NEC_PIPC25 PIPC25
#define NEC_PU25 PU25
#define NEC_PD25 PD25
#define NEC_PODC25 PODC25
#define NEC_PDSC25 PDSC25
#define NEC_PIS25 PIS25
#define NEC_PISE25 PISE25
#define NEC_PPROTS25 PPROTS25
#define NEC_PPCMD25 PPCMD25
#define NEC_P27 P27
#define NEC_PSR27 PSR27
#define NEC_PPR27 PPR27
#define NEC_PM27 PM27
#define NEC_PMC27 PMC27
#define NEC_PFC27 PFC27
#define NEC_PFCE27 PFCE27
#define NEC_PNOT27 PNOT27
#define NEC_PMSR27 PMSR27
#define NEC_PMCSR27 PMCSR27
#define NEC_PIBC27 PIBC27
#define NEC_PBDC27 PBDC27
#define NEC_PIPC27 PIPC27
#define NEC_PU27 PU27
#define NEC_PD27 PD27
#define NEC_PODC27 PODC27
#define NEC_PDSC27 PDSC27
#define NEC_PIS27 PIS27
#define NEC_PISE27 PISE27
#define NEC_PPROTS27 PPROTS27
#define NEC_PPCMD27 PPCMD27
#define NEC_JP0 JP0
#define NEC_JPSR0 JPSR0
#define NEC_JPPR0 JPPR0
#define NEC_JPM0 JPM0
#define NEC_JPMC0 JPMC0
#define NEC_JPFC0 JPFC0
#define NEC_JPNOT0 JPNOT0
#define NEC_JPMSR0 JPMSR0
#define NEC_JPMCSR0 JPMCSR0
#define NEC_JPIBC0 JPIBC0
#define NEC_JPBDC0 JPBDC0
#define NEC_JPIPC0 JPIPC0
#define NEC_JPU0 JPU0
#define NEC_JPD0 JPD0
#define NEC_JPODC0 JPODC0
#define NEC_JPDSC0 JPDSC0
#define NEC_JPIS0 JPIS0
#define NEC_JPISE0 JPISE0
#define NEC_JPPROTS0 JPPROTS0
#define NEC_JPPCMD0 JPPCMD0
#define NEC_FCLA0CTL0 FCLA0CTL0
#define NEC_FCLA0CTL1 FCLA0CTL1
#define NEC_FCLA0CTL2 FCLA0CTL2
#define NEC_FCLA0CTL3 FCLA0CTL3
#define NEC_FCLA0CTL4 FCLA0CTL4
#define NEC_FCLA0CTL5 FCLA0CTL5
#define NEC_FCLA0CTL6 FCLA0CTL6
#define NEC_FCLA0CTL7 FCLA0CTL7
#define NEC_FCLA1CTL0 FCLA1CTL0
#define NEC_FCLA1CTL1 FCLA1CTL1
#define NEC_FCLA1CTL2 FCLA1CTL2
#define NEC_FCLA1CTL3 FCLA1CTL3
#define NEC_FCLA1CTL4 FCLA1CTL4
#define NEC_FCLA1CTL5 FCLA1CTL5
#define NEC_FCLA1CTL6 FCLA1CTL6
#define NEC_FCLA1CTL7 FCLA1CTL7
#define NEC_FCLA2CTL0 FCLA2CTL0
#define NEC_FCLA2CTL1 FCLA2CTL1
#define NEC_FCLA3CTL0 FCLA3CTL0
#define NEC_FCLA3CTL1 FCLA3CTL1
#define NEC_FCLA3CTL2 FCLA3CTL2
#define NEC_FCLA3CTL3 FCLA3CTL3
#define NEC_FCLA3CTL4 FCLA3CTL4
#define NEC_FCLA3CTL5 FCLA3CTL5
#define NEC_FCLA3CTL6 FCLA3CTL6
#define NEC_FCLA3CTL7 FCLA3CTL7
#define NEC_FCLA4CTL0 FCLA4CTL0
#define NEC_FCLA4CTL1 FCLA4CTL1
#define NEC_FCLA4CTL2 FCLA4CTL2
#define NEC_FCLA4CTL3 FCLA4CTL3
#define NEC_FCLA4CTL4 FCLA4CTL4
#define NEC_FCLA4CTL5 FCLA4CTL5
#define NEC_FCLA4CTL6 FCLA4CTL6
#define NEC_FCLA4CTL7 FCLA4CTL7
#define NEC_FCLA5CTL0 FCLA5CTL0
#define NEC_FCLA5CTL1 FCLA5CTL1
#define NEC_FCLA5CTL2 FCLA5CTL2
#define NEC_FCLA5CTL3 FCLA5CTL3
#define NEC_FCLA5CTL4 FCLA5CTL4
#define NEC_FCLA5CTL5 FCLA5CTL5
#define NEC_FCLA5CTL6 FCLA5CTL6
#define NEC_FCLA5CTL7 FCLA5CTL7
#define NEC_FCLA6CTL0 FCLA6CTL0
#define NEC_FCLA6CTL1 FCLA6CTL1
#define NEC_FCLA6CTL2 FCLA6CTL2
#define NEC_FCLA6CTL3 FCLA6CTL3
#define NEC_FCLA6CTL4 FCLA6CTL4
#define NEC_FCLA6CTL5 FCLA6CTL5
#define NEC_FCLA6CTL6 FCLA6CTL6
#define NEC_FCLA6CTL7 FCLA6CTL7
#define NEC_FCLA7CTL0 FCLA7CTL0
#define NEC_FCLA7CTL1 FCLA7CTL1
#define NEC_FCLA7CTL2 FCLA7CTL2
#define NEC_FCLA7CTL3 FCLA7CTL3
#define NEC_FCLA7CTL4 FCLA7CTL4
#define NEC_FCLA7CTL5 FCLA7CTL5
#define NEC_FCLA8CTL0 FCLA8CTL0
#define NEC_FCLA8CTL1 FCLA8CTL1
#define NEC_FCLA8CTL2 FCLA8CTL2
#define NEC_FCLA8CTL3 FCLA8CTL3
#define NEC_FCLA8CTL4 FCLA8CTL4
#define NEC_FCLA8CTL5 FCLA8CTL5
#define NEC_FCLA8CTL6 FCLA8CTL6
#define NEC_FCLA8CTL7 FCLA8CTL7
#define NEC_FCLA15CTL0 FCLA15CTL0
#define NEC_FCLA15CTL1 FCLA15CTL1
#define NEC_FCLA15CTL2 FCLA15CTL2
#define NEC_FCLA15CTL3 FCLA15CTL3
#define NEC_FCLA15CTL4 FCLA15CTL4
#define NEC_FCLA16CTL0 FCLA16CTL0
#define NEC_FCLA16CTL1 FCLA16CTL1
#define NEC_FCLA16CTL2 FCLA16CTL2
#define NEC_FCLA16CTL3 FCLA16CTL3
#define NEC_FCLA16CTL4 FCLA16CTL4
#define NEC_FCLA21CTL0 FCLA21CTL0
#define NEC_FCLA21CTL1 FCLA21CTL1
#define NEC_FCLA21CTL2 FCLA21CTL2
#define NEC_FCLA21CTL3 FCLA21CTL3
#define NEC_FCLA21CTL4 FCLA21CTL4
#define NEC_FCLA21CTL5 FCLA21CTL5
#define NEC_FCLA21CTL6 FCLA21CTL6
#define NEC_FCLA21CTL7 FCLA21CTL7
#define NEC_FCLA22CTL0 FCLA22CTL0
#define NEC_FCLA22CTL1 FCLA22CTL1
#define NEC_FCLA22CTL2 FCLA22CTL2
#define NEC_FCLA22CTL3 FCLA22CTL3
#define NEC_FCLA22CTL4 FCLA22CTL4
#define NEC_FCLA22CTL5 FCLA22CTL5
#define NEC_FCLA22CTL6 FCLA22CTL6
#define NEC_FCLA22CTL7 FCLA22CTL7
#define NEC_FCLA23CTL0 FCLA23CTL0
#define NEC_FCLA23CTL1 FCLA23CTL1
#define NEC_FCLA23CTL2 FCLA23CTL2
#define NEC_FCLA23CTL3 FCLA23CTL3
#define NEC_FCLA24CTL0 FCLA24CTL0
#define NEC_FCLA24CTL1 FCLA24CTL1
#define NEC_FCLA24CTL2 FCLA24CTL2
#define NEC_FCLA24CTL3 FCLA24CTL3
#define NEC_FCLA25CTL0 FCLA25CTL0
#define NEC_FCLA25CTL1 FCLA25CTL1
#define NEC_FCLA25CTL2 FCLA25CTL2
#define NEC_FCLA25CTL3 FCLA25CTL3
#define NEC_FCLA25CTL4 FCLA25CTL4
#define NEC_FCLA25CTL5 FCLA25CTL5
#define NEC_FCLA25CTL6 FCLA25CTL6
#define NEC_FCLA25CTL7 FCLA25CTL7
#define NEC_FCLA26CTL0 FCLA26CTL0
#define NEC_FCLA26CTL1 FCLA26CTL1
#define NEC_FCLA26CTL2 FCLA26CTL2
#define NEC_FCLA26CTL3 FCLA26CTL3
#define NEC_FCLA26CTL4 FCLA26CTL4
#define NEC_FCLA26CTL5 FCLA26CTL5
#define NEC_FCLA26CTL6 FCLA26CTL6
#define NEC_FCLA26CTL7 FCLA26CTL7
#define NEC_FCLA27CTL0 FCLA27CTL0
#define NEC_FCLA27CTL1 FCLA27CTL1
#define NEC_FCLA27CTL2 FCLA27CTL2
#define NEC_FCLA27CTL3 FCLA27CTL3
#define NEC_FCLA27CTL4 FCLA27CTL4
#define NEC_FCLA27CTL5 FCLA27CTL5
#define NEC_FCLA27CTL6 FCLA27CTL6
#define NEC_FCLA27CTL7 FCLA27CTL7
#define NEC_DNFA0CTL DNFA0CTL
#define NEC_DNFA0EN DNFA0EN
#define NEC_DNFA0ENH DNFA0ENH
#define NEC_DNFA0ENL DNFA0ENL
#define NEC_DNFA1CTL DNFA1CTL
#define NEC_DNFA1EN DNFA1EN
#define NEC_DNFA1ENH DNFA1ENH
#define NEC_DNFA5CTL DNFA5CTL
#define NEC_DNFA5EN DNFA5EN
#define NEC_DNFA5ENH DNFA5ENH
#define NEC_DNFA5ENL DNFA5ENL
#define NEC_DNFA8CTL DNFA8CTL
#define NEC_DNFA8EN DNFA8EN
#define NEC_DNFA8ENH DNFA8ENH
#define NEC_DNFA8ENL DNFA8ENL
#define NEC_DNFA9CTL DNFA9CTL
#define NEC_DNFA9EN DNFA9EN
#define NEC_DNFA9ENH DNFA9ENH
#define NEC_DNFA9ENL DNFA9ENL
#define NEC_DNFA10CTL DNFA10CTL
#define NEC_DNFA10EN DNFA10EN
#define NEC_DNFA10ENH DNFA10ENH
#define NEC_DNFA10ENL DNFA10ENL
#define NEC_DNFA11CTL DNFA11CTL
#define NEC_DNFA11EN DNFA11EN
#define NEC_DNFA11ENH DNFA11ENH
#define NEC_DNFA11ENL DNFA11ENL
#define NEC_DNFA12CTL DNFA12CTL
#define NEC_DNFA12EN DNFA12EN
#define NEC_DNFA12ENH DNFA12ENH
#define NEC_DNFA12ENL DNFA12ENL
#define NEC_PSC0 PSC0
#define NEC_PSC1 PSC1
#define NEC_PWS0 PWS0
#define NEC_PWS1 PWS1
/*******************************************************************************
** Macros for MCU Driver **
*******************************************************************************/
#define NEC_CKSC_000 CKSC_000
#define NEC_CKSC_001 CKSC_001
#define NEC_CKSC_002 CKSC_002
#define NEC_CKSC_003 CKSC_003
#define NEC_CKSC_004 CKSC_004
#define NEC_CKSC_005 CKSC_005
#define NEC_CKSC_006 CKSC_006
#define NEC_CKSC_007 CKSC_007
#define NEC_CKSC_008 CKSC_008
#define NEC_CKSC_009 CKSC_009
#define NEC_CKSC_010 CKSC_010
#define NEC_CKSC_011 CKSC_011
#define NEC_CKSC_012 CKSC_012
#define NEC_CKSC_016 CKSC_016
#define NEC_CKSC_018 CKSC_018
#define NEC_CKSC_019 CKSC_019
#define NEC_CKSC_100 CKSC_100
#define NEC_CKSC_101 CKSC_101
#define NEC_CKSC_102 CKSC_102
#define NEC_CKSC_103 CKSC_103
#define NEC_CKSC_105 CKSC_105
#define NEC_CKSC_106 CKSC_106
#define NEC_CKSC_107 CKSC_107
#define NEC_CKSC_108 CKSC_108
#define NEC_CKSC_109 CKSC_109
#define NEC_CKSC_111 CKSC_111
#define NEC_CKSC_112 CKSC_112
#define NEC_CKSC_113 CKSC_113
#define NEC_CKSC_114 CKSC_114
#define NEC_CKSC_115 CKSC_115
#define NEC_CKSC_119 CKSC_119
#define NEC_CKSC_120 CKSC_120
#define NEC_CKSC_121 CKSC_121
#define NEC_CKSC_122 CKSC_122
#define NEC_CKSC_124 CKSC_124
#define NEC_CKSC_125 CKSC_125
#define NEC_CKSC_128 CKSC_128
#define NEC_CKSC_133 CKSC_133
#define NEC_CKSC_134 CKSC_134
#define NEC_CKSC_135 CKSC_135
#define NEC_CKSC_A00 CKSC_A00
#define NEC_CKSC_A01 CKSC_A01
#define NEC_CKSC_A02 CKSC_A02
#define NEC_CKSC_A03 CKSC_A03
#define NEC_CKSC_A04 CKSC_A04
#define NEC_CKSC_A05 CKSC_A05
#define NEC_CKSC_A06 CKSC_A06
#define NEC_CKSC_A07 CKSC_A07
#define NEC_CKSC_A09 CKSC_A09
#define NEC_PROTCMD0 PROTCMD0
#define NEC_PROTCMD1 PROTCMD1
#define NEC_MOSCE MOSCE
#define NEC_MOSCC MOSCC
#define NEC_MOSCST MOSCST
#define NEC_MOSCS MOSCS
#define NEC_SOSCE SOSCE
#define NEC_SOSCC SOSCC
#define NEC_SOSCST SOSCST
#define NEC_SOSCS SOSCS
#define NEC_PROTS0 PROTS0
#define NEC_PROTS1 PROTS1
#define NEC_ROSCE ROSCE
#define NEC_ROSCS ROSCS
#define NEC_PLLE0 PLLE0
#define NEC_PLLST0 PLLST0
#define NEC_PLLC0 PLLC0
#define NEC_PLLE1 PLLE1
#define NEC_PLLST1 PLLST1
#define NEC_PLLC1 PLLC1
#define NEC_PLLE2 PLLE2
#define NEC_PLLST2 PLLST2
#define NEC_PLLC2 PLLC2
#define NEC_PLLS0 PLLS0
#define NEC_PLLS1 PLLS1
#define NEC_PLLS2 PLLS2
#define NEC_SWRESA SWRESA
#define NEC_WUFL0 WUFL0
#define NEC_WUFM0 WUFM0
#define NEC_WUFH0 WUFH0
#define NEC_WUFL1 WUFL1
#define NEC_WUFM1 WUFM1
#define NEC_WUFH1 WUFH1
#define NEC_WUFCL0 WUFCL0
#define NEC_WUFCM0 WUFCM0
#define NEC_WUFCH0 WUFCH0
#define NEC_WUFCL1 WUFCL1
#define NEC_WUFCM1 WUFCM1
#define NEC_WUFCH1 WUFCH1
#define NEC_OSCWUFMSK OSCWUFMSK
#define NEC_WUFMSKL0 WUFMSKL0
#define NEC_WUFMSKM0 WUFMSKM0
#define NEC_WUFMSKH0 WUFMSKH0
#define NEC_WUFMSKL1 WUFMSKL1
#define NEC_WUFMSKM1 WUFMSKM1
#define NEC_WUFMSKH1 WUFMSKH1
#define NEC_CLMA0CMPH CLMA0CMPH
#define NEC_CLMA0CMPL CLMA0CMPL
#define NEC_CLMA0CTL0 CLMA0CTL0
#define NEC_CLMA0PCMD CLMA0PCMD
#define NEC_CLMA0PS CLMA0PS
#define NEC_CLMA2CMPH CLMA2CMPH
#define NEC_CLMA2CMPL CLMA2CMPL
#define NEC_CLMA2CTL0 CLMA2CTL0
#define NEC_CLMA2PCMD CLMA2PCMD
#define NEC_CLMA2PS CLMA2PS
#define NEC_CLMA3CMPH CLMA3CMPH
#define NEC_CLMA3CMPL CLMA3CMPL
#define NEC_CLMA3CTL0 CLMA3CTL0
#define NEC_CLMA3PCMD CLMA3PCMD
#define NEC_CLMA3PS CLMA3PS
#define NEC_LVICNT LVICNT
#define NEC_RESF RESF
#define NEC_RESFC RESFC
#define NEC_BURC BURC
#define NEC_BURAE BURAE
#define NEC_BURAEC BURAEC
#define NEC_FOUTDIV FOUTDIV
#define NEC_FOUTSTAT FOUTSTAT
#define NEC_VCPC0CTL0 VCPC0CTL0
#define NEC_VCPC0CTL1 VCPC0CTL1
/*******************************************************************************
** Macros for FR Driver **
*******************************************************************************/
#define NEC_FLX0CI FLX0CI
/*******************************************************************************
** Macros for CAN Driver **
*******************************************************************************/
/* Address of the CAN Interrupt Controller 0 Register */
#define NEC_ICFCN0ERR ICFCN0ERR
/* Address of the CAN Interrupt Controller 1 Register */
#define NEC_ICFCN1ERR ICFCN1ERR
/* Address of the CAN Interrupt Controller 2 Register */
#define NEC_ICFCN2ERR ICFCN2ERR
/* Address of the CAN Interrupt Controller 3 Register */
#define NEC_ICFCN3ERR ICFCN3ERR
/* Address of the CAN Controller 0 Register - 8 bit */
#define NEC_FCN0GMCSPRE FCN0GMCSPRE
/* Address of the CAN Controller 0 Register - 16 bit */
#define NEC_FCN0GMCLCTL FCN0GMCLCTL
/* Address of the CAN Controller 0 Register - 32 bit */
#define NEC_FCN0DNBMRX0 FCN0DNBMRX0
/* Address of the CAN Controller 1 Register - 8 bit */
#define NEC_FCN1GMCSPRE FCN1GMCSPRE
/* Address of the CAN Controller 1 Register - 16 bit */
#define NEC_FCN1GMCLCTL FCN1GMCLCTL
/* Address of the CAN Controller 1 Register - 32 bit */
#define NEC_FCN1DNBMRX0 FCN1DNBMRX0
/* Address of the CAN Controller 2 Register - 8 bit */
#define NEC_FCN2GMCSPRE FCN2GMCSPRE
/* Address of the CAN Controller 2 Register - 16 bit */
#define NEC_FCN2GMCLCTL FCN2GMCLCTL
/* Address of the CAN Controller 2 Register - 32 bit */
#define NEC_FCN2DNBMRX0 FCN2DNBMRX0
/* Address of the CAN Controller 3 Register - 8 bit */
#define NEC_FCN3GMCSPRE FCN3GMCSPRE
/* Address of the CAN Controller 3 Register - 16 bit */
#define NEC_FCN3GMCLCTL FCN3GMCLCTL
/* Address of the CAN Controller 3 Register - 32 bit */
#define NEC_FCN3DNBMRX0 FCN3DNBMRX0
/* Address of the CAN Controller 0 Wakeup Register */
#define NEC_ICFCN0WUP ICFCNWUP
/* Address of the CAN Controller 1 Wakeup Register */
#define NEC_ICFCN1WUP ICFCNWUP
/* Address of the CAN Controller 2 Wakeup Register */
#define NEC_ICFCN2WUP ICFCNWUP
/* Address of the CAN Controller 3 Wakeup Register */
#define NEC_ICFCN3WUP ICFCNWUP
/* Related to Message Buffers*/
/* Addresses for CAN Controller Hardware 1 Message Buffers*/
/* Address of the CAN Controller Hardware 0 Message Buffer 0 - 8 bit */
#define NEC_FCN0M0DAT0B FCN0M000DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 0 - 16 bit */
#define NEC_FCN0M0DAT0H FCN0M000DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 0 - 32 bit */
#define NEC_FCN0M0DAT0W FCN0M000DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 1 - 8 bit */
#define NEC_FCN0M1DAT0B FCN0M001DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 1 - 16 bit */
#define NEC_FCN0M1DAT0H FCN0M001DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 1 - 32 bit */
#define NEC_FCN0M1DAT0W FCN0M001DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 2 - 8 bit */
#define NEC_FCN0M2DAT0B FCN0M002DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 2 - 16 bit */
#define NEC_FCN0M2DAT0H FCN0M002DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 2 - 32 bit */
#define NEC_FCN0M2DAT0W FCN0M002DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 3 - 8 bit */
#define NEC_FCN0M3DAT0B FCN0M003DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 3 - 16 bit */
#define NEC_FCN0M3DAT0H FCN0M003DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 3 - 32 bit */
#define NEC_FCN0M3DAT0W FCN0M003DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 4 - 8 bit */
#define NEC_FCN0M4DAT0B FCN0M004DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 4 - 16 bit */
#define NEC_FCN0M4DAT0H FCN0M004DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 4 - 32 bit */
#define NEC_FCN0M4DAT0W FCN0M004DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 5 - 8 bit */
#define NEC_FCN0M5DAT0B FCN0M005DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 5 - 16 bit */
#define NEC_FCN0M5DAT0H FCN0M005DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 5 - 32 bit */
#define NEC_FCN0M5DAT0W FCN0M005DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 6 - 8 bit */
#define NEC_FCN0M6DAT0B FCN0M006DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 6 - 16 bit */
#define NEC_FCN0M6DAT0H FCN0M006DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 6 - 32 bit */
#define NEC_FCN0M6DAT0W FCN0M006DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 7 - 8 bit */
#define NEC_FCN0M7DAT0B FCN0M007DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 7 - 16 bit */
#define NEC_FCN0M7DAT0H FCN0M007DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer7 - 32 bit */
#define NEC_FCN0M7DAT0W FCN0M007DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 8 - 8 bit */
#define NEC_FCN0M8DAT0B FCN0M008DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 8 - 16 bit */
#define NEC_FCN0M8DAT0H FCN0M008DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 8 - 32 bit */
#define NEC_FCN0M8DAT0W FCN0M008DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 9 - 8 bit */
#define NEC_FCN0M9DAT0B FCN0M009DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 9 - 16 bit */
#define NEC_FCN0M9DAT0H FCN0M009DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 9 - 32 bit */
#define NEC_FCN0M9DAT0W FCN0M009DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 10 - 8 bit */
#define NEC_FCN0M10DAT0B FCN0M010DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 10 - 16 bit */
#define NEC_FCN0M10DAT0H FCN0M010DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 10 - 32 bit */
#define NEC_FCN0M10DAT0W FCN0M010DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 11 - 8 bit */
#define NEC_FCN0M11DAT0B FCN0M011DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 10 - 16 bit */
#define NEC_FCN0M11DAT0H FCN0M011DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 10 - 32 bit */
#define NEC_FCN0M11DAT0W FCN0M011DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 2 - 8 bit */
#define NEC_FCN0M12DAT0B FCN0M012DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 12 - 16 bit */
#define NEC_FCN0M12DAT0H FCN0M012DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 12 - 32 bit */
#define NEC_FCN0M12DAT0W FCN0M012DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 13 - 8 bit */
#define NEC_FCN0M13DAT0B FCN0M013DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 13 - 16 bit */
#define NEC_FCN0M13DAT0H FCN0M013DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 13 - 32 bit */
#define NEC_FCN0M13DAT0W FCN0M013DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 14 - 8 bit */
#define NEC_FCN0M14DAT0B FCN0M014DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 14 - 16 bit */
#define NEC_FCN0M14DAT0H FCN0M014DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 14 - 32 bit */
#define NEC_FCN0M14DAT0W FCN0M014DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 15 - 8 bit */
#define NEC_FCN0M15DAT0B FCN0M015DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 15 - 16 bit */
#define NEC_FCN0M15DAT0H FCN0M015DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 10 - 32 bit */
#define NEC_FCN0M15DAT0W FCN0M015DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 16 - 8 bit */
#define NEC_FCN0M16DAT0B FCN0M016DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 16 - 16 bit */
#define NEC_FCN0M16DAT0H FCN0M016DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 16 - 32 bit */
#define NEC_FCN0M16DAT0W FCN0M016DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 17 - 8 bit */
#define NEC_FCN0M17DAT0B FCN0M017DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 17 - 16 bit */
#define NEC_FCN0M17DAT0H FCN0M017DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 17 - 32 bit */
#define NEC_FCN0M17DAT0W FCN0M017DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 18 - 8 bit */
#define NEC_FCN0M18DAT0B FCN0M018DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 18 - 16 bit */
#define NEC_FCN0M18DAT0H FCN0M018DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 18 - 32 bit */
#define NEC_FCN0M18DAT0W FCN0M018DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 19 - 8 bit */
#define NEC_FCN0M19DAT0B FCN0M019DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 19 - 16 bit */
#define NEC_FCN0M19DAT0H FCN0M019DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 19 - 32 bit */
#define NEC_FCN0M19DAT0W FCN0M019DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 20 - 8 bit */
#define NEC_FCN0M20DAT0B FCN0M020DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 20 - 16 bit */
#define NEC_FCN0M20DAT0H FCN0M020DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 20 - 32 bit */
#define NEC_FCN0M20DAT0W FCN0M020DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 21 - 8 bit */
#define NEC_FCN0M21DAT0B FCN0M021DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 21 - 16 bit */
#define NEC_FCN0M21DAT0H FCN0M021DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 21 - 32 bit */
#define NEC_FCN0M21DAT0W FCN0M021DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 22 - 8 bit */
#define NEC_FCN0M22DAT0B FCN0M022DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 22 - 16 bit */
#define NEC_FCN0M22DAT0H FCN0M022DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 22 - 32 bit */
#define NEC_FCN0M22DAT0W FCN0M022DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 23 - 8 bit */
#define NEC_FCN0M23DAT0B FCN0M023DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 23 - 16 bit */
#define NEC_FCN0M23DAT0H FCN0M023DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 23 - 32 bit */
#define NEC_FCN0M23DAT0W FCN0M023DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 24 - 8 bit */
#define NEC_FCN0M24DAT0B FCN0M024DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 24 - 16 bit */
#define NEC_FCN0M24DAT0H FCN0M024DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 24 - 32 bit */
#define NEC_FCN0M24DAT0W FCN0M024DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 25 - 8 bit */
#define NEC_FCN0M25DAT0B FCN0M025DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 25 - 16 bit */
#define NEC_FCN0M25DAT0H FCN0M025DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 25 - 32 bit */
#define NEC_FCN0M25DAT0W FCN0M025DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 26 - 8 bit */
#define NEC_FCN0M26DAT0B FCN0M026DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 26 - 16 bit */
#define NEC_FCN0M26DAT0H FCN0M026DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 26 - 32 bit */
#define NEC_FCN0M26DAT0W FCN0M026DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 27 - 8 bit */
#define NEC_FCN0M27DAT0B FCN0M027DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 27 - 16 bit */
#define NEC_FCN0M27DAT0H FCN0M027DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 27 - 32 bit */
#define NEC_FCN0M27DAT0W FCN0M027DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 28 - 8 bit */
#define NEC_FCN0M28DAT0B FCN0M028DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 28 - 16 bit */
#define NEC_FCN0M28DAT0H FCN0M028DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 28 - 32 bit */
#define NEC_FCN0M28DAT0W FCN0M028DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 29 - 8 bit */
#define NEC_FCN0M29DAT0B FCN0M029DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 29 - 16 bit */
#define NEC_FCN0M29DAT0H FCN0M029DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 29 - 32 bit */
#define NEC_FCN0M29DAT0W FCN0M029DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 30 - 8 bit */
#define NEC_FCN0M30DAT0B FCN0M030DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 30 - 16 bit */
#define NEC_FCN0M30DAT0H FCN0M030DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 30 - 32 bit */
#define NEC_FCN0M30DAT0W FCN0M030DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 31 - 8 bit */
#define NEC_FCN0M31DAT0B FCN0M031DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 31 - 16 bit */
#define NEC_FCN0M31DAT0H FCN0M031DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 31 - 32 bit */
#define NEC_FCN0M31DAT0W FCN0M031DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 32 - 8 bit */
#define NEC_FCN0M32DAT0B FCN0M032DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 32 - 16 bit */
#define NEC_FCN0M32DAT0H FCN0M032DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 32 - 32 bit */
#define NEC_FCN0M32DAT0W FCN0M032DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 33 - 8 bit */
#define NEC_FCN0M33DAT0B FCN0M033DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 33 - 16 bit */
#define NEC_FCN0M33DAT0H FCN0M033DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 33 - 32 bit */
#define NEC_FCN0M33DAT0W FCN0M033DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 34 - 8 bit */
#define NEC_FCN0M34DAT0B FCN0M034DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 34 - 16 bit */
#define NEC_FCN0M34DAT0H FCN0M034DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 34 - 32 bit */
#define NEC_FCN0M34DAT0W FCN0M034DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 35 - 8 bit */
#define NEC_FCN0M35DAT0B FCN0M035DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 35 - 16 bit */
#define NEC_FCN0M35DAT0H FCN0M035DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 35 - 32 bit */
#define NEC_FCN0M35DAT0W FCN0M035DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 36 - 8 bit */
#define NEC_FCN0M36DAT0B FCN0M036DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 36 - 16 bit */
#define NEC_FCN0M36DAT0H FCN0M036DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 36 - 32 bit */
#define NEC_FCN0M36DAT0W FCN0M036DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 37 - 8 bit */
#define NEC_FCN0M37DAT0B FCN0M037DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 37 - 16 bit */
#define NEC_FCN0M37DAT0H FCN0M037DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 37 - 32 bit */
#define NEC_FCN0M37DAT0W FCN0M037DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 38 - 8 bit */
#define NEC_FCN0M38DAT0B FCN0M038DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 38 - 16 bit */
#define NEC_FCN0M38DAT0H FCN0M038DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 38 - 32 bit */
#define NEC_FCN0M38DAT0W FCN0M038DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 39 - 8 bit */
#define NEC_FCN0M39DAT0B FCN0M039DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 39 - 16 bit */
#define NEC_FCN0M39DAT0H FCN0M039DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 39 - 32 bit */
#define NEC_FCN0M39DAT0W FCN0M039DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 40 - 8 bit */
#define NEC_FCN0M40DAT0B FCN0M040DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 40 - 16 bit */
#define NEC_FCN0M40DAT0H FCN0M040DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 40 - 32 bit */
#define NEC_FCN0M40DAT0W FCN0M040DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 41 - 8 bit */
#define NEC_FCN0M41DAT0B FCN0M041DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 41 - 16 bit */
#define NEC_FCN0M41DAT0H FCN0M041DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 41 - 32 bit */
#define NEC_FCN0M41DAT0W FCN0M041DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 42 - 8 bit */
#define NEC_FCN0M42DAT0B FCN0M042DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 42 - 16 bit */
#define NEC_FCN0M42DAT0H FCN0M042DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 42 - 32 bit */
#define NEC_FCN0M42DAT0W FCN0M042DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 43 - 8 bit */
#define NEC_FCN0M43DAT0B FCN0M043DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 43 - 16 bit */
#define NEC_FCN0M43DAT0H FCN0M043DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 43 - 32 bit */
#define NEC_FCN0M43DAT0W FCN0M043DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 44 - 8 bit */
#define NEC_FCN0M44DAT0B FCN0M044DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 44 - 16 bit */
#define NEC_FCN0M44DAT0H FCN0M044DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 44 - 32 bit */
#define NEC_FCN0M44DAT0W FCN0M044DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 45 - 8 bit */
#define NEC_FCN0M45DAT0B FCN0M045DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 45 - 16 bit */
#define NEC_FCN0M45DAT0H FCN0M045DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 45 - 32 bit */
#define NEC_FCN0M45DAT0W FCN0M045DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 46 - 8 bit */
#define NEC_FCN0M46DAT0B FCN0M046DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 46 - 16 bit */
#define NEC_FCN0M46DAT0H FCN0M046DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 46 - 32 bit */
#define NEC_FCN0M46DAT0W FCN0M046DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 47 - 8 bit */
#define NEC_FCN0M47DAT0B FCN0M047DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 47 - 16 bit */
#define NEC_FCN0M47DAT0H FCN0M047DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 47 - 32 bit */
#define NEC_FCN0M47DAT0W FCN0M047DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 48 - 8 bit */
#define NEC_FCN0M48DAT0B FCN0M048DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 48 - 16 bit */
#define NEC_FCN0M48DAT0H FCN0M048DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 48 - 32 bit */
#define NEC_FCN0M48DAT0W FCN0M048DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 49 - 8 bit */
#define NEC_FCN0M49DAT0B FCN0M049DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 49 - 16 bit */
#define NEC_FCN0M49DAT0H FCN0M049DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 49 - 32 bit */
#define NEC_FCN0M49DAT0W FCN0M049DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 50 - 8 bit */
#define NEC_FCN0M50DAT0B FCN0M050DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 50 - 16 bit */
#define NEC_FCN0M50DAT0H FCN0M050DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 50 - 32 bit */
#define NEC_FCN0M50DAT0W FCN0M050DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 51 - 8 bit */
#define NEC_FCN0M51DAT0B FCN0M051DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 51 - 16 bit */
#define NEC_FCN0M51DAT0H FCN0M051DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 50 - 32 bit */
#define NEC_FCN0M51DAT0W FCN0M050DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 52 - 8 bit */
#define NEC_FCN0M52DAT0B FCN0M052DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 52 - 16 bit */
#define NEC_FCN0M52DAT0H FCN0M052DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 52 - 32 bit */
#define NEC_FCN0M52DAT0W FCN0M052DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 53 - 8 bit */
#define NEC_FCN0M53DAT0B FCN0M053DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 53 - 16 bit */
#define NEC_FCN0M53DAT0H FCN0M053DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 53 - 32 bit */
#define NEC_FCN0M53DAT0W FCN0M053DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 54 - 8 bit */
#define NEC_FCN0M54DAT0B FCN0M054DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 54 - 16 bit */
#define NEC_FCN0M54DAT0H FCN0M054DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 54 - 32 bit */
#define NEC_FCN0M54DAT0W FCN0M054DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 55 - 8 bit */
#define NEC_FCN0M55DAT0B FCN0M055DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 55 - 16 bit */
#define NEC_FCN0M55DAT0H FCN0M055DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 55 - 32 bit */
#define NEC_FCN0M55DAT0W FCN0M055DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 56 - 8 bit */
#define NEC_FCN0M56DAT0B FCN0M056DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 56 - 16 bit */
#define NEC_FCN0M56DAT0H FCN0M056DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 56 - 32 bit */
#define NEC_FCN0M56DAT0W FCN0M056DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 57 - 8 bit */
#define NEC_FCN0M57DAT0B FCN0M057DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 57 - 16 bit */
#define NEC_FCN0M57DAT0H FCN0M057DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 57 - 32 bit */
#define NEC_FCN0M57DAT0W FCN0M057DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 58 - 8 bit */
#define NEC_FCN0M58DAT0B FCN0M058DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 58 - 16 bit */
#define NEC_FCN0M58DAT0H FCN0M058DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 58 - 32 bit */
#define NEC_FCN0M58DAT0W FCN0M058DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 59 - 8 bit */
#define NEC_FCN0M59DAT0B FCN0M059DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 59 - 16 bit */
#define NEC_FCN0M59DAT0H FCN0M059DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 59 - 32 bit */
#define NEC_FCN0M59DAT0W FCN0M059DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 60 - 8 bit */
#define NEC_FCN0M60DAT0B FCN0M060DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 60 - 16 bit */
#define NEC_FCN0M60DAT0H FCN0M060DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 60 - 32 bit */
#define NEC_FCN0M60DAT0W FCN0M060DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 61 - 8 bit */
#define NEC_FCN0M61DAT0B FCN0M061DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 61 - 16 bit */
#define NEC_FCN0M61DAT0H FCN0M061DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 61 - 32 bit */
#define NEC_FCN0M61DAT0W FCN0M061DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 62- 8 bit */
#define NEC_FCN0M62DAT0B FCN0M062DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 62 - 16 bit */
#define NEC_FCN0M62DAT0H FCN0M062DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 62 - 32 bit */
#define NEC_FCN0M62DAT0W FCN0M062DAT0W
/* Address of the CAN Controller Hardware 0 Message Buffer 63 - 8 bit */
#define NEC_FCN0M63DAT0B FCN0M063DAT0B
/* Address of the CAN Controller Hardware 0 Message Buffer 63 - 16 bit */
#define NEC_FCN0M63DAT0H FCN0M063DAT0H
/* Address of the CAN Controller Hardware 0 Message Buffer 63 - 32 bit */
#define NEC_FCN0M63DAT0W FCN0M063DAT0W
/* Addresses for CAN Controller Hardware 1 Message Buffers */
/* Address of the CAN Controller Hardware 1 Message Buffer 0 - 8 bit */
#define NEC_FCN1M0DAT0B FCN1M000DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 0 - 16 bit */
#define NEC_FCN1M0DAT0H FCN1M000DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 0 - 32 bit */
#define NEC_FCN1M0DAT0W FCN1M000DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 1 - 8 bit */
#define NEC_FCN1M1DAT0B FCN1M001DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 1 - 16 bit */
#define NEC_FCN1M1DAT0H FCN1M001DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 1 - 32 bit */
#define NEC_FCN1M1DAT0W FCN1M001DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 2 - 8 bit */
#define NEC_FCN1M2DAT0B FCN1M002DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 2 - 16 bit */
#define NEC_FCN1M2DAT0H FCN1M002DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 2 - 32 bit */
#define NEC_FCN1M2DAT0W FCN1M002DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 3 - 8 bit */
#define NEC_FCN1M3DAT0B FCN1M003DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 3 - 16 bit */
#define NEC_FCN1M3DAT0H FCN1M003DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 3 - 32 bit */
#define NEC_FCN1M3DAT0W FCN1M003DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 4 - 8 bit */
#define NEC_FCN1M4DAT0B FCN1M004DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 4 - 16 bit */
#define NEC_FCN1M4DAT0H FCN1M004DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 4 - 32 bit */
#define NEC_FCN1M4DAT0W FCN1M004DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 5 - 8 bit */
#define NEC_FCN1M5DAT0B FCN1M005DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 5 - 16 bit */
#define NEC_FCN1M5DAT0H FCN1M005DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 5 - 32 bit */
#define NEC_FCN1M5DAT0W FCN1M005DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 6 - 8 bit */
#define NEC_FCN1M6DAT0B FCN1M006DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 6 - 16 bit */
#define NEC_FCN1M6DAT0H FCN1M006DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 6 - 32 bit */
#define NEC_FCN1M6DAT0W FCN1M006DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 7 - 8 bit */
#define NEC_FCN1M7DAT0B FCN1M007DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 7 - 16 bit */
#define NEC_FCN1M7DAT0H FCN1M007DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer7 - 32 bit */
#define NEC_FCN1M7DAT0W FCN1M007DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 8 - 8 bit */
#define NEC_FCN1M8DAT0B FCN1M008DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 8 - 16 bit */
#define NEC_FCN1M8DAT0H FCN1M008DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 8 - 32 bit */
#define NEC_FCN1M8DAT0W FCN1M008DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 9 - 8 bit */
#define NEC_FCN1M9DAT0B FCN1M009DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 9 - 16 bit */
#define NEC_FCN1M9DAT0H FCN1M009DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 9 - 32 bit */
#define NEC_FCN1M9DAT0W FCN1M009DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 10 - 8 bit */
#define NEC_FCN1M10DAT0B FCN1M010DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 10 - 16 bit */
#define NEC_FCN1M10DAT0H FCN1M010DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 10 - 32 bit */
#define NEC_FCN1M10DAT0W FCN1M010DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 11 - 8 bit */
#define NEC_FCN1M11DAT0B FCN1M011DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 10 - 16 bit */
#define NEC_FCN1M11DAT0H FCN1M011DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 10 - 32 bit */
#define NEC_FCN1M11DAT0W FCN1M011DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 2 - 8 bit */
#define NEC_FCN1M12DAT0B FCN1M012DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 12 - 16 bit */
#define NEC_FCN1M12DAT0H FCN1M012DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 12 - 32 bit */
#define NEC_FCN1M12DAT0W FCN1M012DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 13 - 8 bit */
#define NEC_FCN1M13DAT0B FCN1M013DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 13 - 16 bit */
#define NEC_FCN1M13DAT0H FCN1M013DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 13 - 32 bit */
#define NEC_FCN1M13DAT0W FCN1M013DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 14 - 8 bit */
#define NEC_FCN1M14DAT0B FCN1M014DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 14 - 16 bit */
#define NEC_FCN1M14DAT0H FCN1M014DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 14 - 32 bit */
#define NEC_FCN1M14DAT0W FCN1M014DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 15 - 8 bit */
#define NEC_FCN1M15DAT0B FCN1M015DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 15 - 16 bit */
#define NEC_FCN1M15DAT0H FCN1M015DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 10 - 32 bit */
#define NEC_FCN1M15DAT0W FCN1M015DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 16 - 8 bit */
#define NEC_FCN1M16DAT0B FCN1M016DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 16 - 16 bit */
#define NEC_FCN1M16DAT0H FCN1M016DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 16 - 32 bit */
#define NEC_FCN1M16DAT0W FCN1M016DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 17 - 8 bit */
#define NEC_FCN1M17DAT0B FCN1M017DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 17 - 16 bit */
#define NEC_FCN1M17DAT0H FCN1M017DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 17 - 32 bit */
#define NEC_FCN1M17DAT0W FCN1M017DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 18 - 8 bit */
#define NEC_FCN1M18DAT0B FCN1M018DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 18 - 16 bit */
#define NEC_FCN1M18DAT0H FCN1M018DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 18 - 32 bit */
#define NEC_FCN1M18DAT0W FCN1M018DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 19 - 8 bit */
#define NEC_FCN1M19DAT0B FCN1M019DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 19 - 16 bit */
#define NEC_FCN1M19DAT0H FCN1M019DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 19 - 32 bit */
#define NEC_FCN1M19DAT0W FCN1M019DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 20 - 8 bit */
#define NEC_FCN1M20DAT0B FCN1M020DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 20 - 16 bit */
#define NEC_FCN1M20DAT0H FCN1M020DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 20 - 32 bit */
#define NEC_FCN1M20DAT0W FCN1M020DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 21 - 8 bit */
#define NEC_FCN1M21DAT0B FCN1M021DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 21 - 16 bit */
#define NEC_FCN1M21DAT0H FCN1M021DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 21 - 32 bit */
#define NEC_FCN1M21DAT0W FCN1M021DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 22 - 8 bit */
#define NEC_FCN1M22DAT0B FCN1M022DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 22 - 16 bit */
#define NEC_FCN1M22DAT0H FCN1M022DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 22 - 32 bit */
#define NEC_FCN1M22DAT0W FCN1M022DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 23 - 8 bit */
#define NEC_FCN1M23DAT0B FCN1M023DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 23 - 16 bit */
#define NEC_FCN1M23DAT0H FCN1M023DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 23 - 32 bit */
#define NEC_FCN1M23DAT0W FCN1M023DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 24 - 8 bit */
#define NEC_FCN1M24DAT0B FCN1M024DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 24 - 16 bit */
#define NEC_FCN1M24DAT0H FCN1M024DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 24 - 32 bit */
#define NEC_FCN1M24DAT0W FCN1M024DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 25 - 8 bit */
#define NEC_FCN1M25DAT0B FCN1M025DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 25 - 16 bit */
#define NEC_FCN1M25DAT0H FCN1M025DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 25 - 32 bit */
#define NEC_FCN1M25DAT0W FCN1M025DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 26 - 8 bit */
#define NEC_FCN1M26DAT0B FCN1M026DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 26 - 16 bit */
#define NEC_FCN1M26DAT0H FCN1M026DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 26 - 32 bit */
#define NEC_FCN1M26DAT0W FCN1M026DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 27 - 8 bit */
#define NEC_FCN1M27DAT0B FCN1M027DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 27 - 16 bit */
#define NEC_FCN1M27DAT0H FCN1M027DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 27 - 32 bit */
#define NEC_FCN1M27DAT0W FCN1M027DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 28 - 8 bit */
#define NEC_FCN1M28DAT0B FCN1M020DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 28 - 16 bit */
#define NEC_FCN1M28DAT0H FCN1M028DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 28 - 32 bit */
#define NEC_FCN1M28DAT0W FCN1M028DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 29 - 8 bit */
#define NEC_FCN1M29DAT0B FCN1M029DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 29 - 16 bit */
#define NEC_FCN1M29DAT0H FCN1M029DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 29 - 32 bit */
#define NEC_FCN1M29DAT0W FCN1M029DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 30 - 8 bit */
#define NEC_FCN1M30DAT0B FCN1M030DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 30 - 16 bit */
#define NEC_FCN1M30DAT0H FCN1M030DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 30 - 32 bit */
#define NEC_FCN1M30DAT0W FCN1M030DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 31 - 8 bit */
#define NEC_FCN1M31DAT0B FCN1M031DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 31 - 16 bit */
#define NEC_FCN1M31DAT0H FCN1M031DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 31 - 32 bit */
#define NEC_FCN1M31DAT0W FCN1M031DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 32 - 8 bit */
#define NEC_FCN1M32DAT0B FCN1M032DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 32 - 16 bit */
#define NEC_FCN1M32DAT0H FCN1M032DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 32 - 32 bit */
#define NEC_FCN1M32DAT0W FCN1M032DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 33 - 8 bit */
#define NEC_FCN1M33DAT0B FCN1M033DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 33 - 16 bit */
#define NEC_FCN1M33DAT0H FCN1M033DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 33 - 32 bit */
#define NEC_FCN1M33DAT0W FCN1M033DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 34 - 8 bit */
#define NEC_FCN1M34DAT0B FCN1M034DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 34 - 16 bit */
#define NEC_FCN1M34DAT0H FCN1M034DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 34 - 32 bit */
#define NEC_FCN1M34DAT0W FCN1M034DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 35 - 8 bit */
#define NEC_FCN1M35DAT0B FCN1M035DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 35 - 16 bit */
#define NEC_FCN1M35DAT0H FCN1M035DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 35 - 32 bit */
#define NEC_FCN1M35DAT0W FCN1M035DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 36 - 8 bit */
#define NEC_FCN1M36DAT0B FCN1M036DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 36 - 16 bit */
#define NEC_FCN1M36DAT0H FCN1M036DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 36 - 32 bit */
#define NEC_FCN1M36DAT0W FCN1M036DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 37 - 8 bit */
#define NEC_FCN1M37DAT0B FCN1M037DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 37 - 16 bit */
#define NEC_FCN1M37DAT0H FCN1M037DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 37 - 32 bit */
#define NEC_FCN1M37DAT0W FCN1M037DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 38 - 8 bit */
#define NEC_FCN1M38DAT0B FCN1M038DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 38 - 16 bit */
#define NEC_FCN1M38DAT0H FCN1M038DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 38 - 32 bit */
#define NEC_FCN1M38DAT0W FCN1M038DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 39 - 8 bit */
#define NEC_FCN1M39DAT0B FCN1M039DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 39 - 16 bit */
#define NEC_FCN1M39DAT0H FCN1M039DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 39 - 32 bit */
#define NEC_FCN1M39DAT0W FCN1M039DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 40 - 8 bit */
#define NEC_FCN1M40DAT0B FCN1M040DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 40 - 16 bit */
#define NEC_FCN1M40DAT0H FCN1M040DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 40 - 32 bit */
#define NEC_FCN1M40DAT0W FCN1M040DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 41 - 8 bit */
#define NEC_FCN1M41DAT0B FCN1M041DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 41 - 16 bit */
#define NEC_FCN1M41DAT0H FCN1M041DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 41 - 32 bit */
#define NEC_FCN1M41DAT0W FCN1M041DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 42 - 8 bit */
#define NEC_FCN1M42DAT0B FCN1M042DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 42 - 16 bit */
#define NEC_FCN1M42DAT0H FCN1M042DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 42 - 32 bit */
#define NEC_FCN1M42DAT0W FCN1M042DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 43 - 8 bit */
#define NEC_FCN1M43DAT0B FCN1M043DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 43 - 16 bit */
#define NEC_FCN1M43DAT0H FCN1M043DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 43 - 32 bit */
#define NEC_FCN1M43DAT0W FCN1M043DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 44 - 8 bit */
#define NEC_FCN1M44DAT0B FCN1M044DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 44 - 16 bit */
#define NEC_FCN1M44DAT0H FCN1M044DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 44 - 32 bit */
#define NEC_FCN1M44DAT0W FCN1M044DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 45 - 8 bit */
#define NEC_FCN1M45DAT0B FCN1M045DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 45 - 16 bit */
#define NEC_FCN1M45DAT0H FCN1M045DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 45 - 32 bit */
#define NEC_FCN1M45DAT0W FCN1M045DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 46 - 8 bit */
#define NEC_FCN1M46DAT0B FCN1M046DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 46 - 16 bit */
#define NEC_FCN1M46DAT0H FCN1M046DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 46 - 32 bit */
#define NEC_FCN1M46DAT0W FCN1M046DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 47 - 8 bit */
#define NEC_FCN1M47DAT0B FCN1M047DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 47 - 16 bit */
#define NEC_FCN1M47DAT0H FCN1M047DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 47 - 32 bit */
#define NEC_FCN1M47DAT0W FCN1M047DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 48 - 8 bit */
#define NEC_FCN1M48DAT0B FCN1M048DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 48 - 16 bit */
#define NEC_FCN1M48DAT0H FCN1M048DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 48 - 32 bit */
#define NEC_FCN1M48DAT0W FCN1M048DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 49 - 8 bit */
#define NEC_FCN1M49DAT0B FCN1M049DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 49 - 16 bit */
#define NEC_FCN1M49DAT0H FCN1M049DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 49 - 32 bit */
#define NEC_FCN1M49DAT0W FCN1M049DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 50 - 8 bit */
#define NEC_FCN1M50DAT0B FCN1M050DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 50 - 16 bit */
#define NEC_FCN1M50DAT0H FCN1M050DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 50 - 32 bit */
#define NEC_FCN1M50DAT0W FCN1M050DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 51 - 8 bit */
#define NEC_FCN1M51DAT0B FCN1M051DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 51 - 16 bit */
#define NEC_FCN1M51DAT0H FCN1M051DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 50 - 32 bit */
#define NEC_FCN1M51DAT0W FCN1M051DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 52 - 8 bit */
#define NEC_FCN1M52DAT0B FCN1M052DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 52 - 16 bit */
#define NEC_FCN1M52DAT0H FCN1M052DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 52 - 32 bit */
#define NEC_FCN1M52DAT0W FCN1M052DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 53 - 8 bit */
#define NEC_FCN1M53DAT0B FCN1M053DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 53 - 16 bit */
#define NEC_FCN1M53DAT0H FCN1M053DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 53 - 32 bit */
#define NEC_FCN1M53DAT0W FCN1M053DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 54 - 8 bit */
#define NEC_FCN1M54DAT0B FCN1M054DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 54 - 16 bit */
#define NEC_FCN1M54DAT0H FCN1M054DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 54 - 32 bit */
#define NEC_FCN1M54DAT0W FCN1M054DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 55 - 8 bit */
#define NEC_FCN1M55DAT0B FCN1M055DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 55 - 16 bit */
#define NEC_FCN1M55DAT0H FCN1M055DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 55 - 32 bit */
#define NEC_FCN1M55DAT0W FCN1M055DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 56 - 8 bit */
#define NEC_FCN1M56DAT0B FCN1M056DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 56 - 16 bit */
#define NEC_FCN1M56DAT0H FCN1M056DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 56 - 32 bit */
#define NEC_FCN1M56DAT0W FCN1M056DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 57 - 8 bit */
#define NEC_FCN1M57DAT0B FCN1M057DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 57 - 16 bit */
#define NEC_FCN1M57DAT0H FCN1M057DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 57 - 32 bit */
#define NEC_FCN1M57DAT0W FCN1M057DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 58 - 8 bit */
#define NEC_FCN1M58DAT0B FCN1M058DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 58 - 16 bit */
#define NEC_FCN1M58DAT0H FCN1M058DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 58 - 32 bit */
#define NEC_FCN1M58DAT0W FCN1M058DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 59 - 8 bit */
#define NEC_FCN1M59DAT0B FCN1M059DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 59 - 16 bit */
#define NEC_FCN1M59DAT0H FCN1M059DAT0H
/* Address of the CAN Controller Hardware1 Message Buffer 59 - 32 bit */
#define NEC_FCN1M59DAT0W FCN1M059DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 60 - 8 bit */
#define NEC_FCN1M60DAT0B FCN1M060DAT0B
/* Address of the CAN Controller Hardware 10 Message Buffer 60 - 16 bit */
#define NEC_FCN1M60DAT0H FCN1M060DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 60 - 32 bit */
#define NEC_FCN1M60DAT0W FCN1M060DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 61 - 8 bit */
#define NEC_FCN1M61DAT0B FCN1M061DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 61 - 16 bit */
#define NEC_FCN1M61DAT0H FCN1M061DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 61 - 32 bit */
#define NEC_FCN1M61DAT0W FCN1M061DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 62- 8 bit */
#define NEC_FCN1M62DAT0B FCN1M062DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 62 - 16 bit */
#define NEC_FCN1M62DAT0H FCN1M062DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 62 - 32 bit */
#define NEC_FCN1M62DAT0W FCN1M062DAT0W
/* Address of the CAN Controller Hardware 1 Message Buffer 63 - 8 bit */
#define NEC_FCN1M63DAT0B FCN1M063DAT0B
/* Address of the CAN Controller Hardware 1 Message Buffer 63 - 16 bit */
#define NEC_FCN1M63DAT0H FCN1M063DAT0H
/* Address of the CAN Controller Hardware 1 Message Buffer 63 - 32 bit */
#define NEC_FCN1M63DAT0W FCN1M063DAT0W
/* Addresses for CAN Controller Hardware 2 Message Buffers*/
/* Address of the CAN Controller Hardware 2 Message Buffer 0 - 8 bit */
#define NEC_FCN2M0DAT0B FCN2M000DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 0 - 16 bit */
#define NEC_FCN2M0DAT0H FCN2M000DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 0 - 32 bit */
#define NEC_FCN2M0DAT0W FCN2M000DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 1 - 8 bit */
#define NEC_FCN2M1DAT0B FCN2M001DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 1 - 16 bit */
#define NEC_FCN2M1DAT0H FCN2M001DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 1 - 32 bit */
#define NEC_FCN2M1DAT0W FCN2M001DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 2 - 8 bit */
#define NEC_FCN2M2DAT0B FCN2M002DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 2 - 16 bit */
#define NEC_FCN2M2DAT0H FCN2M002DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 2 - 32 bit */
#define NEC_FCN2M2DAT0W FCN2M002DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 3 - 8 bit */
#define NEC_FCN2M3DAT0B FCN2M003DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 3 - 16 bit */
#define NEC_FCN2M3DAT0H FCN2M003DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 3 - 32 bit */
#define NEC_FCN2M3DAT0W FCN2M003DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 4 - 8 bit */
#define NEC_FCN2M4DAT0B FCN2M004DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 4 - 16 bit */
#define NEC_FCN2M4DAT0H FCN2M004DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 4 - 32 bit */
#define NEC_FCN2M4DAT0W FCN2M004DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 5 - 8 bit */
#define NEC_FCN2M5DAT0B FCN2M005DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 5 - 16 bit */
#define NEC_FCN2M5DAT0H FCN2M005DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 5 - 32 bit */
#define NEC_FCN2M5DAT0W FCN0M005DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 6 - 8 bit */
#define NEC_FCN2M6DAT0B FCN2M006DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 6 - 16 bit */
#define NEC_FCN2M6DAT0H FCN2M006DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 6 - 32 bit */
#define NEC_FCN2M6DAT0W FCN2M006DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 7 - 8 bit */
#define NEC_FCN2M7DAT0B FCN2M007DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 7 - 16 bit */
#define NEC_FCN2M7DAT0H FCN2M007DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer7 - 32 bit */
#define NEC_FCN2M7DAT0W FCN2M007DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 8 - 8 bit */
#define NEC_FCN2M8DAT0B FCN2M008DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 8 - 16 bit */
#define NEC_FCN2M8DAT0H FCN2M008DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 8 - 32 bit */
#define NEC_FCN2M8DAT0W FCN2M008DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 9 - 8 bit */
#define NEC_FCN2M9DAT0B FCN2M009DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 9 - 16 bit */
#define NEC_FCN2M9DAT0H FCN2M009DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 9 - 32 bit */
#define NEC_FCN2M9DAT0W FCN2M009DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 10 - 8 bit */
#define NEC_FCN2M10DAT0B FCN2M010DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 10 - 16 bit */
#define NEC_FCN2M10DAT0H FCN2M010DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 10 - 32 bit */
#define NEC_FCN2M10DAT0W FCN2M010DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 11 - 8 bit */
#define NEC_FCN2M11DAT0B FCN2M011DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 10 - 16 bit */
#define NEC_FCN2M11DAT0H FCN2M011DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 10 - 32 bit */
#define NEC_FCN2M11DAT0W FCN2M011DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 2 - 8 bit */
#define NEC_FCN2M12DAT0B FCN2M012DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 12 - 16 bit */
#define NEC_FCN2M12DAT0H FCN2M012DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 12 - 32 bit */
#define NEC_FCN2M12DAT0W FCN2M012DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 13 - 8 bit */
#define NEC_FCN2M13DAT0B FCN2M013DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 13 - 16 bit */
#define NEC_FCN2M13DAT0H FCN2M013DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 13 - 32 bit */
#define NEC_FCN2M13DAT0W FCN2M013DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 14 - 8 bit */
#define NEC_FCN2M14DAT0B FCN2M014DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 14 - 16 bit */
#define NEC_FCN2M14DAT0H FCN2M014DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 14 - 32 bit */
#define NEC_FCN2M14DAT0W FCN2M014DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 15 - 8 bit */
#define NEC_FCN2M15DAT0B FCN2M015DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 15 - 16 bit */
#define NEC_FCN2M15DAT0H FCN2M015DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 10 - 32 bit */
#define NEC_FCN2M15DAT0W FCN2M015DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 16 - 8 bit */
#define NEC_FCN2M16DAT0B FCN2M016DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 16 - 16 bit */
#define NEC_FCN2M16DAT0H FCN2M016DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 16 - 32 bit */
#define NEC_FCN2M16DAT0W FCN2M016DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 17 - 8 bit */
#define NEC_FCN2M17DAT0B FCN2M017DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 17 - 16 bit */
#define NEC_FCN2M17DAT0H FCN2M017DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 17 - 32 bit */
#define NEC_FCN2M17DAT0W FCN2M017DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 18 - 8 bit */
#define NEC_FCN2M18DAT0B FCN2M018DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 18 - 16 bit */
#define NEC_FCN2M18DAT0H FCN2M018DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 18 - 32 bit */
#define NEC_FCN2M18DAT0W FCN2M018DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 19 - 8 bit */
#define NEC_FCN2M19DAT0B FCN2M019DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 19 - 16 bit */
#define NEC_FCN2M19DAT0H FCN2M019DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 19 - 32 bit */
#define NEC_FCN2M19DAT0W FCN2M019DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 20 - 8 bit */
#define NEC_FCN2M20DAT0B FCN2M020DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 20 - 16 bit */
#define NEC_FCN2M20DAT0H FCN2M020DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 20 - 32 bit */
#define NEC_FCN2M20DAT0W FCN2M020DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 21 - 8 bit */
#define NEC_FCN2M21DAT0B FCN2M021DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 21 - 16 bit */
#define NEC_FCN2M21DAT0H FCN2M021DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 21 - 32 bit */
#define NEC_FCN2M21DAT0W FCN2M021DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 22 - 8 bit */
#define NEC_FCN2M22DAT0B FCN2M022DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 22 - 16 bit */
#define NEC_FCN2M22DAT0H FCN2M022DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 22 - 32 bit */
#define NEC_FCN2M22DAT0W FCN2M022DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 23 - 8 bit */
#define NEC_FCN2M23DAT0B FCN2M023DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 23 - 16 bit */
#define NEC_FCN2M23DAT0H FCN2M023DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 23 - 32 bit */
#define NEC_FCN2M23DAT0W FCN2M023DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 24 - 8 bit */
#define NEC_FCN2M24DAT0B FCN2M024DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 24 - 16 bit */
#define NEC_FCN2M24DAT0H FCN2M024DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 24 - 32 bit */
#define NEC_FCN2M24DAT0W FCN2M024DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 25 - 8 bit */
#define NEC_FCN2M25DAT0B FCN2M025DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 25 - 16 bit */
#define NEC_FCN2M25DAT0H FCN2M025DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 25 - 32 bit */
#define NEC_FCN2M25DAT0W FCN2M025DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 26 - 8 bit */
#define NEC_FCN2M26DAT0B FCN2M026DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 26 - 16 bit */
#define NEC_FCN2M26DAT0H FCN2M026DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 26 - 32 bit */
#define NEC_FCN2M26DAT0W FCN2M026DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 27 - 8 bit */
#define NEC_FCN2M27DAT0B FCN2M027DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 27 - 16 bit */
#define NEC_FCN2M27DAT0H FCN2M027DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 27 - 32 bit */
#define NEC_FCN2M27DAT0W FCN2M027DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 28 - 8 bit */
#define NEC_FCN2M28DAT0B FCN2M028DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 28 - 16 bit */
#define NEC_FCN2M28DAT0H FCN2M028DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 28 - 32 bit */
#define NEC_FCN2M28DAT0W FCN2M028DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 29 - 8 bit */
#define NEC_FCN2M29DAT0B FCN2M029DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 29 - 16 bit */
#define NEC_FCN2M29DAT0H FCN2M029DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 29 - 32 bit */
#define NEC_FCN2M29DAT0W FCN2M029DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 30 - 8 bit */
#define NEC_FCN2M30DAT0B FCN2M030DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 30 - 16 bit */
#define NEC_FCN2M30DAT0H FCN2M030DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 30 - 32 bit */
#define NEC_FCN2M30DAT0W FCN2M030DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 31 - 8 bit */
#define NEC_FCN2M31DAT0B FCN2M031DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 31 - 16 bit */
#define NEC_FCN2M31DAT0H FCN2M031DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 31 - 32 bit */
#define NEC_FCN2M31DAT0W FCN2M031DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 32 - 8 bit */
#define NEC_FCN2M32DAT0B FCN2M032DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 32 - 16 bit */
#define NEC_FCN2M32DAT0H FCN2M032DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 32 - 32 bit */
#define NEC_FCN2M32DAT0W FCN2M032DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 33 - 8 bit */
#define NEC_FCN2M33DAT0B FCN2M033DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 33 - 16 bit */
#define NEC_FCN2M33DAT0H FCN2M033DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 33 - 32 bit */
#define NEC_FCN2M33DAT0W FCN2M033DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 34 - 8 bit */
#define NEC_FCN2M34DAT0B FCN2M034DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 34 - 16 bit */
#define NEC_FCN2M34DAT0H FCN2M034DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 34 - 32 bit */
#define NEC_FCN2M34DAT0W FCN2M034DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 35 - 8 bit */
#define NEC_FCN2M35DAT0B FCN2M035DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 35 - 16 bit */
#define NEC_FCN2M35DAT0H FCN2M035DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 35 - 32 bit */
#define NEC_FCN2M35DAT0W FCN2M035DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 36 - 8 bit */
#define NEC_FCN2M36DAT0B FCN2M036DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 36 - 16 bit */
#define NEC_FCN2M36DAT0H FCN2M036DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 36 - 32 bit */
#define NEC_FCN2M36DAT0W FCN2M036DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 37 - 8 bit */
#define NEC_FCN2M37DAT0B FCN2M037DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 37 - 16 bit */
#define NEC_FCN2M37DAT0H FCN2M037DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 37 - 32 bit */
#define NEC_FCN2M37DAT0W FCN2M037DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 38 - 8 bit */
#define NEC_FCN2M38DAT0B FCN2M038DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 38 - 16 bit */
#define NEC_FCN2M38DAT0H FCN2M038DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 38 - 32 bit */
#define NEC_FCN2M38DAT0W FCN2M038DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 39 - 8 bit */
#define NEC_FCN2M39DAT0B FCN2M039DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 39 - 16 bit */
#define NEC_FCN2M39DAT0H FCN2M039DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 39 - 32 bit */
#define NEC_FCN2M39DAT0W FCN2M039DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 40 - 8 bit */
#define NEC_FCN2M40DAT0B FCN2M040DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 40 - 16 bit */
#define NEC_FCN2M40DAT0H FCN2M040DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 40 - 32 bit */
#define NEC_FCN2M40DAT0W FCN2M040DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 41 - 8 bit */
#define NEC_FCN2M41DAT0B FCN2M041DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 41 - 16 bit */
#define NEC_FCN2M41DAT0H FCN2M041DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 41 - 32 bit */
#define NEC_FCN2M41DAT0W FCN2M041DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 42 - 8 bit */
#define NEC_FCN2M42DAT0B FCN2M042DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 42 - 16 bit */
#define NEC_FCN2M42DAT0H FCN2M042DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 42 - 32 bit */
#define NEC_FCN2M42DAT0W FCN2M042DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 43 - 8 bit */
#define NEC_FCN2M43DAT0B FCN2M043DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 43 - 16 bit */
#define NEC_FCN2M43DAT0H FCN2M043DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 43 - 32 bit */
#define NEC_FCN2M43DAT0W FCN2M043DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 44 - 8 bit */
#define NEC_FCN2M44DAT0B FCN2M044DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 44 - 16 bit */
#define NEC_FCN2M44DAT0H FCN2M044DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 44 - 32 bit */
#define NEC_FCN2M44DAT0W FCN2M044DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 45 - 8 bit */
#define NEC_FCN2M45DAT0B FCN2M045DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 45 - 16 bit */
#define NEC_FCN2M45DAT0H FCN2M045DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 45 - 32 bit */
#define NEC_FCN2M45DAT0W FCN2M045DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 46 - 8 bit */
#define NEC_FCN2M46DAT0B FCN2M046DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 46 - 16 bit */
#define NEC_FCN2M46DAT0H FCN2M046DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 46 - 32 bit */
#define NEC_FCN2M46DAT0W FCN2M046DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 47 - 8 bit */
#define NEC_FCN2M47DAT0B FCN2M047DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 47 - 16 bit */
#define NEC_FCN2M47DAT0H FCN2M047DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 47 - 32 bit */
#define NEC_FCN2M47DAT0W FCN2M047DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 48 - 8 bit */
#define NEC_FCN2M48DAT0B FCN2M048DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 48 - 16 bit */
#define NEC_FCN2M48DAT0H FCN2M048DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 48 - 32 bit */
#define NEC_FCN2M48DAT0W FCN2M048DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 49 - 8 bit */
#define NEC_FCN2M49DAT0B FCN2M049DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 49 - 16 bit */
#define NEC_FCN2M49DAT0H FCN2M049DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 49 - 32 bit */
#define NEC_FCN2M49DAT0W FCN2M049DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 50 - 8 bit */
#define NEC_FCN2M50DAT0B FCN2M050DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 50 - 16 bit */
#define NEC_FCN2M50DAT0H FCN2M050DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 50 - 32 bit */
#define NEC_FCN2M50DAT0W FCN2M050DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 51 - 8 bit */
#define NEC_FCN2M51DAT0B FCN2M051DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 51 - 16 bit */
#define NEC_FCN2M51DAT0H FCN2M051DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 50 - 32 bit */
#define NEC_FCN2M51DAT0W FCN2M050DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 52 - 8 bit */
#define NEC_FCN2M52DAT0B FCN2M052DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 52 - 16 bit */
#define NEC_FCN2M52DAT0H FCN2M052DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 52 - 32 bit */
#define NEC_FCN2M52DAT0W FCN2M052DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 53 - 8 bit */
#define NEC_FCN2M53DAT0B FCN2M053DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 53 - 16 bit */
#define NEC_FCN2M53DAT0H FCN2M053DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 53 - 32 bit */
#define NEC_FCN2M53DAT0W FCN2M053DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 54 - 8 bit */
#define NEC_FCN2M54DAT0B FCN2M054DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 54 - 16 bit */
#define NEC_FCN2M54DAT0H FCN2M054DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 54 - 32 bit */
#define NEC_FCN2M54DAT0W FCN2M054DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 55 - 8 bit */
#define NEC_FCN2M55DAT0B FCN2M055DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 55 - 16 bit */
#define NEC_FCN2M55DAT0H FCN2M055DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 55 - 32 bit */
#define NEC_FCN2M55DAT0W FCN2M055DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 56 - 8 bit */
#define NEC_FCN2M56DAT0B FCN2M056DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 56 - 16 bit */
#define NEC_FCN2M56DAT0H FCN2M056DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 56 - 32 bit */
#define NEC_FCN2M56DAT0W FCN2M056DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 57 - 8 bit */
#define NEC_FCN2M57DAT0B FCN2M057DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 57 - 16 bit */
#define NEC_FCN2M57DAT0H FCN2M057DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 57 - 32 bit */
#define NEC_FCN2M57DAT0W FCN2M057DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 58 - 8 bit */
#define NEC_FCN2M58DAT0B FCN2M058DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 58 - 16 bit */
#define NEC_FCN2M58DAT0H FCN2M058DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 58 - 32 bit */
#define NEC_FCN2M58DAT0W FCN2M058DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 59 - 8 bit */
#define NEC_FCN2M59DAT0B FCN2M059DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 59 - 16 bit */
#define NEC_FCN2M59DAT0H FCN2M059DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 59 - 32 bit */
#define NEC_FCN2M59DAT0W FCN2M059DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 60 - 8 bit */
#define NEC_FCN2M60DAT0B FCN2M060DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 60 - 16 bit */
#define NEC_FCN2M60DAT0H FCN2M060DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 60 - 32 bit */
#define NEC_FCN2M60DAT0W FCN2M060DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 61 - 8 bit */
#define NEC_FCN2M61DAT0B FCN2M061DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 61 - 16 bit */
#define NEC_FCN2M61DAT0H FCN2M061DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 61 - 32 bit */
#define NEC_FCN2M61DAT0W FCN2M061DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 62- 8 bit */
#define NEC_FCN2M62DAT0B FCN2M062DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 62 - 16 bit */
#define NEC_FCN2M62DAT0H FCN2M062DAT0H
/* Address of the CAN Controller Hardware Message Buffer 62 - 32 bit */
#define NEC_FCN2M62DAT0W FCN2M062DAT0W
/* Address of the CAN Controller Hardware 2 Message Buffer 63 - 8 bit */
#define NEC_FCN2M63DAT0B FCN2M063DAT0B
/* Address of the CAN Controller Hardware 2 Message Buffer 63 - 16 bit */
#define NEC_FCN2M63DAT0H FCN2M063DAT0H
/* Address of the CAN Controller Hardware 2 Message Buffer 63 - 32 bit */
#define NEC_FCN2M63DAT0W FCN2M063DAT0W
/* Addresses for CAN Controller Hardware 3 Message Buffers */
/* Address of the CAN Controller Hardware 3 Message Buffer 0 - 8 bit */
#define NEC_FCN3M0DAT0B FCN3M000DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 0 - 16 bit */
#define NEC_FCN3M0DAT0H FCN3M000DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 0 - 32 bit */
#define NEC_FCN3M0DAT0W FCN3M000DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 1 - 8 bit */
#define NEC_FCN3M1DAT0B FCN3M001DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 1 - 16 bit */
#define NEC_FCN3M1DAT0H FCN3M001DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 1 - 32 bit */
#define NEC_FCN3M1DAT0W FCN3M001DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 2 - 8 bit */
#define NEC_FCN3M2DAT0B FCN3M002DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 2 - 16 bit */
#define NEC_FCN3M2DAT0H FCN3M002DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 2 - 32 bit */
#define NEC_FCN3M2DAT0W FCN3M002DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 3 - 8 bit */
#define NEC_FCN3M3DAT0B FCN3M003DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 3 - 16 bit */
#define NEC_FCN3M3DAT0H FCN3M003DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 3 - 32 bit */
#define NEC_FCN3M3DAT0W FCN3M003DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 4 - 8 bit */
#define NEC_FCN3M4DAT0B FCN3M004DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 4 - 16 bit */
#define NEC_FCN3M4DAT0H FCN3M004DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 4 - 32 bit */
#define NEC_FCN3M4DAT0W FCN3M004DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 5 - 8 bit */
#define NEC_FCN3M5DAT0B FCN3M005DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 5 - 16 bit */
#define NEC_FCN3M5DAT0H FCN3M005DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 5 - 32 bit */
#define NEC_FCN3M5DAT0W FCN3M005DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 6 - 8 bit */
#define NEC_FCN3M6DAT0B FCN3M006DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 6 - 16 bit */
#define NEC_FCN3M6DAT0H FCN3M006DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 6 - 32 bit */
#define NEC_FCN3M6DAT0W FCN3M006DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 7 - 8 bit */
#define NEC_FCN3M7DAT0B FCN3M007DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 7 - 16 bit */
#define NEC_FCN3M7DAT0H FCN3M007DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer7 - 32 bit */
#define NEC_FCN3M7DAT0W FCN3M007DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 8 - 8 bit */
#define NEC_FCN3M8DAT0B FCN3M008DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 8 - 16 bit */
#define NEC_FCN3M8DAT0H FCN3M008DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 8 - 32 bit */
#define NEC_FCN3M8DAT0W FCN3M008DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 9 - 8 bit */
#define NEC_FCN3M9DAT0B FCN3M009DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 9 - 16 bit */
#define NEC_FCN3M9DAT0H FCN3M009DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 9 - 32 bit */
#define NEC_FCN3M9DAT0W FCN3M009DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 10 - 8 bit */
#define NEC_FCN3M10DAT0B FCN3M010DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 10 - 16 bit */
#define NEC_FCN3M10DAT0H FCN3M010DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 10 - 32 bit */
#define NEC_FCN3M10DAT0W FCN3M010DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 11 - 8 bit */
#define NEC_FCN3M11DAT0B FCN3M011DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 10 - 16 bit */
#define NEC_FCN3M11DAT0H FCN3M011DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 10 - 32 bit */
#define NEC_FCN3M11DAT0W FCN3M011DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 2 - 8 bit */
#define NEC_FCN3M12DAT0B FCN3M012DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 12 - 16 bit */
#define NEC_FCN3M12DAT0H FCN3M012DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 12 - 32 bit */
#define NEC_FCN3M12DAT0W FCN3M012DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 13 - 8 bit */
#define NEC_FCN3M13DAT0B FCN3M013DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 13 - 16 bit */
#define NEC_FCN3M13DAT0H FCN3M013DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 13 - 32 bit */
#define NEC_FCN3M13DAT0W FCN3M013DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 14 - 8 bit */
#define NEC_FCN3M14DAT0B FCN3M014DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 14 - 16 bit */
#define NEC_FCN3M14DAT0H FCN3M014DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 14 - 32 bit */
#define NEC_FCN3M14DAT0W FCN3M014DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 15 - 8 bit */
#define NEC_FCN3M15DAT0B FCN3M015DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 15 - 16 bit */
#define NEC_FCN3M15DAT0H FCN3M015DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 10 - 32 bit */
#define NEC_FCN3M15DAT0W FCN3M015DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 16 - 8 bit */
#define NEC_FCN3M16DAT0B FCN3M016DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 16 - 16 bit */
#define NEC_FCN3M16DAT0H FCN3M016DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 16 - 32 bit */
#define NEC_FCN3M16DAT0W FCN3M016DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 17 - 8 bit */
#define NEC_FCN3M17DAT0B FCN3M017DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 17 - 16 bit */
#define NEC_FCN3M17DAT0H FCN3M017DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 17 - 32 bit */
#define NEC_FCN3M17DAT0W FCN3M017DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 18 - 8 bit */
#define NEC_FCN3M18DAT0B FCN3M018DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 18 - 16 bit */
#define NEC_FCN3M18DAT0H FCN3M018DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 18 - 32 bit */
#define NEC_FCN3M18DAT0W FCN3M018DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 19 - 8 bit */
#define NEC_FCN3M19DAT0B FCN3M019DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 19 - 16 bit */
#define NEC_FCN3M19DAT0H FCN3M019DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 19 - 32 bit */
#define NEC_FCN3M19DAT0W FCN3M019DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 20 - 8 bit */
#define NEC_FCN3M20DAT0B FCN3M020DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 20 - 16 bit */
#define NEC_FCN3M20DAT0H FCN3M020DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 20 - 32 bit */
#define NEC_FCN3M20DAT0W FCN3M020DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 21 - 8 bit */
#define NEC_FCN3M21DAT0B FCN3M021DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 21 - 16 bit */
#define NEC_FCN3M21DAT0H FCN3M021DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 21 - 32 bit */
#define NEC_FCN3M21DAT0W FCN3M021DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 22 - 8 bit */
#define NEC_FCN3M22DAT0B FCN3M022DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 22 - 16 bit */
#define NEC_FCN3M22DAT0H FCN3M022DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 22 - 32 bit */
#define NEC_FCN3M22DAT0W FCN3M022DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 23 - 8 bit */
#define NEC_FCN3M23DAT0B FCN3M023DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 23 - 16 bit */
#define NEC_FCN3M23DAT0H FCN3M023DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 23 - 32 bit */
#define NEC_FCN3M23DAT0W FCN3M023DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 24 - 8 bit */
#define NEC_FCN3M24DAT0B FCN3M024DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 24 - 16 bit */
#define NEC_FCN3M24DAT0H FCN3M024DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 24 - 32 bit */
#define NEC_FCN3M24DAT0W FCN3M024DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 25 - 8 bit */
#define NEC_FCN3M25DAT0B FCN3M025DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 25 - 16 bit */
#define NEC_FCN3M25DAT0H FCN3M025DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 25 - 32 bit */
#define NEC_FCN3M25DAT0W FCN3M025DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 26 - 8 bit */
#define NEC_FCN3M26DAT0B FCN3M026DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 26 - 16 bit */
#define NEC_FCN3M26DAT0H FCN3M026DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 26 - 32 bit */
#define NEC_FCN3M26DAT0W FCN3M026DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 27 - 8 bit */
#define NEC_FCN3M27DAT0B FCN3M027DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 27 - 16 bit */
#define NEC_FCN3M27DAT0H FCN3M027DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 27 - 32 bit */
#define NEC_FCN3M27DAT0W FCN3M027DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 28 - 8 bit */
#define NEC_FCN3M28DAT0B FCN3M028DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 28 - 16 bit */
#define NEC_FCN3M28DAT0H FCN3M028DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 28 - 32 bit */
#define NEC_FCN3M28DAT0W FCN3M028DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 29 - 8 bit */
#define NEC_FCN3M29DAT0B FCN3M029DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 29 - 16 bit */
#define NEC_FCN3M29DAT0H FCN3M029DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 29 - 32 bit */
#define NEC_FCN3M29DAT0W FCN3M029DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 30 - 8 bit */
#define NEC_FCN3M30DAT0B FCN3M030DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 30 - 16 bit */
#define NEC_FCN3M30DAT0H FCN3M030DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 30 - 32 bit */
#define NEC_FCN3M30DAT0W FCN3M030DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 31 - 8 bit */
#define NEC_FCN3M31DAT0B FCN3M031DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 31 - 16 bit */
#define NEC_FCN3M31DAT0H FCN3M031DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 31 - 32 bit */
#define NEC_FCN3M31DAT0W FCN3M031DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 32 - 8 bit */
#define NEC_FCN3M32DAT0B FCN3M032DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 32 - 16 bit */
#define NEC_FCN3M32DAT0H FCN3M032DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 32 - 32 bit */
#define NEC_FCN3M32DAT0W FCN3M032DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 33 - 8 bit */
#define NEC_FCN3M33DAT0B FCN3M033DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 33 - 16 bit */
#define NEC_FCN3M33DAT0H FCN3M033DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 33 - 32 bit */
#define NEC_FCN3M33DAT0W FCN3M033DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 34 - 8 bit */
#define NEC_FCN3M34DAT0B FCN3M034DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 34 - 16 bit */
#define NEC_FCN3M34DAT0H FCN3M034DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 34 - 32 bit */
#define NEC_FCN3M34DAT0W FCN3M034DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 35 - 8 bit */
#define NEC_FCN3M35DAT0B FCN3M035DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 35 - 16 bit */
#define NEC_FCN3M35DAT0H FCN3M035DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 35 - 32 bit */
#define NEC_FCN3M35DAT0W FCN3M035DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 36 - 8 bit */
#define NEC_FCN3M36DAT0B FCN3M036DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 36 - 16 bit */
#define NEC_FCN3M36DAT0H FCN3M036DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 36 - 32 bit */
#define NEC_FCN3M36DAT0W FCN3M036DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 37 - 8 bit */
#define NEC_FCN3M37DAT0B FCN3M037DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 37 - 16 bit */
#define NEC_FCN3M37DAT0H FCN3M037DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 37 - 32 bit */
#define NEC_FCN3M37DAT0W FCN3M037DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 38 - 8 bit */
#define NEC_FCN3M38DAT0B FCN3M038DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 38 - 16 bit */
#define NEC_FCN3M38DAT0H FCN3M038DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 38 - 32 bit */
#define NEC_FCN3M38DAT0W FCN3M038DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 39 - 8 bit */
#define NEC_FCN3M39DAT0B FCN3M039DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 39 - 16 bit */
#define NEC_FCN3M39DAT0H FCN3M039DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 39 - 32 bit */
#define NEC_FCN3M39DAT0W FCN3M039DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 40 - 8 bit */
#define NEC_FCN3M40DAT0B FCN3M040DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 40 - 16 bit */
#define NEC_FCN3M40DAT0H FCN3M040DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 40 - 32 bit */
#define NEC_FCN3M40DAT0W FCN3M040DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 41 - 8 bit */
#define NEC_FCN3M41DAT0B FCN3M041DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 41 - 16 bit */
#define NEC_FCN3M41DAT0H FCN3M041DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 41 - 32 bit */
#define NEC_FCN3M41DAT0W FCN3M041DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 42 - 8 bit */
#define NEC_FCN3M42DAT0B FCN3M042DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 42 - 16 bit */
#define NEC_FCN3M42DAT0H FCN3M042DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 42 - 32 bit */
#define NEC_FCN3M42DAT0W FCN3M042DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 43 - 8 bit */
#define NEC_FCN3M43DAT0B FCN3M043DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 43 - 16 bit */
#define NEC_FCN3M43DAT0H FCN3M043DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 43 - 32 bit */
#define NEC_FCN3M43DAT0W FCN3M043DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 44 - 8 bit */
#define NEC_FCN3M44DAT0B FCN3M044DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 44 - 16 bit */
#define NEC_FCN3M44DAT0H FCN3M044DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 44 - 32 bit */
#define NEC_FCN3M44DAT0W FCN3M044DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 45 - 8 bit */
#define NEC_FCN3M45DAT0B FCN3M045DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 45 - 16 bit */
#define NEC_FCN3M45DAT0H FCN3M045DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 45 - 32 bit */
#define NEC_FCN3M45DAT0W FCN3M045DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 46 - 8 bit */
#define NEC_FCN3M46DAT0B FCN3M046DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 46 - 16 bit */
#define NEC_FCN3M46DAT0H FCN3M046DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 46 - 32 bit */
#define NEC_FCN3M46DAT0W FCN3M046DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 47 - 8 bit */
#define NEC_FCN3M47DAT0B FCN3M047DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 47 - 16 bit */
#define NEC_FCN3M47DAT0H FCN3M047DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 47 - 32 bit */
#define NEC_FCN3M47DAT0W FCN3M047DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 48 - 8 bit */
#define NEC_FCN3M48DAT0B FCN3M048DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 48 - 16 bit */
#define NEC_FCN3M48DAT0H FCN3M048DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 48 - 32 bit */
#define NEC_FCN3M48DAT0W FCN3M048DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 49 - 8 bit */
#define NEC_FCN3M49DAT0B FCN3M049DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 49 - 16 bit */
#define NEC_FCN3M49DAT0H FCN3M049DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 49 - 32 bit */
#define NEC_FCN3M49DAT0W FCN3M049DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 50 - 8 bit */
#define NEC_FCN3M50DAT0B FCN3M050DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 50 - 16 bit */
#define NEC_FCN3M50DAT0H FCN3M050DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 50 - 32 bit */
#define NEC_FCN3M50DAT0W FCN3M050DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 51 - 8 bit */
#define NEC_FCN3M51DAT0B FCN3M051DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 51 - 16 bit */
#define NEC_FCN3M51DAT0H FCN3M051DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 50 - 32 bit */
#define NEC_FCN3M51DAT0W FCN3M051DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 52 - 8 bit */
#define NEC_FCN3M52DAT0B FCN3M052DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 52 - 16 bit */
#define NEC_FCN3M52DAT0H FCN3M052DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 52 - 32 bit */
#define NEC_FCN3M52DAT0W FCN3M052DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 53 - 8 bit */
#define NEC_FCN3M53DAT0B FCN3M053DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 53 - 16 bit */
#define NEC_FCN3M53DAT0H FCN3M053DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 53 - 32 bit */
#define NEC_FCN3M53DAT0W FCN3M053DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 54 - 8 bit */
#define NEC_FCN3M54DAT0B FCN3M054DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 54 - 16 bit */
#define NEC_FCN3M54DAT0H FCN3M054DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 54 - 32 bit */
#define NEC_FCN3M54DAT0W FCN3M054DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 55 - 8 bit */
#define NEC_FCN3M55DAT0B FCN3M055DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 55 - 16 bit */
#define NEC_FCN3M55DAT0H FCN3M055DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 55 - 32 bit */
#define NEC_FCN3M55DAT0W FCN3M055DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 56 - 8 bit */
#define NEC_FCN3M56DAT0B FCN3M056DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 56 - 16 bit */
#define NEC_FCN3M56DAT0H FCN3M056DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 56 - 32 bit */
#define NEC_FCN3M56DAT0W FCN3M056DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 57 - 8 bit */
#define NEC_FCN3M57DAT0B FCN3M057DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 57 - 16 bit */
#define NEC_FCN3M57DAT0H FCN3M057DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 57 - 32 bit */
#define NEC_FCN3M57DAT0W FCN3M057DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 58 - 8 bit */
#define NEC_FCN3M58DAT0B FCN3M058DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 58 - 16 bit */
#define NEC_FCN3M58DAT0H FCN3M058DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 58 - 32 bit */
#define NEC_FCN3M58DAT0W FCN3M058DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 59 - 8 bit */
#define NEC_FCN3M59DAT0B FCN3M059DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 59 - 16 bit */
#define NEC_FCN3M59DAT0H FCN3M059DAT0H
/* Address of the CAN Controller Hardware1 Message Buffer 59 - 32 bit */
#define NEC_FCN3M59DAT0W FCN3M059DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 60 - 8 bit */
#define NEC_FCN3M60DAT0B FCN3M060DAT0B
/* Address of the CAN Controller Hardware 30 Message Buffer 60 - 16 bit */
#define NEC_FCN3M60DAT0H FCN3M060DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 60 - 32 bit */
#define NEC_FCN3M60DAT0W FCN3M060DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 61 - 8 bit */
#define NEC_FCN3M61DAT0B FCN3M061DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 61 - 16 bit */
#define NEC_FCN3M61DAT0H FCN3M061DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 61 - 32 bit */
#define NEC_FCN3M61DAT0W FCN3M061DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 62- 8 bit */
#define NEC_FCN3M62DAT0B FCN3M062DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 62 - 16 bit */
#define NEC_FCN3M62DAT0H FCN3M062DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 62 - 32 bit */
#define NEC_FCN3M62DAT0W FCN3M062DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 63 - 8 bit */
#define NEC_FCN3M63DAT0B FCN3M063DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 63 - 16 bit */
#define NEC_FCN3M63DAT0H FCN3M063DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 63 - 32 bit */
#define NEC_FCN3M63DAT0W FCN3M063DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 0 - 8 bit */
#define NEC_FCN3M64DAT0B FCN3M064DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 0 - 16 bit */
#define NEC_FCN3M64DAT0H FCN3M064DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 0 - 32 bit */
#define NEC_FCN3M64DAT0W FCN3M064DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 1 - 8 bit */
#define NEC_FCN3M65DAT0B FCN3M065DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 1 - 16 bit */
#define NEC_FCN3M65DAT0H FCN3M065DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 1 - 32 bit */
#define NEC_FCN3M65DAT0W FCN3M065DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 2 - 8 bit */
#define NEC_FCN3M66DAT0B FCN3M066DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 2 - 16 bit */
#define NEC_FCN3M66DAT0H FCN3M066DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 2 - 32 bit */
#define NEC_FCN3M66DAT0W FCN3M066DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 3 - 8 bit */
#define NEC_FCN3M67DAT0B FCN3M067DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 3 - 16 bit */
#define NEC_FCN3M67DAT0H FCN3M067DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 3 - 32 bit */
#define NEC_FCN3M67DAT0W FCN3M067DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 4 - 8 bit */
#define NEC_FCN3M68DAT0B FCN3M068DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 4 - 16 bit */
#define NEC_FCN3M68DAT0H FCN3M068DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 4 - 32 bit */
#define NEC_FCN3M68DAT0W FCN3M068DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 5 - 8 bit */
#define NEC_FCN3M69DAT0B FCN3M069DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 5 - 16 bit */
#define NEC_FCN3M69DAT0H FCN3M069DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 5 - 32 bit */
#define NEC_FCN3M69DAT0W FCN3M069DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 6 - 8 bit */
#define NEC_FCN3M70DAT0B FCN3M070DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 6 - 16 bit */
#define NEC_FCN3M70DAT0H FCN3M070DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 6 - 32 bit */
#define NEC_FCN3M70DAT0W FCN3M070DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 7 - 8 bit */
#define NEC_FCN3M71DAT0B FCN3M071DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 7 - 16 bit */
#define NEC_FCN3M71DAT0H FCN3M071DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer7 - 32 bit */
#define NEC_FCN3M71DAT0W FCN3M071DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 8 - 8 bit */
#define NEC_FCN3M72DAT0B FCN3M072DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 8 - 16 bit */
#define NEC_FCN3M72DAT0H FCN3M072DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 8 - 32 bit */
#define NEC_FCN3M72DAT0W FCN3M072DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 9 - 8 bit */
#define NEC_FCN3M73DAT0B FCN3M073DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 9 - 16 bit */
#define NEC_FCN3M73DAT0H FCN3M073DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 9 - 32 bit */
#define NEC_FCN3M73DAT0W FCN3M073DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 10 - 8 bit */
#define NEC_FCN3M74DAT0B FCN3M074DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 10 - 16 bit */
#define NEC_FCN3M74DAT0H FCN3M074DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 10 - 32 bit */
#define NEC_FCN3M74DAT0W FCN3M074DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 11 - 8 bit */
#define NEC_FCN3M75DAT0B FCN3M075DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 10 - 16 bit */
#define NEC_FCN3M75DAT0H FCN3M075DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 10 - 32 bit */
#define NEC_FCN3M75DAT0W FCN3M075DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 2 - 8 bit */
#define NEC_FCN3M76DAT0B FCN3M076DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 12 - 16 bit */
#define NEC_FCN3M76DAT0H FCN3M076DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 12 - 32 bit */
#define NEC_FCN3M76DAT0W FCN3M076DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 13 - 8 bit */
#define NEC_FCN3M77DAT0B FCN3M077DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 13 - 16 bit */
#define NEC_FCN3M77DAT0H FCN3M077DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 13 - 32 bit */
#define NEC_FCN3M77DAT0W FCN3M077DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 14 - 8 bit */
#define NEC_FCN3M78DAT0B FCN3M078DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 14 - 16 bit */
#define NEC_FCN3M78DAT0H FCN3M078DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 14 - 32 bit */
#define NEC_FCN3M78DAT0W FCN3M078DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 15 - 8 bit */
#define NEC_FCN3M79DAT0B FCN3M079DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 15 - 16 bit */
#define NEC_FCN3M79DAT0H FCN3M079DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 10 - 32 bit */
#define NEC_FCN3M79DAT0W FCN3M079DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 16 - 8 bit */
#define NEC_FCN3M80DAT0B FCN3M080DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 16 - 16 bit */
#define NEC_FCN3M80DAT0H FCN3M080DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 16 - 32 bit */
#define NEC_FCN3M80DAT0W FCN3M080DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 17 - 8 bit */
#define NEC_FCN3M81DAT0B FCN3M081DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 17 - 16 bit */
#define NEC_FCN3M81DAT0H FCN3M081DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 17 - 32 bit */
#define NEC_FCN3M81DAT0W FCN3M081DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 18 - 8 bit */
#define NEC_FCN3M82DAT0B FCN3M082DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 18 - 16 bit */
#define NEC_FCN3M82DAT0H FCN3M082DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 18 - 32 bit */
#define NEC_FCN3M82DAT0W FCN3M082DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 19 - 8 bit */
#define NEC_FCN3M83DAT0B FCN3M083DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 19 - 16 bit */
#define NEC_FCN3M83DAT0H FCN3M083DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 19 - 32 bit */
#define NEC_FCN3M83DAT0W FCN3M083DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 20 - 8 bit */
#define NEC_FCN3M84DAT0B FCN3M084DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 20 - 16 bit */
#define NEC_FCN3M84DAT0H FCN3M084DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 20 - 32 bit */
#define NEC_FCN3M84DAT0W FCN3M084DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 21 - 8 bit */
#define NEC_FCN3M85DAT0B FCN3M085DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 21 - 16 bit */
#define NEC_FCN3M85DAT0H FCN3M085DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 21 - 32 bit */
#define NEC_FCN3M85DAT0W FCN3M085DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 22 - 8 bit */
#define NEC_FCN3M86DAT0B FCN3M086DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 22 - 16 bit */
#define NEC_FCN3M86DAT0H FCN3M086DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 22 - 32 bit */
#define NEC_FCN3M86DAT0W FCN3M086DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 23 - 8 bit */
#define NEC_FCN3M87DAT0B FCN3M087DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 23 - 16 bit */
#define NEC_FCN3M87DAT0H FCN3M087DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 23 - 32 bit */
#define NEC_FCN3M87DAT0W FCN3M087DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 24 - 8 bit */
#define NEC_FCN3M88DAT0B FCN3M088DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 24 - 16 bit */
#define NEC_FCN3M88DAT0H FCN3M088DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 24 - 32 bit */
#define NEC_FCN3M88DAT0W FCN3M088DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 25 - 8 bit */
#define NEC_FCN3M89DAT0B FCN3M089DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 25 - 16 bit */
#define NEC_FCN3M89DAT0H FCN3M089DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 25 - 32 bit */
#define NEC_FCN3M89DAT0W FCN3M089DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 26 - 8 bit */
#define NEC_FCN3M90DAT0B FCN3M090DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 26 - 16 bit */
#define NEC_FCN3M90DAT0H FCN3M090DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 26 - 32 bit */
#define NEC_FCN3M90DAT0W FCN3M090DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 27 - 8 bit */
#define NEC_FCN3M91DAT0B FCN3M091DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 27 - 16 bit */
#define NEC_FCN3M91DAT0H FCN3M091DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 27 - 32 bit */
#define NEC_FCN3M91DAT0W FCN3M091DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 28 - 8 bit */
#define NEC_FCN3M92DAT0B FCN3M092DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 28 - 16 bit */
#define NEC_FCN3M92DAT0H FCN3M092DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 28 - 32 bit */
#define NEC_FCN3M92DAT0W FCN3M092DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 29 - 8 bit */
#define NEC_FCN3M93DAT0B FCN3M093DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 29 - 16 bit */
#define NEC_FCN3M93DAT0H FCN3M093DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 29 - 32 bit */
#define NEC_FCN3M93DAT0W FCN3M093DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 30 - 8 bit */
#define NEC_FCN3M94DAT0B FCN3M094DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 30 - 16 bit */
#define NEC_FCN3M94DAT0H FCN3M094DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 30 - 32 bit */
#define NEC_FCN3M94DAT0W FCN3M094DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 31 - 8 bit */
#define NEC_FCN3M95DAT0B FCN3M095DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 31 - 16 bit */
#define NEC_FCN3M95DAT0H FCN3M095DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 31 - 32 bit */
#define NEC_FCN3M95DAT0W FCN3M095DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 32 - 8 bit */
#define NEC_FCN3M96DAT0B FCN3M096DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 32 - 16 bit */
#define NEC_FCN3M96DAT0H FCN3M096DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 32 - 32 bit */
#define NEC_FCN3M96DAT0W FCN3M096DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 33 - 8 bit */
#define NEC_FCN3M97DAT0B FCN3M097DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 33 - 16 bit */
#define NEC_FCN3M97DAT0H FCN3M097DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 33 - 32 bit */
#define NEC_FCN3M97DAT0W FCN3M097DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 34 - 8 bit */
#define NEC_FCN3M98DAT0B FCN3M098DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 34 - 16 bit */
#define NEC_FCN3M98DAT0H FCN3M098DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 34 - 32 bit */
#define NEC_FCN3M98DAT0W FCN3M098DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 35 - 8 bit */
#define NEC_FCN3M99DAT0B FCN3M099DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 35 - 16 bit */
#define NEC_FCN3M99DAT0H FCN3M099DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 35 - 32 bit */
#define NEC_FCN3M99DAT0W FCN3M099DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 36 - 8 bit */
#define NEC_FCN3M100DAT0B FCN3M100DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 36 - 16 bit */
#define NEC_FCN3M100DAT0H FCN3M100DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 36 - 32 bit */
#define NEC_FCN3M100DAT0W FCN3M100DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 37 - 8 bit */
#define NEC_FCN3M101DAT0B FCN3M101DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 37 - 16 bit */
#define NEC_FCN3M101DAT0H FCN3M101DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 37 - 32 bit */
#define NEC_FCN3M101DAT0W FCN3M101DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 38 - 8 bit */
#define NEC_FCN3M102DAT0B FCN3M102DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 38 - 16 bit */
#define NEC_FCN3M102DAT0H FCN3M102DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 38 - 32 bit */
#define NEC_FCN3M102DAT0W FCN3M102DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 39 - 8 bit */
#define NEC_FCN3M103DAT0B FCN3M103DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 39 - 16 bit */
#define NEC_FCN3M103DAT0H FCN3M103DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 39 - 32 bit */
#define NEC_FCN3M103DAT0W FCN3M103DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 40 - 8 bit */
#define NEC_FCN3M104DAT0B FCN3M104DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 40 - 16 bit */
#define NEC_FCN3M104DAT0H FCN3M104DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 40 - 32 bit */
#define NEC_FCN3M104DAT0W FCN3M104DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 41 - 8 bit */
#define NEC_FCN3M105DAT0B FCN3M105DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 41 - 16 bit */
#define NEC_FCN3M105DAT0H FCN3M105DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 41 - 32 bit */
#define NEC_FCN3M105DAT0W FCN3M105DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 42 - 8 bit */
#define NEC_FCN3M106DAT0B FCN3M106DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 42 - 16 bit */
#define NEC_FCN3M106DAT0H FCN3M106DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 42 - 32 bit */
#define NEC_FCN3M106DAT0W FCN3M106DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 43 - 8 bit */
#define NEC_FCN3M107DAT0B FCN3M107DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 43 - 16 bit */
#define NEC_FCN3M107DAT0H FCN3M107DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 43 - 32 bit */
#define NEC_FCN3M107DAT0W FCN3M107DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 44 - 8 bit */
#define NEC_FCN3M108DAT0B FCN3M108DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 44 - 16 bit */
#define NEC_FCN3M108DAT0H FCN3M108DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 44 - 32 bit */
#define NEC_FCN3M108DAT0W FCN3M108DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 45 - 8 bit */
#define NEC_FCN3M109DAT0B FCN3M109DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 45 - 16 bit */
#define NEC_FCN3M109DAT0H FCN3M109DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 45 - 32 bit */
#define NEC_FCN3M109DAT0W FCN3M109DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 46 - 8 bit */
#define NEC_FCN3M110DAT0B FCN3M110DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 46 - 16 bit */
#define NEC_FCN3M110DAT0H FCN3M110DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 46 - 32 bit */
#define NEC_FCN3M110DAT0W FCN3M110DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 47 - 8 bit */
#define NEC_FCN3M111DAT0B FCN3M111DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 47 - 16 bit */
#define NEC_FCN3M111DAT0H FCN3M111DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 47 - 32 bit */
#define NEC_FCN3M111DAT0W FCN3M111DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 48 - 8 bit */
#define NEC_FCN3M112DAT0B FCN3M112DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 48 - 16 bit */
#define NEC_FCN3M112DAT0H FCN3M112DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 48 - 32 bit */
#define NEC_FCN3M112DAT0W FCN3M112DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 49 - 8 bit */
#define NEC_FCN3M113DAT0B FCN3M113DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 49 - 16 bit */
#define NEC_FCN3M113DAT0H FCN3M113DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 49 - 32 bit */
#define NEC_FCN3M113DAT0W FCN3M113DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 50 - 8 bit */
#define NEC_FCN3M114DAT0B FCN3M114DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 50 - 16 bit */
#define NEC_FCN3M114DAT0H FCN3M114DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 50 - 32 bit */
#define NEC_FCN3M114DAT0W FCN3M114DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 51 - 8 bit */
#define NEC_FCN3M115DAT0B FCN3M115DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 51 - 16 bit */
#define NEC_FCN3M115DAT0H FCN3M115DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 50 - 32 bit */
#define NEC_FCN3M115DAT0W FCN3M115DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 52 - 8 bit */
#define NEC_FCN3M116DAT0B FCN3M116DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 52 - 16 bit */
#define NEC_FCN3M116DAT0H FCN3M116DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 52 - 32 bit */
#define NEC_FCN3M116DAT0W FCN3M116DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 53 - 8 bit */
#define NEC_FCN3M117DAT0B FCN3M117DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 53 - 16 bit */
#define NEC_FCN3M117DAT0H FCN3M117DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 53 - 32 bit */
#define NEC_FCN3M117DAT0W FCN3M117DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 54 - 8 bit */
#define NEC_FCN3M118DAT0B FCN3M118DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 54 - 16 bit */
#define NEC_FCN3M118DAT0H FCN3M118DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 54 - 32 bit */
#define NEC_FCN3M118DAT0W FCN3M118DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 55 - 8 bit */
#define NEC_FCN3M119DAT0B FCN3M119DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 55 - 16 bit */
#define NEC_FCN3M119DAT0H FCN3M119DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 55 - 32 bit */
#define NEC_FCN3M119DAT0W FCN3M119DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 56 - 8 bit */
#define NEC_FCN3M120DAT0B FCN3M120DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 56 - 16 bit */
#define NEC_FCN3M120DAT0H FCN3M120DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 56 - 32 bit */
#define NEC_FCN3M120DAT0W FCN3M120DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 57 - 8 bit */
#define NEC_FCN3M121DAT0B FCN3M121DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 57 - 16 bit */
#define NEC_FCN3M121DAT0H FCN3M121DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 57 - 32 bit */
#define NEC_FCN3M121DAT0W FCN3M121DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 58 - 8 bit */
#define NEC_FCN3M122DAT0B FCN3M122DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 58 - 16 bit */
#define NEC_FCN3M122DAT0H FCN3M122DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 58 - 32 bit */
#define NEC_FCN3M122DAT0W FCN3M122DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 59 - 8 bit */
#define NEC_FCN3M123DAT0B FCN3M123DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 59 - 16 bit */
#define NEC_FCN3M123DAT0H FCN3M123DAT0H
/* Address of the CAN Controller Hardware1 Message Buffer 59 - 32 bit */
#define NEC_FCN3M123DAT0W FCN3M123DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 60 - 8 bit */
#define NEC_FCN3M124DAT0B FCN3M124DAT0B
/* Address of the CAN Controller Hardware 30 Message Buffer 60 - 16 bit */
#define NEC_FCN3M124DAT0H FCN3M124DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 60 - 32 bit */
#define NEC_FCN3M124DAT0W FCN3M124DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 61 - 8 bit */
#define NEC_FCN3M125DAT0B FCN3M125DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 61 - 16 bit */
#define NEC_FCN3M125DAT0H FCN3M125DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 61 - 32 bit */
#define NEC_FCN3M125DAT0W FCN3M125DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 62- 8 bit */
#define NEC_FCN3M126DAT0B FCN3M126DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 62 - 16 bit */
#define NEC_FCN3M126DAT0H FCN3M126DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 62 - 32 bit */
#define NEC_FCN3M126DAT0W FCN3M126DAT0W
/* Address of the CAN Controller Hardware 3 Message Buffer 63 - 8 bit */
#define NEC_FCN3M127DAT0B FCN3M127DAT0B
/* Address of the CAN Controller Hardware 3 Message Buffer 63 - 16 bit */
#define NEC_FCN3M127DAT0H FCN3M127DAT0H
/* Address of the CAN Controller Hardware 3 Message Buffer 63 - 32 bit */
#define NEC_FCN3M127DAT0W FCN3M127DAT0W
/*******************************************************************************
** Macros for SPI Driver **
*******************************************************************************/
/* Base address of the CSIG0 hardware registers structure */
#define NEC_CSIG0CTL0 CSIG0CTL0
#define NEC_CSIG0BCTL0 CSIG0BCTL0
#define NEC_CSIG0CTL1 CSIG0CTL1
#define NEC_CSIG0CTL2 CSIG0CTL2
#define NEC_CSIG0CFG0 CSIG0CFG0
#define NEC_CSIG0TX0W CSIG0TX0W
#define NEC_CSIG0TX0H CSIG0TX0H
#define NEC_CSIG0RX0 CSIG0RX0
/* Base address of the CSIG4 hardware registers structure */
#define NEC_CSIG4CTL0 CSIG4CTL0
#define NEC_CSIG4BCTL0 CSIG4BCTL0
#define NEC_CSIG4CTL1 CSIG4CTL1
#define NEC_CSIG4CTL2 CSIG4CTL2
#define NEC_CSIG4CFG0 CSIG4CFG0
#define NEC_CSIG4TX0W CSIG4TX0W
#define NEC_CSIG4TX0H CSIG4TX0H
#define NEC_CSIG4RX0 CSIG4RX0
/* Base address of the CSIH0 hardware registers structure */
#define NEC_CSIH0CTL0 CSIH0CTL0
#define NEC_CSIH0CTL1 CSIH0CTL1
#define NEC_CSIH0CTL2 CSIH0CTL2
#define NEC_CHBA0MCTL1 CSIH0MCTL1
#define NEC_CHBA0MCTL2 CSIH0MCTL2
#define NEC_CSIH0TX0W CSIH0TX0H
#define NEC_CSIH0TX0H CSIH0TX0H
#define NEC_CSIH0RX0 CSIH0RX0H
#define NEC_CHBA0MRWP0 CSIH0MRWP0
#define NEC_CHBA0MCTL0 CSIH0MCTL0
#define NEC_CHBA0CFG0 CSIH0CFG0
#define NEC_CHBA0CFG1 CSIH0CFG1
#define NEC_CHBA0CFG2 CSIH0CFG2
#define NEC_CHBA0CFG3 CSIH0CFG3
#define NEC_CHBA0CFG4 CSIH0CFG4
#define NEC_CHBA0CFG5 CSIH0CFG5
#define NEC_CHBA0CFG6 CSIH0CFG6
#define NEC_CHBA0CFG7 CSIH0CFG7
/* Base address of the CSIH1 hardware registers structure */
#define NEC_CSIH1CTL0 CSIH1CTL0
#define NEC_CSIH1CTL1 CSIH1CTL1
#define NEC_CSIH1CTL2 CSIH1CTL2
#define NEC_CHBA1MCTL1 CSIH1MCTL1
#define NEC_CHBA1MCTL2 CSIH1MCTL2
#define NEC_CSIH1TX0W CSIH1TX0H
#define NEC_CSIH1TX0H CSIH1TX0H
#define NEC_CSIH1RX0 CSIH1RX0H
#define NEC_CHBA1MRWP0 CSIH1MRWP0
#define NEC_CHBA1MCTL0 CSIH1MCTL0
#define NEC_CHBA1CFG0 CSIH1CFG0
#define NEC_CHBA1CFG1 CSIH1CFG1
#define NEC_CHBA1CFG2 CSIH1CFG2
#define NEC_CHBA1CFG3 CSIH1CFG3
#define NEC_CHBA1CFG4 CSIH1CFG4
#define NEC_CHBA1CFG5 CSIH1CFG5
#define NEC_CHBA1CFG6 CSIH1CFG6
#define NEC_CHBA1CFG7 CSIH1CFG7
/* Base address of the CSIH2 hardware registers structure */
#define NEC_CSIH2CTL0 CSIH2CTL0
#define NEC_CSIH2CTL1 CSIH2CTL1
#define NEC_CSIH2CTL2 CSIH2CTL2
#define NEC_CHBA2MCTL0 CSIH2MCTL0
#define NEC_CHBA2MCTL1 CSIH2MCTL1
#define NEC_CSIH2TX0W CSIH2TX0H
#define NEC_CSIH2TX0H CSIH2TX0H
#define NEC_CSIH2RX0 CSIH2RX0H
#define NEC_CHBA2MRWP0 CSIH2MRWP0
#define NEC_CHBA2CFG0 CSIH2CFG0
#define NEC_CHBA2CFG1 CSIH2CFG1
#define NEC_CHBA2CFG2 CSIH2CFG2
#define NEC_CHBA2CFG3 CSIH2CFG3
#define NEC_CHBA2CFG4 CSIH2CFG4
#define NEC_CHBA2CFG5 CSIH2CFG5
#define NEC_CHBA2CFG6 CSIH2CFG6
#define NEC_CHBA2CFG7 CSIH2CFG7
/* Interrupt control registers for CSIG0 */
#define NEC_ICCSIG0IRE_109 ICCSIG0IRE
#define NEC_ICCSIG0IR_110 ICCSIG0IR
#define NEC_ICCSIG0IC_111 ICCSIG0IC
/* Interrupt control registers for CSIG4 */
#define NEC_ICCSIG4IRE_170 ICCSIG4IRE
#define NEC_ICCSIG4IR_171 ICCSIG4IR
#define NEC_ICCSIG4IC_172 ICCSIG4IC
/* Interrupt control registers for CSIH0 */
#define NEC_CSIH0TIC_163 ICCSIH0IC
#define NEC_CSIH0TIJC_164 ICCSIH0IJC
#define NEC_CSIH0TIRE_168 ICCSIH0IRE
#define NEC_CSIH0TIR_169 ICCSIH0IR
/* Interrupt control registers for CSIH1 */
#define NEC_CSIH1TIC_182 ICCSIH1IC
#define NEC_CSIH1TIJC_183 ICCSIH1IJC
#define NEC_CSIH1TIRE_180 ICCSIH1IRE
#define NEC_CSIH1TIR_181 ICCSIH1IR
/* Interrupt control registers for CSIH2 */
#define NEC_CSIH2TIC_204 ICCSIH2IC
#define NEC_CSIH2TIJC_205 ICCSIH2IJC
#define NEC_CSIH2TIRE_202 ICCSIH2IRE
#define NEC_CSIH2TIR_203 ICCSIH2IR
/*******************************************************************************
** Macros for LIN Driver **
*******************************************************************************/
/* Address of the LIN URTE 2 Control Register0 */
#define NEC_URTE2CTL0 URTE2CTL0
/* Address of the LIN URTE 3 Control Register0 */
#define NEC_URTE3CTL0 URTE3CTL0
/* Address of the LIN URTE 4 Control Register0 */
#define NEC_URTE4CTL0 URTE4CTL0
/* Address of the LIN URTE 5 Control Register0 */
#define NEC_URTE5CTL0 URTE5CTL0
/* Address of the LIN URTE 6 Control Register0 */
#define NEC_URTE6CTL0 URTE6CTL0
/* Address of the LIN URTE 7 Control Register0 */
#define NEC_URTE7CTL0 URTE7CTL0
/* Address of the LIN URTE 10 Control Register0 */
#define NEC_URTE10CTL0 URTE10CTL0
/* Address of the LIN URTE 11 Control Register0 */
#define NEC_URTE11CTL0 URTE11CTL0
#define NEC_LMA2CTL0W LMA2CTL0W
#define NEC_LMA3CTL0W LMA3CTL0W
#define NEC_LMA4CTL0W LMA4CTL0W
#define NEC_LMA5CTL0W LMA5CTL0W
#define NEC_LMA6CTL0W LMA6CTL0W
#define NEC_LMA7CTL0W LMA7CTL0W
#define NEC_LMA10CTL0W LMA10CTL0W
#define NEC_LMA11CTL0W LMA11CTL0W
/* Address of the LIN LMA 2 Status Interrupt Register */
#define NEC_ICLMA2IS ICLMA2IS
/* Address of the LIN LMA 2 Receive Interrupt Register */
#define NEC_ICLMA2IR ICLMA2IR
/* Address of the LIN LMA 2 Transmit Interrupt Register */
#define NEC_ICLMA2IT ICLMA2IT
/* Address of the LIN LMA 3 Status Interrupt Register */
#define NEC_ICLMA3IS ICLMA3IS
/* Address of the LIN LMA 3 Receive Interrupt Register */
#define NEC_ICLMA3IR ICLMA3IR
/* Address of the LIN LMA 3 Transmit Interrupt Register */
#define NEC_ICLMA3IT ICLMA3IT
/* Address of the LIN LMA 4 Status Interrupt Register */
#define NEC_ICLMA4IS ICLMA4IS
/* Address of the LIN LMA 4 Receive Interrupt Register */
#define NEC_ICLMA4IR ICLMA4IR
/* Address of the LIN LMA 4 Transmit Interrupt Register */
#define NEC_ICLMA4IT ICLMA4IT
/* Address of the LIN LMA 5 Status Interrupt Register */
#define NEC_ICLMA5IS ICLMA5IS
/* Address of the LIN LMA 5 Receive Interrupt Register */
#define NEC_ICLMA5IR ICLMA5IR
/* Address of the LIN LMA 5 Transmit Interrupt Register */
#define NEC_ICLMA5IT ICLMA5IT
/* Address of the LIN LMA 6 Status Interrupt Register */
#define NEC_ICLMA6IS ICLMA6IS
/* Address of the LIN LMA 6 Receive Interrupt Register */
#define NEC_ICLMA6IR ICLMA6IR
/* Address of the LIN LMA 6 Transmit Interrupt Register */
#define NEC_ICLMA6IT ICLMA6IT
/* Address of the LIN LMA 7 Status Interrupt Register */
#define NEC_ICLMA7IS ICLMA7IS
/* Address of the LIN LMA 7 Receive Interrupt Register */
#define NEC_ICLMA7IR ICLMA7IR
/* Address of the LIN LMA 7 Transmit Interrupt Register */
#define NEC_ICLMA7IT ICLMA7IT
/* Address of the LIN LMA 10 Status Interrupt Register */
#define NEC_ICLMA10IS ICLMA10IS
/* Address of the LIN LMA 10 Receive Interrupt Register */
#define NEC_ICLMA10IR ICLMA10IR
/* Address of the LIN LMA 10 Transmit Interrupt Register */
#define NEC_ICLMA10IT ICLMA10IT
/* Address of the LIN LMA 11 Status Interrupt Register */
#define NEC_ICLMA11IS ICLMA11IS
/* Address of the LIN LMA 11 Receive Interrupt Register */
#define NEC_ICLMA11IR ICLMA11IR
/* Address of the LIN LMA 11 Transmit Interrupt Register */
#define NEC_ICLMA11IT ICLMA11IT
/*******************************************************************************
** Macros for IMR Register **
*******************************************************************************/
#define NEC_IMR0 IMR0
#define NEC_IMR1 IMR1
#define NEC_IMR2 IMR2
#define NEC_IMR3 IMR3
#define NEC_IMR4 IMR4
#define NEC_IMR5 IMR5
#define NEC_IMR6 IMR6
#define NEC_IMR7 IMR7
#define NEC_IMR8 IMR8
#define NEC_IMR9 IMR9
#define NEC_IMR10 IMR10
#define NEC_IMR11 IMR11
#define NEC_IMR12 IMR12
#define NEC_IMR13 IMR13
#define NEC_IMR14 IMR14
#define NEC_IMR15 IMR15
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
/*******************************************************************************
** End Of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Adc/Adc_LTTypes.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Adc_LTTypes.h */
/* Version = 3.1.2 */
/* Date = 04-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of AUTOSAR ADC Link Time Parameters */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 10-Jul-2009 : Initial version
*
* V3.0.1: 12-Oct-2009 : As per SCR 052, the following changes are made
* 1. Template changes are made.
*
* V3.0.2: 01-Jul-2010 : As per SCR 295, extern declaration for array
* Adc_GaaHwUnitIndex[] is added.
*
* V3.1.0: 27-Jul-2011 : Modified for DK-4
* V3.1.1: 14-Feb-2012 : Merged the fixes done for Fx4L Adc driver
*
* V3.1.2: 04-Jun-2012 : As per SCR 019, the following changes are made
* 1. Compiler version is removed from environment
* section.
* 2. File version is changed.
*/
/******************************************************************************/
#ifndef ADC_LTTYPES_H
#define ADC_LTTYPES_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Adc.h"
#include "Adc_Cbk.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification information */
#define ADC_LTTYPES_AR_MAJOR_VERSION ADC_AR_MAJOR_VERSION_VALUE
#define ADC_LTTYPES_AR_MINOR_VERSION ADC_AR_MINOR_VERSION_VALUE
#define ADC_LTTYPES_AR_PATCH_VERSION ADC_AR_PATCH_VERSION_VALUE
/* File version information */
#define ADC_LTTYPES_SW_MAJOR_VERSION 3
#define ADC_LTTYPES_SW_MINOR_VERSION 1
#define ADC_LTTYPES_SW_PATCH_VERSION 2
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (ADC_LTTYPES_SW_MAJOR_VERSION != ADC_SW_MAJOR_VERSION)
#error "Software major version of Adc.h and Adc_LTTypes.h did not match!"
#endif
#if (ADC_LTTYPES_SW_MINOR_VERSION != ADC_SW_MINOR_VERSION )
#error "Software minor version of Adc.h and Adc_LTTypes.h did not match!"
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Structure of function pointer for Callback notification function */
typedef struct STagTdd_Adc_GroupNotifyFuncType
{
/* Pointer to callback notification */
P2FUNC (void, ADC_APPL_CODE, pGroupNotificationPointer)(void);
} Tdd_Adc_GroupNotifyFuncType;
/*******************************************************************************
** Extern declarations for Global Data **
*******************************************************************************/
#define ADC_START_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/* Prototype for the group notification function */
extern CONST(Tdd_Adc_GroupNotifyFuncType, ADC_CONST) Adc_GstChannelGrpFunc[];
#define ADC_STOP_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
#define ADC_START_SEC_CONST_8BIT
#include "MemMap.h"
/* Declaration for Hardware Index Mapping array */
extern CONST(uint8, ADC_CONST) Adc_GaaHwUnitIndex[];
#define ADC_STOP_SEC_CONST_8BIT
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* ADC_LTTYPES_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/Include/NodeConfig.h
/*----------------------------------------------------------------------------
|
| File Name: NodeConfig.h
|
| Comment: Configuration of the emulated OSEK node
|
| Change the text entries below to describe the node, which you
| want to emulate.
|
|-----------------------------------------------------------------------------
| A U T H O R I D E N T I T Y
|-----------------------------------------------------------------------------
| Initials Name Company
| -------- --------------------- ------------------------------------
| Lm Marc Lobmeyer Vector Informatik GmbH
| As <NAME> Vector Informatik GmbH
|-----------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|-----------------------------------------------------------------------------
| Date Ver Author Description
| ---------- --- ------ --------------------------------------------------
| 29.01.2000 1.0 As Creation of the skeleton file
|-----------------------------------------------------------------------------
| C O P Y R I G H T
|-----------------------------------------------------------------------------
| Copyright (c) 1994 - 2000 by Vector Informatik GmbH. All rights reserved.
-----------------------------------------------------------------------------*/
// The name of the node, which you want to emulate.
// This should be the same name, which is used in the database (CANdb) to
// describe this node.
#define NODE_NAME "DEMO"
// The version of the library, which you generate for CANoe
// Due to limitations of the ressource compiler, you must specify it twice.(As
// a coma seperated list of numbers and as a text string.)
#define NODE_VERSION_NUMBER 1,0,0
#define NODE_VERSION_STRING "1.0.0"
// A little description about the things, which will happen here.
#define NODE_DESCRIPTION "General Example of OSEK Emulation"
/************ Organi, Version 3.9.1 Vector-Informatik GmbH ************/
<file_sep>/BSP/MCAL/Wdg/Wdg_23_DriverA.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Wdg_23_DriverA.h */
/* Version = 3.0.2a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of Pre-Compile Macros and API information */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12-Jun-2009 : Initial version
* V3.0.1: 14-Jul-2009 : As per SCR 015, compiler version is changed from
* V5.0.5 to V5.1.6c in the header of the file.
* V3.0.2: 20-Jun-2011 : As per SCR 476 following changes are made
* 1. New variable ucWdtamdDefaultValue is added in the
* structure STagTdd_Wdg_23_DriverA_ConfigType for
* code optimization.
* 2. Data type of variable ddWdtamdDefaultMode changed
* to WdgIf_ModeType.
* V3.0.2a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
#ifndef WDG_23_DRIVERA_H
#define WDG_23_DRIVERA_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Std_Types.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
#define WDG_23_DRIVERA_VENDOR_ID WDG_23_DRIVERA_VENDOR_ID_VALUE
#define WDG_23_DRIVERA_MODULE_ID WDG_23_DRIVERA_MODULE_ID_VALUE
#define WDG_23_DRIVERA_INSTANCE_ID WDG_23_DRIVERA_INSTANCE_ID_VALUE
/* Autosar specification version information */
#define WDG_23_DRIVERA_AR_MAJOR_VERSION WDG_23_DRIVERA_AR_MAJOR_VERSION_VALUE
#define WDG_23_DRIVERA_AR_MINOR_VERSION WDG_23_DRIVERA_AR_MINOR_VERSION_VALUE
#define WDG_23_DRIVERA_AR_PATCH_VERSION WDG_23_DRIVERA_AR_PATCH_VERSION_VALUE
/* Software version Information */
#define WDG_23_DRIVERA_SW_MAJOR_VERSION WDG_23_DRIVERA_SW_MAJOR_VERSION_VALUE
#define WDG_23_DRIVERA_SW_MINOR_VERSION WDG_23_DRIVERA_SW_MINOR_VERSION_VALUE
#define WDG_23_DRIVERA_SW_PATCH_VERSION WDG_23_DRIVERA_SW_PATCH_VERSION_VALUE
/*******************************************************************************
** DET ERROR CODES **
*******************************************************************************/
/* Following error will be reported when API service is used in wrong context
(For eg. When Trigger / SetMode function is invoked without initialization)*/
#define WDG_23_DRIVERA_E_DRIVER_STATE (uint8) 0x10
/* Following error will be reported when API service is called with wrong /
incosistent parameter(s) */
#define WDG_23_DRIVERA_E_PARAM_MODE (uint8) 0x11
/* Following error will be reported when API service is called with wrong /
incosistent parameter(s) */
#define WDG_23_DRIVERA_E_PARAM_CONFIG (uint8) 0x12
/* Following error will be reported when Wdg_GetVersionInfo API is invoked with
a null pointer */
#define WDG_23_DRIVERA_E_PARAM_POINTER (uint8) 0xF0
/* Following error will be reported when Watchdog driver database does not
exist or exist in invalid location */
#define WDG_23_DRVA_E_INVALID_DATABASE (uint8) 0xF1
typedef struct STagTdd_Wdg_23_DriverA_ConfigType
{
/* Database start value */
uint32 ulStartOfDbToc;
/* Value of WDTAMD register for SLOW mode*/
uint8 ucWdtamdSlowValue;
/* Value of WDTAMD register for FAST mode*/
uint8 ucWdtamdFastValue;
/* Value of WDTAMD register for Default mode */
uint8 ucWdtamdDefaultValue;
/* Configured Default mode */
WdgIf_ModeType ddWdtamdDefaultMode;
}Wdg_23_DriverA_ConfigType;
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Service ID of Watchdog Driver Initialization API */
#define WDG_23_DRIVERA_INIT_SID 0x00
/* Service ID of SetMode API which switches current watchdog mode to the
Watchdog mode defined by the parameter ModeSet */
#define WDG_23_DRIVERA_SETMODE_SID 0x01
/* Service ID of Trigger API which triggers the Watchdog Hardware*/
#define WDG_23_DRIVERA_TRIGGER_SID 0x02
/* Service ID of Version Information API */
#define WDG_23_DRIVERA_GETVERSIONINFO_SID 0x04
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#define WDG_23_DRIVERA_START_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
extern CONST(Wdg_23_DriverA_ConfigType,
WDG_23_DRIVERA_CONFIG_CONST) Wdg_23_DriverA_GstConfiguration[];
#define WDG_23_DRIVERA_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
#define WDG_23_DRIVERA_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* External Declaration for Watchdog Initialization API */
extern FUNC(void, WDG_23_DRIVERA_PUBLIC_CODE) Wdg_23_DriverAInit
(P2CONST(Wdg_23_DriverA_ConfigType, AUTOMATIC, WDG_23_DRIVERA_APPL_CONST)
ConfigPtr);
/* External Declaration for Watchdog SetMode API */
extern FUNC(Std_ReturnType, WDG_23_DRIVERA_PUBLIC_CODE) Wdg_23_DriverASetMode
(WdgIf_ModeType Mode);
/* External Declaration for Watchdog Trigger API */
extern FUNC(void, WDG_23_DRIVERA_PUBLIC_CODE) Wdg_23_DriverATrigger(void);
#if (WDG_23_DRIVERA_VERSION_INFO_API == STD_ON)
/* External Declaration for Watchdog Version Information API */
extern FUNC(void, WDG_23_DRIVERA_PUBLIC_CODE)Wdg_23_DriverAGetVersionInfo
(P2VAR(Std_VersionInfoType, AUTOMATIC, WDG_23_DRIVERA_APPL_DATA)versioninfo);
#endif
#define WDG_23_DRIVERA_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* WDG_23_DRIVERA_H */
/*******************************************************************************
** End Of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Icu/Icu_Irq.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Icu_Irq.h */
/* Version = 3.0.2a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains ISR prototypes for all Timers of ICU Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 26-Aug-2009 : Initial version
*
* V3.0.1: 28-Jun-2010 : As per SCR 286, the following changes are made:
* 1. The macro definitions are added to support
* Timer Array Unit B.
* 2. The extern declarations of the interrupt
* service routines are added to support
* Timer Array Unit B.
* 3. File is updated to support an ISR Category
* support configurable by a pre-compile option.
*
* V3.0.2: 20-Jul-2010 : As per SCR 308, ICU_INTERRUPT_MODE is renamed
* as ICU_INTERRUPT_TYPE.
* V3.0.2a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
#ifndef ICU_IRQ_H
#define ICU_IRQ_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define ICU_IRQ_AR_MAJOR_VERSION ICU_AR_MAJOR_VERSION_VALUE
#define ICU_IRQ_AR_MINOR_VERSION ICU_AR_MINOR_VERSION_VALUE
#define ICU_IRQ_AR_PATCH_VERSION ICU_AR_PATCH_VERSION_VALUE
/*
* File version information
*/
#define ICU_IRQ_SW_MAJOR_VERSION 3
#define ICU_IRQ_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Channel Mapping for TAUA Channels */
#define ICU_TAUA0_CH0 0x00
#define ICU_TAUA0_CH1 0x01
#define ICU_TAUA0_CH2 0x02
#define ICU_TAUA0_CH3 0x03
#define ICU_TAUA0_CH4 0x04
#define ICU_TAUA0_CH5 0x05
#define ICU_TAUA0_CH6 0x06
#define ICU_TAUA0_CH7 0x07
#define ICU_TAUA0_CH8 0x08
#define ICU_TAUA0_CH9 0x09
#define ICU_TAUA0_CH10 0x0A
#define ICU_TAUA0_CH11 0x0B
#define ICU_TAUA0_CH12 0x0C
#define ICU_TAUA0_CH13 0x0D
#define ICU_TAUA0_CH14 0x0E
#define ICU_TAUA0_CH15 0x0F
#define ICU_TAUA1_CH0 0x10
#define ICU_TAUA1_CH1 0x11
#define ICU_TAUA1_CH2 0x12
#define ICU_TAUA1_CH3 0x13
#define ICU_TAUA1_CH4 0x14
#define ICU_TAUA1_CH5 0x15
#define ICU_TAUA1_CH6 0x16
#define ICU_TAUA1_CH7 0x17
#define ICU_TAUA1_CH8 0x18
#define ICU_TAUA1_CH9 0x19
#define ICU_TAUA1_CH10 0x1A
#define ICU_TAUA1_CH11 0x1B
#define ICU_TAUA1_CH12 0x1C
#define ICU_TAUA1_CH13 0x1D
#define ICU_TAUA1_CH14 0x1E
#define ICU_TAUA1_CH15 0x1F
#define ICU_TAUA2_CH0 0x20
#define ICU_TAUA2_CH1 0x21
#define ICU_TAUA2_CH2 0x22
#define ICU_TAUA2_CH3 0x23
#define ICU_TAUA2_CH4 0x24
#define ICU_TAUA2_CH5 0x25
#define ICU_TAUA2_CH6 0x26
#define ICU_TAUA2_CH7 0x27
#define ICU_TAUA2_CH8 0x28
#define ICU_TAUA2_CH9 0x29
#define ICU_TAUA2_CH10 0x2A
#define ICU_TAUA2_CH11 0x2B
#define ICU_TAUA2_CH12 0x2C
#define ICU_TAUA2_CH13 0x2D
#define ICU_TAUA2_CH14 0x2E
#define ICU_TAUA2_CH15 0x2F
#define ICU_TAUA3_CH0 0x30
#define ICU_TAUA3_CH1 0x31
#define ICU_TAUA3_CH2 0x32
#define ICU_TAUA3_CH3 0x33
#define ICU_TAUA3_CH4 0x34
#define ICU_TAUA3_CH5 0x35
#define ICU_TAUA3_CH6 0x36
#define ICU_TAUA3_CH7 0x37
#define ICU_TAUA3_CH8 0x38
#define ICU_TAUA3_CH9 0x39
#define ICU_TAUA3_CH10 0x3A
#define ICU_TAUA3_CH11 0x3B
#define ICU_TAUA3_CH12 0x3C
#define ICU_TAUA3_CH13 0x3D
#define ICU_TAUA3_CH14 0x3E
#define ICU_TAUA3_CH15 0x3F
#define ICU_TAUA4_CH0 0x40
#define ICU_TAUA4_CH1 0x41
#define ICU_TAUA4_CH2 0x42
#define ICU_TAUA4_CH3 0x43
#define ICU_TAUA4_CH4 0x44
#define ICU_TAUA4_CH5 0x45
#define ICU_TAUA4_CH6 0x46
#define ICU_TAUA4_CH7 0x47
#define ICU_TAUA4_CH8 0x48
#define ICU_TAUA4_CH9 0x49
#define ICU_TAUA4_CH10 0x4A
#define ICU_TAUA4_CH11 0x4B
#define ICU_TAUA4_CH12 0x4C
#define ICU_TAUA4_CH13 0x4D
#define ICU_TAUA4_CH14 0x4E
#define ICU_TAUA4_CH15 0x4F
#define ICU_TAUA5_CH0 0x50
#define ICU_TAUA5_CH1 0x51
#define ICU_TAUA5_CH2 0x52
#define ICU_TAUA5_CH3 0x53
#define ICU_TAUA5_CH4 0x54
#define ICU_TAUA5_CH5 0x55
#define ICU_TAUA5_CH6 0x56
#define ICU_TAUA5_CH7 0x57
#define ICU_TAUA5_CH8 0x58
#define ICU_TAUA5_CH9 0x59
#define ICU_TAUA5_CH10 0x5A
#define ICU_TAUA5_CH11 0x5B
#define ICU_TAUA5_CH12 0x5C
#define ICU_TAUA5_CH13 0x5D
#define ICU_TAUA5_CH14 0x5E
#define ICU_TAUA5_CH15 0x5F
#define ICU_TAUA6_CH0 0x60
#define ICU_TAUA6_CH1 0x61
#define ICU_TAUA6_CH2 0x62
#define ICU_TAUA6_CH3 0x63
#define ICU_TAUA6_CH4 0x64
#define ICU_TAUA6_CH5 0x65
#define ICU_TAUA6_CH6 0x66
#define ICU_TAUA6_CH7 0x67
#define ICU_TAUA6_CH8 0x68
#define ICU_TAUA6_CH9 0x69
#define ICU_TAUA6_CH10 0x6A
#define ICU_TAUA6_CH11 0x6B
#define ICU_TAUA6_CH12 0x6C
#define ICU_TAUA6_CH13 0x6D
#define ICU_TAUA6_CH14 0x6E
#define ICU_TAUA6_CH15 0x6F
#define ICU_TAUA7_CH0 0x70
#define ICU_TAUA7_CH1 0x71
#define ICU_TAUA7_CH2 0x72
#define ICU_TAUA7_CH3 0x73
#define ICU_TAUA7_CH4 0x74
#define ICU_TAUA7_CH5 0x75
#define ICU_TAUA7_CH6 0x76
#define ICU_TAUA7_CH7 0x77
#define ICU_TAUA7_CH8 0x78
#define ICU_TAUA7_CH9 0x79
#define ICU_TAUA7_CH10 0x7A
#define ICU_TAUA7_CH11 0x7B
#define ICU_TAUA7_CH12 0x7C
#define ICU_TAUA7_CH13 0x7D
#define ICU_TAUA7_CH14 0x7E
#define ICU_TAUA7_CH15 0x7F
#define ICU_TAUA8_CH0 0x80
#define ICU_TAUA8_CH1 0x81
#define ICU_TAUA8_CH2 0x82
#define ICU_TAUA8_CH3 0x83
#define ICU_TAUA8_CH4 0x84
#define ICU_TAUA8_CH5 0x85
#define ICU_TAUA8_CH6 0x86
#define ICU_TAUA8_CH7 0x87
#define ICU_TAUA8_CH8 0x88
#define ICU_TAUA8_CH9 0x89
#define ICU_TAUA8_CH10 0x8A
#define ICU_TAUA8_CH11 0x8B
#define ICU_TAUA8_CH12 0x8C
#define ICU_TAUA8_CH13 0x8D
#define ICU_TAUA8_CH14 0x8E
#define ICU_TAUA8_CH15 0x8F
/* Channel Mapping for TAUB Channels */
#define ICU_TAUB1_CH0 0x10
#define ICU_TAUB1_CH1 0x11
#define ICU_TAUB1_CH2 0x12
#define ICU_TAUB1_CH3 0x13
#define ICU_TAUB1_CH4 0x14
#define ICU_TAUB1_CH5 0x15
#define ICU_TAUB1_CH6 0x16
#define ICU_TAUB1_CH7 0x17
#define ICU_TAUB1_CH8 0x18
#define ICU_TAUB1_CH9 0x19
#define ICU_TAUB1_CH10 0x1A
#define ICU_TAUB1_CH11 0x1B
#define ICU_TAUB1_CH12 0x1C
#define ICU_TAUB1_CH13 0x1D
#define ICU_TAUB1_CH14 0x1E
#define ICU_TAUB1_CH15 0x1F
#define ICU_TAUB2_CH0 0x20
#define ICU_TAUB2_CH1 0x21
#define ICU_TAUB2_CH2 0x22
#define ICU_TAUB2_CH3 0x23
#define ICU_TAUB2_CH4 0x24
#define ICU_TAUB2_CH5 0x25
#define ICU_TAUB2_CH6 0x26
#define ICU_TAUB2_CH7 0x27
#define ICU_TAUB2_CH8 0x28
#define ICU_TAUB2_CH9 0x29
#define ICU_TAUB2_CH10 0x2A
#define ICU_TAUB2_CH11 0x2B
#define ICU_TAUB2_CH12 0x2C
#define ICU_TAUB2_CH13 0x2D
#define ICU_TAUB2_CH14 0x2E
#define ICU_TAUB2_CH15 0x2F
/* Channel Mapping for TAUJ Channels */
#define ICU_TAUJ0_CH0 0x90
#define ICU_TAUJ0_CH1 0x91
#define ICU_TAUJ0_CH2 0x92
#define ICU_TAUJ0_CH3 0x93
#define ICU_TAUJ1_CH0 0x94
#define ICU_TAUJ1_CH1 0x95
#define ICU_TAUJ1_CH2 0x96
#define ICU_TAUJ1_CH3 0x97
#define ICU_TAUJ2_CH0 0x98
#define ICU_TAUJ2_CH1 0x99
#define ICU_TAUJ2_CH2 0x9A
#define ICU_TAUJ2_CH3 0x9B
/* Channel Mapping for External Interrupt channels */
#define ICU_EXTP_INTP_0 0x9C
#define ICU_EXTP_INTP_1 0x9D
#define ICU_EXTP_INTP_2 0x9E
#define ICU_EXTP_INTP_3 0x9F
#define ICU_EXTP_INTP_4 0xA0
#define ICU_EXTP_INTP_5 0xA1
#define ICU_EXTP_INTP_6 0xA2
#define ICU_EXTP_INTP_7 0xA3
#define ICU_EXTP_INTP_8 0xA4
#define ICU_EXTP_INTP_9 0xA5
#define ICU_EXTP_INTP_10 0xA6
#define ICU_EXTP_INTP_11 0xA7
#define ICU_EXTP_INTP_12 0xA8
#define ICU_EXTP_INTP_13 0xA9
#define ICU_EXTP_INTP_14 0xAA
#define ICU_EXTP_INTP_15 0xAB
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
#define ICU_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* The default option for ISR Category MCAL_ISR_TYPE_TOOLCHAIN */
#ifndef ICU_INTERRUPT_TYPE
#define ICU_INTERRUPT_TYPE MCAL_ISR_TYPE_TOOLCHAIN
#endif
#if (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ0_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ0_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ0_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ0_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ1_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ1_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ1_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ1_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ2_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ2_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ2_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) TAUJ2_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_0_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_1_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_2_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_3_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_4_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_5_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_6_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_7_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_8_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_9_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_10_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_11_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_12_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_13_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_14_ISR(void);
extern _INTERRUPT_ FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_15_ISR(void);
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
/* Use OS */
#include "Os.h"
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ICU_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
extern FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH0_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH1_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH2_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH3_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH4_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH5_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH6_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH7_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH8_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH9_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH10_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH11_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH12_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH13_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH14_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA0_CH15_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH0_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH1_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH2_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH3_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH4_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH5_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH6_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH7_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH8_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH9_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH10_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH11_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH12_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH13_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH14_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA1_CH15_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH0_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH1_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH2_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH3_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH4_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH5_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH6_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH7_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH8_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH9_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH10_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH11_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH12_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH13_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH14_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA2_CH15_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH0_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH1_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH2_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH3_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH4_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH5_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH6_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH7_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH8_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH9_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH10_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH11_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH12_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH13_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH14_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA3_CH15_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH0_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH1_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH2_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH3_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH4_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH5_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH6_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH7_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH8_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH9_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH10_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH11_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH12_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH13_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH14_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA4_CH15_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH0_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH1_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH2_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH3_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH4_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH5_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH6_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH7_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH8_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH9_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH10_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH11_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH12_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH13_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH14_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA5_CH15_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH0_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH1_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH2_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH3_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH4_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH5_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH6_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH7_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH8_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH9_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH10_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH11_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH12_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH13_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH14_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA6_CH15_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH0_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH1_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH2_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH3_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH4_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH5_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH6_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH7_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH8_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH9_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH10_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH11_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH12_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH13_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH14_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA7_CH15_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH0_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH1_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH2_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH3_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH4_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH5_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH6_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH7_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH8_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH9_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH10_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH11_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH12_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH13_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH14_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUA8_CH15_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH0_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH1_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH2_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH3_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH4_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH5_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH6_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH7_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH8_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH9_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH10_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH11_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH12_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH13_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH14_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB1_CH15_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH0_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH1_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH2_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH3_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH4_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH5_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH6_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH7_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH8_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH9_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH10_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH11_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH12_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH13_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH14_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUB2_CH15_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUJ0_CH0_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUJ0_CH1_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUJ0_CH2_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUJ0_CH3_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUJ1_CH0_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUJ1_CH1_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUJ1_CH2_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUJ1_CH3_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUJ2_CH0_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUJ2_CH1_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUJ2_CH2_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) TAUJ2_CH3_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_0_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_1_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_2_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_3_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_4_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_5_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_6_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_7_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_8_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_9_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_10_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_11_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_12_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_13_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_14_ISR(void);
extern FUNC(void, ICU_PUBLIC_CODE) EXTERNAL_INTERRUPT_15_ISR(void);
#else
#error "ICU_INTERRUPT_TYPE not set."
#endif /* End of ICU_INTERRUPT_TYPE */
#define ICU_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* ICU_IRQ_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Generic/AUTOSAR_Types/inc/ComStack_Types.h
/*============================================================================*/
/* Project = AUTOSAR NEC Xx4 MCAL Components */
/* File name = ComStack_Types.h */
/* Version = 3.0.1 */
/* Date = 14-Jul-2009 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009 by NEC Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision for Communication Stack dependent types */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* NEC Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by NEC. Any warranty */
/* is expressly disclaimed and excluded by NEC, either expressed or implied, */
/* including but not limited to those for non-infringement of intellectual */
/* property, merchantability and/or fitness for the particular purpose. */
/* */
/* NEC shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall NEC be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. NEC shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by NEC in connection with the Product(s) and/or the */
/* Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/* Compiler: GHS V5.1.6c */
/*============================================================================*/
/*******************************************************************************
** Revision History **
*******************************************************************************/
/*
* V3.0.0: 30-Mar-2009 : Initial Version
* V3.0.1: 14-Jul-2009 : As per SCR 015, compiler version is changed from
* V4.2.3 to V5.1.6c in the header of the file.
*/
/******************************************************************************/
#ifndef COMSTACK_TYPES_H
#define COMSTACK_TYPES_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Std_Types.h" /* standard AUTOSAR types */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define COMSTACK_TYPES_AR_MAJOR_VERSION 2
#define COMSTACK_TYPES_AR_MINOR_VERSION 2
#define COMSTACK_TYPES_AR_PATCH_VERSION 0
/*
* File version information
*/
#define COMSTACK_TYPES_SW_MAJOR_VERSION 3
#define COMSTACK_TYPES_SW_MINOR_VERSION 0
#define COMSTACK_TYPES_SW_PATCH_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* COMTYPE018 General return codes for NotifResultType */
#define NTFRSLT_OK 0x00
#define NTFRSLT_E_NOT_OK 0x01
#define NTFRSLT_E_TIMEOUT_A 0x02
#define NTFRSLT_E_TIMEOUT_BS 0x03
#define NTFRSLT_E_TIMEOUT_CR 0x04
#define NTFRSLT_E_WRONG_SN 0x05
#define NTFRSLT_E_INVALID_FS 0x06
#define NTFRSLT_E_UNEXP_PDU 0x07
#define NTFRSLT_E_WFT_OVRN 0x08
#define NTFRSLT_E_NO_BUFFER 0x09
#define NTFRSLT_E_CANCELATION_OK 0x0A
#define NTFRSLT_E_CANCELATION_NOT_OK 0x0B
/* COMTYPE021 General return codes for BusTrcvErrorType */
#define BUSTRCV_OK 0x00
#define BUSTRCV_E_ERROR 0x01
/*******************************************************************************
** Global Data Types (ECU dependent) **
*******************************************************************************/
/* Chapter 8.1.1 */
typedef uint8 PduIdType; /* Type of PDU ID.
Allowed ranges: uint8 .. uint16 */
/* Chapter 8.1.2 */
typedef uint16 PduLengthType; /* Type of PDU Length.
Allowed ranges: uint8 .. uint32 */
/* Chapter 8.1.5 */
typedef uint8 NotifResultType;
/* Chapter 8.1.6 */
typedef uint8 BusTrcvErrorType;
/* Chapter 8.1.7 */
typedef uint8 NetworkHandleType;
/*******************************************************************************
** Global Data Types (ECU independent) **
*******************************************************************************/
/* Chapter 8.1.3 */
typedef struct
{
P2VAR(uint8,AUTOMATIC,AUTOSAR_COMSTACKDATA) SduDataPtr;
PduLengthType SduLength;
} PduInfoType; /* Basic information about a PDU of any type*/
/* Chapter 8.1.4 */
typedef enum
{
BUFREQ_OK,
BUFREQ_E_NOT_OK,
BUFREQ_E_BUSY,
BUFREQ_E_OVFL
} BufReq_ReturnType; /* result of a buffer request */
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* COMSTACK_TYPES_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Fee/Fee.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Fee.h */
/* Version = 3.0.1a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains macros, FEE type definitions, structure data types and */
/* API function prototypes of FEE Component */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 02-Nov-2009 : Initial version
* V3.0.1: 31-Aug-2010 : As per SCR 348, updated Include Section
* V3.0.1a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
#ifndef FEE_H
#define FEE_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Std_Types.h"
#include "Fee_Cfg.h"
#include "EEL_Descriptor.h"
#include "FDL_Descriptor.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* Version identification */
#define FEE_VENDOR_ID FEE_VENDOR_ID_VALUE
#define FEE_MODULE_ID FEE_MODULE_ID_VALUE
#define FEE_INSTANCE_ID FEE_INSTANCE_ID_VALUE
/* AUTOSAR specification version information */
#define FEE_AR_MAJOR_VERSION FEE_AR_MAJOR_VERSION_VALUE
#define FEE_AR_MINOR_VERSION FEE_AR_MINOR_VERSION_VALUE
#define FEE_AR_PATCH_VERSION FEE_AR_PATCH_VERSION_VALUE
/* File version information */
#define FEE_SW_MAJOR_VERSION FEE_SW_MAJOR_VERSION_VALUE
#define FEE_SW_MINOR_VERSION FEE_SW_MINOR_VERSION_VALUE
#define FEE_SW_PATCH_VERSION FEE_SW_PATCH_VERSION_VALUE
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Service IDs **
*******************************************************************************/
/* Service Id of Fee_Init */
#define FEE_INIT_SID (uint8)0x00
/* Service Id of Fee_SetMode */
#define FEE_SETMODE_SID (uint8)0x01
/* Service Id of Fee_Read */
#define FEE_READ_SID (uint8)0x02
/* Service Id of Fee_Write */
#define FEE_WRITE_SID (uint8)0x03
/* Service Id of Fee_Cancel */
#define FEE_CANCEL_SID (uint8)0x04
/* Service Id of Fee_GetStatus */
#define FEE_GETSTATUS_SID (uint8)0x05
/* Service Id of Fee_GetJobResult */
#define FEE_GETJOBRESULT_SID (uint8)0x06
/* Service Id of Fee_InvalidateBlock */
#define FEE_INVALIDATEBLOCK_SID (uint8)0x07
/* Service Id of Fee_GetVersionInfo */
#define FEE_GET_VERSION_INFO_SID (uint8)0x08
/* Service Id of Fee_EraseImmediateBlock */
#define FEE_ERASEIMMEDIATEBLOCK_SID (uint8)0x09
/*******************************************************************************
** DET Error Codes **
*******************************************************************************/
/* API service called with invalid block number */
#define FEE_E_INVALID_BLOCK_NO (uint8)0x02
/* API service called with invalid length */
#define FEE_E_INVALID_BLOCK_LEN (uint8)0x05
/* API service called before initialization */
#define FEE_E_UNINIT (uint8)0xEF
/* API service Fee_GetVersionInfo invoked with invalid pointer */
#define FEE_E_PARAM_POINTER (uint8)0xF0
/* API service Fee_Init called when already initialized */
#define FEE_E_ALREADY_INITIALIZED (uint8)0xF1
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#define FEE_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* API declaration for main function */
extern FUNC(void, FEE_PUBLIC_CODE) Fee_MainFunction(void);
/* API declaration for initialization function */
extern FUNC(void, FEE_PUBLIC_CODE) Fee_Init(void);
/* API declaration for read function */
extern FUNC(Std_ReturnType, FEE_PUBLIC_CODE) Fee_Read
(
uint16 BlockNumber, uint16 BlockOffset,
P2VAR(uint8, AUTOMATIC, FEE_APPL_DATA)DataBufferPtr, uint16 Length
);
/* API declaration for setmode function */
extern FUNC(void, FEE_PUBLIC_CODE) Fee_SetMode(MemIf_ModeType Mode);
/* API declaration for write function */
extern FUNC(Std_ReturnType, FEE_PUBLIC_CODE) Fee_Write
(
uint16 BlockNumber, P2VAR(uint8, AUTOMATIC, FEE_APPL_DATA)DataBufferPtr
);
/* API declaration for cancel function */
extern FUNC(void, FEE_PUBLIC_CODE) Fee_Cancel(void);
/* API declaration for get status function */
extern FUNC(MemIf_StatusType, FEE_PUBLIC_CODE) Fee_GetStatus(void);
/* API declaration for get job result function */
extern FUNC(MemIf_JobResultType, FEE_PUBLIC_CODE) Fee_GetJobResult(void);
/* API declaration for invalidate block function */
extern FUNC(Std_ReturnType, FEE_PUBLIC_CODE) Fee_InvalidateBlock
(uint16 BlockNumber);
/* API declaration for erase function */
extern FUNC(Std_ReturnType, FEE_PUBLIC_CODE) Fee_EraseImmediateBlock
(uint16 BlockNumber);
#if (FEE_VERSION_INFO_API == STD_ON)
/* API declaration for version information function */
extern FUNC(void, FEE_PUBLIC_CODE) Fee_GetVersionInfo
(
P2VAR(Std_VersionInfoType, AUTOMATIC, FEE_APPL_DATA) VersionInfoPtr
);
#endif
#define FEE_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* FEE_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Pwm/Pwm_Ram.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Pwm_Ram.c */
/* Version = 3.1.3 */
/* Date = 06-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Global variable declarations */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 18-Aug-2009 : Initial version
* V3.0.1: 02-Jul-2010 : As per SCR 290, the global variable "Pwm_GpConfigPtr"
* is removed.
* V3.0.2: 28-Jul-2010 : As per SCR 321, initialization of the variable
* Pwm_GblDriverStatus is changed from PWM_FALSE to
* PWM_UNINITIALIZED.
* V3.1.0: 26-Jul-2011 : Ported for the DK4 variant.
* V3.1.1: 04-Oct-2011 : Added comments for the violation of MISRA rule 19.1.
* V3.1.2: 05-Mar-2012 : Merged the fixes done for Fx4L PWM driver
* V3.1.3: 06-Jun-2012 : As per SCR 034, Compiler version is removed from
* Environment section.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Pwm_Ram.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification version information */
#define PWM_RAM_C_AR_MAJOR_VERSION PWM_AR_MAJOR_VERSION_VALUE
#define PWM_RAM_C_AR_MINOR_VERSION PWM_AR_MINOR_VERSION_VALUE
#define PWM_RAM_C_AR_PATCH_VERSION PWM_AR_PATCH_VERSION_VALUE
/* File version information */
#define PWM_RAM_C_SW_MAJOR_VERSION 3
#define PWM_RAM_C_SW_MINOR_VERSION 1
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (PWM_RAM_AR_MAJOR_VERSION != PWM_RAM_C_AR_MAJOR_VERSION)
#error "Pwm_Ram.c : Mismatch in Specification Major Version"
#endif
#if (PWM_RAM_AR_MINOR_VERSION != PWM_RAM_C_AR_MINOR_VERSION)
#error "Pwm_Ram.c : Mismatch in Specification Minor Version"
#endif
#if (PWM_RAM_AR_PATCH_VERSION != PWM_RAM_C_AR_PATCH_VERSION)
#error "Pwm_Ram.c : Mismatch in Specification Patch Version"
#endif
#if (PWM_SW_MAJOR_VERSION != PWM_RAM_C_SW_MAJOR_VERSION)
#error "Pwm_Ram.c : Mismatch in Major Version"
#endif
#if (PWM_SW_MINOR_VERSION != PWM_RAM_C_SW_MINOR_VERSION)
#error "Pwm_Ram.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
#define PWM_START_SEC_VAR_NOINIT_UNSPECIFIED
/* MISRA Rule : 19.1 */
/* Message : #include statements in a file */
/* should only be preceded by other*/
/* preprocessor directives or */
/* comments. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
#include "MemMap.h"
#if ((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
/* Global pointer variable for TAUA/TAUB/TAUC Unit configuration */
P2CONST(Tdd_Pwm_TAUABCUnitConfigType, PWM_CONST, PWM_CONFIG_CONST)
Pwm_GpTAUABCUnitConfig;
#endif
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/* Global pointer variable for TAUJ Unit configuration */
P2CONST(Tdd_Pwm_TAUJUnitConfigType, PWM_CONST, PWM_CONFIG_CONST)
Pwm_GpTAUJUnitConfig;
#endif
/* Global pointer variable for channel configuration */
P2CONST(Tdd_Pwm_ChannelConfigType, PWM_CONST, PWM_CONFIG_CONST)
Pwm_GpChannelConfig;
#if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON)
/* Global pointer variable for synch start configuration */
P2CONST(Tdd_PwmTAUSynchStartUseType, PWM_CONST, PWM_CONFIG_CONST)
Pwm_GpSynchStartConfig;
#endif
/* Global pointer variable for channel to timer mapping */
P2CONST(uint8, PWM_CONST, PWM_CONFIG_CONST) Pwm_GpChannelTimerMap;
#if(PWM_NOTIFICATION_SUPPORTED == STD_ON)
/* Global pointer variable for Notification status array */
P2VAR(uint8, AUTOMATIC, PWM_CONFIG_DATA) Pwm_GpNotifStatus;
#endif
/* Global pointer variable for for Idle state status for configured channels */
P2VAR(uint8, AUTOMATIC, PWM_CONFIG_DATA) Pwm_GpChannelIdleStatus;
#define PWM_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"/* PRQA S 5087 */
#define PWM_START_SEC_VAR_1BIT
#include "MemMap.h"/* PRQA S 5087 */
#if (PWM_DEV_ERROR_DETECT == STD_ON)
/* Status of PWM Driver initialization */
VAR(boolean, PWM_INIT_DATA) Pwm_GblDriverStatus = PWM_UNINITIALIZED;
#endif
#define PWM_STOP_SEC_VAR_1BIT
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Gpt.dp/Gpt_LTTypes.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Gpt_LTTypes.h */
/* Version = 3.1.1 */
/* Date = 06-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains structure datatype for link time parameters of GPT */
/* Driver */
/* */
/*=========================================================================== */
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/******************************************************************************
** Revision Control History **
******************************************************************************/
/*
* V3.0.0: 23-Oct-2009 : Initial Version
* V3.1.0: 27-July-2011 : Modified software version to 3.1.0
* V3.1.1: 06-Jun-2012 : As per SCR 029, Environment section is updated to
* remove compiler version.
*/
/*****************************************************************************/
#ifndef GPT_LTTYPES_H
#define GPT_LTTYPES_H
/******************************************************************************
** Include Section **
******************************************************************************/
#include "Gpt.h"
/******************************************************************************
** Version Information **
******************************************************************************/
/* AUTOSAR specification version information */
#define GPT_LTTYPES_AR_MAJOR_VERSION GPT_AR_MAJOR_VERSION_VALUE
#define GPT_LTTYPES_AR_MINOR_VERSION GPT_AR_MINOR_VERSION_VALUE
#define GPT_LTTYPES_AR_PATCH_VERSION GPT_AR_PATCH_VERSION_VALUE
/* File version information */
#define GPT_LTTYPES_SW_MAJOR_VERSION 3
#define GPT_LTTYPES_SW_MINOR_VERSION 1
#define GPT_LTTYPES_SW_PATCH_VERSION 1
#if (GPT_SW_MAJOR_VERSION != GPT_LTTYPES_SW_MAJOR_VERSION)
#error "Software major version of Gpt.h and Gpt_LTTypes.h did not match!"
#endif
#if (GPT_SW_MINOR_VERSION!= GPT_LTTYPES_SW_MINOR_VERSION )
#error "Software minor version of Gpt.h and Gpt_LTTypes.h did not match!"
#endif
/******************************************************************************
** Global Symbols **
******************************************************************************/
/******************************************************************************
** Global Data Types **
******************************************************************************/
/* Structure of function pointer for Callback notification function */
typedef struct STagGpt_ChannelFuncType
{
/* Pointer to callback notification */
P2FUNC (void, GPT_APPL_CODE, pGptNotificationPointer_Channel)(void);
} Tdd_Gpt_ChannelFuncType;
#define GPT_START_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/* Declaration for GPT Channel Callback functions Configuration */
extern CONST(Tdd_Gpt_ChannelFuncType, GPT_CONST) Gpt_GstChannelFunc[];
#define GPT_STOP_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/******************************************************************************
** Function Prototypes **
******************************************************************************/
#endif /* GPT_LTTYPES_H */
/******************************************************************************
** End of File **
******************************************************************************/
<file_sep>/BSP/MCAL/Gpt.dp/Gpt_LLDriver.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Gpt_LLDriver.c */
/* Version = 3.1.7 */
/* Date = 23-Oct-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains Low level driver function definitions of the of GPT */
/* Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/******************************************************************************
** Revision Control History **
******************************************************************************/
/*
* V3.0.0: 23-Oct-2009 : Initial Version
* V3.0.1: 05-Nov-2009 : As per SCR 088, I/O structure is updated to have
* separate base address for USER and OS registers.
* V3.0.2: 09-Nov-2009 : As per SCR 127, In Gpt_Hw_Init and Gpt_Hw_DeInit
* GPT_TOTAL_OSTM_CHANNELS_CONFIG is replaced by
* GPT_TOTAL_OSTM_UNITS_CONFIGURED.
* V3.0.3: 25-Feb-2010 : As per SCR 194, in functions Gpt_HW_Init and
* Gpt_HW_DeInit assigning value to the "LucSaveCount"
* is made in precompile switch GPT_TAUA_UNIT_USED.
* V3.0.4: 23-Jun-2010 : As per SCR 281, all the API s are modified to
* support TAUB and TAUC timers.
* V3.0.5: 08-Jul-2010 : As per SCR 299, following changes are made:
1. In function Gpt_HW_DeInit Pre-Compile option for
* TAUB and TAUC are removed for initializing
* Lastcount.
* 2. In function Gpt_HW_DeInit Pre-Compile option for
* TAUB and TAUC are added for updating the TAU
* configuration pointer to point to the current TAU.
* V3.0.6: 28-Jul-2010 : As per SCR 317, following changes are made:
* 1. In function Gpt_HW_Init, interrupts are disabled
* and the macro GPT_MODE_CONTINUOUS is replaced by
* GPT_MODE_OSTM_CONTINUOUS.
* 2. In functions Gpt_HW_StartTimer and
* Gpt_HW_StopTimer, interrupt enabling and disabling
* are added.
* 3. Gpt_HW_EnableWakeup and Gpt_HW_DisableWakeup
* APIs are modified for interrupt enabling/disabling.
* V3.0.7: 17-Jun-2011 : As per SCR 474, following changes are made:
* 1. Access size is updated for registers TAUAnBRS,
* TAUJnBRS, TAUJnTS, TAUJnTT, TAUJnTOE.
* 2. OSTMnTO and OSTMnTOE registers are not available
* in some of the Xx4 devices and also these registers
* are not required for any functionality of the GPT
* Driver Module, hence initializing and deinitializing
* of these registers in functions Gpt_HW_Init() and
* Gpt_HW_DeInit() has been removed
* V3.1.0: 27-Jul-2011 : Modified software version to 3.1.0
* V3.1.1: 04-Oct-2011 : Added comments for the violation of MISRA rule 19.1.
* V3.1.2: 11-Jan-2012 : Following changes are made:
* 1.In function Gpt_HW_DeInit, OSTM counter disable
* (TE=0) before reset the OSTMn register in Gpt_DeInit,
* hence disable the counter.
* 2.TAUABCnCNTm,TAUJnCNTm registers are read only hence
* removed write oparation.
* V3.1.3: 16-Feb-2012 : Merged the fixes done for Fx4L Gpt driver
* V3.1.4: 06-Jun-2012 : As per SCR 029, following changes are made:
* 1. Environment section is updated to remove compiler
* version.
* 2. In Gpt_HW_DeInit writing value to usTAUABCnTOE and
* ucTAUJnTOE registers are corrected.
* V3.1.5: 11-Jul-2012 : As per SCR 042 TAUABCnTOE and TAUJnTOE registers
* access is removed from Gpt_HW_DeInit.
* V3.1.6: 30-Jul-2012 : As per SCR 068 following changes are made:
* 1. TAUABCnTOE and TAUJnTOE registers access is
* removed from Gpt_HW_Init.
* 2. "LpTAUJUnitUserReg" and "LpTAUABCUnitUserReg" are
* removed in Gpt_HW_Init API.
* V3.1.7: 23-Oct-2012 : As per MNT_0008440, the following changes are made:
* 1.As per Mantis #6129 function "Gpt_CbkNotification"
* is updated.
* 2.As per MANTIS #8519 access of registers "ucTAUJnTT,
* ucTAUJnTS and ucTAUJnRDT" are corrected.
*/
/*****************************************************************************/
/******************************************************************************
** Include Section **
******************************************************************************/
#include "Gpt.h"
#include "Gpt_Ram.h"
#include "Gpt_LLDriver.h"
#include "Gpt_LTTypes.h"
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
#include "EcuM_Cbk.h"
#endif
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
#include "SchM_Gpt.h"
#endif
/******************************************************************************
** Version Information *
******************************************************************************/
/* AUTOSAR Specification version information */
#define GPT_LLDRIVER_C_AR_MAJOR_VERSION GPT_AR_MAJOR_VERSION_VALUE
#define GPT_LLDRIVER_C_AR_MINOR_VERSION GPT_AR_MINOR_VERSION_VALUE
#define GPT_LLDRIVER_C_AR_PATCH_VERSION GPT_AR_PATCH_VERSION_VALUE
/* File version information */
#define GPT_LLDRIVER_C_SW_MAJOR_VERSION 3
#define GPT_LLDRIVER_C_SW_MINOR_VERSION 1
/******************************************************************************
** Version Check **
******************************************************************************/
#if (GPT_LLDRIVER_AR_MAJOR_VERSION != GPT_LLDRIVER_C_AR_MAJOR_VERSION)
#error "Gpt_LLDriver.c : Mismatch in Specification Major Version"
#endif
#if (GPT_LLDRIVER_AR_MINOR_VERSION != GPT_LLDRIVER_C_AR_MINOR_VERSION)
#error "Gpt_LLDriver.c : Mismatch in Specification Minor Version"
#endif
#if (GPT_LLDRIVER_AR_PATCH_VERSION != GPT_LLDRIVER_C_AR_PATCH_VERSION)
#error "Gpt_LLDriver.c : Mismatch in Specification Patch Version"
#endif
#if (GPT_SW_MAJOR_VERSION != GPT_LLDRIVER_C_SW_MAJOR_VERSION)
#error "Gpt_LLDriver.c : Mismatch in Major Version"
#endif
#if (GPT_SW_MINOR_VERSION != GPT_LLDRIVER_C_SW_MINOR_VERSION)
#error "Gpt_LLDriver.c : Mismatch in Minor Version"
#endif
/******************************************************************************
** Global Data **
******************************************************************************/
/******************************************************************************
** Function Definitions **
******************************************************************************/
/******************************************************************************
** Function Name : Gpt_HW_Init
**
** Service ID : NA
**
** Description : This is GPT Driver component support function.
** This function sets the clock prescaler,timer mode.
** This function also disables the interrupts and resets
** the interrupt request pending flags.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameter : None
**
** Output Parameters : None
**
** Return Value : None
**
** Pre-condition : None
**
** Remarks : Global Variable(s):
** Gpt_GpChannelConfig
**
** Function(s) invoked:
** None
**
******************************************************************************/
#define GPT_START_SEC_PRIVATE_CODE
/* MISRA Rule : 19.1 */
/* Message : #include statements in a file */
/* should only be preceded by other*/
/* preprocessor directives or */
/* comments. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
#include "MemMap.h"
FUNC(void, GPT_PRIVATE_CODE) Gpt_HW_Init(void)
{
/* Pointer to the channel configuration */
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)
LpChannelConfig;
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON) \
|| (GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON))
/* Pointer pointing to the TAU Unit configuration */
P2CONST(Tdd_Gpt_TAUUnitConfigType,AUTOMATIC,GPT_CONFIG_CONST)
LpTAUUnitConfig;
#endif
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
#if(GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON)
/* Pointer pointing to the TAUA/TAUB/TAUC Unit os control registers */
P2VAR(Tdd_Gpt_TAUABCUnitOsRegs,AUTOMATIC,GPT_CONFIG_DATA) LpTAUABCUnitOsReg;
#endif /* GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON */
#endif /* (GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||
(GPT_TAUC_UNIT_USED == STD_ON) */
#if(GPT_TAUJ_UNIT_USED == STD_ON)
#if(GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON)
/* Pointer pointing to the TAUJ Unit control registers */
P2VAR(Tdd_Gpt_TAUJUnitOsRegs,AUTOMATIC,GPT_CONFIG_DATA) LpTAUJUnitOsReg;
#endif /* GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON */
#endif /* GPT_TAUJ_UNIT_USED == STD_ON */
#if((GPT_TAUJ_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
uint8 Lastcount;
#endif
#if((GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON))
uint8 LucUnitCount;
#endif
uint8 LucCount;
#if((GPT_TAUJ_UNIT_USED == STD_ON)||(GPT_OSTM_UNIT_USED == STD_ON))
/* Save count from the TAUA channel loop */
uint8_least LucSaveCount = GPT_ZERO;
#endif
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Update the channel configuration pointer to point to the current channel */
LpChannelConfig = Gpt_GpChannelConfig;
#if((GPT_TAUJ_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
Lastcount = GPT_ZERO;
#endif
#if((GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON))
LucUnitCount = GPT_ZERO;
#endif
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON) \
|| (GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON))
/* Update the TAU configuration pointer to point to the current TAU */
LpTAUUnitConfig = Gpt_GpTAUUnitConfig;
#endif
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERREG_PROTECTION);
#endif
#if(GPT_TAUA_UNIT_USED == STD_ON)
for(LucCount = GPT_ZERO; LucCount < GPT_TOTAL_TAUA_UNITS_CONFIG;
LucCount++)
{
#if(GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON)
/* Initialize the pointer to os register base address */
LpTAUABCUnitOsReg = LpTAUUnitConfig->pTAUUnitOsCntlRegs;
/* Check for Prescaler setting by the GPT module for TAUAn Unit */
if(GPT_TRUE == LpTAUUnitConfig->blConfigurePrescaler)
{
/* Load the configured prescaler value */
LpTAUABCUnitOsReg->usTAUABCnTPS = LpTAUUnitConfig->usPrescaler;
/* Load the configured baudrate value */
LpTAUABCUnitOsReg->ucTAUAnBRS = LpTAUUnitConfig->ucBaudRate;
}
else
{
/* To Avoid MISRA Warning */
}
#endif /* End of (GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON) */
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer for the next TAUA Unit */
LpTAUUnitConfig++;
#if((GPT_TAUJ_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
Lastcount++;
#endif
}
#endif /* End of (GPT_TAUA_UNIT_USED == STD_ON) */
#if((GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON))
/* Increment LucUnitCount to total TAUB and TAUC units configured */
LucUnitCount = (GPT_TOTAL_TAUB_UNITS_CONFIG + GPT_TOTAL_TAUC_UNITS_CONFIG +
Lastcount);
for(LucCount = Lastcount; LucCount < LucUnitCount; LucCount++)
{
#if(GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON)
/* Initialize the pointer to os register base address */
LpTAUABCUnitOsReg = LpTAUUnitConfig->pTAUUnitOsCntlRegs;
/* Check for Prescaler setting by the GPT module for TAUBn Unit */
if(GPT_TRUE == LpTAUUnitConfig->blConfigurePrescaler)
{
/* Load the configured prescaler value */
LpTAUABCUnitOsReg->usTAUABCnTPS = LpTAUUnitConfig->usPrescaler;
}
else
{
/* To Avoid MISRA Warning */
}
#endif /* End of (GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON) */
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer for the next TAUB/TAUC Unit */
LpTAUUnitConfig++;
#if(GPT_TAUJ_UNIT_USED == STD_ON)
Lastcount++;
#endif
}
#endif /* End of (GPT_TAUB_UNIT_USED == STD_ON)||
* (GPT_TAUC_UNIT_USED == STD_ON)
*/
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERREG_PROTECTION);
#endif
#if(GPT_TAUJ_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERREG_PROTECTION);
#endif
for(LucCount = Lastcount; LucCount < GPT_TOTAL_TAU_UNITS_CONFIGURED;
LucCount++)
{
#if(GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON)
/* Initialize the pointer to os register base address */
LpTAUJUnitOsReg = LpTAUUnitConfig->pTAUUnitOsCntlRegs;
/* Check for Prescaler setting by the GPT module for TAUJn Unit */
if(GPT_TRUE == LpTAUUnitConfig->blConfigurePrescaler)
{
/* Load the configured prescaler value */
LpTAUJUnitOsReg->usTAUJnTPS = LpTAUUnitConfig->usPrescaler;
/* Load the configured baudrate value */
LpTAUJUnitOsReg->ucTAUJnBRS = LpTAUUnitConfig->ucBaudRate;
}
else
{
/* To Avoid MISRA Warning */
}
#endif /* End of (GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON) */
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next TAUJ Unit */
LpTAUUnitConfig++;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERREG_PROTECTION);
#endif
#endif /* End of (GPT_TAUJ_UNIT_USED == STD_ON) */
/* check for TAUA/TAUB/TAUC Units Used */
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERREG_PROTECTION);
#endif
for(LucCount = GPT_ZERO; LucCount < GPT_TOTAL_TAUABC_CHANNELS_CONFIG;
LucCount++)
{
*(LpChannelConfig->pCMORorCTLAddress) =
LpChannelConfig->usModeSettingsMask;
/* Check the Notification is configured for the current channel */
if(GPT_NO_CBK_CONFIGURED != LpChannelConfig->ucImrMaskValue)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlAddress) |=
~(LpChannelConfig->ucImrMaskValue);
/* Clear the pending interrupt request flag */
*(LpChannelConfig->pIntrCntlAddress) &= GPT_CLEAR_INT_REQUEST_FLAG;
}
else
{
/* To Avoid MISRA Warning */
}
#if (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
/* Set the Notification status as GPT_FALSE */
Gpt_GpChannelRamData[LucCount].uiNotifyStatus = GPT_FALSE;
#endif
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
/* Assign the Wakeup status to the Channel */
Gpt_GpChannelRamData[LucCount].uiWakeupStatus = GPT_FALSE;
#endif
/* Assign the timer status to the Channel */
Gpt_GpChannelRamData[LucCount].ucChannelStatus = GPT_CH_NOTRUNNING;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next channel */
LpChannelConfig++;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERREG_PROTECTION);
#endif
#if((GPT_TAUJ_UNIT_USED == STD_ON)||(GPT_OSTM_UNIT_USED == STD_ON))
LucSaveCount = LucCount;
#endif
#endif /* End of (GPT_TAUA_UNIT_USED == STD_ON)|| \
* (GPT_TAUB_UNIT_USED == STD_ON)|| \
* (GPT_TAUC_UNIT_USED == STD_ON)
*/
/* check for TAUJ Units Used */
#if(GPT_TAUJ_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERREG_PROTECTION);
#endif
for(LucCount = GPT_ZERO; LucCount < GPT_TOTAL_TAUJ_CHANNELS_CONFIG;
LucCount++)
{
*(LpChannelConfig->pCMORorCTLAddress) =
LpChannelConfig->usModeSettingsMask;
/* Check the Notification is configured for the current channel */
if(GPT_NO_CBK_CONFIGURED != LpChannelConfig->ucImrMaskValue)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlAddress) |=
~(LpChannelConfig->ucImrMaskValue);
/* Clear the pending interrupt request flag */
*(LpChannelConfig->pIntrCntlAddress) &= GPT_CLEAR_INT_REQUEST_FLAG;
}
else
{
/* To Avoid MISRA Warning */
}
#if (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
/* Set the Notification status as GPT_FALSE */
Gpt_GpChannelRamData[LucSaveCount].uiNotifyStatus = GPT_FALSE;
#endif
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
/* Assign the Wakeup status to the Channel */
Gpt_GpChannelRamData[LucSaveCount].uiWakeupStatus = GPT_FALSE;
#endif
/* Assign the timer status to the Channel */
Gpt_GpChannelRamData[LucSaveCount].ucChannelStatus = GPT_CH_NOTRUNNING;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer for the next TAUJ channel */
LpChannelConfig++;
LucSaveCount++;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERREG_PROTECTION);
#endif
#endif /* End of (GPT_TAUJ_UNIT_USED == STD_ON) */
/* check for OSTM Units Used */
#if(GPT_OSTM_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERREG_PROTECTION);
#endif
for(LucCount = GPT_ZERO; LucCount < GPT_TOTAL_OSTM_UNITS_CONFIGURED;
LucCount++)
{
/* MISRA Rule : 11.4 */
/* Message : A cast should not be performed */
/* between a pointer to object type */
/* and a different pointer to object*/
/* type. */
/* Reason : This is to access the CTL reg */
/* of type 8 bit. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
*((uint8*)(LpChannelConfig->pCMORorCTLAddress)) = GPT_MODE_OSTM_CONTINUOUS;
/* Check the Notification is configured for the current channel */
if(GPT_NO_CBK_CONFIGURED != LpChannelConfig->ucImrMaskValue)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlAddress) |=
~(LpChannelConfig->ucImrMaskValue);
/* Clear the pending interrupt request flag */
*(LpChannelConfig->pIntrCntlAddress) &= GPT_CLEAR_INT_REQUEST_FLAG;
}
else
{
/* To Avoid MISRA Warning */
}
#if (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
/* Set the Notification status as GPT_FALSE */
Gpt_GpChannelRamData[LucSaveCount].uiNotifyStatus = GPT_FALSE;
#endif
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
/* Assign the Wakeup status to the Channel */
Gpt_GpChannelRamData[LucSaveCount].uiWakeupStatus = GPT_FALSE;
#endif
/* Assign the timer status to the Channel */
Gpt_GpChannelRamData[LucSaveCount].ucChannelStatus = GPT_CH_NOTRUNNING;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer for the next OSTM channel */
LpChannelConfig++;
LucSaveCount++;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERREG_PROTECTION);
#endif
#endif /* End of (GPT_OSTM_UNIT_USED == STD_ON) */
}
#define GPT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
/******************************************************************************
** Function Name : Gpt_HW_DeInit
**
** Service ID : NA
**
** Description : This is GPT Driver component support function.
** This function resets all the HW Registers.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non Reentrant
**
** Input Parameters : channel
**
** InOut Parameter : None
**
** Output Parameters : None
**
** Return Value : None
**
** Pre-condition : None
**
** Remarks : Global Variable(s):
** Gpt_GpChannelConfig
**
** Function(s) invoked:
** None
**
******************************************************************************/
#define GPT_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, GPT_PRIVATE_CODE) Gpt_HW_DeInit (void)
{
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)
LpChannelConfig;
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON) \
|| (GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON))
/* Pointer pointing to the TAUA/TAUB/TAUC/TAUJ Unit configuration */
P2CONST(Tdd_Gpt_TAUUnitConfigType,AUTOMATIC,GPT_CONFIG_CONST)
LpTAUUnitConfig;
#endif
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
/* Pointer pointing to the TAUA/TAUB/TAUC Unit control registers */
P2VAR(Tdd_Gpt_TAUABCUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)
LpTAUABCUnitUserReg;
/* Pointer used for TAUA/TAUB/TAUC channel control registers */
P2VAR(Tdd_Gpt_TAUABCChannelUserRegs,AUTOMATIC,GPT_CONFIG_DATA)
LpTAUABCChannelReg;
#endif
#if(GPT_TAUJ_UNIT_USED == STD_ON)
/* Pointer pointing to the TAUJ Unit control registers */
P2VAR(Tdd_Gpt_TAUJUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA) LpTAUJUnitUserReg;
/* Pointer used for TAUJ channel control registers */
P2VAR(Tdd_Gpt_TAUJChannelUserRegs,AUTOMATIC,GPT_CONFIG_DATA) LpTAUJChannelReg;
#endif
#if(GPT_OSTM_UNIT_USED == STD_ON)
/* Pointer pointing to the OSTM Unit control registers */
P2VAR(Tdd_Gpt_OSTMUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA) LpOSTMUnitReg;
#endif
#if(GPT_TAUJ_UNIT_USED == STD_ON)
uint8 Lastcount;
#endif
uint8 LucCount;
#if(GPT_TAUJ_UNIT_USED == STD_ON || GPT_OSTM_UNIT_USED == STD_ON )
/* Save count from the TAUA channel loop */
uint8_least LucSaveCount = GPT_ZERO;
#endif
/* Update the channel configuration pointer to point to the current channel */
LpChannelConfig = Gpt_GpChannelConfig;
/* Initialize the loop count value */
LucCount = GPT_ZERO;
#if(GPT_TAUJ_UNIT_USED == STD_ON)
Lastcount = GPT_ZERO;
#endif
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON))
/* Update the TAU configuration pointer to point to the current TAU */
LpTAUUnitConfig = Gpt_GpTAUUnitConfig;
#endif
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERREG_PROTECTION);
#endif
/* Check for TAUA/TAUB/TAUC Units Used */
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
for(LucCount = GPT_ZERO; LucCount < GPT_TOTAL_TAUABC_UNITS_CONFIG; LucCount++)
{
/* Update pointer for the user base address of the TAUA/TAUB/TAUC unit
* registers
*/
LpTAUABCUnitUserReg = LpTAUUnitConfig->pTAUUnitUserCntlRegs;
/* Set the configured channel bits to disable the count operation */
LpTAUABCUnitUserReg->usTAUABCnTT = LpTAUUnitConfig->usTAUChannelMaskValue;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next TAUA/TAUB/TAUC unit */
LpTAUUnitConfig++;
#if(GPT_TAUJ_UNIT_USED == STD_ON)
Lastcount++;
#endif
}
#endif /* ((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON)) */
/* Check for TAUA/TAUB/TAUC Units Used */
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
for(LucCount = GPT_ZERO; LucCount < GPT_TOTAL_TAUABC_CHANNELS_CONFIG;
LucCount++)
{
LpTAUABCChannelReg =
(P2VAR(Tdd_Gpt_TAUABCChannelUserRegs, AUTOMATIC, GPT_CONFIG_CONST))
LpChannelConfig->pBaseCtlAddress;
/* Reset the CMORm register of the configured channel */
*(LpChannelConfig->pCMORorCTLAddress) = GPT_RESET_WORD;
/* Reset the CDRm register of the configured channel */
LpTAUABCChannelReg->usTAUABCnCDRm = GPT_RESET_WORD;
#if(GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
/* Check the Notification is configured for the current channel */
if (GPT_NO_CBK_CONFIGURED != LpChannelConfig->ucImrMaskValue)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlAddress) |=
~(LpChannelConfig->ucImrMaskValue);
}
else
{
/* To Avoid MISRA Warning */
}
/* Set the Notification status as GPT_FALSE */
Gpt_GpChannelRamData[LucCount].uiNotifyStatus = GPT_FALSE;
#endif /* (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON) */
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
/* Assign the Wakeup status to the Channel */
Gpt_GpChannelRamData[LucCount].uiWakeupStatus = GPT_FALSE;
#endif
/* Assign the timer status to the Channel */
Gpt_GpChannelRamData[LucCount].ucChannelStatus = GPT_CH_NOTRUNNING;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next TAUA/TAUB/TAUC channel */
LpChannelConfig++;
}
#endif /* ((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON)) */
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERREG_PROTECTION);
#endif
#if((GPT_TAUJ_UNIT_USED == STD_ON)||(GPT_OSTM_UNIT_USED == STD_ON))
LucSaveCount = LucCount;
#endif
/* Check for TAUJ Units Used */
#if(GPT_TAUJ_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERREG_PROTECTION);
#endif
for(LucCount = Lastcount; LucCount < GPT_TOTAL_TAU_UNITS_CONFIGURED;
LucCount++)
{
/* Update pointer for user base address of the TAUJ unit registers */
LpTAUJUnitUserReg = LpTAUUnitConfig->pTAUUnitUserCntlRegs;
/* Set the configured channel bits to disable the count operation */
LpTAUJUnitUserReg->ucTAUJnTT &=
(uint8)LpTAUUnitConfig->usTAUChannelMaskValue;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to next TAUJ unit */
LpTAUUnitConfig++;
}
for(LucCount = GPT_ZERO;LucCount < GPT_TOTAL_TAUJ_CHANNELS_CONFIG;
LucCount++)
{
LpTAUJChannelReg =
(P2VAR(Tdd_Gpt_TAUJChannelUserRegs, AUTOMATIC, GPT_CONFIG_CONST))
LpChannelConfig->pBaseCtlAddress;
/* Reset the CMORm register of the configured channel */
*(LpChannelConfig->pCMORorCTLAddress) = GPT_RESET_WORD;
/* Reset the CDRm register of the configured channel */
LpTAUJChannelReg->ulTAUJnCDRm = GPT_RESET_LONG_WORD;
#if(GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
/* Check the Notification is configured for the current channel */
if (GPT_NO_CBK_CONFIGURED != LpChannelConfig->ucImrMaskValue)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlAddress) |=
~(LpChannelConfig->ucImrMaskValue);
}
else
{
/* To Avoid MISRA Warning */
}
/* Set the Notification status as GPT_FALSE */
Gpt_GpChannelRamData[LucSaveCount].uiNotifyStatus = GPT_FALSE;
#endif /* (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON) */
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
/* Assign the Wakeup status to the Channel */
Gpt_GpChannelRamData[LucSaveCount].uiWakeupStatus = GPT_FALSE;
#endif
/* Assign the timer status to the Channel */
Gpt_GpChannelRamData[LucSaveCount].ucChannelStatus = GPT_CH_NOTRUNNING;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next TAUJ channel */
LpChannelConfig++;
LucSaveCount++;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERREG_PROTECTION);
#endif
#endif /* (GPT_TAUJ_UNIT_USED == STD_ON) */
/* Check for OSTM Units Used */
#if(GPT_OSTM_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERREG_PROTECTION);
#endif
for(LucCount = GPT_ZERO;LucCount < GPT_TOTAL_OSTM_UNITS_CONFIGURED;
LucCount++)
{
LpOSTMUnitReg =
(P2VAR(Tdd_Gpt_OSTMUnitUserRegs, AUTOMATIC, GPT_CONFIG_CONST))
LpChannelConfig->pBaseCtlAddress;
/* Reset the CMP register of the configured channel */
LpOSTMUnitReg->ulOSTMnCMP = GPT_RESET_LONG_WORD;
/* MISRA Rule : 11.4 */
/* Message : A cast should not be performed */
/* between a pointer to object type */
/* and a different pointer to object */
/* type. */
/* Reason : This is to access the CTL reg */
/* of type 8 bit. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Disable the counter before reset OSTMn register */
LpOSTMUnitReg->ucOSTMnTT = GPT_OSTMTTF_STOP_MASK;
*((uint8*)(LpChannelConfig->pCMORorCTLAddress)) = GPT_RESET_BYTE;
#if(GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
/* Check the Notification is configured for the current channel */
if (GPT_NO_CBK_CONFIGURED != LpChannelConfig->ucImrMaskValue)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlAddress) |=
~(LpChannelConfig->ucImrMaskValue);
}
else
{
/* To Avoid MISRA Warning */
}
/* Set the Notification status as GPT_FALSE */
Gpt_GpChannelRamData[LucSaveCount].uiNotifyStatus = GPT_FALSE;
#endif /* (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON) */
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
/* Assign the Wakeup status to the Channel */
Gpt_GpChannelRamData[LucSaveCount].uiWakeupStatus = GPT_FALSE;
#endif
/* Assign the timer status to the Channel */
Gpt_GpChannelRamData[LucSaveCount].ucChannelStatus = GPT_CH_NOTRUNNING;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/* Increment the pointer to the next OSTM channel */
LpChannelConfig++;
LucSaveCount++;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERREG_PROTECTION);
#endif
#endif /* (GPT_OSTM_UNIT_USED == STD_ON) */
}
#define GPT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
/******************************************************************************
** Function Name : Gpt_HW_GetTimeElapsed
**
** Service ID : NA
**
** Description : This is GPT Driver component support function.
** This function returns the time elapsed for a channel by
** accessing the respective timer registers.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameter : None
**
** Output Parameters : None
**
** Return Value : Gpt_ValueType
**
** Pre-condition : None
**
** Remarks : Global Variable(s):
** Gpt_GpChannelConfig, Gpt_GpChannelRamData
**
** Function(s) invoked:
** None
**
******************************************************************************/
#if (GPT_TIME_ELAPSED_API == STD_ON)
#define GPT_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(Gpt_ValueType, GPT_PRIVATE_CODE) Gpt_HW_GetTimeElapsed
(Gpt_ChannelType channel)
{
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
/* Defining a pointer to point to the TAUA\TAUB\TAUC registers */
P2VAR(Tdd_Gpt_TAUABCChannelUserRegs,AUTOMATIC,GPT_CONFIG_DATA)
LpTAUABCChannelRegs;
#endif
#if(GPT_TAUJ_UNIT_USED == STD_ON)
/* Defining a pointer to point to the TAUJ registers */
P2VAR(Tdd_Gpt_TAUJChannelUserRegs,AUTOMATIC,GPT_CONFIG_DATA)LpTAUJChannelRegs;
#endif
#if(GPT_OSTM_UNIT_USED == STD_ON)
/* Defining a pointer to point to the OSTM registers */
P2VAR(Tdd_Gpt_OSTMUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)LpOSTMUnitRegs;
#endif
/* Defining a pointer to point to the Channel Ram Data */
P2VAR(Tdd_Gpt_ChannelRamData,AUTOMATIC,GPT_CONFIG_DATA)LpRamData;
/* Updating the channel config parameter to the current channel */
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)LpChannel;
/* Return Value */
Gpt_ValueType LddTimeElapsed;
uint8 LucTimerType;
/* Initialize Return Value to zero */
LddTimeElapsed = GPT_ZERO;
/* Updating the channel config parameter to the current channel */
LpChannel = &Gpt_GpChannelConfig[channel];
/* Read the Timer Type for given channel */
LucTimerType = LpChannel->uiTimerType;
LpRamData = &Gpt_GpChannelRamData[channel];
switch(LucTimerType)
{
case GPT_HW_TAUA:
case GPT_HW_TAUB:
case GPT_HW_TAUC:
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if( GPT_CH_NOTRUNNING == LpRamData->ucChannelStatus)
{
LddTimeElapsed = GPT_ZERO;
}
else
{
LpTAUABCChannelRegs =
(P2VAR(Tdd_Gpt_TAUABCChannelUserRegs, AUTOMATIC, GPT_CONFIG_DATA))
LpChannel->pBaseCtlAddress;
/* Assign the final return value */
LddTimeElapsed =
LpTAUABCChannelRegs->usTAUABCnCDRm \
- LpTAUABCChannelRegs->usTAUABCnCNTm;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
#endif
/* End of
((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON)) */
break;
case GPT_HW_TAUJ:
#if(GPT_TAUJ_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if( GPT_CH_NOTRUNNING == LpRamData->ucChannelStatus)
{
LddTimeElapsed = GPT_ZERO;
}
else
{
LpTAUJChannelRegs =
(P2VAR(Tdd_Gpt_TAUJChannelUserRegs, AUTOMATIC, GPT_CONFIG_DATA))
LpChannel->pBaseCtlAddress;
/* Assign the final return value */
LddTimeElapsed =
LpTAUJChannelRegs->ulTAUJnCDRm - LpTAUJChannelRegs->ulTAUJnCNTm;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
#endif/* End of (GPT_TAUJ_UNIT_USED == STD_ON) */
break;
case GPT_HW_OSTM:
#if(GPT_OSTM_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if( GPT_CH_NOTRUNNING == LpRamData->ucChannelStatus)
{
LddTimeElapsed = GPT_ZERO;
}
else
{
LpOSTMUnitRegs = (P2VAR(Tdd_Gpt_OSTMUnitUserRegs, AUTOMATIC,
GPT_CONFIG_DATA))
LpChannel->pBaseCtlAddress;
/* Assign the final return value */
LddTimeElapsed = LpOSTMUnitRegs->ulOSTMnCMP -
LpOSTMUnitRegs->ulOSTMnCNT;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
#endif/* End of (GPT_OSTM_UNIT_USED == STD_ON) */
break;
default:
break;
}
return (LddTimeElapsed);
}
#define GPT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* End of (GPT_TIME_ELAPSED_API == STD_ON) */
/******************************************************************************
** Function Name : Gpt_HW_GetTimeRemaining
**
** Service ID : NA
**
** Description : This is GPT Driver component support function.
** This function returns the time remaining for
** the channel's next timeout by
** accessing the respective timer registers.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameter : None
**
** Output Parameters : None
**
** Return Value : Gpt_ValueType
**
** Pre-condition : None
**
** Remarks : Global Variable(s):
** Gpt_GpChannelConfig, Gpt_GpChannelRamData
**
** Function(s) invoked:
** None
**
******************************************************************************/
#if (GPT_TIME_REMAINING_API == STD_ON)
#define GPT_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(Gpt_ValueType, GPT_PRIVATE_CODE) Gpt_HW_GetTimeRemaining
(Gpt_ChannelType channel)
{
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
/* Defining a pointer to point to the TAUA/TAUB/TAUC registers */
P2VAR(Tdd_Gpt_TAUABCChannelUserRegs,AUTOMATIC,GPT_CONFIG_DATA)
LpTAUABCChannelRegs;
#endif
#if(GPT_TAUJ_UNIT_USED == STD_ON)
/* Defining a pointer to point to the TAUJ registers */
P2VAR(Tdd_Gpt_TAUJChannelUserRegs,AUTOMATIC,GPT_CONFIG_DATA)LpTAUJChannelRegs;
#endif
#if(GPT_OSTM_UNIT_USED == STD_ON)
/* Defining a pointer to point to the OSTM registers */
P2VAR(Tdd_Gpt_OSTMUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)LpOSTMUnitRegs;
#endif
/* Defining a pointer to point to the Channel Ram Data */
P2VAR(Tdd_Gpt_ChannelRamData,AUTOMATIC,GPT_CONFIG_DATA)LpRamData;
/* Updating the channel config parameter to the current channel */
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)LpChannel;
Gpt_ValueType LddTimeRemaining;
uint8 LucTimerType;
/* Initialize Return Value to zero */
LddTimeRemaining = GPT_ZERO;
/* Updating the channel config parameter to the current channel */
LpChannel = &Gpt_GpChannelConfig[channel];
/* Read the Timer Type for given channel */
LucTimerType = LpChannel->uiTimerType;
LpRamData = &Gpt_GpChannelRamData[channel];
switch(LucTimerType)
{
case GPT_HW_TAUA:
case GPT_HW_TAUB:
case GPT_HW_TAUC:
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if( GPT_CH_NOTRUNNING == LpRamData->ucChannelStatus)
{
LddTimeRemaining = GPT_ZERO;
}
else
{
LpTAUABCChannelRegs =
(P2VAR(Tdd_Gpt_TAUABCChannelUserRegs, AUTOMATIC, GPT_CONFIG_DATA))
LpChannel->pBaseCtlAddress;
/* Assign the final return value */
LddTimeRemaining = LpTAUABCChannelRegs->usTAUABCnCNTm;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
#endif
/* End of
((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON)) */
break;
case GPT_HW_TAUJ:
#if(GPT_TAUJ_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if( GPT_CH_NOTRUNNING == LpRamData->ucChannelStatus)
{
LddTimeRemaining = GPT_ZERO;
}
else
{
LpTAUJChannelRegs =
(P2VAR(Tdd_Gpt_TAUJChannelUserRegs, AUTOMATIC, GPT_CONFIG_DATA))
LpChannel->pBaseCtlAddress;
/* Assign the final return value */
LddTimeRemaining = LpTAUJChannelRegs->ulTAUJnCNTm;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
#endif/* End of (GPT_TAUJ_UNIT_USED == STD_ON) */
break;
case GPT_HW_OSTM:
#if(GPT_OSTM_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if( GPT_CH_NOTRUNNING == LpRamData->ucChannelStatus)
{
LddTimeRemaining = GPT_ZERO;
}
else
{
LpOSTMUnitRegs = (P2VAR(Tdd_Gpt_OSTMUnitUserRegs, AUTOMATIC,
GPT_CONFIG_DATA))LpChannel->pBaseCtlAddress;
/* Assign the final return value */
LddTimeRemaining = LpOSTMUnitRegs->ulOSTMnCNT;
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
#endif/* End of (GPT_OSTM_UNIT_USED == STD_ON) */
break;
default:
break;
}
return (LddTimeRemaining);
}
#define GPT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* (GPT_TIME_REMAINING_API == STD_ON) */
/******************************************************************************
** Function Name : Gpt_HW_StartTimer
**
** Service ID : NA
**
** Description : This is GPT Driver component support function.
** This function starts the timer channel by loading the
** compare registers and enabling the clock.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : channel, value
**
** InOut Parameter : None
**
** Output Parameters : None
**
** Return Value : None
**
** Pre-condition : None
**
** Remarks : Global Variable(s):
** Gpt_GpChannelConfig, Gpt_GpChannelRamData
**
** Function(s) invoked:
** SchM_Enter_Gpt, SchM_Exit_Gpt
**
******************************************************************************/
#define GPT_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, GPT_PRIVATE_CODE) Gpt_HW_StartTimer
(Gpt_ChannelType channel, Gpt_ValueType value)
{
/* Updating the channel config parameter to the current channel */
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)LpChannel;
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
/* Defining a pointer to point to the TAUA/TAUB/TAUC registers */
P2VAR(Tdd_Gpt_TAUABCUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)
LpTAUABCUnitUserRegs;
/* Defining a pointer to point to the channel control registers of
TAUA/TAUB/TAUC */
P2VAR(Tdd_Gpt_TAUABCChannelUserRegs,AUTOMATIC,GPT_CONFIG_DATA)
LpTAUABCChannelRegs;
#endif
#if(GPT_TAUJ_UNIT_USED == STD_ON)
/* Defining a pointer to point to the TAUJ registers */
P2VAR(Tdd_Gpt_TAUJUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)LpTAUJUnitUserRegs;
/* Defining a pointer to point to the channel control registers of TAUA */
P2VAR(Tdd_Gpt_TAUJChannelUserRegs,AUTOMATIC,GPT_CONFIG_DATA)LpTAUJChannelRegs;
#endif
#if(GPT_OSTM_UNIT_USED == STD_ON)
/* Defining a pointer to point to the OSTM registers */
P2VAR(Tdd_Gpt_OSTMUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)LpOSTMUnitRegs;
#endif
/* Defining a pointer to point to the Channel Ram Data */
P2VAR(Tdd_Gpt_ChannelRamData,AUTOMATIC,GPT_CONFIG_DATA)LpRamData;
uint8 LucTimerType;
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON))
/*To hold the Timer CDR register value */
Gpt_ValueType u32_TAUX_CDR_Value;
/*Subtract 1 to get the excat CDR counter value*/
u32_TAUX_CDR_Value = value - 1;
#endif
/* Updating the channel config parameter to the current channel */
LpChannel = &Gpt_GpChannelConfig[channel];
/* Read the Timer Type for given channel */
LucTimerType = LpChannel->uiTimerType;
LpRamData = &Gpt_GpChannelRamData[channel];
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if(GPT_NO_CBK_CONFIGURED != LpChannel->ucImrMaskValue)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V7.1.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the Interrupt processing of the current channel */
*(LpChannel->pImrIntrCntlAddress) |= ~(LpChannel->ucImrMaskValue);
/* Clear the pending interrupt request flag */
*(LpChannel->pIntrCntlAddress) &= GPT_CLEAR_INT_REQUEST_FLAG;
/* Enable the Interrupt processing of the current channel */
*(LpChannel->pImrIntrCntlAddress) &= LpChannel->ucImrMaskValue;
}
else
{
/* To Avoid MISRA Warning */
}
switch(LucTimerType)
{
case GPT_HW_TAUA:
case GPT_HW_TAUB:
case GPT_HW_TAUC:
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
LpTAUABCUnitUserRegs =
(P2VAR(Tdd_Gpt_TAUABCUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA))
Gpt_GpTAUUnitConfig[LpChannel->ucTimerUnitIndex].pTAUUnitUserCntlRegs;
LpTAUABCChannelRegs = (P2VAR(Tdd_Gpt_TAUABCChannelUserRegs,
AUTOMATIC,GPT_CONFIG_DATA))
LpChannel->pBaseCtlAddress;
/* Load the value into the Data register */
LpTAUABCChannelRegs->usTAUABCnCDRm = (uint16)(u32_TAUX_CDR_Value);
/* Start the timer TAUA/TAUB/TAUC */
LpTAUABCUnitUserRegs->usTAUABCnTS = LpChannel->usChannelMask;
#endif /* End of
((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON)) */
break;
case GPT_HW_TAUJ:
#if(GPT_TAUJ_UNIT_USED == STD_ON)
LpTAUJUnitUserRegs =
(P2VAR(Tdd_Gpt_TAUJUnitUserRegs, AUTOMATIC, GPT_CONFIG_DATA))
Gpt_GpTAUUnitConfig[LpChannel->ucTimerUnitIndex].pTAUUnitUserCntlRegs;
LpTAUJChannelRegs = (P2VAR(Tdd_Gpt_TAUJChannelUserRegs,AUTOMATIC,
GPT_CONFIG_DATA))LpChannel->pBaseCtlAddress;
/* Load the value into the Data register */
LpTAUJChannelRegs->ulTAUJnCDRm = u32_TAUX_CDR_Value;
/* Start the timer TAUJ */
LpTAUJUnitUserRegs->ucTAUJnTS = (uint8)LpChannel->usChannelMask;
#endif /* End of (GPT_TAUJ_UNIT_USED == STD_ON) */
break;
case GPT_HW_OSTM:
#if(GPT_OSTM_UNIT_USED == STD_ON)
LpOSTMUnitRegs =
(P2VAR(Tdd_Gpt_OSTMUnitUserRegs, AUTOMATIC, GPT_CONFIG_DATA))
LpChannel->pBaseCtlAddress;
/* Load the value into the Data register */
LpOSTMUnitRegs->ulOSTMnCMP = (value - ((uint32)GPT_ONE));
/* Start the timer OSTM */
LpOSTMUnitRegs->ucOSTMnTS = GPT_OSTM_START_MASK;
#endif/* End of (GPT_OSTM_UNIT_USED == STD_ON) */
break;
default:
break;
}
/* Assign the timer status to the Channel */
LpRamData->ucChannelStatus = GPT_CH_RUNNING;
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
}
#define GPT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
/******************************************************************************
** Function Name : Gpt_HW_StopTimer
**
** Service ID : NA
**
** Description : This is GPT Driver component support function.
** This function stops the channel
** by disabling the interrupt and/or the clock.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameter : None
**
** Output Parameters : None
**
** Return Value : None
**
** Pre-condition : None
**
** Remarks : Global Variable(s):
** Gpt_GpChannelConfig, Gpt_GpChannelRamData
**
** Function(s) invoked:
** SchM_Enter_Gpt, SchM_Exit_Gpt
**
******************************************************************************/
#define GPT_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, GPT_PRIVATE_CODE) Gpt_HW_StopTimer(Gpt_ChannelType channel)
{
/* Updating the channel config parameter to the current channel */
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)LpChannel;
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
/* Defining a pointer to point to the TAUA registers */
P2VAR(Tdd_Gpt_TAUABCUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)
LpTAUABCUnitUserRegs;
#endif
#if(GPT_TAUJ_UNIT_USED == STD_ON)
/* Defining a pointer to point to the TAUJ registers */
P2VAR(Tdd_Gpt_TAUJUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)LpTAUJUnitUserRegs;
#endif
#if(GPT_OSTM_UNIT_USED == STD_ON)
/* Defining a pointer to point to the OSTM registers */
P2VAR(Tdd_Gpt_OSTMUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)LpOSTMUnitRegs;
#endif
/* Defining a pointer to point to the Channel Ram Data */
P2VAR(Tdd_Gpt_ChannelRamData,AUTOMATIC,GPT_CONFIG_DATA)LpRamData;
uint8 LucTimerType;
/* Updating the channel config parameter to the current channel */
LpChannel = &Gpt_GpChannelConfig[channel];
/* Read the Timer Type for given channel */
LucTimerType = LpChannel->uiTimerType;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LpRamData = Gpt_GpChannelRamData+channel;
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if(GPT_NO_CBK_CONFIGURED != LpChannel->ucImrMaskValue)
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the Interrupt processing of the current channel */
*(LpChannel->pImrIntrCntlAddress) |=
~(LpChannel->ucImrMaskValue);
}
else
{
/* To Avoid MISRA Warning */
}
switch(LucTimerType)
{
case GPT_HW_TAUA:
case GPT_HW_TAUB:
case GPT_HW_TAUC:
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
LpTAUABCUnitUserRegs =
(P2VAR(Tdd_Gpt_TAUABCUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA))
Gpt_GpTAUUnitConfig[LpChannel->ucTimerUnitIndex].pTAUUnitUserCntlRegs;
/* Stop the timer TAUA/TAUB/TAUC */
LpTAUABCUnitUserRegs->usTAUABCnTT = LpChannel->usChannelMask;
#endif
/* End of
((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON)) */
break;
case GPT_HW_TAUJ:
#if(GPT_TAUJ_UNIT_USED == STD_ON)
LpTAUJUnitUserRegs =
(P2VAR(Tdd_Gpt_TAUJUnitUserRegs, AUTOMATIC, GPT_CONFIG_DATA))
Gpt_GpTAUUnitConfig[LpChannel->ucTimerUnitIndex].pTAUUnitUserCntlRegs;
/* Stop the timer TAUJ */
LpTAUJUnitUserRegs->ucTAUJnTT = (uint8)LpChannel->usChannelMask;
#endif/* End of (GPT_TAUJ_UNIT_USED == STD_ON) */
break;
case GPT_HW_OSTM:
#if(GPT_OSTM_UNIT_USED == STD_ON)
LpOSTMUnitRegs =
(P2VAR(Tdd_Gpt_OSTMUnitUserRegs, AUTOMATIC, GPT_CONFIG_DATA))
LpChannel->pBaseCtlAddress;
/* Stop the timer OSTM */
LpOSTMUnitRegs->ucOSTMnTT = GPT_OSTM_STOP_MASK;
#endif/* End of (GPT_OSTM_UNIT_USED == STD_ON) */
break;
default:
break;
}
/* Assign the timer status to the Channel */
LpRamData->ucChannelStatus = GPT_CH_NOTRUNNING;
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
}
#define GPT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
/******************************************************************************
** Function Name : Gpt_HW_DisableWakeup
**
** Service ID : NA
**
** Description : This is GPT Driver component support function. This
** function disables the interrupt for the wakeup channel.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameter : None
**
** Output Parameters : None
**
** Return Value : None
**
** Pre-condition : None
**
** Remarks : Global Variable(s):
** Gpt_GpChannelConfig
**
** Function(s) invoked:
** SchM_Enter_Gpt, SchM_Exit_Gpt
**
******************************************************************************/
#if ((GPT_REPORT_WAKEUP_SOURCE == STD_ON) \
&& (GPT_WAKEUP_FUNCTIONALITY_API == STD_ON))
#define GPT_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, GPT_PRIVATE_CODE) Gpt_HW_DisableWakeup(Gpt_ChannelType channel)
{
/* Updating the channel config parameter to the current channel */
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)LpChannelConfig;
LpChannelConfig = &Gpt_GpChannelConfig[channel];
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if((GPT_NO_CBK_CONFIGURED != LpChannelConfig->ucImrMaskValue)&&
(GPT_MODE_ONESHOT != LpChannelConfig->uiGptChannelMode))
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disabling the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlAddress) |=
~(LpChannelConfig->ucImrMaskValue);
}
else
{
/* To avoid QAC warning*/
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
}
#define GPT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* End of ((GPT_WAKEUP_FUNCTIONALITY_API == STD_ON) &&
(GPT_REPORT_WAKEUP_SOURCE == STD_ON)) */
/******************************************************************************
** Function Name : Gpt_HW_EnableWakeup
**
** Service ID : NA
**
** Description : This is GPT Driver component support function.This
** function enables the interrupt for the wakeup channel
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : channel
**
** InOut Parameter : None
**
** Output Parameters : None
**
** Return Value : None
**
** Pre-condition : None
**
** Remarks : Global Variable(s):
** Gpt_GpChannelConfig
**
** Function(s) invoked:
** SchM_Enter_Gpt, SchM_Exit_Gpt
**
******************************************************************************/
#if ((GPT_REPORT_WAKEUP_SOURCE == STD_ON) \
&& (GPT_WAKEUP_FUNCTIONALITY_API == STD_ON))
#define GPT_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, GPT_PRIVATE_CODE) Gpt_HW_EnableWakeup(Gpt_ChannelType channel)
{
/* Updating the channel config parameter to the current channel */
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)LpChannelConfig;
LpChannelConfig = &Gpt_GpChannelConfig[channel];
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
if((GPT_NO_CBK_CONFIGURED != LpChannelConfig->ucImrMaskValue)&&
(GPT_MODE_ONESHOT != LpChannelConfig->uiGptChannelMode))
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operations on the signed data will */
/* give implementation defined results */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V7.1.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlAddress) |=
~(LpChannelConfig->ucImrMaskValue);
/* Clear the pending interrupt request flag */
*(LpChannelConfig->pIntrCntlAddress) &= GPT_CLEAR_INT_REQUEST_FLAG;
/* Enable the Interrupt processing of the current channel */
*(LpChannelConfig->pImrIntrCntlAddress) &= LpChannelConfig->ucImrMaskValue;
}
else
{
/* To avoid QAC warning*/
}
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
}
#define GPT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* End of ((GPT_WAKEUP_FUNCTIONALITY_API == STD_ON) &&
(GPT_REPORT_WAKEUP_SOURCE == STD_ON)) */
/******************************************************************************
** Function Name : Gpt_CbkNotification
**
** Service ID : NA
**
** Description : This routine is used to invoke the callback notification
** or wakeup notification based on timer mode.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : LucChannelIdx
**
** InOut Parameter : None
**
** Output Parameters : None
**
** Return Value : None
**
** Pre-condition : None
**
** Remarks : Global Variable(s):
** Gpt_GstChannelFunc, Gpt_GpChannelRamData,
** Gpt_GpChannelTimerMap, Gpt_GucGptDriverMode
**
** Function(s) invoked:
** EcuM_CheckWakeup, GptNotification_Channel(Configured
** Notification function for the corresponding channel)
**
******************************************************************************/
#define GPT_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, GPT_PRIVATE_CODE) Gpt_CbkNotification(uint8 LucChannelIdx)
{
#if (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
/* Pointer to Function pointer Table */
P2CONST(Tdd_Gpt_ChannelFuncType, AUTOMATIC, GPT_APPL_CODE) LpChannelFunc;
uint8 LucNotificationIdx;
#endif
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
/* Pointer pointing to the TAUA/TAUB/TAUC Unit control registers */
P2VAR(Tdd_Gpt_TAUABCUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA)
LpTAUABCUnitUserRegs;
#endif
#if(GPT_TAUJ_UNIT_USED == STD_ON)
/* Pointer pointing to the TAUJ Unit user control registers */
P2VAR(Tdd_Gpt_TAUJUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA) LpTAUJUnitUserRegs;
#endif
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON))
/* Defining a pointer to point to the Channel Ram Data */
P2VAR(Tdd_Gpt_ChannelRamData,AUTOMATIC,GPT_CONFIG_DATA)LpRamData;
uint8 LucTimerType;
#endif
/* Updating the channel config parameter to the current channel */
P2CONST(Tdd_Gpt_ChannelConfigType,AUTOMATIC,GPT_CONFIG_CONST)LpChannel;
uint8 LucChIdx;
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
LucChIdx = *(Gpt_GpChannelTimerMap + LucChannelIdx);
/* Updating the channel config parameter to the current channel */
LpChannel = &Gpt_GpChannelConfig[LucChIdx];
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON))
/* Updating the Timertype of the current channel */
LucTimerType = LpChannel->uiTimerType;
/* Updating the channel ram data to the current channel */
LpRamData = &Gpt_GpChannelRamData[LucChIdx];
if(GPT_MODE_ONESHOT == LpChannel->uiGptChannelMode)
{
switch(LucTimerType)
{
case GPT_HW_TAUA:
case GPT_HW_TAUB:
case GPT_HW_TAUC:
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
/* Initialize pointer to the base address of the currect timer unit */
LpTAUABCUnitUserRegs =
(P2VAR(Tdd_Gpt_TAUABCUnitUserRegs,AUTOMATIC,GPT_CONFIG_DATA))
Gpt_GpTAUUnitConfig[LpChannel->ucTimerUnitIndex].pTAUUnitUserCntlRegs;
/* Stop the timer TAUA/TAUB/TAUC */
LpTAUABCUnitUserRegs->usTAUABCnTT = LpChannel->usChannelMask;
/* Assign the timer status to the Channel */
LpRamData->ucChannelStatus = GPT_CH_NOTRUNNING;
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
#endif
/* End of
((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON)||\
(GPT_TAUC_UNIT_USED == STD_ON)) */
break;
case GPT_HW_TAUJ:
#if(GPT_TAUJ_UNIT_USED == STD_ON)
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter Protected area */
SchM_Enter_Gpt(GPT_TIMERINT_PROTECTION);
#endif
/* Initialize pointer to the base address of the currect timer unit */
LpTAUJUnitUserRegs =
(P2VAR(Tdd_Gpt_TAUJUnitUserRegs, AUTOMATIC, GPT_CONFIG_DATA))
Gpt_GpTAUUnitConfig[LpChannel->ucTimerUnitIndex].pTAUUnitUserCntlRegs;
/* Stop the timer TAUJ */
LpTAUJUnitUserRegs->ucTAUJnTT = (uint8)LpChannel->usChannelMask;
/* Assign the timer status to the Channel */
LpRamData->ucChannelStatus = GPT_CH_NOTRUNNING;
#if(GPT_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit Protected area */
SchM_Exit_Gpt(GPT_TIMERINT_PROTECTION);
#endif
#endif/* End of (GPT_TAUJ_UNIT_USED == STD_ON) */
break;
default:
break;
}
}
else
{
/* To Avoid MISRA Warning */
}
#endif/* End of ((GPT_TAUA_UNIT_USED == STD_ON)||
* (GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON)
* (GPT_TAUJ_UNIT_USED == STD_ON))
*/
#if (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
/* copy the driver status */
if(GPT_MODE_NORMAL == Gpt_GucGptDriverMode)
{
/* Invoke callback notification if notification is enabled */
if (GPT_TRUE == Gpt_GpChannelRamData[LucChIdx].uiNotifyStatus)
{
LucNotificationIdx = LpChannel->ucNotificationConfig;
LpChannelFunc = &Gpt_GstChannelFunc[LucNotificationIdx];
/* Invoke the callback function */
LpChannelFunc->pGptNotificationPointer_Channel();
} /*
* End of Gpt_GpChannelRamData[LucChannelIdx].uiNotifyStatus ==
* GPT_TRUE
*/
else
{
/* To Avoid MISRA Warning */
}
}
else
#endif/* End of (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON) */
{
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
/* MISRA Rule : 17.4 */
/* Message : Increment or decrement operation */
/* performed on pointer. */
/* Reason : Increment operator is used to */
/* achieve better throughput. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
/*
* If the driver is in Sleep mode and wakeup notification is enabled,
* invoke ECU Wakeup function
*/
EcuM_CheckWakeup(((Gpt_GpChannelConfig + LucChIdx)->ddWakeupSourceId));
/* Set the wakeup status to true */
Gpt_GpChannelRamData[LucChIdx].uiWakeupStatus = GPT_ONE;
#endif/* End of (GPT_REPORT_WAKEUP_SOURCE == STD_ON) */
}
}
#define GPT_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
/******************************************************************************
** End of File **
******************************************************************************/
<file_sep>/BSP/Include/SchM_Types.h
#ifndef SCHM_TYPES_H
#define SCHM_TYPES_H
typedef uint8 SchM_ReturnType;
#define SCHM_E_OK ((SchM_ReturnType)0x00)
#define SCHM_E_LIMIT ((SchM_ReturnType)0x04)
#define SCHM_E_NOFUNC ((SchM_ReturnType)0x05)
#define SCHM_E_STATE ((SchM_ReturnType)0x07)
#define SCHM_EA_SUSPENDALLINTERRUPTS 0
# define SCHM_ENTER_EXCLUSIVE(ExclusiveArea) \
SuspendAllInterrupts()
# define SCHM_EXIT_EXCLUSIVE(ExclusiveArea) \
ResumeAllInterrupts()
#endif /* SCHM_TYPES_H */
<file_sep>/BSP/MCAL/Icu/App_Icu_Common_Sample.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = App_Icu_Common_Sample.c */
/* Version = 3.0.5a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains sample application for ICU Driver Component */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 25-Aug-2009 : Initial version
*
* V3.0.1: 30-Oct-2009 : Function for Wdg initialization is added.
*
* V3.0.2: 03-Nov-2009 : Comments are added for input signal details for
* the corressponding measurement modes.
*
* V3.0.3: 04-Nov-2009 : The input signal details are generalized.
*
* V3.0.4: 12-Nov-2009 : Breakloop method is changed
*
* V3.0.5: 24-Feb-2010 : The file is renamed and unnecessary global
* variable declaration is removed.
* V3.0.5a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "App_Icu_Common_Sample.h"
#include "App_Icu_Device_Sample.h"
#include "Icu.h"
#include "Icu_Irq.h"
/*******************************************************************************
** Macros **
*******************************************************************************/
/*******************************************************************************
** Global variables **
*******************************************************************************/
/* Array used to store the timestamps */
Icu_ValueType GusTimestamp[10];
/* Variable used to store the Module Version Info */
Std_VersionInfoType GddVersionInfo;
/* Global variables to hold version information */
uint16 GucVendorID;
uint16 GucModuleID;
uint8 GucInstanceID;
uint8 GucMajorVersion;
uint8 GucMinorVersion;
uint8 GucPathVersion;
/* Global variable to hold the timestamp capture status */
boolean GblTimestampsCaptured;
boolean BreakLoop;
Icu_InputStateType GblInputStatus[2];
Icu_ValueType GddTimeElapsed1[1];
Icu_ValueType GddTimeElapsed2[1];
Icu_ValueType GddTimeElapsed3[1];
Icu_ValueType GddTimeElapsed4[1];
Icu_ValueType GddTimeElapsed5[1];
Icu_ValueType GddTimeElapsed6[1];
Icu_ValueType GddTimeElapsed7[1];
Icu_DutyCycleType GddDutyCycleValues[7];
uint16 GblTimestampIndex[1];
uint16 GusEdgeNumbers = 0;
Icu_EdgeNumberType GblEdgeNumberCh[1];
/*******************************************************************************
** User function prototypes **
*******************************************************************************/
void Wdg_Init(void);
void Mcu_Init(void);
void Port_Init(void);
void Big_Delay(void);
void Icu_Edge_Detect_1(void);
void Icu_TimestampNotification_1(void);
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*
* Main Function
*/
void main(void)
{
/* Initialise MCU */
Mcu_Init();
/* Initialise PORT */
Port_Init();
/* Initialise WDG */
Wdg_Init();
/* Read the ICU Driver version information. The pointer is updated with
* the vendorID, moduleID, instanceID and software version
*/
Icu_GetVersionInfo(&GddVersionInfo);
/* Reading of vendorID, moduleID and software version from the pointer */
GucVendorID = GddVersionInfo.vendorID;
GucModuleID = GddVersionInfo.moduleID;
GucInstanceID = GddVersionInfo.instanceID;
GucMajorVersion = GddVersionInfo.sw_major_version;
GucMinorVersion = GddVersionInfo.sw_minor_version;
GucPathVersion = GddVersionInfo.sw_patch_version;
/* Initialise ICU Driver. A valid database address needs to
* be provided for the proper initialisation of the driver.
*/
Icu_Init(IcuConfigSet0);
BreakLoop = ICU_FALSE;
/* Enable Global Interrupt */
__asm("ei");
/*****************************************************************************
********************** TIME STAMPING FUNCTIONALITY ***************************
*****************************************************************************/
/* A continuous signal of 1 milli-second with 50% duty cycle and Vref
* should be given at input.
*/
/* Set Activation condition for IcuChannel2 */
Icu_SetActivationCondition(IcuChannel2, ICU_RISING_EDGE);
/* Enable notification for IcuChannel2 */
Icu_EnableNotification(IcuChannel2);
/* Enable Timestamping for IcuChannel2 */
Icu_StartTimestamp(IcuChannel2, &GusTimestamp[0], 10, 5);
do
{
/* Get the index of the buffer at which next timestamp
* value is to be written
*/
GblTimestampIndex[0] = Icu_GetTimestampIndex(IcuChannel2);
}while(!BreakLoop);
BreakLoop = ICU_FALSE;
/* Stop Timestamping for for IcuChannel2 */
Icu_StopTimestamp(IcuChannel2);
/* Get the index of the buffer at which next timestamp
* value is to be written
*/
GblTimestampIndex[0] = Icu_GetTimestampIndex(IcuChannel2);
/* Disable notification for IcuChannel2 */
Icu_DisableNotification(IcuChannel2);
/* Enable Timestamping for IcuChannel2 */
Icu_StartTimestamp(IcuChannel2, &GusTimestamp[0], 10, 5);
do
{
/* Get the index of the buffer at which next timestamp
* value is to be written
*/
GblTimestampIndex[0] = Icu_GetTimestampIndex(IcuChannel2);
}while(!BreakLoop);
BreakLoop = ICU_FALSE;
/* Stop Timestamping for IcuChannel2 */
Icu_StopTimestamp(IcuChannel2);
/* Get the index of the buffer at which next timestamp
* value is to be written
*/
GblTimestampIndex[0] = Icu_GetTimestampIndex(IcuChannel2);
/*****************************************************************************
********************** EDGE COUNTING FUNCTIONALITY ***************************
*****************************************************************************/
/* A discrete signal of 1 milli-second with 50% duty cycle and Vref should be
* given at input. User has to trigger the edges at input.
*/
/* Set Rising Edge Activation condition for IcuChannel1 */
Icu_SetActivationCondition(IcuChannel1, ICU_RISING_EDGE);
/* Enable Edge Counting for IcuChannel1 */
Icu_EnableEdgeCount(IcuChannel1);
/* Read Edge count for IcuChannel1 */
do
{
/* Get the number of edges counted IcuChannel1 */
GblEdgeNumberCh[0] = Icu_GetEdgeNumbers(IcuChannel1);
}while (!BreakLoop);
BreakLoop = ICU_FALSE;
/* Reset Edge count for IcuChannel1 */
Icu_ResetEdgeCount(IcuChannel1);
do
{
/* Get the number of edges counted */
GblEdgeNumberCh[0] = Icu_GetEdgeNumbers(IcuChannel1);
}while (!BreakLoop);
BreakLoop = ICU_FALSE;
/* Disable Edge Counting for IcuChannel1 */
Icu_DisableEdgeCount(IcuChannel1);
do
{
/* Get the number of edges counted */
GblEdgeNumberCh[0] = Icu_GetEdgeNumbers(IcuChannel1);
}while (!BreakLoop);
BreakLoop = ICU_FALSE;
/*****************************************************************************
********************* SIGNAL MEASUREMENT FUNCTIONALITY ***********************
*****************************************************************************/
/* A continuous signal of 1 milli-second with 60% duty cycle and Vref
* should be given at input.
*/
/* Signal measurement: HIgh Time */
/* Start Signal Measurement for IcuChannel3 */
Icu_StartSignalMeasurement (IcuChannel3);
/* Read Elapsed High Time for IcuChannel3 */
GddTimeElapsed1[0] = Icu_GetTimeElapsed(IcuChannel3);
/* Call Big Delay */
Big_Delay();
/* Signal High time has been captured */
GddTimeElapsed2[0] = Icu_GetTimeElapsed(IcuChannel3);
GddTimeElapsed3[0] = Icu_GetTimeElapsed(IcuChannel3);
/* Call Big Delay */
Big_Delay();
/* Signal High time has been captured */
GddTimeElapsed4[0] = Icu_GetTimeElapsed(IcuChannel3);
/* Call Big Delay */
Big_Delay();
/* Signal High time has been captured */
GddTimeElapsed5[0] = Icu_GetTimeElapsed(IcuChannel3);
/* Call Big Delay */
Big_Delay();
/* Signal High time has been captured */
GddTimeElapsed6[0] = Icu_GetTimeElapsed(IcuChannel3);
/* Stop Signal Measurement for IcuChannel3 */
Icu_StopSignalMeasurement (IcuChannel3);
/* Call Big Delay */
Big_Delay();
/* Signal High time has been captured */
GddTimeElapsed7[0] = Icu_GetTimeElapsed(IcuChannel3);
/* Signal measurement: Duty cycle */
/* A continuous signal of 1 milli-second with 60% duty cycle and Vref
* should be given at input channel as well as the channel
* next to it.
*/
/* In this case give input signal to IcuChannel4 as well as to its
next higher channel */
/* Start Signal Measurement for IcuChannel4 */
Icu_StartSignalMeasurement (IcuChannel4);
/* Read DutyCycle for IcuChannel4 */
Icu_GetDutyCycleValues(IcuChannel4, &GddDutyCycleValues[0]);
/* Call Big Delay */
Big_Delay();
/* Signal DutyCycle has been captured */
Icu_GetDutyCycleValues(IcuChannel4, &GddDutyCycleValues[1]);
Icu_GetDutyCycleValues(IcuChannel4, &GddDutyCycleValues[2]);
/* Call Big Delay */
Big_Delay();
/* Signal DutyCycle has been captured */
Icu_GetDutyCycleValues(IcuChannel4, &GddDutyCycleValues[3]);
/* Call Big Delay */
Big_Delay();
/* Signal DutyCycle has been captured */
Icu_GetDutyCycleValues(IcuChannel4, &GddDutyCycleValues[4]);
/* Call Big Delay */
Big_Delay();
/* Signal DutyCycle has been captured */
Icu_GetDutyCycleValues(IcuChannel4, &GddDutyCycleValues[5]);
/* Stop Signal Measurement for IcuChannel4 */
Icu_StopSignalMeasurement (IcuChannel4);
/* Call Big Delay */
Big_Delay();
/* Signal DutyCycle has been captured */
Icu_GetDutyCycleValues(IcuChannel4, &GddDutyCycleValues[6]);
/* To check the input state of a channel configured for signal
* measurement mode
*/
/* Start Signal measurement for IcuChannel3 */
Icu_StartSignalMeasurement(IcuChannel3);
Big_Delay();
/* Get the input stae of the channel */
GblInputStatus[0] = Icu_GetInputState(IcuChannel3);
GblInputStatus[1] = Icu_GetInputState(IcuChannel3);
/* GblInputStatus[0] should be ICU_ACTIVE and GblInputStatus[1]
* should be ICU_IDLE
*/
/* Stop Signal Measurement for for IcuChannel3 */
Icu_StopSignalMeasurement(IcuChannel3);
GblInputStatus[0] = ICU_IDLE;
GblInputStatus[1] = ICU_IDLE;
/*****************************************************************************
************************* EDGE DETECTION FUNCTIONALITY ***********************
*****************************************************************************/
/* A continuous signal of 1 milli-second with 50% duty cycle and Vref
* should be given at input.
*/
/* Enable notification for IcuChannel0 */
Icu_EnableNotification(IcuChannel0);
do
{
;
}while (!BreakLoop);
BreakLoop = ICU_FALSE;
/* Disable notification for IcuChannel0 */
Icu_DisableNotification(IcuChannel0);
GusEdgeNumbers = 0;
do
{
;
}while (!BreakLoop);
BreakLoop = ICU_FALSE;
/* To check the input state of a channel configured for edge detection mode */
Big_Delay();
/* Read Input status for IcuChannel0 */
GblInputStatus[0] = Icu_GetInputState(IcuChannel0);
GblInputStatus[1] = Icu_GetInputState(IcuChannel0);
GblInputStatus[0] = ICU_IDLE;
GblInputStatus[1] = ICU_IDLE;
/* Set Icu to sleep mode */
Icu_SetMode(ICU_MODE_SLEEP);
/* Set Icu to normal mode */
Icu_SetMode(ICU_MODE_NORMAL);
/* Disable wakeup for IcuChannel0 */
Icu_DisableWakeup(IcuChannel0);
/* Disable wakeup for IcuChannel0 */
Icu_EnableWakeup(IcuChannel0);
/* De-Initialisation of ICU Driver. After the driver is de-initialised,
* no other API calls are valid except Icu_Init(). User should take care
* of re-initialising the ICU Driver with a valid database before invoking
* other APIs.
*/
Icu_DeInit();
}
/* End of main() function */
void Big_Delay(void)
{
uint16 LuiCnt1 = 0;
uint16 LuiCnt2 = 0;
while(LuiCnt1 < 10)
{
LuiCnt1 ++;
while(LuiCnt2 < 10000)
{
LuiCnt2++;
}
LuiCnt2 = 0;
}
}
/*******************************************************************************
** Notification function **
*******************************************************************************/
/* Notification function for IcuChannel0 */
void Icu_Edge_Detect_1(void)
{
/* Increment the counter to indicate that notification is invoked */
GusEdgeNumbers++;
}
/* Notification function for IcuChannel2 */
void Icu_TimestampNotification_1(void)
{
/* Set flag to true to inform that the 5 timestamps have been captured */
GblTimestampsCaptured = TRUE;
}
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/Include/SchM_Can.h
#ifndef SCHM_CAN_H
#define SCHM_CAN_H
#include "SchM.h"
#include "SchM_Types.h"
#include "SchM_Cfg.h"
#define CAN_EXCLUSIVE_AREA_0 SCHM_EA_SUSPENDALLINTERRUPTS
# define SchM_Enter_Can(ExclusiveArea) \
SCHM_ENTER_EXCLUSIVE(ExclusiveArea)
# define SchM_Exit_Can(ExclusiveArea) \
SCHM_EXIT_EXCLUSIVE(ExclusiveArea)
#endif /* SCHM_CAN_H */
<file_sep>/APP/LEDLightControl/LEDLightControl.c
#include "Std_Types.h"
#include "IoHwAb_Api.h"
void EH_LightShapeOut(void)
{
if(true==GetCityModeSwitchSwitch())
{
SetCityModeOut();
}
else
{
ClrCityModeOut();
}
if(true==GetHighSpeedModeSwitchSwitch())
{
SetHighSpeedModeOut();
}
else
{
ClrHighSpeedModeOut();
}
if(true==GetBadWeatherModeSwitchSwitch())
{
SetBadWeatherModeOut();
}
else
{
ClrBadWeatherModeOut();
}
#if 0
if((true==GetLowBeamSwitch())&&(false==GetCityModeSwitchSwitch())&&
(false==GetHighSpeedModeSwitchSwitch())&&(false==GetBadWeatherModeSwitchSwitch()))
{
ClrCityModeOut();
ClrHighSpeedModeOut();
ClrBadWeatherModeOut();
}
else if((true==GetLowBeamSwitch())&&(true==GetCityModeSwitchSwitch()))
{
SetCityModeOut();
ClrHighSpeedModeOut();
ClrBadWeatherModeOut();
}
else if((true==GetLowBeamSwitch())&&(false==GetCityModeSwitchSwitch())&&
(true==GetHighSpeedModeSwitchSwitch()))
{
ClrCityModeOut();
SetHighSpeedModeOut();
ClrBadWeatherModeOut();
}
else if((true==GetLowBeamSwitch())&&(false==GetCityModeSwitchSwitch())&&
(false==GetHighSpeedModeSwitchSwitch())&&(true==GetBadWeatherModeSwitchSwitch()))
{
ClrCityModeOut();
ClrHighSpeedModeOut();
SetBadWeatherModeOut();
}
else if(false==GetLowBeamSwitch())
{
ClrCityModeOut();
ClrHighSpeedModeOut();
ClrBadWeatherModeOut();
}
#endif
}
void EH_CornerLampOut()
{
if(true==GetCornerLampSwitch())
{
SetCornerLampOut();
}
else
{
ClrCornerLampOut();
}
}
UINT8 VeLED_u_TurnLampCount=0;
const CeLED_u_TurnLampDuty=40;
void EH_TurnLampOut()
{
if(true==GetTurnLampSwitch())
{
VeLED_u_TurnLampCount++;
if(VeLED_u_TurnLampCount<=CeLED_u_TurnLampDuty)
{
SetTurnLampOut();
}
else if((VeLED_u_TurnLampCount<=(CeLED_u_TurnLampDuty*2))&&
(VeLED_u_TurnLampCount>CeLED_u_TurnLampDuty))
{
ClrTurnLampOut();
}
else if(VeLED_u_TurnLampCount>(CeLED_u_TurnLampDuty*2))
{
VeLED_u_TurnLampCount=0;
ClrTurnLampOut();
}
}
else
{
VeLED_u_TurnLampCount=0;
ClrTurnLampOut();
}
}
void EH_HighBeamOut()
{
if(true==GetHighBeamSwitch())
{
SetHighBeamOut();
}
else
{
ClrHighBeamOut();
}
}
void EH_LowBeamOut(void)
{
if(true==GetLowBeamSwitch())
{
SetLowBeamOut();
}
else
{
ClrLowBeamOut();
}
}
void EH_ParkDRLOut(void)
{
if(true==GetParkLampSwitch())
{
SetParkLampOut();
ClrDRLOut();
}
else if((false==GetParkLampSwitch())&&(true==GetDRLSwitch()))
{
ClrParkLampOut();
SetDRLOut();
}
else if((false==GetParkLampSwitch())&&(false==GetDRLSwitch()))
{
ClrParkLampOut();
ClrDRLOut();
}
}
void EH_FANControl(void)
{
IoHwAb_SetODH2(true);
}
void LEDSwitchMainFunction(void)
{
EH_ParkDRLOut();
EH_LowBeamOut();
EH_HighBeamOut();
EH_TurnLampOut();
EH_CornerLampOut();
EH_LightShapeOut();
EH_FANControl();
}
<file_sep>/APP/LEDTemperature/CAL2_LEDTemperature.h
#ifndef __LEDSwitch_H
#define __LEDSwitch_H
#include "ipc_types.h"
#endif
<file_sep>/BSP/MCAL/Pwm/Pwm.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Pwm.h */
/* Version = 3.1.3 */
/* Date = 12-Jul-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of API information. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 18-Aug-2009 : Initial version
* V3.0.1: 02-Jul-2010 : As per SCR 290, structure "Pwm_ConfigType" is
* updated to support TAUB and TAUC timer units.
* V3.0.2: 28-Jul-2010 : As per SCR 321, unused element in the structure
* Pwm_ConfigType is removed.
* V3.0.3: 29-Apr-2011 : As per SCR 435, PWM_E_PARAM_VALUE DET is added.
* V3.1.0: 26-Jul-2011 : Ported for the DK4 variant.
* V3.1.1: 05-Mar-2012 : Merged the fixes done for Fx4L PWM driver
* V3.1.2: 06-Jun-2012 : As per SCR 034, following changes are made:
* 1. File version is changed.
* 2. Compiler version is removed from Environment
* section.
* 3. Function Pwm_GetVersionInfo is implemented as
* Macro.
* V3.1.3: 12-Jul-2012 : As per SCR 051, PWM_SW_PATCH_VERSION is updated.
*/
/******************************************************************************/
#ifndef PWM_H
#define PWM_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Std_Types.h"
#include "Pwm_Cfg.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* Version identification */
#define PWM_VENDOR_ID PWM_VENDOR_ID_VALUE
#define PWM_MODULE_ID PWM_MODULE_ID_VALUE
#define PWM_INSTANCE_ID PWM_INSTANCE_ID_VALUE
/* AUTOSAR specification version information */
#define PWM_AR_MAJOR_VERSION PWM_AR_MAJOR_VERSION_VALUE
#define PWM_AR_MINOR_VERSION PWM_AR_MINOR_VERSION_VALUE
#define PWM_AR_PATCH_VERSION PWM_AR_PATCH_VERSION_VALUE
/* Software version information */
#define PWM_SW_MAJOR_VERSION 3
#define PWM_SW_MINOR_VERSION 1
#define PWM_SW_PATCH_VERSION 3
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (PWM_SW_MAJOR_VERSION != PWM_CFG_SW_MAJOR_VERSION)
#error "Pwm.h : Mismatch in Major Version"
#endif
#if (PWM_SW_MINOR_VERSION != PWM_CFG_SW_MINOR_VERSION)
#error "Pwm.h : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Service Ids **
*******************************************************************************/
/* Service Id of Pwm_Init */
#define PWM_INIT_SID (uint8)0x00
/* Service Id of Pwm_DeInit */
#define PWM_DEINIT_SID (uint8)0x01
/* Service Id of Pwm_SetDutyCycle */
#define PWM_SET_DUTYCYCLE_SID (uint8)0x02
/* Service Id of Pwm_SetPeriodAndDuty */
#define PWM_SET_PERIODANDDUTY_SID (uint8)0x03
/* Service Id of Pwm_SetOutputToIdle */
#define PWM_SET_OUTPUTTOIDLE_SID (uint8)0x04
/* Service Id of Pwm_GetOutputState */
#define PWM_GET_OUTPUTSTATE_SID (uint8)0x05
/* Service Id of Pwm_DisableNotification */
#define PWM_DISABLENOTIFICATION_SID (uint8)0x06
/* Service Id of Pwm_EnableNotification */
#define PWM_ENABLENOTIFICATION_SID (uint8)0x07
/* Service Id of Pwm_GetVersionInfo */
#define PWM_GET_VERSION_INFO_SID (uint8)0x08
/*******************************************************************************
** DET Error Codes **
*******************************************************************************/
/* Pwm_Init API called with wrong parameter */
#define PWM_E_PARAM_CONFIG (uint8)0x10
/* When PWM APIs are invoked before PWM Module Initialisation */
#define PWM_E_UNINIT (uint8)0x11
/* When PWM APIs are invoked with invalid channel identifier */
#define PWM_E_PARAM_CHANNEL (uint8)0x12
/* Invoking the PWM APIs on PWM channel configured as Fixed period */
#define PWM_E_PERIOD_UNCHANGEABLE (uint8)0x13
/* Pwm_Init API called when PWM module is already initialised */
#define PWM_E_ALREADY_INITIALIZED (uint8)0x14
/* Invoking Pwm_EnableNotification API for the configured
channel whose notification is already enabled */
#define PWM_E_ALREADY_ENABLED (uint8)0xEE
/* Invoking Pwm_DisableNotification API for the configured
channel whose notification is already disabled */
#define PWM_E_ALREADY_DISABLED (uint8)0xEF
/* When valid Database is not available */
#define PWM_E_INVALID_DATABASE (uint8)0xF0
/* Pwm_GetVersionInfo API called with NULL_PTR parameter */
#define PWM_E_PARAM_POINTER (uint8)0xF1
/* When PWM APIs Pwm_SetDutyCycle and Pwm_SetPeriodAndDuty are invoked with
* invalid parameter values */
#define PWM_E_PARAM_VALUE (uint8)0xF2
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Type definition for Pwm_ChannelType */
typedef uint8 Pwm_ChannelType;
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/* Type definition for Pwm_PeriodType if TAUJ is used */
typedef uint32 Pwm_PeriodType;
#else
/* Type definition for Pwm_PeriodType if only TAUA is used */
typedef uint16 Pwm_PeriodType;
#endif
/* Type definition for Pwm_OutputStateType */
typedef enum
{
PWM_LOW,
PWM_HIGH
}Pwm_OutputStateType;
/* Type definition for Pwm_EdgeNotificationType */
typedef enum
{
PWM_RISING_EDGE,
PWM_FALLING_EDGE,
PWM_BOTH_EDGES
}Pwm_EdgeNotificationType;
/* Type definition for Pwm_ChannelClassType */
typedef enum
{
PWM_VARIABLE_PERIOD,
PWM_FIXED_PERIOD,
PWM_FIXED_PERIOD_SHIFTED
}Pwm_ChannelClassType;
/* Structure for Pwm_Init configuration */
/* Overall module configuration data structure */
typedef struct STagPwm_ConfigType
{
/* Database start value */
uint32 ulStartOfDbToc;
#if((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) ||\
(PWM_TAUC_UNIT_USED == STD_ON))
/* Pointer to PWM Driver TAUA/TAUB/TAUC Unit configuration */
P2CONST(void, AUTOMATIC, PWM_CONFIG_CONST)pTAUABCUnitConfig;
#endif
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/* Pointer to PWM Driver TAUJ Unit configuration */
P2CONST(void, AUTOMATIC, PWM_CONFIG_CONST)pTAUJUnitConfig;
#endif
/* Pointer to PWM Driver channel configuration */
P2CONST(void, AUTOMATIC, PWM_CONFIG_CONST)pChannelConfig;
#if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON)
/* Pointer to PWM Driver synch start configuration */
P2CONST(void, AUTOMATIC, PWM_CONFIG_CONST)pSynchStartConfig;
#endif
/* Pointer to address of Timer to channel index array */
P2CONST(uint8, AUTOMATIC,PWM_CONFIG_CONST)pChannelTimerMap;
#if(PWM_NOTIFICATION_SUPPORTED == STD_ON)
/* Pointer to Array for Notification status of TAU timers configured */
P2VAR(uint8, AUTOMATIC, PWM_CONFIG_DATA)pNotifStatus;
#endif
/* Pointer to Array for Idle state status for all channels configured */
P2VAR(uint8, AUTOMATIC, PWM_CONFIG_DATA)pChannelIdleStatus;
}Pwm_ConfigType;
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, PWM_PUBLIC_CODE) Pwm_Init
(P2CONST(Pwm_ConfigType, AUTOMATIC, PWM_APPL_CONST)ConfigPtr);
#if (PWM_DE_INIT_API == STD_ON)
extern FUNC(void, PWM_PUBLIC_CODE) Pwm_DeInit (void);
#endif
#if (PWM_SET_DUTY_CYCLE_API == STD_ON)
extern FUNC(void, PWM_PUBLIC_CODE) Pwm_SetDutyCycle
(Pwm_ChannelType ChannelNumber, uint16 DutyCycle);
#endif
#if (PWM_SET_PERIOD_AND_DUTY_API == STD_ON)
extern FUNC(void, PWM_PUBLIC_CODE) Pwm_SetPeriodAndDuty
(Pwm_ChannelType ChannelNumber, Pwm_PeriodType Period, uint16 DutyCycle);
#endif
#if (PWM_SET_OUTPUT_TO_IDLE_API == STD_ON)
extern FUNC(void, PWM_PUBLIC_CODE) Pwm_SetOutputToIdle
(Pwm_ChannelType ChannelNumber);
#endif
#if (PWM_GET_OUTPUT_STATE_API == STD_ON)
extern FUNC(Pwm_OutputStateType, PWM_PUBLIC_CODE) Pwm_GetOutputState
(Pwm_ChannelType ChannelNumber);
#endif
#if (PWM_NOTIFICATION_SUPPORTED == STD_ON)
extern FUNC(void, PWM_PUBLIC_CODE) Pwm_EnableNotification
(Pwm_ChannelType ChannelNumber, Pwm_EdgeNotificationType Notification);
extern FUNC(void, PWM_PUBLIC_CODE) Pwm_DisableNotification
(Pwm_ChannelType ChannelNumber);
#endif
#if (PWM_VERSION_INFO_API == STD_ON)
#define Pwm_GetVersionInfo(versioninfo)\
{\
(versioninfo)->vendorID = (uint16)PWM_VENDOR_ID; \
(versioninfo)->moduleID = (uint16)PWM_MODULE_ID; \
(versioninfo)->instanceID = (uint8)PWM_INSTANCE_ID; \
(versioninfo)->sw_major_version = PWM_SW_MAJOR_VERSION; \
(versioninfo)->sw_minor_version = PWM_SW_MINOR_VERSION; \
(versioninfo)->sw_patch_version = PWM_SW_PATCH_VERSION; \
}
#endif /*(PWM_VERSION_INFO_API == STD_ON)*/
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define PWM_START_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
extern CONST(Pwm_ConfigType, PWM_CONST) Pwm_GstConfiguration[];
#define PWM_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
#endif /* PWM_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/Include/SchM_EcuM.h
#ifndef SCHM_ECUM_H
#define SCHM_ECUM_H
#include "SchM.h"
#include "SchM_Types.h"
#include "SchM_Cfg.h"
#define SCHM_ECUM_WAKEUPINTERRUPTS 0xF0
#define ECUM_EXCLUSIVE_AREA_0 SCHM_EA_SUSPENDALLINTERRUPTS
#define ECUM_EXCLUSIVE_AREA_1 SCHM_ECUM_WAKEUPINTERRUPTS
# define SchM_Enter_EcuM(ExclusiveArea) \
if (ExclusiveArea == SCHM_ECUM_WAKEUPINTERRUPTS) \
{ \
} \
else \
{ \
SCHM_ENTER_EXCLUSIVE(ExclusiveArea); \
}
# define SchM_Exit_EcuM(ExclusiveArea) \
if (ExclusiveArea == SCHM_ECUM_WAKEUPINTERRUPTS) \
{ \
} \
else \
{ \
SCHM_EXIT_EXCLUSIVE(ExclusiveArea); \
}
#endif /* SCHM_ECUM_H */
<file_sep>/BSP/MCAL/Can/Can_MainServ.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Can_MainServ.c */
/* Version = 3.0.3a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2008-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of Main Service Routines Functionality. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12.12.2008 : Initial Version
* V3.0.1: 20.10.2009 : Updated compiler version as per
* SCR ANMCANLINFR3_SCR_031.
* V3.0.2: 31.12.2010 : As per ANMCANLINFR3_SCR_087, space between
* '#' and 'if' is removed.
* V3.0.3: 20.06.2011 : As per ANMCANLINFR3_SCR_107,
* 1. FCNnGMCLSSMO (MBON) flag check is implemented in
* Can_MainFunction_write().
* 2. In Can_TxCancellationProcessing, FCNnMmCTL register
* is read only one time.
* V3.0.3a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Can_PBTypes.h" /* CAN Driver Post-Build Config. Header File */
#include "Can_MainServ.h" /* CAN Main Processing Header File */
#include "Can_Ram.h" /* CAN Driver RAM Header File */
#include "Can_ModeCntrl.h" /* CAN Mode Control Service Header File */
#include "Can_Tgt.h" /* CAN Driver Target Header File */
#if (CAN_DEV_ERROR_DETECT == STD_ON)
#include "Det.h" /* DET Header File */
#endif
#if(CAN_WAKEUP_SUPPORT == STD_ON)
#include "EcuM_Cbk.h" /* ECUM callback and callout Header File */
#endif
#include "SchM_Can.h" /* Scheduler Header File */
#include "CanIf_Cbk.h" /* CAN Interface call-back Header File */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define CAN_MAINSERV_C_AR_MAJOR_VERSION 2
#define CAN_MAINSERV_C_AR_MINOR_VERSION 2
#define CAN_MAINSERV_C_AR_PATCH_VERSION 2
/* File version information */
#define CAN_MAINSERV_C_SW_MAJOR_VERSION 3
#define CAN_MAINSERV_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (CAN_MAINSERV_AR_MAJOR_VERSION != CAN_MAINSERV_C_AR_MAJOR_VERSION)
#error "Can_MainServ.c : Mismatch in Specification Major Version"
#endif
#if (CAN_MAINSERV_AR_MINOR_VERSION != CAN_MAINSERV_C_AR_MINOR_VERSION)
#error "Can_MainServ.c : Mismatch in Specification Minor Version"
#endif
#if (CAN_MAINSERV_AR_PATCH_VERSION != CAN_MAINSERV_C_AR_PATCH_VERSION)
#error "Can_MainServ.c : Mismatch in Specification Patch Version"
#endif
#if (CAN_MAINSERV_SW_MAJOR_VERSION != CAN_MAINSERV_C_SW_MAJOR_VERSION)
#error "Can_MainServ.c : Mismatch in Software Major Version"
#endif
#if (CAN_MAINSERV_SW_MINOR_VERSION != CAN_MAINSERV_C_SW_MINOR_VERSION)
#error "Can_MainServ.c : Mismatch in Software Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Can_MainFunction_Write
**
** Service ID : 0x01
**
** Description : This service performs the polling of transmit
** confirmation that is configured statically as
** 'to be polled'.
**
** Sync/Async : None
**
** Re-entrancy : Non Re-entrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The CAN Driver must be initialized.
**
** Remarks : Global Variable(s) referred in this function:
** Can_GblCanStatus, Can_GpFirstController
**
** : Function(s) invoked:
** Det_ReportError(), Can_TxConfirmationProcessing(),
** Can_TxCancellationProcessing()
**
*******************************************************************************/
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, CAN_AFCAN_PUBLIC_CODE) Can_MainFunction_Write(void)
{
P2CONST(Can_ControllerConfigType,AUTOMATIC, CAN_AFCAN_PRIVATE_CONST)
LpController;
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC, CAN_AFCAN_PRIVATE_DATA)
LpCntrlReg16bit;
uint8_least LucNoOfController;
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Report to DET, if module is not initialized */
if (Can_GblCanStatus == CAN_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_MAIN_WRITE_SID, CAN_E_UNINIT);
}
else
#endif
{
/* Get the pointer to first Controller structure */
LpController = Can_GpFirstController;
/* Get the number of Controllers configured */
LucNoOfController = CAN_MAX_NUMBER_OF_CONTROLLER;
/* Loop for number of Controllers configured */
do
{
/* Get the pointer to control register structure */
LpCntrlReg16bit = LpController->pCntrlReg16bit;
/* Check whether polling method is configured or not */
if(((LpController->usIntEnable) & (CAN_TX_INT_MASK)) == CAN_FALSE)
{
/* Check whether transmit interrupt is enabled or not */
if((LpCntrlReg16bit->usFcnCmisCtl & CAN_TX_STS_MASK) == CAN_TX_STS_MASK)
{
/* Check whether MBON bit is set or not */
if((LpCntrlReg16bit->usFcnGmclCtl & CAN_MBON_BIT_STS) != CAN_ZERO)
{
/* Invoke internal function to process transmit confirmation */
Can_TxConfirmationProcessing(LpCntrlReg16bit,
LpController->ssHthOffSetId);
}
}
}
if(((LpController->usIntEnable) & (CAN_TXCANCEL_INT_MASK)) == CAN_FALSE)
{
#if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
if((LpCntrlReg16bit->usFcnCmisCtl & CAN_TXCANCEL_STS_MASK) ==
CAN_TXCANCEL_STS_MASK)
{
/* Check whether MBON bit is set or not */
if((LpCntrlReg16bit->usFcnGmclCtl & CAN_MBON_BIT_STS) != CAN_ZERO)
{
/* Invoke internal function to process transmit cancellation */
Can_TxCancellationProcessing(LpController, CAN_FALSE);
}
}
#endif
}
/* MISRA Rule : 17.4
Message : Increment or decrement operation performed
on pointer(LpController).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to next Controller structure */
LpController++;
/* Decrement the number of Controllers count configured */
LucNoOfController--;
/* MISRA Rule : 13.7
Message : The result of this logical operation is always
'false'. The value of this 'do - while' control
expression is always 'false'. The loop will be
executed once.
Reason : The result of this logical operation is always
false since only one controller is configured.
However, when two or more controllers are
configured this warning ceases to exist.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
}while(LucNoOfController != CAN_ZERO);
} /* if (Can_GblCanStatus == CAN_UNINITIALIZED) */
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Can_MainFunction_Read
**
** Service ID : 0x08
**
** Description : This service performs the polling of receive
** indications that are configured statically as 'to be
** polled'.
**
** Sync/Async : None
**
** Re-entrancy : Non Re-entrant
**
** Input Parameters : None
**
** Input Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The CAN Driver must be initialized.
**
** Remarks : Global Variable(s) referred in this function:
** Can_GblCanStatus, Can_GpFirstController
**
** : Function(s) invoked:
** Can_RxProcessing() , Det_ReportError()
**
*******************************************************************************/
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, CAN_AFCAN_PUBLIC_CODE) Can_MainFunction_Read(void)
{
P2CONST(Can_ControllerConfigType,AUTOMATIC, CAN_AFCAN_PRIVATE_CONST)
LpController;
P2CONST(Tdd_Can_AFCan_8bit_CntrlReg,AUTOMATIC, CAN_AFCAN_PRIVATE_DATA)
LpCntrlReg8bit;
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC, CAN_AFCAN_PRIVATE_DATA)
LpCntrlReg16bit;
uint8_least LucNoOfController;
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Report to DET, if module is not initialized */
if (Can_GblCanStatus == CAN_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_MAIN_READ_SID,CAN_E_UNINIT);
}
else
#endif
{
/* Get the pointer to first Controller structure */
LpController = Can_GpFirstController;
/* Get the number of Controllers configured */
LucNoOfController = CAN_MAX_NUMBER_OF_CONTROLLER;
/* Loop for the number of Controllers configured */
do
{
/* Check whether polling method is configured or not */
if(((LpController->usIntEnable) & (CAN_REC_INT_MASK)) == CAN_FALSE)
{
/* Get the pointer to 8-bit control register structure */
LpCntrlReg8bit = LpController->pCntrlReg8bit;
/* Get the pointer to 16-bit control register structure */
LpCntrlReg16bit = LpController->pCntrlReg16bit;
/* Check whether receive interrupt is enabled or not */
if(((LpCntrlReg16bit->usFcnCmisCtl) & (CAN_REC_STS_MASK)) ==
CAN_REC_STS_MASK)
{
/* Check whether MBON bit is set or not */
if((LpCntrlReg16bit->usFcnGmclCtl & CAN_MBON_BIT_STS) != CAN_ZERO)
{
/* Invoke internal function for receive processing */
Can_RxProcessing(LpCntrlReg8bit, LpCntrlReg16bit,
LpController->ucHrhOffSetId);
}
}
}
/* Decrement the number of Controllers count configured */
LucNoOfController--;
/* MISRA Rule : 17.4
Message : Increment or decrement operation performed
on pointer(LpController).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to next Controller structure */
LpController++;
/* MISRA Rule : 13.7
Message : The result of this logical operation is always
'false'. The value of this 'do - while' control
expression is always 'false'. The loop will be
executed once.
Reason : The result of this logical operation is always
false since only one controller is configured.
However, when two or more controllers are
configured this warning ceases to exist.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
}while (LucNoOfController!= CAN_ZERO);
}
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Can_MainFunction_BusOff
**
** Service ID : 0x09
**
** Description : This service performs the polling of BusOff events
** that are configured statically as 'to be polled'.
**
** Sync/Async : None
**
** Re-entrancy : Non Re-entrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The CAN Driver must be initialized.
**
** Remarks : Global Variable(s) referred in this function:
** Can_GblCanStatus, Can_GpFirstController
**
** : Function(s) invoked:
** Det_ReportError(), Can_StopMode(),
** CanIf_ControllerBusOff()
**
*******************************************************************************/
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, CAN_AFCAN_PUBLIC_CODE) Can_MainFunction_BusOff(void)
{
P2CONST(Can_ControllerConfigType,AUTOMATIC, CAN_AFCAN_PRIVATE_CONST)
LpController;
P2VAR(Tdd_Can_AFCan_8bit_CntrlReg,AUTOMATIC, CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg8bit;
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC, CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit;
uint8_least LucNoOfController;
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Report to DET, if module is not initialized */
if (Can_GblCanStatus == CAN_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_MAIN_BUSOFF_SID, CAN_E_UNINIT);
}
else
#endif
{
/* Get the pointer to first Controller structure */
LpController = Can_GpFirstController;
/* Get the number of Controllers configured */
LucNoOfController = CAN_MAX_NUMBER_OF_CONTROLLER;
/* Loop for the number of Controllers configured */
do
{
/* Check whether polling method is configured or not */
if(((LpController->usIntEnable) & (CAN_ERR_INT_MASK)) == CAN_FALSE)
{
/* Get the pointer to 8-bit control register structure */
LpCntrlReg8bit = LpController->pCntrlReg8bit;
/* Get the pointer to 16-bit control register structure */
LpCntrlReg16bit = LpController->pCntrlReg16bit;
/* Check whether receive interrupt is enabled or not */
if(((LpCntrlReg16bit->usFcnCmisCtl) & (CAN_ERR_STS_MASK)) ==
CAN_ERR_STS_MASK)
{
/* Check whether BusOff flag is enabled or not */
if(((LpCntrlReg8bit->ucFcnCminStr) & (CAN_BUSOFF_STS)) ==
CAN_BUSOFF_STS)
{
/* MISRA Rule : 16.10
Message : Function returns a value which is not being
used.
Reason : Return value not used to achieve better
throughput.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Invoke Can_StopMode internal function to set to initialization
mode */
Can_StopMode(LpController);
/* Invoke CanIf_ControllerBusOff call-back function to give busoff
notification */
CanIf_ControllerBusOff(LpController->ucCntrlRegId);
}
}
}
/* Decrement the number of Controllers count configured */
LucNoOfController--;
/* MISRA Rule : 17.4
Message : Increment or decrement operation performed
on pointer(LpController).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to next Controller structure */
LpController++;
/* MISRA Rule : 13.7
Message : The result of this logical operation is always
'false'. The value of this 'do - while' control
expression is always 'false'. The loop will be
executed once.
Reason : The result of this logical operation is always
false since only one controller is configured.
However, when two or more controllers are
configured this warning ceases to exist.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
}while (LucNoOfController != CAN_ZERO);
}
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Can_MainFunction_Wakeup
**
** Service ID : 0x10
**
** Description : This service performs the polling of wake-up events
** that are configured statically as 'to be polled'.
**
** Sync/Async : None
**
** Re-entrancy : Non Re-entrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The CAN Driver must be initialized.
**
** Remarks : Global Variable(s) referred in this function:
** Can_GblCanStatus, Can_GpFirstController
**
** : Function(s) invoked:
** Det_ReportError(),Can_WakeupMode(),
** CanIf_SetWakeupEvent()
**
*******************************************************************************/
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void,CAN_AFCAN_PUBLIC_CODE) Can_MainFunction_Wakeup(void)
{
#if (CAN_WAKEUP_SUPPORT == STD_ON)
P2CONST(Can_ControllerConfigType,AUTOMATIC, CAN_AFCAN_PRIVATE_CONST)
LpController;
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC, CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit;
P2VAR(uint8, AUTOMATIC, CAN_AFCAN_PRIVATE_DATA) LpWakeuporEvent;
uint8_least LucNoOfController;
#endif
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Report to DET, if module is not initialized */
if (Can_GblCanStatus == CAN_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_MAIN_WAKEUP_SID, CAN_E_UNINIT);
}
else
#endif
{
#if (CAN_WAKEUP_SUPPORT == STD_ON)
/* Get the pointer to first Controller structure */
LpController = Can_GpFirstController;
/* Get the number of Controllers configured */
LucNoOfController = CAN_MAX_NUMBER_OF_CONTROLLER;
/* Loop for the number of Controllers configured */
do
{
/* Check whether polling method is configured or not */
if(((LpController->usIntEnable) & (CAN_WAKEUP_INT_MASK)) ==
CAN_FALSE)
{
/* Get the pointer to control register structure */
LpCntrlReg16bit = LpController->pCntrlReg16bit;
/* Check whether Wakeup interrupt is enabled or not */
if(((LpCntrlReg16bit->usFcnCmisCtl) & (CAN_WAKEUP_STS_MASK)) ==
CAN_WAKEUP_STS_MASK)
{
/* Get the pointer to the Wakeup status flag */
LpWakeuporEvent = (LpController->pWkpStsFlag);
/* MISRA Rule : 16.10
Message : Function returns a value which is not being used
Reason : Return value not used to achieve better throughput.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Invoke internal function to process wakeup */
Can_WakeupMode(LpController);
/* Store the wakeup event */
*LpWakeuporEvent = CAN_WAKEUP;
}
}
/* Decrement the number of Controllers count configured */
LucNoOfController--;
/* MISRA Rule : 17.4
Message : Increment or decrement operation performed
on pointer(LpController).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to next Controller structure */
LpController++;
/* MISRA Rule : 13.7
Message : The result of this logical operation is always
'false'. The value of this 'do - while' control
expression is always 'false'. The loop will be
executed once.
Reason : The result of this logical operation is always
false since only one controller is configured.
However, when two or more controllers are
configured this warning ceases to exist.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
}while (LucNoOfController != CAN_ZERO);
#endif /* #if (CAN_WAKEUP_SUPPORT == STD_ON) */
}
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Can_TxConfirmationProcessing
**
** Service ID : Not Applicable
**
** Description : This service notifies the upper layer about transmit
** confirmation.
**
** Sync/Async : None
**
** Re-entrancy : Re-entrant
**
** Input Parameters : LpCntrlReg, LssHthOffSetId
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The CAN Driver must be initialized.
**
** Remarks : Global Variable(s) referred in this function:
** Can_GpFirstHth
**
** : Function(s) invoked:
** CanIf_TxConfirmation()
**
*******************************************************************************/
#define CAN_AFCAN_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, CAN_AFCAN_PRIVATE_CODE) Can_TxConfirmationProcessing
(CONSTP2VAR(Tdd_Can_AFCan_16bit_CntrlReg, AUTOMATIC,
CAN_AFCAN_PRIVATE_CONST)LpCntrlReg16bit,sint16 LssHthOffSetId)
{
P2CONST(Tdd_Can_AFCan_Hth,AUTOMATIC,CAN_PRIVATE_CONST)LpHth;
/* MISRA Rule : 18.4
Message : An object of union type has been defined.
Reason : Data access of larger data types is used to achieve
better throughput.
Verification : However, part of the code is verified manually and
it is not having any impact.
*/
Tun_Can_AFCan_WordAccess LunWordAccess;
uint8 LucHth;
/* Get the value of TGPT Register */
LunWordAccess.usWord = (LpCntrlReg16bit->usFcnCmtgTx);
/* Loop for number of transmit messages */
do
{
/* Clear transmission interrupt bit of Interrupt Status register */
(LpCntrlReg16bit->usFcnCmisCtl) = (CAN_CLR_TX_INTERRUPT);
/* Clear transmit history overflow bit of TGPT register */
(LpCntrlReg16bit->usFcnCmtgTx) = (CAN_CLR_TOVF_BIT);
/* Get the corresponding Hth value from the message buffer */
LucHth = (uint8)
((sint16)LunWordAccess.Tst_ByteAccess.ucHighByte + LssHthOffSetId);
/* Get the pointer to Hth structure */
LpHth = &Can_GpFirstHth[LucHth];
/* Invoke CanIf_TxConfirmation call-back function to give transmit
confirmation*/
CanIf_TxConfirmation(*(LpHth->pCanTxPduId));
/* Get the value of TGPT Register */
LunWordAccess.usWord = (LpCntrlReg16bit->usFcnCmtgTx);
/* Check whether receive history list is empty */
} while(((LunWordAccess.Tst_ByteAccess.ucLowByte) & (CAN_THPM_BIT_STS)) !=
CAN_THPM_BIT_STS);
}
#define CAN_AFCAN_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Can_TxCancellationProcessing
**
** Service ID : Not Applicable
**
** Description : This service checks whether transmit cancellation is
** successful and notifies the upper layer about transmit
** cancellation. If cancellation fails and the message get
** transmitted, it will invoke Tx Confirmation notification
**
** Sync/Async : None
**
** Re-entrancy : Re-entrant
**
** Input Parameters : LpCntrlReg, LssHthOffSetId
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The CAN Driver must be initialized.
**
** Remarks : Global Variable(s) referred in this function:
** Can_GpFirstHth, Can_AFCan_GaaTxCancelStsFlgs[]
** Can_GaaTxCancelCtr[]
**
** : Function(s) invoked:
** CanIf_CancelTxConfirmation(), CanIf_TxConfirmation()
**
*******************************************************************************/
#if(CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
#define CAN_AFCAN_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, CAN_AFCAN_PRIVATE_CODE) Can_TxCancellationProcessing
(P2CONST(Can_ControllerConfigType,AUTOMATIC, CAN_AFCAN_PRIVATE_CONST)
LpController, boolean LblIntFlag)
{
P2CONST(Tdd_Can_AFCan_Hth,AUTOMATIC,CAN_PRIVATE_CONST)LpHth;
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC, CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit;
P2VAR(Tdd_Can_AFCan_8bit_MsgBuffer,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpMsgBuffer8bit;
P2VAR(Tdd_Can_AFCan_16bit_MsgBuffer,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpMsgBuffer16bit;
P2VAR(Can_PduType, AUTOMATIC, CAN_PRIVATE_DATA)LpPduInfoPtr;
P2VAR(uint8,AUTOMATIC, CAN_AFCAN_PRIVATE_DATA)LpCanSduPtr;
P2VAR(uint8,AUTOMATIC, CAN_AFCAN_PRIVATE_DATA)LpMsgDataBuffer;
Can_PduType LddPduInfo;
uint8 LaaCanSdu[CAN_EIGHT];
/* MISRA Rule : 18.4
Message : An object of union type has been defined.
(Tun_Can_CanId/Tun_Can_WordAccess)
Reason : Data access of larger data types is used to achieve
better throughput.
Verification : However, part of the code is verified manually and
it is not having any impact.
*/
Tun_Can_AFCan_CanId Lun_Can_CanId;
uint8_least LucCount;
uint8_least LucDlc;
uint8 LucArrPosition;
uint8 LucMask;
uint8 LucHth;
uint16 LusTempVal;
/* Get the array position for first BasicCAN Hth of this controller */
LucArrPosition = LpController->ucBasicCanHthOffset;
/* Initialize the BasicCAN Hth count of the controller to zero */
LucCount = CAN_ZERO;
/* Loop as many times as the number of BasicCAN Hth of the controller */
while(LucCount < (LpController->ucNoOfBasicCanHth))
{
/* Set value for masking the status of Tx cancel status flag of the Hth */
LucMask = (CAN_ONE << (LucArrPosition % CAN_EIGHT));
/* Check whether the status flag for Tx cancellation is set for the Hth */
if((Can_AFCan_GaaTxCancelStsFlgs[(LucArrPosition >> CAN_THREE)] & LucMask)
== LucMask)
{
/* Get the Hth Id from Basic Hth Array */
LucHth = Can_AFCan_GaaBasicCanHth[LucArrPosition];
/* Get the Hth */
LucHth -= Can_GucFirstHthId;
/* Get the pointer to the corresponding Hth structure */
LpHth = &Can_GpFirstHth[LucHth];
/* Get the pointer to 8-bit message buffer register */
LpMsgBuffer8bit = LpHth->pMsgBuffer8bit;
/* Get the pointer to 16-bit message buffer register */
LpMsgBuffer16bit = LpHth->pMsgBuffer16bit;
/* Get pointer to PduInfo */
LpPduInfoPtr = &LddPduInfo;
/* Get the pointer to 16-Bit control register structure */
LpCntrlReg16bit = LpController->pCntrlReg16bit;
/* Clear transmission interrupt bit of Interrupt Status register */
(LpCntrlReg16bit->usFcnCmisCtl) = (CAN_CLR_TXCANCEL_INTERRUPT);
/* Clear transmission interrupt bit of Interrupt Status register */
(LpCntrlReg16bit->usFcnCmisCtl) = (CAN_CLR_ERR_INTERRUPT);
/* Read FCNnMmCTL register */
LusTempVal = LpMsgBuffer16bit->usFcnMmCtl;
/* Check whether TRQ and TCP are cleared for Tx Cancellation */
if(((LusTempVal & CAN_TRQ_BIT_STS) != CAN_TRQ_BIT_STS)
&& ((LusTempVal & CAN_TCP_BIT_STS) != CAN_TCP_BIT_STS))
{
/* Check whether Multiplexed transmission is on or not */
#if (CAN_MULTIPLEX_TRANSMISSION == STD_ON)
/* Disable global interrupts */
SchM_Enter_Can(CAN_WRITE_PROTECTION_AREA);
/* Set the global flag to one to indicate access of hardware buffer */
*(LpHth->pHwAccessFlag) = CAN_TRUE;
/* Enable global interrupts */
SchM_Exit_Can(CAN_WRITE_PROTECTION_AREA);
#endif /* #if(CAN_MULTIPLEX_TRANSMISSION == STD_ON) */
#if (CAN_STANDARD_CANID == STD_OFF)
/* Check whether CAN-ID is of Extended Type */
if((LpMsgBuffer16bit->usFcnMmMid1h & CAN_MASK_IDE_BIT) ==
CAN_MASK_IDE_BIT)
{
/* Write 16-28 Id bits of message Id high register */
Lun_Can_CanId.Tst_CanId.usCanIdHigh =
(LpMsgBuffer16bit->usFcnMmMid1h);
/* Write 0-15 Id bits of message Id low register */
Lun_Can_CanId.Tst_CanId.usCanIdLow = (LpMsgBuffer16bit->usFcnMmMid0h);
}
else
{
/* Make higher word equal to zero */
Lun_Can_CanId.Tst_CanId.usCanIdHigh = CAN_ZERO;
/* Write 18-28 Id bits of message Id high register */
Lun_Can_CanId.Tst_CanId.usCanIdLow = (LpMsgBuffer16bit->usFcnMmMid1h)
>> (CAN_TWO);
}
#else
/* Write 18-28 Id bits of message Id high register */
Lun_Can_CanId.Tst_CanId.usCanIdLow = (LpMsgBuffer16bit->usFcnMmMid1h) >>
(CAN_TWO);
#endif
/* Copy CanId to PduInfoPtr */
LpPduInfoPtr->id = Lun_Can_CanId.ulCanId ;
/* Get the DLC length from the corresponding message buffer DLC
register*/
LucDlc = LpMsgBuffer8bit->ucFcnMmDtlgb;
/* Copy DLC to PduInfoPtr */
LpPduInfoPtr->length = (uint8)LucDlc;
/* Get the pointer to message data byte register */
LpMsgDataBuffer = LpMsgBuffer8bit->aaDataBuffer;
/* Get the start address of sdu pointer */
LpCanSduPtr = &LaaCanSdu[CAN_ZERO];
/* Loop until the DLC length is equal to zero to copy data */
while(LucDlc != CAN_ZERO)
{
/* Transfer the data from the corresponding message data byte
register */
*(LpCanSduPtr) = *(LpMsgDataBuffer);
/* MISRA Rule : 17.4
Message : Increment or decrement operation performed
on pointer(LpCanSduPtr).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the Sdu pointer */
LpCanSduPtr++;
/* MISRA Rule : 17.4
Message : Performing pointer arithmetic.
Reason : Increment operator not used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the Message data buffer pointer */
LpMsgDataBuffer += CAN_FOUR;
/* Decrement the DLC length */
LucDlc--;
}
/* Check whether Multiplexed transmission is on or not */
#if (CAN_MULTIPLEX_TRANSMISSION == STD_ON)
/* Disable global interrupts */
SchM_Enter_Can(CAN_WRITE_PROTECTION_AREA);
/* Set the global flag to one to indicate access of hardware buffer */
*(LpHth->pHwAccessFlag) = CAN_FALSE;
/* Enable global interrupts */
SchM_Exit_Can(CAN_WRITE_PROTECTION_AREA);
#endif /* #if(CAN_MULTIPLEX_TRANSMISSION == STD_ON) */
/* Copy sdu pointer to PduInfoPtr */
LpPduInfoPtr->sdu = LpCanSduPtr;
/* Copy swPduHandle to PduInfoPtr */
LpPduInfoPtr->swPduHandle = *(LpHth->pCanTxPduId);
/* Invoke CanIf_CancelTxConfirmation call-back function to give
transmit cancel confirmation*/
CanIf_CancelTxConfirmation(LpPduInfoPtr);
/* Clear global Tx Cancel Status flag of the BasicCAN Hth */
Can_AFCan_GaaTxCancelStsFlgs[(LucArrPosition >> CAN_THREE)] &=
(uint8) (~LucMask);
if(LblIntFlag == CAN_TRUE)
{
/* Clear global Tx Cancel flag */
Can_GblTxCancelIntFlg = CAN_FALSE;
}
else
{
/* Decrement global Tx Cancel counter of the controller */
Can_GaaTxCancelCtr[(LpHth->ucController)] -= CAN_ONE;
}
} /* End of if for TRQ and TCP flag check */
/* Check whether TRQ is cleared and TCP is set for Tx Confirmation */
else if(((LusTempVal & CAN_TRQ_BIT_STS) != CAN_TRQ_BIT_STS)
&& ((LusTempVal & CAN_TCP_BIT_STS) == CAN_TCP_BIT_STS))
{
/* Invoke CanIf_TxConfirmation call-back function to give transmit
confirmation*/
CanIf_TxConfirmation(*(LpHth->pCanTxPduId));
/* Clear global Tx Cancel Status flag of the BasicCAN Hth */
Can_AFCan_GaaTxCancelStsFlgs[(LucArrPosition >> CAN_THREE)] &=
(uint8) (~LucMask);
if(LblIntFlag == CAN_TRUE)
{
/* Clear global Tx Cancel flag */
Can_GblTxCancelIntFlg = CAN_FALSE;
}
else
{
/* Decrement global Tx Cancel counter of the controller */
Can_GaaTxCancelCtr[(LpHth->ucController)] -= CAN_ONE;
}
} /* End of else-if for TRQ and TCP flag check */
else
{
/* To avoid QAC Warning */
}
} /* if(Can_AFCan_GaaTxCancelStsFlgs) */
/* Increment the array position to point to next BasicCAN Hth of the
controller */
LucArrPosition++;
/* Increment BasicCAN Hth count of the controller */
LucCount++;
} /* while(LucCount < (LpController->ucNoOfBasicCanHth)) */
}
#define CAN_AFCAN_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#endif
/*******************************************************************************
** Function Name : Can_RxProcessing
**
** Service ID : Not Applicable
**
** Description : This service notifies the upper layer about receive
** indication.
**
** Sync/Async : None
**
** Re-entrancy : Re-entrant
**
** Input Parameters : LpCntrlReg, LucHrhOffSetId
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The CAN Driver must be initialized.
**
** Remarks : Global Variable(s) referred in this function:
** None
**
** : Function(s) invoked:
** CanIf_RxIndication()
**
*******************************************************************************/
#define CAN_AFCAN_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, CAN_AFCAN_PRIVATE_CODE) Can_RxProcessing
(P2CONST(Tdd_Can_AFCan_8bit_CntrlReg, AUTOMATIC, CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg8bit,
CONSTP2VAR(Tdd_Can_AFCan_16bit_CntrlReg, AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit,
uint8 LucHrhOffSetId)
{
P2CONST(Tdd_Can_AFCan_8bit_MsgBuffer,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpMsgBuffer8bit;
P2VAR(Tdd_Can_AFCan_16bit_MsgBuffer,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpMsgBuffer16bit;
P2CONST(Tdd_Can_AFCan_8bit_MsgBuffer,AUTOMATIC,
CAN_AFCAN_PRIVATE_CONST)LpFirstMsgBuffer8bit;
P2VAR(Tdd_Can_AFCan_16bit_MsgBuffer,AUTOMATIC,
CAN_AFCAN_PRIVATE_CONST)LpFirstMsgBuffer16bit;
P2VAR(uint8,AUTOMATIC, CAN_AFCAN_PRIVATE_DATA)LpCanSduPtr;
P2CONST(uint8,AUTOMATIC, CAN_AFCAN_PRIVATE_DATA)LpMsgDataBuffer;
uint8 LaaCanSdu[CAN_EIGHT];
/* MISRA Rule : 18.4
Message : An object of union type has been defined.
(Tun_Can_CanId/Tun_Can_WordAccess)
Reason : Data access of larger data types is used to achieve
better throughput.
Verification : However, part of the code is verified manually and
it is not having any impact.
*/
Tun_Can_AFCan_CanId Lun_Can_CanId;
Tun_Can_AFCan_WordAccess LunWordAccess;
uint8_least LucCounter;
uint8_least LucDlc;
uint8 LucHrh;
uint8 LucCanDlc;
/* Get the value of RGPT Register */
LunWordAccess.usWord = (LpCntrlReg16bit->usFcnCmrgRx);
/* Get the pointer to first 8-bit message buffer register */
LpFirstMsgBuffer8bit = LpCntrlReg8bit->ddMsgBuffer;
/* Get the pointer to first 16-bit message buffer register */
LpFirstMsgBuffer16bit = LpCntrlReg16bit->ddMsgBuffer;
/* Loop for number of receive messages */
do
{
/* Get the pointer to 8-bit message buffer registers */
LpMsgBuffer8bit =
&LpFirstMsgBuffer8bit[LunWordAccess.Tst_ByteAccess.ucHighByte];
/* Get the pointer to 16-bit message buffer registers */
LpMsgBuffer16bit =
&LpFirstMsgBuffer16bit[LunWordAccess.Tst_ByteAccess.ucHighByte];
/* Clear receive interrupt bit of Interrupt Status register */
(LpCntrlReg16bit->usFcnCmisCtl) = (CAN_CLR_RX_INTERRUPT);
/* Clear receive history list overflow bit of RGPT register */
(LpCntrlReg16bit->usFcnCmrgRx) = (CAN_CLR_ROVF_BIT);
/* Check whether DN bit is set or not */
if((LpMsgBuffer16bit->usFcnMmCtl & CAN_DN_MUC_BIT_STS) == CAN_DN_BIT_STS)
{
/* Set the Counter to two */
LucCounter = CAN_TWO;
do
{
/* Decrement the Counter */
LucCounter--;
/* Clear DN bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_CLR_DN_BIT;
#if (CAN_STANDARD_CANID == STD_OFF)
/* Check whether received CAN-ID is of Extended Type */
if((LpMsgBuffer16bit->usFcnMmMid1h & CAN_MASK_IDE_BIT) ==
CAN_MASK_IDE_BIT)
{
/* Read 16-28 Id bits of message Id high register */
Lun_Can_CanId.Tst_CanId.usCanIdHigh =
(LpMsgBuffer16bit->usFcnMmMid1h);
/* Read 0-15 Id bits of message Id low register */
Lun_Can_CanId.Tst_CanId.usCanIdLow = LpMsgBuffer16bit->usFcnMmMid0h;
}
else
{
/* Make higher word equal to zero */
Lun_Can_CanId.Tst_CanId.usCanIdHigh = CAN_ZERO;
/* Read 18-28 Id bits of message Id high register */
Lun_Can_CanId.Tst_CanId.usCanIdLow = (LpMsgBuffer16bit->usFcnMmMid1h)
>> (CAN_TWO);
}
#else
/* Read 18-28 Id bits of message Id high register */
Lun_Can_CanId.Tst_CanId.usCanIdLow = (LpMsgBuffer16bit->usFcnMmMid1h) >>
(CAN_TWO);
#endif
/* Get the DLC length from the corresponding message buffer DLC
register*/
LucCanDlc = LpMsgBuffer8bit->ucFcnMmDtlgb;
/* Get the local copy of DLC length */
LucDlc = LucCanDlc;
/* Get the pointer to message data byte register */
LpMsgDataBuffer = LpMsgBuffer8bit->aaDataBuffer;
/* Get the start address of sdu pointer */
LpCanSduPtr = &LaaCanSdu[CAN_ZERO];
/* Loop until the DLC length is equal to zero to copy data */
while(LucDlc != CAN_ZERO)
{
/* Transfer the data from the corresponding message data byte
register */
*(LpCanSduPtr) = *(LpMsgDataBuffer);
/* MISRA Rule : 17.4
Message : Increment or decrement operation performed
on pointer 'LpCanSduPtr'.
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/*Increment the Sdu pointer */
LpCanSduPtr++;
/* MISRA Rule : 17.4
Message : Performing pointer arithmetic
on pointer 'LpMsgDataBuffer'.
Reason : Pointer arithmetic is performed to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/*Increment the Message data buffer pointer */
LpMsgDataBuffer += CAN_FOUR;
/* Decrement the DLC length */
LucDlc--;
}
/* Check whether both DN and MUC bits are cleared or not */
if((LpMsgBuffer16bit->usFcnMmCtl & CAN_DN_MUC_BIT_STS) == CAN_ZERO)
{
/* Get the corresponding Hrh value from the message buffer */
LucHrh= LunWordAccess.Tst_ByteAccess.ucHighByte + LucHrhOffSetId;
#if (CAN_STANDARD_CANID == STD_OFF)
/* Invoke CanIf_RxIndication call-back function to give receive
indication */
CanIf_RxIndication(LucHrh, Lun_Can_CanId.ulCanId, LucCanDlc,
(P2CONST(uint8, AUTOMATIC, CAN_PRIVATE_CONST))&LaaCanSdu[CAN_ZERO]);
#else
/* Invoke CanIf_RxIndication call-back function to give receive
indication */
CanIf_RxIndication(LucHrh, Lun_Can_CanId.Tst_CanId.usCanIdLow,
LucCanDlc,
(P2CONST(uint8, AUTOMATIC, CAN_PRIVATE_CONST))&LaaCanSdu[CAN_ZERO]);
#endif
/* Set the Counter to zero to break the loop */
LucCounter = CAN_ZERO;
} /* if((LpMsgBuffer16bit->usFcnMmCtl & CAN_DN_MUC_BIT_STS) ==
CAN_ZERO) */
}while (LucCounter != CAN_ZERO);
} /* if((LpMsgBuffer16bit->usFcnMmCtl & CAN_DN_MUC_BIT_STS) ==
CAN_DN_BIT_STS)*/
/* Read the value of RGPT Register */
LunWordAccess.usWord = (LpCntrlReg16bit->usFcnCmrgRx);
/* Check whether receive history list is empty */
}while(((LunWordAccess.Tst_ByteAccess.ucLowByte) & (CAN_RHPM_BIT_STS)) !=
CAN_RHPM_BIT_STS);
}
#define CAN_AFCAN_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/NvM/NvM_JobProc.c
/**
\addtogroup MODULE_NvM NvM
Non-volatile Memory Management Module.
*/
/*@{*/
/***************************************************************************//**
\file NvM_JobProc.c
\brief Query queue and implement job
\author Lvsf
\version 1.0
\date 2012-3-15
\warning Copyright (C), 2012, PATAC.
*//*----------------------------------------------------------------------------
\history
<No.> <author> <time> <version> <description>
1 Lvsf 2012-3-15 1.0 Create
*******************************************************************************/
/*******************************************************************************
Include Files
*******************************************************************************/
#include "NvM_JobProc.h"
/*******************************************************************************
Macro Definition
*******************************************************************************/
/*******************************************************************************
Type Definition
*******************************************************************************/
/*******************************************************************************
Prototype Declaration
*******************************************************************************/
/*******************************************************************************
Variable Definition
*******************************************************************************/
/**
\var NvM_BlockInfo_t NvM_CurrentBlockInfo
Current block information.
*/
NvM_BlockInfo_t NvM_CurrentBlockInfo;
/**
\var NvM_State_t NvM_TaskState
State of job process.
*/
NvM_State_t NvM_TaskState;
/*******************************************************************************
Function Definition
*******************************************************************************/
/***************************************************************************//**
\fn void NvM_JobProcInit()
\author Lvsf
\date 2012-3-22
\brief Init Job process.
*******************************************************************************/
void NvM_JobProcInit(void)
{
NvM_TaskState = NVM_STATE_IDLE;
}
/***************************************************************************//**
\fn void NvM_Fsm(void)
\author Lvsf
\date 2012-3-22
\brief Query a Job from Queue and implement the Job.
*******************************************************************************/
void NvM_Fsm(void)
{
RamBlock_t* RamAddrPtr;
if(NVM_STATE_IDLE == NvM_TaskState)
{
if (NVM_REQ_PENDING != NvM_CurrentBlockInfo.BlockState)
{
if(NvM_GetJob(&RamAddrPtr))
{
uint16 BlockId = RamAddrPtr->BlockId;
NvM_CurrentBlockInfo.BlockId = NvM_BlockMngmtArea[BlockId].BlockId;
NvM_CurrentBlockInfo.ServiceId = NvM_BlockMngmtArea[BlockId].ServiceId;
NvM_CurrentBlockInfo.BlockRamPtr = NvM_BlockMngmtArea[BlockId].RamBlockDataAddr;
NvM_CurrentBlockInfo.BlockOffset = NvM_BlockMngmtArea[BlockId].BlockOffset;
NvM_CurrentBlockInfo.BlockState = NVM_REQ_PENDING;
NvM_CurrentBlockInfo.Length = NvM_BlockMngmtArea[BlockId].Length;
NvM_CurrentBlockInfo.DeviceId = NvM_BlockMngmtArea[BlockId].DeviceId;
NvM_CurrentBlockInfo.LastResult = NVM_REQ_PENDING;
NvM_FsmAction();
}
else
{
if((NvM_RWC_Flags & NVM_APIFLAG_READ_ALL_SET)
||(NvM_RWC_Flags & NVM_APIFLAG_WRITE_ALL_SET))
{
NvM_FsmAction();
}
else
{
}
}
}
else
{
}
}
else
{
}
}
/***************************************************************************//**
\fn void NvM_FsmAction(void)
\author Lvsf
\date 2012-3-22
\brief Implement a job
*******************************************************************************/
void NvM_FsmAction(void)
{
NvM_BlockInfo_t* CurrBlk = &NvM_CurrentBlockInfo;
switch(CurrBlk->ServiceId)
{
case NVM_READ_BLOCK:
NvM_TaskState = NVM_STATE_READ;
NvM_BlockMngmtArea[CurrBlk->BlockId].NvRamErrorStatus
= NVM_REQ_PENDING;
MemIf_Read(CurrBlk->DeviceId,
CurrBlk->BlockId,
CurrBlk->BlockOffset,
CurrBlk->BlockRamPtr,
CurrBlk->Length);
break;
case NVM_WRITE_BLOCK:
NvM_TaskState = NVM_STATE_WRITE;
NvM_BlockMngmtArea[CurrBlk->BlockId].NvRamErrorStatus
= NVM_REQ_PENDING;
MemIf_Write(CurrBlk->DeviceId,
CurrBlk->BlockId,
CurrBlk->BlockRamPtr);
break;
case NVM_ERASE_BLOCK:
NvM_TaskState = NVM_STATE_ERASE;
NvM_BlockMngmtArea[CurrBlk->BlockId].NvRamErrorStatus
= NVM_REQ_PENDING;
MemIf_EraseImmediateBlock(CurrBlk->DeviceId,
CurrBlk->BlockId);
break;
case NVM_INVALIDATE_NV_BLOCK:
NvM_TaskState = NVM_STATE_ERASE;
NvM_BlockMngmtArea[CurrBlk->BlockId].NvRamErrorStatus
= NVM_REQ_PENDING;
MemIf_InvalidateBlock(CurrBlk->DeviceId,
CurrBlk->BlockId);
break;
case NVM_READ_ALL:
NvM_TaskState = NVM_STATE_READALL;
CurrBlk->BlockId++;
NvM_BlockMngmtArea[CurrBlk->BlockId].NvRamErrorStatus
= NVM_REQ_PENDING;
MemIf_Read(NvM_BlockMngmtArea[CurrBlk->BlockId].DeviceId,
NvM_BlockMngmtArea[CurrBlk->BlockId].BlockId,
NvM_BlockMngmtArea[CurrBlk->BlockId].BlockOffset,
NvM_BlockMngmtArea[CurrBlk->BlockId].RamBlockDataAddr,
NvM_BlockMngmtArea[CurrBlk->BlockId].Length);
break;
case NVM_WRITE_ALL:
NvM_TaskState = NVM_STATE_WRITEALL;
CurrBlk->BlockId++;
NvM_BlockMngmtArea[CurrBlk->BlockId].NvRamErrorStatus
= NVM_REQ_PENDING;
if(NvM_RWC_Flags & NVM_APIFLAG_CANCEL_WR_ALL_SET )
{
MemIf_Cancel(CurrBlk->DeviceId);
}
else
{
MemIf_Write(NvM_BlockMngmtArea[CurrBlk->BlockId].DeviceId,
NvM_BlockMngmtArea[CurrBlk->BlockId].BlockId,
NvM_BlockMngmtArea[CurrBlk->BlockId].RamBlockDataAddr);
}
break;
default:
break;
}
}
/*@}*/
<file_sep>/BSP/IoHwAb/IoHwAb_Swtich_Cal.C
/*****************************************************************************
| File Name: Switch_Cal.c
|
| Description: cal variables for Swtich
|
|-----------------------------------------------------------------------------
| PATAC Confidential
|-----------------------------------------------------------------------------
|
| This software is copyright is proprietary of
| Pan Asia Technical Automotive Company(PATAC).
| All rights are reserved by PATAC.
|
|-----------------------------------------------------------------------------
| A U T H O R I D E N T I T Y
|-----------------------------------------------------------------------------
| Initials Name Company
| -------- -------------------- ---------------------------------------
| Wanrong PATAC
|
|-----------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|-----------------------------------------------------------------------------
| Date Version Author Description
| ---------- -------- ------ ----------------------------------------------
| 2009-9-16 01.00.00 Wanrong Creation
|2011-08-10 02.00.00 wanghui Revised for Clea+, autosar MCAL
|****************************************************************************/
/******************************************************************************
* Inclusion of Common Typedef Names and Libraries
*****************************************************************************/
/******************************************************************************
* Inclusion of Other Header Files
*****************************************************************************/
//#include "Std_Types.h"
#include "IoHwAb_Switch.h"
#include "pn_event_queue.h"
#include "wip_rte_types.h"
#include "swc_rte_types.h"
/*******************************************************************************
| Macro Definition
|******************************************************************************/
#define SetSW_Enable(x) ((x)<<0)
#define SetSW_PrsIsHigh(x) ((x)<<1)
#define SetSW_Momentary(x) ((x)<<2)
#define SetSW_InactvBfrUse(x) ((x)<<3)
#define SetSW_DeftVal(x) ((x)<<4)
#define SetSW_UseKam(x) ((x) <<5)
#define SetSW_WkupTyp(x) ((x)<<6)
/*Calibrate battery voltage
|x - battery voltage, range 0~25.5f
*/
#define CalSW_BatVolt(x) ((x)*10)
/******************************************************************************
* Typedef Name Declarations, Object-Like Macros, and Function Declarations
*****************************************************************************/
/*get ADC raw value by physical voltage
* INPUT: x - volate, i.e. 5.0 (5.0 V)
*/
#define GetADSW_w_RawByVolt(x) (uint16)((x) * ADC_CONF_RES/ADC_CONF_VRH)
/*get ADC cooked value by physical voltage
* INPUT: x - volate, i.e. 5.0 (5.0 V)
*/
#define GetADSW_w_CookByVolt(x) (x * 100) //cook value is physical value multi 100
/*convert debouce time from ms to time counter for software query
* INPUT: x - time, i.e. 100 (100ms)
*/
#define GetADSW_w_CntByTime(x) ((x)/ADC_CONF_TASKTIME)
#define GetDGSW_w_CntByTime(x) ((x)/SWCFG_DIGITAL_TASKSLICE)
#define VaADSW_RawInput
/******************************************************************************
*
* Global Variables Definition
*****************************************************************************/
#define CAL_START_CAL1_SECT
#include "MemMap.h"
const TeSW_CmmnSwInfo KaSW_h_CmmnSwInfo[SWID_NUM] =
{
/*SWID_IDL0*/
{
SW_CHANNEL_TYPE_SPI,
7,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_FtpFlt_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL1*/
{
SW_CHANNEL_TYPE_SPI,
6,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_ManualParklampFlt_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL2*/
{
SW_CHANNEL_TYPE_SPI,
5,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_HazardFlt_Chg,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL3*/
{
SW_CHANNEL_TYPE_SPI,
4,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_DefeatCtrl_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL4*/
{
SW_CHANNEL_TYPE_SPI,
3,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_CtsyLmpUser_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL5*/
{
SW_CHANNEL_TYPE_SPI,
2,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_DrvCrtsySwUnlockFlt_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL6*/
{
SW_CHANNEL_TYPE_SPI,
1,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_DrvCrtsySwLockFlt_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL7*/
{
SW_CHANNEL_TYPE_SPI,
0,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID ,
Evt_RearClsr_JstOpn,//Evt_Trunk_JstOpn,
Evt_RearClsr_JstClsd//Evt_Trunk_JstClsd
},
/*SWID_IDL8*/
{
SW_CHANNEL_TYPE_SPI,
15,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_ExtRcRelSwFlt_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL9*/
{
SW_CHANNEL_TYPE_SPI,
14,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID,
Evt_DrvKeyCylLockFlt_Chg,
Evt_DrvKeyCylUnlockFlt_Chg
},
/*SWID_IDL10*/
{
SW_CHANNEL_TYPE_SPI,
13,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_IntRcRelSwFlt_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL11*/
{
SW_CHANNEL_TYPE_SPI,
12,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE)+
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_FTHiMdFlt_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL12*/
{
SW_CHANNEL_TYPE_SPI,
11,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_ManualHeadlampFlt_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL13*/
{
SW_CHANNEL_TYPE_SPI,
10,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_HornPadFlt_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL14*/
{
SW_CHANNEL_TYPE_SPI,
9,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID,//Evt_RfaLock_Req ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL15*/
{
SW_CHANNEL_TYPE_SPI,
8,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL16*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel0_0,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_CtdGlassBrkFlt_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL17*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel2_2,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL18*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel0_15,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_NgtPnlSw_Chg,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL19*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel0_2,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL20*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel1_6,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID ,
INVALID_EVENT_ID ,//Evt_DoorDrv_JstOpn,
INVALID_EVENT_ID ,//Evt_DoorDrv_JstClsd
},
/*SWID_IDL21*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel10_15,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID ,
INVALID_EVENT_ID ,//Evt_DoorPas_JstOpn,
INVALID_EVENT_ID ,//Evt_DoorPas_JstClsd
},
/*SWID_IDL22*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel1_5,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID ,
INVALID_EVENT_ID ,//Evt_DoorLR_JstOpn,
INVALID_EVENT_ID ,//Evt_DoorLR_JstClsd
},
/*SWID_IDL23*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel1_13,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID ,
INVALID_EVENT_ID ,//Evt_DoorRR_JstOpn,
INVALID_EVENT_ID ,//Evt_DoorRR_JstClsd
},
/*SWID_IDL24*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel4_3,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_HornErevPfafRsp_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL25*/
{
SW_CHANNEL_TYPE_SPI,
23,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_BeamSelectFlt_Chg,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL26*/
{
SW_CHANNEL_TYPE_SPI,
22,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_ManualOffFlt_Chg,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL27*/
{
SW_CHANNEL_TYPE_SPI,
21,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_TurnLeftFlt_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL28*/
{
SW_CHANNEL_TYPE_SPI,
20,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_TurnRightFlt_Chg,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL29*/
{
SW_CHANNEL_TYPE_SPI,
19,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_FoglampFrontFlt_Chg,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL30*/
{
SW_CHANNEL_TYPE_SPI,
18,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_FoglampRearFlt_Chg,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL31*/
{
SW_CHANNEL_TYPE_SPI,
17,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_WndShieldWashFlt_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL32*/
{
SW_CHANNEL_TYPE_SPI,
16,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_PrkSwData_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL33*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel0_14,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_FtParkedFlt_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL34*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel3_0,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_ECSLSwitchFlt_Chg,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL35*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel3_1,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_ValetModeAvail_Chg,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL36*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel3_3,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_EcslLockStatusRRFlt_Chg,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL37*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel3_4,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_EcslLockStatusLRFlt_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL38*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel11_0,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_CtdScmSignalFlt_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL39*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel11_1,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL40*/
{
SW_CHANNEL_TYPE_SPI,
31,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_TurnLFOutageFlt_Chg,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL41*/
{
SW_CHANNEL_TYPE_SPI,
30,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_TurnRFOutageFlt_Chg,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL42*/
{
SW_CHANNEL_TYPE_SPI,
29,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_TurnLROutageFlt_Chg,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL43*/
{
SW_CHANNEL_TYPE_SPI,
28,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_TurnRROutageFlt_Chg,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL44*/
{
SW_CHANNEL_TYPE_SPI,
27,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL45*/
{
SW_CHANNEL_TYPE_SPI,
26,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL46*/
{
SW_CHANNEL_TYPE_SPI,
25,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDL47*/
{
SW_CHANNEL_TYPE_SPI,
24,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(FALSE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDH0*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel0_4,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(TRUE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDH1*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel0_3,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(TRUE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDH2*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel3_8,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(TRUE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
Evt_UserSelLampsLoadFlt_Chg ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_IDH3*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel0_12,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(TRUE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID ,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
#if 0
/*RUN*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel0_12,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(TRUE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*CRANK*/
{
SW_CHANNEL_TYPE_DIO,
DioChannel0_13,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(TRUE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*tap up*/
{
SW_CHANNEL_TYPE_ADC,
DioChannel0_13,
CalSW_BatVolt(6), /*battery range lower limit*/
CalSW_BatVolt(25.5), /*battery range upper limit*/
CeSW_FA_UseHstry, /*battery out of range action*/
GetADSW_w_CntByTime(60000), //e_w_StckTim, ms
GetADSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(TRUE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*5 - tap down*/
{
SW_CHANNEL_TYPE_ADC,
DioChannel0_13,
GetADSW_w_CntByTime(60000), //e_w_StckTim, ms
GetADSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(TRUE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_TAPONOFF*/
{
SW_CHANNEL_TYPE_ADC,
DioChannel0_13,
GetADSW_w_CntByTime(0), //e_w_StckTim, ms
GetADSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
SetSW_Enable(TRUE) +
SetSW_PrsIsHigh(TRUE) +
SetSW_Momentary(FALSE) +
SetSW_InactvBfrUse(FALSE) +
SetSW_DeftVal(FALSE) +
SetSW_UseKam(FALSE) +
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup),
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*KEYINIGN*/
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(TRUE)
SetSW_WkupTyp(CeSW_u_WkupTypBiEdge)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*chime*/
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/* AC REQ*/
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*Wiper park*/
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_WiperLowFB*/
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_WiperHighFB*/
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*Washer*/
{
GetDGSW_w_CntByTime(120000), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(20), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_RDFG*/
{
GetDGSW_w_CntByTime(30000), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
TRUE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_hazard */
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(TRUE)
SetSW_WkupTyp(CeSW_u_WkupTypBiEdge)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_LeftTurnLampRtn*/
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_RifhtTurnLampRtn*/
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(20), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/* front fog lamp sw */
{
GetDGSW_w_CntByTime(30000), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/* rear fog lamp sw */
{
GetDGSW_w_CntByTime(30000), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
TRUE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/* park lamp sw */
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(TRUE)
SetSW_WkupTyp(CeSW_u_WkupTypBiEdge)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/* low beam sw */
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(TRUE)
SetSW_WkupTyp(CeSW_u_WkupTypBiEdge)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/* High beam sw */
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(TRUE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/* flash to pass switch*/
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(TRUE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_LFDOOR_AJAR*/
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(TRUE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/* ALL door ajar sw */
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(TRUE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/* brake pedal sw */
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(15), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/* SDM crash signal */
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(TRUE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/* driver door key unlock */
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
TRUE * (1<<1) + //e_b_InactvBfrUse, BCM must see unlock action to unlock door
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(TRUE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*Driver door key Lock */
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(50), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
TRUE * (1<<1) + //e_b_InactvBfrUse, BCM must see lock action to lock door
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(TRUE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/* trunk unlock switch */
{
GetDGSW_w_CntByTime(30000), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(50), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
TRUE * (1<<1) + //e_b_InactvBfrUse, BCM must see unlock action to unlock trunk
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(TRUE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/* Trunk Ajar */
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(50), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(TRUE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*key in drv door cylinder - tamper switch */
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(25), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(TRUE)
SetSW_WkupTyp(CeSW_u_WkupTypBiEdge)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_RearClrKeyCylFilt*/
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(TRUE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_ParkBrake*/
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*Brake Fluid */
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(100), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_MTReverse*/
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(15), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_TurnLampLeft*/
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(60), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(TRUE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*SWID_TurnLampRight*/
{
GetDGSW_w_CntByTime(0), //e_w_StckTim, ms
GetDGSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(60), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(TRUE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*------------------AD Switches--------------------
|Note!! the task slice may be different between digital switch and analog switch.
|Use GetADSW_w_CntByTime() to config time requirements.
*/
/*6 - cruise on*/
{
GetADSW_w_CntByTime(0), //e_w_StckTim, ms
GetADSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*7 - cruise set*/
{
GetADSW_w_CntByTime(0), //e_w_StckTim, ms
GetADSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
TRUE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*cruise resume*/
{
GetADSW_w_CntByTime(0), //e_w_StckTim, ms
GetADSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
TRUE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*cruise cancel*/
{
GetADSW_w_CntByTime(0), //e_w_StckTim, ms
GetADSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*wiper 1*/
{
GetADSW_w_CntByTime(0), //e_w_StckTim, ms
GetADSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*wiper 2*/
{
GetADSW_w_CntByTime(0), //e_w_StckTim, ms
GetADSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*wiper 3*/
{
GetADSW_w_CntByTime(0), //e_w_StckTim, ms
GetADSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*wiper 4*/
{
GetADSW_w_CntByTime(0), //e_w_StckTim, ms
GetADSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*wiper 5*/
{
GetADSW_w_CntByTime(0), //e_w_StckTim, ms
GetADSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*wiper 6*/
{
GetADSW_w_CntByTime(0), //e_w_StckTim, ms
GetADSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
},
/*wiper 7*/
{
GetADSW_w_CntByTime(0), //e_w_StckTim, ms
GetADSW_w_CntByTime(0), //e_w_MaxPrsdTim, ms
GetDGSW_w_CntByTime(30), /*e_u_DbcTim, ms*/
{
FALSE * (1<<0) + //e_b_Momentary
FALSE * (1<<1) + //e_b_InactvBfrUse
FALSE * (1<<2) + //e_b_DftVal
SetSW_UseKam(FALSE)
SetSW_WkupTyp(CeSW_u_WkupTypNoWkup)
},
INVALID_EVENT_ID,
INVALID_EVENT_ID,
INVALID_EVENT_ID
}
#endif
};
/**************************************************************
** Analog Switch IDs Configuration **
**************************************************************/
#define CRUISE_ON_ACTIVE 0x01 /*---define region---*/
#define CRUISE_SET_ACTIVE 0x02
#define CRUISE_RES_ACTIVE 0x04
#define CRUISE_CANCEL_ACTIVE 0x08
/* Wiper switches*/
const uint8 KaSW_u_WiperAllSwId[] =
{
SWID_WIPER_1,
SWID_WIPER_2,
SWID_WIPER_3,
SWID_WIPER_4,
SWID_WIPER_5,
SWID_WIPER_6,
SWID_WIPER_7
};
#define SWID_WIPER_OFF 0x00
#define SWID_WIPER_1_ACTIVE 0x01
#define SWID_WIPER_2_ACTIVE 0x02
#define SWID_WIPER_3_ACTIVE 0x04
#define SWID_WIPER_4_ACTIVE 0x08
#define SWID_WIPER_5_ACTIVE 0x10
#define SWID_WIPER_6_ACTIVE 0x20
#define SWID_WIPER_7_ACTIVE 0x40
/**************************************************************
** Analog Switch voltage mapping Configuration **
**************************************************************/
/***************************************************************************************/
/*Front Wiper Switch AD range define*/
/***************************************************************************************/
#define WIPER_RNG_SIZE 8
uint16 VaSW_w_WiperRngDiagTimer[WIPER_RNG_SIZE];
TeSW_AdDiagStat VaSW_h_WiperRngDiagStat[WIPER_RNG_SIZE];
//const uint16 KaADSW_u_WIPEvtList[] = /*---List---*/
//{
// Evt_FrtWipCtrlDbncISIG_Chg,
// Evt_FrtWipCtrlDbncISIG_Chg,
// Evt_FrtWipCtrlDbncISIG_Chg,
// Evt_FrtWipCtrlDbncISIG_Chg,
// Evt_FrtWipCtrlDbncISIG_Chg,
// Evt_FrtWipCtrlDbncISIG_Chg,
// Evt_FrtWipCtrlDbncISIG_Chg,
// Evt_FrtWipCtrlDbncISIG_Chg,
// Evt_FrtWipCtrlDbncISIG_Chg,
// Evt_FrtWipCtrlDbncISIG_Chg
//};
/*****************************************************************
*Clea+ Front Wiper, input @ 12VDC
* min max
*7 2.66 2.92 low speed
*6 2.02 2.29
*5 1.67 1.92
*4 1.39 1.62
*3 1.20 1.41
*2 1.20 1.41
*1 1.20 1.41 high speed
*
******************************************************************/
const TeSW_AdRngCal KaSW_h_WiperRngInfo[WIPER_RNG_SIZE] =
{
/*Wiper 1 "0.88"*/
{
GetADSW_w_RawByVolt(0.60f) , /*uint16 wAD_Range_Low 0.17f*/
GetADSW_w_RawByVolt(1.10f) , /*uint16 wAD_Range_High 0.4f*/
0,
CeWIP_e_FrtWipLow, /* CeWIP_e_FtLowSpeed */
CeIoHwAb_e_AdRangeNormal
},
/*Wiper 2 "1.65"*/
{
GetADSW_w_RawByVolt(1.11f) , /*uint16 wAD_Range_Low 0.45f*/
GetADSW_w_RawByVolt(1.90f) , /*uint16 wAD_Range_High 0.69f*/
0,
CeWIP_e_FrtWipInt5, /* CeWIP_e_Intermittent1 */
CeIoHwAb_e_AdRangeNormal
},
/*Wiper 3 "2.30"*/
{
GetADSW_w_RawByVolt(1.91f) , /*uint16 wAD_Range_Low 0.70f*/
GetADSW_w_RawByVolt(2.60f) , /*uint16 wAD_Range_High 0.95f*/
0,
CeWIP_e_FrtWipInt4, /* Intermittent 2 */
CeIoHwAb_e_AdRangeNormal
},
/*Wiper 4 "2.85"*/
{
GetADSW_w_RawByVolt(2.61f) , /*uint16 wAD_Range_Low 0.96f*/
GetADSW_w_RawByVolt(3.00f) , /*uint16 wAD_Range_High 1.25f*/
0,
CeWIP_e_FrtWipInt3, /* Intermittent 3 */
CeIoHwAb_e_AdRangeNormal
},
/*Wiper 5 "3.25"*/
{
GetADSW_w_RawByVolt(3.01f) , /*uint16 wAD_Range_Low 1.26f*/
GetADSW_w_RawByVolt(3.50f) , /*uint16 wAD_Range_High 1.60f*/
0,
CeWIP_e_FrtWipInt2, /* Intermittent 4 */
CeIoHwAb_e_AdRangeNormal
},
/*Wiper 6 "3.68"*/
{
GetADSW_w_RawByVolt(3.51f) , /*uint16 wAD_Range_Low 1.26f*/
GetADSW_w_RawByVolt(4.00f) , /*uint16 wAD_Range_High 1.60f*/
0,
CeWIP_e_FrtWipInt1, /* Intermittent 5 */
CeIoHwAb_e_AdRangeNormal
},
/*Wiper 7 "5.0"*/
{
GetADSW_w_RawByVolt(4.00f) , /*uint16 wAD_Range_Low 1.26f*/
GetADSW_w_RawByVolt(5.00f) , /*uint16 wAD_Range_High 1.60f*/
0,
CeWIP_e_FrtWipOff, /* CeWIP_e_FtWipersOff */
CeIoHwAb_e_AdRangeNormal
},
/*Wiper 8*/
{
GetADSW_w_RawByVolt(5.01f) , /*uint16 wAD_Range_Low 1.26f*/
GetADSW_w_RawByVolt(12.00f) , /*uint16 wAD_Range_High 1.60f*/
0,
CeWIP_e_FrtWipFault, /* CeWIP_e_FtWiperSwFault */
CeIoHwAb_e_AdRangeNormal
}
};
/***************************************************************************************/
/*Rear Wiper Switch AD range define*/
/***************************************************************************************/
#define REAR_WIPER_RNG_SIZE 4
uint16 VaSW_w_RearWiperRngDiagTimer[REAR_WIPER_RNG_SIZE];
TeSW_AdDiagStat VaSW_h_RearWiperRngDiagStat[REAR_WIPER_RNG_SIZE];
//const uint16 KaADSW_u_RearWIPEvtList[] = /*---List---*/
//{
// Evt_RrWipCtrlDbncISIG_Chg,
// Evt_RrWipCtrlDbncISIG_Chg,
// Evt_RrWipCtrlDbncISIG_Chg,
// Evt_RrWipCtrlDbncISIG_Chg
//};
/*****************************************************************
*Clea+ Rear Wiper, input @ 12VDC
* min max
*4 1.39 1.62
*3 1.20 1.41
*2 1.20 1.41
*1 1.20 1.41
*
******************************************************************/
const TeSW_AdRngCal KaSW_h_RearWiperRngInfo[REAR_WIPER_RNG_SIZE] =
{
/*Wiper 1 "2.88"*/
{
GetADSW_w_RawByVolt(2.50f) , /*uint16 wAD_Range_Low 0.17f*/
GetADSW_w_RawByVolt(3.30f) , /*uint16 wAD_Range_High 0.4f*/
0,
CeWIP_e_RrWipLow, /* CeWIP_e_RrWipInt */
CeIoHwAb_e_AdRangeNormal
},
/*Wiper 2 "3.75"*/
{
GetADSW_w_RawByVolt(3.31f) , /*uint16 wAD_Range_Low 0.45f*/
GetADSW_w_RawByVolt(3.90f) , /*uint16 wAD_Range_High 0.69f*/
0,
CeWIP_e_RrWipInt, /* CeWIP_e_RrWiplow */
CeIoHwAb_e_AdRangeNormal
},
/*Wiper 3 "4.18"*/
{
GetADSW_w_RawByVolt(3.91f) , /*uint16 wAD_Range_Low 0.70f*/
GetADSW_w_RawByVolt(4.30f) , /*uint16 wAD_Range_High 0.95f*/
0,
CeWIP_e_RrWshOn, /* CeWIP_e_RrWshOn */
CeIoHwAb_e_AdRangeNormal
},
/*Wiper 4 "4.44"*/
{
GetADSW_w_RawByVolt(4.31f) , /*uint16 wAD_Range_Low 0.96f*/
GetADSW_w_RawByVolt(5.00f) , /*uint16 wAD_Range_High 1.25f*/
0,
CeWIP_e_RrWshWipOff, /* CeWIP_e_RrWshWipOff */
CeIoHwAb_e_AdRangeNormal
}
};
/***************************************************************************************/
/*Steering Wheel Control Switch 1 AD range define*/
/***************************************************************************************/
#define STE1_RNG_SIZE 8 /*Steering range number*/
const TeSW_AdRngCal KaSW_h_Ste1Rng[STE1_RNG_SIZE] =
{
{
GetADSW_w_RawByVolt(0) ,
GetADSW_w_RawByVolt(0.1f),
0,
CeSWC_e_SwtFltNoActtn,
CeIoHwAb_e_AdRangeNormal
},
{
GetADSW_w_RawByVolt(0.1f) ,
GetADSW_w_RawByVolt(0.5f),
0,
CeSWC_e_SwtFltFct1,
CeIoHwAb_e_AdRangeNormal
},
{
GetADSW_w_RawByVolt(0.1f) ,
GetADSW_w_RawByVolt(0.5f),
0,
CeSWC_e_SwtFltFct2,
CeIoHwAb_e_AdRangeNormal
},
{
GetADSW_w_RawByVolt(0.5f) ,
GetADSW_w_RawByVolt(1.8f),
0,
CeSWC_e_SwtFltFct3,
CeIoHwAb_e_AdRangeNormal
},
{
GetADSW_w_RawByVolt(1.8f) ,
GetADSW_w_RawByVolt(2.2f),
0,
CeSWC_e_SwtFltFct4,
CeIoHwAb_e_AdRangeNormal
},
{
GetADSW_w_RawByVolt(2.2f) ,
GetADSW_w_RawByVolt(2.8f),
0,
CeSWC_e_SwtFltFct5,
CeIoHwAb_e_AdRangeNormal
},
{
GetADSW_w_RawByVolt(2.8f) ,
GetADSW_w_RawByVolt(3.8f),
0,
CeSWC_e_SwtFltFct6,
CeIoHwAb_e_AdRangeNormal
},
{
GetADSW_w_RawByVolt(3.8f) ,
GetADSW_w_RawByVolt(4.8f),
0,
CeSWC_e_SwtFltFct7,
CeIoHwAb_e_AdRangeNormal
}
};
/***************************************************************************************/
/*Steering Wheel Control Switch 2 AD range define*/
/***************************************************************************************/
#define STE2_RNG_SIZE 9 //leiyong /*Steering range number*/
const TeSW_AdRngCal KaSW_h_Ste2Rng[STE2_RNG_SIZE] =
{
{
GetADSW_w_RawByVolt(0.400f) ,/*2.002f*/ /*1.972f*///0.668
GetADSW_w_RawByVolt(0.730f),/*2.18f*/ /*2.172f*/
0,
CeSWC_e_SwtFltFct1,
CeIoHwAb_e_AdRangeNormal
},
{
GetADSW_w_RawByVolt(0.75) ,/*2.281f*//*2.251f*///0.811
GetADSW_w_RawByVolt(0.85),/*2.476f*//*2.451f*/
0,
CeSWC_e_SwtFltFct2,
CeIoHwAb_e_AdRangeNormal
},
{
GetADSW_w_RawByVolt(0.88f) ,/*2.586f*/ /*2.548f*/ /*1.009*/
GetADSW_w_RawByVolt(1.08f),/*2.797f*/ /*2.748f*/
0,
CeSWC_e_SwtFltFct3,
CeIoHwAb_e_AdRangeNormal
},
{
GetADSW_w_RawByVolt(1.1f) ,/*2.885f*/ /*2.845f*/
GetADSW_w_RawByVolt(1.34f),/*3.11f*/ /*3.045f*/
0,
CeSWC_e_SwtFltFct4,
CeIoHwAb_e_AdRangeNormal
},
{
GetADSW_w_RawByVolt(1.4f) ,/*3.167f*/ /*3.122f*/
GetADSW_w_RawByVolt(1.6f),/*3.403f*/ /*3.322f*/
0,
CeSWC_e_SwtFltFct5,
CeIoHwAb_e_AdRangeNormal
},
{
GetADSW_w_RawByVolt(1.74f) ,/*3.45f*/ /*3.401f*/ /*3.573*/
GetADSW_w_RawByVolt(2.0f),/*3.696f*/ /*3.601f*/
0,
CeSWC_e_SwtFltFct6,
CeIoHwAb_e_AdRangeNormal
},
{
GetADSW_w_RawByVolt(2.32f) ,/*3.81f*/ /*3.75f*/ /*3.938*/
GetADSW_w_RawByVolt(2.52f),/*4.066f*/ /*3.95f*/
0,
CeSWC_e_SwtFltFct7,
CeIoHwAb_e_AdRangeNormal
},
{
GetADSW_w_RawByVolt(3.32f) ,/*3.8f*/ /*4.14f*//*4.317*/
GetADSW_w_RawByVolt(3.52f),/*4.8f*/ /*4.34f*/
0,
CeSWC_e_SwtFltFct8,
CeIoHwAb_e_AdRangeNormal
},
{
GetADSW_w_RawByVolt(3.6f) ,
GetADSW_w_RawByVolt(5.0f),
0,
CeSWC_e_SwtFltNoActtn,
CeIoHwAb_e_AdRangeNormal
}
};
/***************************************************************************************/
/*HOOD ajar switches AD range define*/
/***************************************************************************************/
#define HOOD_RNG_SIZE 2
//const uint16 KaADSW_u_HOODEvtList[] = /*---List---*/
//{
// Evt_CtdHdSwRsp_Chg,
// Evt_CtdHdSwRsp_Chg
//};
const TeSW_AdRngCal KaSW_h_HoodRngInfo[HOOD_RNG_SIZE] =
{
/*TRUE*/
{
GetADSW_w_RawByVolt(0.05f) , /*uint16 wAD_Range_Low 0.17f*/
GetADSW_w_RawByVolt(0.60f) , /*uint16 wAD_Range_High 0.4f*/
0,
TRUE,
CeIoHwAb_e_AdRangeNormal
},
/*FALSE*/
{
GetADSW_w_RawByVolt(0.61f) , /*uint16 wAD_Range_Low 0.45f*/
GetADSW_w_RawByVolt(2.00f) , /*uint16 wAD_Range_High 0.69f*/
0,
FALSE,
CeIoHwAb_e_AdRangeNormal
}
};
/***************************************************************************************/
/*IA1(Dimming +/-, FogLamp F/R) ajar switches AD range define*/
/***************************************************************************************/
#define IA1_RNG_SIZE 5
//const uint16 KaADSW_u_IA1EvtList[] = /*---List---*/
//{
// Evt_DimCtrlDec_Chg,
// Evt_DimCtrlInc_Chg,
// Evt_FoglampFrontFlt_Chg,
// Evt_FoglampRearFlt_Chg
//};
const TeSW_AdRngCal KaSW_h_IA1RngInfo[IA1_RNG_SIZE] =//123
{
/*Dimming -*/
{
GetADSW_w_RawByVolt(3.61f) , /*uint16 wAD_Range_Low 0.17f*/
GetADSW_w_RawByVolt(3.90f) , /*uint16 wAD_Range_High 0.4f*/
0,
CeILS_e_DimmingInc, /*Dimming -*/
CeIoHwAb_e_AdRangeNormal,
// Evt_DimCtrlDec_Chg
},
/*Dimming +*/
{
GetADSW_w_RawByVolt(3.91f) , /*uint16 wAD_Range_Low 0.17f*/
GetADSW_w_RawByVolt(4.30f) , /*uint16 wAD_Range_High 0.4f*/
0,
CeILS_e_DimmingDec, /*Dimming +*/
CeIoHwAb_e_AdRangeNormal,
// Evt_DimCtrlInc_Chg
},
/*FogLamp Front*/
{
GetADSW_w_RawByVolt(3.21f) , /*uint16 wAD_Range_Low 0.17f*/
GetADSW_w_RawByVolt(3.60f) , /*uint16 wAD_Range_High 0.4f*/
0,
CeELS_e_FogFront, /*FogLamp Front*/
CeIoHwAb_e_AdRangeNormal,
// Evt_FoglampFrontFlt_Chg
},
/*FogLamp Rear*/
{
GetADSW_w_RawByVolt(2.81f) , /*uint16 wAD_Range_Low 0.45f*/
GetADSW_w_RawByVolt(3.20f) , /*uint16 wAD_Range_High 0.69f*/
0,
CeELS_e_FogRear, /*FogLamp Rear*/
CeIoHwAb_e_AdRangeNormal,
// Evt_FoglampRearFlt_Chg
},
/* NETUAL */
{
GetADSW_w_RawByVolt(4.31f) , /*uint16 wAD_Range_Low 0.17f*/
GetADSW_w_RawByVolt(5.00f) , /*uint16 wAD_Range_High 0.4f*/
0,
CeLS_e_NULL, /*NETUAL*/
CeIoHwAb_e_AdRangeNormal,
}
};
/*define an analog switch, 5th step is to define group property here */
const TeADSW_GrupInfo KaADSW_h_GrupInfo[SWGRUP_NUM] =
{
/* Rear Wiper/Wash */
{
ADSW_SAM_BUF_REARWIP, /*uint16 *e_p_AdRaw; */
GetADSW_w_CookByVolt(18.55), /*uint16 e_p_SrcVoltRef*/
&VeIoHwAb_w_Adc1ResultBuffer[1], /*uint16 *e_w_SrcVolt; */
(uint8*)NULL, /*uint8* e_p_SwId;*/
KaSW_h_RearWiperRngInfo, /*TeSW_AdRngCal* e_p_AdRngCal; */
LENGTH_OF_ARRAY(KaSW_h_RearWiperRngInfo), /*uint8 e_u_RngArrSize; */
GetADSW_w_CntByTime(20), /*uint16 e_w_SwDbcTime;, in ms*/
Evt_RrWipCtrlDbncISIG_Chg//KaADSW_u_RearWIPEvtList
},
/*Wiper intermedent*/
{
ADSW_SAM_BUF_WIPR, /*uint16 *e_p_AdRaw, AN03; */
GetADSW_w_CookByVolt(18.55), /*uint16 e_p_SrcVoltRef*/
&VeIoHwAb_w_Adc1ResultBuffer[1], /*uint16 *e_w_SrcVolt; */
KaSW_u_WiperAllSwId, /*uint8* e_p_SwId;*/
KaSW_h_WiperRngInfo, /*TeSW_AdRngCal* e_p_AdRngCal; */
LENGTH_OF_ARRAY(KaSW_h_WiperRngInfo), /*uint8 e_u_RngArrSize; */
GetADSW_w_CntByTime(20), //e_w_SwDbcTime, ms
Evt_FrtWipCtrlDbncISIG_Chg//KaADSW_u_WIPEvtList
},
/*Steering Wheel Control Switch 1 Group*/
{
ADSW_SAM_BUF_STE1, /*uint16 *e_p_AdRaw, AN03; */
GetADSW_w_CookByVolt(12), /*uint16 e_p_SrcVoltRef*/
ADSW_REF_ADDR_STE1, /*uint16 *e_w_SrcVolt; */
(uint8*)NULL, /*uint8* e_p_SwId;*/
KaSW_h_Ste1Rng, /*TeSW_AdRngCal* e_p_AdRngCal; */
LENGTH_OF_ARRAY(KaSW_h_Ste1Rng), /*uint8 e_u_RngArrSize; */
GetADSW_w_CntByTime(20), //e_w_SwDbcTime, ms
INVALID_EVENT_ID//Evt_SWCSwt1Flt_Chg
},
/*Steering Wheel Control Switch 2 Group*/
{
ADSW_SAM_BUF_STE2, /*uint16 *e_p_AdRaw, AN03; */
GetADSW_w_CookByVolt(18.70), /*uint16 e_p_SrcVoltRef*/
&VeIoHwAb_w_AdcResultBuffer[14], /*uint16 *e_w_SrcVolt; */
(uint8*)NULL, /*uint8* e_p_SwId;*/
KaSW_h_Ste2Rng, /*TeSW_AdRngCal* e_p_AdRngCal; */
LENGTH_OF_ARRAY(KaSW_h_Ste2Rng), /*uint8 e_u_RngArrSize; */
GetADSW_w_CntByTime(20), //e_w_SwDbcTime, ms
Evt_SWCSwt2Flt_Chg//INVALID_EVENT_ID//Evt_SWCSwt2Flt_Chg
},
/* HOOD AJAR */
{
ADSW_SAM_BUF_HOOD, /*uint16 *e_p_AdRaw; */
GetADSW_w_CookByVolt(12), /*uint16 e_p_SrcVoltRef*/
ADSW_REF_ADDR_HOOD, /*uint16 *e_w_SrcVolt; */
(uint8*)NULL, /*uint8* e_p_SwId;*/
KaSW_h_HoodRngInfo, /*TeSW_AdRngCal* e_p_AdRngCal; */
LENGTH_OF_ARRAY(KaSW_h_HoodRngInfo), /*uint8 e_u_RngArrSize; */
GetADSW_w_CntByTime(20), /*uint16 e_w_SwDbcTime; in ms*/
Evt_CtdHdSwRsp_Chg//KaADSW_u_HOODEvtList
},
/* IA1 AJAR */
{
ADSW_SAM_BUF_IA1, /*uint16 *e_p_AdRaw; */
GetADSW_w_CookByVolt(18.55), /*uint16 e_p_SrcVoltRef*/
&VeIoHwAb_w_Adc1ResultBuffer[1], /*uint16 *e_w_SrcVolt; */
(uint8*)NULL, /*uint8* e_p_SwId;*/
KaSW_h_IA1RngInfo, /*TeSW_AdRngCal* e_p_AdRngCal; */
LENGTH_OF_ARRAY(KaSW_h_IA1RngInfo), /*uint8 e_u_RngArrSize; */
GetADSW_w_CntByTime(20), /*uint16 e_w_SwDbcTime; in ms*/
INVALID_EVENT_ID//KaADSW_u_IA1EvtList
},
};
#if 0
/*Output feedback digital in
* Reflect the raw input value. no debounce.
* define board internal digital input here.
*/
const TeSW_h_OBDIInfo KaSW_h_OBDIInfo[OBDI_Num]=
{
/*Note: PORTA are in address 0, and NULL is also in address 0*/
{TRUE, &PORTK, 1},
{TRUE, &PORTK, 2},
{TRUE, &PTP, 0},
{FALSE, NULL, 0},
{TRUE, &PORTK, 0},
{FALSE, NULL, 0},
{FALSE, NULL, 0},
{FALSE, NULL, 0},
{TRUE, &PORTC, 1},
{TRUE, &PORTC, 2},
{FALSE, NULL, 0},
{TRUE, &PORTK, 7},
{FALSE, NULL, 0},
{TRUE, &PTJ, 4},
{TRUE, &PTJ, 5},
{FALSE, NULL, 0},
{FALSE, NULL, 0},
{FALSE, NULL, 0},
{FALSE, NULL, 0},
{FALSE, NULL, 0},
{FALSE, NULL, 0},
{FALSE, NULL, 0},
{FALSE, NULL, 0},
{FALSE, NULL, 0},
{TRUE, &PORTB, 5},
{TRUE, &PORTC, 7},
{TRUE, &PORTC, 6},
{TRUE, &PORTA, 7},
{TRUE, &PORTA, 6},
{FALSE, NULL, 0},
{FALSE, NULL, 0},
{FALSE, NULL, 0}
};
#endif
#define CAL_STOP_CAL1_SECT
#include "MemMap.h"
<file_sep>/BSP/MCAL/Can/Can.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Can.h */
/* Version = 3.0.5a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2008-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of external declaration of APIs and Service IDs. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12.12.2008 : Initial Version
* V3.0.1: 10.10.2009 : DET Updated to support INVALID DATABASE error and
* ControllerConfigType structure is updated
* for H/W changes as per SCR ANMCANLINFR3_SCR_031
* V3.0.2: 21.04.2010 : As per ANMCANLINFR3_SCR_056, provision for Tied Wakeup
* interrupts is added.
* V3.0.3: 11.05.2010 : 1. "ucMaxNofBasicCanHth" is added in "Can_ConfigType"
* for multiple configuration support as per
* ANMCANLINFR3_SCR_060.
* 2. "ddMask<xxx>Reg" are renamed to "ucMask<xxx>Reg" as
* per guidelines. Also their data type is changed from
* uint16 to uint8.
* V3.0.4: 12.09.2010 : As per ANMCANLINFR3_SCR_083, Can_AFCan_GstConfigType
* is changed as Can_AFCan_GaaConfigType.
* V3.0.5: 20.06.2011 : As per ANMCANLINFR3_SCR_0107, Type and name of the
* variables usMaskERRReg, usMaskWUPReg, usMaskRECReg,
* usMaskTRXReg, pIntCntrlReg and pWupIntCntrlReg is
* changed as uint16.
* V3.0.5a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
#ifndef CAN_H
#define CAN_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "ComStack_Types.h" /* Type definition header file */
#include "Can_Cfg.h" /* Configuration header file */
#include "Can_RegStruct.h" /* Register structure header file */
#if(CAN_WAKEUP_SUPPORT == STD_ON)
#include "EcuM_Cbk.h" /* ECUM callback and callout header file */
#endif
#include "Can_GenericTypes.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* Common Published Information */
#define CAN_AR_MAJOR_VERSION 2
#define CAN_AR_MINOR_VERSION 2
#define CAN_AR_PATCH_VERSION 2
#define CAN_SW_MAJOR_VERSION 3
#define CAN_SW_MINOR_VERSION 0
#define CAN_SW_PATCH_VERSION 0
/* CAN Module Id */
#define CAN_MODULE_ID (uint16)80
/* CAN Module Vendor Id */
#define CAN_VENDOR_ID (uint16)23
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* CAN Module Instance Id */
#define CAN_INSTANCE_ID (uint8)0x00
/* Service ID for Can_Init */
#define CAN_INIT_SID (uint8)0x00
/* Service ID for Can_InitController */
#define CAN_INIT_CNTRL_SID (uint8)0x02
/* Service ID for Can_GetVersionInfo */
#define CAN_GET_VERSIONINFO_SID (uint8)0x07
/* Service ID for Can_SetControllerMode */
#define CAN_SET_MODECNTRL_SID (uint8)0x03
/* Service ID for Can_DisableControllerInterupts */
#define CAN_DISABLE_CNTRL_INT_SID (uint8)0x04
/* Service ID for Can_EnableControllerInterupts */
#define CAN_ENABLE_CNTRL_INT_SID (uint8)0x05
/* Service ID for Can_Write */
#define CAN_WRITE_SID (uint8)0x06
/* Service ID for Can_MainFunction_Write */
#define CAN_MAIN_WRITE_SID (uint8)0x01
/* Service ID for Can_MainFunction_Read */
#define CAN_MAIN_READ_SID (uint8)0x08
/* Service ID for Can_MainFunction_BusOff */
#define CAN_MAIN_BUSOFF_SID (uint8)0x09
/* Service ID for Can_MainFunction_Wakeup */
#define CAN_MAIN_WAKEUP_SID (uint8)0x0a
/* Service ID for Can_CheckWakeup */
#define CAN_CHK_WAKEUP_SID (uint8)0x0b
/* API service called with null Pointer */
#define CAN_E_PARAM_POINTER (uint8)0x01
/* API service called with wrong Handle */
#define CAN_E_PARAM_HANDLE (uint8)0x02
/* API service called with wrong DLC */
#define CAN_E_PARAM_DLC (uint8)0x03
/* API service called with wrong Controller Id */
#define CAN_E_PARAM_CONTROLLER (uint8)0x04
/* API service called with Uninitialization */
#define CAN_E_UNINIT (uint8)0x05
/* API service called with wrong Transition */
#define CAN_E_TRANSITION (uint8)0x06
/* API service called with wrong database addresss */
#define CAN_E_INVALID_DATABASE (uint8)0x07
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*CAN Controller configuration */
typedef struct STagCan_ControllerConfigType
{
/* Pointer to Hardware Filter Mask */
P2CONST(Tdd_Can_AFCan_HwFilterMask, AUTOMATIC, CAN_AFCAN_CONFIG_CONST)
pFilterMask;
/* Pointer to Interrupt Control Registers. This is the address of Interrupt
Control Registers as provided in the configuration for corresponding
CanController */
P2VAR(uint16,AUTOMATIC,CAN_AFCAN_CONFIG_DATA)pIntCntrlReg;
/* Pointer to Wake-up Interrupt Control Registers */
P2VAR(uint16,AUTOMATIC,CAN_AFCAN_CONFIG_DATA)pWupIntCntrlReg;
/* Pointer to Wakeup Status Flag */
#if (CAN_WAKEUP_SUPPORT == STD_ON)
P2VAR(uint8,AUTOMATIC,CAN_AFCAN_CONFIG_DATA)pWkpStsFlag;
#endif
/* Pointer to First HRH */
P2CONST(void, AUTOMATIC, CAN_AFCAN_CONFIG_CONST)pHrh;
/* Pointer to First HTH */
P2CONST(void, AUTOMATIC, CAN_AFCAN_CONFIG_CONST)pHth;
/* Pointer to 8-bit Control Register Base Address as
provided in the configuration for corresponding CanController */
P2VAR(Tdd_Can_AFCan_8bit_CntrlReg, AUTOMATIC, CAN_AFCAN_CONFIG_DATA)
pCntrlReg8bit;
/* Pointer to 16-bit Control Register Base Address as
provided in the configuration for corresponding CanController */
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg, AUTOMATIC, CAN_AFCAN_CONFIG_DATA)
pCntrlReg16bit;
/* Pointer to 8-bit Control Register Base Address as
provided in the configuration for corresponding CanController */
P2VAR(Tdd_Can_AFCan_32bit_CntrlReg, AUTOMATIC, CAN_AFCAN_CONFIG_DATA)
pCntrlReg32bit;
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Pointer to Controller Mode */
P2VAR(uint8, AUTOMATIC, CAN_AFCAN_CONFIG_DATA)pCntrlMode;
#endif
/* Wakeup Source Type */
#if (CAN_WAKEUP_SUPPORT == STD_ON)
EcuM_WakeupSourceType ddWakeupSourceId;
#endif
/* Bit 8 : Tx Processing
9 : Rx Processing
10 : BusOff Processing
13 : Wakeup Processing
14 : Tx Cancel Processing
*/
/* Interrupt Enable Bit */
uint16 usIntEnable;
/* Bit Timing Register */
uint16 usBTR;
/* Mask for Bus-off configuration */
uint16 usMaskERRReg;
/* Mask for Wake-up configuration */
uint16 usMaskWUPReg;
/* Mask for Receive Interrupt configuration */
uint16 usMaskRECReg;
/* Mask for Transmit Interrupt configuration */
uint16 usMaskTRXReg;
/* Bit Rate Prescaler */
uint8 ucBRP;
/* No. Of Filter Mask number */
uint8 ucNoOfFilterMask;
/* Number of HRH */
uint8 ucNoOfHrh;
/* Number of HTH */
uint8 ucNoOfHth;
/* Start of Hth */
sint16 ssHthOffSetId;
/* Start of Hrh */
uint8 ucHrhOffSetId;
/* Controller Reg Id */
uint8 ucCntrlRegId;
/* Maximum number of Message buffers in the controller */
uint8 ucMaxNoOfMsgBufs;
#if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
/* Number of BasicCan Hth configured for the controller */
uint8 ucNoOfBasicCanHth;
/* Offset for getting the first BasicCan Hth of the controller */
uint8 ucBasicCanHthOffset;
#endif
}Can_ControllerConfigType;
/* CAN Driver Initialization configuration */
typedef struct STagCan_ConfigType
{
/* StartOfDbToc */
uint32 ulStartOfDbToc;
/* Pointer to first Controller structure */
P2CONST(Can_ControllerConfigType,AUTOMATIC,
CAN_AFCAN_CONFIG_CONST) pFirstController;
/* Pointer to first Hrh structure */
P2CONST(void, AUTOMATIC, CAN_AFCAN_CONFIG_CONST) pFirstHth;
/* Pointer to Controller ID array */
P2CONST(uint8, AUTOMATIC, CAN_AFCAN_CONFIG_CONST)pCntrlIdArray;
/* First index of Hth */
uint8 ucFirstHthId;
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Last index of Hth */
uint8 ucLastHthId;
/* Index of last Controller in the configuration */
uint8 ucLastCntrlId;
#endif
#if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
/* Maximum number of BasicCan Hth configured */
uint8 ucMaxNofBasicCanHth;
#endif
}Can_ConfigType;
/*******************************************************************************
** Extern declarations for Global Data **
*******************************************************************************/
#define CAN_AFCAN_START_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
/* Global array for Config structure */
extern CONST(Can_ConfigType, CAN_AFCAN_CONST) Can_AFCan_GaaConfigType[];
#define CAN_AFCAN_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_DBTOC_CTRL_CFG_DATA_UNSPECIFIED
#include "MemMap.h"
/* Global array for ControllerConfigType structure */
extern CONST(Can_ControllerConfigType, CAN_AFCAN_CONST)
Can_AFCan_GaaControllerConfigType[];
#define CAN_AFCAN_STOP_SEC_DBTOC_CTRL_CFG_DATA_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* API for global initialization */
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE) Can_Init
(P2CONST(Can_ConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST) Config);
/* API for initialization Controller */
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE) Can_InitController
(uint8 Controller, P2CONST(Can_ControllerConfigType, AUTOMATIC,
CAN_AFCAN_APPL_CONST) Config);
/* API for set Controller mode */
extern FUNC(Can_ReturnType, CAN_AFCAN_PUBLIC_CODE)
Can_SetControllerMode(uint8 Controller, Can_StateTransitionType Transition);
/* API for disabling Controller interrupt */
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
Can_DisableControllerInterrupts(uint8 Controller);
/* API for enabling Controller interrupt */
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
Can_EnableControllerInterrupts(uint8 Controller);
/* API for Can Write */
extern FUNC(Can_ReturnType, CAN_AFCAN_PUBLIC_CODE)
Can_Write(uint8 Hth,
P2CONST(Can_PduType, AUTOMATIC, CAN_AFCAN_APPL_CONST) PduInfo);
/* API for schedule processing of write */
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE) Can_MainFunction_Write(void);
/* API for schedule processing of read */
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE) Can_MainFunction_Read(void);
/* API for schedule processing of BusOff */
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE) Can_MainFunction_BusOff(void);
/* API for schedule processing of Wakeup */
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE) Can_MainFunction_Wakeup(void);
/* API to get the version information */
extern FUNC(void,CAN_AFCAN_PUBLIC_CODE) Can_GetVersionInfo
(P2VAR(Std_VersionInfoType, AUTOMATIC, CAN_AFCAN_APPL_DATA) versioninfo);
/* API for checking wakeup */
extern FUNC(Std_ReturnType, CAN_AFCAN_PUBLIC_CODE)Can_CheckWakeup
(uint8 Controller);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* CAN_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Adc/Adc.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Adc.h */
/* Version = 3.1.3 */
/* Date = 04-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains macros, ADC type definitions, structure data types and */
/* API function prototypes of ADC Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 10-Jul-2009 : Initial version
*
* V3.0.1: 12-Oct-2009 : As per SCR 052, the following changes are made
* 1. Template changes are made.
*
* V3.0.2: 02-Dec-2009 : As per SCR 157, Adc_ConfigType is updated to add
* pDmaHWUnitMapping and pDmaCGUnitMapping.
*
* V3.0.3: 27-Aug-2010 : As per SCR 338, file include section is updated to
* include Std_Types.h file.
*
* V3.1.0: 27-Jul-2011 : Modified for DK-4
* V3.1.1: 14-Feb-2012 : Merged the fixes done for Fx4L Adc driver
* V3.1.2: 16-May-2012 : As per SCR 006, Module version is changed.
*
* V3.1.3: 04-Jun-2012 : As per SCR 019, the following changes are made
* 1. Compiler version is removed from environment
* section.
* 2. Module version is changed.
* 3. Function Adc_GetVersionInfo is implemented as
* Macro.
*/
/******************************************************************************/
#ifndef ADC_H
#define ADC_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Adc_Cfg.h"
#include "Std_Types.h" /* AUTOSAR standard types */
/*******************************************************************************
** Version Information **
*******************************************************************************/
#define ADC_VENDOR_ID ADC_VENDOR_ID_VALUE
#define ADC_MODULE_ID ADC_MODULE_ID_VALUE
#define ADC_INSTANCE_ID ADC_INSTANCE_ID_VALUE
/*
* AUTOSAR specification version information
*/
#define ADC_AR_MAJOR_VERSION ADC_AR_MAJOR_VERSION_VALUE
#define ADC_AR_MINOR_VERSION ADC_AR_MINOR_VERSION_VALUE
#define ADC_AR_PATCH_VERSION ADC_AR_PATCH_VERSION_VALUE
/*
* Software version information
*/
#define ADC_SW_MAJOR_VERSION 3
#define ADC_SW_MINOR_VERSION 1
#define ADC_SW_PATCH_VERSION 3
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (ADC_CFG_SW_MAJOR_VERSION != ADC_SW_MAJOR_VERSION)
#error "Software major version of Adc.h and Adc_Cfg.h did not match!"
#endif
#if (ADC_CFG_SW_MINOR_VERSION!= ADC_SW_MINOR_VERSION )
#error "Software minor version of Adc.h and Adc_Cfg.h did not match!"
#endif
/*******************************************************************************
** Service Ids **
*******************************************************************************/
/* Service Id of Adc_Init */
#define ADC_INIT_SID (uint8)0x00
/* Service Id of Adc_DeInit */
#define ADC_DEINIT_SID (uint8)0x01
/* Service Id of Adc_StartGroupConversion */
#define ADC_START_GROUP_CONVERSION_SID (uint8)0x02
/* Service Id of Adc_StopGroupConversion */
#define ADC_STOP_GROUP_CONVERSION_SID (uint8)0x03
/* Service Id of Adc_ReadGroup */
#define ADC_READ_GROUP_SID (uint8)0x04
/* Service Id of Adc_EnableHardwareTrigger */
#define ADC_ENABLE_HARWARE_TRIGGER_SID (uint8)0x05
/* Service Id of Adc_DisableHardwareTrigger */
#define ADC_DISABLE_HARWARE_TRIGGER_SID (uint8)0x06
/* Service Id of Adc_EnableGroupNotification */
#define ADC_ENABLE_GROUP_NOTIFICATION_SID (uint8)0x07
/* Service Id of Adc_DisableGroupNotification */
#define ADC_DISABLE_GROUP_NOTIFICATION_SID (uint8)0x08
/* Service Id of Adc_GetGroupStatus */
#define ADC_GET_GROUP_STATUS_SID (uint8)0x09
/* Service Id of Adc_GetVersionInfo */
#define ADC_GET_VERSION_INFO_SID (uint8)0x0A
/* Service Id of Adc_GetStreamLastPointer */
#define ADC_GET_STREAM_LAST_POINTER_SID (uint8)0x0B
/* Service Id of Adc_SetupResultBuffer */
#define ADC_SETUP_RESULT_BUFFER_SID (uint8)0x0C
/*******************************************************************************
** DET Error Codes **
*******************************************************************************/
/* API service called without module initialization is reported using following
error code */
#define ADC_E_UNINIT 0x0A
/* API services Adc_StartGroupConversion and Adc_DeInit called when the timer
is already running is reported using following error code */
#define ADC_E_BUSY 0x0B
/* API service Adc_StopGroupConversion called while no conversion was running
is reported using following error code */
#define ADC_E_IDLE 0x0C
/* API service Adc_Init called while ADC is already initialized
is reported using following error code */
#define ADC_E_ALREADY_INITIALIZED 0x0D
/* API service Adc_Init called with incorrect configuration
is reported using following error code */
#define ADC_E_PARAM_CONFIG 0x0E
/* API service called with invalid Group ID is reported using following error
code */
#define ADC_E_PARAM_GROUP 0x15
/* API services Adc_StartGroupConversion or Adc_StopGroupConversion called on a
group with trigger source configured as hardware is reported using following
error code */
/* API services Adc_EnableHardwareTrigger or Adc_DisableHardwareTrigger called
on a group with trigger source configured as software is reported using
following error code */
#define ADC_E_WRONG_TRIGG_SRC 0x17
/* API services Adc_EnableGroupNotification or Adc_DisableGroupNotification
called on a group whose configuration set has no notification available is
reported using following error code */
#define ADC_E_NOTIF_CAPABILITY 0x18
/* API services Adc_StartGroupConversion or Adc_EnableHardwareTrigger
called on a group whose result buffer pointer not initialized is
reported using following error code */
#define ADC_E_BUFFER_UNINIT 0x19
/* API service Adc_Init called without/with a wrong database is reported using
following error code */
#define ADC_E_INVALID_DATABASE 0xEF
/* API service Adc_GetVersionInfo called with parameter versioninfo pointer as
NULL is reported using following error code */
#define ADC_E_PARAM_POINTER 0xF0
/* Priority Implementation values */
#define ADC_PRIORITY_NONE 0
#define ADC_PRIORITY_HW 1
#define ADC_PRIORITY_HW_SW 2
#define ADC_PRIORITY_SW 3
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Numeric identifier of an ADC channel */
typedef uint8 Adc_ChannelType;
/* Numeric identifier of channel resolution in number of bits */
typedef uint8 Adc_ResolutionType;
/* Numeric identifier of an ADC channel group */
typedef uint8 Adc_GroupType;
/* Adc converted value type */
typedef uint16 Adc_ValueGroupType;
/* Number of samples of the streaming buffer group */
typedef uint8 Adc_StreamNumSampleType;
/* Numeric ID of an ADC Hw Unit */
typedef uint8 Adc_HwUnitType;
/* Type for the reload value of the ADC module embedded timer */
typedef uint8 Adc_HwTriggerTimerType;
/* Current status of the conversion of the requested ADC Channel group */
typedef enum Adc_StatusType
{
ADC_IDLE,
ADC_BUSY,
ADC_COMPLETED,
ADC_STREAM_COMPLETED
} Adc_StatusType;
/* Type for configuring the trigger source for an ADC Channel group */
typedef enum Adc_TriggerSourceType
{
ADC_TRIGG_SRC_SW,
ADC_TRIGG_SRC_HW
} Adc_TriggerSourceType;
/* Type for configuring the conversion mode of an ADC Channel group */
typedef enum Adc_GroupConvModeType
{
ADC_CONV_MODE_ONESHOT,
ADC_CONV_MODE_CONTINUOUS
} Adc_GroupConvModeType;
/* Type for configuring the streaming access mode buffer type. */
typedef enum Adc_StreamBufferModeType
{
ADC_STREAM_BUFFER_LINEAR,
ADC_STREAM_BUFFER_CIRCULAR
} Adc_StreamBufferModeType;
/* Type for configuring the access mode to group conversion results */
typedef enum Adc_GroupAccessModeType
{
ADC_ACCESS_MODE_SINGLE,
ADC_ACCESS_MODE_STREAMING
} Adc_GroupAccessModeType;
/* Type for replacement mechanism, which is used on ADC group level */
typedef enum Adc_GroupReplacementType
{
ADC_GROUP_REPL_ABORT_RESTART,
ADC_GROUP_REPL_SUSPEND_RESUME
} Adc_GroupReplacementType;
/* Type for configuring on which edge of the hardware trigger signal the
* driver should reach, i.e. start the conversion
*/
typedef enum Adc_HwTriggerSignalType
{
ADC_HW_TRIG_RISING_EDGE,
ADC_HW_TRIG_FALLING_EDGE,
ADC_HW_TRIG_BOTH_EDGES
} Adc_HwTriggerSignalType;
/* Type for configuring the result data alignment */
typedef enum AdcResultAlignment
{
ADC_RIGHT_ALIGNMENT,
ADC_LEFT_ALIGNMENT
} AdcResultAlignment;
/* Priority level of the channel. Lowest priority is 0 */
typedef uint8 Adc_GroupPriorityType;
/* Data Structure required for initializing the ADC unit */
typedef struct STagTdd_Adc_ConfigType
{
/* Database start value - ADC_DBTOC_VALUE */
uint32 ulStartOfDbToc;
/* Pointer to ADC hardware unit configuration */
P2CONST(void, AUTOMATIC, ADC_CONFIG_CONST) pHWUnitConfig;
/* Pointer to ADC group configuration */
P2CONST(void, AUTOMATIC, ADC_CONFIG_CONST) pGroupConfig;
#if (ADC_HW_TRIGGER_API == STD_ON)
/* Pointer to ADC HW trigger values */
P2CONST(void, AUTOMATIC, ADC_CONFIG_CONST) pGroupHWTrigg;
#endif
#if (ADC_DMA_MODE_ENABLE == STD_ON)
/* Pointer to DMA data */
P2CONST(void,AUTOMATIC,ADC_CONFIG_DATA) pDmaUnitConfig;
/* Pointer to DMA HW unit array mapping */
P2CONST(void,AUTOMATIC,ADC_CONFIG_DATA) pDmaHWUnitMapping;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* Pointer to DMA CGm unit array mapping */
P2CONST(void,AUTOMATIC,ADC_CONFIG_DATA) pDmaCGUnitMapping;
#endif
#endif /* #if (ADC_DMA_MODE_ENABLE == STD_ON) */
/* Pointer to channel group ram data */
P2VAR(void,AUTOMATIC,ADC_CONFIG_DATA) pGroupRamData;
/* Pointer to Hardware Unit ram data */
P2VAR(void,AUTOMATIC,ADC_CONFIG_DATA) pHwUnitRamData;
/* Pointer to Runtime data */
P2VAR(void,AUTOMATIC,ADC_CONFIG_DATA) pRunTimeData;
/* Max number of SW triggered groups configured in corresponding
configuration */
uint8 ucMaxSwTriggGroups;
#if (ADC_DMA_MODE_ENABLE == STD_ON)
/* Max number of DMA channel Ids configured in corresponding
configuration */
uint8 ucMaxDmaChannels;
#endif
} Adc_ConfigType;
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, ADC_PUBLIC_CODE) Adc_Init
(P2CONST(Adc_ConfigType, AUTOMATIC, ADC_APPL_CONST) ConfigPtr);
extern FUNC(void, ADC_PUBLIC_CODE) Adc_DeInit(void);
extern FUNC(void, ADC_PUBLIC_CODE)
Adc_StartGroupConversion(Adc_GroupType Group);
extern FUNC(void, ADC_PUBLIC_CODE)
Adc_StopGroupConversion(Adc_GroupType Group);
extern FUNC(Std_ReturnType, ADC_PUBLIC_CODE)
Adc_ReadGroup (Adc_GroupType Group,
P2VAR(Adc_ValueGroupType, AUTOMATIC, ADC_APPL_CONST) DataBufferPtr);
extern FUNC(void, ADC_PUBLIC_CODE)
Adc_EnableHardwareTrigger(Adc_GroupType Group);
extern FUNC(void, ADC_PUBLIC_CODE)
Adc_DisableHardwareTrigger(Adc_GroupType Group);
extern FUNC(void, ADC_PUBLIC_CODE)
Adc_EnableGroupNotification(Adc_GroupType Group);
extern FUNC(void, ADC_PUBLIC_CODE)
Adc_DisableGroupNotification(Adc_GroupType Group);
extern FUNC(Adc_StatusType, ADC_PUBLIC_CODE)
Adc_GetGroupStatus(Adc_GroupType Group);
extern FUNC(Adc_StreamNumSampleType, ADC_PUBLIC_CODE) Adc_GetStreamLastPointer
(Adc_GroupType Group, P2VAR(P2VAR(Adc_ValueGroupType,
AUTOMATIC, ADC_CONFIG_DATA), AUTOMATIC,ADC_CONFIG_DATA) PtrToSamplePtr);
#if (ADC_VERSION_INFO_API == STD_ON)
#define Adc_GetVersionInfo(versioninfo)\
{ \
(versioninfo)->vendorID = (uint16)ADC_VENDOR_ID; \
(versioninfo)->moduleID = (uint16)ADC_MODULE_ID; \
(versioninfo)->instanceID = (uint8)ADC_INSTANCE_ID; \
(versioninfo)->sw_major_version = ADC_SW_MAJOR_VERSION; \
(versioninfo)->sw_minor_version = ADC_SW_MINOR_VERSION; \
(versioninfo)->sw_patch_version = ADC_SW_PATCH_VERSION; \
}
#endif /*(ADC_VERSION_INFO_API == STD_ON)*/
extern FUNC(Std_ReturnType, ADC_PUBLIC_CODE) Adc_SetupResultBuffer
(Adc_GroupType Group,
P2VAR(Adc_ValueGroupType, AUTOMATIC, ADC_APPL_CONST) DataBufferPtr);
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define ADC_START_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
/* Declaration for ADC Database */
extern CONST(Adc_ConfigType, ADC_CONST) Adc_GstConfiguration[];
#define ADC_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
#endif /* ADC_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Mcu.dp/Mcu_LTTypes.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Mcu_LTTypes.h */
/* Version = 3.0.1 */
/* Date = 09-Apr-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2010-2013 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains the type definitions of RAM configuration Parameters */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Fx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 02-Jul-2010 : Initial Version
* V3.0.1: 09-Apr-2013 : Merged Sx4-H V3.00 as below.
* As per MANTIS 5337, updated to ulRamSectionSize.
*/
/******************************************************************************/
#ifndef MCU_LTTYPES_H
#define MCU_LTTYPES_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Mcu.h" /* To include the standard types */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification information */
#define MCU_LTTYPES_AR_MAJOR_VERSION MCU_AR_MAJOR_VERSION_VALUE
#define MCU_LTTYPES_AR_MINOR_VERSION MCU_AR_MINOR_VERSION_VALUE
#define MCU_LTTYPES_AR_PATCH_VERSION MCU_AR_PATCH_VERSION_VALUE
/* File version information */
#define MCU_LTTYPES_SW_MAJOR_VERSION 3
#define MCU_LTTYPES_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* RAM Sector Data Structure */
typedef struct STagMcuRamSectorSetting
{
/* Value of RAM Starting Address */
P2VAR(uint8, AUTOMATIC, MCU_CONFIG_DATA)pRamStartAddress;
/* Size of RAM Section */
uint32 ulRamSectionSize;
/* RAM Initial Value */
uint8 ucRamInitValue;
} Tdd_Mcu_RamSetting;
/*******************************************************************************
** Extern declarations for Global Data **
*******************************************************************************/
#define MCU_START_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/* Array of structures for RAM Sector */
extern CONST(Tdd_Mcu_RamSetting, MCU_CONST) Mcu_GstRamSetting[];
#define MCU_STOP_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* MCU_LTTYPES_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Gpt/Gpt_Irq.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Gpt_Irq.c */
/* Version = 3.0.3a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains ISRs for all Timers of GPT Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the partGPTlar */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 23-Oct-2009 : Initial Version
* V3.0.1: 11-Dec-2009 : As per SCR 167, ISR for OSTM1 is added
* V3.0.2: 23-Jun-2010 : As per SCR 281, following changes are made:
* 1. ISR for TAUB1-TAUB2 and TAUC2-TAUC8 are added.
* 2. File is updated to support and ISR Category
* support configurable by a pre-compile option.
* V3.0.3: 08-Jul-2010 : As per SCR 299, ISR Category options are updated
* from MODE to TYPE.
* V3.0.3a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Gpt.h"
#include "Gpt_Irq.h"
#include "Gpt_Cfg.h"
#include "Gpt_PBTypes.h"
#include "Gpt_Ram.h"
#include "Gpt_LLDriver.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification version information */
#define GPT_IRQ_C_AR_MAJOR_VERSION GPT_AR_MAJOR_VERSION_VALUE
#define GPT_IRQ_C_AR_MINOR_VERSION GPT_AR_MINOR_VERSION_VALUE
#define GPT_IRQ_C_AR_PATCH_VERSION GPT_AR_PATCH_VERSION_VALUE
/* File version information */
#define GPT_IRQ_C_SW_MAJOR_VERSION 3
#define GPT_IRQ_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (GPT_IRQ_AR_MAJOR_VERSION != GPT_IRQ_C_AR_MAJOR_VERSION)
#error "Gpt_Irq.c : Mismatch in Specification Major Version"
#endif
#if (GPT_IRQ_AR_MINOR_VERSION != GPT_IRQ_C_AR_MINOR_VERSION)
#error "Gpt_Irq.c : Mismatch in Specification Minor Version"
#endif
#if (GPT_IRQ_AR_PATCH_VERSION != GPT_IRQ_C_AR_PATCH_VERSION)
#error "Gpt_Irq.c : Mismatch in Specification Patch Version"
#endif
#if (GPT_IRQ_SW_MAJOR_VERSION != GPT_IRQ_C_SW_MAJOR_VERSION)
#error "Gpt_Irq.c : Mismatch in Major Version"
#endif
#if (GPT_IRQ_SW_MINOR_VERSION != GPT_IRQ_C_SW_MINOR_VERSION)
#error "Gpt_Irq.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : TAUAn_CHm_ISR
**
** Service ID : NA
**
** Description : These are Interrupt routines for the timer TAUAn and
** m, where n represents the TAUA Units and m
** represents channels associated for each Unit.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
**
** Function(s) invoked:
** Gpt_CbkNotification
**
*******************************************************************************/
#if (GPT_TAUA0_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA0_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA0_CH0_ISR_API == STD_ON) */
#if (GPT_TAUA0_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA0_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA0_CH1_ISR_API == STD_ON) */
#if (GPT_TAUA0_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA0_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA0_CH2_ISR_API == STD_ON) */
#if (GPT_TAUA0_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA0_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA0_CH3_ISR_API == STD_ON) */
#if (GPT_TAUA0_CH4_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH4_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA0_CH4);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA0_CH4_ISR_API == STD_ON) */
#if (GPT_TAUA0_CH5_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH5_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA0_CH5);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA0_CH5_ISR_API == STD_ON) */
#if (GPT_TAUA0_CH6_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH6_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA0_CH6);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA0_CH6_ISR_API == STD_ON) */
#if (GPT_TAUA0_CH7_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH7_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA0_CH7);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA0_CH7_ISR_API == STD_ON) */
#if (GPT_TAUA0_CH8_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH8_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA0_CH8);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA0_CH8_ISR_API == STD_ON) */
#if (GPT_TAUA0_CH9_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH9_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA0_CH9);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA0_CH9_ISR_API == STD_ON) */
#if (GPT_TAUA0_CH10_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH10_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA0_CH10);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA0_CH10_ISR_API == STD_ON) */
#if (GPT_TAUA0_CH11_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH11_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA0_CH11);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA0_CH11_ISR_API == STD_ON) */
#if (GPT_TAUA0_CH12_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH12_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA0_CH12);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA0_CH12_ISR_API == STD_ON) */
#if (GPT_TAUA0_CH13_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH13_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA0_CH13);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA0_CH13_ISR_API == STD_ON) */
#if (GPT_TAUA0_CH14_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH14_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA0_CH14);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA0_CH14_ISR_API == STD_ON) */
#if (GPT_TAUA0_CH15_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH15_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA0_CH15);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA0_CH15_ISR_API == STD_ON) */
#if (GPT_TAUA1_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA1_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA1_CH0_ISR_API == STD_ON) */
#if (GPT_TAUA1_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA1_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA1_CH1_ISR_API == STD_ON) */
#if (GPT_TAUA1_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA1_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA1_CH2_ISR_API == STD_ON) */
#if (GPT_TAUA1_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA1_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA1_CH3_ISR_API == STD_ON) */
#if (GPT_TAUA1_CH4_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH4_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA1_CH4);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA1_CH4_ISR_API == STD_ON) */
#if (GPT_TAUA1_CH5_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH5_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA1_CH5);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA1_CH5_ISR_API == STD_ON) */
#if (GPT_TAUA1_CH6_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH6_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA1_CH6);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA1_CH6_ISR_API == STD_ON) */
#if (GPT_TAUA1_CH7_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH7_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA1_CH7);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA1_CH7_ISR_API == STD_ON) */
#if (GPT_TAUA1_CH8_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH8_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA1_CH8);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA1_CH8_ISR_API == STD_ON) */
#if (GPT_TAUA1_CH9_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH9_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA1_CH9);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA1_CH9_ISR_API == STD_ON) */
#if (GPT_TAUA1_CH10_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH10_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA1_CH10);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA1_CH10_ISR_API == STD_ON) */
#if (GPT_TAUA1_CH11_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH11_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA1_CH11);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA1_CH11_ISR_API == STD_ON) */
#if (GPT_TAUA1_CH12_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH12_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA1_CH12);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA1_CH12_ISR_API == STD_ON) */
#if (GPT_TAUA1_CH13_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH13_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA1_CH13);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA1_CH13_ISR_API == STD_ON) */
#if (GPT_TAUA1_CH14_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH14_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA1_CH14);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA1_CH14_ISR_API == STD_ON) */
#if (GPT_TAUA1_CH15_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH15_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA1_CH15);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA1_CH15_ISR_API == STD_ON) */
#if (GPT_TAUA2_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA2_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA2_CH0_ISR_API == STD_ON) */
#if (GPT_TAUA2_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA2_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA2_CH1_ISR_API == STD_ON) */
#if (GPT_TAUA2_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA2_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA2_CH2_ISR_API == STD_ON) */
#if (GPT_TAUA2_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA2_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA2_CH3_ISR_API == STD_ON) */
#if (GPT_TAUA2_CH4_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH4_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA2_CH4);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA2_CH4_ISR_API == STD_ON) */
#if (GPT_TAUA2_CH5_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH5_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA2_CH5);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA2_CH5_ISR_API == STD_ON) */
#if (GPT_TAUA2_CH6_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH6_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA2_CH6);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA2_CH6_ISR_API == STD_ON) */
#if (GPT_TAUA2_CH7_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH7_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA2_CH7);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA2_CH7_ISR_API == STD_ON) */
#if (GPT_TAUA2_CH8_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH8_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA2_CH8);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA2_CH8_ISR_API == STD_ON) */
#if (GPT_TAUA2_CH9_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH9_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA2_CH9);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA2_CH9_ISR_API == STD_ON) */
#if (GPT_TAUA2_CH10_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH10_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA2_CH10);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA2_CH10_ISR_API == STD_ON) */
#if (GPT_TAUA2_CH11_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH11_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA2_CH11);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA2_CH11_ISR_API == STD_ON) */
#if (GPT_TAUA2_CH12_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH12_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA2_CH12);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA2_CH12_ISR_API == STD_ON) */
#if (GPT_TAUA2_CH13_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH13_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA2_CH13);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA2_CH13_ISR_API == STD_ON) */
#if (GPT_TAUA2_CH14_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH14_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA2_CH14);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA2_CH14_ISR_API == STD_ON) */
#if (GPT_TAUA2_CH15_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH15_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA2_CH15);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA2_CH15_ISR_API == STD_ON) */
#if (GPT_TAUA3_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA3_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA3_CH0_ISR_API == STD_ON) */
#if (GPT_TAUA3_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA3_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA3_CH1_ISR_API == STD_ON) */
#if (GPT_TAUA3_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA3_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA3_CH2_ISR_API == STD_ON) */
#if (GPT_TAUA3_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA3_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA3_CH3_ISR_API == STD_ON) */
#if (GPT_TAUA3_CH4_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH4_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA3_CH4);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA3_CH4_ISR_API == STD_ON) */
#if (GPT_TAUA3_CH5_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH5_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA3_CH5);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA3_CH5_ISR_API == STD_ON) */
#if (GPT_TAUA3_CH6_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH6_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA3_CH6);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA3_CH6_ISR_API == STD_ON) */
#if (GPT_TAUA3_CH7_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH7_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA3_CH7);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA3_CH7_ISR_API == STD_ON) */
#if (GPT_TAUA3_CH8_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH8_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA3_CH8);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA3_CH8_ISR_API == STD_ON) */
#if (GPT_TAUA3_CH9_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH9_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA3_CH9);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA3_CH9_ISR_API == STD_ON) */
#if (GPT_TAUA3_CH10_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH10_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA3_CH10);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA3_CH10_ISR_API == STD_ON) */
#if (GPT_TAUA3_CH11_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH11_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA3_CH11);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA3_CH11_ISR_API == STD_ON) */
#if (GPT_TAUA3_CH12_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH12_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA3_CH12);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA3_CH12_ISR_API == STD_ON) */
#if (GPT_TAUA3_CH13_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH13_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA3_CH13);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA3_CH13_ISR_API == STD_ON) */
#if (GPT_TAUA3_CH14_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH14_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA3_CH14);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA3_CH14_ISR_API == STD_ON) */
#if (GPT_TAUA3_CH15_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH15_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA3_CH15);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA3_CH15_ISR_API == STD_ON) */
#if (GPT_TAUA4_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA4_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA4_CH0_ISR_API == STD_ON) */
#if (GPT_TAUA4_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA4_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA4_CH1_ISR_API == STD_ON) */
#if (GPT_TAUA4_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA4_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA4_CH2_ISR_API == STD_ON) */
#if (GPT_TAUA4_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA4_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA4_CH3_ISR_API == STD_ON) */
#if (GPT_TAUA4_CH4_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH4_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA4_CH4);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA4_CH4_ISR_API == STD_ON) */
#if (GPT_TAUA4_CH5_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH5_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA4_CH5);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA4_CH5_ISR_API == STD_ON) */
#if (GPT_TAUA4_CH6_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH6_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA4_CH6);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA4_CH6_ISR_API == STD_ON) */
#if (GPT_TAUA4_CH7_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH7_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA4_CH7);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA4_CH7_ISR_API == STD_ON) */
#if (GPT_TAUA4_CH8_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH8_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA4_CH8);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA4_CH8_ISR_API == STD_ON) */
#if (GPT_TAUA4_CH9_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH9_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA4_CH9);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA4_CH9_ISR_API == STD_ON) */
#if (GPT_TAUA4_CH10_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH10_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA4_CH10);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA4_CH10_ISR_API == STD_ON) */
#if (GPT_TAUA4_CH11_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH11_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA4_CH11);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA4_CH11_ISR_API == STD_ON) */
#if (GPT_TAUA4_CH12_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH12_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA4_CH12);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA4_CH12_ISR_API == STD_ON) */
#if (GPT_TAUA4_CH13_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH13_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA4_CH13);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA4_CH13_ISR_API == STD_ON) */
#if (GPT_TAUA4_CH14_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH14_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA4_CH14);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA4_CH14_ISR_API == STD_ON) */
#if (GPT_TAUA4_CH15_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH15_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA4_CH15);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA4_CH15_ISR_API == STD_ON) */
#if (GPT_TAUA5_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA5_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA5_CH0_ISR_API == STD_ON) */
#if (GPT_TAUA5_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA5_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA5_CH1_ISR_API == STD_ON) */
#if (GPT_TAUA5_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA5_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA5_CH2_ISR_API == STD_ON) */
#if (GPT_TAUA5_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA5_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA5_CH3_ISR_API == STD_ON) */
#if (GPT_TAUA5_CH4_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH4_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA5_CH4);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA5_CH4_ISR_API == STD_ON) */
#if (GPT_TAUA5_CH5_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH5_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA5_CH5);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA5_CH5_ISR_API == STD_ON) */
#if (GPT_TAUA5_CH6_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH6_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA5_CH6);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA5_CH6_ISR_API == STD_ON) */
#if (GPT_TAUA5_CH7_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH7_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA5_CH7);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA5_CH7_ISR_API == STD_ON) */
#if (GPT_TAUA5_CH8_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH8_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA5_CH8);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA5_CH8_ISR_API == STD_ON) */
#if (GPT_TAUA5_CH9_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH9_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA5_CH9);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA5_CH9_ISR_API == STD_ON) */
#if (GPT_TAUA5_CH10_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH10_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA5_CH10);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA5_CH10_ISR_API == STD_ON) */
#if (GPT_TAUA5_CH11_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH11_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA5_CH11);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA5_CH11_ISR_API == STD_ON) */
#if (GPT_TAUA5_CH12_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH12_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA5_CH12);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA5_CH12_ISR_API == STD_ON) */
#if (GPT_TAUA5_CH13_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH13_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA5_CH13);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA5_CH13_ISR_API == STD_ON) */
#if (GPT_TAUA5_CH14_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH14_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA5_CH14);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA5_CH14_ISR_API == STD_ON) */
#if (GPT_TAUA5_CH15_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH15_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA5_CH15);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA5_CH15_ISR_API == STD_ON) */
#if (GPT_TAUA6_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA6_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA6_CH0_ISR_API == STD_ON) */
#if (GPT_TAUA6_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA6_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA6_CH1_ISR_API == STD_ON) */
#if (GPT_TAUA6_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA6_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA6_CH2_ISR_API == STD_ON) */
#if (GPT_TAUA6_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA6_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA6_CH3_ISR_API == STD_ON) */
#if (GPT_TAUA6_CH4_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH4_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA6_CH4);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA6_CH4_ISR_API == STD_ON) */
#if (GPT_TAUA6_CH5_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH5_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA6_CH5);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA6_CH5_ISR_API == STD_ON) */
#if (GPT_TAUA6_CH6_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH6_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA6_CH6);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA6_CH6_ISR_API == STD_ON) */
#if (GPT_TAUA6_CH7_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH7_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA6_CH7);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA6_CH7_ISR_API == STD_ON) */
#if (GPT_TAUA6_CH8_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH8_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA6_CH8);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA6_CH8_ISR_API == STD_ON) */
#if (GPT_TAUA6_CH9_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH9_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA6_CH9);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA6_CH9_ISR_API == STD_ON) */
#if (GPT_TAUA6_CH10_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH10_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA6_CH10);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA6_CH10_ISR_API == STD_ON) */
#if (GPT_TAUA6_CH11_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH11_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA6_CH11);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA6_CH11_ISR_API == STD_ON) */
#if (GPT_TAUA6_CH12_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH12_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA6_CH12);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA6_CH12_ISR_API == STD_ON) */
#if (GPT_TAUA6_CH13_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH13_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA6_CH13);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA6_CH13_ISR_API == STD_ON) */
#if (GPT_TAUA6_CH14_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH14_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA6_CH14);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA6_CH14_ISR_API == STD_ON) */
#if (GPT_TAUA6_CH15_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH15_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA6_CH15);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA6_CH15_ISR_API == STD_ON) */
#if (GPT_TAUA7_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA7_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA7_CH0_ISR_API == STD_ON) */
#if (GPT_TAUA7_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA7_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA7_CH1_ISR_API == STD_ON) */
#if (GPT_TAUA7_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA7_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA7_CH2_ISR_API == STD_ON) */
#if (GPT_TAUA7_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA7_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA7_CH3_ISR_API == STD_ON) */
#if (GPT_TAUA7_CH4_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH4_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA7_CH4);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA7_CH4_ISR_API == STD_ON) */
#if (GPT_TAUA7_CH5_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH5_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA7_CH5);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA7_CH5_ISR_API == STD_ON) */
#if (GPT_TAUA7_CH6_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH6_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA7_CH6);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA7_CH6_ISR_API == STD_ON) */
#if (GPT_TAUA7_CH7_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH7_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA7_CH7);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA7_CH7_ISR_API == STD_ON) */
#if (GPT_TAUA7_CH8_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH8_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA7_CH8);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA7_CH8_ISR_API == STD_ON) */
#if (GPT_TAUA7_CH9_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH9_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA7_CH9);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA7_CH9_ISR_API == STD_ON) */
#if (GPT_TAUA7_CH10_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH10_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA7_CH10);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA7_CH10_ISR_API == STD_ON) */
#if (GPT_TAUA7_CH11_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH11_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA7_CH11);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA7_CH11_ISR_API == STD_ON) */
#if (GPT_TAUA7_CH12_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH12_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA7_CH12);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA7_CH12_ISR_API == STD_ON) */
#if (GPT_TAUA7_CH13_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH13_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA7_CH13);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA7_CH13_ISR_API == STD_ON) */
#if (GPT_TAUA7_CH14_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH14_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA7_CH14);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA7_CH14_ISR_API == STD_ON) */
#if (GPT_TAUA7_CH15_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH15_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA7_CH15);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA7_CH15_ISR_API == STD_ON) */
#if (GPT_TAUA8_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA8_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA8_CH0_ISR_API == STD_ON) */
#if (GPT_TAUA8_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA8_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA8_CH1_ISR_API == STD_ON) */
#if (GPT_TAUA8_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA8_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA8_CH2_ISR_API == STD_ON) */
#if (GPT_TAUA8_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA8_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA8_CH3_ISR_API == STD_ON) */
#if (GPT_TAUA8_CH4_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH4_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA8_CH4);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA8_CH4_ISR_API == STD_ON) */
#if (GPT_TAUA8_CH5_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH5_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA8_CH5);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA8_CH5_ISR_API == STD_ON) */
#if (GPT_TAUA8_CH6_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH6_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA8_CH6);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA8_CH6_ISR_API == STD_ON) */
#if (GPT_TAUA8_CH7_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH7_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA8_CH7);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA8_CH7_ISR_API == STD_ON) */
#if (GPT_TAUA8_CH8_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH8_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA8_CH8);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA8_CH8_ISR_API == STD_ON) */
#if (GPT_TAUA8_CH9_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH9_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA8_CH9);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA8_CH9_ISR_API == STD_ON) */
#if (GPT_TAUA8_CH10_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH10_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA8_CH10);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA8_CH10_ISR_API == STD_ON) */
#if (GPT_TAUA8_CH11_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH11_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA8_CH11);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA8_CH11_ISR_API == STD_ON) */
#if (GPT_TAUA8_CH12_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH12_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA8_CH12);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA8_CH12_ISR_API == STD_ON) */
#if (GPT_TAUA8_CH13_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH13_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA8_CH13);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA8_CH13_ISR_API == STD_ON) */
#if (GPT_TAUA8_CH14_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH14_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA8_CH14);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA8_CH14_ISR_API == STD_ON) */
#if (GPT_TAUA8_CH15_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH15_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUA8_CH15);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUA8_CH15_ISR_API == STD_ON) */
/*******************************************************************************
** Function Name : TAUBn_CHm_ISR
**
** Service ID : None
**
** Description : These are Interrupt routines for the timer TAUBn and
** m, where n represents the TAUB Units and m
** represents channels associated for each Unit.
** TAU.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
**
** Function(s) invoked:
** Gpt_CbkNotification
**
*******************************************************************************/
#if (GPT_TAUB1_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB1_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB1_CH0_ISR_API == STD_ON) */
#if (GPT_TAUB1_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB1_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB1_CH1_ISR_API == STD_ON) */
#if (GPT_TAUB1_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB1_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB1_CH2_ISR_API == STD_ON) */
#if (GPT_TAUB1_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB1_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB1_CH3_ISR_API == STD_ON) */
#if (GPT_TAUB1_CH4_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH4_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB1_CH4);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB1_CH4_ISR_API == STD_ON) */
#if (GPT_TAUB1_CH5_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH5_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB1_CH5);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB1_CH5_ISR_API == STD_ON) */
#if (GPT_TAUB1_CH6_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH6_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB1_CH6);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB1_CH6_ISR_API == STD_ON) */
#if (GPT_TAUB1_CH7_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH7_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB1_CH7);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB1_CH7_ISR_API == STD_ON) */
#if (GPT_TAUB1_CH8_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH8_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB1_CH8);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB1_CH8_ISR_API == STD_ON) */
#if (GPT_TAUB1_CH9_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH9_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB1_CH9);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB1_CH9_ISR_API == STD_ON) */
#if (GPT_TAUB1_CH10_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH10_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB1_CH10);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB1_CH10_ISR_API == STD_ON) */
#if (GPT_TAUB1_CH11_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH11_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB1_CH11);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB1_CH11_ISR_API == STD_ON) */
#if (GPT_TAUB1_CH12_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH12_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB1_CH12);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB1_CH12_ISR_API == STD_ON) */
#if (GPT_TAUB1_CH13_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH13_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB1_CH13);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB1_CH13_ISR_API == STD_ON) */
#if (GPT_TAUB1_CH14_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH14_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB1_CH14);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB1_CH14_ISR_API == STD_ON) */
#if (GPT_TAUB1_CH15_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH15_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB1_CH15);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB1_CH15_ISR_API == STD_ON) */
#if (GPT_TAUB2_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB2_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB2_CH0_ISR_API == STD_ON) */
#if (GPT_TAUB2_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB2_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB2_CH1_ISR_API == STD_ON) */
#if (GPT_TAUB2_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB2_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB2_CH2_ISR_API == STD_ON) */
#if (GPT_TAUB2_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB2_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB2_CH3_ISR_API == STD_ON) */
#if (GPT_TAUB2_CH4_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH4_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB2_CH4);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB2_CH4_ISR_API == STD_ON) */
#if (GPT_TAUB2_CH5_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH5_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB2_CH5);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB2_CH5_ISR_API == STD_ON) */
#if (GPT_TAUB2_CH6_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH6_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB2_CH6);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB2_CH6_ISR_API == STD_ON) */
#if (GPT_TAUB2_CH7_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH7_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB2_CH7);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB2_CH7_ISR_API == STD_ON) */
#if (GPT_TAUB2_CH8_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH8_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB2_CH8);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB2_CH8_ISR_API == STD_ON) */
#if (GPT_TAUB2_CH9_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH9_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB2_CH9);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB2_CH9_ISR_API == STD_ON) */
#if (GPT_TAUB2_CH10_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH10_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB2_CH10);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB2_CH10_ISR_API == STD_ON) */
#if (GPT_TAUB2_CH11_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH11_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB2_CH11);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB2_CH11_ISR_API == STD_ON) */
#if (GPT_TAUB2_CH12_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH12_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB2_CH12);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB2_CH12_ISR_API == STD_ON) */
#if (GPT_TAUB2_CH13_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH13_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB2_CH13);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB2_CH13_ISR_API == STD_ON) */
#if (GPT_TAUB2_CH14_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH14_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB2_CH14);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB2_CH14_ISR_API == STD_ON) */
#if (GPT_TAUB2_CH15_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH15_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUB2_CH15);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUB2_CH15_ISR_API == STD_ON) */
/*******************************************************************************
** Function Name : TAUCn_CHm_ISR
**
** Service ID : NA
**
** Description : These are Interrupt routines for the timer TAUCn and
** m, where n represents the TAUC Units and m
** represents channels associated for each Unit.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
**
** Function(s) invoked:
** Gpt_CbkNotification
**
*******************************************************************************/
#if (GPT_TAUC2_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC2_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC2_CH0_ISR_API == STD_ON) */
#if (GPT_TAUC2_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC2_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC2_CH1_ISR_API == STD_ON) */
#if (GPT_TAUC2_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC2_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC2_CH2_ISR_API == STD_ON) */
#if (GPT_TAUC2_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC2_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC2_CH3_ISR_API == STD_ON) */
#if (GPT_TAUC2_CH4_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH4_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC2_CH4);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC2_CH4_ISR_API == STD_ON) */
#if (GPT_TAUC2_CH5_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH5_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC2_CH5);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC2_CH5_ISR_API == STD_ON) */
#if (GPT_TAUC2_CH6_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH6_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC2_CH6);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC2_CH6_ISR_API == STD_ON) */
#if (GPT_TAUC2_CH7_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH7_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC2_CH7);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC2_CH7_ISR_API == STD_ON) */
#if (GPT_TAUC2_CH8_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH8_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC2_CH8);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC2_CH8_ISR_API == STD_ON) */
#if (GPT_TAUC2_CH9_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH9_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC2_CH9);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC2_CH9_ISR_API == STD_ON) */
#if (GPT_TAUC2_CH10_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH10_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC2_CH10);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC2_CH10_ISR_API == STD_ON) */
#if (GPT_TAUC2_CH11_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH11_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC2_CH11);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC2_CH11_ISR_API == STD_ON) */
#if (GPT_TAUC2_CH12_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH12_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC2_CH12);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC2_CH12_ISR_API == STD_ON) */
#if (GPT_TAUC2_CH13_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH13_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC2_CH13);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC2_CH13_ISR_API == STD_ON) */
#if (GPT_TAUC2_CH14_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH14_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC2_CH14);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC2_CH14_ISR_API == STD_ON) */
#if (GPT_TAUC2_CH15_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH15_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC2_CH15);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC2_CH15_ISR_API == STD_ON) */
#if (GPT_TAUC3_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC3_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC3_CH0_ISR_API == STD_ON) */
#if (GPT_TAUC3_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC3_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC3_CH1_ISR_API == STD_ON) */
#if (GPT_TAUC3_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC3_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC3_CH2_ISR_API == STD_ON) */
#if (GPT_TAUC3_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC3_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC3_CH3_ISR_API == STD_ON) */
#if (GPT_TAUC3_CH4_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH4_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC3_CH4);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC3_CH4_ISR_API == STD_ON) */
#if (GPT_TAUC3_CH5_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH5_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC3_CH5);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC3_CH5_ISR_API == STD_ON) */
#if (GPT_TAUC3_CH6_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH6_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC3_CH6);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC3_CH6_ISR_API == STD_ON) */
#if (GPT_TAUC3_CH7_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH7_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC3_CH7);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC3_CH7_ISR_API == STD_ON) */
#if (GPT_TAUC3_CH8_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH8_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC3_CH8);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC3_CH8_ISR_API == STD_ON) */
#if (GPT_TAUC3_CH9_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH9_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC3_CH9);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC3_CH9_ISR_API == STD_ON) */
#if (GPT_TAUC3_CH10_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH10_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC3_CH10);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC3_CH10_ISR_API == STD_ON) */
#if (GPT_TAUC3_CH11_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH11_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC3_CH11);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC3_CH11_ISR_API == STD_ON) */
#if (GPT_TAUC3_CH12_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH12_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC3_CH12);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC3_CH12_ISR_API == STD_ON) */
#if (GPT_TAUC3_CH13_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH13_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC3_CH13);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC3_CH13_ISR_API == STD_ON) */
#if (GPT_TAUC3_CH14_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH14_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC3_CH14);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC3_CH14_ISR_API == STD_ON) */
#if (GPT_TAUC3_CH15_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH15_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC3_CH15);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC3_CH15_ISR_API == STD_ON) */
#if (GPT_TAUC4_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC4_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC4_CH0_ISR_API == STD_ON) */
#if (GPT_TAUC4_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC4_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC4_CH1_ISR_API == STD_ON) */
#if (GPT_TAUC4_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC4_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC4_CH2_ISR_API == STD_ON) */
#if (GPT_TAUC4_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC4_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC4_CH3_ISR_API == STD_ON) */
#if (GPT_TAUC4_CH4_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH4_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC4_CH4);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC4_CH4_ISR_API == STD_ON) */
#if (GPT_TAUC4_CH5_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH5_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC4_CH5);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC4_CH5_ISR_API == STD_ON) */
#if (GPT_TAUC4_CH6_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH6_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC4_CH6);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC4_CH6_ISR_API == STD_ON) */
#if (GPT_TAUC4_CH7_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH7_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC4_CH7);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC4_CH7_ISR_API == STD_ON) */
#if (GPT_TAUC4_CH8_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH8_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC4_CH8);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC4_CH8_ISR_API == STD_ON) */
#if (GPT_TAUC4_CH9_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH9_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC4_CH9);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC4_CH9_ISR_API == STD_ON) */
#if (GPT_TAUC4_CH10_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH10_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC4_CH10);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC4_CH10_ISR_API == STD_ON) */
#if (GPT_TAUC4_CH11_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH11_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC4_CH11);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC4_CH11_ISR_API == STD_ON) */
#if (GPT_TAUC4_CH12_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH12_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC4_CH12);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC4_CH12_ISR_API == STD_ON) */
#if (GPT_TAUC4_CH13_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH13_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC4_CH13);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC4_CH13_ISR_API == STD_ON) */
#if (GPT_TAUC4_CH14_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH14_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC4_CH14);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC4_CH14_ISR_API == STD_ON) */
#if (GPT_TAUC4_CH15_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH15_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC4_CH15);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC4_CH15_ISR_API == STD_ON) */
#if (GPT_TAUC5_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC5_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC5_CH0_ISR_API == STD_ON) */
#if (GPT_TAUC5_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC5_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC5_CH1_ISR_API == STD_ON) */
#if (GPT_TAUC5_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC5_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC5_CH2_ISR_API == STD_ON) */
#if (GPT_TAUC5_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC5_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC5_CH3_ISR_API == STD_ON) */
#if (GPT_TAUC5_CH4_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH4_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC5_CH4);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC5_CH4_ISR_API == STD_ON) */
#if (GPT_TAUC5_CH5_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH5_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC5_CH5);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC5_CH5_ISR_API == STD_ON) */
#if (GPT_TAUC5_CH6_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH6_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC5_CH6);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC5_CH6_ISR_API == STD_ON) */
#if (GPT_TAUC5_CH7_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH7_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC5_CH7);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC5_CH7_ISR_API == STD_ON) */
#if (GPT_TAUC5_CH8_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH8_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC5_CH8);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC5_CH8_ISR_API == STD_ON) */
#if (GPT_TAUC5_CH9_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH9_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC5_CH9);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC5_CH9_ISR_API == STD_ON) */
#if (GPT_TAUC5_CH10_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH10_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC5_CH10);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC5_CH10_ISR_API == STD_ON) */
#if (GPT_TAUC5_CH11_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH11_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC5_CH11);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC5_CH11_ISR_API == STD_ON) */
#if (GPT_TAUC5_CH12_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH12_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC5_CH12);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC5_CH12_ISR_API == STD_ON) */
#if (GPT_TAUC5_CH13_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH13_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC5_CH13);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC5_CH13_ISR_API == STD_ON) */
#if (GPT_TAUC5_CH14_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH14_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC5_CH14);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC5_CH14_ISR_API == STD_ON) */
#if (GPT_TAUC5_CH15_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH15_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC5_CH15);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC5_CH15_ISR_API == STD_ON) */
#if (GPT_TAUC6_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC6_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC6_CH0_ISR_API == STD_ON) */
#if (GPT_TAUC6_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC6_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC6_CH1_ISR_API == STD_ON) */
#if (GPT_TAUC6_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC6_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC6_CH2_ISR_API == STD_ON) */
#if (GPT_TAUC6_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC6_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC6_CH3_ISR_API == STD_ON) */
#if (GPT_TAUC6_CH4_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH4_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC6_CH4);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC6_CH4_ISR_API == STD_ON) */
#if (GPT_TAUC6_CH5_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH5_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC6_CH5);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC6_CH5_ISR_API == STD_ON) */
#if (GPT_TAUC6_CH6_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH6_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC6_CH6);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC6_CH6_ISR_API == STD_ON) */
#if (GPT_TAUC6_CH7_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH7_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC6_CH7);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC6_CH7_ISR_API == STD_ON) */
#if (GPT_TAUC6_CH8_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH8_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC6_CH8);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC6_CH8_ISR_API == STD_ON) */
#if (GPT_TAUC6_CH9_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH9_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC6_CH9);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC6_CH9_ISR_API == STD_ON) */
#if (GPT_TAUC6_CH10_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH10_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC6_CH10);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC6_CH10_ISR_API == STD_ON) */
#if (GPT_TAUC6_CH11_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH11_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC6_CH11);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC6_CH11_ISR_API == STD_ON) */
#if (GPT_TAUC6_CH12_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH12_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC6_CH12);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC6_CH12_ISR_API == STD_ON) */
#if (GPT_TAUC6_CH13_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH13_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC6_CH13);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC6_CH13_ISR_API == STD_ON) */
#if (GPT_TAUC6_CH14_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH14_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC6_CH14);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC6_CH14_ISR_API == STD_ON) */
#if (GPT_TAUC6_CH15_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH15_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC6_CH15);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC6_CH15_ISR_API == STD_ON) */
#if (GPT_TAUC7_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC7_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC7_CH0_ISR_API == STD_ON) */
#if (GPT_TAUC7_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC7_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC7_CH1_ISR_API == STD_ON) */
#if (GPT_TAUC7_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC7_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC7_CH2_ISR_API == STD_ON) */
#if (GPT_TAUC7_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC7_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC7_CH3_ISR_API == STD_ON) */
#if (GPT_TAUC7_CH4_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH4_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC7_CH4);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC7_CH4_ISR_API == STD_ON) */
#if (GPT_TAUC7_CH5_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH5_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC7_CH5);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC7_CH5_ISR_API == STD_ON) */
#if (GPT_TAUC7_CH6_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH6_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC7_CH6);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC7_CH6_ISR_API == STD_ON) */
#if (GPT_TAUC7_CH7_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH7_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC7_CH7);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC7_CH7_ISR_API == STD_ON) */
#if (GPT_TAUC7_CH8_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH8_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC7_CH8);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC7_CH8_ISR_API == STD_ON) */
#if (GPT_TAUC7_CH9_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH9_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC7_CH9);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC7_CH9_ISR_API == STD_ON) */
#if (GPT_TAUC7_CH10_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH10_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC7_CH10);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC7_CH10_ISR_API == STD_ON) */
#if (GPT_TAUC7_CH11_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH11_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC7_CH11);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC7_CH11_ISR_API == STD_ON) */
#if (GPT_TAUC7_CH12_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH12_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC7_CH12);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC7_CH12_ISR_API == STD_ON) */
#if (GPT_TAUC7_CH13_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH13_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC7_CH13);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC7_CH13_ISR_API == STD_ON) */
#if (GPT_TAUC7_CH14_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH14_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC7_CH14);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC7_CH14_ISR_API == STD_ON) */
#if (GPT_TAUC7_CH15_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH15_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC7_CH15);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC7_CH15_ISR_API == STD_ON) */
#if (GPT_TAUC8_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC8_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC8_CH0_ISR_API == STD_ON) */
#if (GPT_TAUC8_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC8_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC8_CH1_ISR_API == STD_ON) */
#if (GPT_TAUC8_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC8_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC8_CH2_ISR_API == STD_ON) */
#if (GPT_TAUC8_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC8_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC8_CH3_ISR_API == STD_ON) */
#if (GPT_TAUC8_CH4_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH4_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC8_CH4);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC8_CH4_ISR_API == STD_ON) */
#if (GPT_TAUC8_CH5_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH5_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC8_CH5);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC8_CH5_ISR_API == STD_ON) */
#if (GPT_TAUC8_CH6_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH6_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC8_CH6);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC8_CH6_ISR_API == STD_ON) */
#if (GPT_TAUC8_CH7_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH7_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC8_CH7);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC8_CH7_ISR_API == STD_ON) */
#if (GPT_TAUC8_CH8_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH8_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC8_CH8);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC8_CH8_ISR_API == STD_ON) */
#if (GPT_TAUC8_CH9_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH9_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC8_CH9);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC8_CH9_ISR_API == STD_ON) */
#if (GPT_TAUC8_CH10_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH10_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC8_CH10);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC8_CH10_ISR_API == STD_ON) */
#if (GPT_TAUC8_CH11_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH11_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC8_CH11);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC8_CH11_ISR_API == STD_ON) */
#if (GPT_TAUC8_CH12_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH12_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC8_CH12);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC8_CH12_ISR_API == STD_ON) */
#if (GPT_TAUC8_CH13_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH13_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC8_CH13);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC8_CH13_ISR_API == STD_ON) */
#if (GPT_TAUC8_CH14_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH14_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC8_CH14);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC8_CH14_ISR_API == STD_ON) */
#if (GPT_TAUC8_CH15_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH15_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUC8_CH15);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUC8_CH15_ISR_API == STD_ON) */
/*******************************************************************************
** Function Name : TAUJn_CHm_ISR
**
** Service ID : NA
**
** Description : These are Interrupt routines for the timer TAUJn and
** m, where n represents the TAUJ Units and m
** represents channels associated for each Unit.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
**
** Function(s) invoked:
** Gpt_CbkNotification
**
*******************************************************************************/
#if (GPT_TAUJ0_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ0_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ0_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUJ0_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUJ0_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUJ0_CH0_ISR_API == STD_ON) */
#if (GPT_TAUJ0_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ0_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ0_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUJ0_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUJ0_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUJ0_CH1_ISR_API == STD_ON) */
#if (GPT_TAUJ0_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ0_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ0_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUJ0_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUJ0_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUJ0_CH2_ISR_API == STD_ON) */
#if (GPT_TAUJ0_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ0_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ0_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUJ0_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUJ0_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUJ0_CH3_ISR_API == STD_ON) */
#if (GPT_TAUJ1_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ1_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ1_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUJ1_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUJ1_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUJ1_CH0_ISR_API == STD_ON) */
#if (GPT_TAUJ1_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ1_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ1_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUJ1_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUJ1_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUJ1_CH1_ISR_API == STD_ON) */
#if (GPT_TAUJ1_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ1_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ1_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUJ1_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUJ1_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUJ1_CH2_ISR_API == STD_ON) */
#if (GPT_TAUJ1_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ1_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ1_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUJ1_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUJ1_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUJ1_CH3_ISR_API == STD_ON) */
#if (GPT_TAUJ2_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ2_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ2_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUJ2_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUJ2_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUJ2_CH0_ISR_API == STD_ON) */
#if (GPT_TAUJ2_CH1_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ2_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ2_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUJ2_CH1_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUJ2_CH1);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUJ2_CH1_ISR_API == STD_ON) */
#if (GPT_TAUJ2_CH2_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ2_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ2_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUJ2_CH2_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUJ2_CH2);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUJ2_CH2_ISR_API == STD_ON) */
#if (GPT_TAUJ2_CH3_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ2_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ2_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) TAUJ2_CH3_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_TAUJ2_CH3);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_TAUJ2_CH3_ISR_API == STD_ON) */
/*******************************************************************************
** Function Name : OSTMn_CHm_ISR
**
** Service ID : NA
**
** Description : These are Interrupt routines for the timer OSTMn and
** m, where n represents the OSTM Units and m
** represents channels associated for each Unit.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
**
** Function(s) invoked:
** Gpt_CbkNotification
**
*******************************************************************************/
#if (GPT_OSTM0_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) OSTM0_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(OSTM0_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) OSTM0_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_OSTM0_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_OSTM0_CH0_ISR_API == STD_ON) */
#if (GPT_OSTM1_CH0_ISR_API == STD_ON)
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) OSTM1_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(OSTM1_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, GPT_PUBLIC_CODE) OSTM1_CH0_ISR(void)
#endif
{
Gpt_CbkNotification(GPT_OSTM1_CH0);
}
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* #if (GPT_OSTM1_CH0_ISR_API == STD_ON) */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Icu/Icu_Cfg.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Icu_Cfg.h */
/* Version = 3.0.0 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains pre-compile time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: : Initial version
*/
/******************************************************************************/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.0.13a
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_ICU_V304_130924_NEWCLEAPLUS.arxml
* GENERATED ON: 30 Sep 2013 - 10:23:54
*/
#ifndef ICU_CFG_H
#define ICU_CFG_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define ICU_CFG_AR_MAJOR_VERSION 3
#define ICU_CFG_AR_MINOR_VERSION 0
#define ICU_CFG_AR_PATCH_VERSION 0
/* File version information */
#define ICU_CFG_SW_MAJOR_VERSION 3
#define ICU_CFG_SW_MINOR_VERSION 0
/*******************************************************************************
** Common Published Information **
*******************************************************************************/
#define ICU_AR_MAJOR_VERSION_VALUE 3
#define ICU_AR_MINOR_VERSION_VALUE 0
#define ICU_AR_PATCH_VERSION_VALUE 0
#define ICU_SW_MAJOR_VERSION_VALUE 3
#define ICU_SW_MINOR_VERSION_VALUE 0
#define ICU_SW_PATCH_VERSION_VALUE 0
#define ICU_VENDOR_ID_VALUE (uint16)23
#define ICU_MODULE_ID_VALUE (uint16)122
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Instance ID of the ICU Driver*/
#define ICU_INSTANCE_ID_VALUE (uint8)0
/*Maximum number of channels configured*/
#define ICU_MAX_CHANNEL 3
/* Total number of ICU TAU units configured for previous input used */
#define ICU_TOTAL_UNITS_FOR_PREVINPUT 0
/*Total number of ICU TAU units configured*/
#define ICU_TOTAL_TAU_UNITS_CONFIGURED 2
/*Maximum ICU Channel ID configured */
#define ICU_MAX_CHANNEL_ID_CONFIGURED 169
/* Enables/Disables Development error detection */
#define ICU_DEV_ERROR_DETECT STD_OFF
/* Enables/Disables wakeup source reporting */
#define ICU_REPORT_WAKEUP_SOURCE STD_OFF
/* Enables/Disables the inclusion of Icu_DeInit API */
#define ICU_DE_INIT_API STD_OFF
/* Enables/Disables the inclusion of modules version information */
#define ICU_GET_VERSION_INFO_API STD_ON
/* Enables/Disables the inclusion of Icu_SetMode API */
#define ICU_SET_MODE_API STD_OFF
/* Enables/Disables the inclusion of Icu_DisableWakeup */
#define ICU_DISABLE_WAKEUP_API STD_OFF
/* Enables/Disables the inclusion of Icu_EnableWakeup API */
#define ICU_ENABLE_WAKEUP_API STD_OFF
/* Enables/Disables the inclusion of Icu_GetInputState API */
#define ICU_GET_INPUT_STATE_API STD_OFF
/* Enables/Disables the inclusion of Icu_StartTimestamp,
Icu_StopTimestamp and Icu_GetTimestampIndex APIs */
#define ICU_TIMESTAMP_API STD_OFF
/* Enables/Disables the inclusion of Icu_ResetEdgeCount,
Icu_EnableEdgeCount, Icu_DisableEdgeCount and Icu_GetEdgeNumbers APIs */
#define ICU_EDGE_COUNT_API STD_OFF
/* Enables/Disables the inclusion of Icu_GetTimeElapsed API */
#define ICU_GET_TIME_ELAPSED_API STD_OFF
/* Enables/Disables the inclusion of Icu_GetDutyCycleValues API */
#define ICU_GET_DUTY_CYCLE_VALUES_API STD_ON
/* Enables/Disables Icu_StartSignalMeasurement and
Icu_StopSignalMeasurement APIs */
#define ICU_SIGNAL_MEASUREMENT_API STD_ON
/* Adds / removes all services related to the edge
detection functionality from the code */
#define ICU_EDGE_DETECTION_API STD_ON
/* Enables/Disables the spilt of one Port pin signal to two TAU inputs */
#define ICU_PREVIOUS_INPUT_USED STD_OFF
/* Macro for critical section */
#define ICU_CRITICAL_SECTION_PROTECTION STD_ON
/* Enable/disable the setting of Prescaler, baudrate and
blConfigurePrescaler by the ICU Driver */
#define ICU_PRESCALER_CONFIGURED STD_ON
/* Indicates the inclusion of notification function */
#define ICU_NOTIFICATION_CONFIG STD_ON
/* Enables/Disables the use of TAUA unit depending on the TAUA channels configured*/
#define ICU_TAUA_UNIT_USED STD_ON
/* Enables/Disables the use of TAUB unit depending on the TAUB channels configured */
#define ICU_TAUB_UNIT_USED STD_ON
/* Enables/Disables the use of TAUJ unit depending on the TAUJ channels configured */
#define ICU_TAUJ_UNIT_USED STD_OFF
/* Indicates whether the timer channels configured or not*/
#define ICU_TIMER_CH_CONFIGURED STD_ON
/*******************************************************************************
** Macro Definitions **
*******************************************************************************/
#define ICU_EXT_INTP_0_ISR_API STD_OFF
#define ICU_EXT_INTP_10_ISR_API STD_OFF
#define ICU_EXT_INTP_11_ISR_API STD_OFF
#define ICU_EXT_INTP_12_ISR_API STD_OFF
#define ICU_EXT_INTP_13_ISR_API STD_ON
#define ICU_EXT_INTP_14_ISR_API STD_OFF
#define ICU_EXT_INTP_15_ISR_API STD_OFF
#define ICU_EXT_INTP_1_ISR_API STD_OFF
#define ICU_EXT_INTP_2_ISR_API STD_OFF
#define ICU_EXT_INTP_3_ISR_API STD_OFF
#define ICU_EXT_INTP_4_ISR_API STD_OFF
#define ICU_EXT_INTP_5_ISR_API STD_OFF
#define ICU_EXT_INTP_6_ISR_API STD_OFF
#define ICU_EXT_INTP_7_ISR_API STD_OFF
#define ICU_EXT_INTP_8_ISR_API STD_OFF
#define ICU_EXT_INTP_9_ISR_API STD_OFF
#define ICU_TAUA0_CH0_ISR_API STD_OFF
#define ICU_TAUA0_CH10_ISR_API STD_OFF
#define ICU_TAUA0_CH11_ISR_API STD_OFF
#define ICU_TAUA0_CH12_ISR_API STD_OFF
#define ICU_TAUA0_CH13_ISR_API STD_OFF
#define ICU_TAUA0_CH14_ISR_API STD_OFF
#define ICU_TAUA0_CH15_ISR_API STD_OFF
#define ICU_TAUA0_CH1_ISR_API STD_OFF
#define ICU_TAUA0_CH2_ISR_API STD_OFF
#define ICU_TAUA0_CH3_ISR_API STD_OFF
#define ICU_TAUA0_CH4_ISR_API STD_ON
#define ICU_TAUA0_CH5_ISR_API STD_ON
#define ICU_TAUA0_CH6_ISR_API STD_OFF
#define ICU_TAUA0_CH7_ISR_API STD_OFF
#define ICU_TAUA0_CH8_ISR_API STD_OFF
#define ICU_TAUA0_CH9_ISR_API STD_OFF
#define ICU_TAUA1_CH0_ISR_API STD_OFF
#define ICU_TAUA1_CH10_ISR_API STD_OFF
#define ICU_TAUA1_CH11_ISR_API STD_OFF
#define ICU_TAUA1_CH12_ISR_API STD_OFF
#define ICU_TAUA1_CH13_ISR_API STD_OFF
#define ICU_TAUA1_CH14_ISR_API STD_OFF
#define ICU_TAUA1_CH15_ISR_API STD_OFF
#define ICU_TAUA1_CH1_ISR_API STD_OFF
#define ICU_TAUA1_CH2_ISR_API STD_OFF
#define ICU_TAUA1_CH3_ISR_API STD_OFF
#define ICU_TAUA1_CH4_ISR_API STD_OFF
#define ICU_TAUA1_CH5_ISR_API STD_OFF
#define ICU_TAUA1_CH6_ISR_API STD_OFF
#define ICU_TAUA1_CH7_ISR_API STD_OFF
#define ICU_TAUA1_CH8_ISR_API STD_OFF
#define ICU_TAUA1_CH9_ISR_API STD_OFF
#define ICU_TAUA2_CH0_ISR_API STD_OFF
#define ICU_TAUA2_CH10_ISR_API STD_OFF
#define ICU_TAUA2_CH11_ISR_API STD_OFF
#define ICU_TAUA2_CH12_ISR_API STD_OFF
#define ICU_TAUA2_CH13_ISR_API STD_OFF
#define ICU_TAUA2_CH14_ISR_API STD_OFF
#define ICU_TAUA2_CH15_ISR_API STD_OFF
#define ICU_TAUA2_CH1_ISR_API STD_OFF
#define ICU_TAUA2_CH2_ISR_API STD_OFF
#define ICU_TAUA2_CH3_ISR_API STD_OFF
#define ICU_TAUA2_CH4_ISR_API STD_OFF
#define ICU_TAUA2_CH5_ISR_API STD_OFF
#define ICU_TAUA2_CH6_ISR_API STD_OFF
#define ICU_TAUA2_CH7_ISR_API STD_OFF
#define ICU_TAUA2_CH8_ISR_API STD_OFF
#define ICU_TAUA2_CH9_ISR_API STD_OFF
#define ICU_TAUA3_CH0_ISR_API STD_OFF
#define ICU_TAUA3_CH10_ISR_API STD_OFF
#define ICU_TAUA3_CH11_ISR_API STD_OFF
#define ICU_TAUA3_CH12_ISR_API STD_OFF
#define ICU_TAUA3_CH13_ISR_API STD_OFF
#define ICU_TAUA3_CH14_ISR_API STD_OFF
#define ICU_TAUA3_CH15_ISR_API STD_OFF
#define ICU_TAUA3_CH1_ISR_API STD_OFF
#define ICU_TAUA3_CH2_ISR_API STD_OFF
#define ICU_TAUA3_CH3_ISR_API STD_OFF
#define ICU_TAUA3_CH4_ISR_API STD_OFF
#define ICU_TAUA3_CH5_ISR_API STD_OFF
#define ICU_TAUA3_CH6_ISR_API STD_OFF
#define ICU_TAUA3_CH7_ISR_API STD_OFF
#define ICU_TAUA3_CH8_ISR_API STD_OFF
#define ICU_TAUA3_CH9_ISR_API STD_OFF
#define ICU_TAUA4_CH0_ISR_API STD_OFF
#define ICU_TAUA4_CH10_ISR_API STD_OFF
#define ICU_TAUA4_CH11_ISR_API STD_OFF
#define ICU_TAUA4_CH12_ISR_API STD_OFF
#define ICU_TAUA4_CH13_ISR_API STD_OFF
#define ICU_TAUA4_CH14_ISR_API STD_OFF
#define ICU_TAUA4_CH15_ISR_API STD_OFF
#define ICU_TAUA4_CH1_ISR_API STD_OFF
#define ICU_TAUA4_CH2_ISR_API STD_OFF
#define ICU_TAUA4_CH3_ISR_API STD_OFF
#define ICU_TAUA4_CH4_ISR_API STD_OFF
#define ICU_TAUA4_CH5_ISR_API STD_OFF
#define ICU_TAUA4_CH6_ISR_API STD_OFF
#define ICU_TAUA4_CH7_ISR_API STD_OFF
#define ICU_TAUA4_CH8_ISR_API STD_OFF
#define ICU_TAUA4_CH9_ISR_API STD_OFF
#define ICU_TAUA5_CH0_ISR_API STD_OFF
#define ICU_TAUA5_CH10_ISR_API STD_OFF
#define ICU_TAUA5_CH11_ISR_API STD_OFF
#define ICU_TAUA5_CH12_ISR_API STD_OFF
#define ICU_TAUA5_CH13_ISR_API STD_OFF
#define ICU_TAUA5_CH14_ISR_API STD_OFF
#define ICU_TAUA5_CH15_ISR_API STD_OFF
#define ICU_TAUA5_CH1_ISR_API STD_OFF
#define ICU_TAUA5_CH2_ISR_API STD_OFF
#define ICU_TAUA5_CH3_ISR_API STD_OFF
#define ICU_TAUA5_CH4_ISR_API STD_OFF
#define ICU_TAUA5_CH5_ISR_API STD_OFF
#define ICU_TAUA5_CH6_ISR_API STD_OFF
#define ICU_TAUA5_CH7_ISR_API STD_OFF
#define ICU_TAUA5_CH8_ISR_API STD_OFF
#define ICU_TAUA5_CH9_ISR_API STD_OFF
#define ICU_TAUA6_CH0_ISR_API STD_OFF
#define ICU_TAUA6_CH10_ISR_API STD_OFF
#define ICU_TAUA6_CH11_ISR_API STD_OFF
#define ICU_TAUA6_CH12_ISR_API STD_OFF
#define ICU_TAUA6_CH13_ISR_API STD_OFF
#define ICU_TAUA6_CH14_ISR_API STD_OFF
#define ICU_TAUA6_CH15_ISR_API STD_OFF
#define ICU_TAUA6_CH1_ISR_API STD_OFF
#define ICU_TAUA6_CH2_ISR_API STD_OFF
#define ICU_TAUA6_CH3_ISR_API STD_OFF
#define ICU_TAUA6_CH4_ISR_API STD_OFF
#define ICU_TAUA6_CH5_ISR_API STD_OFF
#define ICU_TAUA6_CH6_ISR_API STD_OFF
#define ICU_TAUA6_CH7_ISR_API STD_OFF
#define ICU_TAUA6_CH8_ISR_API STD_OFF
#define ICU_TAUA6_CH9_ISR_API STD_OFF
#define ICU_TAUA7_CH0_ISR_API STD_OFF
#define ICU_TAUA7_CH10_ISR_API STD_OFF
#define ICU_TAUA7_CH11_ISR_API STD_OFF
#define ICU_TAUA7_CH12_ISR_API STD_OFF
#define ICU_TAUA7_CH13_ISR_API STD_OFF
#define ICU_TAUA7_CH14_ISR_API STD_OFF
#define ICU_TAUA7_CH15_ISR_API STD_OFF
#define ICU_TAUA7_CH1_ISR_API STD_OFF
#define ICU_TAUA7_CH2_ISR_API STD_OFF
#define ICU_TAUA7_CH3_ISR_API STD_OFF
#define ICU_TAUA7_CH4_ISR_API STD_OFF
#define ICU_TAUA7_CH5_ISR_API STD_OFF
#define ICU_TAUA7_CH6_ISR_API STD_OFF
#define ICU_TAUA7_CH7_ISR_API STD_OFF
#define ICU_TAUA7_CH8_ISR_API STD_OFF
#define ICU_TAUA7_CH9_ISR_API STD_OFF
#define ICU_TAUA8_CH0_ISR_API STD_OFF
#define ICU_TAUA8_CH10_ISR_API STD_OFF
#define ICU_TAUA8_CH11_ISR_API STD_OFF
#define ICU_TAUA8_CH12_ISR_API STD_OFF
#define ICU_TAUA8_CH13_ISR_API STD_OFF
#define ICU_TAUA8_CH14_ISR_API STD_OFF
#define ICU_TAUA8_CH15_ISR_API STD_OFF
#define ICU_TAUA8_CH1_ISR_API STD_OFF
#define ICU_TAUA8_CH2_ISR_API STD_OFF
#define ICU_TAUA8_CH3_ISR_API STD_OFF
#define ICU_TAUA8_CH4_ISR_API STD_OFF
#define ICU_TAUA8_CH5_ISR_API STD_OFF
#define ICU_TAUA8_CH6_ISR_API STD_OFF
#define ICU_TAUA8_CH7_ISR_API STD_OFF
#define ICU_TAUA8_CH8_ISR_API STD_OFF
#define ICU_TAUA8_CH9_ISR_API STD_OFF
#define ICU_TAUB1_CH0_ISR_API STD_OFF
#define ICU_TAUB1_CH10_ISR_API STD_OFF
#define ICU_TAUB1_CH11_ISR_API STD_OFF
#define ICU_TAUB1_CH12_ISR_API STD_OFF
#define ICU_TAUB1_CH13_ISR_API STD_OFF
#define ICU_TAUB1_CH14_ISR_API STD_OFF
#define ICU_TAUB1_CH15_ISR_API STD_OFF
#define ICU_TAUB1_CH1_ISR_API STD_OFF
#define ICU_TAUB1_CH2_ISR_API STD_OFF
#define ICU_TAUB1_CH3_ISR_API STD_OFF
#define ICU_TAUB1_CH4_ISR_API STD_OFF
#define ICU_TAUB1_CH5_ISR_API STD_OFF
#define ICU_TAUB1_CH6_ISR_API STD_OFF
#define ICU_TAUB1_CH7_ISR_API STD_OFF
#define ICU_TAUB1_CH8_ISR_API STD_OFF
#define ICU_TAUB1_CH9_ISR_API STD_OFF
#define ICU_TAUB2_CH0_ISR_API STD_OFF
#define ICU_TAUB2_CH10_ISR_API STD_OFF
#define ICU_TAUB2_CH11_ISR_API STD_OFF
#define ICU_TAUB2_CH12_ISR_API STD_OFF
#define ICU_TAUB2_CH13_ISR_API STD_OFF
#define ICU_TAUB2_CH14_ISR_API STD_OFF
#define ICU_TAUB2_CH15_ISR_API STD_OFF
#define ICU_TAUB2_CH1_ISR_API STD_OFF
#define ICU_TAUB2_CH2_ISR_API STD_OFF
#define ICU_TAUB2_CH3_ISR_API STD_OFF
#define ICU_TAUB2_CH4_ISR_API STD_OFF
#define ICU_TAUB2_CH5_ISR_API STD_OFF
#define ICU_TAUB2_CH6_ISR_API STD_OFF
#define ICU_TAUB2_CH7_ISR_API STD_OFF
#define ICU_TAUB2_CH8_ISR_API STD_OFF
#define ICU_TAUB2_CH9_ISR_API STD_OFF
#define ICU_TAUJ0_CH0_ISR_API STD_OFF
#define ICU_TAUJ0_CH1_ISR_API STD_OFF
#define ICU_TAUJ0_CH2_ISR_API STD_OFF
#define ICU_TAUJ0_CH3_ISR_API STD_OFF
#define ICU_TAUJ1_CH0_ISR_API STD_OFF
#define ICU_TAUJ1_CH1_ISR_API STD_OFF
#define ICU_TAUJ1_CH2_ISR_API STD_OFF
#define ICU_TAUJ1_CH3_ISR_API STD_OFF
#define ICU_TAUJ2_CH0_ISR_API STD_OFF
#define ICU_TAUJ2_CH1_ISR_API STD_OFF
#define ICU_TAUJ2_CH2_ISR_API STD_OFF
#define ICU_TAUJ2_CH3_ISR_API STD_OFF
/*******************************************************************************
** Channel Handles **
*******************************************************************************/
/* ICU Channel Handles */
#define IcuChannel0 (uint8)4
#define IcuChannel2 (uint8)169
/* Configuration Set Handles */
#define IcuConfigSet0 &Icu_GstConfiguration[0]
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* ICU_CFG_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Mcu/Mcu_Lcfg.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* File name = Mcu_Lcfg.c */
/* Version = 3.1.6 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of AUTOSAR MCU Link Time parameters */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.1.13
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_MCU_V308_140113_HEADLAMP.arxml
* GENERATED ON: 14 Jan 2014 - 12:18:18
*/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Mcu_LTTypes.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define MCU_LCFG_C_AR_MAJOR_VERSION 2
#define MCU_LCFG_C_AR_MINOR_VERSION 2
#define MCU_LCFG_C_AR_PATCH_VERSION 1
/* File version information */
#define MCU_LCFG_C_SW_MAJOR_VERSION 3
#define MCU_LCFG_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (MCU_LTTYPES_AR_MAJOR_VERSION != MCU_LCFG_C_AR_MAJOR_VERSION)
#error "Mcu_Lcfg.c : Mismatch in Specification Major Version"
#endif
#if (MCU_LTTYPES_AR_MINOR_VERSION != MCU_LCFG_C_AR_MINOR_VERSION)
#error "Mcu_Lcfg.c : Mismatch in Specification Minor Version"
#endif
#if (MCU_LTTYPES_AR_PATCH_VERSION != MCU_LCFG_C_AR_PATCH_VERSION)
#error "Mcu_Lcfg.c : Mismatch in Specification Patch Version"
#endif
#if (MCU_SW_MAJOR_VERSION != MCU_LCFG_C_SW_MAJOR_VERSION)
#error "Mcu_Lcfg.c : Mismatch in Major Version"
#endif
#if (MCU_SW_MINOR_VERSION != MCU_LCFG_C_SW_MINOR_VERSION)
#error "Mcu_Lcfg.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
#define MCU_START_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/* Data Structure of RAM setting Configuration */
CONST(Tdd_Mcu_RamSetting, MCU_CONST) Mcu_GstRamSetting[1] =
{
/* Structure for RAM setting: 0 */
{
/* pRamStartAddress */
(P2VAR(uint8, AUTOMATIC, MCU_CONFIG_DATA))0xFEDDC000,
/* ulRamSectionSize */
0x00000100,
/* ucRamInitValue */
0xFF
}
};
#define MCU_STOP_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Icu/Icu_LLDriver.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Icu_LLDriver.h */
/* Version = 3.0.2a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains Low level driver function prototypes of the ICU */
/* Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 26-Aug-2009 : Initial version
*
* V3.0.1: 25-Feb-2010 : As per SCR 192, the prototypes of the functions
* Icu_HWEdgeCountingInit, Icu_HWTimestampInit and
* Icu_HWSignalMeasurementInit are updated.
*
* V3.0.2: 28-Jun-2010 : As per SCR 286, following changes are done:
* 1. Precompile option for Icu_HWResetEdgeCount
* is modified to support Timer Array Unit B.
* 2. Tab spaces are removed.
* V3.0.2a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
#ifndef ICU_LLDRIVER_H
#define ICU_LLDRIVER_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define ICU_LLDRIVER_AR_MAJOR_VERSION ICU_AR_MAJOR_VERSION_VALUE
#define ICU_LLDRIVER_AR_MINOR_VERSION ICU_AR_MINOR_VERSION_VALUE
#define ICU_LLDRIVER_AR_PATCH_VERSION ICU_AR_PATCH_VERSION_VALUE
/*
* File version information
*/
#define ICU_LLDRIVER_SW_MAJOR_VERSION 3
#define ICU_LLDRIVER_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#define ICU_START_SEC_PRIVATE_CODE
#include "MemMap.h"
extern FUNC(void, ICU_PRIVATE_CODE) Icu_HWEdgeCountingInit
(P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)LpChannelConfig,
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig);
extern FUNC(void, ICU_PRIVATE_CODE) Icu_HWTimestampInit
(P2CONST(Tdd_Icu_ChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)LpChannelConfig,
P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig);
extern FUNC(void, ICU_PRIVATE_CODE) Icu_HWSignalMeasurementInit
(P2CONST(Tdd_Icu_TimerChannelConfigType, AUTOMATIC, ICU_CONFIG_CONST)
LpTimerChannelConfig);
extern FUNC(void, ICU_PRIVATE_CODE) Icu_HWInitInputSelection
(P2CONST(Icu_ConfigType, AUTOMATIC, ICU_APPL_CONST) ConfigPtr);
extern FUNC(void, ICU_PRIVATE_CODE) Icu_HWInit(void);
extern FUNC(void, ICU_PRIVATE_CODE) Icu_HWSetActivation
(uint8 LucChannel, Icu_ActivationType LucActiveEdge);
#if (ICU_DE_INIT_API == STD_ON)
extern FUNC(void, ICU_PRIVATE_CODE) Icu_HWDeInitInputSelection(void);
#endif
extern FUNC(void, ICU_PRIVATE_CODE) Icu_HWDeInit(void);
extern FUNC(void, ICU_PRIVATE_CODE) Icu_HWSetMode(Icu_ModeType Mode);
#if((ICU_TAUA_UNIT_USED == STD_ON) || (ICU_TAUB_UNIT_USED == STD_ON))
extern FUNC(void, ICU_PRIVATE_CODE) Icu_HWResetEdgeCount(uint8 LucChannel);
#endif
extern FUNC(Icu_EdgeNumberType, ICU_PRIVATE_CODE) Icu_HWReadEdgeCount
(uint8 LucChannel);
extern FUNC(void, ICU_PRIVATE_CODE)Icu_ServiceSignalMeasurement
(Icu_ChannelType LddChannel);
extern FUNC(void, ICU_PRIVATE_CODE)Icu_ServiceTimestamp
(Icu_ChannelType LddChannel, uint32 LulCapturedTimestampVal);
extern FUNC(void, ICU_PRIVATE_CODE) Icu_TimerIsr(Icu_ChannelType LddChannel);
extern FUNC(void, ICU_PRIVATE_CODE) Icu_ExternalInterruptIsr
(Icu_ChannelType LddChannel);
extern FUNC(void, ICU_PRIVATE_CODE) Icu_HWStartCountMeasurement
(Icu_ChannelType LddChannel);
extern FUNC(void, ICU_PRIVATE_CODE) Icu_HWStopCountMeasurement
(Icu_ChannelType LddChannel);
extern FUNC(void, ICU_PRIVATE_CODE) Icu_HWGetEdgeNumbers
(Icu_ChannelType LddChannel);
#define ICU_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#endif /* ICU_LLDRIVER_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/IoHwAb/IoHwAb_LED.h
/*============================================================================*/
/* Project = Led know how */
/* Module = CommEn.c */
/* Version = 0.0.0a */
/* Date = 18-Dec-2013 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V0.0.0: 14-Jan-2014 : Initial Version. By ZhanYi@Renesas
*******************************************************************************/
#ifndef IOHWAB_LED_H
#define IOHWAB_LED_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Pwm.h"
#include "Dio.h"
#include "IoHwAb_LEDcfg.h"
/*******************************************************************************
| Macro Definition
|******************************************************************************/
#define EN3PWM PwmChannel1
#define EN2PWM PwmChannel2
#define EN1PWM PwmChannel3
#define PWM_1 PwmChannel5
#define PWM_2 PwmChannel6
#define PWM_3 PwmChannel7
#define PWM_9 PwmChannel9
#define PWM_8 PwmChannel11
#define PWM_12 PwmChannel13
#define FREQ1 PwmChannel16
#define FREQ2 PwmChannel15
#define FREQ3 PwmChannel17
#define FREQ1 PwmChannel19
#define PWM_4 PwmChannel21
#define PWM_5 PwmChannel23
#define PWM_11 PwmChannel25
#define PWM_10 PwmChannel27
//#define PWM_12 PwmChannel29
#define PWM_7 PwmChannel31
#define PWM_6 PwmChannel33
/*PWM mode control - normal control or device control*/
#define TeLED_Mode uint8
#define LED_MODE_NORMAL 0
#define LED_MODE_DEVCTRL 1 /*Diagnostic mode -device control*/
typedef enum
{
CeIoHwAb_e_PwmTypeHw,
CeIoHwAb_e_PwmTypeSim
} TeIoHwAb_PwmType;
typedef struct
{
boolean m_b_Enable;
TeIoHwAb_PwmType m_e_PwmType; /* determine hw type or simulate type*/
uint16 m_w_ChannelId; /* if hardwire PWM, this is pwm channel id; if simulate PWM, this is simulate PWM channel Id*/
uint16 m_w_InitPeriod; /* Initial PWM peirod*/
uint16 m_w_InitDuty; /* Initial PWM Duty*/
} TePWM_h_Config;
/*Simulate PWM channel configurations*/
typedef struct
{
boolean m_b_PreDutyHigh; /*set the MCU output high/low before acheve duty point*/
Dio_ChannelType m_t_DioChannelId;
TeLED_ChName m_e_CrossRefLED; /*cross reference PWM name*/
} TePWM_h_SimChCfg;
typedef struct
{
uint16 m_w_Period; /*actual command period*/
uint16 m_w_Duty; /*actual command duty*/
uint16 m_w_AEPeriod; /*device control*/
uint16 m_w_AEDuty; /*device control*/
uint16 m_w_AppPeriod; /*App control*/
uint16 m_w_AppDuty; /*App control*/
} TeLED_h_ChPeriodDuty;
extern const TePWM_h_Config CaLED_h_PWMCfg[CeLED_e_ChNum];
extern const TePWM_h_Config CaLED_h_RTCfg[CeLED_e_ChNum];
extern const TePWM_h_Config CaLED_h_AdimCfg[CeLED_e_ChNum];
extern const TePWM_h_SimChCfg CaLED_h_SimChCfg[CeLED_e_SwLEDChNum];
/*******************************************************************************
| Global Function Prototypes
|******************************************************************************/
void Set_LED1(void);
void Clr_LED1(void);
void Set_LED3(void);
void Clr_LED3(void);
void Set_LowBeam2(void);
void Clr_LowBeam2(void);
#endif
<file_sep>/BSP/MCAL/Icu/Icu_PBTypes.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Icu_PBTypes.h */
/* Version = 3.0.8a */
/* Date = 22-Sep-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains macros and structure datatypes for post build */
/* parameters of ICU Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 26-Aug-2009 : Initial version
*
* V3.0.1: 05-Nov-2009 : As per SCR 088, I/O structure is updated to have
* separate base address for USER and OS registers.
*
* V3.0.2: 30-Nov-2009 : As per SCR 154, pointer class PWM_CONFIG_DATA is
* changed to ICU_CONFIG_DATA in the
* structure STagTdd_Icu_TimerChannelConfigType.
*
* V3.0.3: 25-Feb-2010 : As per SCR 192, following changes are done:
* 1. A macro ICU_BYPASS_MASK is added.
* 2. The structure 'Tdd_Icu_ExtIntpConfigType'
* is removed.
* 3. Pointer to the ICU Channel properties based
* on Measurement Mode is moved from
* 'Tdd_Icu_ChannelConfigType' structure to
* 'Tdd_Icu_TimerChannelConfigType' structure.
*
* V3.0.4: 28-Jun-2010 : As per SCR 286, structures are modified to
* support Timer Array Unit B.
*
* V3.0.5: 20-Jul-2010 : As per SCR 308, comments are updated for
* Timer Array Unit B.
*
* V3.0.6: 26-Aug-2010 : As per SCR 335, following changes are done:
* 1. The elements uiDataValid and
* uiFirstEdge are removed from and
* blDutyCycleChannel is added in the structure
* Tdd_Icu_SignalMeasureChannelRamDataType.
* 2. An element blTimestampingStarted is
* added in structure
* Tdd_Icu_TimeStampChannelRamDataType to check
* whether timestamping is started or not.
*
* V3.0.7: 07-Apr-2011 : As per SCR 433, the type of "ICU_TAUAB_MAX_CNT_VAL"
* is changed from uint16 to uint32.
*
* V3.0.8: 24-Jun-2011 : As per SCR 477, following changes are done:
* 1. Access size is updated for registers
* TAUAnBRS, TAUJnBRS, TAUJnTS, TAUJnTT, TAUJnTE,
* TAUABnCMURm, TAUABnCSRm, TAUABnCSCm, TAUJnCMURm,
* TAUJnCSRm, TAUJnCSCm. Structures
* STagTdd_Icu_TAUABUnitOsRegs,
* STagTdd_Icu_TAUJUnitUserRegs,
* STagTdd_Icu_TAUJUnitOsRegs,
* STagTdd_Icu_TAUABChannelUserRegs,
* STagTdd_Icu_TAUJChannelUserRegs are modified.
* 2. In structure STagTdd_Icu_TimerChannelConfigType,
* data type is updated for variable
* usChannelModeUserRegSettings to
* ucChannelModeUserRegSettings.
* 3. ICU_OVERFLOW_BIT_MASK macro type is changed to
* uint8 from uint16.
*
* V3.0.8a: 22-Sep-2011 : As per MANTIS #3551, the macro
* ICU_CLEAR_INT_REQUEST_FLAG is added to clear the
* interrupt request flag.
* As per MANTIS #3708, the variable
* ulPrevSignalActiveTime is added.
* As per MANTIS #4019, when overflow occurs, a captured
* timestamp value shall be always maximum count value
* for each timer.(TAUA or TAUB = 0xFFFF,
* TAUJ = 0xFFFFFFFF).
* Therefore ICU_TAUAB_MAX_CNT_VAL is updated to 0xFFFF.
* Copyright is updated.
*/
/******************************************************************************/
#ifndef ICU_PBTYPES_H
#define ICU_PBTYPES_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Icu.h"
#if (ICU_REPORT_WAKEUP_SOURCE == STD_ON)
#include "EcuM.h"
#endif
#include "V850_Types.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define ICU_PBTYPES_AR_MAJOR_VERSION ICU_AR_MAJOR_VERSION_VALUE
#define ICU_PBTYPES_AR_MINOR_VERSION ICU_AR_MINOR_VERSION_VALUE
#define ICU_PBTYPES_AR_PATCH_VERSION ICU_AR_PATCH_VERSION_VALUE
/*
* File version information
*/
#define ICU_PBTYPES_SW_MAJOR_VERSION 3
#define ICU_PBTYPES_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
#define ICU_TRUE (boolean)0x01
#define ICU_FALSE (boolean)0x00
#define ICU_INITIALIZED (boolean)0x01
#define ICU_UNINITIALIZED (boolean)0x00
#define ICU_NO_CBK_CONFIGURED (uint8)0xFF
/* Macro to avoid Magic numbers */
#define ICU_DBTOC_VALUE \
((ICU_VENDOR_ID_VALUE << 22) | \
(ICU_MODULE_ID_VALUE << 14) | \
(ICU_SW_MAJOR_VERSION_VALUE << 8) | \
(ICU_SW_MINOR_VERSION_VALUE << 3))
#define ICU_CHANNEL_UNCONFIGURED (uint8)0xFF
#define ICU_HW_EXT_INTP (uint8)0x00
#define ICU_HW_TAUA (uint8)0x01
#define ICU_HW_TAUB (uint8)0x02
#define ICU_HW_TAUJ (uint8)0x03
#define ICU_ZERO (uint8)0x00
#define ICU_ONE (uint8)0x01
#define ICU_WORD_ONE (uint16)0x0001
#define ICU_WORD_ZERO (uint16)0x0000
#define ICU_DOUBLE_ZERO (uint32)0x00000000
#define ICU_OVERFLOW_BIT_MASK (uint8)0x01
#define ICU_TAUAB_MAX_CNT_VAL (uint16)0xFFFF
#define ICU_TAUJ_MAX_CNT_VAL (uint32)0xFFFFFFFFul
#define ICU_TIMER_RESET_VAL (uint16)0xFFFF
#define ICU_TAUAB_START_DWNCNT_VAL (uint16)0xFFFF
#define ICU_TAUJ_START_DWNCNT_VAL (uint32)0xFFFFFFFFul
#define ICU_BYPASS_MASK (uint8)0xF8
#define ICU_BOTH_EDGES_MASK (uint8)0x03
#define ICU_FALLING_EDGE_MASK (uint8)0x02
#define ICU_RISING_EDGE_MASK (uint8)0x01
#define ICU_CLEAR_INT_REQUEST_FLAG (uint16)0xEFFF
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Data structure for Timer Array Units A and B user control registers **
*******************************************************************************/
#if ((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUB_UNIT_USED == STD_ON))
typedef struct STagTdd_Icu_TAUABUnitUserRegs
{
uint16 volatile usTAUABnTOL;
uint16 volatile usReserved1;
uint16 volatile usTAUABnRDT;
uint16 volatile usReserved2;
uint16 volatile usTAUABnRSF;
uint16 volatile usReserved3;
uint16 volatile usTAUABnTRO;
uint16 volatile usReserved4;
uint16 volatile usTAUABnTME;
uint16 volatile usReserved5;
uint16 volatile usTAUABnTDL;
uint16 volatile usReserved6;
uint16 volatile usTAUABnTO;
uint16 volatile usReserved7;
uint16 volatile usTAUABnTOE;
uint16 volatile aaReserved8[177];
uint16 volatile usTAUABnTE;
uint16 volatile usReserved9;
uint16 volatile usTAUABnTS;
uint16 volatile usReserved10;
uint16 volatile usTAUABnTT;
}Tdd_Icu_TAUABUnitUserRegs;
#endif
/*******************************************************************************
** Data structure for Timer Array Units A and B os control registers **
*******************************************************************************/
#if ((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUB_UNIT_USED == STD_ON))
typedef struct STagTdd_Icu_TAUABUnitOsRegs
{
uint16 volatile usTAUABnTPS;
uint16 volatile usReserved1;
uint8 volatile ucTAUAnBRS;
}Tdd_Icu_TAUABUnitOsRegs;
#endif
/*******************************************************************************
** Data structure for Timer Array Units J user control registers **
*******************************************************************************/
#if(ICU_TAUJ_UNIT_USED == STD_ON)
typedef struct STagTdd_Icu_TAUJUnitUserRegs
{
uint8 volatile ucTAUJnTE;
uint8 volatile ucReserved1;
uint16 volatile usReserved2;
uint8 volatile ucTAUJnTS;
uint8 volatile ucReserved3;
uint16 volatile usReserved4;
uint8 volatile ucTAUJnTT;
}Tdd_Icu_TAUJUnitUserRegs;
#endif /* #if(ICU_TAUJ_UNIT_USED == STD_ON) */
/*******************************************************************************
** Data structure for Timer Array Units J os control registers **
*******************************************************************************/
#if(ICU_TAUJ_UNIT_USED == STD_ON)
typedef struct STagTdd_Icu_TAUJUnitOsRegs
{
uint16 volatile usTAUJnTPS;
uint16 volatile usReserved1;
uint8 volatile ucTAUJnBRS;
}Tdd_Icu_TAUJUnitOsRegs;
#endif /* #if(ICU_TAUJ_UNIT_USED == STD_ON) */
/*******************************************************************************
** Data structure for Timer Array Units A and B channel user control **
** registers **
*******************************************************************************/
#if ((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUB_UNIT_USED == STD_ON))
typedef struct STagTdd_Icu_TAUABChannelUserRegs
{
uint16 volatile usTAUABnCDRm;
uint16 volatile aaReserved1[63];
uint16 volatile usTAUABnCNTm;
uint16 volatile aaReserved2[31];
uint8 volatile ucTAUABnCMURm;
uint8 volatile ucReserved3;
uint16 volatile aaReserved4[63];
uint8 volatile ucTAUABnCSRm;
uint8 volatile ucReserved5;
uint16 volatile aaReserved6[31];
uint8 volatile ucTAUABnCSCm;
}Tdd_Icu_TAUABChannelUserRegs;
#endif /* End of
* ((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUB_UNIT_USED == STD_ON))
*/
/*******************************************************************************
** Data structure for Timer Array Units J channel user control registers **
*******************************************************************************/
#if(ICU_TAUJ_UNIT_USED == STD_ON)
typedef struct STagTdd_Icu_TAUJChannelUserRegs
{
uint32 volatile ulTAUJnCDRm;
uint32 volatile aaReserved1[3];
uint32 volatile ulTAUJnCNTm;
uint32 volatile aaReserved2[3];
uint8 volatile ucTAUJnCMURm;
uint8 volatile ucReserved3;
uint16 volatile aaReserved4[7];
uint8 volatile ucTAUJnCSRm;
uint8 volatile ucReserved5;
uint16 volatile aaReserved6[7];
uint8 volatile ucTAUJnCSCm;
}Tdd_Icu_TAUJChannelUserRegs;
#endif /* End of (ICU_TAUJ_UNIT_USED == STD_ON) */
/*******************************************************************************
** Structure for TAU Unit configuration type **
*******************************************************************************/
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)||\
(ICU_TAUB_UNIT_USED == STD_ON))
typedef struct STagTdd_Icu_TAUUnitConfigType
{
/* void pointer to base address of Timer Array Unit user control register */
P2VAR(void, AUTOMATIC, ICU_CONFIG_DATA)pTAUnitUserCntlRegs;
/* void pointer to base address of Timer Array Unit os control register */
P2VAR(void, AUTOMATIC, ICU_CONFIG_DATA)pTAUnitOsCntlRegs;
#if (ICU_PRESCALER_CONFIGURED == STD_ON)
/* TAU Unit prescaler for clock sources CK0, CK1, CK2, CK3 */
uint16 usPrescaler;
#endif
/* TAUnit type
* ICU_HW_TAUA - 0
* ICU_HW_TAUB - 1
* ICU_HW_TAUJ - 2
*/
uint8 ucIcuUnitType;
/* Mask value for all channels in a TAU */
uint16 usTAUChannelMaskValue;
#if (ICU_PRESCALER_CONFIGURED == STD_ON)
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON))
/* TAU Unit baudrate value for CK3 */
uint8 ucBaudRate;
/* Prescaler shared between PWM/GPT/ICU modules
* 1: Prescaler for CK0 - CK3 has to be set by ICU
* 0: Prescaler for CK0 - CK3 need not be set by ICU
*/
#endif
uinteger uiConfigurePrescaler:1;
#endif
} Tdd_Icu_TAUUnitConfigType;
#endif
/*******************************************************************************
** Structure for using previous input(the spilt of one Port pin signal to two **
** TAU inputs): Applicable to TAUA0 & TAUA4 **
*******************************************************************************/
#if(ICU_PREVIOUS_INPUT_USED == STD_ON)
typedef struct STagTdd_IcuPreviousInputUseType
{
/* void pointer to base address of Previous Input control registers
*/
P2VAR(void, AUTOMATIC, ICU_CONFIG_DATA) pPreviousInputCntlRegs;
/* Registers TISLTA0 or TISLTA4:
* Bit0: 1: Port pin signal is split into TAUATTIN0 & TAUATTIN1
* Bit1: 1: Port pin signal is split into TAUATTIN2 & TAUATTIN3
* Bit2: 1: Port pin signal is split into TAUATTIN4 & TAUATTIN5
* Bit3: 1: Port pin signal is split into TAUATTIN6 & TAUATTIN7
* Bit4: 1: Port pin signal is split into TAUATTIN8 & TAUATTIN9
* Bit5: 1: Port pin signal is split into TAUATTIN10 & TAUATTIN11
* Bit6: 1: Port pin signal is split into TAUATTIN12 & TAUATTIN13
* Bit7: 1: Port pin signal is split into TAUATTIN14 & TAUATTIN15
*/
uint8 ucPreviousInputMask;
/* Index of Timer Unit in the Array Icu_GstTAUUnitConfig */
uint8 ucTimerUnitIndex;
} Tdd_IcuPreviousInputUseType;
#endif
/*******************************************************************************
** Structure for configuring Edge Counting Timer channel **
*******************************************************************************/
typedef struct STagTdd_Icu_EdgeCountConfigType
{
uint8 ucEdgeCounterRamIndex;
} Tdd_Icu_EdgeCountConfigType;
/*******************************************************************************
** Structure for configuring Signal Measurement Timer channel **
*******************************************************************************/
typedef struct STagTdd_Icu_SignalMeasureConfigType
{
/*
* ICU_LOW_TIME - 0
* ICU_HIGH_TIME - 1
* ICU_PERIOD_TIME - 2
* ICU_DUTY_CYCLE - 3
*/
uinteger uiSignalMeasurementProperty:2;
uint8 ucSignalMeasureRamDataIndex;
boolean blDutyCycleChannel;
} Tdd_Icu_SignalMeasureConfigType;
/*******************************************************************************
** Structure for configuring Timestamp Timer channel **
*******************************************************************************/
typedef struct STagTdd_Icu_TimeStampMeasureConfigType
{
/*
* ICU_LINEAR_BUFFER - 0
* ICU_CIRCULAR_BUFFER - 1
*/
uinteger uiTimestampMeasurementProperty:1;
uint8 ucTimeStampRamDataIndex;
} Tdd_Icu_TimeStampMeasureConfigType;
/*******************************************************************************
** Structure to channel data into RAM **
*******************************************************************************/
typedef struct STagTdd_Icu_ChannelRamDataType
{
uinteger uiChannelStatus:1;
uinteger uiWakeupEnable:1;
uinteger uiNotificationEnable:1;
} Tdd_Icu_ChannelRamDataType;
/*******************************************************************************
** Structure to store Edge Counting channel data into RAM **
*******************************************************************************/
typedef struct STagTdd_Icu_EdgeCountChannelRamDataType
{
uint8 ucActiveEdge;
uinteger uiTimerOvfFlag:1;
uint16 usIcuEdgeCount;
} Tdd_Icu_EdgeCountChannelRamDataType;
/*******************************************************************************
** Structure to store Timestamp channel data into RAM **
*******************************************************************************/
typedef struct STagTdd_Icu_TimeStampChannelRamDataType
{
P2VAR(uint32,AUTOMATIC,ICU_CONFIG_DATA) pBufferPointer;
uint16 usBufferSize;
uint16 usTimestampIndex;
uint16 usTimestampsCounter;
uint16 usNotifyInterval;
uint8 ucActiveEdge;
boolean blTimestampingStarted;
} Tdd_Icu_TimeStampChannelRamDataType;
/*******************************************************************************
** Structure to store Signal Measurement channel data into RAM **
*******************************************************************************/
typedef struct STagTdd_Icu_SignalMeasureChannelRamDataType
{
uint32 ulSignalActiveTime;
uint32 ulSignalPeriodTime;
uint32 ulPrevSignalActiveTime;
} Tdd_Icu_SignalMeasureChannelRamDataType;
/*******************************************************************************
** Structure for ICU Channel information **
*******************************************************************************/
typedef struct STagTdd_Icu_ChannelConfigType
{
/* void pointer to base address of channel user control register structure */
P2VAR(void, AUTOMATIC, ICU_CONFIG_DATA) pCntlRegs;
/* uint8 pointer to base address of channel Interrupt mask register */
P2VAR(uint8, AUTOMATIC, ICU_CONFIG_DATA) pImrIntrCntlRegs;
/* uint16 pointer to base address of channel Interrupt control register */
P2VAR(uint16, AUTOMATIC, ICU_CONFIG_DATA) pIntrCntlRegs;
/* The wakeup value to be transmitted to EcuM */
#if(ICU_REPORT_WAKEUP_SOURCE == STD_ON)
EcuM_WakeupSourceType ddEcuMChannelWakeupInfo;
#endif
/* Individual channel mask value */
uint16 usChannelMaskValue;
/* The notification index that needs to be used.
* If no notification is configured then NO_CBK_CONFIGURED
* should be generated.
*/
uint8 ucIcuNotificationIndex;
/* IMR mask value */
uint8 ucImrMaskValue;
/* Measurement Mode of the ICU channel */
/* ICU_MODE_SIGNAL_EDGE_DETECT - 0
* ICU_MODE_SIGNAL_MEASUREMENT - 1
* ICU_MODE_TIMESTAMP - 2
* ICU_MODE_EDGE_COUNTER - 3
*/
uinteger uiIcuMeasurementMode:2;
/* Default Edge detection of the ICU channel */
/* ICU_FALLING_EDGE - 0
* ICU_RISING_EDGE - 1
* ICU_BOTH_EDGES - 2
*/
uinteger uiIcuDefaultStartEdge:2;
/* Input capture channel type */
/* ICU_HW_EXT_INTP - 0
* ICU_HW_TAUA - 1
* ICU_HW_TAUB - 2
* ICU_HW_TAUJ - 3
*/
uinteger uiIcuChannelType:2;
/* Wakeup capability of the channel */
uinteger uiIcuWakeupCapability:1;
} Tdd_Icu_ChannelConfigType;
/*******************************************************************************
** Structure for ICU Timer Channel information **
*******************************************************************************/
typedef struct STagTdd_Icu_TimerChannelConfigType
{
/* Pointer to the ICU Channel properties based on Measurement Mode */
P2CONST(void, AUTOMATIC, ICU_CONFIG_CONST) pChannelProp;
/* pointer to base address of CMOR register */
P2VAR(uint16, AUTOMATIC, ICU_CONFIG_DATA)pCMORRegs;
/*
* Bit 15-14: 00: This bits are already set during initialization for
* clock source
*
* Bit 13-12: 00: Selects the prescaler output signal
* (ICU_MODE_SIGNAL_MEASUREMENT) / (ICU_MODE_TIMESTAMP)
* 01: Selects TINn input valid edge detection signal
* (ICU_MODE_EDGE_COUNTER)
*
* Bit 11: 0: Independent Channel operation functions
*
* Bit 10-8: 000: Selects software start trigger (ICU_MODE_EDGE_COUNTER)
* 001: Selects the TINn input valid edge detection signal
* (ICU_MODE_SIGNAL_MEASUREMENT)(ICU_PERIOD_TIME)
* / (ICU_MODE_TIMESTAMP)
*
* 010: Selects the TINn input valid edge detection signal as the
* start signal and the reverse edge detection signal as the
* stop signal.
* (ICU_MODE_SIGNAL_MEASUREMENT)(ICU_HIGH_TIME, ICU_LOW_TIME)
*
* Bit 7-6: 00: Not used (ICU_MODE_EDGE_COUNTER)
*
* 01: Sets OVF when the counter reaches FFFFH,
* clears OVF when CSCn:CLOV = 1
* Captures the counter value upon detection of a TINn
* input valid edge.
* (ICU_MODE_SIGNAL_MEASUREMENT) (ICU_PERIOD_TIME)
* (ICU_HIGH_TIME, ICU_LOW_TIME), (ICU_MODE_TIMESTAMP)
*
* Bit 4-1: 0010: Sets the Capture mode.
* (ICU_MODE_SIGNAL_MEASUREMENT) (ICU_PERIOD_TIME)
*
* 0011: Event Count Mode (ICU_MODE_EDGE_COUNTER)
*
* 0110: Sets the Capture & One Count mode
* (ICU_MODE_SIGNAL_MEASUREMENT)(ICU_HIGH_TIME, ICU_LOW_TIME)
*
* 1011: Sets the Count Capture mode (ICU_MODE_TIMESTAMP)
*
* Bit0: 0: Neither outputs INTn nor toggles TOUTn at operation startup
* 1: Outputs INTn at operation startup
*/
uint16 usChannelModeOSRegSettings;
/*
* Bit 1-0: (ICU_MODE_SIGNAL_MEASUREMENT) (ICU_PERIOD_TIME),
* (ICU_MODE_EDGE_COUNTER), (ICU_MODE_TIMESTAMP)
* 00: Selects falling edge detection
* 01: Selects rising edge detection
* 10: Selects rising and falling edge detection
* 11: Setting prohibited (rising and falling edge detection)
*
* (ICU_MODE_SIGNAL_MEASUREMENT) (ICU_HIGH_TIME, ICU_LOW_TIME)
* 10: Low width measurement
* 11: High width measurement
*
*/
uint8 ucChannelModeUserRegSettings;
/* Index of Timer Unit in the Array Icu_GstTAUUnitConfig */
uint8 ucTimerUnitIndex;
} Tdd_Icu_TimerChannelConfigType;
#define ICU_START_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
/* Declaration for ICU Channel Configuration */
extern CONST(Tdd_Icu_ChannelConfigType, ICU_CONST) Icu_GstChannelConfig[];
/* Declaration for ICU Channel Configuration */
extern CONST(Tdd_Icu_TimerChannelConfigType, ICU_CONST)
Icu_GstTimerChannelConfig[];
/* Declaration for Timestamp ICU Channel Configuration */
extern CONST(Tdd_Icu_TimeStampMeasureConfigType, ICU_CONST)
Icu_GstTimestampMeasureConfig[];
/* Declaration for Edge Counting ICU Channel Configuration */
extern CONST(Tdd_Icu_EdgeCountConfigType, ICU_CONST) Icu_GstEdgeCountConfig[];
/* Declaration for SignalMeasurement ICU Channel Configuration */
extern CONST(Tdd_Icu_SignalMeasureConfigType, ICU_CONST)
Icu_GstSignalMeasureConfig[];
#if((ICU_TAUA_UNIT_USED == STD_ON)||(ICU_TAUJ_UNIT_USED == STD_ON)|| \
(ICU_TAUB_UNIT_USED == STD_ON))
/* Array of structures for Hardware Configuration */
extern CONST(Tdd_Icu_TAUUnitConfigType, ICU_CONST) Icu_GstTAUUnitConfig[];
#endif
#if(ICU_PREVIOUS_INPUT_USED == STD_ON)
/* Array of structures for Previous Input Configuration */
extern CONST(Tdd_IcuPreviousInputUseType, ICU_CONST)
Icu_GstPreviousInputConfig[];
#endif
/* Array to map channel index */
extern CONST(uint8, ICU_CONST) Icu_GaaChannelMap[];
#define ICU_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
#define ICU_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* RAM Allocation of Channel data */
extern VAR(Tdd_Icu_ChannelRamDataType, ICU_NOINIT_DATA) Icu_GstChannelRamData[];
/* RAM Allocation of Timestamp channel data */
extern VAR(Tdd_Icu_TimeStampChannelRamDataType, ICU_NOINIT_DATA)
Icu_GstTimestampRamData[];
/* RAM Allocation of Signal Measure Channel data */
extern VAR(Tdd_Icu_SignalMeasureChannelRamDataType, ICU_NOINIT_DATA)
Icu_GstSignalMeasureRamData[];
/* RAM Allocation of Edge Counting Channel data */
extern VAR(Tdd_Icu_EdgeCountChannelRamDataType,ICU_NOINIT_DATA)
Icu_GstEdgeCountRamData[];
#define ICU_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* ICU_PBTYPES_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/SERV/Os/Sys_Kernel.h
/*****************************************************************************
| File Name: Sys_kernel.h
|
| Description: System task scheduler
|
|-----------------------------------------------------------------------------
| PATAC Confidential
|-----------------------------------------------------------------------------
|
| This software is copyright is proprietary of
| Pan Asia Technical Automotive Company(PATAC).
| All rights are reserved by PATAC.
|
|-----------------------------------------------------------------------------
| A U T H O R I D E N T I T Y
|-----------------------------------------------------------------------------
| Initials Name Company
| -------- -------------------- ---------------------------------------
| FRED <NAME> PATAC
|
|-----------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|-----------------------------------------------------------------------------
| Date Version Author Description
| ---------- -------- ------ ----------------------------------------------
| 2008-12-28 01.00.00 FRED Creation
|****************************************************************************/
#ifndef __SYS_KERNEL_H
#define __SYS_KERNEL_H
#include "std_types.h"
/*
* File version information
*/
#define SYSSRVC_SW_MAJOR_VERSION 3
#define SYSSRVC_SW_MINOR_VERSION 3
#define SYSSRVC_SW_PATCH_VERSION 3
#define SYSSRVC_VENDOR_ID 0
#define SYSSRVC_MODULE_ID 0
#define SYSSRVC_INSTANCE_ID 0
#define SetCycle() (VeKRN_b_RecycleFlag = TRUE)
#define ClrCycle() (VeKRN_b_RecycleFlag = FALSE)
#define IsCycle() (TRUE == VeKRN_b_RecycleFlag)
#define SendEvt(event ) SysSrvc_SendEvt(event)
#define IsEvt(event) (event == VeKRN_w_TmpEvtID)
#define ClrEvt() (VeKRN_w_TmpEvtID = 0x0)
#define GetEvt() VeKRN_w_TmpEvtID
#define ClrEvent() ClrEvt()
/*event backup and restore is done by OS, it's used in models*/
#define BckEvent()
#define ResEvent()
#define ChgEvtBool(bvar,bval,upevt,downevt) if((bvar) != (bval))\
{\
if(bval)\
{\
SendEvt(upevt);\
}\
else\
{\
SendEvt(downevt);\
}\
}
#define ChgEvt(var,val,evt) if((var) != (val))\
{\
SendEvt(evt);\
}
#define ChgEvtB(var,val,evt) ChgEvt(var,val,evt)
#define ChgEvt8(var,val,evt) ChgEvt(var,val,evt)
#define ChgEvt16(var,val,evt) ChgEvt(var,val,evt)
#define ChgEvt32(var,val,evt) ChgEvt(var,val,evt)
#define ChgEvtE(Var, Val, Evt) ChgEvt8(Var, Val, Evt)
extern UINT16 VeKRN_w_TmpEvtID;
extern BOOL VeKRN_b_RecycleFlag;
void UserPreISRHook(UINT16 x);
void UserPostISRHook(UINT16 x);
void SysSrvc_GetVersionInfo(Std_VersionInfoType *versioninfo);
void SysSrvc_StartSchduler(void);
void SysSrvc_SendEvt(UINT16 EventID);
void EnterDataShare(void);
void ExitDataShare(void);
#endif
<file_sep>/BSP/IoHwAb/IoHwAb.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 LED Components */
/* Module = Pwm_Irq.h */
/* Version = 3.1.3a */
/* Date = 23-Apr-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2013-2014 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of API information. */
/* */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 18-Aug-2009 : Initial version
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "IoHwAb.h"
/**********************************************************************************************************************
* GLOBAL FUNCTIONS
*********************************************************************************************************************/
/*******************************************************************************
** Function Name : IoHwAb_Init
**
** Service ID : NA
**
** Description : These are Interrupt routines for the timer TAUAn and
** m, where n represents the TAUA Units and m
** represents channels associated for each Unit.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Pwm_GpChannelTimerMap, Pwm_GpChannelConfig,
** Pwm_GstChannelNotifFunc, Pwm_GpNotifStatus
**
** Function(s) invoked:
** None
*******************************************************************************/
void IoHwAb_Init(void)
{
/*---------------------------------------------
Mcu Initialization
---------------------------------------------*/
/* Initialise MCU Driver */
Mcu_Init(McuModuleConfiguration0);
/* Set the CPU Clock to the PLL0 */
Mcu_InitClock(MCU_CLK_SETTING_PLL0);
/* Wait until the PLL is locked */
while (Mcu_GetPllStatus() != MCU_PLL_LOCKED);
/* Activate the PLL Clock */
Mcu_DistributePllClock();
/* Set the MCU to MCU_RUN_MODE mode */
Mcu_SetMode(McuModeSettingConf0);
/*---------------------------------------------
Port Driver
---------------------------------------------*/
/* Initialize PORT */
/* -- VCC5V_CTL,SYNC_CTRL High -- */
Port_Init(PortConfigSet0);
FCLA27CTL1 = 0x80;
FCLA7CTL3 = 0x80; //CSIG4SI
/*---------------------------------------------
PWM Driver
---------------------------------------------*/
/* Initialise the PWM Driver */
Pwm_Init(PwmChannelConfigSet0);
/*---------------------------------------------
CAN Driver
---------------------------------------------*/
/* Global Initialization */
Can_Init(CanConfigSet_1);
/* Set Controller Mode to START Mode for Controller 0 */
Can_SetControllerMode(0, CAN_T_START);
/* Set Controller Mode to START Mode for Controller 0 */
Can_SetControllerMode(1, CAN_T_START);
/* Following API can be invoked while exiting a critical area which enables
all disabled interrupts */
/* Following API enables Rx, Tx, Wakeup and BusOff Interrupts for
CAN Controller 0 */
Can_EnableControllerInterrupts(0);
Can_EnableControllerInterrupts(1);
return;
}
/****************************************************************************************
| NAME: IoHwAb_SchM10ms
| CALLED BY: (10 ms task) SchM
| PRECONDITIONS:
| INPUT PARAMETERS:
| RETURN VALUE: NA
| DESCRIPTION: process IO abstraction task
****************************************************************************************/
void IoHwAb_SchM10ms(void)
{
#if 0
IoHwAb_LEDOutput(); /* direct input/output */
IoHwAb_FANOutput(); /* buffer input/output */
IoHwAb_DIO();
IoHwAb_ADInput(); /* buffer input/output */
#endif
}
<file_sep>/BSP/MCAL/Icu/Icu_PBcfg.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Icu_PBcfg.c */
/* Version = 3.0.0 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains post-build time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: : Initial version
*/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.0.13a
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_ICU_V304_130924_NEWCLEAPLUS.arxml
* GENERATED ON: 30 Sep 2013 - 10:23:54
*/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Icu.h"
#include "Icu_PBTypes.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define ICU_PBCFG_C_AR_MAJOR_VERSION 3
#define ICU_PBCFG_C_AR_MINOR_VERSION 0
#define ICU_PBCFG_C_AR_PATCH_VERSION 0
/* File version information */
#define ICU_PBCFG_C_SW_MAJOR_VERSION 3
#define ICU_PBCFG_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
/* Specification Major Version Check */
#if (ICU_PBTYPES_AR_MAJOR_VERSION != ICU_PBCFG_C_AR_MAJOR_VERSION)
#error "Icu_PBcfg.c : Mismatch in Specification Major version"
#endif
/* Specification Minor Version Check */
#if (ICU_PBTYPES_AR_MINOR_VERSION != ICU_PBCFG_C_AR_MINOR_VERSION)
#error "Icu_PBcfg.c : Mismatch in Specification Minor version"
#endif
/* Specification Patch Version Check */
#if (ICU_PBTYPES_AR_PATCH_VERSION != ICU_PBCFG_C_AR_PATCH_VERSION)
#error "Icu_PBcfg.c : Mismatch in Specification Patch version"
#endif
/* Major version check */
#if (ICU_PBTYPES_SW_MAJOR_VERSION != ICU_PBCFG_C_SW_MAJOR_VERSION)
#error "Icu_PBcfg.c : Mismatch in Major version"
#endif
/* Minor version check */
#if (ICU_PBTYPES_SW_MINOR_VERSION != ICU_PBCFG_C_SW_MINOR_VERSION)
#error "Icu_PBcfg.c : Mismatch in Minor version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
#define ICU_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* RAM Allocation of Channel data */
VAR(Tdd_Icu_ChannelRamDataType,ICU_NOINIT_DATA) Icu_GstChannelRamData[3];
/* RAM Allocation of Timestamp channel data */
/* VAR(Tdd_Icu_TimeStampChannelRamDataType,ICU_NOINIT_DATA) Icu_GstTimestampRamData[]; */
/* RAM Allocation of Signal Measure Channel data */
VAR(Tdd_Icu_SignalMeasureChannelRamDataType,ICU_NOINIT_DATA) Icu_GstSignalMeasureRamData[2];
/* RAM Allocation of Edge Counting Channel data */
/* VAR(Tdd_Icu_EdgeCountChannelRamDataType,ICU_NOINIT_DATA) Icu_GstEdgeCountRamData[]; */
#define ICU_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
#define ICU_START_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
/* Structure for each Config Set */
CONST(Icu_ConfigType, ICU_CONST) Icu_GstConfiguration[] =
{
/* Structure for initialization of database 0 */
{
/* ulStartOfDbToc */
0x05DE8300,
/* pChannelConfig */
&Icu_GstChannelConfig[0],
/* pTimerChannelConfig */
&Icu_GstTimerChannelConfig[0],
/* pHWUnitConfig */
&Icu_GstTAUUnitConfig[0],
/* pRamAddress */
&Icu_GstChannelRamData[0],
/* pSignalMeasureAddress */
&Icu_GstSignalMeasureRamData[0],
/* pTimeStampAddress */
NULL_PTR,
/* pEdgeCountRamAddress */
NULL_PTR,
/* pChannelMap */
&Icu_GaaChannelMap[0]
}
};
#define ICU_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
#define ICU_START_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
/* Array of structures for Hardware Configuration */
CONST(Tdd_Icu_TAUUnitConfigType, ICU_CONST) Icu_GstTAUUnitConfig[] =
{
/* Configuration 0 */
{
/* pTAUnitUserCntlRegs */
(P2VAR(void, AUTOMATIC, ICU_CONFIG_DATA)) 0xFF808040ul,
/* pTAUnitOsCntlRegs */
(P2VAR(void, AUTOMATIC, ICU_CONFIG_DATA)) 0xFF808240ul,
/* usPrescaler */
0xC963,
/* ucIcuUnitType */
ICU_HW_TAUA,
/* usTAUChannelMaskValue */
0x0010,
/* ucBaudRate */
0xFF,
/* uiConfigurePrescaler */
ICU_TRUE
},
/* Configuration 1 */
{
/* pTAUnitUserCntlRegs */
(P2VAR(void, AUTOMATIC, ICU_CONFIG_DATA)) 0xFF809040ul,
/* pTAUnitOsCntlRegs */
(P2VAR(void, AUTOMATIC, ICU_CONFIG_DATA)) 0xFF809240ul,
/* usPrescaler */
0xC963,
/* ucIcuUnitType */
ICU_HW_TAUB,
/* usTAUChannelMaskValue */
0x0000,
/* ucBaudRate */
0x00,
/* uiConfigurePrescaler */
ICU_TRUE
}
};
/* Edge counting channel configuration data */
/* CONST(Tdd_Icu_EdgeCountConfigType, ICU_CONST) Icu_GstEdgeCountConfig[]; */
/* Signal Measurement channel configuration data */
CONST(Tdd_Icu_SignalMeasureConfigType, ICU_CONST) Icu_GstSignalMeasureConfig[] =
{
/* Index: 0 */
{
/* uiSignalMeasurementProperty */
ICU_HIGH_TIME,
/* ucSignalMeasureRamDataIndex */
0x00,
/* blDutyCycleChannel */
ICU_TRUE
},
/* Index: 1 */
{
/* uiSignalMeasurementProperty */
ICU_PERIOD_TIME,
/* ucSignalMeasureRamDataIndex */
0x00,
/* blDutyCycleChannel */
ICU_TRUE
}
};
/* Timestamping channel configuration data */
/* CONST(Tdd_Icu_TimeStampMeasureConfigType, ICU_CONST) Icu_GstTimestampMeasureConfig[]; */
/* Configuration of each ICU Channel */
CONST(Tdd_Icu_ChannelConfigType, ICU_CONST) Icu_GstChannelConfig[] =
{
/* Index: 0 */
{
/* pCntlRegs */
(P2VAR(void, AUTOMATIC, ICU_CONFIG_DATA)) 0xFF808010,
/* pImrIntrCntlRegs */
(P2VAR(uint8, AUTOMATIC, ICU_CONFIG_DATA))0xFFFF6403ul,
/* pIntrCntlRegs */
(P2VAR(uint16, AUTOMATIC, ICU_CONFIG_DATA)) 0xFFFF6030ul,
/* usChannelMaskValue */
0x0030,
/* ucIcuNotificationIndex */
ICU_NO_CBK_CONFIGURED,
/* ucImrMaskValue */
0xFE,
/* uiIcuMeasurementMode */
ICU_MODE_SIGNAL_MEASUREMENT,
/* uiIcuDefaultStartEdge */
ICU_BOTH_EDGES,
/* uiIcuChannelType */
ICU_HW_TAUA
},
/* Index: 1 */
{
/* pCntlRegs */
(P2VAR(void, AUTOMATIC, ICU_CONFIG_DATA)) 0xFF808014,
/* pImrIntrCntlRegs */
(P2VAR(uint8, AUTOMATIC, ICU_CONFIG_DATA))0xFFFF6403ul,
/* pIntrCntlRegs */
(P2VAR(uint16, AUTOMATIC, ICU_CONFIG_DATA)) 0xFFFF6032ul,
/* usChannelMaskValue */
0x0030,
/* ucIcuNotificationIndex */
ICU_NO_CBK_CONFIGURED,
/* ucImrMaskValue */
0xFD,
/* uiIcuMeasurementMode */
ICU_MODE_SIGNAL_MEASUREMENT,
/* uiIcuDefaultStartEdge */
ICU_RISING_EDGE,
/* uiIcuChannelType */
ICU_HW_TAUA
},
/* Index: 2 */
{
/* pCntlRegs */
(P2VAR(void, AUTOMATIC, ICU_CONFIG_DATA)) 0xFF414034,
/* pImrIntrCntlRegs */
(P2VAR(uint8, AUTOMATIC, ICU_CONFIG_DATA)) 0xFFFF641Aul,
/* pIntrCntlRegs */
(P2VAR(uint16, AUTOMATIC, ICU_CONFIG_DATA)) 0xFFFF61A4ul,
/* usChannelMaskValue */
0x2000,
/* ucIcuNotificationIndex */
0x00,
/* ucImrMaskValue */
0xFB,
/* uiIcuMeasurementMode */
ICU_MODE_SIGNAL_EDGE_DETECT,
/* uiIcuDefaultStartEdge */
ICU_FALLING_EDGE,
/* uiIcuChannelType */
ICU_HW_EXT_INTP
}
};
/* Configuration of each ICU Timer Channel */
CONST(Tdd_Icu_TimerChannelConfigType, ICU_CONST) Icu_GstTimerChannelConfig[] =
{
/* Index: 0 */
{
/* *pChannelProp */
&Icu_GstSignalMeasureConfig[0],
/* pCMORRegs */
(P2VAR(void, AUTOMATIC, ICU_CONFIG_DATA)) 0xFF808210,
/* usChannelModeOSRegSettings */
0x024C,
/* ucChannelModeUserRegSettings */
0x03,
/* ucTimerUnitIndex */
0x00
},
/* Index: 1 */
{
/* *pChannelProp */
&Icu_GstSignalMeasureConfig[1],
/* pCMORRegs */
(P2VAR(void, AUTOMATIC, ICU_CONFIG_DATA)) 0xFF808214,
/* usChannelModeOSRegSettings */
0x0144,
/* ucChannelModeUserRegSettings */
0x01,
/* ucTimerUnitIndex */
0x00
}
};
/* Array of structures for Previous Input Configuration */
/* CONST(Tdd_IcuPreviousInputUseType, ICU_CONST) Icu_GstPreviousInputConfig[]; */
/* ICU Channel Map Array*/
CONST(uint8, ICU_PRIVATE_CONST) Icu_GaaChannelMap[170] =
{
/* Channel Id: 0 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 1 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 2 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 3 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 4 */
0x00,
/* Channel Id: 5 */
0x01,
/* Channel Id: 6 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 7 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 8 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 9 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 10 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 11 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 12 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 13 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 14 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 15 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 16 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 17 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 18 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 19 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 20 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 21 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 22 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 23 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 24 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 25 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 26 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 27 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 28 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 29 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 30 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 31 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 32 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 33 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 34 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 35 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 36 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 37 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 38 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 39 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 40 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 41 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 42 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 43 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 44 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 45 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 46 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 47 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 48 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 49 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 50 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 51 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 52 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 53 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 54 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 55 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 56 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 57 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 58 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 59 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 60 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 61 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 62 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 63 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 64 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 65 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 66 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 67 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 68 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 69 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 70 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 71 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 72 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 73 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 74 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 75 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 76 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 77 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 78 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 79 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 80 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 81 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 82 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 83 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 84 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 85 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 86 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 87 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 88 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 89 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 90 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 91 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 92 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 93 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 94 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 95 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 96 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 97 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 98 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 99 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 100 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 101 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 102 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 103 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 104 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 105 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 106 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 107 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 108 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 109 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 110 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 111 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 112 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 113 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 114 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 115 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 116 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 117 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 118 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 119 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 120 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 121 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 122 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 123 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 124 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 125 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 126 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 127 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 128 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 129 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 130 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 131 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 132 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 133 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 134 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 135 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 136 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 137 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 138 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 139 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 140 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 141 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 142 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 143 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 144 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 145 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 146 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 147 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 148 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 149 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 150 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 151 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 152 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 153 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 154 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 155 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 156 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 157 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 158 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 159 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 160 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 161 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 162 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 163 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 164 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 165 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 166 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 167 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 168 */
ICU_CHANNEL_UNCONFIGURED,
/* Channel Id: 169 */
0x02
};
#define ICU_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/APP/LEDLightControl/LEDLightControl.h
#ifndef _LEDLightControl_H
#define _LEDLightControl_H
#include "Std_Types.h"
extern void LEDSwitchMainFunction(void);
#endif
<file_sep>/BSP/Include/schm_cfg.h
#ifndef SCHM_CFG_H
#define SCHM_CFG_H
//# include "Osek.h"
/* set SCHM_NONPREEMPTIVE_ECUM_STARTUPTWO_CALL to STD_ON or STD_OFF to enable or
disable the protection of EcuM_StartupTwo() against task switches
This can be used to delay the execution of high priority application tasks
until the system is fully initialized.
*/
#define SCHM_NONPREEMPTIVE_ECUM_STARTUPTWO_CALL STD_OFF
/* list of modules that do not have an enable or disable define in v_cfg.h */
#define VGEN_DISABLE_DRVADC
#define VGEN_DISABLE_SYSSERVICE_ASRCRC
#define VGEN_DISBALE_DRVDIO
#define VGEN_DISABLE_IF_ASRIFEA
#define VGEN_DISABLE_IF_ASRIFEABASIC
#define VGEN_DISABLE_IF_ASRIFEA_30_INST2
#define VGEN_ENABLE_SYSSERVICE_ASRECUM
#define VGEN_DISABLE_DRVEED
#define VGEN_DISABLE_DRVEEP
#define VGEN_DISABLE_DRVEEP_30_AT25128
#define VGEN_DISABLE_IF_ASRIFFEE
#define VGEN_DISABLE_IF_ASRIFFEE30INST2
#define VGEN_DISABLE_DRVFLS
#define VGEN_DISABLE_FLS30ADBUS01
#define VGEN_DISABLE_DRVGPT
#define VGEN_DISABLE_DRVICU
#define VGEN_DISBALE_ECUAB_IOHWAB
#define VGEN_DISABLE_DRVMCU
#define VGEN_DISABLE_IF_ASRIFMEM
#define VGEN_DISABLE_MEMSERVICE_ASRNVM
#define VGEN_DISABLE_DRVPORT
#define VGEN_DISABLE_DRVPWM
#define VGEN_DISABLE_DRVSPI
#define VGEN_DISABLE_DRVWD
#define VGEN_DISABLE_IF_ASRIFWD
#define VGEN_DISABLE_SYSSERVICE_ASRWDM
#endif /* SCHM_CFG_H */
<file_sep>/BSP/Include/SchM_CanNm.h
#ifndef SCHM_CANNM_H
#define SCHM_CANNM_H
#include "SchM.h"
#include "SchM_Types.h"
#include "SchM_Cfg.h"
#define CANNM_EXCLUSIVE_AREA_0 SCHM_EA_SUSPENDALLINTERRUPTS
#define CANNM_EXCLUSIVE_AREA_1 SCHM_EA_SUSPENDALLINTERRUPTS
#define CANNM_EXCLUSIVE_AREA_2 SCHM_EA_SUSPENDALLINTERRUPTS
#define CANNM_EXCLUSIVE_AREA_3 SCHM_EA_SUSPENDALLINTERRUPTS
#define CANNM_EXCLUSIVE_AREA_4 SCHM_EA_SUSPENDALLINTERRUPTS
#define CANNM_EXCLUSIVE_AREA_5 SCHM_EA_SUSPENDALLINTERRUPTS
# define SchM_Enter_CanNm(ExclusiveArea) \
SCHM_ENTER_EXCLUSIVE(ExclusiveArea)
# define SchM_Exit_CanNm(ExclusiveArea) \
SCHM_EXIT_EXCLUSIVE(ExclusiveArea)
#endif /* SCHM_CANNM_H */
<file_sep>/BSP/MCAL/Mcu.dp/Mcu_Cfg.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* File name = Mcu_Cfg.h */
/* Version = 3.1.7 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains pre-compile time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.1.13
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_MCU_V308_140113_HEADLAMP.arxml
* GENERATED ON: 16 Jan 2014 - 08:46:12
*/
#ifndef MCU_CFG_H
#define MCU_CFG_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define MCU_CFG_AR_MAJOR_VERSION 2
#define MCU_CFG_AR_MINOR_VERSION 2
#define MCU_CFG_AR_PATCH_VERSION 1
/* File version information */
#define MCU_CFG_SW_MAJOR_VERSION 3
#define MCU_CFG_SW_MINOR_VERSION 0
/*******************************************************************************
** Common Published Information **
*******************************************************************************/
#define MCU_AR_MAJOR_VERSION_VALUE 2
#define MCU_AR_MINOR_VERSION_VALUE 2
#define MCU_AR_PATCH_VERSION_VALUE 1
#define MCU_SW_MAJOR_VERSION_VALUE 3
#define MCU_SW_MINOR_VERSION_VALUE 0
#define MCU_SW_PATCH_VERSION_VALUE 0
#define MCU_VENDOR_ID_VALUE 23
#define MCU_MODULE_ID_VALUE 101
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Instance ID of the MCU Driver */
#define MCU_INSTANCE_ID_VALUE 0
/* Pre-compile option for the development error detection and reporting */
#define MCU_DEV_ERROR_DETECT STD_OFF
/* Pre-compile option for Mcu_GetVersion API */
#define MCU_VERSION_INFO_API STD_OFF
/* Pre-compile option for Mcu_PerformReset API */
#define MCU_PERFORM_RESET_API STD_OFF
/* Pre-compile option for the critical section functionality */
#define MCU_CRITICAL_SECTION_PROTECTION STD_ON
/* Pre-compile option for the store-restore feature of port pin status */
#define MCU_PORTGROUP_STATUS_BACKUP STD_OFF
/* Pre-compile option for the WAKE pin functionality for DEEPSTOP_MODE */
#define MCU_DEEPSTOP_WAKE_PIN STD_OFF
/* Pre-compile option for the IO buffer power supply during DEEPSTOP_MODE */
#define MCU_DEEPSTOP_IOBUFFER_SUPPLY STD_OFF
/* Pre-compile option for the DEEPSTOP with Forced-Isolated-Area-0 DEEPSTOP */
#define MCU_FORCED_ISO0_DEEPSTOP STD_OFF
/* Pre-compile option for the MainOsc */
#define MCU_MAINOSC_ENABLE STD_ON
/* Pre-compile option for the SubOsc */
#define MCU_SUBOSC_ENABLE STD_ON
/* Pre-compile option for the High Speed IntOsc */
#define MCU_HIGHSPEED_RINGOSC_ENABLE STD_ON
/* Pre-compile option for the PLL0 */
#define MCU_PLL0_ENABLE STD_ON
/* Pre-compile option for the PLL1 */
#define MCU_PLL1_ENABLE STD_ON
/* Pre-compile option for the PLL2 */
#define MCU_PLL2_ENABLE STD_ON
/* Pre-compile option for the IORES0 */
#define MCU_IORES0_ENABLE STD_OFF
/* Pre-compile option for the IORES1 */
#define MCU_IORES1_ENABLE STD_OFF
/* Pre-compile option for the VCPC0CTL0 */
#define MCU_VCPC0CTL0_ENABLE STD_ON
/* Pre-compile option for the VCPC0CTL1 */
#define MCU_VCPC0CTL1_ENABLE STD_ON
/* Loop Count Value for the MCULOOPCOUNT */
#define MCU_LOOPCOUNT_VALUE
/* Pbus Count Value for the MCUPBUSWAITCOUNT */
#define MCU_PBUSWAITCOUNT_VALUE 0
/* Pre compile option for Graphics Mode Reset */
#define MCU_GFX_SUPPORT STD_OFF
/* Control register value to configure PLL0 with 40 Mhz for ISO1 SW wakeup */
#define MCU_ISO1WUP_PLLC0_VAL 8389395
/* Precompile option for Iohold Mask */
#define MCU_IOHOLDMASK_REQ STD_OFF
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Maximum number of RAM Settings */
#define MCU_MAX_RAMSETTING (Mcu_RamSectionType)1
/* Handles for RAM sector setting */
#define MCU_RAM_SETTING_0 (Mcu_RamSectionType)0
/* Configuration Set Handles */
#define McuModuleConfiguration0 (&Mcu_GstConfiguration[0])
#define McuModuleConfiguration1 (&Mcu_GstConfiguration[1])
/* Mode Setting Handles */
#define McuModeSettingConf0 (Mcu_ModeType)0x00
#define McuModeSettingConf1 (Mcu_ModeType)0x01
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* MCU_CFG_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Can/Can_Irq.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Can_Irq.c */
/* Version = 3.0.7a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2008-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of Interrupt Service Routines Functionality. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12.12.2008 : Initial Version
* V3.0.1: 10.10.2009 : Updated for changes in wake-up support as per
* SCR ANMCANLINFR3_SCR_031.
* V3.0.2: 20.01.2010 : Pre-compiler switch has been updated as per
* SCR ANMCANLINFR3_SCR_042.
* V3.0.3: 21.04.2010 : As per ANMCANLINFR3_SCR_056, provision for Tied Wakeup
* interrupts is added.
* V3.0.4: 11.05.2010 : In CAN_WAKEUP_TXCANCEL_ISR, "TRUE" is changed to
* "STD_ON".
* V3.0.5: 30.06.2010 : As per ANMCANLINFR3_SCR_067, file is updated to
* support and ISR Category support configurable by a
* pre-compile option.
* V3.0.6: 08.07.2010 : As per ANMCANLINFR3_SCR_068, ISR Category options are
* updated from MODE to TYPE.
* V3.0.7: 31.12.2010 : As per SCR ANMCANLINFR3_SCR_087,
* 1. EcuM callback file is included when
* CanWakeupSupport is True.
* 2. Space between '#' and 'if' is removed.
* V3.0.7a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Can_PBTypes.h" /* CAN Driver Post-Build Config. Header File */
#include "Can_Irq.h" /* CAN Interrupt Service Header File */
#include "Can_MainServ.h" /* CAN Main Service Header File */
#include "Can_ModeCntrl.h" /* CAN Mode Control Service Header File */
#include "Can_Ram.h" /* CAN Driver RAM Header File */
#include "Can_Tgt.h" /* CAN Driver Target Header File */
#if (CAN_DEV_ERROR_DETECT == STD_ON)
#include "Det.h" /* DET Header File */
#endif
#include "CanIf_Cbk.h" /* CAN Interface call-back Header File */
#if (CAN_WAKEUP_SUPPORT == STD_ON)
#include "EcuM_Cbk.h" /* EcuM call-back Header File */
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define CAN_IRQ_C_AR_MAJOR_VERSION 2
#define CAN_IRQ_C_AR_MINOR_VERSION 2
#define CAN_IRQ_C_AR_PATCH_VERSION 2
/* File version information */
#define CAN_IRQ_C_SW_MAJOR_VERSION 3
#define CAN_IRQ_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (CAN_IRQ_AR_MAJOR_VERSION != CAN_IRQ_C_AR_MAJOR_VERSION)
#error "Can_Irq.c : Mismatch in Specification Major Version"
#endif
#if (CAN_IRQ_AR_MINOR_VERSION != CAN_IRQ_C_AR_MINOR_VERSION)
#error "Can_Irq.c : Mismatch in Specification Minor Version"
#endif
#if (CAN_IRQ_AR_PATCH_VERSION != CAN_IRQ_C_AR_PATCH_VERSION)
#error "Can_Irq.c : Mismatch in Specification Patch Version"
#endif
#if (CAN_IRQ_SW_MAJOR_VERSION != CAN_IRQ_C_SW_MAJOR_VERSION)
#error "Can_Irq.c : Mismatch in Software Major Version"
#endif
#if (CAN_IRQ_SW_MINOR_VERSION != CAN_IRQ_C_SW_MINOR_VERSION)
#error "Can_Irq.c : Mismatch in Software Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
#if (CAN_CONTROLLER0_RX_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_CONTROLLER0_RX_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_CONTROLLER0_RX_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_CONTROLLER0_RX_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
uint8 LucControllerId;
/* Get the index to Controller Id */
LucControllerId = Can_GpCntrlIdArray[CAN_CONTROLLER0];
/* Get the pointer to Controller structure */
LpController = &Can_GpFirstController[LucControllerId];
/* MISRA Rule : 11.3
Message : Cast between a pointer to object and an integral type.
Reason : This is to access the hardware registers in
the code.
Verification : However, the part of the code is
verified manually and it is not having
any impact on code.
*/
/* Invoke Can_RxProcessing internal function for receive processing */
Can_RxProcessing(CAN_CONTROLLER0_8BIT_BASE_ADDRESS,
CAN_CONTROLLER0_16BIT_BASE_ADDRESS, LpController->ucHrhOffSetId);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER1_RX_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_CONTROLLER1_RX_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_CONTROLLER1_RX_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_CONTROLLER1_RX_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
uint8 LucControllerId;
/* Get the index to Controller Id */
LucControllerId = Can_GpCntrlIdArray[CAN_CONTROLLER1];
/* Get the pointer to Controller structure */
LpController = &Can_GpFirstController[LucControllerId];
/* MISRA Rule : 11.3
Message : Cast between a pointer to object and an integral type.
Reason : This is to access the hardware registers in
the code.
Verification : However, the part of the code is
verified manually and it is not having
any impact on code.
*/
/* Invoke Can_RxProcessing internal function for receive processing */
Can_RxProcessing(CAN_CONTROLLER1_8BIT_BASE_ADDRESS,
CAN_CONTROLLER1_16BIT_BASE_ADDRESS, LpController->ucHrhOffSetId);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER2_RX_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_CONTROLLER2_RX_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_CONTROLLER2_RX_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_CONTROLLER2_RX_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
uint8 LucControllerId;
/* Get the index to Controller Id */
LucControllerId = Can_GpCntrlIdArray[CAN_CONTROLLER2];
/* Get the pointer to Controller structure */
LpController = &Can_GpFirstController[LucControllerId];
/* MISRA Rule : 11.3
Message : Cast between a pointer to object and an integral type.
Reason : This is to access the hardware registers in
the code.
Verification : However, the part of the code is
verified manually and it is not having
any impact on code.
*/
/* Invoke Can_RxProcessing internal function for receive processing */
Can_RxProcessing(CAN_CONTROLLER2_8BIT_BASE_ADDRESS,
CAN_CONTROLLER2_16BIT_BASE_ADDRESS, LpController->ucHrhOffSetId);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER3_RX_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_CONTROLLER3_RX_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_CONTROLLER3_RX_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_CONTROLLER3_RX_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
uint8 LucControllerId;
/* Get the index to Controller Id */
LucControllerId = Can_GpCntrlIdArray[CAN_CONTROLLER3];
/* Get the pointer to Controller structure */
LpController = &Can_GpFirstController[LucControllerId];
/* MISRA Rule : 11.3
Message : Cast between a pointer to object and an integral type.
Reason : This is to access the hardware registers in
the code.
Verification : However, the part of the code is
verified manually and it is not having
any impact on code.
*/
/* Invoke Can_RxProcessing internal function for receive processing */
Can_RxProcessing(CAN_CONTROLLER3_8BIT_BASE_ADDRESS,
CAN_CONTROLLER3_16BIT_BASE_ADDRESS, LpController->ucHrhOffSetId);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER4_RX_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_CONTROLLER4_RX_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_CONTROLLER4_RX_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_CONTROLLER4_RX_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
uint8 LucControllerId;
/* Get the index to Controller Id */
LucControllerId = Can_GpCntrlIdArray[CAN_CONTROLLER4];
/* Get the pointer to Controller structure */
LpController = &Can_GpFirstController[LucControllerId];
/* MISRA Rule : 11.3
Message : Cast between a pointer to object and an integral type.
Reason : This is to access the hardware registers in
the code.
Verification : However, the part of the code is
verified manually and it is not having
any impact on code.
*/
/* Invoke Can_RxProcessing internal function for receive processing */
Can_RxProcessing(CAN_CONTROLLER4_8BIT_BASE_ADDRESS,
CAN_CONTROLLER4_16BIT_BASE_ADDRESS, LpController->ucHrhOffSetId);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER5_RX_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_CONTROLLER5_RX_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_CONTROLLER5_RX_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_CONTROLLER5_RX_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
uint8 LucControllerId;
/* Get the index to Controller Id */
LucControllerId = Can_GpCntrlIdArray[CAN_CONTROLLER5];
/* Get the pointer to Controller structure */
LpController = &Can_GpFirstController[LucControllerId];
/* MISRA Rule : 11.3
Message : Cast between a pointer to object and an integral type.
Reason : This is to access the hardware registers in
the code.
Verification : However, the part of the code is
verified manually and it is not having
any impact on code.
*/
/* Invoke Can_RxProcessing internal function for receive processing */
Can_RxProcessing(CAN_CONTROLLER5_8BIT_BASE_ADDRESS,
CAN_CONTROLLER5_16BIT_BASE_ADDRESS, LpController->ucHrhOffSetId);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER0_TX_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_CONTROLLER0_TX_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_CONTROLLER0_TX_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_CONTROLLER0_TX_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
uint8 LucControllerId;
/* Get the index to Controller Id */
LucControllerId = Can_GpCntrlIdArray[CAN_CONTROLLER0];
/* Get the pointer to Controller structure */
LpController = &Can_GpFirstController[LucControllerId];
/* MISRA Rule : 11.3
Message : Cast between a pointer to object and an integral type.
Reason : This is to access the hardware registers in
the code.
Verification : However, the part of the code is
verified manually and it is not having
any impact on code.
*/
/* Invoke Can_TxConfirmation internal function for transmit confirmation
processing */
Can_TxConfirmationProcessing(CAN_CONTROLLER0_16BIT_BASE_ADDRESS,
LpController->ssHthOffSetId);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER1_TX_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_CONTROLLER1_TX_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_CONTROLLER1_TX_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_CONTROLLER1_TX_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
uint8 LucControllerId;
/* Get the index to Controller Id */
LucControllerId = Can_GpCntrlIdArray[CAN_CONTROLLER1];
/* Get the pointer to Controller structure */
LpController = &Can_GpFirstController[LucControllerId];
/* MISRA Rule : 11.3
Message : Cast between a pointer to object and an integral type.
Reason : This is to access the hardware registers in
the code.
Verification : However, the part of the code is
verified manually and it is not having
any impact on code.
*/
/* Invoke Can_TxConfirmation internal function for transmit confirmation
processing */
Can_TxConfirmationProcessing(CAN_CONTROLLER1_16BIT_BASE_ADDRESS,
LpController->ssHthOffSetId);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER2_TX_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_CONTROLLER2_TX_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_CONTROLLER2_TX_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_CONTROLLER2_TX_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
uint8 LucControllerId;
/* Get the index to Controller Id */
LucControllerId = Can_GpCntrlIdArray[CAN_CONTROLLER2];
/* Get the pointer to Controller structure */
LpController = &Can_GpFirstController[LucControllerId];
/* MISRA Rule : 11.3
Message : Cast between a pointer to object and an integral type.
Reason : This is to access the hardware registers in
the code.
Verification : However, the part of the code is
verified manually and it is not having
any impact on code.
*/
/* Invoke Can_TxConfirmation internal function for transmit confirmation
processing */
Can_TxConfirmationProcessing(CAN_CONTROLLER2_16BIT_BASE_ADDRESS,
LpController->ssHthOffSetId);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER3_TX_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_CONTROLLER3_TX_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_CONTROLLER3_TX_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_CONTROLLER3_TX_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
uint8 LucControllerId;
/* Get the index to Controller Id */
LucControllerId = Can_GpCntrlIdArray[CAN_CONTROLLER3];
/* Get the pointer to Controller structure */
LpController = &Can_GpFirstController[LucControllerId];
/* MISRA Rule : 11.3
Message : Cast between a pointer to object and an integral type.
Reason : This is to access the hardware registers in
the code.
Verification : However, the part of the code is
verified manually and it is not having
any impact on code.
*/
/* Invoke Can_TxConfirmation internal function for transmit confirmation
processing */
Can_TxConfirmationProcessing(CAN_CONTROLLER3_16BIT_BASE_ADDRESS,
LpController->ssHthOffSetId);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER4_TX_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_CONTROLLER4_TX_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_CONTROLLER4_TX_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_CONTROLLER4_TX_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
uint8 LucControllerId;
/* Get the index to Controller Id */
LucControllerId = Can_GpCntrlIdArray[CAN_CONTROLLER4];
/* Get the pointer to Controller structure */
LpController = &Can_GpFirstController[LucControllerId];
/* MISRA Rule : 11.3
Message : Cast between a pointer to object and an integral type.
Reason : This is to access the hardware registers in
the code.
Verification : However, the part of the code is
verified manually and it is not having
any impact on code.
*/
/* Invoke Can_TxConfirmation internal function for transmit confirmation
processing */
Can_TxConfirmationProcessing(CAN_CONTROLLER4_16BIT_BASE_ADDRESS,
LpController->ssHthOffSetId);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER5_TX_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_CONTROLLER5_TX_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_CONTROLLER5_TX_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_CONTROLLER5_TX_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
uint8 LucControllerId;
/* Get the index to Controller Id */
LucControllerId = Can_GpCntrlIdArray[CAN_CONTROLLER5];
/* Get the pointer to Controller structure */
LpController = &Can_GpFirstController[LucControllerId];
/* MISRA Rule : 11.3
Message : Cast between a pointer to object and an integral type.
Reason : This is to access the hardware registers in
the code.
Verification : However, the part of the code is
verified manually and it is not having
any impact on code.
*/
/* Invoke Can_TxConfirmation internal function for transmit confirmation
processing */
Can_TxConfirmationProcessing(CAN_CONTROLLER5_16BIT_BASE_ADDRESS,
LpController->ssHthOffSetId);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER0_BUSOFF_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_CONTROLLER0_BUSOFF_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_CONTROLLER0_BUSOFF_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_CONTROLLER0_BUSOFF_ISR(void)
#endif
{
P2VAR(Tdd_Can_AFCan_8bit_CntrlReg, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpCntrlReg8bit;
/* MISRA Rule : 11.3
Message : Cast between a pointer to object and an integral type.
Reason : This is to access the hardware registers in
the code.
Verification : However, the part of the code is verified manually and
it is not having any impact on code.
*/
/* Get the pointer to control register structure */
LpCntrlReg8bit = CAN_CONTROLLER0_8BIT_BASE_ADDRESS;
/* Check whether BusOff event is occurred or not */
if(((LpCntrlReg8bit->ucFcnCminStr) & (CAN_BUSOFF_STS)) == CAN_BUSOFF_STS)
{
/* MISRA Rule : 16.10
Message : Function returns a value which is not being used
Reason : Return value not used to achieve better throughput.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Invoke Can_StopMode internal function to set to initialization mode */
Can_StopMode(&Can_GpFirstController[CAN_CONTROLLER0]);
/* Invoke CanIf_ControllerBusOff call-back function to give busoff
notification */
CanIf_ControllerBusOff(CAN_CONTROLLER0);
} /* if(((LpCntrlReg8bit->ucFcnCminStr) & (CAN_ONE)) == CAN_TRUE) */
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER1_BUSOFF_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_CONTROLLER1_BUSOFF_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_CONTROLLER1_BUSOFF_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_CONTROLLER1_BUSOFF_ISR(void)
#endif
{
P2VAR(Tdd_Can_AFCan_8bit_CntrlReg, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpCntrlReg8bit;
/* MISRA Rule : 11.3
Message : Cast between a pointer to object and an integral type.
Reason : This is to access the hardware registers in
the code.
Verification : However, the part of the code is verified manually and
it is not having any impact on code.
*/
/* Get the pointer to control register structure */
LpCntrlReg8bit = CAN_CONTROLLER1_8BIT_BASE_ADDRESS;
/* Check whether BusOff event is occurred or not */
if(((LpCntrlReg8bit->ucFcnCminStr) & (CAN_BUSOFF_STS)) == CAN_BUSOFF_STS)
{
/* MISRA Rule : 16.10
Message : Function returns a value which is not being used
Reason : Return value not used to achieve better throughput.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Invoke Can_StopMode internal function to set to initialization mode */
Can_StopMode(&Can_GpFirstController[CAN_CONTROLLER1]);
/* Invoke CanIf_ControllerBusOff call-back function to give busoff
notification */
CanIf_ControllerBusOff(CAN_CONTROLLER1);
} /* if(((LpCntrlReg8bit->ucFcnCminStr) & (CAN_ONE)) == CAN_TRUE) */
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER2_BUSOFF_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_CONTROLLER2_BUSOFF_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_CONTROLLER2_BUSOFF_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_CONTROLLER2_BUSOFF_ISR(void)
#endif
{
P2VAR(Tdd_Can_AFCan_8bit_CntrlReg, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpCntrlReg8bit;
/* MISRA Rule : 11.3
Message : Cast between a pointer to object and an integral type.
Reason : This is to access the hardware registers in
the code.
Verification : However, the part of the code is verified manually and
it is not having any impact on code.
*/
/* Get the pointer to control register structure */
LpCntrlReg8bit = CAN_CONTROLLER2_8BIT_BASE_ADDRESS;
/* Check whether BusOff event is occurred or not */
if(((LpCntrlReg8bit->ucFcnCminStr) & (CAN_BUSOFF_STS)) == CAN_BUSOFF_STS)
{
/* MISRA Rule : 16.10
Message : Function returns a value which is not being used
Reason : Return value not used to achieve better throughput.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Invoke Can_StopMode internal function to set to initialization mode */
Can_StopMode(&Can_GpFirstController[CAN_CONTROLLER2]);
/* Invoke CanIf_ControllerBusOff call-back function to give busoff
notification */
CanIf_ControllerBusOff(CAN_CONTROLLER2);
} /* if(((LpCntrlReg8bit->ucFcnCminStr) & (CAN_ONE)) == CAN_TRUE) */
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER3_BUSOFF_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_CONTROLLER3_BUSOFF_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_CONTROLLER3_BUSOFF_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_CONTROLLER3_BUSOFF_ISR(void)
#endif
{
P2VAR(Tdd_Can_AFCan_8bit_CntrlReg, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpCntrlReg8bit;
/* MISRA Rule : 11.3
Message : Cast between a pointer to object and an integral type.
Reason : This is to access the hardware registers in
the code.
Verification : However, the part of the code is verified manually and
it is not having any impact on code.
*/
/* Get the pointer to control register structure */
LpCntrlReg8bit = CAN_CONTROLLER3_8BIT_BASE_ADDRESS;
/* Check whether BusOff event is occurred or not */
if(((LpCntrlReg8bit->ucFcnCminStr) & (CAN_BUSOFF_STS)) == CAN_BUSOFF_STS)
{
/* MISRA Rule : 16.10
Message : Function returns a value which is not being used
Reason : Return value not used to achieve better throughput.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Invoke Can_StopMode internal function to set to initialization mode */
Can_StopMode(&Can_GpFirstController[CAN_CONTROLLER3]);
/* Invoke CanIf_ControllerBusOff call-back function to give busoff
notification */
CanIf_ControllerBusOff(CAN_CONTROLLER3);
} /* if(((LpCntrlReg8bit->ucFcnCminStr) & (CAN_ONE)) == CAN_TRUE) */
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER4_BUSOFF_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_CONTROLLER4_BUSOFF_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_CONTROLLER4_BUSOFF_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_CONTROLLER4_BUSOFF_ISR(void)
#endif
{
P2VAR(Tdd_Can_AFCan_8bit_CntrlReg, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpCntrlReg8bit;
/* MISRA Rule : 11.3
Message : Cast between a pointer to object and an integral type.
Reason : This is to access the hardware registers in
the code.
Verification : However, the part of the code is verified manually and
it is not having any impact on code.
*/
/* Get the pointer to control register structure */
LpCntrlReg8bit = CAN_CONTROLLER4_8BIT_BASE_ADDRESS;
/* Check whether BusOff event is occurred or not */
if(((LpCntrlReg8bit->ucFcnCminStr) & (CAN_BUSOFF_STS)) == CAN_BUSOFF_STS)
{
/* MISRA Rule : 16.10
Message : Function returns a value which is not being used
Reason : Return value not used to achieve better throughput.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Invoke Can_StopMode internal function to set to initialization mode */
Can_StopMode(&Can_GpFirstController[CAN_CONTROLLER4]);
/* Invoke CanIf_ControllerBusOff call-back function to give busoff
notification */
CanIf_ControllerBusOff(CAN_CONTROLLER4);
} /* if(((LpCntrlReg8bit->ucFcnCminStr) & (CAN_ONE)) == CAN_TRUE) */
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER5_BUSOFF_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_CONTROLLER5_BUSOFF_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_CONTROLLER5_BUSOFF_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_CONTROLLER5_BUSOFF_ISR(void)
#endif
{
P2VAR(Tdd_Can_AFCan_8bit_CntrlReg, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpCntrlReg8bit;
/* MISRA Rule : 11.3
Message : Cast between a pointer to object and an integral type.
Reason : This is to access the hardware registers in
the code.
Verification : However, the part of the code is verified manually and
it is not having any impact on code.
*/
/* Get the pointer to control register structure */
LpCntrlReg8bit = CAN_CONTROLLER5_8BIT_BASE_ADDRESS;
/* Check whether BusOff event is occurred or not */
if(((LpCntrlReg8bit->ucFcnCminStr) & (CAN_BUSOFF_STS)) == CAN_BUSOFF_STS)
{
/* MISRA Rule : 16.10
Message : Function returns a value which is not being used
Reason : Return value not used to achieve better throughput.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Invoke Can_StopMode internal function to set to initialization mode */
Can_StopMode(&Can_GpFirstController[CAN_CONTROLLER5]);
/* Invoke CanIf_ControllerBusOff call-back function to give busoff
notification */
CanIf_ControllerBusOff(CAN_CONTROLLER5);
} /* if(((LpCntrlReg8bit->ucFcnCminStr) & (CAN_ONE)) == CAN_TRUE) */
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_WAKEUP_INTERRUPTS_TIED == STD_ON)
#if ((CAN_WAKEUP_SUPPORT == STD_ON) || \
(CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON))
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_WAKEUP_TXCANCEL_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_WAKEUP_TXCANCEL_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_WAKEUP_TXCANCEL_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit;
#if (CAN_WAKEUP_SUPPORT == STD_ON)
P2VAR(uint8, AUTOMATIC, CAN_AFCAN_PRIVATE_DATA) LpWakeuporEvent;
#endif
uint8_least LucNoOfController;
/* Get the pointer to first Controller structure */
LpController = Can_GpFirstController;
/* Get the number of Controllers configured */
LucNoOfController = CAN_MAX_NUMBER_OF_CONTROLLER;
/* Loop for the number of Controllers to check for which controller the
interrupt has occurred */
/* Get the pointer to control register structure */
LpCntrlReg16bit = LpController->pCntrlReg16bit;
do
{
#if (CAN_WAKEUP_SUPPORT == STD_ON)
/* Check whether polling method is configured or not */
if((((LpController->usIntEnable) & (CAN_WAKEUP_INT_MASK)) ==
CAN_WAKEUP_INT_MASK) &&
(((LpCntrlReg16bit->usFcnCmisCtl) & (CAN_WAKEUP_STS_MASK)) ==
CAN_WAKEUP_STS_MASK))
{
/* Get the pointer to the Wakeup status flag */
LpWakeuporEvent = (LpController->pWkpStsFlag);
/* MISRA Rule : 16.10
Message : Function returns a value which is not being used
Reason : Return value not used to achieve better
throughput.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Invoke Can_WakeupMode internalfunction to wakeup the Controller */
Can_WakeupMode(LpController);
/* Store the wakeup event */
*LpWakeuporEvent = CAN_WAKEUP;
/* Invoke EcuM_CheckWakeup call-back function to give wakeup
notification */
EcuM_CheckWakeup (LpController->ddWakeupSourceId);
/* Set the Controller Count to 1 to quit from the do-while loop */
LucNoOfController = CAN_ONE;
} /* End of check for Wakeup Interrupt */
else
#endif
{
#if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
if((((LpController->usIntEnable) & (CAN_TXCANCEL_INT_MASK)) ==
CAN_TXCANCEL_INT_MASK)
&& (((LpCntrlReg16bit->usFcnCmisCtl) & (CAN_TXCANCEL_STS_MASK)) ==
CAN_TXCANCEL_STS_MASK))
{
/* Invoke Can_TxCancelConfirmation internal function for transmit
cancellation confirmation processing */
Can_TxCancellationProcessing(LpController, CAN_TRUE);
/* Set the Controller Count to 1 to quit from the do-while loop */
LucNoOfController = CAN_ONE;
}
#endif
}
/* MISRA Rule : 17.4
Message : Increment or decrement operation
performed on pointer(LpController).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to next Controller structure */
LpController++;
/* Decrement the number of Controller */
LucNoOfController--;
/* MISRA Rule : 13.7
Message : The result of this logical operation is always
'false'. The value of this 'do - while' control
expression is always 'false'. The loop will be
executed once.
Reason : The result of this logical operation is always
false since only one controller is configured.
However, when two or more controllers are
configured this warning ceases to exist.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Check whether the number of Controller equals to zero */
}while(LucNoOfController != CAN_ZERO);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#else
#if (CAN_CONTROLLER0_WAKEUP_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_WAKEUP0_TXCANCEL_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_WAKEUP0_TXCANCEL_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_WAKEUP0_TXCANCEL_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
#if ((CAN_WAKEUP_SUPPORT == STD_ON)|| \
(CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON))
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit;
#endif
#if (CAN_WAKEUP_SUPPORT == STD_ON)
P2VAR(uint8, AUTOMATIC, CAN_AFCAN_PRIVATE_DATA) LpWakeuporEvent;
#endif
uint8_least LucNoOfController;
/* Get the pointer to first Controller structure */
LpController = Can_GpFirstController;
/* Get the number of Controllers configured */
LucNoOfController = CAN_MAX_NUMBER_OF_CONTROLLER;
/* Loop for the number of Controllers to check for which controller the
interrupt has occurred */
/* Get the pointer to control register structure */
#if ((CAN_WAKEUP_SUPPORT == STD_ON)|| \
(CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON))
LpCntrlReg16bit = LpController->pCntrlReg16bit;
#endif
do
{
#if (CAN_WAKEUP_SUPPORT == STD_ON)
/* Check whether polling method is configured or not */
if((((LpController->usIntEnable) & (CAN_WAKEUP_INT_MASK)) ==
CAN_WAKEUP_INT_MASK) &&
(((LpCntrlReg16bit->usFcnCmisCtl) & (CAN_WAKEUP_STS_MASK)) ==
CAN_WAKEUP_STS_MASK))
{
/* Get the pointer to the Wakeup status flag */
LpWakeuporEvent = (LpController->pWkpStsFlag);
/* MISRA Rule : 16.10
Message : Function returns a value which is not being used
Reason : Return value not used to achieve better
throughput.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Invoke Can_WakeupMode internalfunction to wakeup the Controller */
Can_WakeupMode(LpController);
/* Store the wakeup event */
*LpWakeuporEvent = CAN_WAKEUP;
/* Invoke EcuM_CheckWakeup call-back function to give wakeup
notification */
EcuM_CheckWakeup (LpController->ddWakeupSourceId);
/* Set the Controller Count to 1 to quit from the do-while loop */
LucNoOfController = CAN_ONE;
} /* End of check for Wakeup Interrupt */
else
#endif
{
#if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
if((((LpController->usIntEnable) & (CAN_TXCANCEL_INT_MASK)) ==
CAN_TXCANCEL_INT_MASK)
&& (((LpCntrlReg16bit->usFcnCmisCtl) & (CAN_TXCANCEL_STS_MASK)) ==
CAN_TXCANCEL_STS_MASK))
{
/* Invoke Can_TxCancelConfirmation internal function for transmit
cancellation confirmation processing */
Can_TxCancellationProcessing(LpController, CAN_TRUE);
/* Set the Controller Count to 1 to quit from the do-while loop */
LucNoOfController = CAN_ONE;
}
#endif
}
/* MISRA Rule : 17.4
Message : Increment or decrement operation
performed on pointer(LpController).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to next Controller structure */
LpController++;
/* Decrement the number of Controller */
LucNoOfController--;
/* MISRA Rule : 13.7
Message : The result of this logical operation is always
'false'. The value of this 'do - while' control
expression is always 'false'. The loop will be
executed once.
Reason : The result of this logical operation is always
false since only one controller is configured.
However, when two or more controllers are
configured this warning ceases to exist.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Check whether the number of Controller equals to zero */
}while(LucNoOfController != CAN_ZERO);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER1_WAKEUP_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_WAKEUP1_TXCANCEL_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_WAKEUP1_TXCANCEL_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_WAKEUP1_TXCANCEL_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
#if ((CAN_WAKEUP_SUPPORT == STD_ON)|| \
(CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON))
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit;
#endif
#if (CAN_WAKEUP_SUPPORT == STD_ON)
P2VAR(uint8, AUTOMATIC, CAN_AFCAN_PRIVATE_DATA) LpWakeuporEvent;
#endif
uint8_least LucNoOfController;
/* Get the pointer to first Controller structure */
LpController = Can_GpFirstController;
/* Get the number of Controllers configured */
LucNoOfController = CAN_MAX_NUMBER_OF_CONTROLLER;
/* Loop for the number of Controllers to check for which controller the
interrupt has occurred */
/* Get the pointer to control register structure */
#if ((CAN_WAKEUP_SUPPORT == STD_ON)|| \
(CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON))
LpCntrlReg16bit = LpController->pCntrlReg16bit;
#endif
do
{
#if (CAN_WAKEUP_SUPPORT == STD_ON)
/* Check whether polling method is configured or not */
if((((LpController->usIntEnable) & (CAN_WAKEUP_INT_MASK)) ==
CAN_WAKEUP_INT_MASK) &&
(((LpCntrlReg16bit->usFcnCmisCtl) & (CAN_WAKEUP_STS_MASK)) ==
CAN_WAKEUP_STS_MASK))
{
/* Get the pointer to the Wakeup status flag */
LpWakeuporEvent = (LpController->pWkpStsFlag);
/* MISRA Rule : 16.10
Message : Function returns a value which is not being used
Reason : Return value not used to achieve better
throughput.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Invoke Can_WakeupMode internalfunction to wakeup the Controller */
Can_WakeupMode(LpController);
/* Store the wakeup event */
*LpWakeuporEvent = CAN_WAKEUP;
/* Invoke EcuM_CheckWakeup call-back function to give wakeup
notification */
EcuM_CheckWakeup (LpController->ddWakeupSourceId);
/* Set the Controller Count to 1 to quit from the do-while loop */
LucNoOfController = CAN_ONE;
} /* End of check for Wakeup Interrupt */
else
#endif
{
#if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
if((((LpController->usIntEnable) & (CAN_TXCANCEL_INT_MASK)) ==
CAN_TXCANCEL_INT_MASK)
&& (((LpCntrlReg16bit->usFcnCmisCtl) & (CAN_TXCANCEL_STS_MASK)) ==
CAN_TXCANCEL_STS_MASK))
{
/* Invoke Can_TxCancelConfirmation internal function for transmit
cancellation confirmation processing */
Can_TxCancellationProcessing(LpController, CAN_TRUE);
/* Set the Controller Count to 1 to quit from the do-while loop */
LucNoOfController = CAN_ONE;
}
#endif
}
/* MISRA Rule : 17.4
Message : Increment or decrement operation
performed on pointer(LpController).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to next Controller structure */
LpController++;
/* Decrement the number of Controller */
LucNoOfController--;
/* MISRA Rule : 13.7
Message : The result of this logical operation is always
'false'. The value of this 'do - while' control
expression is always 'false'. The loop will be
executed once.
Reason : The result of this logical operation is always
false since only one controller is configured.
However, when two or more controllers are
configured this warning ceases to exist.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Check whether the number of Controller equals to zero */
}while(LucNoOfController != CAN_ZERO);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER2_WAKEUP_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_WAKEUP2_TXCANCEL_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_WAKEUP2_TXCANCEL_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_WAKEUP2_TXCANCEL_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
#if ((CAN_WAKEUP_SUPPORT == STD_ON)|| \
(CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON))
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit;
#endif
#if (CAN_WAKEUP_SUPPORT == STD_ON)
P2VAR(uint8, AUTOMATIC, CAN_AFCAN_PRIVATE_DATA) LpWakeuporEvent;
#endif
uint8_least LucNoOfController;
/* Get the pointer to first Controller structure */
LpController = Can_GpFirstController;
/* Get the number of Controllers configured */
LucNoOfController = CAN_MAX_NUMBER_OF_CONTROLLER;
/* Loop for the number of Controllers to check for which controller the
interrupt has occurred */
/* Get the pointer to control register structure */
#if ((CAN_WAKEUP_SUPPORT == STD_ON)|| \
(CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON))
LpCntrlReg16bit = LpController->pCntrlReg16bit;
#endif
do
{
#if (CAN_WAKEUP_SUPPORT == STD_ON)
/* Check whether polling method is configured or not */
if((((LpController->usIntEnable) & (CAN_WAKEUP_INT_MASK)) ==
CAN_WAKEUP_INT_MASK) &&
(((LpCntrlReg16bit->usFcnCmisCtl) & (CAN_WAKEUP_STS_MASK)) ==
CAN_WAKEUP_STS_MASK))
{
/* Get the pointer to the Wakeup status flag */
LpWakeuporEvent = (LpController->pWkpStsFlag);
/* MISRA Rule : 16.10
Message : Function returns a value which is not being used
Reason : Return value not used to achieve better
throughput.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Invoke Can_WakeupMode internalfunction to wakeup the Controller */
Can_WakeupMode(LpController);
/* Store the wakeup event */
*LpWakeuporEvent = CAN_WAKEUP;
/* Invoke EcuM_CheckWakeup call-back function to give wakeup
notification */
EcuM_CheckWakeup (LpController->ddWakeupSourceId);
/* Set the Controller Count to 1 to quit from the do-while loop */
LucNoOfController = CAN_ONE;
} /* End of check for Wakeup Interrupt */
else
#endif
{
#if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
if((((LpController->usIntEnable) & (CAN_TXCANCEL_INT_MASK)) ==
CAN_TXCANCEL_INT_MASK)
&& (((LpCntrlReg16bit->usFcnCmisCtl) & (CAN_TXCANCEL_STS_MASK)) ==
CAN_TXCANCEL_STS_MASK))
{
/* Invoke Can_TxCancelConfirmation internal function for transmit
cancellation confirmation processing */
Can_TxCancellationProcessing(LpController, CAN_TRUE);
/* Set the Controller Count to 1 to quit from the do-while loop */
LucNoOfController = CAN_ONE;
}
#endif
}
/* MISRA Rule : 17.4
Message : Increment or decrement operation
performed on pointer(LpController).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to next Controller structure */
LpController++;
/* Decrement the number of Controller */
LucNoOfController--;
/* MISRA Rule : 13.7
Message : The result of this logical operation is always
'false'. The value of this 'do - while' control
expression is always 'false'. The loop will be
executed once.
Reason : The result of this logical operation is always
false since only one controller is configured.
However, when two or more controllers are
configured this warning ceases to exist.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Check whether the number of Controller equals to zero */
}while(LucNoOfController != CAN_ZERO);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER3_WAKEUP_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_WAKEUP3_TXCANCEL_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_WAKEUP3_TXCANCEL_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_WAKEUP3_TXCANCEL_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit;
#if (CAN_WAKEUP_SUPPORT == STD_ON)
P2VAR(uint8, AUTOMATIC, CAN_AFCAN_PRIVATE_DATA) LpWakeuporEvent;
#endif
uint8_least LucNoOfController;
/* Get the pointer to first Controller structure */
LpController = Can_GpFirstController;
/* Get the number of Controllers configured */
LucNoOfController = CAN_MAX_NUMBER_OF_CONTROLLER;
/* Loop for the number of Controllers to check for which controller the
interrupt has occurred */
/* Get the pointer to control register structure */
#if ((CAN_WAKEUP_SUPPORT == STD_ON)|| \
(CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON))
LpCntrlReg16bit = LpController->pCntrlReg16bit;
#endif
do
{
#if (CAN_WAKEUP_SUPPORT == STD_ON)
/* Check whether polling method is configured or not */
if((((LpController->usIntEnable) & (CAN_WAKEUP_INT_MASK)) ==
CAN_WAKEUP_INT_MASK) &&
(((LpCntrlReg16bit->usFcnCmisCtl) & (CAN_WAKEUP_STS_MASK)) ==
CAN_WAKEUP_STS_MASK))
{
/* Get the pointer to the Wakeup status flag */
LpWakeuporEvent = (LpController->pWkpStsFlag);
/* MISRA Rule : 16.10
Message : Function returns a value which is not being used
Reason : Return value not used to achieve better
throughput.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Invoke Can_WakeupMode internalfunction to wakeup the Controller */
Can_WakeupMode(LpController);
/* Store the wakeup event */
*LpWakeuporEvent = CAN_WAKEUP;
/* Invoke EcuM_CheckWakeup call-back function to give wakeup
notification */
EcuM_CheckWakeup (LpController->ddWakeupSourceId);
/* Set the Controller Count to 1 to quit from the do-while loop */
LucNoOfController = CAN_ONE;
} /* End of check for Wakeup Interrupt */
else
#endif
{
#if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
if((((LpController->usIntEnable) & (CAN_TXCANCEL_INT_MASK)) ==
CAN_TXCANCEL_INT_MASK)
&& (((LpCntrlReg16bit->usFcnCmisCtl) & (CAN_TXCANCEL_STS_MASK)) ==
CAN_TXCANCEL_STS_MASK))
{
/* Invoke Can_TxCancelConfirmation internal function for transmit
cancellation confirmation processing */
Can_TxCancellationProcessing(LpController, CAN_TRUE);
/* Set the Controller Count to 1 to quit from the do-while loop */
LucNoOfController = CAN_ONE;
}
#endif
}
/* MISRA Rule : 17.4
Message : Increment or decrement operation
performed on pointer(LpController).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to next Controller structure */
LpController++;
/* Decrement the number of Controller */
LucNoOfController--;
/* MISRA Rule : 13.7
Message : The result of this logical operation is always
'false'. The value of this 'do - while' control
expression is always 'false'. The loop will be
executed once.
Reason : The result of this logical operation is always
false since only one controller is configured.
However, when two or more controllers are
configured this warning ceases to exist.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Check whether the number of Controller equals to zero */
}while(LucNoOfController != CAN_ZERO);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER4_WAKEUP_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_WAKEUP4_TXCANCEL_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_WAKEUP4_TXCANCEL_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_WAKEUP4_TXCANCEL_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
#if ((CAN_WAKEUP_SUPPORT == STD_ON)|| \
(CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON))
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit;
#endif
#if (CAN_WAKEUP_SUPPORT == STD_ON)
P2VAR(uint8, AUTOMATIC, CAN_AFCAN_PRIVATE_DATA) LpWakeuporEvent;
#endif
uint8_least LucNoOfController;
/* Get the pointer to first Controller structure */
LpController = Can_GpFirstController;
/* Get the number of Controllers configured */
LucNoOfController = CAN_MAX_NUMBER_OF_CONTROLLER;
/* Loop for the number of Controllers to check for which controller the
interrupt has occurred */
/* Get the pointer to control register structure */
#if ((CAN_WAKEUP_SUPPORT == STD_ON)|| \
(CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON))
LpCntrlReg16bit = LpController->pCntrlReg16bit;
#endif
do
{
#if (CAN_WAKEUP_SUPPORT == STD_ON)
/* Check whether polling method is configured or not */
if((((LpController->usIntEnable) & (CAN_WAKEUP_INT_MASK)) ==
CAN_WAKEUP_INT_MASK) &&
(((LpCntrlReg16bit->usFcnCmisCtl) & (CAN_WAKEUP_STS_MASK)) ==
CAN_WAKEUP_STS_MASK))
{
/* Get the pointer to the Wakeup status flag */
LpWakeuporEvent = (LpController->pWkpStsFlag);
/* MISRA Rule : 16.10
Message : Function returns a value which is not being used
Reason : Return value not used to achieve better
throughput.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Invoke Can_WakeupMode internalfunction to wakeup the Controller */
Can_WakeupMode(LpController);
/* Store the wakeup event */
*LpWakeuporEvent = CAN_WAKEUP;
/* Invoke EcuM_CheckWakeup call-back function to give wakeup
notification */
EcuM_CheckWakeup (LpController->ddWakeupSourceId);
/* Set the Controller Count to 1 to quit from the do-while loop */
LucNoOfController = CAN_ONE;
} /* End of check for Wakeup Interrupt */
else
#endif
{
#if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
if((((LpController->usIntEnable) & (CAN_TXCANCEL_INT_MASK)) ==
CAN_TXCANCEL_INT_MASK)
&& (((LpCntrlReg16bit->usFcnCmisCtl) & (CAN_TXCANCEL_STS_MASK)) ==
CAN_TXCANCEL_STS_MASK))
{
/* Invoke Can_TxCancelConfirmation internal function for transmit
cancellation confirmation processing */
Can_TxCancellationProcessing(LpController, CAN_TRUE);
/* Set the Controller Count to 1 to quit from the do-while loop */
LucNoOfController = CAN_ONE;
}
#endif
}
/* MISRA Rule : 17.4
Message : Increment or decrement operation
performed on pointer(LpController).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to next Controller structure */
LpController++;
/* Decrement the number of Controller */
LucNoOfController--;
/* MISRA Rule : 13.7
Message : The result of this logical operation is always
'false'. The value of this 'do - while' control
expression is always 'false'. The loop will be
executed once.
Reason : The result of this logical operation is always
false since only one controller is configured.
However, when two or more controllers are
configured this warning ceases to exist.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Check whether the number of Controller equals to zero */
}while(LucNoOfController != CAN_ZERO);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#if (CAN_CONTROLLER5_WAKEUP_INTERRUPT == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE) CAN_WAKEUP5_TXCANCEL_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(CAN_WAKEUP5_TXCANCEL_ISR)
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, CAN_AFCAN_PUBLIC_CODE)CAN_WAKEUP5_TXCANCEL_ISR(void)
#endif
{
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST)
LpController;
#if ((CAN_WAKEUP_SUPPORT == STD_ON)|| \
(CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON))
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit;
#endif
#if (CAN_WAKEUP_SUPPORT == STD_ON)
P2VAR(uint8, AUTOMATIC, CAN_AFCAN_PRIVATE_DATA) LpWakeuporEvent;
#endif
uint8_least LucNoOfController;
/* Get the pointer to first Controller structure */
LpController = Can_GpFirstController;
/* Get the number of Controllers configured */
LucNoOfController = CAN_MAX_NUMBER_OF_CONTROLLER;
/* Loop for the number of Controllers to check for which controller the
interrupt has occurred */
/* Get the pointer to control register structure */
#if ((CAN_WAKEUP_SUPPORT == STD_ON)|| \
(CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON))
LpCntrlReg16bit = LpController->pCntrlReg16bit;
#endif
do
{
#if (CAN_WAKEUP_SUPPORT == STD_ON)
/* Check whether polling method is configured or not */
if((((LpController->usIntEnable) & (CAN_WAKEUP_INT_MASK)) ==
CAN_WAKEUP_INT_MASK) &&
(((LpCntrlReg16bit->usFcnCmisCtl) & (CAN_WAKEUP_STS_MASK)) ==
CAN_WAKEUP_STS_MASK))
{
/* Get the pointer to the Wakeup status flag */
LpWakeuporEvent = (LpController->pWkpStsFlag);
/* MISRA Rule : 16.10
Message : Function returns a value which is not being used
Reason : Return value not used to achieve better
throughput.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Invoke Can_WakeupMode internalfunction to wakeup the Controller */
Can_WakeupMode(LpController);
/* Store the wakeup event */
*LpWakeuporEvent = CAN_WAKEUP;
/* Invoke EcuM_CheckWakeup call-back function to give wakeup
notification */
EcuM_CheckWakeup (LpController->ddWakeupSourceId);
/* Set the Controller Count to 1 to quit from the do-while loop */
LucNoOfController = CAN_ONE;
} /* End of check for Wakeup Interrupt */
else
#endif
{
#if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
if((((LpController->usIntEnable) & (CAN_TXCANCEL_INT_MASK)) ==
CAN_TXCANCEL_INT_MASK)
&& (((LpCntrlReg16bit->usFcnCmisCtl) & (CAN_TXCANCEL_STS_MASK)) ==
CAN_TXCANCEL_STS_MASK))
{
/* Invoke Can_TxCancelConfirmation internal function for transmit
cancellation confirmation processing */
Can_TxCancellationProcessing(LpController, CAN_TRUE);
/* Set the Controller Count to 1 to quit from the do-while loop */
LucNoOfController = CAN_ONE;
}
#endif
}
/* MISRA Rule : 17.4
Message : Increment or decrement operation
performed on pointer(LpController).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to next Controller structure */
LpController++;
/* Decrement the number of Controller */
LucNoOfController--;
/* MISRA Rule : 13.7
Message : The result of this logical operation is always
'false'. The value of this 'do - while' control
expression is always 'false'. The loop will be
executed once.
Reason : The result of this logical operation is always
false since only one controller is configured.
However, when two or more controllers are
configured this warning ceases to exist.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Check whether the number of Controller equals to zero */
}while(LucNoOfController != CAN_ZERO);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#endif
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Icu/Icu_LTTypes.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Icu_LTTypes.h */
/* Version = 3.0.0a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains structure datatype for link time parameters of ICU */
/* Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 26-Aug-2009 : Initial version
* V3.0.0a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
#ifndef ICU_LTTYPES_H
#define ICU_LTTYPES_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Icu.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define ICU_LTTYPES_AR_MAJOR_VERSION ICU_AR_MAJOR_VERSION_VALUE
#define ICU_LTTYPES_AR_MINOR_VERSION ICU_AR_MINOR_VERSION_VALUE
#define ICU_LTTYPES_AR_PATCH_VERSION ICU_AR_PATCH_VERSION_VALUE
/*
* File version information
*/
#define ICU_LTTYPES_SW_MAJOR_VERSION 3
#define ICU_LTTYPES_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Structure of function pointer for Callback notification function */
typedef struct STagTdd_Icu_ChannelFuncType
{
/* Pointer to callback notification function */
P2FUNC (void, ICU_APPL_CODE, pIcuNotificationPointer)(void);
} Tdd_Icu_ChannelFuncType;
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#define ICU_START_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/* Declaration for ICU Channel Callback functions Configuration */
extern CONST(Tdd_Icu_ChannelFuncType, ICU_CONST) Icu_GstChannelFunc[];
#define ICU_STOP_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
#endif /* ICU_LTTYPES_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Can/Can_Wakeup.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Can_Wakeup.c */
/* Version = 3.0.1a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2008-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of Wake-up occurrence. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12.12.2008 : Initial Version
* V3.0.1: 21.10.2009 : Updated compiler version as per
* SCR ANMCANLINFR3_SCR_031.
*
* V3.0.1a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Can_PBTypes.h" /* CAN Driver Post-Build Config. Header File */
#include "Can_Wakeup.h" /* CAN Wakeup Header File */
#include "Can_Ram.h" /* CAN Driver RAM Header File */
#include "Can_Tgt.h" /* CAN Driver Target Header File */
#if (CAN_DEV_ERROR_DETECT == STD_ON)
#include "Det.h" /* DET Header File */
#endif
#include "SchM_Can.h" /* Scheduler Header File */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define CAN_WAKEUP_C_AR_MAJOR_VERSION 2
#define CAN_WAKEUP_C_AR_MINOR_VERSION 2
#define CAN_WAKEUP_C_AR_PATCH_VERSION 2
/* File version information */
#define CAN_WAKEUP_C_SW_MAJOR_VERSION 3
#define CAN_WAKEUP_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (CAN_WAKEUP_AR_MAJOR_VERSION != CAN_WAKEUP_C_AR_MAJOR_VERSION)
#error "Can_Wakeup.c : Mismatch in Specification Major Version"
#endif
#if (CAN_WAKEUP_AR_MINOR_VERSION != CAN_WAKEUP_C_AR_MINOR_VERSION)
#error "Can_Wakeup.c : Mismatch in Specification Minor Version"
#endif
#if (CAN_WAKEUP_AR_PATCH_VERSION != CAN_WAKEUP_C_AR_PATCH_VERSION)
#error "Can_Wakeup.c : Mismatch in Specification Patch Version"
#endif
#if (CAN_WAKEUP_SW_MAJOR_VERSION != CAN_WAKEUP_C_SW_MAJOR_VERSION)
#error "Can_Wakeup.c : Mismatch in Software Major Version"
#endif
#if (CAN_WAKEUP_SW_MINOR_VERSION != CAN_WAKEUP_C_SW_MINOR_VERSION)
#error "Can_Wakeup.c : Mismatch in Software Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Can_CheckWakeup
**
** Service ID : 0x0b
**
** Description : This service checks if a wakeup has occurred for the
** given controller.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Non Re-entrant
**
** Input Parameters : Controller
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Std_ReturnType (E_OK / E_NOT_OK)
**
** Preconditions : The CAN Driver must be initialized.
**
** Remarks : Global Variable(s) referred in this function:
** Can_GblCanStatus, Can_GucFirstHthId, Can_GucLastHthId,
** Can_GpFirstHth
**
** : Function(s) invoked:
** Det_ReportError()
**
*******************************************************************************/
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(Std_ReturnType,CAN_AFCAN_PUBLIC_CODE) Can_CheckWakeup
(uint8 Controller)
{
#if(CAN_WAKEUP_SUPPORT == STD_ON)
P2CONST(Can_ControllerConfigType,AUTOMATIC,
CAN_AFCAN_PRIVATE_CONST) LpController;
P2VAR(uint8, AUTOMATIC, CAN_AFCAN_PRIVATE_DATA) LpWakeuporEvent;
#endif
Std_ReturnType LenStdReturnType;
/* Initialize StdReturnType to E_OK */
LenStdReturnType = E_OK;
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Report to DET, if module is not initialized */
if (Can_GblCanStatus == CAN_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_CHK_WAKEUP_SID, CAN_E_UNINIT);
/* Set StdReturnType to E_NOT_OK */
LenStdReturnType = E_NOT_OK;
}
/* Report to DET, if the Controller Id is out of range */
else if(Controller > Can_GucLastCntrlId)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_CHK_WAKEUP_SID, CAN_E_PARAM_CONTROLLER);
/* Set StdReturnType to E_NOT_OK */
LenStdReturnType = E_NOT_OK;
}
else
{
/* Get the Controller index */
Controller = Can_GpCntrlIdArray[Controller];
/* Report to DET, if the Controller index is not present */
if(Controller == CAN_LIMIT)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_CHK_WAKEUP_SID, CAN_E_PARAM_CONTROLLER);
/* Set StdReturnType to E_NOT_OK */
LenStdReturnType = E_NOT_OK;
}
}
/* Check whether any development error occurred */
if(LenStdReturnType != E_NOT_OK)
#endif /* #if (CAN_DEV_ERROR_DETECT == STD_ON) */
{
#if (CAN_WAKEUP_SUPPORT == STD_ON)
/* MISRA Rule : 17.4
Message : Performing pointer arithmetic
Reason : Increment operator not used to achieve better
throughput.
Verification : However, part of the code is verified manually and
it is not having any impact.
*/
/* Get the pointer to the Controller structure */
LpController = Can_GpFirstController + Can_GpCntrlIdArray[Controller];
/* Get the pointer to the Wakeup status flag */
LpWakeuporEvent = (LpController->pWkpStsFlag);
/* Check,if the wakeup status is set */
if(*LpWakeuporEvent == CAN_WAKEUP)
{
/* Enable protection for exclusive area */
SchM_Enter_Can(CAN_INTERRUPT_CONTROL_PROTECTION_AREA);
/* Clear the wakeup status flag */
*(LpWakeuporEvent) &= CAN_DISABLEWAKEUP;
/* Disable protection for exclusive area */
SchM_Exit_Can(CAN_INTERRUPT_CONTROL_PROTECTION_AREA);
}
else
{
/* Set StdReturnType to E_NOT_OK */
LenStdReturnType = E_NOT_OK;
}
#endif
}
return(LenStdReturnType);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/SERV/Os/Api_SchdTbl.c
/*****************************************************************************
| File Name: QueueFuncsList.h
|
| Description: File to put related functions list
|
|-----------------------------------------------------------------------------
| PATAC Confidential
|-----------------------------------------------------------------------------
|
| This software is copyright is proprietary of
| Pan Asia Technical Automotive Company(PATAC).
| All rights are reserved by PATAC.
|
|-----------------------------------------------------------------------------
| A U T H O R I D E N T I T Y
|-----------------------------------------------------------------------------
| Initials Name Company
| -------- -------------------- ---------------------------------------
| FRED <NAME> PATAC
|
|-----------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|-----------------------------------------------------------------------------
| Date Version Author Description
| ---------- -------- ------ ----------------------------------------------
| 2012-02-16 01.00.00 zephan Creation
|****************************************************************************/
#include "Platform_Types.h"
#include "Sys_QueueHandler.h"
#include "Api_SchdTbl.h"
#include "Can.h"
#include "IoHwAb_Can.h"
#include "IoHwAb_Api.h"
#include "LEDLightControl.h"
#include "LEDPWMActOut.h"
#define EVENT_FUNCS_ID(EventID) CaKERNEL_fp_##EventID
void Test_Task(void);
/******************************************************************************
* FUNCTION POINTER for each Event, You can add related functions in the array. For example, driver door
* open event is possible related to power mode, content theft, chime, entry display etc subsystem handler
* fucntions.
*
*IMPORTANT NOTE: NULL must be last element of each array. No other elements except NULL is OK.
******************************************************************************/
const FUNCTPTR CaKERNEL_1KmsTaskList[] =
{
NULL/*last ID must be DUMMY*/
};
const FUNCTPTR CaKERNEL_500msTaskList[] =
{
NULL/*last ID must be DUMMY*/
};
const FUNCTPTR CaKERNEL_200msTaskList[] =
{
NULL/*last ID must be DUMMY*/
};
const FUNCTPTR CaKERNEL_100msTaskList[] =
{
NULL/*last ID must be DUMMY*/
};
const FUNCTPTR CaKERNEL_50msTaskList[] =
{
NULL/*last ID must be DUMMY*/
};
const FUNCTPTR CaKERNEL_20msTaskList[] =
{
Can_MainFunction_20mS,
NULL/*last ID must be DUMMY*/
};
const FUNCTPTR CaKERNEL_10msATaskList[] =
{
NULL/*last ID must be DUMMY*/
};
const FUNCTPTR CaKERNEL_10msBTaskList[] =
{
LEDSwitchMainFunction,
LEDPWMOutMainFunction,
NULL/*last ID must be DUMMY*/
};
const FUNCTPTR CaKERNEL_5msATaskList[] =
{
Test_Task,
DoAb_UpdateChannel,
NULL/*last ID must be DUMMY*/
};
const FUNCTPTR CaKERNEL_5msBTaskList[] =
{
NULL/*last ID must be DUMMY*/
};
const FUNCTPTR CaKERNEL_2p5msTaskList[] =
{
NULL/*last ID must be DUMMY*/
};
/*event function list*/
const FarFtnPtr_Arry EVENT_FUNCS_ID(CeEVT_e_Test)[] =
{
Test_Task,
NULL/* NULL must be the last position*/
};
/******************************************************************************
* FUNCTION LIST POINTER for each Event, it is correponding to the EVENT enumate array, the number must be
*exactly same
*
*IMPORTANT NOTE: First elemement is dummy event, its functions list is NULL
******************************************************************************/
const FarFtnPtr_Arry CaKERNEL_a_EventFuncs[] =
{
NULL,/*first item must be NULL*/
EVENT_FUNCS_ID(CeEVT_e_Test),
/*fill you Event list here*/
};
void Task_BackGround(void)
{
}
void Task_InitAfterOsOn(void)
{
}
void SysSrvc_OsTickHook(void)
{
}
void Sys_EnterIdleClbk(void)
{
}
void Sys_ExitIdleCblk(void)
{
}
void GetCurHwTimer(void)
{
}
<file_sep>/BSP/MCAL/Pwm/Pwm_Cfg.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* File name = Pwm_Cfg.h */
/* Version = 3.1.2 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains pre-compile time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.1.5
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_PWM_V308_140113_HEADLAMP.arxml
* GENERATED ON: 8 Apr 2014 - 18:39:24
*/
#ifndef PWM_CFG_H
#define PWM_CFG_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define PWM_CFG_AR_MAJOR_VERSION 2
#define PWM_CFG_AR_MINOR_VERSION 2
#define PWM_CFG_AR_PATCH_VERSION 0
/* File version information */
#define PWM_CFG_SW_MAJOR_VERSION 3
#define PWM_CFG_SW_MINOR_VERSION 1
/*******************************************************************************
** Common Publish Information **
*******************************************************************************/
#define PWM_AR_MAJOR_VERSION_VALUE 2
#define PWM_AR_MINOR_VERSION_VALUE 2
#define PWM_AR_PATCH_VERSION_VALUE 0
#define PWM_SW_MAJOR_VERSION_VALUE 3
#define PWM_SW_MINOR_VERSION_VALUE 1
#define PWM_SW_PATCH_VERSION_VALUE 2
#define PWM_VENDOR_ID_VALUE 23
#define PWM_MODULE_ID_VALUE 121
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Instance ID of the PWM Driver*/
#define PWM_INSTANCE_ID_VALUE 0
/* Enables/Disables Development error detection */
#define PWM_DEV_ERROR_DETECT STD_OFF
/* Enables/Disables Pwm Notification */
#define PWM_NOTIFICATION_SUPPORTED STD_OFF
/* Enables/Disables GetVersionInfo API */
#define PWM_VERSION_INFO_API STD_OFF
/* Enables/Disables the Pwm_DeInit API */
#define PWM_DE_INIT_API STD_OFF
/* Enables/Disables the Pwm_SetDutyCycle API */
#define PWM_SET_DUTY_CYCLE_API STD_ON
/* Enables/Disables the Pwm_SetPeriodAndDuty API */
#define PWM_SET_PERIOD_AND_DUTY_API STD_ON
/* Enables/Disables the Pwm_SetOutputToIdle API */
#define PWM_SET_OUTPUT_TO_IDLE_API STD_ON
/* Enables/Disables the Pwm_GetOutputState API */
#define PWM_GET_OUTPUT_STATE_API STD_OFF
/* Enables/Disables the DELAY Macro support */
#define PWM_DELAY_MACRO_SUPPORT STD_OFF
/* Enables/Disables Synchronous start between the TAU units
(TAUA0, TAUA1, TAUJ0, TAUJ1) */
#define PWM_SYNCHSTART_BETWEEN_TAU_USED STD_OFF
/* Enable/disable the Critical section protection */
#define PWM_CRITICAL_SECTION_PROTECTION STD_ON
/* Enable/disable the setting of Prescaler, baudrate and
blConfigurePrescaler by the PWM Driver */
#define PWM_CONFIG_PRESCALER_SUPPORTED STD_ON
/* Total number of PWM channels configured */
#define PWM_TOTAL_CHANNELS_CONFIGURED 34
/* Total number of PWM TAUA, TAUB and TAUC channels configured */
#define PWM_TOTAL_TAUABC_CHANNELS_CONFIG 34
/* Total number of PWM TAUJ channels configured */
#define PWM_TOTAL_TAUJ_CHANNELS_CONFIG 0
/*Total number of PWM TAU units configured*/
#define PWM_TOTAL_TAUABC_UNITS_CONFIG 4
/*Total number of PWM TAU units configured*/
#define PWM_TOTAL_TAUJ_UNITS_CONFIG 0
/*Maximum PWM Channel ID configured */
#define PWM_MAX_CHANNEL_ID_CONFIGURED 51
/* Indicates the inclusion of notification function */
#define PWM_TAUA_UNIT_USED STD_ON
/* Indicates the inclusion of notification function */
#define PWM_TAUB_UNIT_USED STD_ON
/* Indicates the inclusion of notification function */
#define PWM_TAUC_UNIT_USED STD_ON
/* Indicates the inclusion of notification function */
#define PWM_TAUJ_UNIT_USED STD_OFF
/*******************************************************************************
** Macro Definitions **
*******************************************************************************/
/* Macros for enabling/disabling ISRS */
#define PWM_TAUA0_CH0_ISR_API STD_OFF
#define PWM_TAUA0_CH10_ISR_API STD_OFF
#define PWM_TAUA0_CH11_ISR_API STD_OFF
#define PWM_TAUA0_CH12_ISR_API STD_OFF
#define PWM_TAUA0_CH13_ISR_API STD_OFF
#define PWM_TAUA0_CH14_ISR_API STD_OFF
#define PWM_TAUA0_CH15_ISR_API STD_OFF
#define PWM_TAUA0_CH1_ISR_API STD_OFF
#define PWM_TAUA0_CH2_ISR_API STD_OFF
#define PWM_TAUA0_CH3_ISR_API STD_OFF
#define PWM_TAUA0_CH4_ISR_API STD_OFF
#define PWM_TAUA0_CH5_ISR_API STD_OFF
#define PWM_TAUA0_CH6_ISR_API STD_OFF
#define PWM_TAUA0_CH7_ISR_API STD_OFF
#define PWM_TAUA0_CH8_ISR_API STD_OFF
#define PWM_TAUA0_CH9_ISR_API STD_OFF
#define PWM_TAUA1_CH0_ISR_API STD_OFF
#define PWM_TAUA1_CH10_ISR_API STD_OFF
#define PWM_TAUA1_CH11_ISR_API STD_OFF
#define PWM_TAUA1_CH12_ISR_API STD_OFF
#define PWM_TAUA1_CH13_ISR_API STD_OFF
#define PWM_TAUA1_CH14_ISR_API STD_OFF
#define PWM_TAUA1_CH15_ISR_API STD_OFF
#define PWM_TAUA1_CH1_ISR_API STD_OFF
#define PWM_TAUA1_CH2_ISR_API STD_OFF
#define PWM_TAUA1_CH3_ISR_API STD_OFF
#define PWM_TAUA1_CH4_ISR_API STD_OFF
#define PWM_TAUA1_CH5_ISR_API STD_OFF
#define PWM_TAUA1_CH6_ISR_API STD_OFF
#define PWM_TAUA1_CH7_ISR_API STD_OFF
#define PWM_TAUA1_CH8_ISR_API STD_OFF
#define PWM_TAUA1_CH9_ISR_API STD_OFF
#define PWM_TAUA2_CH0_ISR_API STD_OFF
#define PWM_TAUA2_CH10_ISR_API STD_OFF
#define PWM_TAUA2_CH11_ISR_API STD_OFF
#define PWM_TAUA2_CH12_ISR_API STD_OFF
#define PWM_TAUA2_CH13_ISR_API STD_OFF
#define PWM_TAUA2_CH14_ISR_API STD_OFF
#define PWM_TAUA2_CH15_ISR_API STD_OFF
#define PWM_TAUA2_CH1_ISR_API STD_OFF
#define PWM_TAUA2_CH2_ISR_API STD_OFF
#define PWM_TAUA2_CH3_ISR_API STD_OFF
#define PWM_TAUA2_CH4_ISR_API STD_OFF
#define PWM_TAUA2_CH5_ISR_API STD_OFF
#define PWM_TAUA2_CH6_ISR_API STD_OFF
#define PWM_TAUA2_CH7_ISR_API STD_OFF
#define PWM_TAUA2_CH8_ISR_API STD_OFF
#define PWM_TAUA2_CH9_ISR_API STD_OFF
#define PWM_TAUA3_CH0_ISR_API STD_OFF
#define PWM_TAUA3_CH10_ISR_API STD_OFF
#define PWM_TAUA3_CH11_ISR_API STD_OFF
#define PWM_TAUA3_CH12_ISR_API STD_OFF
#define PWM_TAUA3_CH13_ISR_API STD_OFF
#define PWM_TAUA3_CH14_ISR_API STD_OFF
#define PWM_TAUA3_CH15_ISR_API STD_OFF
#define PWM_TAUA3_CH1_ISR_API STD_OFF
#define PWM_TAUA3_CH2_ISR_API STD_OFF
#define PWM_TAUA3_CH3_ISR_API STD_OFF
#define PWM_TAUA3_CH4_ISR_API STD_OFF
#define PWM_TAUA3_CH5_ISR_API STD_OFF
#define PWM_TAUA3_CH6_ISR_API STD_OFF
#define PWM_TAUA3_CH7_ISR_API STD_OFF
#define PWM_TAUA3_CH8_ISR_API STD_OFF
#define PWM_TAUA3_CH9_ISR_API STD_OFF
#define PWM_TAUA4_CH0_ISR_API STD_OFF
#define PWM_TAUA4_CH10_ISR_API STD_OFF
#define PWM_TAUA4_CH11_ISR_API STD_OFF
#define PWM_TAUA4_CH12_ISR_API STD_OFF
#define PWM_TAUA4_CH13_ISR_API STD_OFF
#define PWM_TAUA4_CH14_ISR_API STD_OFF
#define PWM_TAUA4_CH15_ISR_API STD_OFF
#define PWM_TAUA4_CH1_ISR_API STD_OFF
#define PWM_TAUA4_CH2_ISR_API STD_OFF
#define PWM_TAUA4_CH3_ISR_API STD_OFF
#define PWM_TAUA4_CH4_ISR_API STD_OFF
#define PWM_TAUA4_CH5_ISR_API STD_OFF
#define PWM_TAUA4_CH6_ISR_API STD_OFF
#define PWM_TAUA4_CH7_ISR_API STD_OFF
#define PWM_TAUA4_CH8_ISR_API STD_OFF
#define PWM_TAUA4_CH9_ISR_API STD_OFF
#define PWM_TAUA5_CH0_ISR_API STD_OFF
#define PWM_TAUA5_CH10_ISR_API STD_OFF
#define PWM_TAUA5_CH11_ISR_API STD_OFF
#define PWM_TAUA5_CH12_ISR_API STD_OFF
#define PWM_TAUA5_CH13_ISR_API STD_OFF
#define PWM_TAUA5_CH14_ISR_API STD_OFF
#define PWM_TAUA5_CH15_ISR_API STD_OFF
#define PWM_TAUA5_CH1_ISR_API STD_OFF
#define PWM_TAUA5_CH2_ISR_API STD_OFF
#define PWM_TAUA5_CH3_ISR_API STD_OFF
#define PWM_TAUA5_CH4_ISR_API STD_OFF
#define PWM_TAUA5_CH5_ISR_API STD_OFF
#define PWM_TAUA5_CH6_ISR_API STD_OFF
#define PWM_TAUA5_CH7_ISR_API STD_OFF
#define PWM_TAUA5_CH8_ISR_API STD_OFF
#define PWM_TAUA5_CH9_ISR_API STD_OFF
#define PWM_TAUA6_CH0_ISR_API STD_OFF
#define PWM_TAUA6_CH10_ISR_API STD_OFF
#define PWM_TAUA6_CH11_ISR_API STD_OFF
#define PWM_TAUA6_CH12_ISR_API STD_OFF
#define PWM_TAUA6_CH13_ISR_API STD_OFF
#define PWM_TAUA6_CH14_ISR_API STD_OFF
#define PWM_TAUA6_CH15_ISR_API STD_OFF
#define PWM_TAUA6_CH1_ISR_API STD_OFF
#define PWM_TAUA6_CH2_ISR_API STD_OFF
#define PWM_TAUA6_CH3_ISR_API STD_OFF
#define PWM_TAUA6_CH4_ISR_API STD_OFF
#define PWM_TAUA6_CH5_ISR_API STD_OFF
#define PWM_TAUA6_CH6_ISR_API STD_OFF
#define PWM_TAUA6_CH7_ISR_API STD_OFF
#define PWM_TAUA6_CH8_ISR_API STD_OFF
#define PWM_TAUA6_CH9_ISR_API STD_OFF
#define PWM_TAUA7_CH0_ISR_API STD_OFF
#define PWM_TAUA7_CH10_ISR_API STD_OFF
#define PWM_TAUA7_CH11_ISR_API STD_OFF
#define PWM_TAUA7_CH12_ISR_API STD_OFF
#define PWM_TAUA7_CH13_ISR_API STD_OFF
#define PWM_TAUA7_CH14_ISR_API STD_OFF
#define PWM_TAUA7_CH15_ISR_API STD_OFF
#define PWM_TAUA7_CH1_ISR_API STD_OFF
#define PWM_TAUA7_CH2_ISR_API STD_OFF
#define PWM_TAUA7_CH3_ISR_API STD_OFF
#define PWM_TAUA7_CH4_ISR_API STD_OFF
#define PWM_TAUA7_CH5_ISR_API STD_OFF
#define PWM_TAUA7_CH6_ISR_API STD_OFF
#define PWM_TAUA7_CH7_ISR_API STD_OFF
#define PWM_TAUA7_CH8_ISR_API STD_OFF
#define PWM_TAUA7_CH9_ISR_API STD_OFF
#define PWM_TAUA8_CH0_ISR_API STD_OFF
#define PWM_TAUA8_CH10_ISR_API STD_OFF
#define PWM_TAUA8_CH11_ISR_API STD_OFF
#define PWM_TAUA8_CH12_ISR_API STD_OFF
#define PWM_TAUA8_CH13_ISR_API STD_OFF
#define PWM_TAUA8_CH14_ISR_API STD_OFF
#define PWM_TAUA8_CH15_ISR_API STD_OFF
#define PWM_TAUA8_CH1_ISR_API STD_OFF
#define PWM_TAUA8_CH2_ISR_API STD_OFF
#define PWM_TAUA8_CH3_ISR_API STD_OFF
#define PWM_TAUA8_CH4_ISR_API STD_OFF
#define PWM_TAUA8_CH5_ISR_API STD_OFF
#define PWM_TAUA8_CH6_ISR_API STD_OFF
#define PWM_TAUA8_CH7_ISR_API STD_OFF
#define PWM_TAUA8_CH8_ISR_API STD_OFF
#define PWM_TAUA8_CH9_ISR_API STD_OFF
#define PWM_TAUB0_CH0_ISR_API STD_OFF
#define PWM_TAUB0_CH10_ISR_API STD_OFF
#define PWM_TAUB0_CH11_ISR_API STD_OFF
#define PWM_TAUB0_CH12_ISR_API STD_OFF
#define PWM_TAUB0_CH13_ISR_API STD_OFF
#define PWM_TAUB0_CH14_ISR_API STD_OFF
#define PWM_TAUB0_CH15_ISR_API STD_OFF
#define PWM_TAUB0_CH1_ISR_API STD_OFF
#define PWM_TAUB0_CH2_ISR_API STD_OFF
#define PWM_TAUB0_CH3_ISR_API STD_OFF
#define PWM_TAUB0_CH4_ISR_API STD_OFF
#define PWM_TAUB0_CH5_ISR_API STD_OFF
#define PWM_TAUB0_CH6_ISR_API STD_OFF
#define PWM_TAUB0_CH7_ISR_API STD_OFF
#define PWM_TAUB0_CH8_ISR_API STD_OFF
#define PWM_TAUB0_CH9_ISR_API STD_OFF
#define PWM_TAUB1_CH0_ISR_API STD_OFF
#define PWM_TAUB1_CH10_ISR_API STD_OFF
#define PWM_TAUB1_CH11_ISR_API STD_OFF
#define PWM_TAUB1_CH12_ISR_API STD_OFF
#define PWM_TAUB1_CH13_ISR_API STD_OFF
#define PWM_TAUB1_CH14_ISR_API STD_OFF
#define PWM_TAUB1_CH15_ISR_API STD_OFF
#define PWM_TAUB1_CH1_ISR_API STD_OFF
#define PWM_TAUB1_CH2_ISR_API STD_OFF
#define PWM_TAUB1_CH3_ISR_API STD_OFF
#define PWM_TAUB1_CH4_ISR_API STD_OFF
#define PWM_TAUB1_CH5_ISR_API STD_OFF
#define PWM_TAUB1_CH6_ISR_API STD_OFF
#define PWM_TAUB1_CH7_ISR_API STD_OFF
#define PWM_TAUB1_CH8_ISR_API STD_OFF
#define PWM_TAUB1_CH9_ISR_API STD_OFF
#define PWM_TAUB2_CH0_ISR_API STD_OFF
#define PWM_TAUB2_CH10_ISR_API STD_OFF
#define PWM_TAUB2_CH11_ISR_API STD_OFF
#define PWM_TAUB2_CH12_ISR_API STD_OFF
#define PWM_TAUB2_CH13_ISR_API STD_OFF
#define PWM_TAUB2_CH14_ISR_API STD_OFF
#define PWM_TAUB2_CH15_ISR_API STD_OFF
#define PWM_TAUB2_CH1_ISR_API STD_OFF
#define PWM_TAUB2_CH2_ISR_API STD_OFF
#define PWM_TAUB2_CH3_ISR_API STD_OFF
#define PWM_TAUB2_CH4_ISR_API STD_OFF
#define PWM_TAUB2_CH5_ISR_API STD_OFF
#define PWM_TAUB2_CH6_ISR_API STD_OFF
#define PWM_TAUB2_CH7_ISR_API STD_OFF
#define PWM_TAUB2_CH8_ISR_API STD_OFF
#define PWM_TAUB2_CH9_ISR_API STD_OFF
#define PWM_TAUC2_CH0_ISR_API STD_OFF
#define PWM_TAUC2_CH10_ISR_API STD_OFF
#define PWM_TAUC2_CH11_ISR_API STD_OFF
#define PWM_TAUC2_CH12_ISR_API STD_OFF
#define PWM_TAUC2_CH13_ISR_API STD_OFF
#define PWM_TAUC2_CH14_ISR_API STD_OFF
#define PWM_TAUC2_CH15_ISR_API STD_OFF
#define PWM_TAUC2_CH1_ISR_API STD_OFF
#define PWM_TAUC2_CH2_ISR_API STD_OFF
#define PWM_TAUC2_CH3_ISR_API STD_OFF
#define PWM_TAUC2_CH4_ISR_API STD_OFF
#define PWM_TAUC2_CH5_ISR_API STD_OFF
#define PWM_TAUC2_CH6_ISR_API STD_OFF
#define PWM_TAUC2_CH7_ISR_API STD_OFF
#define PWM_TAUC2_CH8_ISR_API STD_OFF
#define PWM_TAUC2_CH9_ISR_API STD_OFF
#define PWM_TAUC3_CH0_ISR_API STD_OFF
#define PWM_TAUC3_CH10_ISR_API STD_OFF
#define PWM_TAUC3_CH11_ISR_API STD_OFF
#define PWM_TAUC3_CH12_ISR_API STD_OFF
#define PWM_TAUC3_CH13_ISR_API STD_OFF
#define PWM_TAUC3_CH14_ISR_API STD_OFF
#define PWM_TAUC3_CH15_ISR_API STD_OFF
#define PWM_TAUC3_CH1_ISR_API STD_OFF
#define PWM_TAUC3_CH2_ISR_API STD_OFF
#define PWM_TAUC3_CH3_ISR_API STD_OFF
#define PWM_TAUC3_CH4_ISR_API STD_OFF
#define PWM_TAUC3_CH5_ISR_API STD_OFF
#define PWM_TAUC3_CH6_ISR_API STD_OFF
#define PWM_TAUC3_CH7_ISR_API STD_OFF
#define PWM_TAUC3_CH8_ISR_API STD_OFF
#define PWM_TAUC3_CH9_ISR_API STD_OFF
#define PWM_TAUC4_CH0_ISR_API STD_OFF
#define PWM_TAUC4_CH10_ISR_API STD_OFF
#define PWM_TAUC4_CH11_ISR_API STD_OFF
#define PWM_TAUC4_CH12_ISR_API STD_OFF
#define PWM_TAUC4_CH13_ISR_API STD_OFF
#define PWM_TAUC4_CH14_ISR_API STD_OFF
#define PWM_TAUC4_CH15_ISR_API STD_OFF
#define PWM_TAUC4_CH1_ISR_API STD_OFF
#define PWM_TAUC4_CH2_ISR_API STD_OFF
#define PWM_TAUC4_CH3_ISR_API STD_OFF
#define PWM_TAUC4_CH4_ISR_API STD_OFF
#define PWM_TAUC4_CH5_ISR_API STD_OFF
#define PWM_TAUC4_CH6_ISR_API STD_OFF
#define PWM_TAUC4_CH7_ISR_API STD_OFF
#define PWM_TAUC4_CH8_ISR_API STD_OFF
#define PWM_TAUC4_CH9_ISR_API STD_OFF
#define PWM_TAUC5_CH0_ISR_API STD_OFF
#define PWM_TAUC5_CH10_ISR_API STD_OFF
#define PWM_TAUC5_CH11_ISR_API STD_OFF
#define PWM_TAUC5_CH12_ISR_API STD_OFF
#define PWM_TAUC5_CH13_ISR_API STD_OFF
#define PWM_TAUC5_CH14_ISR_API STD_OFF
#define PWM_TAUC5_CH15_ISR_API STD_OFF
#define PWM_TAUC5_CH1_ISR_API STD_OFF
#define PWM_TAUC5_CH2_ISR_API STD_OFF
#define PWM_TAUC5_CH3_ISR_API STD_OFF
#define PWM_TAUC5_CH4_ISR_API STD_OFF
#define PWM_TAUC5_CH5_ISR_API STD_OFF
#define PWM_TAUC5_CH6_ISR_API STD_OFF
#define PWM_TAUC5_CH7_ISR_API STD_OFF
#define PWM_TAUC5_CH8_ISR_API STD_OFF
#define PWM_TAUC5_CH9_ISR_API STD_OFF
#define PWM_TAUC6_CH0_ISR_API STD_OFF
#define PWM_TAUC6_CH10_ISR_API STD_OFF
#define PWM_TAUC6_CH11_ISR_API STD_OFF
#define PWM_TAUC6_CH12_ISR_API STD_OFF
#define PWM_TAUC6_CH13_ISR_API STD_OFF
#define PWM_TAUC6_CH14_ISR_API STD_OFF
#define PWM_TAUC6_CH15_ISR_API STD_OFF
#define PWM_TAUC6_CH1_ISR_API STD_OFF
#define PWM_TAUC6_CH2_ISR_API STD_OFF
#define PWM_TAUC6_CH3_ISR_API STD_OFF
#define PWM_TAUC6_CH4_ISR_API STD_OFF
#define PWM_TAUC6_CH5_ISR_API STD_OFF
#define PWM_TAUC6_CH6_ISR_API STD_OFF
#define PWM_TAUC6_CH7_ISR_API STD_OFF
#define PWM_TAUC6_CH8_ISR_API STD_OFF
#define PWM_TAUC6_CH9_ISR_API STD_OFF
#define PWM_TAUC7_CH0_ISR_API STD_OFF
#define PWM_TAUC7_CH10_ISR_API STD_OFF
#define PWM_TAUC7_CH11_ISR_API STD_OFF
#define PWM_TAUC7_CH12_ISR_API STD_OFF
#define PWM_TAUC7_CH13_ISR_API STD_OFF
#define PWM_TAUC7_CH14_ISR_API STD_OFF
#define PWM_TAUC7_CH15_ISR_API STD_OFF
#define PWM_TAUC7_CH1_ISR_API STD_OFF
#define PWM_TAUC7_CH2_ISR_API STD_OFF
#define PWM_TAUC7_CH3_ISR_API STD_OFF
#define PWM_TAUC7_CH4_ISR_API STD_OFF
#define PWM_TAUC7_CH5_ISR_API STD_OFF
#define PWM_TAUC7_CH6_ISR_API STD_OFF
#define PWM_TAUC7_CH7_ISR_API STD_OFF
#define PWM_TAUC7_CH8_ISR_API STD_OFF
#define PWM_TAUC7_CH9_ISR_API STD_OFF
#define PWM_TAUC8_CH0_ISR_API STD_OFF
#define PWM_TAUC8_CH10_ISR_API STD_OFF
#define PWM_TAUC8_CH11_ISR_API STD_OFF
#define PWM_TAUC8_CH12_ISR_API STD_OFF
#define PWM_TAUC8_CH13_ISR_API STD_OFF
#define PWM_TAUC8_CH14_ISR_API STD_OFF
#define PWM_TAUC8_CH15_ISR_API STD_OFF
#define PWM_TAUC8_CH1_ISR_API STD_OFF
#define PWM_TAUC8_CH2_ISR_API STD_OFF
#define PWM_TAUC8_CH3_ISR_API STD_OFF
#define PWM_TAUC8_CH4_ISR_API STD_OFF
#define PWM_TAUC8_CH5_ISR_API STD_OFF
#define PWM_TAUC8_CH6_ISR_API STD_OFF
#define PWM_TAUC8_CH7_ISR_API STD_OFF
#define PWM_TAUC8_CH8_ISR_API STD_OFF
#define PWM_TAUC8_CH9_ISR_API STD_OFF
#define PWM_TAUJ0_CH0_ISR_API STD_OFF
#define PWM_TAUJ0_CH1_ISR_API STD_OFF
#define PWM_TAUJ0_CH2_ISR_API STD_OFF
#define PWM_TAUJ0_CH3_ISR_API STD_OFF
#define PWM_TAUJ1_CH0_ISR_API STD_OFF
#define PWM_TAUJ1_CH1_ISR_API STD_OFF
#define PWM_TAUJ1_CH2_ISR_API STD_OFF
#define PWM_TAUJ1_CH3_ISR_API STD_OFF
#define PWM_TAUJ2_CH0_ISR_API STD_OFF
#define PWM_TAUJ2_CH1_ISR_API STD_OFF
#define PWM_TAUJ2_CH2_ISR_API STD_OFF
#define PWM_TAUJ2_CH3_ISR_API STD_OFF
/*******************************************************************************
** Channel Handles **
*******************************************************************************/
/* PWM Channel Handles */
#define PwmChannel0 (uint8)0
#define PwmChannel1 (uint8)2
#define PwmChannel2 (uint8)4
#define PwmChannel3 (uint8)6
#define PwmChannel20 (uint8)16
#define PwmChannel21 (uint8)17
#define PwmChannel22 (uint8)18
#define PwmChannel23 (uint8)19
#define PwmChannel24 (uint8)20
#define PwmChannel25 (uint8)21
#define PwmChannel26 (uint8)22
#define PwmChannel27 (uint8)23
#define PwmChannel28 (uint8)24
#define PwmChannel29 (uint8)26
#define PwmChannel30 (uint8)28
#define PwmChannel31 (uint8)29
#define PwmChannel32 (uint8)30
#define PwmChannel33 (uint8)31
#define PwmChannel8 (uint8)32
#define PwmChannel9 (uint8)33
#define PwmChannel10 (uint8)34
#define PwmChannel11 (uint8)35
#define PwmChannel12 (uint8)36
#define PwmChannel13 (uint8)37
#define PwmChannel14 (uint8)38
#define PwmChannel15 (uint8)39
#define PwmChannel16 (uint8)40
#define PwmChannel17 (uint8)41
#define PwmChannel18 (uint8)42
#define PwmChannel19 (uint8)43
#define PwmChannel4 (uint8)48
#define PwmChannel5 (uint8)49
#define PwmChannel6 (uint8)50
#define PwmChannel7 (uint8)51
/* Configuration Set Handles */
#define PwmChannelConfigSet0 &Pwm_GstConfiguration[0]
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* PWM_CFG_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/IoHwAb/IoHwAb_Can.c
/*******************************************************************************
| Include Session
|******************************************************************************/
#include "IoHwAb_Can.h"
/*******************************************************************************
| Static Local Variables Declaration
|******************************************************************************/
/*******************************************************************************
| Extern variables and functions declaration
|******************************************************************************/
/******************************************************************************
* Can Global Symbols **
******************************************************************************/
uint8 GaaByteArrayCan[8] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};
uint8 GaaByteArrayCanRdData[8] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
| Global Function Prototypes
|******************************************************************************/
void Can_MainFunction_20mS(void){
uint8 LucHthId;
Can_PduType LddCanPduType;
uint32 loopcnt;
Can_MainFunction_Read();
Can_MainFunction_Write();
Can_MainFunction_BusOff();
Can_MainFunction_Wakeup();
/* Debug Useing */
/* Transmit an L-PDU for Controller 1 */
LucHthId = 2;
LddCanPduType.length = 0x08;
LddCanPduType.swPduHandle = 0x55;
LddCanPduType.id = 0x120;
LddCanPduType.sdu = &GaaByteArrayCan[0];
Can_Write(LucHthId, &LddCanPduType);
/* for wait trasmit over@abs time */
for(loopcnt=0;loopcnt<100000;loopcnt++){};
Can_MainFunction_Read();
CanIf_ReadRxData(0x01,0x08,&GaaByteArrayCanRdData);
}
<file_sep>/BSP/MCAL/Pwm/Pwm_Irq.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Pwm_Irq.c */
/* Version = 3.1.4 */
/* Date = 06-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* ISR functions for all Timers of the PWM Driver Component */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 18-Aug-2009 : Initial version
* V3.0.1: 28-Oct-2009 : As per the SCR 054 Pwm_HW_Callback function is called
* in ISR for optimization.
* V3.0.2: 02-Jul-2010 : As per SCR 290, following changes are made:
* 1. ISR for for TAUB1 and TAUC2-TAUC8 are added.
* 2. File is updated to support ISR Category support,
* configurable by a pre-compile option.
* V3.0.3: 25-Jul-2010 : As per SCR 305, ISR Category options are updated
* from MODE to TYPE.
* V3.0.4: 03-Jan-2011 : As per SCR 387, TAUB1_CH0's Interrupt routines
* are corrected.
*
* V3.1.0: 26-Jul-2011 : Ported for the DK4 variant.
* V3.1.1: 04-Oct-2011 : Added comments for the violation of MISRA rule 19.1.
* V3.1.3: 05-Mar-2012 : Merged the fixes done for Fx4L PWM driver
* V3.1.4: 06-Jun-2012 : As per SCR 034, Compiler version is removed from
* Environment section.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Pwm.h"
#include "Pwm_Irq.h"
#include "Pwm_Ram.h"
#include "Pwm_LLDriver.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification version information */
#define PWM_IRQ_C_AR_MAJOR_VERSION PWM_AR_MAJOR_VERSION_VALUE
#define PWM_IRQ_C_AR_MINOR_VERSION PWM_AR_MINOR_VERSION_VALUE
#define PWM_IRQ_C_AR_PATCH_VERSION PWM_AR_PATCH_VERSION_VALUE
/* File version information */
#define PWM_IRQ_C_SW_MAJOR_VERSION 3
#define PWM_IRQ_C_SW_MINOR_VERSION 1
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (PWM_IRQ_AR_MAJOR_VERSION != PWM_IRQ_C_AR_MAJOR_VERSION)
#error "Pwm_Irq.c : Mismatch in Specification Major Version"
#endif
#if (PWM_IRQ_AR_MINOR_VERSION != PWM_IRQ_C_AR_MINOR_VERSION)
#error "Pwm_Irq.c : Mismatch in Specification Minor Version"
#endif
#if (PWM_IRQ_AR_PATCH_VERSION != PWM_IRQ_C_AR_PATCH_VERSION)
#error "Pwm_Irq.c : Mismatch in Specification Patch Version"
#endif
#if (PWM_SW_MAJOR_VERSION != PWM_IRQ_C_SW_MAJOR_VERSION)
#error "Pwm_Irq.c : Mismatch in Major Version"
#endif
#if (PWM_SW_MINOR_VERSION != PWM_IRQ_C_SW_MINOR_VERSION)
#error "Pwm_Irq.c : Mismatch in Minor Version"
#endif
/******************************************************************************
** Global Data **
******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*
* The below ISRs will be checked only if PWM_NOTIFICATION_SUPPORTED is
* STD_ON
*/
#if (PWM_NOTIFICATION_SUPPORTED == STD_ON)
/*******************************************************************************
** Function Name : TAUAn_CHm_ISR
**
** Service ID : NA
**
** Description : These are Interrupt routines for the timer TAUAn and
** m, where n represents the TAUA Units and m
** represents channels associated for each Unit.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Pwm_GpChannelTimerMap, Pwm_GpChannelConfig,
** Pwm_GstChannelNotifFunc, Pwm_GpNotifStatus
**
** Function(s) invoked:
** None
*******************************************************************************/
#if (PWM_TAUA_UNIT_USED == STD_ON)/*PWM_TAUA_UNIT_USED == STD_ON*/
#if (PWM_TAUA0_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
/* MISRA Rule : 19.1 */
/* Message : #include statements in a file */
/* should only be preceded by other*/
/* preprocessor directives or */
/* comments. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA0_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA0_CH0_ISR_API == STD_ON) */
#if (PWM_TAUA0_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA0_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA0_CH1_ISR_API == STD_ON) */
#if (PWM_TAUA0_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA0_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA0_CH2_ISR_API == STD_ON) */
#if (PWM_TAUA0_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA0_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA0_CH3_ISR_API == STD_ON) */
#if (PWM_TAUA0_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA0_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA0_CH4_ISR_API == STD_ON) */
#if (PWM_TAUA0_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA0_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA0_CH5_ISR_API == STD_ON) */
#if (PWM_TAUA0_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA0_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA0_CH6_ISR_API == STD_ON) */
#if (PWM_TAUA0_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA0_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA0_CH7_ISR_API == STD_ON) */
#if (PWM_TAUA0_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA0_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA0_CH8_ISR_API == STD_ON) */
#if (PWM_TAUA0_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA0_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA0_CH9_ISR_API == STD_ON) */
#if (PWM_TAUA0_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA0_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA0_CH10_ISR_API == STD_ON) */
#if (PWM_TAUA0_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA0_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA0_CH11_ISR_API == STD_ON) */
#if (PWM_TAUA0_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA0_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA0_CH12_ISR_API == STD_ON) */
#if (PWM_TAUA0_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA0_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA0_CH13_ISR_API == STD_ON) */
#if (PWM_TAUA0_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA0_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA0_CH14_ISR_API == STD_ON) */
#if (PWM_TAUA0_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA0_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA0_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA0_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA0_CH15_ISR_API == STD_ON) */
#if (PWM_TAUA1_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA1_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA1_CH0_ISR_API == STD_ON) */
#if (PWM_TAUA1_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA1_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA1_CH1_ISR_API == STD_ON) */
#if (PWM_TAUA1_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA1_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA1_CH2_ISR_API == STD_ON) */
#if (PWM_TAUA1_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA1_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA1_CH3_ISR_API == STD_ON) */
#if (PWM_TAUA1_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA1_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA1_CH4_ISR_API == STD_ON) */
#if (PWM_TAUA1_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA1_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA1_CH5_ISR_API == STD_ON) */
#if (PWM_TAUA1_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA1_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA1_CH6_ISR_API == STD_ON) */
#if (PWM_TAUA1_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA1_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA1_CH7_ISR_API == STD_ON) */
#if (PWM_TAUA1_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA1_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA1_CH8_ISR_API == STD_ON) */
#if (PWM_TAUA1_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA1_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA1_CH9_ISR_API == STD_ON) */
#if (PWM_TAUA1_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA1_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA1_CH10_ISR_API == STD_ON) */
#if (PWM_TAUA1_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA1_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA1_CH11_ISR_API == STD_ON) */
#if (PWM_TAUA1_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA1_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA1_CH12_ISR_API == STD_ON) */
#if (PWM_TAUA1_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA1_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA1_CH13_ISR_API == STD_ON) */
#if (PWM_TAUA1_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA1_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA1_CH14_ISR_API == STD_ON) */
#if (PWM_TAUA1_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA1_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA1_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA1_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA1_CH15_ISR_API == STD_ON) */
#if (PWM_TAUA2_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA2_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA2_CH0_ISR_API == STD_ON) */
#if (PWM_TAUA2_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA2_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA2_CH1_ISR_API == STD_ON) */
#if (PWM_TAUA2_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA2_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA2_CH2_ISR_API == STD_ON) */
#if (PWM_TAUA2_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA2_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA2_CH3_ISR_API == STD_ON) */
#if (PWM_TAUA2_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA2_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA2_CH4_ISR_API == STD_ON) */
#if (PWM_TAUA2_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA2_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA2_CH5_ISR_API == STD_ON) */
#if (PWM_TAUA2_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA2_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA2_CH6_ISR_API == STD_ON) */
#if (PWM_TAUA2_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA2_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA2_CH7_ISR_API == STD_ON) */
#if (PWM_TAUA2_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA2_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA2_CH8_ISR_API == STD_ON) */
#if (PWM_TAUA2_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA2_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA2_CH9_ISR_API == STD_ON) */
#if (PWM_TAUA2_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA2_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA2_CH10_ISR_API == STD_ON) */
#if (PWM_TAUA2_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA2_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA2_CH11_ISR_API == STD_ON) */
#if (PWM_TAUA2_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA2_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA2_CH12_ISR_API == STD_ON) */
#if (PWM_TAUA2_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA2_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA2_CH13_ISR_API == STD_ON) */
#if (PWM_TAUA2_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA2_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA2_CH14_ISR_API == STD_ON) */
#if (PWM_TAUA2_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA2_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA2_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA2_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA2_CH15_ISR_API == STD_ON) */
#if (PWM_TAUA3_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA3_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA3_CH0_ISR_API == STD_ON) */
#if (PWM_TAUA3_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA3_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA3_CH1_ISR_API == STD_ON) */
#if (PWM_TAUA3_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA3_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA3_CH2_ISR_API == STD_ON) */
#if (PWM_TAUA3_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA3_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA3_CH3_ISR_API == STD_ON) */
#if (PWM_TAUA3_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA3_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA3_CH4_ISR_API == STD_ON) */
#if (PWM_TAUA3_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA3_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA3_CH5_ISR_API == STD_ON) */
#if (PWM_TAUA3_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA3_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA3_CH6_ISR_API == STD_ON) */
#if (PWM_TAUA3_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA3_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA3_CH7_ISR_API == STD_ON) */
#if (PWM_TAUA3_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA3_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA3_CH8_ISR_API == STD_ON) */
#if (PWM_TAUA3_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA3_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA3_CH9_ISR_API == STD_ON) */
#if (PWM_TAUA3_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA3_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA3_CH10_ISR_API == STD_ON) */
#if (PWM_TAUA3_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA3_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA3_CH11_ISR_API == STD_ON) */
#if (PWM_TAUA3_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA3_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA3_CH12_ISR_API == STD_ON) */
#if (PWM_TAUA3_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA3_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA3_CH13_ISR_API == STD_ON) */
#if (PWM_TAUA3_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA3_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA3_CH14_ISR_API == STD_ON) */
#if (PWM_TAUA3_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA3_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA3_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA3_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA3_CH15_ISR_API == STD_ON) */
#if (PWM_TAUA4_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA4_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA4_CH0_ISR_API == STD_ON) */
#if (PWM_TAUA4_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA4_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA4_CH1_ISR_API == STD_ON) */
#if (PWM_TAUA4_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA4_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA4_CH2_ISR_API == STD_ON) */
#if (PWM_TAUA4_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA4_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA4_CH3_ISR_API == STD_ON) */
#if (PWM_TAUA4_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA4_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA4_CH4_ISR_API == STD_ON) */
#if (PWM_TAUA4_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA4_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA4_CH5_ISR_API == STD_ON) */
#if (PWM_TAUA4_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA4_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA4_CH6_ISR_API == STD_ON) */
#if (PWM_TAUA4_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA4_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA4_CH7_ISR_API == STD_ON) */
#if (PWM_TAUA4_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA4_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA4_CH8_ISR_API == STD_ON) */
#if (PWM_TAUA4_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA4_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA4_CH9_ISR_API == STD_ON) */
#if (PWM_TAUA4_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA4_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA4_CH10_ISR_API == STD_ON) */
#if (PWM_TAUA4_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA4_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA4_CH11_ISR_API == STD_ON) */
#if (PWM_TAUA4_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA4_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA4_CH12_ISR_API == STD_ON) */
#if (PWM_TAUA4_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA4_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA4_CH13_ISR_API == STD_ON) */
#if (PWM_TAUA4_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA4_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA4_CH14_ISR_API == STD_ON) */
#if (PWM_TAUA4_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA4_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA4_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA4_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA4_CH15_ISR_API == STD_ON) */
#if (PWM_TAUA5_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA5_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA5_CH0_ISR_API == STD_ON) */
#if (PWM_TAUA5_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA5_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA5_CH1_ISR_API == STD_ON) */
#if (PWM_TAUA5_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA5_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA5_CH2_ISR_API == STD_ON) */
#if (PWM_TAUA5_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA5_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA5_CH3_ISR_API == STD_ON) */
#if (PWM_TAUA5_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA5_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA5_CH4_ISR_API == STD_ON) */
#if (PWM_TAUA5_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA5_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA5_CH5_ISR_API == STD_ON) */
#if (PWM_TAUA5_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA5_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA5_CH6_ISR_API == STD_ON) */
#if (PWM_TAUA5_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA5_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA5_CH7_ISR_API == STD_ON) */
#if (PWM_TAUA5_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA5_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA5_CH8_ISR_API == STD_ON) */
#if (PWM_TAUA5_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA5_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA5_CH9_ISR_API == STD_ON) */
#if (PWM_TAUA5_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA5_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA5_CH10_ISR_API == STD_ON) */
#if (PWM_TAUA5_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA5_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA5_CH11_ISR_API == STD_ON) */
#if (PWM_TAUA5_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA5_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA5_CH12_ISR_API == STD_ON) */
#if (PWM_TAUA5_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA5_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA5_CH13_ISR_API == STD_ON) */
#if (PWM_TAUA5_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA5_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA5_CH14_ISR_API == STD_ON) */
#if (PWM_TAUA5_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA5_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA5_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA5_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA5_CH15_ISR_API == STD_ON) */
#if (PWM_TAUA6_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA6_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA6_CH0_ISR_API == STD_ON) */
#if (PWM_TAUA6_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA6_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA6_CH1_ISR_API == STD_ON) */
#if (PWM_TAUA6_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA6_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA6_CH2_ISR_API == STD_ON) */
#if (PWM_TAUA6_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA6_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA6_CH3_ISR_API == STD_ON) */
#if (PWM_TAUA6_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA6_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA6_CH4_ISR_API == STD_ON) */
#if (PWM_TAUA6_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA6_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA6_CH5_ISR_API == STD_ON) */
#if (PWM_TAUA6_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA6_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA6_CH6_ISR_API == STD_ON) */
#if (PWM_TAUA6_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA6_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA6_CH7_ISR_API == STD_ON) */
#if (PWM_TAUA6_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA6_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA6_CH8_ISR_API == STD_ON) */
#if (PWM_TAUA6_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA6_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA6_CH9_ISR_API == STD_ON) */
#if (PWM_TAUA6_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA6_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA6_CH10_ISR_API == STD_ON) */
#if (PWM_TAUA6_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA6_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA6_CH11_ISR_API == STD_ON) */
#if (PWM_TAUA6_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA6_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA6_CH12_ISR_API == STD_ON) */
#if (PWM_TAUA6_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA6_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA6_CH13_ISR_API == STD_ON) */
#if (PWM_TAUA6_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA6_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA6_CH14_ISR_API == STD_ON) */
#if (PWM_TAUA6_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA6_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA6_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA6_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA6_CH15_ISR_API == STD_ON) */
#if (PWM_TAUA7_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA7_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA7_CH0_ISR_API == STD_ON) */
#if (PWM_TAUA7_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA7_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA7_CH1_ISR_API == STD_ON) */
#if (PWM_TAUA7_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA7_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA7_CH2_ISR_API == STD_ON) */
#if (PWM_TAUA7_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA7_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA7_CH3_ISR_API == STD_ON) */
#if (PWM_TAUA7_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA7_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA7_CH4_ISR_API == STD_ON) */
#if (PWM_TAUA7_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA7_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA7_CH5_ISR_API == STD_ON) */
#if (PWM_TAUA7_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA7_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA7_CH6_ISR_API == STD_ON) */
#if (PWM_TAUA7_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA7_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA7_CH7_ISR_API == STD_ON) */
#if (PWM_TAUA7_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA7_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA7_CH8_ISR_API == STD_ON) */
#if (PWM_TAUA7_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA7_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA7_CH9_ISR_API == STD_ON) */
#if (PWM_TAUA7_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA7_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA7_CH10_ISR_API == STD_ON) */
#if (PWM_TAUA7_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA7_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA7_CH11_ISR_API == STD_ON) */
#if (PWM_TAUA7_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA7_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA7_CH12_ISR_API == STD_ON) */
#if (PWM_TAUA7_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA7_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA7_CH13_ISR_API == STD_ON) */
#if (PWM_TAUA7_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA7_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA7_CH14_ISR_API == STD_ON) */
#if (PWM_TAUA7_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA7_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA7_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA7_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA7_CH15_ISR_API == STD_ON) */
#if (PWM_TAUA8_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA8_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA8_CH0_ISR_API == STD_ON) */
#if (PWM_TAUA8_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA8_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA8_CH1_ISR_API == STD_ON) */
#if (PWM_TAUA8_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA8_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA8_CH2_ISR_API == STD_ON) */
#if (PWM_TAUA8_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA8_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA8_CH3_ISR_API == STD_ON) */
#if (PWM_TAUA8_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA8_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA8_CH4_ISR_API == STD_ON) */
#if (PWM_TAUA8_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA8_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA8_CH5_ISR_API == STD_ON) */
#if (PWM_TAUA8_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA8_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA8_CH6_ISR_API == STD_ON) */
#if (PWM_TAUA8_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA8_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA8_CH7_ISR_API == STD_ON) */
#if (PWM_TAUA8_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA8_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA8_CH8_ISR_API == STD_ON) */
#if (PWM_TAUA8_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA8_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA8_CH9_ISR_API == STD_ON) */
#if (PWM_TAUA8_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA8_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA8_CH10_ISR_API == STD_ON) */
#if (PWM_TAUA8_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA8_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA8_CH11_ISR_API == STD_ON) */
#if (PWM_TAUA8_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA8_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA8_CH12_ISR_API == STD_ON) */
#if (PWM_TAUA8_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA8_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA8_CH13_ISR_API == STD_ON) */
#if (PWM_TAUA8_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA8_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA8_CH14_ISR_API == STD_ON) */
#if (PWM_TAUA8_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUA8_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUA8_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUA8_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUA8_CH15_ISR_API == STD_ON) */
#endif /*PWM_TAUA_UNIT_USED == STD_ON*/
#if (PWM_TAUB_UNIT_USED == STD_ON)/*PWM_TAUB_UNIT_USED == STD_ON*/
#if (PWM_TAUB0_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB0_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB0_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB0_CH0_ISR_API == STD_ON) */
#if (PWM_TAUB0_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB0_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB0_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB0_CH1_ISR_API == STD_ON) */
#if (PWM_TAUB0_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB0_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB0_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB0_CH2_ISR_API == STD_ON) */
#if (PWM_TAUB0_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB0_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB0_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB0_CH3_ISR_API == STD_ON) */
#if (PWM_TAUB0_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB0_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB0_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB0_CH4_ISR_API == STD_ON) */
#if (PWM_TAUB0_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB0_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB0_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB0_CH5_ISR_API == STD_ON) */
#if (PWM_TAUB0_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB0_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB0_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB0_CH6_ISR_API == STD_ON) */
#if (PWM_TAUB0_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB0_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB0_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB0_CH7_ISR_API == STD_ON) */
#if (PWM_TAUB0_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB0_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB0_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB0_CH8_ISR_API == STD_ON) */
#if (PWM_TAUB0_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB0_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB0_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB0_CH9_ISR_API == STD_ON) */
#if (PWM_TAUB0_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB0_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB0_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB0_CH10_ISR_API == STD_ON) */
#if (PWM_TAUB0_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB0_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB0_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB0_CH11_ISR_API == STD_ON) */
#if (PWM_TAUB0_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB0_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB0_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB0_CH12_ISR_API == STD_ON) */
#if (PWM_TAUB0_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB0_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB0_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB0_CH13_ISR_API == STD_ON) */
#if (PWM_TAUB0_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB0_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB0_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB0_CH14_ISR_API == STD_ON) */
#if (PWM_TAUB0_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB0_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB0_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB0_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB0_CH15_ISR_API == STD_ON) */
#if (PWM_TAUB1_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB1_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB1_CH0_ISR_API == STD_ON) */
#if (PWM_TAUB1_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB1_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB1_CH1_ISR_API == STD_ON) */
#if (PWM_TAUB1_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB1_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB1_CH2_ISR_API == STD_ON) */
#if (PWM_TAUB1_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB1_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB1_CH3_ISR_API == STD_ON) */
#if (PWM_TAUB1_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB1_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB1_CH4_ISR_API == STD_ON) */
#if (PWM_TAUB1_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB1_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB1_CH5_ISR_API == STD_ON) */
#if (PWM_TAUB1_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB1_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB1_CH6_ISR_API == STD_ON) */
#if (PWM_TAUB1_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB1_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB1_CH7_ISR_API == STD_ON) */
#if (PWM_TAUB1_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB1_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB1_CH8_ISR_API == STD_ON) */
#if (PWM_TAUB1_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB1_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB1_CH9_ISR_API == STD_ON) */
#if (PWM_TAUB1_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB1_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB1_CH10_ISR_API == STD_ON) */
#if (PWM_TAUB1_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB1_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB1_CH11_ISR_API == STD_ON) */
#if (PWM_TAUB1_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB1_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB1_CH12_ISR_API == STD_ON) */
#if (PWM_TAUB1_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB1_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB1_CH13_ISR_API == STD_ON) */
#if (PWM_TAUB1_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB1_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB1_CH14_ISR_API == STD_ON) */
#if (PWM_TAUB1_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB1_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB1_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB1_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB1_CH15_ISR_API == STD_ON) */
#if (PWM_TAUB2_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB2_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB2_CH0_ISR_API == STD_ON) */
#if (PWM_TAUB2_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB2_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB2_CH1_ISR_API == STD_ON) */
#if (PWM_TAUB2_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB2_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB2_CH2_ISR_API == STD_ON) */
#if (PWM_TAUB2_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB2_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB2_CH3_ISR_API == STD_ON) */
#if (PWM_TAUB2_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB2_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB2_CH4_ISR_API == STD_ON) */
#if (PWM_TAUB2_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB2_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB2_CH5_ISR_API == STD_ON) */
#if (PWM_TAUB2_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB2_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB2_CH6_ISR_API == STD_ON) */
#if (PWM_TAUB2_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB2_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB2_CH7_ISR_API == STD_ON) */
#if (PWM_TAUB2_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB2_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB2_CH8_ISR_API == STD_ON) */
#if (PWM_TAUB2_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB2_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB2_CH9_ISR_API == STD_ON) */
#if (PWM_TAUB2_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB2_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB2_CH10_ISR_API == STD_ON) */
#if (PWM_TAUB2_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB2_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB2_CH11_ISR_API == STD_ON) */
#if (PWM_TAUB2_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB2_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB2_CH12_ISR_API == STD_ON) */
#if (PWM_TAUB2_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB2_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB2_CH13_ISR_API == STD_ON) */
#if (PWM_TAUB2_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB2_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB2_CH14_ISR_API == STD_ON) */
#if (PWM_TAUB2_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUB2_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUB2_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUB2_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUB2_CH15_ISR_API == STD_ON) */
#endif /*PWM_TAUB_UNIT_USED == STD_ON*/
#if (PWM_TAUC_UNIT_USED == STD_ON)/*PWM_TAUC_UNIT_USED == STD_ON*/
#if (PWM_TAUC2_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC2_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC2_CH0_ISR_API == STD_ON) */
#if (PWM_TAUC2_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC2_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC2_CH1_ISR_API == STD_ON) */
#if (PWM_TAUC2_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC2_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC2_CH2_ISR_API == STD_ON) */
#if (PWM_TAUC2_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC2_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC2_CH3_ISR_API == STD_ON) */
#if (PWM_TAUC2_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC2_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC2_CH4_ISR_API == STD_ON) */
#if (PWM_TAUC2_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC2_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC2_CH5_ISR_API == STD_ON) */
#if (PWM_TAUC2_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC2_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC2_CH6_ISR_API == STD_ON) */
#if (PWM_TAUC2_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC2_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC2_CH7_ISR_API == STD_ON) */
#if (PWM_TAUC2_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC2_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC2_CH8_ISR_API == STD_ON) */
#if (PWM_TAUC2_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC2_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC2_CH9_ISR_API == STD_ON) */
#if (PWM_TAUC2_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC2_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC2_CH10_ISR_API == STD_ON) */
#if (PWM_TAUC2_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC2_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC2_CH11_ISR_API == STD_ON) */
#if (PWM_TAUC2_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC2_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC2_CH12_ISR_API == STD_ON) */
#if (PWM_TAUC2_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC2_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC2_CH13_ISR_API == STD_ON) */
#if (PWM_TAUC2_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC2_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC2_CH14_ISR_API == STD_ON) */
#if (PWM_TAUC2_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC2_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC2_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC2_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC2_CH15_ISR_API == STD_ON) */
#if (PWM_TAUC3_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC3_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC3_CH0_ISR_API == STD_ON) */
#if (PWM_TAUC3_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC3_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC3_CH1_ISR_API == STD_ON) */
#if (PWM_TAUC3_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC3_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC3_CH2_ISR_API == STD_ON) */
#if (PWM_TAUC3_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC3_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC3_CH3_ISR_API == STD_ON) */
#if (PWM_TAUC3_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC3_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC3_CH4_ISR_API == STD_ON) */
#if (PWM_TAUC3_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC3_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC3_CH5_ISR_API == STD_ON) */
#if (PWM_TAUC3_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC3_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC3_CH6_ISR_API == STD_ON) */
#if (PWM_TAUC3_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC3_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC3_CH7_ISR_API == STD_ON) */
#if (PWM_TAUC3_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC3_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC3_CH8_ISR_API == STD_ON) */
#if (PWM_TAUC3_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC3_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC3_CH9_ISR_API == STD_ON) */
#if (PWM_TAUC3_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC3_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC3_CH10_ISR_API == STD_ON) */
#if (PWM_TAUC3_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC3_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC3_CH11_ISR_API == STD_ON) */
#if (PWM_TAUC3_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC3_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC3_CH12_ISR_API == STD_ON) */
#if (PWM_TAUC3_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC3_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC3_CH13_ISR_API == STD_ON) */
#if (PWM_TAUC3_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC3_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC3_CH14_ISR_API == STD_ON) */
#if (PWM_TAUC3_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC3_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC3_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC3_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC3_CH15_ISR_API == STD_ON) */
#if (PWM_TAUC4_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC4_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC4_CH0_ISR_API == STD_ON) */
#if (PWM_TAUC4_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC4_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC4_CH1_ISR_API == STD_ON) */
#if (PWM_TAUC4_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC4_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC4_CH2_ISR_API == STD_ON) */
#if (PWM_TAUC4_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC4_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC4_CH3_ISR_API == STD_ON) */
#if (PWM_TAUC4_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC4_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC4_CH4_ISR_API == STD_ON) */
#if (PWM_TAUC4_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC4_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC4_CH5_ISR_API == STD_ON) */
#if (PWM_TAUC4_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC4_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC4_CH6_ISR_API == STD_ON) */
#if (PWM_TAUC4_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC4_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC4_CH7_ISR_API == STD_ON) */
#if (PWM_TAUC4_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC4_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC4_CH8_ISR_API == STD_ON) */
#if (PWM_TAUC4_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC4_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC4_CH9_ISR_API == STD_ON) */
#if (PWM_TAUC4_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC4_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC4_CH10_ISR_API == STD_ON) */
#if (PWM_TAUC4_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC4_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC4_CH11_ISR_API == STD_ON) */
#if (PWM_TAUC4_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC4_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC4_CH12_ISR_API == STD_ON) */
#if (PWM_TAUC4_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC4_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC4_CH13_ISR_API == STD_ON) */
#if (PWM_TAUC4_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC4_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC4_CH14_ISR_API == STD_ON) */
#if (PWM_TAUC4_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC4_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC4_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC4_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC4_CH15_ISR_API == STD_ON) */
#if (PWM_TAUC5_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC5_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC5_CH0_ISR_API == STD_ON) */
#if (PWM_TAUC5_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC5_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC5_CH1_ISR_API == STD_ON) */
#if (PWM_TAUC5_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC5_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC5_CH2_ISR_API == STD_ON) */
#if (PWM_TAUC5_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC5_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC5_CH3_ISR_API == STD_ON) */
#if (PWM_TAUC5_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC5_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC5_CH4_ISR_API == STD_ON) */
#if (PWM_TAUC5_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC5_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC5_CH5_ISR_API == STD_ON) */
#if (PWM_TAUC5_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC5_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC5_CH6_ISR_API == STD_ON) */
#if (PWM_TAUC5_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC5_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC5_CH7_ISR_API == STD_ON) */
#if (PWM_TAUC5_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC5_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC5_CH8_ISR_API == STD_ON) */
#if (PWM_TAUC5_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC5_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC5_CH9_ISR_API == STD_ON) */
#if (PWM_TAUC5_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC5_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC5_CH10_ISR_API == STD_ON) */
#if (PWM_TAUC5_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC5_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC5_CH11_ISR_API == STD_ON) */
#if (PWM_TAUC5_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC5_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC5_CH12_ISR_API == STD_ON) */
#if (PWM_TAUC5_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC5_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC5_CH13_ISR_API == STD_ON) */
#if (PWM_TAUC5_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC5_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC5_CH14_ISR_API == STD_ON) */
#if (PWM_TAUC5_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC5_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC5_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC5_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC5_CH15_ISR_API == STD_ON) */
#if (PWM_TAUC6_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC6_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC6_CH0_ISR_API == STD_ON) */
#if (PWM_TAUC6_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC6_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC6_CH1_ISR_API == STD_ON) */
#if (PWM_TAUC6_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC6_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC6_CH2_ISR_API == STD_ON) */
#if (PWM_TAUC6_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC6_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC6_CH3_ISR_API == STD_ON) */
#if (PWM_TAUC6_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC6_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC6_CH4_ISR_API == STD_ON) */
#if (PWM_TAUC6_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC6_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC6_CH5_ISR_API == STD_ON) */
#if (PWM_TAUC6_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC6_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC6_CH6_ISR_API == STD_ON) */
#if (PWM_TAUC6_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC6_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC6_CH7_ISR_API == STD_ON) */
#if (PWM_TAUC6_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC6_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC6_CH8_ISR_API == STD_ON) */
#if (PWM_TAUC6_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC6_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC6_CH9_ISR_API == STD_ON) */
#if (PWM_TAUC6_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC6_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC6_CH10_ISR_API == STD_ON) */
#if (PWM_TAUC6_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC6_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC6_CH11_ISR_API == STD_ON) */
#if (PWM_TAUC6_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC6_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC6_CH12_ISR_API == STD_ON) */
#if (PWM_TAUC6_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC6_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC6_CH13_ISR_API == STD_ON) */
#if (PWM_TAUC6_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC6_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC6_CH14_ISR_API == STD_ON) */
#if (PWM_TAUC6_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC6_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC6_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC6_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC6_CH15_ISR_API == STD_ON) */
#if (PWM_TAUC7_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC7_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC7_CH0_ISR_API == STD_ON) */
#if (PWM_TAUC7_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC7_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC7_CH1_ISR_API == STD_ON) */
#if (PWM_TAUC7_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC7_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC7_CH2_ISR_API == STD_ON) */
#if (PWM_TAUC7_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC7_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC7_CH3_ISR_API == STD_ON) */
#if (PWM_TAUC7_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC7_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC7_CH4_ISR_API == STD_ON) */
#if (PWM_TAUC7_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC7_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC7_CH5_ISR_API == STD_ON) */
#if (PWM_TAUC7_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC7_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC7_CH6_ISR_API == STD_ON) */
#if (PWM_TAUC7_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC7_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC7_CH7_ISR_API == STD_ON) */
#if (PWM_TAUC7_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC7_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC7_CH8_ISR_API == STD_ON) */
#if (PWM_TAUC7_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC7_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC7_CH9_ISR_API == STD_ON) */
#if (PWM_TAUC7_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC7_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC7_CH10_ISR_API == STD_ON) */
#if (PWM_TAUC7_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC7_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC7_CH11_ISR_API == STD_ON) */
#if (PWM_TAUC7_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC7_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC7_CH12_ISR_API == STD_ON) */
#if (PWM_TAUC7_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC7_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC7_CH13_ISR_API == STD_ON) */
#if (PWM_TAUC7_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC7_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC7_CH14_ISR_API == STD_ON) */
#if (PWM_TAUC7_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC7_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC7_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC7_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC7_CH15_ISR_API == STD_ON) */
#if (PWM_TAUC8_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC8_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC8_CH0_ISR_API == STD_ON) */
#if (PWM_TAUC8_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC8_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC8_CH1_ISR_API == STD_ON) */
#if (PWM_TAUC8_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC8_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC8_CH2_ISR_API == STD_ON) */
#if (PWM_TAUC8_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC8_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC8_CH3_ISR_API == STD_ON) */
#if (PWM_TAUC8_CH4_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH4_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH4_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH4_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC8_CH4);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC8_CH4_ISR_API == STD_ON) */
#if (PWM_TAUC8_CH5_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH5_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH5_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH5_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC8_CH5);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC8_CH5_ISR_API == STD_ON) */
#if (PWM_TAUC8_CH6_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH6_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH6_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH6_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC8_CH6);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC8_CH6_ISR_API == STD_ON) */
#if (PWM_TAUC8_CH7_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH7_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH7_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH7_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC8_CH7);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC8_CH7_ISR_API == STD_ON) */
#if (PWM_TAUC8_CH8_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH8_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH8_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH8_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC8_CH8);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC8_CH8_ISR_API == STD_ON) */
#if (PWM_TAUC8_CH9_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH9_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH9_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH9_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC8_CH9);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC8_CH9_ISR_API == STD_ON) */
#if (PWM_TAUC8_CH10_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH10_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH10_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH10_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC8_CH10);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC8_CH10_ISR_API == STD_ON) */
#if (PWM_TAUC8_CH11_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH11_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH11_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH11_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC8_CH11);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC8_CH11_ISR_API == STD_ON) */
#if (PWM_TAUC8_CH12_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH12_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH12_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH12_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC8_CH12);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC8_CH12_ISR_API == STD_ON) */
#if (PWM_TAUC8_CH13_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH13_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH13_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH13_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC8_CH13);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC8_CH13_ISR_API == STD_ON) */
#if (PWM_TAUC8_CH14_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH14_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH14_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH14_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC8_CH14);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC8_CH14_ISR_API == STD_ON) */
#if (PWM_TAUC8_CH15_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH15_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUC8_CH15_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUC8_CH15_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUC8_CH15);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUC8_CH15_ISR_API == STD_ON) */
#endif/*PWM_TAUC_UNIT_USED == STD_ON*/
#if (PWM_TAUJ_UNIT_USED == STD_ON)/*PWM_TAUJ_UNIT_USED == STD_ON*/
#if (PWM_TAUJ0_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ0_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ0_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUJ0_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUJ0_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUJ0_CH0_ISR_API == STD_ON) */
#if (PWM_TAUJ0_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ0_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ0_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUJ0_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUJ0_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUJ0_CH1_ISR_API == STD_ON) */
#if (PWM_TAUJ0_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ0_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ0_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUJ0_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUJ0_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUJ0_CH2_ISR_API == STD_ON) */
#if (PWM_TAUJ0_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ0_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ0_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUJ0_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUJ0_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUJ0_CH3_ISR_API == STD_ON) */
#if (PWM_TAUJ1_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ1_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ1_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUJ1_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUJ1_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUJ1_CH0_ISR_API == STD_ON) */
#if (PWM_TAUJ1_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ1_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ1_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUJ1_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUJ1_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUJ1_CH1_ISR_API == STD_ON) */
#if (PWM_TAUJ1_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ1_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ1_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUJ1_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUJ1_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUJ1_CH2_ISR_API == STD_ON) */
#if (PWM_TAUJ1_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ1_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ1_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUJ1_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUJ1_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUJ1_CH3_ISR_API == STD_ON) */
#if (PWM_TAUJ2_CH0_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ2_CH0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ2_CH0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUJ2_CH0_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUJ2_CH0);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUJ2_CH0_ISR_API == STD_ON) */
#if (PWM_TAUJ2_CH1_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ2_CH1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ2_CH1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUJ2_CH1_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUJ2_CH1);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUJ2_CH1_ISR_API == STD_ON) */
#if (PWM_TAUJ2_CH2_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ2_CH2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ2_CH2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUJ2_CH2_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUJ2_CH2);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUJ2_CH2_ISR_API == STD_ON) */
#if (PWM_TAUJ2_CH3_ISR_API == STD_ON)
#define PWM_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, PWM_PUBLIC_CODE) TAUJ2_CH3_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(TAUJ2_CH3_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (PWM_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, PWM_PUBLIC_CODE) TAUJ2_CH3_ISR(void)
#endif
{
Pwm_HW_Callback(PWM_TAUJ2_CH3);
}
#define PWM_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (PWM_TAUJ2_CH3_ISR_API == STD_ON) */
#endif/*PWM_TAUJ_UNIT_USED == STD_ON*/
#endif/* End of (PWM_NOTIFICATION_SUPPORTED == STD_ON) */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Adc/Adc.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Adc.c */
/* Version = 3.1.4 */
/* Date = 20-Mar-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2013 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* API function implementations of ADC Driver Component */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 10-Jul-2009 : Initial version
*
* V3.0.1: 12-Oct-2009 : As per SCR 052, the following changes are made
* 1. Template changes are made.
* 2. Adc_Init is updated to initialize HW unit
* settings when the priority is ADC_PRIORITY_HW_SW
* or ADC_PRIORITY_HW
* 3. Adc_DeInit is updated to deinitialize configured
* DMA channels.
* 4. Adc_StartGroupConversion is updated in DET
* section to replace LddCurrentGroup to Group.
* 5. Adc_DisableHardwareTrigger is updated to
* optimize DET section and queuing concept.
*
* V3.0.2: 05-Nov-2009 : As per SCR 088, I/O structure is updated to have
* separate base address for USER and OS registers.
*
* V3.0.3: 08-Nov-2009 : As per SCR 109, Adc_Init and Adc_DeInit is updated
* to check if Adc_GucMaxDmaChannels is not equal to 0
* before initialization or deinitialization of DMA.
*
* V3.0.4: 02-Dec-2009 : As per SCR 157, the following changes are made
* 1. Adc_GpRunTimeData declaration is changed.
* 2. Pre-compile option is updated to use
* ADC_ENABLE_QUEUING along with priority
* ADC_PRIORITY_NONE.
* 3. Adc_GucPopFrmQueue is put within pre-compile
* option.
*
* V3.0.5: 05-Jan-2010 : As per SCR 179, the following changes are made
* 1. Declaration of the local variable LddCurrentGroup
* in the function Adc_StartGroupConversion is
* corrected.
* 2. Adc_GucResultRead is replaced by group RAM
* variable.
* 3. Offset of the PIC registers are corrected.
*
* V3.0.6: 26-Feb-2010 : As per SCR 200, the following changes are made
* 1. Adc_StopGroupConversion is updated
* to disable the interrupt configured for the CGm
* unit mapped for the requested group.
* 2. Adc_Init is updated for the pre-compile option
* of the RAM variables ucQueueStatus and
* ucQueueCounter.
*
* V3.0.7: 18-Mar-2010 : As per SCR 231, the following changes are made:
* 1. APIs Adc_StartGroupConversion,
* Adc_StopGroupConversion, Adc_EnableHardwareTrigger
* and Adc_DisableHardwareTrigger are updated to
* avoid reading from uninitialized pointers.
* 2. API Adc_GetStreamLastPointer is updated to return
* completed number of samples for DMA access.
*
* V3.0.8: 01-Jul-2010 : As per SCR 295, following changes are made:
* 1. Adc_StartGroupConversion is updated
* to report DET error when called in ADC_COMPLETED
* group conversion state.
* 2. Adc_GaaCGmConvStatusMask[] is added.
* 3. Interrupt control register is replaced by IMR
* register.
*
* V3.0.9: 28-Jul-2010 : As per SCR 316, updated the function
* Adc_StopGroupConversion for clearing the pending
* interrupt.
*
* V3.0.10: 14-Sep-2010 : As per SCR 354, updated the function
* Adc_StopGroupConversion for reporting the DET error
* ADC_E_IDLE.
*
* V3.0.11: 26-Oct-2010 : As per SCR 371, updated pre-compile option for
* Adc_GaaCGmConvStatusMask variable declaration.
*
* V3.0.12: 07-Jan-2011 : As per SCR 391, tab spaces are removed.
*
* V3.0.13: 20-Jun-2011 : As per SCR 475, function Adc_Init is updated
* to change the type of the pointer 'LpDmaTrigFactor'
* from 'uint32' to 'uint16'.
*
* V3.1.0: 27-Jul-2011 : Modified for DK-4
* V3.1.1: 04-Oct-2011 : Added comments for the violation of MISRA rule 19.1,
* 1.2,8.7
* V3.1.2: 14-Feb-2012 : Merged the fixes done for Fx4L Adc driver
*
* V3.1.3: 04-Jun-2012 : As per SCR 019, following changes are made:
* 1. Compiler version is removed from environment
* section.
* 2. File version is changed.
* 3. Adc_GetVersionInfo API is removed.
* V3.1.4: 20-Mar-2013 : As per SCR 083 for MNT_0009451 and MNT_0009843,
* following changes are made:
* 1. Adc_StartGroupConversion is implemented as
* reentrant
* 2. Copyright information is updated.
* 3. "ADCAnCNT" register is initialzed before
* "ADCAnCTL1" register.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Adc.h"
#include "Adc_Private.h"
#include "Adc_PBTypes.h"
#include "Adc_LTTypes.h"
#include "Adc_Ram.h"
#if(ADC_DEV_ERROR_DETECT == STD_ON)
#include "Det.h"
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
#include "SchM_Adc.h"
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define ADC_C_AR_MAJOR_VERSION ADC_AR_MAJOR_VERSION_VALUE
#define ADC_C_AR_MINOR_VERSION ADC_AR_MINOR_VERSION_VALUE
#define ADC_C_AR_PATCH_VERSION ADC_AR_PATCH_VERSION_VALUE
/* File version information */
#define ADC_C_SW_MAJOR_VERSION 3
#define ADC_C_SW_MINOR_VERSION 1
#define ADC_C_SW_PATCH_VERSION 3
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (ADC_AR_MAJOR_VERSION != ADC_C_AR_MAJOR_VERSION)
#error "Adc.c : Mismatch in Specification Major Version"
#endif
#if (ADC_AR_MINOR_VERSION != ADC_C_AR_MINOR_VERSION)
#error "Adc.c : Mismatch in Specification Minor Version"
#endif
#if (ADC_AR_PATCH_VERSION != ADC_C_AR_PATCH_VERSION)
#error "Adc.c : Mismatch in Specification Patch Version"
#endif
#if (ADC_SW_MAJOR_VERSION != ADC_C_SW_MAJOR_VERSION)
#error "Adc.c : Mismatch in Major Version"
#endif
#if (ADC_SW_MINOR_VERSION != ADC_C_SW_MINOR_VERSION)
#error "Adc.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/* MISRA Rule : 8.7 */
/* Message : Objects shall be defined at block scope if */
/* they are only accessed from within a single */
/* function. */
/* Reason : By Moving the array into the function used */
/* the stack size will be more, hence this is */
/* defined outside. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
#if ((ADC_ENABLE_START_STOP_GROUP_API == STD_ON) || \
((ADC_HW_TRIGGER_API == STD_ON) && \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))))
#define ADC_START_SEC_CONST_16BIT
/* MISRA Rule : 19.1 */
/* Message : #include statements in a file */
/* should only be preceded by other*/
/* preprocessor directives or */
/* comments. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
#include "MemMap.h"
STATIC CONST(uint16, ADC_CONST) Adc_GaaCGmConvStatusMask[ADC_THREE] =
{
ADC_CG0_CONV_STATUS_MASK,
ADC_CG1_CONV_STATUS_MASK,
ADC_CG2_CONV_STATUS_MASK
};
#define ADC_STOP_SEC_CONST_16BIT
#include "MemMap.h"/* PRQA S 5087 */
#endif /* (ADC_ENABLE_START_STOP_GROUP_API == STD_ON) || \
((ADC_HW_TRIGGER_API == STD_ON) && \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE)))) */
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Adc_Init
**
** Service ID : 0x00
**
** Description : This API performs the initialization of the ADC Driver
** component.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Non-Reentrant
**
** Input Parameters : ConfigPtr
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Adc_GpConfigPtr, Adc_GpHwUnitConfig,
** Adc_GpGroupConfig, Adc_GpRunTimeData,
** Adc_GpGroupRamData, Adc_GucMaxSwTriggGroups
** Adc_GpHwUnitRamData, Adc_GblDriverStatus,
** Adc_GpDmaUnitConfig
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, ADC_PUBLIC_CODE) Adc_Init
(P2CONST(Adc_ConfigType, AUTOMATIC, ADC_APPL_CONST) ConfigPtr)
{
#if(ADC_DMA_MODE_ENABLE == STD_ON)
P2CONST(Tdd_Adc_DmaUnitConfig, AUTOMATIC, ADC_CONFIG_DATA) LpCGmDmaConfig;
P2VAR(Tdd_Adc_DmaAddrRegs, AUTOMATIC, ADC_CONFIG_DATA) LpDmaRegisters;
P2VAR(uint16, AUTOMATIC, ADC_CONFIG_DATA) LpDmaTrigFactor;
#endif /* #if(ADC_DMA_MODE_ENABLE == STD_ON) */
P2VAR(Tdd_Adc_ChannelGroupRamData, AUTOMATIC, ADC_CONFIG_DATA) LpGroupData;
#if(ADC_DIAG_CHANNEL_SUPPORTED == STD_ON)
/* Pointer to the hardware unit User base configuration address */
P2VAR(Tdd_AdcConfigUserRegisters, AUTOMATIC, ADC_CONFIG_DATA)
LpAdcUserRegisters;
#endif /* #if(ADC_DIAG_CHANNEL_SUPPORTED == STD_ON) */
/* Pointer to the hardware unit Os base configuration address */
P2VAR(Tdd_AdcConfigOsRegisters, AUTOMATIC, ADC_CONFIG_DATA) LpAdcOsRegisters;
#if (ADC_HW_TRIGGER_API == STD_ON)
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW))
#if (ADC_TO_TIMER_CONNECT_SUPPORT == STD_ON)
P2VAR(Tdd_AdcPicRegisters, AUTOMATIC,ADC_CONFIG_DATA) LpAdcPicRegisters;
#endif /* #if (ADC_TO_TIMER_CONNECT_SUPPORT == STD_ON) */
P2CONST(Tdd_Adc_GroupConfigType, AUTOMATIC, ADC_CONFIG_CONST) LpGroup;
Adc_GroupType LddVirGroup;
uint8 LucHwCGUnit;
#if (ADC_TO_TIMER_CONNECT_SUPPORT == STD_ON)
uint8 LddHwUnit;
#endif /* #if (ADC_TO_TIMER_CONNECT_SUPPORT == STD_ON) */
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW)) */
#endif /* #if (ADC_HW_TRIGGER_API == STD_ON) */
uint8_least LucLoopCount;
#if (ADC_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
#if(ADC_DEV_ERROR_DETECT == STD_ON)
/* Initialize error status flag to false */
LblDetErrFlag = ADC_FALSE;
/* Check if the ADC Driver is already initialised */
if(Adc_GblDriverStatus == ADC_TRUE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID, ADC_INIT_SID,
ADC_E_ALREADY_INITIALIZED);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
/* Check if the Configuration pointer is NULL */
if(ConfigPtr == NULL_PTR)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_INIT_SID, ADC_E_PARAM_CONFIG);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
/* Check if any DET was reported */
if(LblDetErrFlag == ADC_FALSE)
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
{
/* MISRA Rule : 1.2
Message : Dereferencing pointer value that is apparently
NULL.
Reason : "ConfigPtr" pointer is checked and verified when
DET is switched STD_ON.
Verification : However, the part of the code is
verified manually and it is not having
any impact on code.
*/
/* Initialise the module only if Database is present */
if((ConfigPtr->ulStartOfDbToc) == ADC_DBTOC_VALUE)
{
/* Update all the global pointers with the relevant addresses */
Adc_GpConfigPtr = ConfigPtr;
Adc_GpHwUnitConfig = ConfigPtr->pHWUnitConfig;
Adc_GpGroupConfig = ConfigPtr->pGroupConfig;
#if (ADC_HW_TRIGGER_API == STD_ON)
Adc_GpHWGroupTrigg = ConfigPtr->pGroupHWTrigg;
#endif /* #if (ADC_HW_TRIGGER_API == STD_ON) */
Adc_GpGroupRamData = ConfigPtr->pGroupRamData;
Adc_GpHwUnitRamData = ConfigPtr->pHwUnitRamData;
Adc_GpRunTimeData = ConfigPtr->pRunTimeData;
Adc_GucMaxSwTriggGroups = ConfigPtr->ucMaxSwTriggGroups;
#if (ADC_DMA_MODE_ENABLE == STD_ON)
/* Initialize the global pointer for HW unit mapping */
Adc_GpDmaHWUnitMapping = ConfigPtr->pDmaHWUnitMapping;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* Initialize the global pointer for CG unit mapping */
Adc_GpDmaCGUnitMapping = ConfigPtr->pDmaCGUnitMapping;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
Adc_GucMaxDmaChannels = ConfigPtr->ucMaxDmaChannels;
if(Adc_GucMaxDmaChannels != ADC_ZERO)
{
Adc_GpDmaUnitConfig = ConfigPtr->pDmaUnitConfig;
for(LucLoopCount = ADC_ZERO; LucLoopCount <
(uint8_least)Adc_GucMaxDmaChannels; LucLoopCount++)
{
LpCGmDmaConfig = &Adc_GpDmaUnitConfig[LucLoopCount];
LpDmaRegisters = LpCGmDmaConfig->pDmaCntlRegBase;
/* Clear the DTE bit */
LpDmaRegisters->ucDTSn &= ADC_DMA_DISABLE;
/* Load the source address register */
LpDmaRegisters->ulDSAn = LpCGmDmaConfig->ulDmaBuffRegCGm;
#if(ADC_CPU_CORE == ADC_E2M)
/* Load the source chip select register */
LpDmaRegisters->usDSCn = ADC_DMA_SRC_SELECT;
/* Set NSAV bit to 0 in higher address byte */
LpDmaRegisters->usDNSAnH &= ADC_DMA_CLEAR_NEXT;
/* Load the destination chip select register */
LpDmaRegisters->usDDCn = ADC_DMA_DEST_SELECT;
/* Set NDAV bit to 0 in higher address byte */
LpDmaRegisters->usDNDAnH &= ADC_DMA_CLEAR_NEXT;
/* Load the transfer request select register */
LpDmaRegisters->usDTRSn = ADC_DMA_TRANSFER;
#endif /* #if(ADC_CPU_CORE == ADC_E2M) */
LpDmaTrigFactor = LpCGmDmaConfig->pDmaDTFRRegAddr;
/* Load the triger factor configured for the CGm unit */
*LpDmaTrigFactor = LpCGmDmaConfig->usDmaDtfrRegValue;
/* Load the transfer control register */
LpDmaRegisters->usDTCTn = ADC_DMA_SETTINGS;
}
}
#endif /* #if (ADC_DMA_MODE_ENABLE == STD_ON) */
for(LucLoopCount = ADC_ZERO; LucLoopCount <
(uint8_least)ADC_MAX_HW_UNITS; LucLoopCount++)
{
/* Read the base configuration register of the hardware unit */
LpAdcOsRegisters = Adc_GpHwUnitConfig[LucLoopCount].pOsBaseAddress;
/* Set the Stabilization counter value */
LpAdcOsRegisters->ucADCAnCNT =
Adc_GpHwUnitConfig[LucLoopCount].ucStabilzationCount;
/*
* Set the HW unit register as per the configuration for power on,
* Discharge function, resolution, conversion frequency and result
* alignment
*/
LpAdcOsRegisters->ulADCAnCTL1 =
Adc_GpHwUnitConfig[LucLoopCount].ulHwUnitSettings;
/* Set the number of sample fixed for each CGm unit */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
LpAdcOsRegisters->usADCAnCTL0 =
Adc_GpHwUnitConfig[LucLoopCount].usStreamEnableMask;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
#if(ADC_DIAG_CHANNEL_SUPPORTED == STD_ON)
/* Read the user base configuration register of the hardware unit */
LpAdcUserRegisters = Adc_GpHwUnitConfig[LucLoopCount].pUserBaseAddress;
/* Set the diagnostic reference voltage configured for the
diagnostic channel configured */
LpAdcUserRegisters->usADCAnDGCTL0 =
Adc_GpHwUnitConfig[LucLoopCount].usDiagnosticValue;
#endif /* #if(ADC_DIAG_CHANNEL_SUPPORTED == STD_ON) */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
/* Initialise queue */
Adc_GpHwUnitRamData[LucLoopCount].ucQueueStatus = ADC_QUEUE_EMPTY;
Adc_GpHwUnitRamData[LucLoopCount].ucQueueCounter = ADC_ZERO;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON))) */
}
for(LucLoopCount = ADC_ZERO; LucLoopCount <
(uint8_least)ADC_MAX_GROUPS; LucLoopCount++)
{
LpGroupData = &Adc_GpGroupRamData[LucLoopCount];
/* Initialise all the groups as idle */
LpGroupData->ddGroupStatus = ADC_IDLE;
#if (ADC_GRP_NOTIF_CAPABILITY == STD_ON)
/* Disable notifications */
LpGroupData->ucNotifyStatus = ADC_FALSE;
#endif /* #if (ADC_GRP_NOTIF_CAPABILITY == STD_ON) */
#if (ADC_DEV_ERROR_DETECT == STD_ON)
/* Disable buffer address initialization */
LpGroupData->ucBufferStatus = ADC_FALSE;
#endif /*#if(ADC_DEV_ERROR_DETECT == STD_ON) */
#if (ADC_HW_TRIGGER_API == STD_ON)
/* Disable hardware trigger status */
LpGroupData->ucHwTriggStatus = ADC_FALSE;
#endif /* #if (ADC_HW_TRIGGER_API == STD_ON) */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* Initialize the channels completed to zero */
LpGroupData->ucReChannelsCompleted = ADC_ZERO;
/* Initialize the samples completed to zero */
LpGroupData->ucReSamplesCompleted = ADC_ZERO;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
/* Clear the flag indicating no group is present in queue */
LpGroupData->ucGrpPresent = ADC_FALSE;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON))) */
/* Clear the flag indicating result data is not read */
LpGroupData->blResultRead = ADC_FALSE;
}
#if (ADC_HW_TRIGGER_API == STD_ON)
#if((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW))
if(Adc_GpHWGroupTrigg != NULL_PTR)
{
for(LucLoopCount = Adc_GucMaxSwTriggGroups; LucLoopCount <
(uint8_least)ADC_MAX_GROUPS; LucLoopCount++)
{
/* Get the pointer to the group configuration */
LpGroup = &Adc_GpGroupConfig[LucLoopCount];
/* Get the CGm unit to which the group is configured */
LucHwCGUnit = LpGroup->ucHwCGUnit;
/* Get the index in the Adc_GstHWGroupTrigg array */
LddVirGroup = LucLoopCount - Adc_GucMaxSwTriggGroups;
#if (ADC_TO_TIMER_CONNECT_SUPPORT == STD_ON)
/* Get the HW unit to which the group is configured */
LddHwUnit = LpGroup->ucHwUnit;
/* Get the base configuration address of the hardware unit */
LpAdcPicRegisters = Adc_GpHwUnitConfig[LddHwUnit].pPicBaseAddress;
/* Load the TAUA0 interrupts configured for this channel group */
LpAdcPicRegisters->usPIC0ADTEN40n[LucHwCGUnit * ADC_TWO] =
Adc_GpHWGroupTrigg[LddVirGroup].usTAUA0TriggerMask;
/* Load the TAUA1 interrupts configured for this channel group */
LpAdcPicRegisters->usPIC0ADTEN41n[LucHwCGUnit * ADC_TWO] =
Adc_GpHWGroupTrigg[LddVirGroup].usTAUA1TriggerMask;
#endif /* #if (ADC_TO_TIMER_CONNECT_SUPPORT == STD_ON) */
/* Load HW trigger values configured */
LpAdcOsRegisters->usADCAnTSELm[LucHwCGUnit * ADC_TWO] =
Adc_GpHWGroupTrigg[LddVirGroup].usHWTriggerMask;
}
}
#endif /* #if((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW)) */
#endif /* #if (ADC_HW_TRIGGER_API == STD_ON) */
#if (ADC_DEV_ERROR_DETECT == STD_ON)
/* Set ADC driver as initialised */
Adc_GblDriverStatus = ADC_TRUE;
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* Clear the pop from queue flag */
Adc_GucPopFrmQueue = ADC_ZERO;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
for (LucLoopCount = ADC_ZERO; LucLoopCount < \
(uint8_least)0x06; LucLoopCount++)
{
Adc_GaaHwUnitStatus[LucLoopCount] = ADC_FALSE;
}
}
#if (ADC_DEV_ERROR_DETECT == STD_ON)
else
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_INIT_SID, ADC_E_INVALID_DATABASE);
}
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
}
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#if (ADC_DEINIT_API == STD_ON)
/*******************************************************************************
** Function Name : Adc_DeInit
**
** Service ID : 0x01
**
** Description : This API performs the De-Initialization of the
** ADC Driver component by making all the registers to
** the power on reset state.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Non-Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The ADC Driver must be initialised first by invoking
** API Adc_Init().
**
** Remarks : Global Variable(s):
** Adc_GblDriverStatus, Adc_GpGroupRamData,
** Adc_GpHwUnitConfig, Adc_GpHwUnitRamData
** Function(s) invoked:
** Det_ReportError,
*******************************************************************************/
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, ADC_PUBLIC_CODE) Adc_DeInit(void)
{
#if(ADC_DMA_MODE_ENABLE == STD_ON)
P2CONST(Tdd_Adc_DmaUnitConfig, AUTOMATIC, ADC_CONFIG_DATA) LpCGmDmaConfig;
P2VAR(Tdd_Adc_DmaAddrRegs, AUTOMATIC, ADC_CONFIG_DATA) LpDmaRegisters;
#endif /* #if(ADC_DMA_MODE_ENABLE == STD_ON) */
#if(ADC_DEV_ERROR_DETECT == STD_ON)
/* Pointer to the hardware unit user base configuration address */
P2VAR(Tdd_AdcConfigUserRegisters, AUTOMATIC,ADC_CONFIG_DATA)
LpAdcUserRegisters;
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
/* Pointer to the hardware unit os base configuration address */
P2VAR(Tdd_AdcConfigOsRegisters, AUTOMATIC,ADC_CONFIG_DATA)
LpAdcOsRegisters;
/* Local variable for loop count */
uint8_least LucLoopCount;
#if(ADC_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
LblDetErrFlag = ADC_FALSE;
/* Check if the ADC Module is not initialised */
if(Adc_GblDriverStatus == ADC_FALSE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_DEINIT_SID, ADC_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
else
{
LucLoopCount = ADC_ZERO;
do
{
LpAdcUserRegisters = Adc_GpHwUnitConfig[LucLoopCount].pUserBaseAddress;
/* Check if the requested hardware unit is busy */
if((LpAdcUserRegisters->ulADCAnSTR2 & ADC_HW_UNIT_STATUS) != ADC_ZERO)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID, ADC_DEINIT_SID,
ADC_E_BUSY);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
LucLoopCount++;
}while((LucLoopCount < (uint8_least)ADC_MAX_HW_UNITS) &&
(LblDetErrFlag != ADC_TRUE));
}
if(LblDetErrFlag == ADC_FALSE)
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
{
for(LucLoopCount = ADC_ZERO; LucLoopCount <
(uint8_least)ADC_MAX_HW_UNITS; LucLoopCount++)
{
/* Read the os base configuration register of the hardware unit */
LpAdcOsRegisters = Adc_GpHwUnitConfig[LucLoopCount].pOsBaseAddress;
/*
* Reset the HW unit register for power of,
* Discharge function, resolution, conversion frequency and result
* alignment
*/
LpAdcOsRegisters->ulADCAnCTL1 = ADC_ZERO_LONG;
/* Reset the Stabilization counter value */
LpAdcOsRegisters->ucADCAnCNT = ADC_ZERO;
/* Reset usADCAnCTL0 register */
LpAdcOsRegisters->usADCAnCTL0 = ADC_ZERO_SHORT;
}
for(LucLoopCount = ADC_ZERO; LucLoopCount <
(uint8_least) ADC_MAX_GROUPS; LucLoopCount++)
{
/* Set group status as idle */
Adc_GpGroupRamData[LucLoopCount].ddGroupStatus = ADC_IDLE;
#if (ADC_GRP_NOTIF_CAPABILITY == STD_ON)
/* Disable notifications */
Adc_GpGroupRamData[LucLoopCount].ucNotifyStatus = ADC_FALSE;
#endif /* #if (ADC_GRP_NOTIF_CAPABILITY == STD_ON) */
}
#if (ADC_DMA_MODE_ENABLE == STD_ON)
if(Adc_GucMaxDmaChannels != ADC_ZERO)
{
for(LucLoopCount = ADC_ZERO; LucLoopCount <
(uint8_least)Adc_GucMaxDmaChannels; LucLoopCount++)
{
/* Get the pointer to DMA configuration */
LpCGmDmaConfig = &Adc_GpDmaUnitConfig[LucLoopCount];
LpDmaRegisters = LpCGmDmaConfig->pDmaCntlRegBase;
/* Clear the DTE bit */
LpDmaRegisters->ucDTSn &= ADC_DMA_DISABLE;
}
}
#endif /* #if (ADC_DMA_MODE_ENABLE == STD_ON) */
#if (ADC_DEV_ERROR_DETECT == STD_ON)
/* Set the ADC driver as uninitialised */
Adc_GblDriverStatus = ADC_FALSE;
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
}
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* ADC_DEINIT_API == STD_ON */
#if (ADC_ENABLE_START_STOP_GROUP_API == STD_ON)
/*******************************************************************************
** Function Name : Adc_StartGroupConversion
**
** Service ID : 0x02
**
** Description : This API service service shall start the conversion of
** all channels of the requested ADC Channel group.
** Depending on the group configuration single-shot or
** continuous conversion is started.
**
** Sync/Async : Asynchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : Group
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The ADC Driver must be initialised first by invoking
** API Adc_Init().
**
** Remarks : Global Variable(s):
** Adc_GblDriverStatus, Adc_GpHwUnitConfig,
** Adc_GpGroupRamData, Adc_GpHwUnitRamData,
** Adc_GpGroupConfig, Adc_GucMaxSwTriggGroups
** Function(s) invoked:
** Det_ReportError, Adc_ConfigureGroupForConversion,
** Adc_PushToQueue
*******************************************************************************/
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, ADC_PUBLIC_CODE) Adc_StartGroupConversion(Adc_GroupType Group)
{
#if((ADC_DEV_ERROR_DETECT == STD_ON) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
P2VAR(Tdd_Adc_HwUnitRamData, AUTOMATIC, ADC_CONFIG_DATA) LpHwUnitData;
#endif /* #if((ADC_DEV_ERROR_DETECT == STD_ON) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON))) */
/* Pointer definition to store the base address of the ADC registers */
P2VAR(Tdd_AdcConfigUserRegisters, AUTOMATIC,ADC_CONFIG_DATA)
LpAdcUserRegisters;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
P2VAR(Tdd_Adc_RunTimeData, AUTOMATIC,ADC_CONFIG_DATA) LpRunTimeData;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_DEV_ERROR_DETECT == STD_ON))
/* Local variable to store the current conversion group ID */
Adc_GroupType LddCurrentGroup;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_DEV_ERROR_DETECT == STD_ON)) */
/* Local variable to store the hardware unit number */
Adc_HwUnitType LddHwUnit;
uint8 LucHwCGUnit;
#if (ADC_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
#if(ADC_DEV_ERROR_DETECT == STD_ON)
/* Initialize error status flag to false */
LblDetErrFlag = ADC_FALSE;
/* Check if the ADC Module is not initialised */
if(Adc_GblDriverStatus == ADC_FALSE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_START_GROUP_CONVERSION_SID, ADC_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
/* Check if the group requested is invalid */
else if(Group >= ADC_MAX_GROUPS)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_START_GROUP_CONVERSION_SID, ADC_E_PARAM_GROUP);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
else
{
/* Read the Hardware Unit to which the group belongs */
LddHwUnit = Adc_GpGroupConfig[Group].ucHwUnit;
/* Initialise HW RAM data to a local pointer */
LpHwUnitData = &Adc_GpHwUnitRamData[LddHwUnit];
/* Get the CGm unit to which the channel group is mapped */
LucHwCGUnit = Adc_GpGroupConfig[Group].ucHwCGUnit;
/* Get the current group under conversion */
LddCurrentGroup = LpHwUnitData->ddCurrentConvGroup[LucHwCGUnit];
/* Check if the requested group is HW triggered */
if(Group >= Adc_GucMaxSwTriggGroups)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_START_GROUP_CONVERSION_SID, ADC_E_WRONG_TRIGG_SRC);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
if(Adc_GpGroupRamData[Group].ucBufferStatus == ADC_FALSE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_START_GROUP_CONVERSION_SID, ADC_E_BUFFER_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
if(Adc_GpGroupRamData[Group].ucGrpPresent == ADC_TRUE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_START_GROUP_CONVERSION_SID, ADC_E_BUSY);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON))) */
if((LddCurrentGroup == Group) &&
(Adc_GpGroupRamData[Group].ddGroupStatus != ADC_IDLE) &&
(Adc_GpGroupConfig[Group].ucConversionMode == ADC_CONTINUOUS))
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_START_GROUP_CONVERSION_SID, ADC_E_BUSY);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
if((LddCurrentGroup == Group) &&
(Adc_GpGroupRamData[Group].ddGroupStatus != ADC_IDLE) &&
(Adc_GpGroupRamData[Group].ddGroupStatus != ADC_STREAM_COMPLETED) &&
(Adc_GpGroupConfig[Group].ucConversionMode == ADC_ONCE))
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_START_GROUP_CONVERSION_SID, ADC_E_BUSY);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
}
/* Check if any DET was reported */
if(LblDetErrFlag == ADC_FALSE)
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
{
/* Read the Hardware Unit to which the group belongs */
LddHwUnit = Adc_GpGroupConfig[Group].ucHwUnit;
/* Read the base configuration address of the hardware unit */
LpAdcUserRegisters = Adc_GpHwUnitConfig[LddHwUnit].pUserBaseAddress;
/* Get the CGm unit to which the channel group is mapped */
LucHwCGUnit = Adc_GpGroupConfig[Group].ucHwCGUnit;
/* Check if Group Priority and queue are disabled */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_OFF))
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Check if the requested hardware unit is busy */
if(((LpAdcUserRegisters->ulADCAnSTR2 & \
Adc_GaaCGmConvStatusMask[LucHwCGUnit]) != ADC_ZERO) || \
(Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] == ADC_TRUE))
{
#if(ADC_DEV_ERROR_DETECT == STD_ON)
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_START_GROUP_CONVERSION_SID, ADC_E_BUSY);
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
}
else /* Hardware Unit is not busy. Conversion can be taken up */
{
/* Set the Global variable indicating the HW unit is busy */
Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] = ADC_TRUE;
Adc_ConfigureGroupForConversion(Group);
}
/* Group Priority is enabled */
#elif ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* Check if the requested hardware unit is busy */
if(((LpAdcUserRegisters->ulADCAnSTR2 &
Adc_GaaCGmConvStatusMask[LucHwCGUnit]) != ADC_ZERO) || \
(Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] == ADC_TRUE))
{
/* Initialise HW RAM data to a local pointer */
LpHwUnitData = &Adc_GpHwUnitRamData[LddHwUnit];
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter the critical section protection */
SchM_Enter_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* Check if the current group priority is less than requested */
if(LpHwUnitData->ddCurrentPriority[LucHwCGUnit] <
Adc_GpGroupConfig[Group].ddGroupPriority)
{
/* Fetch the group id of the current conversion group */
LddCurrentGroup = LpHwUnitData->ddCurrentConvGroup[LucHwCGUnit];
#if ((ADC_HW_TRIGGER_API == STD_ON) && \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW))
/* Check if the ongoing lower priority group is HW triggered */
if(LpHwUnitData->ddTrigSource == ADC_TRIGG_SRC_HW)
{
/* Disable the lower ongoing HW triggered group */
Adc_DisableHWGroup(LddCurrentGroup);
/* Set the Global variable indicating the HW unit is busy */
Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] = \
ADC_TRUE;
/* Start conversion of requested higher SW triggered group */
Adc_ConfigureGroupForConversion(Group);
}
else
#endif /* #if ((ADC_HW_TRIGGER_API == STD_ON) && \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW)) */
{
/* Check if the queue is full */
if(LpHwUnitData->ucQueueStatus != ADC_QUEUE_FULL)
{
/* Get the runtime data pointer */
LpRunTimeData =
&Adc_GpRunTimeData[(LddHwUnit * ADC_NUMBER_OF_CG_UNITS) + \
LucHwCGUnit];
/* Stop the conversion of the requested channel group */
LpAdcUserRegisters->ucADCAnTRG4[LucHwCGUnit * ADC_FOUR] =
ADC_STOP_CONVERSION;
/* Push the current conversion group into queue */
Adc_PushToQueue(LddCurrentGroup);
/* Check if the group as to be resumed from where it had stopped
before */
#if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW)
if(Adc_GpGroupConfig[LddCurrentGroup].ddGroupReplacement ==
ADC_GROUP_REPL_SUSPEND_RESUME)
#endif /* #if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) */
{
/* Load the number of channels converted before suspension */
Adc_GpGroupRamData[LddCurrentGroup].ucReChannelsCompleted =
LpRunTimeData->ucChannelsCompleted;
}
/* Load the number of samples converted before aborting or
suspension */
Adc_GpGroupRamData[LddCurrentGroup].ucReSamplesCompleted =
LpRunTimeData->ucSamplesCompleted;
/* Set the Global variable indicating the HW unit is busy */
Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] = \
ADC_TRUE;
/* Configure the requested group for conversion */
Adc_ConfigureGroupForConversion(Group);
}
#if(ADC_DEV_ERROR_DETECT == STD_ON)
else
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_START_GROUP_CONVERSION_SID, ADC_E_BUSY);
}
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
}
}
else if(LpHwUnitData->ucQueueStatus != ADC_QUEUE_FULL)
{
/* Push the requested group to queue if its priority is less
** than the current conversion group.
*/
Adc_PushToQueue(Group);
}
else
{
#if(ADC_DEV_ERROR_DETECT == STD_ON)
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_START_GROUP_CONVERSION_SID, ADC_E_BUSY);
#endif /* #if(ADC_DEV_ERROR_DETECT == ON) */
}
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit the critical section protection */
SchM_Exit_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
}
else /* First group requested for conversion */
{
/* Set the Global variable indicating the HW unit is busy */
Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] = ADC_TRUE;
/* Configure the requested group for conversion */
Adc_ConfigureGroupForConversion(Group);
}
#elif (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW)
/* Check if the requested corresponding CGm unit to which group is mapped
is busy */
if(((LpAdcUserRegisters->ulADCAnSTR2 &
Adc_GaaCGmConvStatusMask[LucHwCGUnit]) == ADC_ZERO) && \
(Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] == ADC_TRUE))
{
/* Set the Global variable indicating the HW unit is busy */
Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] = ADC_TRUE;
/* Configure the requested group for conversion */
Adc_ConfigureGroupForConversion(Group);
}
#if(ADC_DEV_ERROR_DETECT == STD_ON)
else
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_START_GROUP_CONVERSION_SID, ADC_E_BUSY);
}
#endif /* #if(ADC_DEV_ERROR_DETECT == ON) */
#elif ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON))
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Check if the requested hardware unit is busy */
if(((LpAdcUserRegisters->ulADCAnSTR2 &
Adc_GaaCGmConvStatusMask[LucHwCGUnit]) != ADC_ZERO) || \
(Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] == ADC_TRUE))
{
/* Initialise HW RAM data to a local pointer */
LpHwUnitData = &Adc_GpHwUnitRamData[LddHwUnit];
/* Push the requested group into the first come first serve mechanism
queue */
if(LpHwUnitData->ucQueueStatus != ADC_QUEUE_FULL)
{
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter the critical section protection */
SchM_Enter_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
Adc_PushToQueue(Group);
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit the critical section protection */
SchM_Exit_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
}
#if(ADC_DEV_ERROR_DETECT == STD_ON)
else
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_START_GROUP_CONVERSION_SID, ADC_E_BUSY);
}
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
}
else /* Hardware unit is not busy. Conversion can be taken up */
{
/* Set the Global variable indicating the HW unit is busy */
Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] = ADC_TRUE;
Adc_ConfigureGroupForConversion(Group);
}
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_OFF)) */
}
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* ADC_ENABLE_START_STOP_GROUP_API == STD_ON */
#if (ADC_ENABLE_START_STOP_GROUP_API == STD_ON)
/*******************************************************************************
** Function Name : Adc_StopGroupConversion
**
** Service ID : 0x03
**
** Description : This API service shall stop conversion of the
** requested ADC Channel group.
** Depending on the group configuration single-shot or
** continuous conversion is started.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : Group
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The ADC Driver must be initialised first by invoking
** API Adc_Init().
**
** Remarks : Global Variable(s):
** Adc_GblDriverStatus, Adc_GpGroupConfig,
** Adc_GpHwUnitConfig, Adc_GpGroupRamData,
** Adc_GpHwUnitRamData, Adc_GucMaxSwTriggGroups
** Function(s) invoked:
** Det_ReportError, Adc_ConfigureGroupForConversion,
** Adc_SearchnDelete, Adc_PopFromQueue
*******************************************************************************/
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, ADC_PUBLIC_CODE) Adc_StopGroupConversion(Adc_GroupType Group)
{
/* Pointer to the hardware unit user base configuration address */
P2VAR(Tdd_AdcConfigUserRegisters, AUTOMATIC,ADC_CONFIG_DATA)
LpAdcUserRegisters;
/* Defining a pointer to the IMR structure */
P2CONST(Tdd_AdcImrAddMaskConfigType, AUTOMATIC, ADC_CONFIG_DATA)
LpAdcImrAddMask;
/* Defining a pointer to the Interrupt Control Register */
P2VAR(uint16, AUTOMATIC, ADC_CONFIG_DATA) LpIntpCntrlReg;
/* Local variable to store the hardware unit number */
Adc_HwUnitType LddHwUnit;
uint8 LucHwCGUnit;
#if(ADC_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
#if(ADC_DEV_ERROR_DETECT == STD_ON)
/* Initialize error status flag to false */
LblDetErrFlag = ADC_FALSE;
/* Check if the ADC Module is not initialised */
if(Adc_GblDriverStatus == ADC_FALSE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_STOP_GROUP_CONVERSION_SID, ADC_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
/* Check if the group requested is invalid */
else if(Group >= ADC_MAX_GROUPS)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_STOP_GROUP_CONVERSION_SID, ADC_E_PARAM_GROUP);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
else
{
if(Group >= Adc_GucMaxSwTriggGroups)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_STOP_GROUP_CONVERSION_SID, ADC_E_WRONG_TRIGG_SRC);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
if((Adc_GpGroupRamData[Group].ddGroupStatus == ADC_IDLE) &&
(Adc_GpGroupRamData[Group].ucGrpPresent == ADC_FALSE))
#else
if(Adc_GpGroupRamData[Group].ddGroupStatus == ADC_IDLE)
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON))) */
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_STOP_GROUP_CONVERSION_SID, ADC_E_IDLE);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
}
/* Check if any DET was reported */
if(LblDetErrFlag == ADC_FALSE)
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
{
/* Read the Hardware Unit to which the group belongs */
LddHwUnit = Adc_GpGroupConfig[Group].ucHwUnit;
/* Get the CGm unit to which the channel group is mapped */
LucHwCGUnit = Adc_GpGroupConfig[Group].ucHwCGUnit;
/* Read the user base configuration address of the hardware unit */
LpAdcUserRegisters = Adc_GpHwUnitConfig[LddHwUnit].pUserBaseAddress;
#if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW)
/* Check if CGm unit mapped to the requested group is busy */
if(((LpAdcUserRegisters->ulADCAnSTR2 &
Adc_GaaCGmConvStatusMask[LucHwCGUnit]) != ADC_ZERO) || \
(Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] == ADC_TRUE))
#else
/* Check if ongoing conversion is of requested group */
if(Adc_GpHwUnitRamData[LddHwUnit].ddCurrentConvGroup[LucHwCGUnit] == Group)
#endif /* #if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) */
{
/* Stop the conversion of the requested channel group */
LpAdcUserRegisters->ucADCAnTRG4[LucHwCGUnit * ADC_FOUR] = \
ADC_STOP_CONVERSION;
/* Clear the channels configured for the requested group */
LpAdcUserRegisters->ulADCAnIOCm[LucHwCGUnit] = ADC_CLEAR_CHANNEL_LIST;
/* Disable the interrupt for the CGm unit to which the group is mapped */
LpAdcImrAddMask = Adc_GpHwUnitConfig[LddHwUnit].pImrAddMask;
LpAdcImrAddMask = &LpAdcImrAddMask[LucHwCGUnit];
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
*(LpAdcImrAddMask->pImrIntpAddress) |= ~(LpAdcImrAddMask->ucImrMask);
/* Clear the pending interrupt for the CGm unit to which the
group is mapped */
LpIntpCntrlReg = Adc_GpHwUnitConfig[LddHwUnit].pIntpAddress;
LpIntpCntrlReg = &LpIntpCntrlReg[LucHwCGUnit];
*LpIntpCntrlReg &= ADC_CLEAR_INT_REQUEST_FLAG;
/* Group Priority is enabled or queue is enabled */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
/* Fetch the next group for conversion if the queue is not empty */
if(Adc_GpHwUnitRamData[LddHwUnit].ucQueueStatus != ADC_QUEUE_EMPTY)
{
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Set the flag indicating the group is popped out of the queue */
Adc_GucPopFrmQueue |= (ADC_ONE << LddHwUnit);
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter the critical section protection */
SchM_Enter_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* Set the Global variable indicating the HW unit is busy */
Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] = ADC_TRUE;
Adc_ConfigureGroupForConversion(Adc_PopFromQueue(LddHwUnit));
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit the critical section protection */
SchM_Exit_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
}
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON))) */
}
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
else if(Adc_GpGroupRamData[Group].ucGrpPresent == ADC_TRUE)
{
/* Search and delete the requested group from the queue */
Adc_SearchnDelete(Group, LddHwUnit);
}
else
{
/* To avoid QAC warning */
}
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON))) */
/* Set the group status as idle */
Adc_GpGroupRamData[Group].ddGroupStatus = ADC_IDLE;
#if (ADC_GRP_NOTIF_CAPABILITY == STD_ON)
/* Store disabled notification into RAM */
Adc_GpGroupRamData[Group].ucNotifyStatus = ADC_FALSE;
#endif /* #if (ADC_GRP_NOTIF_CAPABILITY == STD_ON) */
}
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* ADC_ENABLE_START_STOP_GROUP_API == STD_ON */
#if (ADC_READ_GROUP_API == STD_ON)
/*******************************************************************************
** Function Name : Adc_ReadGroup
**
** Service ID : 0x04
**
** Description : This API service shall read the group conversion
** result of the last completed conversion round of
** requested group
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : Group and DataBufferPtr
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Std_ReturnType
**
** Preconditions : The ADC Driver must be initialised first by invoking
** API Adc_Init().
**
** Remarks : Global Variable(s):
** Adc_GblDriverStatus, Adc_GpGroupConfig,
** Adc_GpGroupRamData
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(Std_ReturnType, ADC_PUBLIC_CODE)
Adc_ReadGroup (Adc_GroupType Group,
P2VAR(Adc_ValueGroupType, AUTOMATIC, ADC_APPL_CONST) DataBufferPtr)
{
P2CONST(Tdd_Adc_GroupConfigType, AUTOMATIC, ADC_CONFIG_CONST) LpGroup;
P2VAR(Adc_ValueGroupType, AUTOMATIC, ADC_CONFIG_DATA) LpChannelBuffer;
P2VAR(Tdd_Adc_RunTimeData, AUTOMATIC,ADC_CONFIG_DATA) LpRunTimeData;
Std_ReturnType LddReadStatus;
Adc_HwUnitType LddHwUnit;
uint8 LucHwCGUnit;
uint8 LucNoOfSamples;
/* Assuming the API will be called for single access mode */
uint8 LucLoopCount = ADC_ONE;
/* Initialise the return value */
LddReadStatus = E_NOT_OK;
#if(ADC_DEV_ERROR_DETECT == STD_ON)
/* Check if the ADC Module is not initialised */
if(Adc_GblDriverStatus == ADC_FALSE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_READ_GROUP_SID, ADC_E_UNINIT);
}
/* Check if the requested group is invalid */
else if(Group >= ADC_MAX_GROUPS)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_READ_GROUP_SID, ADC_E_PARAM_GROUP);
}
else if(Adc_GpGroupRamData[Group].ddGroupStatus == ADC_IDLE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_READ_GROUP_SID, ADC_E_IDLE);
}
else
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
{
/* Read the hardware unit of the group */
LpGroup = &Adc_GpGroupConfig[Group];
/* Read the Hardware Unit to which the group belongs */
LddHwUnit = LpGroup->ucHwUnit;
/* Get the CGm unit to which the channel group is mapped */
LucHwCGUnit = LpGroup->ucHwCGUnit;
/* Read the group data pointer */
LpRunTimeData =
&Adc_GpRunTimeData[(LddHwUnit * ADC_NUMBER_OF_CG_UNITS) + LucHwCGUnit];
/* Get the base address of the Group buffer */
LpChannelBuffer = Adc_GpGroupRamData[Group].pChannelBuffer;
/* Get the number of samples configured for the group */
LucNoOfSamples = LpGroup->ddNumberofSamples;
if(LpGroup->ddGroupAccessMode == ADC_ACCESS_MODE_STREAMING)
{
/* Get the number of samples completed in the requested group */
LucLoopCount = LpRunTimeData->ucSamplesCompleted;
}
/* Initialise the pointer to the latest sample of the first channel */
LpChannelBuffer = &LpChannelBuffer[LucLoopCount - ADC_ONE];
/* Initialise the loop count to zero */
LucLoopCount = ADC_ZERO;
do
{
/* Load the converted values to the application buffer */
DataBufferPtr[LucLoopCount] =
LpChannelBuffer[LucLoopCount * LucNoOfSamples];
/* Increment to the next buffer index */
LucLoopCount++;
}
while(LucLoopCount < LpGroup->ucChannelCount);
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter the critical section protection */
SchM_Enter_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* Change the group status of the group whose values are read */
Adc_StateTransition(Group);
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit the critical section protection */
SchM_Exit_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Set the flag indicating result data is read */
Adc_GpGroupRamData[Group].blResultRead = ADC_TRUE;
/* Update the return value */
LddReadStatus = E_OK;
}
return(LddReadStatus);
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* ADC_READ_GROUP_API == STD_ON */
#if (ADC_HW_TRIGGER_API == STD_ON)
/*******************************************************************************
** Function Name : Adc_EnableHardwareTrigger
**
** Service ID : 0x05
**
** Description : This API service will enable the hardware trigger
** for the requested ADC Channel group.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : Group
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The ADC Driver must be initialised first by invoking
** API Adc_Init().
**
** Remarks : Global Variable(s):
** Adc_GblDriverStatus, Adc_GpHwUnitConfig,
** Adc_GpGroupConfig, Adc_GpConfigPtr,
** Adc_GpGroupRamData, Adc_GucMaxSwTriggGroups
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, ADC_PUBLIC_CODE) Adc_EnableHardwareTrigger(Adc_GroupType Group)
{
#if(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW)
P2VAR(Tdd_Adc_RunTimeData, AUTOMATIC,ADC_CONFIG_DATA) LpRunTimeData;
#endif /* #if(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))
/* Pointer to the hardware unit user base configuration address */
P2VAR(Tdd_AdcConfigUserRegisters, AUTOMATIC,ADC_CONFIG_DATA)
LpAdcUserRegisters;
/* Local variable to store the hardware unit number */
Adc_HwUnitType LddHwUnit;
/* Local variable to store the CGm unit number */
uint8 LucHwCGUnit;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE)) */
#if(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW)
Adc_GroupType LddCurrentGroup;
#endif /* #if(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) */
#if(ADC_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
#if(ADC_DEV_ERROR_DETECT == STD_ON)
/* Initialize error status flag to false */
LblDetErrFlag = ADC_FALSE;
/* Check if the ADC Module is not initialised */
if(Adc_GblDriverStatus == ADC_FALSE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_ENABLE_HARWARE_TRIGGER_SID, ADC_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
/* Check if the requested group is invalid */
else if(Group >= ADC_MAX_GROUPS)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_ENABLE_HARWARE_TRIGGER_SID, ADC_E_PARAM_GROUP);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
else
{
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))
/* Read the Hardware Unit to which the group belongs */
LddHwUnit = Adc_GpGroupConfig[Group].ucHwUnit;
/* Read the user base configuration address of the hardware unit */
LpAdcUserRegisters = Adc_GpHwUnitConfig[LddHwUnit].pUserBaseAddress;
/* Get the CGm unit to which the channel group is mapped */
LucHwCGUnit = Adc_GpGroupConfig[Group].ucHwCGUnit;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE)) */
/* Check if requested group is SW triggered group */
if(Group < Adc_GucMaxSwTriggGroups)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_ENABLE_HARWARE_TRIGGER_SID, ADC_E_WRONG_TRIGG_SRC);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
#if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE)
/* Check if HW unit is busy */
if(((LpAdcUserRegisters->ulADCAnSTR2 & Adc_GaaCGmConvStatusMask[LucHwCGUnit])
!= ADC_ZERO) || \
(Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] == ADC_TRUE))
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_ENABLE_HARWARE_TRIGGER_SID, ADC_E_BUSY);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
#endif /* #if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) */
/* Check if the group is already enabled */
if(Adc_GpGroupRamData[Group].ucHwTriggStatus == ADC_TRUE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_ENABLE_HARWARE_TRIGGER_SID, ADC_E_BUSY);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
/* Check if result buffer is initialized for requested group */
if(Adc_GpGroupRamData[Group].ucBufferStatus == ADC_FALSE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_ENABLE_HARWARE_TRIGGER_SID, ADC_E_BUFFER_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
}
/* Check if any DET was reported */
if(LblDetErrFlag == ADC_FALSE)
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
{
/* Check if the priority is ADC_PRIORITY_HW or ADC_PRIORITY_HW_SW */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
Adc_EnableHWGroup(Group);
#elif ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))
#if (ADC_DEV_ERROR_DETECT == STD_OFF)
/* Read the Hardware Unit to which the group belongs */
LddHwUnit = Adc_GpGroupConfig[Group].ucHwUnit;
/* Read the user base configuration address of the hardware unit */
LpAdcUserRegisters = Adc_GpHwUnitConfig[LddHwUnit].pUserBaseAddress;
/* Get the CGm unit to which the channel group is mapped */
LucHwCGUnit = Adc_GpGroupConfig[Group].ucHwCGUnit;
#endif /* #if (ADC_DEV_ERROR_DETECT == STD_OFF) */
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
if(((LpAdcUserRegisters->ulADCAnSTR2 &
Adc_GaaCGmConvStatusMask[LucHwCGUnit]) == ADC_ZERO) || \
(Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] == ADC_TRUE))
{
Adc_EnableHWGroup(Group);
}
#if(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW)
else if(Adc_GpHwUnitRamData[LddHwUnit].ddCurrentPriority[LucHwCGUnit] <
Adc_GpGroupConfig[Group].ddGroupPriority)
{
/* Fetch the group id of the current conversion group */
LddCurrentGroup =
Adc_GpHwUnitRamData[LddHwUnit].ddCurrentConvGroup[LucHwCGUnit];
/* Check if the current ongoing conversion is of SW triggered group */
if(Adc_GpHwUnitRamData[LddHwUnit].ddTrigSource == ADC_TRIGG_SRC_SW)
{
/* Check if the queue is full */
if(Adc_GpHwUnitRamData[LddHwUnit].ucQueueStatus != ADC_QUEUE_FULL)
{
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter the critical section protection */
SchM_Enter_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* Stop the conversion of the channel group */
LpAdcUserRegisters->ucADCAnTRG4[LucHwCGUnit * ADC_FOUR] =
ADC_STOP_CONVERSION;
/* Push the current conversion group into queue */
Adc_PushToQueue(LddCurrentGroup);
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter the critical section protection */
SchM_Exit_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* Read the group data pointer */
LpRunTimeData = &Adc_GpRunTimeData
[(LddHwUnit * ADC_NUMBER_OF_CG_UNITS) + LucHwCGUnit];
/* Check if the group as to be resumed from where it had stopped
before */
if(Adc_GpGroupConfig[LddCurrentGroup].ddGroupReplacement ==
ADC_GROUP_REPL_SUSPEND_RESUME)
{
/* Load the number of channels converted before suspension */
Adc_GpGroupRamData[LddCurrentGroup].ucReChannelsCompleted =
LpRunTimeData->ucChannelsCompleted;
}
/* Load the number of samples converted before aborting or
suspension */
Adc_GpGroupRamData[LddCurrentGroup].ucReSamplesCompleted =
LpRunTimeData->ucSamplesCompleted;
/* Configure the requested group for conversion */
Adc_EnableHWGroup(Group);
}
#if(ADC_DEV_ERROR_DETECT == STD_ON)
else
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_ENABLE_HARWARE_TRIGGER_SID, ADC_E_BUSY);
}
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
}
else
{
Adc_DisableHWGroup(LddCurrentGroup);
Adc_EnableHWGroup(Group);
}
}
#endif /* #if(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) */
else
{
#if(ADC_DEV_ERROR_DETECT == STD_ON)
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_ENABLE_HARWARE_TRIGGER_SID, ADC_E_BUSY);
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
}
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
}
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* ADC_HW_TRIGGER_API == STD_ON */
#if (ADC_HW_TRIGGER_API == STD_ON)
/*******************************************************************************
** Function Name : Adc_DisableHardwareTrigger
**
** Service ID : 0x06
**
** Description : This API service will disables the hardware trigger
** for the requested ADC Channel group.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : Group
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The ADC Driver must be initialised first by invoking
** API Adc_Init().
**
** Remarks : Global Variable(s):
** Adc_GblDriverStatus, Adc_GpHwUnitConfig,
** Adc_GpGroupRamData, Adc_GucMaxSwTriggGroups
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, ADC_PUBLIC_CODE) Adc_DisableHardwareTrigger(Adc_GroupType Group)
{
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
Adc_HwUnitType LddHwUnit;
volatile uint8 LucHwCGUnit;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON))) */
#if(ADC_DEV_ERROR_DETECT == STD_ON)
/* Check if the ADC Module is not initialised */
if(Adc_GblDriverStatus == ADC_FALSE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_DISABLE_HARWARE_TRIGGER_SID, ADC_E_UNINIT);
}
/* Check if the requested group is invalid */
else if(Group >= ADC_MAX_GROUPS)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_DISABLE_HARWARE_TRIGGER_SID, ADC_E_PARAM_GROUP);
}
/* Check if requested group is SW triggered group */
else if(Group < Adc_GucMaxSwTriggGroups)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_DISABLE_HARWARE_TRIGGER_SID, ADC_E_WRONG_TRIGG_SRC);
}
/* Check if HW trigger was enabled for requested group */
else if(Adc_GpGroupRamData[Group].ucHwTriggStatus == ADC_FALSE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_DISABLE_HARWARE_TRIGGER_SID, ADC_E_IDLE);
}
else
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
{
if(Adc_GpGroupRamData[Group].ucHwTriggStatus == ADC_TRUE)
{
/* Disable the ongoing HW triggered group */
Adc_DisableHWGroup(Group);
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
/* Read the Hardware Unit to which the group belongs */
LddHwUnit = Adc_GpGroupConfig[Group].ucHwUnit;
/* Fetch the next group for conversion if the queue is not empty */
if(Adc_GpHwUnitRamData[LddHwUnit].ucQueueStatus != ADC_QUEUE_EMPTY)
{
#if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW)
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Set the flag indicating the group is popped out of the queue */
Adc_GucPopFrmQueue |= (ADC_ONE << LddHwUnit);
#endif /* #if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) */
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter the critical section protection */
SchM_Enter_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* Set the Global variable indicating the HW unit is busy */
Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] = ADC_TRUE;
Adc_ConfigureGroupForConversion(Adc_PopFromQueue(LddHwUnit));
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit the critical section protection */
SchM_Exit_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
}
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON))) */
}
}
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* ADC_HW_TRIGGER_API == STD_ON */
#if (ADC_GRP_NOTIF_CAPABILITY == STD_ON)
/*******************************************************************************
** Function Name : Adc_EnableGroupNotification
**
** Service ID : 0x07
**
** Description : This API service will enable the ADC Driver
** notification of the requested channel group.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : Group
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The ADC Driver must be initialised first by invoking
** API Adc_Init().
**
** Remarks : Global Variable(s):
** Adc_GblDriverStatus, Adc_GpGroupRamData
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, ADC_PUBLIC_CODE) Adc_EnableGroupNotification(Adc_GroupType Group)
{
#if(ADC_DEV_ERROR_DETECT == STD_ON)
/* Check if the ADC Module is not initialised */
if(Adc_GblDriverStatus == ADC_FALSE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_ENABLE_GROUP_NOTIFICATION_SID, ADC_E_UNINIT);
}
/* Check if the requested group is invalid */
else if(Group >= ADC_MAX_GROUPS)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_ENABLE_GROUP_NOTIFICATION_SID, ADC_E_PARAM_GROUP);
}
else if(Adc_GstChannelGrpFunc[Group].pGroupNotificationPointer == NULL_PTR)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_ENABLE_GROUP_NOTIFICATION_SID, ADC_E_NOTIF_CAPABILITY);
}
else
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
{
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter the critical section protection */
SchM_Enter_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* Store the enabled notification into RAM */
Adc_GpGroupRamData[Group].ucNotifyStatus = ADC_TRUE;
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit the critical section protection */
SchM_Exit_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
}
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* ADC_GRP_NOTIF_CAPABILITY == STD_ON */
#if (ADC_GRP_NOTIF_CAPABILITY == STD_ON)
/*******************************************************************************
** Function Name : Adc_DisableGroupNotification
**
** Service ID : 0x08
**
** Description : This API service will disable the ADC Driver
** notification of the requested channel group.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : Group
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : The ADC Driver must be initialised first by invoking
** API Adc_Init().
**
** Remarks : Global Variable(s):
** Adc_GblDriverStatus, Adc_GpGroupRamData
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, ADC_PUBLIC_CODE) Adc_DisableGroupNotification(Adc_GroupType Group)
{
#if(ADC_DEV_ERROR_DETECT == STD_ON)
/* Check if the ADC Module is not initialised */
if(Adc_GblDriverStatus == ADC_FALSE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_DISABLE_GROUP_NOTIFICATION_SID, ADC_E_UNINIT);
}
/* Check if the requested group is invalid */
else if(Group >= ADC_MAX_GROUPS)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_DISABLE_GROUP_NOTIFICATION_SID, ADC_E_PARAM_GROUP);
}
else if(Adc_GstChannelGrpFunc[Group].pGroupNotificationPointer == NULL_PTR)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_DISABLE_GROUP_NOTIFICATION_SID, ADC_E_NOTIF_CAPABILITY);
}
else
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
{
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter the critical section protection */
SchM_Enter_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* Store the disabled notification into RAM */
Adc_GpGroupRamData[Group].ucNotifyStatus = ADC_FALSE;
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit the critical section protection */
SchM_Exit_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
}
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* ADC_GRP_NOTIF_CAPABILITY == STD_ON */
/*******************************************************************************
** Function Name : Adc_GetGroupStatus
**
** Service ID : 0x09
**
** Description : This API service shall return the conversion status of
** requested ADC Channel group.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : Group
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Adc_StatusType
**
** Preconditions : The ADC Driver must be initialised first by invoking
** API Adc_Init().
**
** Remarks : Global Variable(s):
** Adc_GblDriverStatus, Adc_GpGroupRamData
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(Adc_StatusType, ADC_PUBLIC_CODE) Adc_GetGroupStatus(Adc_GroupType Group)
{
/* Local variable to store the group status */
Adc_StatusType LddGroupStatus;
#if(ADC_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
/* Default value that to be returned in case of error */
LddGroupStatus = ADC_IDLE;
#if(ADC_DEV_ERROR_DETECT == STD_ON)
/* Initialize error status flag to false */
LblDetErrFlag = ADC_FALSE;
/* Check if the ADC Module is not initialised */
if(Adc_GblDriverStatus == ADC_FALSE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_GET_GROUP_STATUS_SID, ADC_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
/* Check if the requested group is invalid */
if(Group >= ADC_MAX_GROUPS)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_GET_GROUP_STATUS_SID, ADC_E_PARAM_GROUP);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
/* Check if any DET was reported */
if(LblDetErrFlag == ADC_FALSE)
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
{
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter the critical section protection */
SchM_Enter_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* Read the group status */
LddGroupStatus = Adc_GpGroupRamData[Group].ddGroupStatus;
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit the critical section protection */
SchM_Exit_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
}
return(LddGroupStatus);
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Adc_GetStreamLastPointer
**
** Service ID : 0x0B
**
** Description : This API service shall return the pointer to the last
** converted value for the group configured in streaming
** access mode.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : Group
**
** InOut Parameters : None
**
** Output Parameters : PtrToSamplePtr (pointer of Adc_ValueGroupType)
**
** Return parameter : Adc_StreamNumSampleType
**
** Preconditions : The ADC Driver must be initialised first by invoking
** API Adc_Init().
**
** Remarks : Global Variable(s):
** Adc_GblDriverStatus, Adc_GpGroupConfig,
** Adc_GpGroupRamData
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(Adc_StreamNumSampleType, ADC_PUBLIC_CODE) Adc_GetStreamLastPointer
(Adc_GroupType Group, P2VAR(P2VAR(Adc_ValueGroupType,
AUTOMATIC, ADC_CONFIG_DATA), AUTOMATIC,ADC_CONFIG_DATA) PtrToSamplePtr)
{
P2CONST(Tdd_Adc_GroupConfigType, AUTOMATIC, ADC_CONFIG_CONST) LpGroup;
P2VAR(uint16, AUTOMATIC,ADC_CONFIG_DATA) LpBuffer;
P2VAR(Tdd_Adc_RunTimeData, AUTOMATIC,ADC_CONFIG_DATA) LpRunTimeData;
Adc_StreamNumSampleType LddSampleCount;
Adc_HwUnitType LddHwUnit;
uint8 LucHwCGUnit;
uint8 LucNumofChannels;
/* Default value to be returned in case of error */
*PtrToSamplePtr = NULL_PTR;
LddSampleCount = ADC_ZERO;
#if(ADC_DEV_ERROR_DETECT == STD_ON)
/* Check if the ADC Module is not initialised */
if(Adc_GblDriverStatus == ADC_FALSE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_GET_STREAM_LAST_POINTER_SID, ADC_E_UNINIT);
}
/* Check if the requested group is invalid */
else if(Group >= ADC_MAX_GROUPS)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_GET_STREAM_LAST_POINTER_SID, ADC_E_PARAM_GROUP);
}
else if(Adc_GpGroupRamData[Group].ddGroupStatus == ADC_IDLE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_GET_STREAM_LAST_POINTER_SID, ADC_E_IDLE);
}
else
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
{
if((Adc_GpGroupRamData[Group].ddGroupStatus == ADC_COMPLETED) ||
(Adc_GpGroupRamData[Group].ddGroupStatus == ADC_STREAM_COMPLETED))
{
/* Read the hardware unit of the group */
LpGroup = &Adc_GpGroupConfig[Group];
/* Read the Hardware Unit to which the group belongs */
LddHwUnit = LpGroup->ucHwUnit;
/* Read the configured number of samples for the group */
LddSampleCount = LpGroup->ddNumberofSamples;
/* Read the base pointer of the streaming group */
LpBuffer = Adc_GpGroupRamData[Group].pChannelBuffer;
/* Read the number of channels in the group */
LucNumofChannels = LpGroup->ucChannelCount;
/* Load the pointer of the last converted value */
*PtrToSamplePtr =
&LpBuffer[((LddSampleCount * LucNumofChannels) - ADC_ONE)];
/* Get the CGm unit to which the channel group is mapped */
LucHwCGUnit = LpGroup->ucHwCGUnit;
/* Read the group data pointer */
LpRunTimeData =
&Adc_GpRunTimeData[(LddHwUnit * ADC_NUMBER_OF_CG_UNITS) + LucHwCGUnit];
/* Get the number of samples completed for the requested group */
LddSampleCount = LpRunTimeData->ucSamplesCompleted;
/* Check if the group is configured for DMA access */
if(LpGroup->ucResultAccessMode == ADC_DMA_ACCESS)
{
/* Update the return value to one */
LddSampleCount = ADC_ONE;
}
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter the critical section protection */
SchM_Enter_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* Change the group status of the group whose values are read */
Adc_StateTransition(Group);
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit the critical section protection */
SchM_Exit_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Set the flag indicating result data is read */
Adc_GpGroupRamData[Group].blResultRead = ADC_TRUE;
}
}
/* Return the number of samples */
return(LddSampleCount);
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Adc_SetupResultBuffer
**
** Service ID : 0x0C
**
** Description : Initializes the group specific ADC result buffer
** pointer as configured to point to the DataBufferPtr.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : Group and DataBufferPtr
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Std_ReturnType
**
** Preconditions : The ADC Driver must be initialised first by invoking
** API Adc_Init().
**
** Remarks : Global Variable(s):
** Adc_GblDriverStatus
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(Std_ReturnType, ADC_PUBLIC_CODE) Adc_SetupResultBuffer
(Adc_GroupType Group,
P2VAR(Adc_ValueGroupType, AUTOMATIC, ADC_APPL_CONST) DataBufferPtr)
{
Std_ReturnType LddSetupStatus;
#if(ADC_DEV_ERROR_DETECT == STD_ON)
boolean LblDetErrFlag;
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
/* Initialise the return value */
LddSetupStatus = E_NOT_OK;
#if (ADC_DEV_ERROR_DETECT == STD_ON)
/* Initialize error status flag to false */
LblDetErrFlag = ADC_FALSE;
/* Check if the ADC Module is not initialised */
if(Adc_GblDriverStatus == ADC_FALSE)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_SETUP_RESULT_BUFFER_SID, ADC_E_UNINIT);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
/* Check if the Group requested is valid */
if(Group >= ADC_MAX_GROUPS)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_SETUP_RESULT_BUFFER_SID, ADC_E_PARAM_GROUP);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
if(DataBufferPtr == NULL_PTR)
{
/* Report Error to DET */
Det_ReportError(ADC_MODULE_ID, ADC_INSTANCE_ID,
ADC_SETUP_RESULT_BUFFER_SID, ADC_E_PARAM_POINTER);
/* Set error status flag to true */
LblDetErrFlag = ADC_TRUE;
}
/* Check if any DET was reported */
if(LblDetErrFlag == ADC_FALSE)
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
{
/* Initialise the group result buffer pointer with the address passed */
Adc_GpGroupRamData[Group].pChannelBuffer = DataBufferPtr;
#if (ADC_DEV_ERROR_DETECT == STD_ON)
/* Set the buffer initialization status */
Adc_GpGroupRamData[Group].ucBufferStatus = ADC_TRUE;
#endif /* #if(ADC_DEV_ERROR_DETECT == STD_ON) */
/* Update the return value */
LddSetupStatus = E_OK;
}
return(LddSetupStatus);
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Can/Can_Irq.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Can_Irq.h */
/* Version = 3.0.6a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2008-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* C header file for Can_Irq.c */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12.12.2008 : Initial Version
* V3.0.1: 14.10.2009 : Updated for changes in wake-up support as per
* SCR ANMCANLINFR3_SCR_031.
* V3.0.2: 30.10.2009 : Memory section has been updated as per the SCR
* ANMCANLINFR3_SCR_037.
* V3.0.3: 21.04.2010 : As per ANMCANLINFR3_SCR_056, provision for Tied Wakeup
* interrupts is added.
* V3.0.4: 30.06.2010 : As per ANMCANLINFR3_SCR_067, file is updated to
* support and ISR Category support configurable by a
* pre-compile option.
* V3.0.5: 08.07.2010 : As per ANMCANLINFR3_SCR_068, ISR Category options are
* updated from MODE to TYPE.
* V3.0.6: 12.09.2010 : As per ANMCANLINFR3_SCR_085, extern declaration of
* ISRs are updated for channel 3,4 and 5.
* V3.0.6a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
#ifndef CAN_IRQ_H
#define CAN_IRQ_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Can.h" /* CAN Module Header File */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define CAN_IRQ_AR_MAJOR_VERSION 2
#define CAN_IRQ_AR_MINOR_VERSION 2
#define CAN_IRQ_AR_PATCH_VERSION 2
/* File version information */
#define CAN_IRQ_SW_MAJOR_VERSION 3
#define CAN_IRQ_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
/* The default option for ISR Category MCAL_ISR_TYPE_TOOLCHAIN */
#ifndef CAN_INTERRUPT_TYPE
#define CAN_INTERRUPT_TYPE MCAL_ISR_TYPE_TOOLCHAIN
#endif
#if (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER0_RX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER1_RX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER2_RX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER3_RX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER4_RX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER5_RX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER0_TX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER1_TX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER2_TX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER3_TX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER4_TX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER5_TX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER0_BUSOFF_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER1_BUSOFF_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER2_BUSOFF_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER3_BUSOFF_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER4_BUSOFF_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER5_BUSOFF_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#if (CAN_WAKEUP_INTERRUPTS_TIED == TRUE)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_WAKEUP_TXCANCEL_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#else
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_WAKEUP0_TXCANCEL_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_WAKEUP1_TXCANCEL_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_WAKEUP2_TXCANCEL_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_WAKEUP3_TXCANCEL_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_WAKEUP4_TXCANCEL_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern _INTERRUPT_ FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_WAKEUP5_TXCANCEL_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
/* Use OS */
#include "Os.h"
#elif (CAN_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER0_RX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER1_RX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER2_RX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER3_RX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER4_RX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER5_RX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER0_TX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER1_TX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER2_TX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER3_TX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER4_TX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER5_TX_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER0_BUSOFF_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER1_BUSOFF_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER2_BUSOFF_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER3_BUSOFF_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER4_BUSOFF_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_CONTROLLER5_BUSOFF_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#if (CAN_WAKEUP_INTERRUPTS_TIED == TRUE)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_WAKEUP_TXCANCEL_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#else
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_WAKEUP0_TXCANCEL_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_WAKEUP1_TXCANCEL_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_WAKEUP2_TXCANCEL_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_WAKEUP3_TXCANCEL_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_WAKEUP4_TXCANCEL_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
extern FUNC(void, CAN_AFCAN_PUBLIC_CODE)
CAN_WAKEUP5_TXCANCEL_ISR(void);
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
#else
#error "CAN_INTERRUPT_TYPE not set."
#endif
#endif /* CAN_IRQ_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Pwm/Pwm_Ram.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Pwm_Ram.h */
/* Version = 3.1.2 */
/* Date = 06-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Global variable declarations. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 18-Aug-2009 : Initial version
* V3.0.1: 02-Jul-2010 : As per SCR 290, following changes are made:
* 1. The global variable "Pwm_GpConfigPtr" is removed.
* 2. The name of the variable "Pwm_GpTAUAUnitConfig" is
* updated to "Pwm_GpTAUABCUnitConfig".
* 3. Precompile option is updated for the pointer
* variable "Pwm_GpTAUABCUnitConfig".
* V3.1.0: 26-Jul-2011 : Ported for the DK4 variant.
* V3.1.1: 05-Mar-2012 : Merged the fixes done for Fx4L PWM driver
* V3.1.2: 06-Jun-2012 : As per SCR 034, Compiler version is removed from
* Environment section.
*/
/******************************************************************************/
#ifndef PWM_RAM_H
#define PWM_RAM_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Pwm.h"
#include "Pwm_LTTypes.h"
#include "Pwm_PBTypes.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define PWM_RAM_AR_MAJOR_VERSION PWM_AR_MAJOR_VERSION_VALUE
#define PWM_RAM_AR_MINOR_VERSION PWM_AR_MINOR_VERSION_VALUE
#define PWM_RAM_AR_PATCH_VERSION PWM_AR_PATCH_VERSION_VALUE
/* File version information */
#define PWM_RAM_SW_MAJOR_VERSION 3
#define PWM_RAM_SW_MINOR_VERSION 1
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (PWM_SW_MAJOR_VERSION != PWM_RAM_SW_MAJOR_VERSION)
#error "Pwm_Ram.h : Mismatch in Major Version"
#endif
#if (PWM_SW_MINOR_VERSION != PWM_RAM_SW_MINOR_VERSION)
#error "Pwm_Ram.h : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Variables **
*******************************************************************************/
#define PWM_START_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
#if ((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
/* Global pointer variable for TAUA/TAUB/TAUC Unit configuration */
extern P2CONST(Tdd_Pwm_TAUABCUnitConfigType, PWM_CONST, PWM_CONFIG_CONST)
Pwm_GpTAUABCUnitConfig;
#endif
#if(PWM_TAUJ_UNIT_USED == STD_ON)
/* Global pointer variable for TAUJ Unit configuration */
extern P2CONST(Tdd_Pwm_TAUJUnitConfigType, PWM_CONST, PWM_CONFIG_CONST)
Pwm_GpTAUJUnitConfig;
#endif
/* Global pointer variable for channel configuration */
extern P2CONST(Tdd_Pwm_ChannelConfigType, PWM_CONST, PWM_CONFIG_CONST)
Pwm_GpChannelConfig;
#if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON)
/* Global pointer variable for synch start configuration */
extern P2CONST(Tdd_PwmTAUSynchStartUseType, PWM_CONST, PWM_CONFIG_CONST)
Pwm_GpSynchStartConfig;
#endif
/* Global pointer variable for channel to timer mapping */
extern P2CONST(uint8, PWM_CONST, PWM_CONFIG_CONST) Pwm_GpChannelTimerMap;
#if(PWM_NOTIFICATION_SUPPORTED == STD_ON)
/* Global pointer variable for Notification status array */
extern P2VAR(uint8, AUTOMATIC, PWM_CONFIG_DATA) Pwm_GpNotifStatus;
#endif
/* Global pointer variable for for Idle state status for configured channels */
extern P2VAR(uint8, AUTOMATIC, PWM_CONFIG_DATA) Pwm_GpChannelIdleStatus;
#define PWM_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
#define PWM_START_SEC_VAR_1BIT
#include "MemMap.h"
#if (PWM_DEV_ERROR_DETECT == STD_ON)
/* Status of PWM Driver initialization */
extern VAR(boolean, PWM_INIT_DATA) Pwm_GblDriverStatus;
#endif
#define PWM_STOP_SEC_VAR_1BIT
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* PWM_RAM_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Wdg/Wdg_23_DriverB_PBTypes.h
/*============================================================================*/
/* Project = AUTOSAR NEC Xx4 MCAL Components */
/* Module = Wdg_23_DriverB_PBTypes.h */
/* Version = 3.0.2 */
/* Date = 06-Mar-2010 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009 by NEC Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains the type definitions of Post Build time Parameters */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* NEC Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by NEC. Any warranty */
/* is expressly disclaimed and excluded by NEC, either expressed or implied, */
/* including but not limited to those for non-infringement of intellectual */
/* property, merchantability and/or fitness for the particular purpose. */
/* */
/* NEC shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall NEC be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. NEC shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by NEC in connection with the Product(s) and/or the */
/* Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/* Compiler: GHS V5.1.6c */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12-Jun-2009 : Initial version
*
* V3.0.1: 14-Jul-2009 : As per SCR 015, compiler version is changed from
* V5.0.5 to V5.1.6c in the header of the file.
*
* V3.0.2: 06-Mar-2010 : As per SCR 219, the macros WDG_FALSE and WDG_TRUE
* are added.
*/
/******************************************************************************/
#ifndef WDG_23_DRIVERB_PBTYPES_H
#define WDG_23_DRIVERB_PBTYPES_H
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Wdg_23_DriverB.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define WDG_23_DRIVERB_PBTYPES_AR_MAJOR_VERSION 2
#define WDG_23_DRIVERB_PBTYPES_AR_MINOR_VERSION 2
#define WDG_23_DRIVERB_PBTYPES_AR_PATCH_VERSION 0
/* File version information */
#define WDG_23_DRIVERB_PBTYPES_SW_MAJOR_VERSION 3
#define WDG_23_DRIVERB_PBTYPES_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Type definition for trigger mode */
#define WDG_WINDOW 1
/* General defines */
#define WDG_23_DRIVERB_DBTOC_VALUE \
((WDG_23_DRIVERB_VENDOR_ID_VALUE << 22) | \
(WDG_23_DRIVERB_MODULE_ID_VALUE << 14) | \
(WDG_23_DRIVERB_SW_MAJOR_VERSION_VALUE << 8) | \
(WDG_23_DRIVERB_SW_MINOR_VERSION_VALUE << 3))
/* Value to be written to WDTAWDTE / WDTAEVAC register for stopping the
watchdog timer */
#define WDG_23_DRIVERB_STOP (uint8)0x2C
/* Value to be written to WDTAWDTE / WDTAEVAC register to clear and restart
the timer */
#define WDG_23_DRIVERB_RESTART (uint8)0xAC
#define WDG_FALSE (boolean)0x00
#define WDG_TRUE (boolean)0x01
#if(WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON)
/* Type defintion for the current state of Watchdog Driver */
typedef enum
{
WDG_UNINIT = 0,
WDG_IDLE,
WDG_BUSY
}Wdg_23_DriverB_StatusType;
#endif /* WDG_23_DRIVERB_DEV_ERROR_DETECT == STD_ON */
#endif /* WDG_23_DRIVERB_PBTYPES_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/Include/SchM_CanTrcv_30_Tja1145.h
#ifndef SCHM_CANIF_H
#define SCHM_CANIF_H
#include "SchM.h"
#include "SchM_Types.h"
#include "SchM_Cfg.h"
#define CANTRCV_30_TJA1145_EXCLUSIVE_AREA_0 SCHM_EA_SUSPENDALLINTERRUPTS
#define SCHM_CANTRCV_30_TJA1145_EXCLUSIVE_INSTANCE_0 (0u)
# define SchM_Enter_CanTrcv_30_Tja1145(ExclusiveArea) \
SCHM_ENTER_EXCLUSIVE(ExclusiveArea)
# define SchM_Exit_CanTrcv_30_Tja1145(ExclusiveArea) \
SCHM_EXIT_EXCLUSIVE(ExclusiveArea)
#endif /* SCHM_CANIF_H */
/* STOPSINGLE_OF_MULTIPLE */
/************ Organi, Version 3.9.0 Vector-Informatik GmbH ************/
<file_sep>/BSP/MCAL/Can/Can_ModeCntrl.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Can_ModeCntrl.c */
/* Version = 3.0.5a */
/* Date = 27.10.2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2008-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of Controller Mode Control Functionality. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12.12.2008 : Initial Version
* V3.0.1: 10.10.2009 : Updated for changes in wake-up support as per
* SCR ANMCANLINFR3_SCR_031.
* V3.0.2: 21.04.2010 : As per ANMCANLINFR3_SCR_056,
* 1. Provision for Tied Wakeup interrupts is added.
* 2. Clearing of power save mode is ensured by
* checking MBON bit status.
* V3.0.3: 28.07.2010 : Timeout count is added in Can_StartMode as per
* SCR ANMCANLINFR3_SCR_077.
* V3.0.4: 14.03.2011 : Bus-Off flag check is updated in "Can_StartMode"
* as per ANMCANLINFR3_SCR_096.
* V3.0.5: 20.06.2011 : TimeoutCount assignment is moved to outside if loop
* in "Can_StopMode" as per ANMCANLINFR3_SCR_107.
* V3.0.5a: 27.10.2011 : 1. Copyright is updated.
* 2.Pointer-operation and clearing Interrupt Request
* Flag are updated in "Can_StopMode" as per MTS #3641.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Can_PBTypes.h" /* CAN Driver Post-Build Config. Header File */
#include "Can_ModeCntrl.h" /* CAN Mode Control Header File */
#include "Can_Int.h" /* CAN Interrupt Control Header File */
#include "Can_Ram.h" /* CAN Driver RAM Header File */
#include "Can_Tgt.h" /* CAN Driver Target Header File */
#include "Dem.h" /* DEM Header File */
#if (CAN_DEV_ERROR_DETECT == STD_ON)
#include "Det.h" /* DET Header File */
#endif
#include "SchM_Can.h" /* Scheduler Header File */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define CAN_MODECNTRL_C_AR_MAJOR_VERSION 2
#define CAN_MODECNTRL_C_AR_MINOR_VERSION 2
#define CAN_MODECNTRL_C_AR_PATCH_VERSION 2
/* File version information */
#define CAN_MODECNTRL_C_SW_MAJOR_VERSION 3
#define CAN_MODECNTRL_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (CAN_MODECNTRL_AR_MAJOR_VERSION != CAN_MODECNTRL_C_AR_MAJOR_VERSION)
#error "Can_ModeCntrl.c : Mismatch in Specification Major Version"
#endif
#if (CAN_MODECNTRL_AR_MINOR_VERSION != CAN_MODECNTRL_C_AR_MINOR_VERSION)
#error "Can_ModeCntrl.c : Mismatch in Specification Minor Version"
#endif
#if (CAN_MODECNTRL_AR_PATCH_VERSION != CAN_MODECNTRL_C_AR_PATCH_VERSION)
#error "Can_ModeCntrl.c : Mismatch in Specification Patch Version"
#endif
#if (CAN_MODECNTRL_SW_MAJOR_VERSION != CAN_MODECNTRL_C_SW_MAJOR_VERSION)
#error "Can_ModeCntrl.c : Mismatch in Software Major Version"
#endif
#if (CAN_MODECNTRL_SW_MINOR_VERSION != CAN_MODECNTRL_C_SW_MINOR_VERSION)
#error "Can_ModeCntrl.c : Mismatch in Software Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
#define CAN_AFCAN_START_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
CONST(Tdd_Can_AFCan_ModeFuncPtr, CAN_AFCAN_PRIVATE_CONST)
Can_GstModeFuncPtr[CAN_FOUR] =
{
{
Can_StartMode
},
{
Can_StopMode
},
{
Can_SleepMode
},
{
Can_WakeupMode
}
};
#define CAN_AFCAN_STOP_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Can_SetControllerMode
**
** Service ID : 0x03
**
** Description : This service calls the corresponding CAN Driver service
** for changing the CAN Controller Mode. It initiates a
** transition to the requested CAN Controller Mode.
**
** Sync/Async : Asynchronous
**
** Re-entrancy : Non Re-entrant
**
** Input Parameters : Controller, Transition
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Can_ReturnType (CAN_OK / CAN_NOT_OK)
**
** Preconditions : The CAN Driver must be initialized and during the
** function executes the Wake-up interrupt must be disabled
** so that the Wake-up status can be checked inside this
** function.
**
** Remarks : Global Variable(s) referred in this function:
** Can_GblCanStatus, Can_GpCntrlIdArray,
** Can_GpFirstController, Can_GstModeFuncPtr,
** Can_GucLastCntrlId
**
** : Function(s) invoked:
** Det_ReportError()
**
*******************************************************************************/
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(Can_ReturnType, CAN_AFCAN_PUBLIC_CODE) Can_SetControllerMode
(uint8 Controller, Can_StateTransitionType Transition)
{
P2CONST(Can_ControllerConfigType,AUTOMATIC,
CAN_AFCAN_PRIVATE_CONST) LpController;
Can_ReturnType LenCanReturnType;
#if (CAN_DEV_ERROR_DETECT == STD_ON)
uint8 LucCurrentMode;
#endif
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Initialize CanReturnType to CAN_OK */
LenCanReturnType = CAN_OK;
/* Report to DET, if module is not initialized */
if (Can_GblCanStatus == CAN_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_SET_MODECNTRL_SID,CAN_E_UNINIT);
/* Set CanReturnType to CAN_NOT_OK */
LenCanReturnType = CAN_NOT_OK;
}
/* Report to DET, if the Controller Id is out of range */
else if(Controller > Can_GucLastCntrlId)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_SET_MODECNTRL_SID, CAN_E_PARAM_CONTROLLER);
/* Set CanReturnType to CAN_NOT_OK */
LenCanReturnType = CAN_NOT_OK;
}
else
{
/* Get the Controller index */
Controller = Can_GpCntrlIdArray[Controller];
/* Report to DET, if the Controller index is not present */
if(Controller == CAN_LIMIT)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_SET_MODECNTRL_SID, CAN_E_PARAM_CONTROLLER);
/* Set CanReturnType to CAN_NOT_OK */
LenCanReturnType = CAN_NOT_OK;
}
else
{
/* Get the pointer to the corresponding Controller structure */
LpController = &Can_GpFirstController[Controller];
/* Get the current mode of the Controller */
LucCurrentMode = *(LpController->pCntrlMode);
/* Report to DET, if the transition is not valid */
if((((LucCurrentMode == (uint8)CAN_T_SLEEP) &&
(Transition == (uint8)CAN_T_START))) ||
(((LucCurrentMode == (uint8)CAN_T_START) &&
(Transition == (uint8)CAN_T_SLEEP))) ||
(((LucCurrentMode == (uint8)CAN_T_START) &&
(Transition == (uint8)CAN_T_WAKEUP))) ||
(((LucCurrentMode == (uint8)CAN_T_STOP) &&
(Transition == (uint8)CAN_T_WAKEUP))))
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_SET_MODECNTRL_SID, CAN_E_TRANSITION);
/* Set CanReturnType to CAN_NOT_OK */
LenCanReturnType = CAN_NOT_OK;
}
}
}
/* MISRA Rule : 13.7
Message : The result of this logical operation is always 'false'
Reason : Since e-num type is used it is not possible to
provide out of range value but as per AUTOSAR
all the input parameters of an API have to be
verified.
Verification : However, the part of the code is verified manually and
it is not having any impact on code.
*/
/* MISRA Rule : 14.1
Message : This statement is unreachable.
Reason : Since e-num type is used it is not possible to
provide out of range value but as per AUTOSAR
all the input parameters of an API have to be
verified.
Verification : However, the part of the code is verified manually and
it is not having any impact on code.
*/
/* Report to DET, if the transition is out of range */
if (Transition > CAN_T_WAKEUP)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_SET_MODECNTRL_SID, CAN_E_TRANSITION);
/* Set CanReturnType to CAN_NOT_OK */
LenCanReturnType = CAN_NOT_OK;
}
/* Check whether any development error occurred */
if(LenCanReturnType != CAN_NOT_OK)
#endif /* #if (CAN_DEV_ERROR_DETECT == STD_ON) */
{
#if (CAN_DEV_ERROR_DETECT == STD_OFF)
/* MISRA Rule : 17.4
Message : Performing pointer arithmetic
Reason : Increment operator not used to achieve better
throughput.
Verification : However, part of the code is verified manually and
it is not having any impact.
*/
/* Get the pointer to the Controller structure */
LpController = Can_GpFirstController + Can_GpCntrlIdArray[Controller];
#endif /* #if(CAN_DEV_ERROR_DETECT == STD_OFF) */
/* MISRA Rule : 9.1
Message : The variable(LpController) is possibly unset at
this point.
Reason : This is to achieve throughput in the code.
Verification : It is assured that variable is initialized
correctly before actually being used by the
embedded portion.
*/
/* Invoke corresponding function based on the transition */
LenCanReturnType = (Can_GstModeFuncPtr[Transition].pModeFuncPtr
(LpController));
} /* if(LenCanReturnType != CAN_NOT_OK) */
/* Return LenCanReturnType */
return(LenCanReturnType);
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Can_SleepMode
**
** Service ID : Not Applicable
**
** Description : This service initiates a transition to sleep mode.
**
** Sync/Async : None
**
** Re-entrancy : Non Re-entrant
**
** Input Parameters : LpController
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Can_ReturnType (CAN_OK / CAN_NOT_OK)
**
** Preconditions : The CAN Driver must be initialized.
**
** Remarks : Global Variable(s) referred in this function:
** None
**
** : Function(s) invoked:
** Dem_ReportErrorStatus()
**
*******************************************************************************/
#define CAN_AFCAN_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(Can_ReturnType, CAN_AFCAN_PRIVATE_CODE) Can_SleepMode
(P2CONST(Can_ControllerConfigType,AUTOMATIC,
CAN_AFCAN_PRIVATE_CONST)LpController)
{
#if (CAN_WAKEUP_SUPPORT == STD_ON)
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit;
uint16_least LusTimeOutCount;
Can_ReturnType LenCanReturnType;
/* Get the pointer to 16-bit control register structure */
LpCntrlReg16bit = LpController->pCntrlReg16bit;
/* Set the operation mode to receive only mode */
LpCntrlReg16bit->usFcnCmclCtl = CAN_SET_RECEIVE_ONLY_MODE;
/* Get the Timeout count value and store it in a local variable */
LusTimeOutCount = CAN_TIMEOUT_COUNT;
/* Loop until receive only mode is set */
do
{
/* Decrement the Timeout count */
LusTimeOutCount--;
/* Check whether receive-only mode is set and Timeout count is expired or
not */
}while(((LpCntrlReg16bit->usFcnCmclCtl & CAN_RECEIVE_ONLY_MODE_STS) !=
CAN_RECEIVE_ONLY_MODE_STS) && (LusTimeOutCount != CAN_ZERO));
/* Set CanReturn Type to CAN_NOT_OK */
LenCanReturnType = CAN_NOT_OK;
/* Check whether Timeout count is expired or not */
if(LusTimeOutCount != CAN_ZERO)
{
/* Get the Timeout count value and store it in a local variable */
LusTimeOutCount = CAN_TIMEOUT_COUNT;
/* Set the power save mode as sleep mode */
LpCntrlReg16bit->usFcnCmclCtl = CAN_SET_SLEEP_MODE;
do
{
/* Decrement the Timeout count */
LusTimeOutCount--;
/* Check whether MBON bit is cleared and Timeout count is expired or
not */
}while(((LpCntrlReg16bit->usFcnGmclCtl & CAN_MBON_BIT_STS) != CAN_ZERO)
&& (LusTimeOutCount != CAN_ZERO));
/* Check whether Timeout count is expired or not */
if(LusTimeOutCount != CAN_ZERO)
{
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Set the Controller to sleep mode */
*(LpController->pCntrlMode) = (uint8)CAN_T_SLEEP;
#endif /* #if(CAN_DEV_ERROR_DETECT == STD_ON) */
/* Set CanReturn Type to CAN_OK */
LenCanReturnType = CAN_OK;
}
else
{
/* Report to DEM for hardware failure */
Dem_ReportErrorStatus(CAN_E_TIMEOUT, DEM_EVENT_STATUS_FAILED);
}
} /* if(LusTimeOutCount != CAN_ZERO) */
/* Return LenCanReturnType */
return(LenCanReturnType);
#else
return(CAN_OK);
#endif
}
#define CAN_AFCAN_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Can_WakeupMode
**
** Service ID : Not Applicable
**
** Description : This service initiates the transition to wakeup from
** sleep Mode.
**
** Sync/Async : None
**
** Re-entrancy : Re-entrant
**
** Input Parameters : LpController
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Can_ReturnType (CAN_OK / CAN_NOT_OK)
**
** Preconditions : The CAN Driver must be initialized.
**
** Remarks : Global Variable(s) referred in this function:
** None
**
** : Function(s) invoked:
** Dem_ReportErrorStatus()
**
*******************************************************************************/
#define CAN_AFCAN_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(Can_ReturnType, CAN_AFCAN_PRIVATE_CODE) Can_WakeupMode
(P2CONST(Can_ControllerConfigType,AUTOMATIC,
CAN_AFCAN_PRIVATE_CONST)LpController)
{
#if (CAN_WAKEUP_SUPPORT == STD_ON)
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit;
uint16_least LusTimeOutCount;
Can_ReturnType LenCanReturnType;
/* Set CanReturn Type to CAN_NOT_OK */
LenCanReturnType = CAN_NOT_OK;
/* Get the pointer to 16-bit control register structure */
LpCntrlReg16bit = LpController->pCntrlReg16bit;
/* Clear the power save mode */
LpCntrlReg16bit->usFcnCmclCtl = CAN_CLR_SLEEP_MODE;
/* Get the Timeout count value and store it in a local variable */
LusTimeOutCount = CAN_TIMEOUT_COUNT;
/* Loop to check clearing power save mode */
do
{
/* Decrement the Timeout count */
--LusTimeOutCount;
/* Check whether MBON bit is set and Timeout count is expired or not */
} while(((LpCntrlReg16bit->usFcnGmclCtl & CAN_MBON_BIT_SET) !=
CAN_MBON_BIT_SET) && (LusTimeOutCount != CAN_ZERO));
/* Check whether Timeout count is expired or not */
if((LusTimeOutCount != CAN_ZERO) ||
((LpCntrlReg16bit->usFcnGmclCtl & CAN_MBON_BIT_SET) == CAN_ONE))
{
/* Clear the wakeup interrupt flag */
LpCntrlReg16bit->usFcnCmisCtl = CAN_CLR_WAKEUP_INTERRUPT;
/* Set the operation mode as initialization mode */
LpCntrlReg16bit->usFcnCmclCtl = CAN_SET_INIT_OPMODE;
/* Get the Timeout count value and store it in a local variable */
LusTimeOutCount = CAN_TIMEOUT_COUNT;
/* Loop to clear start mode */
do
{
/* Decrement the TimeoutCount */
LusTimeOutCount--;
/* Check whether initialization mode is set and Timeout count is expired
or not */
}while(((LpCntrlReg16bit->usFcnCmclCtl & CAN_SET_INIT_OPMODE) != CAN_ZERO)
&& (LusTimeOutCount != CAN_ZERO));
/* Check whether Timeout count is expired or not */
if(LusTimeOutCount != CAN_ZERO)
{
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Set the controller to wakeup mode */
*(LpController->pCntrlMode) = (uint8)CAN_T_STOP;
#endif
/* Set CanReturn Type to CAN_OK */
LenCanReturnType = CAN_OK;
}
else
{
/* Report to DEM for hardware failure */
Dem_ReportErrorStatus(CAN_E_TIMEOUT, DEM_EVENT_STATUS_FAILED);
}
}
else
{
/* Report to DEM for hardware failure */
Dem_ReportErrorStatus(CAN_E_TIMEOUT, DEM_EVENT_STATUS_FAILED);
}
/* Return LenCanReturnType */
return(LenCanReturnType);
#else
return(CAN_OK);
#endif
}
#define CAN_AFCAN_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Can_StartMode
**
** Service ID : Not Applicable
**
** Description : This service initiates the transition to the normal
** operating mode with complete functionality.
**
** Sync/Async : None
**
** Re-entrancy : Non Re-entrant
**
** Input Parameters : LpController
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Can_ReturnType (CAN_OK / CAN_NOT_OK)
**
** Preconditions : The CAN Driver must be initialized.
**
** Remarks : Global Variable(s) referred in this function:
** None
**
** : Function(s) invoked:
** None
**
*******************************************************************************/
#define CAN_AFCAN_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(Can_ReturnType, CAN_AFCAN_PRIVATE_CODE) Can_StartMode
(P2CONST(Can_ControllerConfigType,AUTOMATIC,
CAN_AFCAN_PRIVATE_CONST)LpController)
{
P2CONST(Tdd_Can_AFCan_Hrh,AUTOMATIC, CAN_AFCAN_PRIVATE_CONST) LpHrh;
P2VAR(Tdd_Can_AFCan_8bit_CntrlReg,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg8bit;
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit;
P2VAR(Tdd_Can_AFCan_16bit_MsgBuffer,AUTOMATIC,CAN_AFCAN_PRIVATE_DATA)
LpMsgBuffer16bit;
/* MISRA Rule : 18.4
Message : An object of union type has been defined.
Reason : Data access of larger data types is used to achieve
better throughput.
Verification : However, part of the code is verified manually and
it is not having any impact.
*/
Tun_Can_AFCan_WordAccess LunWordAccess;
Can_ReturnType LenCanReturnType;
uint8_least LucNoOfHoh;
uint16_least LusTimeOutCount;
/* Get the pointer to 8-bit control register structure */
LpCntrlReg8bit = LpController->pCntrlReg8bit;
/* Get the pointer to 16-bit control register structure */
LpCntrlReg16bit = LpController->pCntrlReg16bit;
/* Check whether BusOff flag is enabled or not */
if(((LpCntrlReg8bit->ucFcnCminStr) & (CAN_BUSOFF_STS)) == CAN_BUSOFF_STS)
{
/* Set CCERC bit to clear INFO and ERC registers */
LpCntrlReg16bit->usFcnCmclCtl = CAN_SET_CCERC_BIT;
}
/* Clear all interrupt flags of Interrupt Status register*/
(LpCntrlReg16bit->usFcnCmisCtl) = (CAN_CLR_ALL_INTERRUPT);
/* Clear the receive history list overflow bit */
(LpCntrlReg16bit->usFcnCmrgRx) = (CAN_CLR_ROVF_BIT);
/* Get the value of RGPT Register */
LunWordAccess.usWord = (LpCntrlReg16bit->usFcnCmrgRx);
/* Get the Timeout count value and store it in a local variable */
LusTimeOutCount = CAN_TIMEOUT_COUNT;
/* Check whether any message buffers are updated, if so clear */
if((LunWordAccess.Tst_ByteAccess.ucLowByte) != CAN_RHPM_BIT_STS)
{
/* Loop to clear receive history list register */
do
{
/* Decrement the TimeoutCount */
LusTimeOutCount--;
/* Get the value of RGPT Register */
LunWordAccess.usWord = (LpCntrlReg16bit->usFcnCmrgRx);
/* Check whether receive history list is empty */
}while((((LunWordAccess.Tst_ByteAccess.ucLowByte) & (CAN_RHPM_BIT_STS)) !=
CAN_RHPM_BIT_STS) && (LusTimeOutCount != CAN_ZERO));
} /* if((LunWordAccess.Tst_ByteAccess.ucLowByte) != CAN_RHPM_BIT_STS) */
/* Check whether TimeOutCount is equal to zero */
if(LusTimeOutCount == CAN_ZERO)
{
/* Report to DEM for hardware failure */
Dem_ReportErrorStatus(CAN_E_TIMEOUT, DEM_EVENT_STATUS_FAILED);
/* Set CanReturn Type to CAN_NOT_OK */
LenCanReturnType = CAN_NOT_OK;
}
else
{
/* Get the number of Hrh configured and store it in local variable */
LucNoOfHoh = LpController->ucNoOfHrh;
/* Check whether any Hrh is configured or not */
if(LucNoOfHoh != CAN_ZERO)
{
/* Get the pointer to Hrh structure */
LpHrh = LpController->pHrh;
/* Loop for the number of Hrh configured */
do
{
/* Get the pointer to message buffer */
LpMsgBuffer16bit = LpHrh->pMsgBuffer16bit;
/*Clear DN bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_CLR_DN_BIT;
/* MISRA Rule : 17.4
Message : Increment or decrement operation performed
on pointer(LpHrh).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer pointing to next Hrh structure */
LpHrh++;
/* Decrement the number of Hrh count configured */
LucNoOfHoh--;
}while(LucNoOfHoh != CAN_ZERO);
} /* while(LucNoOfHrh != CAN_ZERO) */
/* Clear the transmit history list overflow bit */
(LpCntrlReg16bit->usFcnCmtgTx) = (CAN_CLR_TOVF_BIT);
/* Get the value of TGPT Register */
LunWordAccess.usWord = (LpCntrlReg16bit->usFcnCmtgTx);
/* Check whether any message buffers are updated, if so clear */
if(((LunWordAccess.Tst_ByteAccess.ucLowByte) & (CAN_THPM_BIT_STS)) !=
CAN_THPM_BIT_STS)
{
/* Loop to clear transmit history list register */
do
{
/* Get the value of TGPT Register */
LunWordAccess.usWord = (LpCntrlReg16bit->usFcnCmtgTx);
}while(((LunWordAccess.Tst_ByteAccess.ucLowByte) & (CAN_THPM_BIT_STS)) !=
CAN_THPM_BIT_STS);
} /*if(((LunWordAccess.Tst_ByteAccess.ucLowByte) & (CAN_THPM_BIT_STS)) !=
CAN_THPM_BIT_STS)*/
/* Enable all the interrupts */
LpCntrlReg16bit->usFcnCmieCtl = LpController->usIntEnable;
/* Set the operation mode as normal operating mode*/
LpCntrlReg16bit->usFcnCmclCtl = CAN_SET_START_MODE;
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Set the Controller to start mode */
*(LpController->pCntrlMode) = (uint8)CAN_T_START;
#endif /* #if(CAN_DEV_ERROR_DETECT == STD_ON) */
/* Set CanReturn Type to CAN_OK */
LenCanReturnType = CAN_OK;
}
/* Return LenCanReturnType */
return(LenCanReturnType);
}
#define CAN_AFCAN_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Can_StopMode
**
** Service ID : Not Applicable
**
** Description : This service initiates the transition to stop mode.
**
** Sync/Async : None
**
** Re-entrancy : Non Re-entrant
**
** Input Parameters : LpController
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Can_ReturnType (CAN_OK / CAN_NOT_OK)
**
** Preconditions : The CAN Driver must be initialized.
**
** Remarks : Global Variable(s) referred in this function:
** None
**
** : Function(s) invoked:
** Dem_ReportErrorStatus()
**
*******************************************************************************/
#define CAN_AFCAN_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(Can_ReturnType, CAN_AFCAN_PRIVATE_CODE) Can_StopMode
(P2CONST(Can_ControllerConfigType,AUTOMATIC,
CAN_AFCAN_PRIVATE_CONST)LpController)
{
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit;
P2CONST(Tdd_Can_AFCan_Hth,AUTOMATIC, CAN_AFCAN_PRIVATE_CONST) LpHth;
P2VAR(Tdd_Can_AFCan_16bit_MsgBuffer,AUTOMATIC,CAN_AFCAN_PRIVATE_DATA)
LpMsgBuffer16bit;
P2VAR(uint16,AUTOMATIC,CAN_AFCAN_CONFIG_DATA)LpIntCntrlReg;
Can_ReturnType LenCanReturnType;
uint16_least LusTimeOutCount;
uint8_least LucNoOfCount;
/* Get the pointer to the 16-bit control register structure */
LpCntrlReg16bit = LpController->pCntrlReg16bit;
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Set the Controller to stop mode */
*(LpController->pCntrlMode) = (uint8)CAN_T_STOP;
#endif /* #if(CAN_DEV_ERROR_DETECT == STD_ON) */
/* Get the number of Hth configured and store it in a local variable */
LucNoOfCount = LpController->ucNoOfHth;
/* Check whether any Hth is configured or not */
if(LucNoOfCount != CAN_ZERO)
{
/* Get the pointer to Hth structure */
LpHth = LpController->pHth;
/* Loop for number of Hth */
do
{
/* Get the pointer to the corresponding 16-bit message buffer register */
LpMsgBuffer16bit = LpHth->pMsgBuffer16bit;
/* Clear TRQ Bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_CLR_TRQ_BIT;
/* Check whether Multiplexed transmission is on or not */
#if (CAN_MULTIPLEX_TRANSMISSION == STD_ON)
/* Set the global flag to zero */
*(LpHth->pHwAccessFlag) = CAN_FALSE;
#endif
/* MISRA Rule : 17.4
Message : Increment or decrement operation performed
on pointer(LpHth).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to next Hth structure */
LpHth++;
/* Decrement the number of Hth count configured */
LucNoOfCount--;
}while(LucNoOfCount != CAN_ZERO);
}
/* Set the operation mode as initialization mode */
LpCntrlReg16bit->usFcnCmclCtl = CAN_SET_INIT_OPMODE;
/* Get the Timeout count value and store it in a local variable */
LusTimeOutCount = CAN_TIMEOUT_COUNT;
/* Loop to clear start mode */
do
{
/* Decrement the TimeoutCount */
LusTimeOutCount--;
/* Check whether initialization mode is set and Timeout count is expired or
not */
}while(((LpCntrlReg16bit->usFcnCmclCtl & CAN_SET_INIT_OPMODE) != CAN_ZERO)
&& (LusTimeOutCount != CAN_ZERO));
/* Clear all interrupt flags of Interrupt Status register*/
LpCntrlReg16bit->usFcnCmisCtl = CAN_CLR_ALL_INTERRUPT;
/* Disable all interrupts */
LpCntrlReg16bit->usFcnCmieCtl = CAN_CLR_ALL_INTERRUPT;
/* Enable Wakeup */
LpCntrlReg16bit->usFcnCmieCtl = ((LpController->usIntEnable) &
(CAN_ENB_WAKEUP_INTERRUPT));
/* Get the pointer to EIC register */
LpIntCntrlReg = (LpController->pIntCntrlReg);
/* Initialize EIC Count */
#if (CAN_WAKEUP_INTERRUPTS_TIED == TRUE)
LucNoOfCount = CAN_THREE;
#else
LucNoOfCount = CAN_FOUR;
#endif
/* MISRA Rule : 17.4
Message : Increment or decrement operation
performed on pointer(LpIntCntrlReg).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Loop to disable other interrupts in EIC */
do
{
/* Clear Pending Interrupt status in EIRF bit */
*LpIntCntrlReg &= CAN_CLR_INT_REQ;
/* MISRA Rule : 17.4
Message : Performing pointer arithmetic.
Reason : Increment operator not used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to next EIC register */
LpIntCntrlReg++;
/* Decrement the EIC Count */
LucNoOfCount--;
}while(LucNoOfCount != CAN_ZERO);
/* Set CanReturn Type to CAN_OK */
LenCanReturnType = CAN_OK;
/* Check whether TimeOutCount is equal to zero */
if(LusTimeOutCount == CAN_ZERO)
{
/* Report to DEM for hardware failure */
Dem_ReportErrorStatus(CAN_E_TIMEOUT, DEM_EVENT_STATUS_FAILED);
/* Set CanReturn Type to CAN_NOT_OK */
LenCanReturnType = CAN_NOT_OK;
}
/* Return LenCanReturnType */
return(LenCanReturnType);
}
#define CAN_AFCAN_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/Include/SchM_Dem.h
#ifndef SCHM_DEM_H
#define SCHM_DEM_H
#include "SchM.h"
#include "SchM_Types.h"
#include "SchM_Cfg.h"
#define DEM_EXCLUSIVE_AREA_0 SCHM_EA_SUSPENDALLINTERRUPTS
#define DEM_EXCLUSIVE_AREA_1 SCHM_EA_SUSPENDALLINTERRUPTS
#define DEM_EXCLUSIVE_AREA_2 SCHM_EA_SUSPENDALLINTERRUPTS
#define SCHM_DEM_EXCLUSIVE_AREA_0 SCHM_EA_SUSPENDALLINTERRUPTS
# define SchM_Enter_Dem(ExclusiveArea) \
SCHM_ENTER_EXCLUSIVE(ExclusiveArea)
# define SchM_Exit_Dem(ExclusiveArea) \
SCHM_EXIT_EXCLUSIVE(ExclusiveArea)
#endif /* SCHM_DEM_H */
<file_sep>/BSP/Include/SampleBlocks.h
/* You also may define separate sections for arbitrary blocks
You should replace the uint8 type by an appropriate type,
and remove the brackets
Different RAM/ROM blocks and/or callback declarations
may also be split across several header files, according to your project.
Then you either include these files here, or you configure the
includes via the EAD
*/
#ifndef _SAMPLE_BLOCKS_NVM_
#define _SAMPLE_BLOCKS_NVM_
VAR(uint8, NVM_APPL_DATA) SampleRamBlock_1[1];
CONST(uint8, NVM_APPL_CONST) SampleDefaultBlock_1[1];
#endif
/************ Organi, Version 3.9.1 Vector-Informatik GmbH ************/
<file_sep>/BSP/MCAL/MemIf/MemIf.h
/**
\addtogroup MODULE_MemIf MemIf
Memory Abstration Interface Module.
*/
/*@{*/
/***************************************************************************//**
\file MemIf.h
\brief API Declaration of Memory Abstration Interface Module.
\author zhaoyg
\version 1.0
\date 2012-3-27
\warning Copyright (C), 2012, PATAC.
*//*----------------------------------------------------------------------------
\history
<No.> <author> <time> <version> <description>
1 zhaoyg 2012-3-27 1.0 Create
*******************************************************************************/
#ifndef _MEMIF_H
#define _MEMIF_H
/*******************************************************************************
Include Files
*******************************************************************************/
#include "MemIf_Types.h"
/*******************************************************************************
Macro Definition
*******************************************************************************/
/**
\def MEMIF_BROADCAST_ID
Broadcast ID.
*/
#define MEMIF_BROADCAST_ID (0xFF)
/*******************************************************************************
Type Definition
*******************************************************************************/
/*******************************************************************************
Prototype Declaration
*******************************************************************************/
/**
\def MemIf_SetMode
Set Work Mode.
*/
#define MemIf_SetMode(Mode)\
Fee_SetMode((Mode))
/**
\def MemIf_Read
Read Data.
*/
#define MemIf_Read(DeviceIndex,BlockNumber,BlockOffset,DataBufferPtr,Length)\
Fee_Read((BlockNumber),(BlockOffset),(DataBufferPtr),(Length))
/**
\def MemIf_Write
Write Data.
*/
#define MemIf_Write(DeviceIndex,BlockNumber,DataBufferPtr)\
Fee_Write((BlockNumber),(DataBufferPtr))
/**
\def MemIf_EraseImmediateBlock
Erase Immediate Block.
*/
#define MemIf_EraseImmediateBlock(DeviceIndex,BlockNumber)\
Fee_EraseImmediateBlock((BlockNumber))
/**
\def MemIf_InvalidateBlock
Invalidate Block.
*/
#define MemIf_InvalidateBlock(DeviceIndex,BlockNumber)\
Fee_InvalidateBlock((BlockNumber))
/**
\def MemIf_Cancel
Cancel Job.
*/
#define MemIf_Cancel(DeviceIndex)\
Fee_Cancel()
/**
\def MemIf_GetStatus
Get Status.
*/
#define MemIf_GetStatus(DeviceIndex)\
Fee_GetStatus()
/**
\def MemIf_GetJobResult
Get Job Result.
*/
#define MemIf_GetJobResult(DeviceIndex)\
Fee_GetJobResult()
#endif /* #ifndef _MEMIF_H */
/*@}*/
<file_sep>/BSP/Include/SchM_Dcm.h
#ifndef SCHM_DCM_H
#define SCHM_DCM_H
#include "SchM.h"
#include "SchM_Types.h"
#include "SchM_Cfg.h"
# define SchM_Enter_Dcm(ExclusiveArea) \
SCHM_ENTER_EXCLUSIVE(ExclusiveArea)
# define SchM_Exit_Dcm(ExclusiveArea) \
SCHM_EXIT_EXCLUSIVE(ExclusiveArea)
#endif /* SCHM_DCM_H */
<file_sep>/BSP/MCAL/Gpt/App_Gpt_Common_Sample.c
/*============================================================================*/
/* Project = AUTOSAR NEC Xx4 MCAL Components */
/* Module = App_Gpt_Common_Sample.c */
/* Version = 3.0.2 */
/* Date = 25-Feb-2010 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009 by NEC Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains sample application for GPT Driver Component */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* NEC Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by NEC. Any warranty */
/* is expressly disclaimed and excluded by NEC, either expressed or implied, */
/* including but not limited to those for non-infringement of intellectual */
/* property, merchantability and/or fitness for the particular purpose. */
/* */
/* NEC shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall NEC be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. NEC shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by NEC in connection with the Product(s) and/or the */
/* Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/* Compiler: GHS V5.1.6c */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 23-Oct-2009 : Initial version
* V3.0.1: 02-Nov-2009 : Timer Interrupt Vector Addresses
* : are removed.
* V3.0.2: 25-Feb-2010 :
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "App_Gpt_Common_Sample.h"
#include "Gpt.h"
#include "App_Gpt_Device_Sample.h"
/*******************************************************************************
** Macros **
*******************************************************************************/
/*******************************************************************************
** Global variables **
*******************************************************************************/
/* Variable used to store the Module Version Info */
Std_VersionInfoType Test_versioninfo;
/* Global variables to hold version information */
uint16 VendorID;
uint16 ModuleID;
uint8 InstanceID;
uint8 SW_Major_Version;
uint8 SW_Minor_Version;
uint8 SW_Patch_Version;
/* Global variable to hold the values */
Gpt_ValueType Test_Value1;
Gpt_ValueType Test_Value2;
/*******************************************************************************
** User function prototypes **
*******************************************************************************/
void Port_Init(void);
void Mcu_Init(void);
void Wdg_Init(void);
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
void main(void)
{
/* Initialise MCU */
Mcu_Init();
/* Initialize the Port pins */
Port_Init();
/* Initialize the Watchdog timer */
Wdg_Init();
__asm("ei");
/* Getting the version Info of the GPT Driver */
Gpt_GetVersionInfo(&Test_versioninfo);
VendorID = Test_versioninfo.vendorID;
ModuleID = Test_versioninfo.moduleID;
InstanceID = Test_versioninfo.instanceID;
SW_Major_Version = Test_versioninfo.sw_major_version;
SW_Minor_Version = Test_versioninfo.sw_minor_version;
SW_Patch_Version = Test_versioninfo.sw_patch_version;
/* Initialisation of the GPT Driver */
Gpt_Init(GptChannelConfigSet0);
/* Enabling the Notification */
Gpt_EnableNotification(GptChannelConfiguration0);
/* Starting the Timer */
Gpt_StartTimer(GptChannelConfiguration0, 0x5000);
/* Reading the time elapsed */
Test_Value1 = Gpt_GetTimeElapsed(GptChannelConfiguration0);
/* Reading the time remaining */
Test_Value2 = Gpt_GetTimeRemaining(GptChannelConfiguration0);
/* Set mode to Sleep */
Gpt_SetMode(GPT_MODE_SLEEP);
/* Disabling the Wakeup Notification */
Gpt_DisableWakeup(GptChannelConfiguration0);
/* Set mode to Normal */
Gpt_SetMode(GPT_MODE_NORMAL);
/* Disabling the Notification */
Gpt_DisableNotification(GptChannelConfiguration0);
/* Set mode to Sleep */
Gpt_SetMode(GPT_MODE_SLEEP);
/* Enabling the Wakeup Notification */
Gpt_EnableWakeup(GptChannelConfiguration0);
/*Checking the wake up notification*/
Gpt_Cbk_CheckWakeup(GPT_WKP_SRC_1);
/* Set mode to Normal */
Gpt_SetMode(GPT_MODE_NORMAL);
/* Stopping the Timer */
Gpt_StopTimer(GptChannelConfiguration0);
/* De-initialize GPT Driver */
Gpt_DeInit();
while(1)
{
}
}/* End of main() function */
void Gpt_Notification_0(void)
{
/* Notification for channel */
}
void Gpt_Notification_1(void)
{
/* Notification for channel */
}
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/APP/LEDTemperature/LEDTemperature.h
#ifndef __LEDTemperature_H
#define __LEDTemperature_H
#include "Std_Types.h"
#endif
<file_sep>/BSP/MCAL/Adc/Adc_Irq.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Adc_Irq.h */
/* Version = 3.1.2a */
/* Date = 23-Apr-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2013 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of Interrupt routines. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 10-Jul-2009 : Initial version
*
* V3.0.1: 12-Oct-2009 : As per SCR 052, the following changes are made
* 1. Template changes are made.
*
* V3.0.2: 01-Jul-2010 : As per SCR 295, file is updated to support ISR
* Category configuration by a pre-compile
* option.
* V3.0.3: 20-Jul-2010 : As per SCR 309, ISR Category options are updated
* from MODE to TYPE.
*
* V3.1.0: 27-Jul-2011 : Modified for DK-4
* V3.1.1: 14-Feb-2012 : Merged the fixes done for Fx4L Adc driver
*
* V3.1.2: 04-Jun-2012 : As per SCR 019, the following changes are made
* 1. Compiler version is removed from environment
* section.
* 2. File version is changed.
*
* V3.1.2a: 23-Apr-2013 : As per Matis #11228, inclusion location of Os.h
* is changed.
*/
/******************************************************************************/
#ifndef ADC_IRQ_H
#define ADC_IRQ_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/* The default option for ISR Category MCAL_ISR_TYPE_TOOLCHAIN */
#ifndef ADC_INTERRUPT_TYPE
#define ADC_INTERRUPT_TYPE MCAL_ISR_TYPE_TOOLCHAIN
#endif
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
/* Use OS */
//#include "Os.h"
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define ADC_IRQ_AR_MAJOR_VERSION ADC_AR_MAJOR_VERSION_VALUE
#define ADC_IRQ_AR_MINOR_VERSION ADC_AR_MINOR_VERSION_VALUE
#define ADC_IRQ_AR_PATCH_VERSION ADC_AR_PATCH_VERSION_VALUE
/*
* File version information
*/
#define ADC_IRQ_SW_MAJOR_VERSION 3
#define ADC_IRQ_SW_MINOR_VERSION 1
#define ADC_IRQ_SW_PATCH_VERSION 2
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (ADC_IRQ_SW_MAJOR_VERSION != ADC_SW_MAJOR_VERSION)
#error "Software major version of Adc.h and Adc_Irq.h did not match!"
#endif
#if (ADC_IRQ_SW_MINOR_VERSION!= ADC_SW_MINOR_VERSION )
#error "Software minor version of Adc.h and Adc_Irq.h did not match!"
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
/* Declaration for the ADC Interrupt Service Routines */
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC0_CG0_ISR(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC0_CG1_ISR(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC0_CG2_ISR(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC1_CG0_ISR(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC1_CG1_ISR(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC1_CG2_ISR(void);
/* Declaration for the ADC DMA Interrupt Service Routines */
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH0(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH1(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH2(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH3(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH4(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH5(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH6(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH7(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH8(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH9(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH10(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH11(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH12(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH13(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH14(void);
extern _INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH15(void);
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
/* Declaration for the ADC Interrupt Service Routines */
extern FUNC(void, ADC_PUBLIC_CODE) ADC0_CG0_ISR(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC0_CG1_ISR(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC0_CG2_ISR(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC1_CG0_ISR(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC1_CG1_ISR(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC1_CG2_ISR(void);
/* Declaration for the ADC DMA Interrupt Service Routines */
extern FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH0(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH1(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH2(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH3(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH4(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH5(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH6(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH7(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH8(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH9(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH10(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH11(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH12(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH13(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH14(void);
extern FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH15(void);
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
/* Do nothing to avoid error */
#else
#error "ADC_INTERRUPT_TYPE not set."
#endif
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* ADC_IRQ_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Mcu/Mcu_PBcfg.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* File name = Mcu_PBcfg.c */
/* Version = 3.1.7a */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2013 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of AUTOSAR MCU post build parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.1.13
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_MCU_V308_140113_HEADLAMP.arxml
* GENERATED ON: 14 Jan 2014 - 12:18:18
*/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Mcu_PBTypes.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define MCU_PBCFG_C_AR_MAJOR_VERSION 2
#define MCU_PBCFG_C_AR_MINOR_VERSION 2
#define MCU_PBCFG_C_AR_PATCH_VERSION 1
/* File version information */
#define MCU_PBCFG_C_SW_MAJOR_VERSION 3
#define MCU_PBCFG_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (MCU_PBTYPES_AR_MAJOR_VERSION != MCU_PBCFG_C_AR_MAJOR_VERSION)
#error "Mcu_PBcfg.c : Mismatch in Specification Major Version"
#endif
#if (MCU_PBTYPES_AR_MINOR_VERSION != MCU_PBCFG_C_AR_MINOR_VERSION)
#error "Mcu_PBcfg.c : Mismatch in Specification Minor Version"
#endif
#if (MCU_PBTYPES_AR_PATCH_VERSION != MCU_PBCFG_C_AR_PATCH_VERSION)
#error "Mcu_PBcfg.c : Mismatch in Specification Patch Version"
#endif
#if (MCU_SW_MAJOR_VERSION != MCU_PBCFG_C_SW_MAJOR_VERSION)
#error "Mcu_PBcfg.c : Mismatch in Major Version"
#endif
#if (MCU_SW_MINOR_VERSION != MCU_PBCFG_C_SW_MINOR_VERSION)
#error "Mcu_PBcfg.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
#define MCU_START_SEC_BURAM_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* Global RAM array for back up of Port group registers */
/* VAR(uint32, MCU_CONFIG_DATA) Mcu_GaaRamPortGroup[]; */
/* Pointer to array of early wakeup factors in BURAM */
/*VAR(uint32, MCU_CONFIG_DATA) Mcu_GaaRamIso0EarlyWUF[3];*/
/* Pointer to early wakeup factor status flag in BURAM */
/*VAR(uint8, MCU_CONFIG_DATA) Mcu_EarlyWakeupStatus;*/
#define MCU_STOP_SEC_BURAM_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
#define MCU_START_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
/* Structure for MCU Init configuration */
CONST(Mcu_ConfigType, MCU_CONST) Mcu_GstConfiguration[1] =
{
/* Structure for initialization of database: 0 */
{
/* ulStartOfDbToc */
0x05D94300,
/* ulHighRingStabCount */
0x00044444,
/* ulMainClockStabCount */
0x000020C4,
/* ulLVIindicatingReg */
0x00000000,
/* pClkSettingIndexMap */
&Mcu_GaaClkSettingIndexMap[0],
/* pClockSetting */
&Mcu_GstClockSetting[0],
/* pModeSetting */
&Mcu_GstModeSetting[0],
/* pCkscRegOffset */
&Mcu_GaaCkscRegOffset[0],
/* pCkscRegValue */
&Mcu_GaaCkscRegValue[0],
/* usCLMA0CMPL */
0x01D5,
/* usCLMA0CMPH */
0x0261,
/* usCLMA3CMPL */
0x008D,
/* usCLMA3CMPH */
0x00B7,
/* ucVCPC0CTLreg0 */
0x00,
/* ucVCPC0CTLreg1 */
0x00,
/* ucCLMEnable */
0x00,
/* ucCLMOutputSignal */
0x00,
/* blClockFailureNotify */
MCU_FALSE
}
};
#define MCU_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
#define MCU_START_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/* Structure for MCU clock setting configuration */
CONST(Tdd_Mcu_ClockSetting, MCU_CONST) Mcu_GstClockSetting[1] =
{
/* Index: 0 */
{
/* ulPLL0ControlValue */
0x00840213,
/* ulPLL1ControlValue */
0x00000000,
/* ulPLL2ControlValue */
0x00000000,
/* ulSubOscStabTime */
0x00000000,
/* ulPLL0StabTime */
0x00000006,
/* ulPLL1StabTime */
0x00000000,
/* ulPLL2StabTime */
0x00000000,
/* ulMainOscStabTime */
0x0000000D,
/* usFoutDivReg */
0x0000,
/* ucSelectedSrcClock */
0x0D,
/* ucMosccRegValue */
0x02,
/* ucSelectedSTPMK */
0x0D,
/* ucNoOfIso0CkscReg */
0x02,
/* ucNoOfIso1CkscReg */
0x03,
/* ucNoOfAwoCkscReg */
0x00,
/* ucNoOfPllIso0CkscReg */
0x01,
/* ucNoOfPllIso1CkscReg */
0x00,
/* ucNoOfPllAwoCkscReg */
0x00,
/* ucCkscIndexOffset */
0x00,
/* ucCkscPllIndexOffset */
0x05
}
};
/* Structure for MCU mode setting configuration */
CONST(Tdd_Mcu_ModeSetting, MCU_CONST) Mcu_GstModeSetting[1] =
{
/* Index: 0 */
{
/* ulPowerDownWakeupTypeL0 */
0xFFFFFFFF,
/* ulPowerDownWakeupTypeM0 */
0xFFFFFFFF,
/* ulPowerDownWakeupTypeH0 */
0xFFFFFFFF,
/* ulPowerDownWakeupTypeL1 */
0xFFFFFFFF,
/* ulPowerDownWakeupTypeM1 */
0xFFFFFFFF,
/* ulPowerDownWakeupTypeH1 */
0xFFFFFFFF,
/* ulOscWufMsk */
0x00000003,
/* ucPSC0RegValue */
0x0D,
/* ucPSC1RegValue */
0x0D,
/* ucModeType */
MCU_RUN_MODE
}
};
/* Array for CKSC register offset */
CONST(uint16, MCU_CONST)Mcu_GaaCkscRegOffset[6] =
{
/* Index: 0 */
0x00C0,
/* Index: 1 */
0x0060,
/* Index: 2 */
0x40B0,
/* Index: 3 */
0x40C0,
/* Index: 4 */
0x4060,
/* Index: 5 */
0x0000
};
/* Array for CKSC register value */
CONST(uint32, MCU_CONST)Mcu_GaaCkscRegValue[6] =
{
/* Index: 0 */
0x00000018,
/* Index: 1 */
0x00000018,
/* Index: 2 */
0x00000018,
/* Index: 3 */
0x00000018,
/* Index: 4 */
0x00000018,
/* Index: 5 */
0x00000028
};
/* Clock setting index mapping array */
/* Clock setting indices are organized in following order for each configured
configuration set:
Configuration Set -> [1, 2, 3, 4....]
MCU_CLK_SETTING_8MHZ -> [0, 3, 6, 9....]
MCU_CLK_SETTING_MAIN_OSCI -> [1, 4, 7, 10....]
MCU_CLK_SETTING_PLL0 -> [2, 5, 8, 11....]
*/
CONST(uint8, MCU_CONST)Mcu_GaaClkSettingIndexMap[3] =
{
/* Index: 0 */
0xFF,
/* Index: 1 */
0xFF,
/* Index: 2 */
0x00
};
/* Array of Port Group Configuration */
/* CONST(Tdd_Mcu_PortGroupAddress, MCU_CONST) Mcu_GaaPortGroup[0]; */
#define MCU_STOP_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/BSW/Dem/Dem_Types.h
/* Kernbauer Version: 1.15 Konfiguration: Diag_AsrDem_Vector Erzeugungsgangnummer: 1 */
/*********************************************************************************************************************/
/*!
* \file Dem_Types.h
* \brief Typedefs for DEM
* \par copyright
* \verbatim
* Copyright (c) 2000-2011 by Vector Informatik GmbH. All rights reserved.
*
* This software is copyright protected and proprietary to Vector Informatik GmbH.
* Vector Informatik GmbH grants to you only those rights as set out in the license conditions.
* All other rights remain with Vector Informatik GmbH.
*
* \endverbatim
*/
/* -------------------------------------------------------------------------------------------------------------------
* FILE DESCRIPTION
* -------------------------------------------------------------------------------------------------------------------
* File: Dem_Types.h
* Project: MICROSAR DEM
* Module: -
* Generator: -
*
* Description: Typedefs for DEM
*
* Manufacturer: Vector (MSR R12)
* Kernbauer LL: 02.16.01
*********************************************************************************************************************/
/*****************************************************************************************************************/ /**
* AUTHOR IDENTITY
* -------------------------------------------------------------------------------------------------------------------
* \author Initials Company
* -------------------------------------------------------------------------------------------------------------------
*- <NAME> Hrs Vector Informatik GmbH
*- <NAME> Pst Vector Informatik GmbH
*- <NAME> Ade Vector Informatik GmbH
*- <NAME> Mhe Vector Informatik GmbH
*- <NAME> Dmc Vector Informatik GmbH
* -------------------------------------------------------------------------------------------------------------------
* REVISION HISTORY
* -------------------------------------------------------------------------------------------------------------------
* \version Date Author Change Id Description
* -------------------------------------------------------------------------------------------------------------------
*- 02.00.03 2008-06-17 Hrs - Initial Version (Vector AUTOSAR 3.0 Evaluation Bundle)
*- 02.00.04 2008-06-18 Hrs ESCAN00026509 call EcuM_GeneratorCompatibilityError() with invalid postbuild configuration
*- 02.01.00 2008-06-18 Hrs - limit Dem_DtcChronoRefType by preconfig; generate typedef
*- Hrs ESCAN00026513 Extension for MSR3.0 generator version checks
*- 2008-06-24 Hrs ESCAN00027816 DTC will not be cleared completely
*- Hrs ESCAN00027850 Invalid Postbuild size of data element EventPriority
*- 2008-06-25 Hrs - Dem_MaxDataValueType always available as typedef
*- 02.01.01 2008-07-09 Hrs - Remove warning about unused argument in Dem_UpdateExtendedRecord()
*- 02.01.02 2008-07-11 Hrs ESCAN00028341 Complex vars not assigned correctly with GNU compiler on ARM7/9 controller
*- 02.02.01 2008-08-06 Pst - Update to core 3.00.00
*- 02.04.00 2008-09-17 Hrs - Fix Star12/Cosmic problems with INLINE functions
*- 02.05.00 2008-11-17 Pst - Adapt for GenTool 2.04.00: DTCOrigin in generated differently
*- Pst ESCAN00029823 PreCompile and Linktime CRC check
*- Pst - Dem_UnsetBitWarningIndicatorRequested(EventId) with PASSED
*- Pst - Introduced DEM_CONFIRMEDDTC_MEANS_STOREDDTC
*- Pst - Implemented FreezeFrame handling
*- Pst - Changed handling of event destination
*- Pst ESCAN00031325 GetIndicatorStatus returns active indicator
*- 2008-11-28 Pst ESCAN00028351 Complex vars not assigned correctly with GNU compiler on ARM7/9 controller
*- Pst ESCAN00031704 Bsw event queue + add. queue > 255 elements leads to unpredictable data access.
*- Pst ESCAN00031183 Release configuration variant "PreCompile" (also: ESCAN00030119)
*- Pst ESCAN00029158 Data corruption after PostBuild
*- 2008-12-18 Hrs ESCAN00028755 DiagService 14(hex) results OK but DTC was not cleared
*- Hrs ESCAN00032015 EcuM_GeneratorCompatibilityError(): CRC error due different StatusAvailabilityMask
*- Hrs ESCAN00032034 Invalid RTE context for callback(s) in Dem_ResetEventStatus()
*- Hrs - MISRA improvements
*- Hrs ESCAN00032302 Runtime is too long if a large event queue is configured
*- 2009-01-14 Pst ESCAN00032353 Compile error Cosmic compiler caused by inline function usage
*- 2009-01-15 Pst ESCAN00032420 Incorrect argument check with DET
*- 2009-01-16 Hrs/PstESCAN00032019 Add specific error return codes for Interfaces that do their task later in Dem_MainFuction
*- 02.06.00 2009-02-03 Hrs ESCAN00032835 Add support for J1939 complex device driver
*- Hrs ESCAN00032257 Add support for internal occurrence counter (needs GenTool_Geny v2.06.00 or later)
*- 02.07.00 2009-03-25 Hrs ESCAN00034135 Memory Abstraction: incompatible far pointer assignment in Dem_GetFreezeFrameDataIdentifierByDTC()
*- Hrs ESCAN00032537 Remove unused INLINE functions Dem_IsBit...() in Dem.c
*- Hrs ESCAN00033116 Change INLINE functions to STATIC_INLINE resp. Macro
*- Hrs ESCAN00033509 Compiler warnings due to unused INLINE functions
*- 2009-03-27 Hrs ESCAN00034212 Compiler Warning: condition is always true
*- 02.08.00 2009-04-29 Ade ESCAN00033880 Debounce algorithm 'Time based' shall be supported
*- 2009-05-13 Ade ESCAN00035070 Used PrimemIndex instead of ChronoIndex
*- 2009-06-30 Hrs ESCAN00035235 Wrong return value for Dem_NvDataInit() callback function
*- 2009-06-30 Hrs ESCAN00035888 Service 0x19 0x05, 0x06 runtime optimization
*- 2009-06-30 Hrs ESCAN00036021 Add support for variant handling
*- 2009-07-06 Hrs ESCAN00036186 pre-processor checks for building the library
*- 2009-07-07 Hrs ESCAN00035803 Compiler warning: undefined behavior: the order of volatile accesses is undefined
*- 2009-07-23 Hrs - MISRA improvements
*- 2009-07-30 Hrs ESCAN00036752 DCM: Optimized 0x19 0x04/0x05 DEM interaction
*- 2009-08-12 Hrs - Rework Dem_ConfigType
*- Hrs - Invalid Response to DCM for DTCs without configured snapshot records
*- 02.08.03 2009-09-14 Hrs - Avoid MISRA violation on not using return value of Dem_AQPush() with DEM_DEV_ERROR_DETECT == STD_OFF
*- 2009-10-27 Hrs ESCAN00038154 DET trigger caused by event without snapshot records during 19 03 request
*- Hrs ESCAN00038434 ServiceId 0x3d was ambivalent (was used with different services/APIs as ApiId with Det_ReportError() )
*- 2009-11-03 Hrs ESCAN00038377 With configuration variant PreCompile the API Dem_GetVersionInfo was implemented as macro
*- Hrs ESCAN00038596 Runtime optimization for implementation of service 19 02/08/0A/0F/13/14
*- Hrs ESCAN00038166 The status bits warningIndicatorRequest and pendingDTC are wrongly considered to detect status changes
*- Hrs ESCAN00034411 When event is not stored in the primary memory, occurrence counter was not reported
*- 2009-11-04 Hrs ESCAN00038267 Unexpected positive response on requests with unsupported extended records (19 06)
*- 02.09.00 2010-02-10 Mhe ESCAN00040744 Adapt version check to new GENy dll 2.10.00
*- 02.10.00 2010-02-12 Hrs ESCAN00040807 Prepare source code for non-library deliveries
*- 02.11.00 2010-03-03 Pst ESCAN00040736 Harmonize format of justification for MISRA violations to support CDK
*- 2010-03-08 Pst ESCAN00040293 Configuration of Warning Indicator Bit was not possible in CANdelaStudio
*- Pst ESCAN00044699 WarningIndicator Bit is toggling with TestFailed Bit
*- 2010-04-01 Hrs ESCAN00039686 Compile error: missing compiler abstraction with cast (Dem_MaxDataValueType *) and (Dem_MaxExtendedDataRecordType *)
*- 2010-04-27 Hrs ESCAN00042368 Negative response of DCM/CANdesc on requests 0x19 0x04/0x05/0x06 when no snapshot / extended record is stored
*- 02.12.00 2010-07-02 Pst - Update of generator version
*- 02.13.00 2010-08-11 Hrs ESCAN00043460 Refactoring: Reduce length of identifiers
*- 2010-08-11 Hrs ESCAN00044591 Sort list of API IDs
*- 02.13.01 2010-10-12 Hrs ESCAN00045945 Compiler error when using microcontroller with Paged RAM
*- 02.14.00 2010-11-30 Hrs ESCAN00047312 Avoid nesting of Compiler Abstraction macros - P2VAR(P2CONST(...), ...)
*- 2010-11-30 Hrs ESCAN00045036 Unify the call sequence of Dem_TriggerOnEvent() and DemCfg_GetInitMonitorFPtr()
*- 2010-11-30 Hrs ESCAN00046243 Adapt AUTOSAR version check
*- 2010-12-01 Hrs ESCAN00047083 Remove NvM_GetErrorStatus() from Dem_Init()
*- 02.15.00 2011-07-18 Hrs ESCAN00048026 Neg. Response ConditionNotCorrect in Diagnostic Services 19 0b, 19 0c, 19 0d, 19 0e
*- 2011-05-30 Hrs ESCAN00048456 Discarding of BSW events with status PASSED
*- 2011-05-30 Hrs ESCAN00050016 Compiler error: "incompatible pointer types"
*- 2011-06-07 Hrs ESCAN00051402 Optimize internal implementation of indicator handling
*- 02.15.01 2011-09-21 Hrs ESCAN00053506 AR3-2069: Remove non-SchM code for critical section handling
*- 2011-09-21 Hrs ESCAN00051740 Remove the AUTOSAR Release Version Check
*- 2011-09-21 Hrs ESCAN00052142 Remove DET check for a severity mask which is out of range
*- 2011-09-21 Hrs ESCAN00051381 Global variable 'Dem_ActiveVariant' not initialized with wrong startup sequence
*- 2011-09-21 Hrs ESCAN00052896 Replace internal error code "DEM_E_INV_SFN" with "DEM_E_PARAM_DATA"
*- 2011-09-21 Hrs ESCAN00048945 Use standard include guard for Dem.h: #if defined (DEM_H)
*- 02.16.00 2011-10-06 Hrs - Update to GENy version 3.09.00
*- 2011-10-06 Hrs ESCAN00054082 Wrong Indicator calculation
*- 2011-10-07 Hrs ESCAN00051904 Time-based debouncing - DTC will not qualify
*- 02.16.01 2011-11-07 Dmc ESCAN00054573 DTC self healing was delayed by one cycle
*- 2011-11-10 Ade ESCAN00054752 Wrong Indicator calculation
*- 2011-11-21 Ade ESCAN00054874 Compiler Warning: constant out of range
*/
/*****************************************************************************************************************/ /**
*
* ************ This is version and change information of high level part only **********
* ************ Please find the version number of the whole module in the previous file header. **********
* AUTHOR IDENTITY
* -------------------------------------------------------------------------------------------------------------------
* \author Initials Company
* -------------------------------------------------------------------------------------------------------------------
*- <NAME> Hrs Vector Informatik GmbH
*- <NAME> Pst Vector Informatik GmbH
* -------------------------------------------------------------------------------------------------------------------
* REVISION HISTORY
* -------------------------------------------------------------------------------------------------------------------
* \version Date Author Change Id Description
* -------------------------------------------------------------------------------------------------------------------
*- 02.00.00 2007-12-07 Hrs - Initial Version (after KB split) implementing ASR DEM 2.1.1
*- Check for wrong (unsupported) DTCorigin in Dem_GetStatusOfDTC (Dem171)
*- Fix severity filtering in Dem_SetDTCFilter() to support filter mask instead value
*- Replace nil function pointer from Vector's V_NULL to Autosar's NULL_PTR
*- Use BCD coding for DEM_SW_MAJOR_VERSION DEM_SW_MINOR_VERSION DEM_SW_PATCH_VERSION
*- Improve MISRA compliance
*- Use Dem_DataRecordSizeType instead of DataSizeType
*- Remove dependency to vector standard types
*- Replace DemAssert by Dem_DetReportError()
*- 02.00.01 2008-01-18 Hrs - Modified KB split to support further OEM (transparent for existing ones)
*- 02.00.02 2008-02-01 Hrs - Prepare for showing Beta-Disclaimer (if appropriate)
*- 02.00.03 2008-03-25 Hrs ESCAN00025430 Port interface Dem_GetDTCOfEvent returns DTC number 0xFFFFFFFF for event ID 0 and internal event IDs
*- 02.00.04 2008-03-27 Hrs - Change DetReportError value in Dem_UpdateSnapshotRecord()
*- Internal rework to support further OEM
*- 02.00.05 2008-03-28 Hrs - Different decision for support/not support of RTE in Dem_IntTypes.h
*- 02.00.06 2008-03-28 Hrs - In Dem_IsSupportedDtcOrigin would be no return value if DEM_TYPE_OF_ORIGIN_SUPPORTED was not defined
*- 02.00.07 2008-04-02 Hrs - [internal] KB-Hook for Version header
*- 02.01.00 2008-04-09 Hrs ESCAN00025861 The event status of internal events (BSW errors) was not updated
*- 02.01.01 2008-04-09 Hrs ESCAN00025919 Dem_ResetEventStatus() changed event status after calling Dem_DisableEventStatusUpdate()
*- 02.01.02 2008-04-28 Hrs ESCAN00026262 Rename files and #include statements according coding styles
*- 03.00.00 2008-07-29 Hrs - Initial KB R3.0 (based on core 02.01.02)
*- ESCAN00026730 No parameter check in function Dem_EnableEventStatusUpdate() for invalid argument values of 'DTCKind'
*- 2008-08-04 Hrs ESCAN00024538 <Xxx>_DemInitMonitor{EventName} is triggered by Dem_ClearDTC() only if the DTC is stored (in PrimaryMem)
*- 2008-08-05 Pst ESCAN00029069 Declaration of prototype is incompatible with "uint8 Dem_IsValidSsRecordNumber(uint8)"
*- 03.00.01 2008-08-27 Hrs - Add versioncheck for Std_Types.h
*- 2008-09-08 Hrs - Reorder content of Dem_AQElementType to circumvent alignment problems
*- ESCAN00029157 Data corruption after PostBuild
*/
/* ************ This is version and change information of high level part only **********
* ************ Please find the version number of the whole module in the previous file header. **********
*********************************************************************************************************************/
#if !defined(DEM_TYPES_H)
#define DEM_TYPES_H
/**********************************************************************************************************************
* INCLUDES
*********************************************************************************************************************/
/* for typedef Dem_DtcStatusByteType we require #include "Dem_Cfg.h" */
#if defined(DEM_CFG_H) || defined(__DEM_CFG_H__)
#else
#error "Wrong #include sequence: Please include \"Dem_Cfg.h\" before including file \"Dem_Types.h\""
#endif
/**
* File Rte_Type.h contains the typedefs and defines which are required as PortInterface argument
* and also used in the DEM. If we are not using the RTE, the types will be defined by ourself below
*/
#if (DEM_USE_RTE == STD_ON)
#include "Rte_Type.h"
#endif
/**********************************************************************************************************************
* GLOBAL CONSTANT MACROS
*********************************************************************************************************************/
#define DEM_NVDATA_PATTERN_SIZE 4
/**********************************************************************************************************************
* GLOBAL FUNCTION MACROS
*********************************************************************************************************************/
/**********************************************************************************************************************
* GLOBAL DATA TYPES AND STRUCTURES
*********************************************************************************************************************/
/*
* If we don't have RTE, that defines PortInterface typedefs and defines, we will do it ourself here:
* With RTE, these definitions are imported above via #include "Rte_Type.h".
* The Vector RTE (RTE_VENDOR_ID==0x1Eu) will suppress (optimize) some defines/typedefs, if a port is not configured.
* In this case we define the types here to avoid compile errors.
* For NON-Vector RTE, we cannot detect the suppression of the definition, so such RTE must always generate
* all required datatype definitions.
*/
#if defined(RTE_VENDOR_ID)
# if (RTE_VENDOR_ID == 0x1Eu)
# define DEM_USE_RTE_FROM_VECTOR STD_ON
# else
# define DEM_USE_RTE_FROM_VECTOR STD_OFF
# endif
#else
# define DEM_USE_RTE_FROM_VECTOR STD_OFF
#endif
/* StatusMaskType is used in DCM-API: SetDTCFilter, GetStatusOfDTC, GetDTCStatusAvailabilityMask and GetNextFilteredDTC
* and SW-C/FIM API TriggerOnDTCStatus. It contains status bits (typically) masked with the status availability mask.
* This is one of the external status types, /see Dem_EventStatusExtendedType */
#if (DEM_USE_RTE == STD_OFF) || ((DEM_USE_RTE == STD_ON) && (DEM_USE_RTE_FROM_VECTOR == STD_ON) && (! defined(Rte_TypeDef_Dem_DTCStatusMaskType)))
typedef uint8 Dem_DTCStatusMaskType; /* DTCStatusMask as defined in ISO14229-1 */
#endif
#if (DEM_USE_RTE == STD_OFF) || ((DEM_USE_RTE == STD_ON) && (DEM_USE_RTE_FROM_VECTOR == STD_ON) && (! defined(Rte_TypeDef_Dem_DTCType)))
typedef uint32 Dem_DTCType;
#endif
#if (DEM_USE_RTE == STD_OFF) || ((DEM_USE_RTE == STD_ON) && (DEM_USE_RTE_FROM_VECTOR == STD_ON) && (! defined(Rte_TypeDef_Dem_DTCKindType)))
typedef uint8 Dem_DTCKindType;
#define DEM_DTC_KIND_ALL_DTCS 0x01 /* Select all DTCs */
#define DEM_DTC_KIND_EMISSION_REL_DTCS 0x02 /* Select OBD-relevant DTCs */
#endif
/* DTC number type (Dem_EventIdType) is dependent on pre-configured, maximum possible DTC count (+1). */
#if (DEM_USE_RTE == STD_OFF) || ((DEM_USE_RTE == STD_ON) && (DEM_USE_RTE_FROM_VECTOR == STD_ON) && (! defined(Rte_TypeDef_Dem_EventIdType)))
# if (DEM_MAX_NUMBER_OF_EVENTS <= 255)
typedef uint8 Dem_EventIdType;
# else
typedef uint16 Dem_EventIdType;
# endif
#endif
typedef P2VAR(Dem_EventIdType, TYPEDEF, DEM_VAR_NOINIT) Dem_EventIdPtrType; /* PRQA S 0850 */ /* MD_MSR_19.8 */
/* EventStatusExtendedType is used in SWC-API: ResetEventStatus, GetEventStatus, GetEventFailed and GetEventTested
* and SW-C/FIM API TriggerOnEventStatus. It contains the full set of status bits (unmasked).
* This is one of the external status types, /see Dem_DTCStatusMaskType
*/
#if (DEM_USE_RTE == STD_OFF) || ((DEM_USE_RTE == STD_ON) && (DEM_USE_RTE_FROM_VECTOR == STD_ON) && (! defined(Rte_TypeDef_Dem_EventStatusExtendedType)))
typedef uint8 Dem_EventStatusExtendedType; /* DEM definition, currently(!) identical to Status bits of ISO 14229-1 */
#endif
#if (DEM_USE_RTE == STD_OFF) || ((DEM_USE_RTE == STD_ON) && (DEM_USE_RTE_FROM_VECTOR == STD_ON) && (! defined(Rte_TypeDef_Dem_FaultDetectionCounterType)))
typedef sint8 Dem_FaultDetectionCounterType;
#endif
/* typedef uint8 Dem_DTCTranslationFormatType; not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
/* #define DEM_DTC_TRANSLATION_ISO15031_6 0x01 not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
/* #define DEM_DTC_TRANSLATION_ISO14229_1 0x02 not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
/* #define DEM_DTC_TRANSLATION_CUSTOMER 0x03 not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
/* #define DEM_DTC_TRANSLATION_INTERNAL 0x04 not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
#if (DEM_USE_RTE == STD_OFF) || ((DEM_USE_RTE == STD_ON) && (DEM_USE_RTE_FROM_VECTOR == STD_ON) && (! defined(Rte_TypeDef_Dem_EventStatusType)))
typedef uint8 Dem_EventStatusType;
#define DEM_EVENT_STATUS_PASSED 0x00 /* Event debouncing by Monitor Function - result is testPassed */
#define DEM_EVENT_STATUS_FAILED 0x01 /* Event debouncing by Monitor Function - result is testFailed */
#define DEM_EVENT_STATUS_PREPASSED 0x02 /* Event debouncing by DEM module - Monitor Function reports testPassed */
#define DEM_EVENT_STATUS_PREFAILED 0x03 /* Event debouncing by DEM module - Monitor Function reports testFailed */
#endif
#if (DEM_USE_RTE == STD_OFF) || ((DEM_USE_RTE == STD_ON) && (DEM_USE_RTE_FROM_VECTOR == STD_ON) && (! defined(Rte_TypeDef_Dem_IndicatorStatusType)))
typedef uint8 Dem_IndicatorStatusType;
#define DEM_INDICATOR_OFF 0x00 /* Indicator off */
#define DEM_INDICATOR_CONTINUOUS 0x01 /* Continuous on */
#define DEM_INDICATOR_BLINKING 0x02 /* blinking mode */
#define DEM_INDICATOR_BLINK_CONT 0x03 /* Continuous and blinking mode */
#endif
#if (DEM_USE_RTE == STD_OFF) || ((DEM_USE_RTE == STD_ON) && (DEM_USE_RTE_FROM_VECTOR == STD_ON) && (! defined(Rte_TypeDef_Dem_InitMonitorKindType)))
typedef uint8 Dem_InitMonitorKindType;
#define DEM_INIT_MONITOR_CLEAR 0x01 /* Monitor Function of the EventId is cleared and all internal values and states are reset. */
#define DEM_INIT_MONITOR_RESTART 0x02 /* Monitor Function of the EventId is requested to restart. */
#endif
#if (DEM_USE_RTE == STD_OFF) || ((DEM_USE_RTE == STD_ON) && (DEM_USE_RTE_FROM_VECTOR == STD_ON) && (! defined(Rte_TypeDef_Dem_OperationCycleIdType)))
typedef uint8 Dem_OperationCycleIdType;
#endif
#if (DEM_USE_RTE == STD_OFF) || ((DEM_USE_RTE == STD_ON) && (DEM_USE_RTE_FROM_VECTOR == STD_ON) && (! defined(Rte_TypeDef_Dem_OperationCycleStateType)))
typedef uint8 Dem_OperationCycleStateType;
#define DEM_CYCLE_STATE_START 0x01 /* Start of operation cycle */
#define DEM_CYCLE_STATE_END 0x02 /* End of operation cycle */
#endif
/*
* The maximum buffer sizes for Snapshot-DID records resp. Ext.Data records are set by configuration.
* Dem_MaxDataValueType is the largest defined DID record
* Dem_MaxExtendedDataRecordType is the largest defined ExtendedData record
* For the API Argument definition we may use the unspecified size of the arrays instead:
*/
#if (DEM_USE_RTE == STD_OFF) || ((DEM_USE_RTE == STD_ON) && (DEM_USE_RTE_FROM_VECTOR == STD_ON) && (! defined(Rte_TypeDef_Dem_MaxDataValueType)))
typedef uint8 Dem_MaxDataValueType[]; /* PRQA S 3650 */ /* The size of the array is undetermined - according AUTOSAR it is always accessed via pointer and the user magically knows its size. */
#endif
#if (DEM_USE_RTE == STD_OFF) || ((DEM_USE_RTE == STD_ON) && (DEM_USE_RTE_FROM_VECTOR == STD_ON) && (! defined(Rte_TypeDef_Dem_MaxExtendedDataRecordType)))
typedef uint8 Dem_MaxExtendedDataRecordType[]; /* PRQA S 3650 */ /* The size of the array is undetermined - according AUTOSAR it is always accessed via pointer and the user magically knows its size. */
#endif
typedef uint8 Dem_DTCOriginType;
#define DEM_DTC_ORIGIN_PRIMARY_MEMORY 0x01 /* Event information located in the primary memory. */
#define DEM_DTC_ORIGIN_MIRROR_MEMORY 0x02 /* Event information located in the mirror memory. */
#define DEM_DTC_ORIGIN_PERMANENT 0x03 /* not supported yet */
#define DEM_DTC_ORIGIN_SECONDARY_MEMORY 0x04 /* Event information located in the secondary memory. */
/*
* These Dem_OperationCycle/HealingCycle IDs are predefined.
* Further defined cycles are simply mapped to these cycles.
*/
#define DEM_IGNITION 0
#define DEM_OBD_DCY 1
#define DEM_WARMUP 2
#define DEM_POWER 3
typedef uint8 Dem_ViewIdType;
/* internal DTC status info stored in NVRAM */
/* with R3.0 this definition is now identical to Dem_EventStatusExtendedType */
typedef uint8 Dem_DtcStatusByteType;
/*
(1u << 0) = 0x01 testFailed
(1u << 1) = 0x02 testFailedThisOperationCycle
(1u << 2) = 0x04 pendingDTC
(1u << 3) = 0x08 confirmedDTC
(1u << 4) = 0x10 testNotCompletedSinceLastClear
(1u << 5) = 0x20 testFailedSinceLastClear
(1u << 6) = 0x40 testNotCompletedThisOperationCycle
(1u << 7) = 0x80 warningIndicatorRequested
*/
#define DEM_EVENTSTATUSEXT_CLEARED_DTC 0x50 /* ISO 14229-1 status of a cleared DTC */
/* internal DTC status info in RAM (never saved to NVRAM) */
typedef uint8 Dem_DtcInternalStatusType;
/*
(1u << 0) = 0x01 filteredDTC
(1u << 1) = 0x02 prestoredEvent
(1u << 2) = 0x04 storedDTC, only if (DEM_CONFIRMEDDTC_MEANS_STOREDDTC == STD_OFF)
*/
#define DEM_GET_FFDATA_ID_ALL 0xffffu /* API Dem_GetFreezeFrameDataByDTC(): request ALL DIDs */
typedef uint32 Dem_DTCGroupType;
#define DEM_DTC_GROUP_EMISSION_REL_DTCS 0x000000uL /* ISO 14229-1 Annex D.1: groupOfDTC parameter, Emission-related systems */
/* other DEM_DTC_GROUP_xxx_DTCS are defined in Dem_Cfg.h (if necessary) */
#define DEM_DTC_GROUP_ALL_DTCS 0xffffffuL /* ISO 14229-1 Annex D.1: groupOfDTC parameter, All Groups (all DTCs) */
typedef uint8 Dem_DTCGroupKindType; /* Bit coded DTCGroup */
#define DEM_DTC_GROUPKIND_EMISSION_REL (uint8)(1u<<0)
#define DEM_DTC_GROUPKIND_POWERTRAIN (uint8)(1u<<1)
#define DEM_DTC_GROUPKIND_CHASSIS (uint8)(1u<<2)
#define DEM_DTC_GROUPKIND_BODY (uint8)(1u<<3)
#define DEM_DTC_GROUPKIND_NETWORK_COM (uint8)(1u<<4)
#define DEM_DTC_GROUPKIND_ALL_DTCS (uint8)(0xffu)
typedef struct Dem_DTCGroupMappingTypeTag
{
Dem_DTCGroupKindType GroupKind;
Dem_DTCType DTCnumber;
} Dem_DTCGroupMappingType;
typedef uint8 Dem_DTCRequestType;
#define DEM_FIRST_FAILED_DTC 0x01 /* first failed DTC requested */
#define DEM_MOST_RECENT_FAILED_DTC 0x02 /* most recent failed DTC requested */
#define DEM_FIRST_DET_CONFIRMED_DTC 0x03 /* first detected confirmed DTC requested */
#define DEM_MOST_REC_DET_CONFIRMED_DTC 0x04 /* most recently detected confirmed DTC requested */
typedef uint8 Dem_EventPriorityType;
typedef uint8 Dem_DataByteType;
typedef uint8 Dem_IndicatorIdType;
typedef uint16 Dem_NvMBlockIdType;
typedef uint8 Dem_FilterWithSeverityType;
#define DEM_FILTER_WITH_SEVERITY_YES 0x00 /* Severity information used */
#define DEM_FILTER_WITH_SEVERITY_NO 0x01 /* Severity information not used */
typedef uint8 Dem_DTCSeverityType;
#define DEM_SEVERITY_NO_SEVERITY 0x00 /* No severity information available */
#define DEM_SEVERITY_MAINTENANCE_ONLY 0x20 /* maintenance required */
#define DEM_SEVERITY_CHECK_AT_NEXT_HALT 0x40 /* check at next halt */
#define DEM_SEVERITY_CHECK_IMMEDIATELY 0x80 /* Check immediately */
/* Return values */
typedef uint8 Dem_ReturnSetDTCFilterType;
#define DEM_FILTER_ACCEPTED 0x00 /* Filter was accepted */
#define DEM_WRONG_FILTER 0x01 /* Wrong filter selected */
typedef uint8 Dem_FilterForFaultDetectionCounterType;
#define DEM_FILTER_FOR_FDC_YES 0x00 /* Fault Detection Counter information used */
#define DEM_FILTER_FOR_FDC_NO 0x01 /* Fault Detection Counter information not used */
/* #define DEM_FILTER_FOR_FAULTDETECTIONCOUNTER_YES 0x00 not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
/* #define DEM_FILTER_FOR_FAULTDETECTIONCOUNTER_NO 0x01 not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
typedef uint8 Dem_ReturnSetViewFilterType;
#define DEM_VIEW_ID_ACCEPTED 0x00 /* View ID was accepted */
#define DEM_WRONG_ID 0x01 /* Wrong View ID selected */
typedef uint8 Dem_ReturnGetStatusOfDTCType;
#define DEM_STATUS_OK 0x00 /* Status of DTC is OK */
#define DEM_STATUS_WRONG_DTC 0x01 /* Wrong DTC */
#define DEM_STATUS_WRONG_DTCORIGIN 0x02 /* Wrong DTC origin */
#define DEM_STATUS_WRONG_DTCKIND 0x03 /* DTC kind wrong */
#define DEM_STATUS_FAILED 0x04 /* DTC failed */
typedef uint8 Dem_ReturnGetNextFilteredDTCType;
#define DEM_FILTERED_OK 0x00 /* Returned next filtered DTC */
#define DEM_FILTERED_NO_MATCHING_DTC 0x01 /* No DTC matched */
#define DEM_FILTERED_WRONG_DTCKIND 0x02 /* DTC kind wrong */
typedef uint8 Dem_ReturnGetNumberOfFilteredDTCType;
#define DEM_NUMBER_OK 0x00 /* get of number of DTC was successful */
#define DEM_NUMBER_FAILED 0x01 /* get of number of DTC failed */
#define DEM_NUMBER_PENDING 0x02 /* get of number of DTC is pending */
typedef uint8 Dem_ReturnClearDTCType;
#define DEM_CLEAR_OK 0x00 /* DTC successfully cleared */
#define DEM_CLEAR_WRONG_DTC 0x01 /* Wrong DTC */
#define DEM_CLEAR_WRONG_DTCORIGIN 0x02 /* Wrong DTC origin */
#define DEM_CLEAR_WRONG_DTCKIND 0x03 /* DTC kind wrong */
#define DEM_CLEAR_FAILED 0x04 /* DTC not cleared */
#define DEM_DTC_PENDING 0x05 /* Clearing of DTC is pending */
typedef uint8 Dem_ReturnControlDTCStorageType;
#define DEM_CONTROL_DTC_STORAGE_OK 0x00 /* DTC storage control successful */
#define DEM_CONTROL_DTC_STORAGE_N_OK 0x01 /* DTC storage control not successful */
#define DEM_CONTROL_DTC_WRONG_DTCGROUP 0x02 /* DTC storage control not successful because group of DTC was wrong */
typedef uint8 Dem_ReturnControlEventUpdateType;
#define DEM_CONTROL_EVENT_UPDATE_OK 0x00 /* Event storage control successful */
#define DEM_CONTROL_EVENT_UPDATE_N_OK 0x01 /* Event storage control not successful */
#define DEM_CONTROL_EVENT_WRONG_DTCGROUP 0x02 /* Event storage control not successful because group of DTC was wrong */
typedef uint8 Dem_ReturnGetDTCOfFreezeFrameRecordType;
#define DEM_GET_DTCOFFF_OK 0x00 /* DTC successfully returned */
#define DEM_GET_DTCOFFF_WRONG_RECORD 0x01 /* Wrong record */
#define DEM_GET_DTCOFFF_NO_DTC_FOR_RECORD 0x02 /* No DTC for record available */
#define DEM_GET_DTCOFFF_WRONG_DTCKIND 0x03 /* DTC kind wrong */
typedef uint8 Dem_ReturnGetFreezeFrameDataIdentifierByDTCType;
#define DEM_GET_ID_OK 0x00 /* FreezeFrame data identifier successfully returned */
#define DEM_GET_ID_WRONG_DTC 0x01 /* Wrong DTC */
#define DEM_GET_ID_WRONG_DTCORIGIN 0x02 /* Wrong DTC origin */
#define DEM_GET_ID_WRONG_DTCKIND 0x03 /* DTC kind wrong */
#define DEM_GET_ID_WRONG_FF_TYPE 0x04 /* FreezeFrame type wrong */
typedef uint8 Dem_ReturnGetExtendedDataRecordByDTCType;
#define DEM_RECORD_OK 0x00 /* Extended data record successfully returned */
#define DEM_RECORD_WRONG_DTC 0x01 /* Wrong DTC */
#define DEM_RECORD_WRONG_DTCORIGIN 0x02 /* Origin wrong */
#define DEM_RECORD_WRONG_DTCKIND 0x03 /* DTC kind wrong */
#define DEM_RECORD_WRONG_NUMBER 0x04 /* Record number wrong */
#define DEM_RECORD_WRONG_BUFFERSIZE 0x05 /* Provided buffer to small */
/* typedef uint8 Dem_ReturnGetDTCOfEventType; not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
/* #define DEM_GET_DTCOFEVENT_OK 0x00 not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
/* #define DEM_GET_DTCOFEVENT_WRONG_EVENTID 0x01 wrong definition by ch 11.3 in DEM Spec V2.2.1 (R3.0 Rev 0002), see below */
/* #define DEM_GET_DTCOFEVENT_WRONG_TRANSLATION 0x02 not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
#define DEM_GET_DTCOFEVENT_WRONG_EVENTID 0x05 /* Wrong EventId (see Dem198) */
#define DEM_GET_DTCOFEVENT_WRONG_DTCKIND 0x04 /* DTC kind wrong (see Dem198) */
typedef uint8 Dem_ReturnGetDTCByOccurrenceTimeType;
#define DEM_OCCURR_OK 0x00 /* Status of DTC was OK */
#define DEM_OCCURR_WRONG_DTCKIND 0x01 /* DTC kind wrong */
#define DEM_OCCURR_FAILED 0x02 /* DTC failed */
typedef uint8 Dem_ReturnGetFreezeFrameDataByDTCType;
#define DEM_GET_FFDATABYDTC_OK 0x00 /* Size successfully returned */
#define DEM_GET_FFDATABYDTC_WRONG_DTC 0x01 /* Wrong DTC */
#define DEM_GET_FFDATABYDTC_WRONG_DTCORIGIN 0x02 /* Wrong DTC origin */
#define DEM_GET_FFDATABYDTC_WRONG_DTCKIND 0x03 /* DTC kind wrong */
#define DEM_GET_FFDATABYDTC_WRONG_RECORDNUMBER 0x04 /* Wrong Record Number */
#define DEM_GET_FFDATABYDTC_WRONG_DATAID 0x05 /* Wrong DataID */
#define DEM_GET_FFDATABYDTC_WRONG_BUFFERSIZE 0x06 /* provided buffer size to small */
typedef uint8 Dem_ReturnGetSizeOfExtendedDataRecordByDTCType;
#define DEM_GET_SIZEOFEDRBYDTC_OK 0x00 /* Size successfully returned */
#define DEM_GET_SIZEOFEDRBYDTC_W_DTC 0x01 /* Wrong DTC */
#define DEM_GET_SIZEOFEDRBYDTC_W_DTCOR 0x02 /* Wrong DTC origin */
#define DEM_GET_SIZEOFEDRBYDTC_W_DTCKI 0x03 /* DTC kind wrong */
#define DEM_GET_SIZEOFEDRBYDTC_W_RNUM 0x04 /* Wrong Record Number */
/* #define DEM_GET_SIZEOFEDRBYDTCTYPE_OK 0x00 not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
/* #define DEM_GET_SIZEOFEDRBYDTCTYPE_WRONG_DTC 0x01 not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
/* #define DEM_GET_SIZEOFEDRBYDTCTYPE_WRONG_DTCORIGIN 0x02 not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
/* #define DEM_GET_SIZEOFEDRBYDTCTYPE_WRONG_DTCKIND 0x03 not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
/* #define DEM_GET_SIZEOFEDRBYDTCTYPE_WRONG_RECORDNUMBER 0x04 not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
typedef uint8 Dem_ReturnGetSizeOfFreezeFrameType;
#define DEM_GET_SIZEOFFF_OK 0x00 /* Size successfully returned. */
#define DEM_GET_SIZEOFFF_WRONG_DTC 0x01 /* Wrong DTC */
#define DEM_GET_SIZEOFFF_WRONG_DTCOR 0x02 /* Wrong DTC origin */
#define DEM_GET_SIZEOFFF_WRONG_DTCKIND 0x03 /* DTC kind wrong */
#define DEM_GET_SIZEOFFF_WRONG_RNUM 0x04 /* Wrong Record Number */
/* #define DEM_GET_SIZEOFFREEZEFRAMETYPE_OK 0x00 not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
/* #define DEM_GET_SIZEOFFREEZEFRAMETYPE_WRONG_DTC 0x01 not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
/* #define DEM_GET_SIZEOFFREEZEFRAMETYPE_WRONG_DTCORIGIN 0x02 not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
/* #define DEM_GET_SIZEOFFREEZEFRAMETYPE_WRONG_DTCKIND 0x03 not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
/* #define DEM_GET_SIZEOFFREEZEFRAMETYPE_WRONG_RECORDNUMBER 0x04 not used any more in DEM Spec V2.2.1 (R3.0 Rev 0002) */
typedef uint8 Dem_ReturnGetViewIDOfDTCType;
#define DEM_VIEWID_OK 0x00 /* Status of ViewId is OK */
#define DEM_VIEWID_WRONG_DTC 0x01 /* Wrong DTC */
#define DEM_VIEWID_WRONG_DTCKIND 0x02 /* DTC kind wrong */
typedef uint8 Dem_ReturnGetSeverityOfDTCType;
#define DEM_GET_SEVERITYOFDTC_OK 0x00 /* Severity successfully returned. */
#define DEM_GET_SEVERITYOFDTC_WRONG_DTC 0x01 /* Wrong DTC */
#define DEM_GET_SEVERITYOFDTC_WRONG_DTCORIGIN 0x02 /* Wrong DTC origin (unused) */
#define DEM_GET_SEVERITYOFDTC_NOSEVERITY 0x03 /* Severity information is not available */
typedef P2FUNC(Std_ReturnType, DEM_APPL_CODE, Dem_InitMonitorFPtrType) (Dem_InitMonitorKindType InitMonitorKind); /* PRQA S 0850 */ /* MD_MSR_19.8 */
typedef P2FUNC(Std_ReturnType, DEM_APPL_CODE, Dem_GetDataValueByDataIdentifierType) (P2VAR(Dem_MaxDataValueType, AUTOMATIC, DEM_APPL_DATA) /* DataValueByDataIDBuffer */); /* buffer argument's type is (uint8 *[]) see Bugzillas #22258 and #22401 */ /* PRQA S 0850, 3651 */ /* MD_MSR_19.8, MD_DEM_3651 */
typedef P2FUNC(Std_ReturnType, DEM_APPL_CODE, Dem_GetExtDataRecordFPtrType) (P2VAR(Dem_MaxExtendedDataRecordType, AUTOMATIC, DEM_APPL_DATA) /* ExtendedDataRecordBuffer */); /* buffer argument's type is (uint8 *[]) see Bugzillas #22258 and #22401 */ /* PRQA S 0850, 3651 */ /* MD_MSR_19.8, MD_DEM_3651 */
typedef uint16 Dem_TriggerOnEventIndexType;
typedef uint16 Dem_TriggerOnDTCIndexType;
typedef P2FUNC(Std_ReturnType, DEM_APPL_CODE, Dem_TriggerFunctionType) (Dem_EventStatusExtendedType EventStatusOld, Dem_EventStatusExtendedType EventStatusNew); /* PRQA S 0850 */ /* MD_MSR_19.8 */
typedef P2FUNC(Std_ReturnType, DEM_APPL_CODE, Dem_TriggerDTCFunctionType) (Dem_DTCType DTC, Dem_DTCKindType DTCKind, Dem_DTCStatusMaskType DTCStatusOld, Dem_DTCStatusMaskType DTCStatusNew); /* PRQA S 0850 */ /* MD_MSR_19.8 */
typedef P2CONST(uint16, TYPEDEF, DEM_PBCFG) Dem_RecordDIDAddrType; /* PRQA S 0850 */ /* MD_MSR_19.8 */
/* Action queue for storing API call triggers. Queue is drained in Dem_MainFunction() */
typedef struct
{
union
{ /* PRQA S 0750 */ /* MD_MSR_18.4 */
struct
{
Dem_EventIdType EventIdentifier; /* uint8/uint16 */
Dem_EventStatusType Status; /* 2 bit */
} event;
struct
{
Dem_OperationCycleIdType CycleId; /* uint8 */
Dem_OperationCycleStateType CycleState; /* 2 bit */
} opcycle;
struct
{
Dem_DTCGroupKindType BitcodedDtcGroup; /* uint8 */
Dem_DTCKindType DTCKind; /* 2 bit */
Dem_DTCOriginType DTCOrigin; /* 2 bit */
} dtc;
} arg;
uint8 Action;
} Dem_AQElementType;
/*
typedef struct Dem_NonVolatileDataTypeTag {...} Dem_NonVolatileDataType;
is in file Dem_Lcfg.h, as the size of Dem_NonVolatileDataType is dependent on
the (PostBuild) selectable number of events, ...
Someone might think the size is constant, when the typedef is written here together
with other constant types.
*/
#if (DEM_SUPPORT_MULTIPLE_CONFIG == STD_ON) || (DEM_SUPPORT_VARIANT_HANDLING == STD_ON) || (DEM_PREINIT_HAS_CONFIG_PARAM == STD_ON)
/* Support of configuration parameter with Dem_PreInit(), used with multiple configuration and variant handling */
typedef struct
{
uint32 ConfigurationMask; /* this parameter is a bitfield */
} Dem_ConfigType;
#endif /* DEM_SUPPORT_MULTIPLE_CONFIG || DEM_SUPPORT_VARIANT_HANDLING || DEM_PREINIT_HAS_CONFIG_PARAM */
/**********************************************************************************************************************
* GLOBAL DATA PROTOTYPES
*********************************************************************************************************************/
/**********************************************************************************************************************
* GLOBAL FUNCTION PROTOTYPES
*********************************************************************************************************************/
#endif /* DEM_TYPES_H */
<file_sep>/BSP/MCAL/Pwm/Pwm_PBcfg.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* File name = Pwm_PBcfg.c */
/* Version = 3.1.2 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains post-build time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.1.5
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_PWM_V308_140113_HEADLAMP.arxml
* GENERATED ON: 8 Apr 2014 - 18:39:24
*/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Pwm_PBTypes.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define PWM_PBCFG_C_AR_MAJOR_VERSION 2
#define PWM_PBCFG_C_AR_MINOR_VERSION 2
#define PWM_PBCFG_C_AR_PATCH_VERSION 0
/* File version information */
#define PWM_PBCFG_C_SW_MAJOR_VERSION 3
#define PWM_PBCFG_C_SW_MINOR_VERSION 1
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (PWM_PBTYPES_AR_MAJOR_VERSION != PWM_PBCFG_C_AR_MAJOR_VERSION)
#error "Pwm_PBcfg.c : Mismatch in Specification Major Version"
#endif
#if (PWM_PBTYPES_AR_MINOR_VERSION != PWM_PBCFG_C_AR_MINOR_VERSION)
#error "Pwm_PBcfg.c : Mismatch in Specification Minor Version"
#endif
#if (PWM_PBTYPES_AR_PATCH_VERSION != PWM_PBCFG_C_AR_PATCH_VERSION)
#error "Pwm_PBcfg.c : Mismatch in Specification Patch Version"
#endif
#if (PWM_SW_MAJOR_VERSION != PWM_PBCFG_C_SW_MAJOR_VERSION)
#error "Pwm_PBcfg.c : Mismatch in Major Version"
#endif
#if (PWM_SW_MINOR_VERSION != PWM_PBCFG_C_SW_MINOR_VERSION)
#error "Pwm_PBcfg.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
#define PWM_START_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
/* Pwm Channel Configuration */
CONST(Pwm_ConfigType, PWM_CONST) Pwm_GstConfiguration[] =
{
/* 0 - 1 */
{
/* ulStartOfDbToc */
0x05DE4308,
/* pTAUABCUnitConfig */
&Pwm_GstTAUABCUnitConfig[0],
/* pChannelConfig */
&Pwm_GstChannelConfig[0],
/* pChannelTimerMap */
&Pwm_GaaTimerChIdx[0],
/* pChannelIdleStatus */
&Pwm_GaaChannelIdleStatus[0]
}
};
#define PWM_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#include "MemMap.h"
#define PWM_START_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
/* Structure for each TAUA Unit Configuration set */
CONST(Tdd_Pwm_TAUABCUnitConfigType,PWM_CONST) Pwm_GstTAUABCUnitConfig[] =
{
/* TAUA, B or C Index: 0 */
{
/* pTAUABCUnitUserCntlRegs */
(P2VAR(Tdd_Pwm_TAUABCUnitUserRegs, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF808040ul,
/* pTAUABCUnitOsCntlRegs */
(P2VAR(Tdd_Pwm_TAUABCUnitOsRegs, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF808240ul,
/* usTAUChannelMask */
0x0055,
/* usTOMMask */
0x0054,
/* usTOCMask */
0x0000,
/* usTOLMask */
0x0054,
/* usTOMask */
0x0000,
/* usTOEMask */
0x0054,
/* usPrescaler */
0xFFF3,
/* ucBaudRate */
0xFF,
/* blConfigurePrescaler */
PWM_TRUE,
/* uiPwmTAUType */
PWM_HW_TAUA
},
/* TAUA, B or C Index: 1 */
{
/* pTAUABCUnitUserCntlRegs */
(P2VAR(Tdd_Pwm_TAUABCUnitUserRegs, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809040ul,
/* pTAUABCUnitOsCntlRegs */
(P2VAR(Tdd_Pwm_TAUABCUnitOsRegs, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809240ul,
/* usTAUChannelMask */
0xF5FF,
/* usTOMMask */
0xA4AA,
/* usTOCMask */
0x0000,
/* usTOLMask */
0xF1FE,
/* usTOMask */
0x0000,
/* usTOEMask */
0xA4AA,
/* usPrescaler */
0xFFF3,
/* ucBaudRate */
0x00,
/* blConfigurePrescaler */
PWM_TRUE,
/* uiPwmTAUType */
PWM_HW_TAUB
},
/* TAUA, B or C Index: 2 */
{
/* pTAUABCUnitUserCntlRegs */
(P2VAR(Tdd_Pwm_TAUABCUnitUserRegs, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A040ul,
/* pTAUABCUnitOsCntlRegs */
(P2VAR(Tdd_Pwm_TAUABCUnitOsRegs, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A240ul,
/* usTAUChannelMask */
0x0FFF,
/* usTOMMask */
0x0AAA,
/* usTOCMask */
0x0000,
/* usTOLMask */
0x0FFE,
/* usTOMask */
0x0000,
/* usTOEMask */
0x0AAA,
/* usPrescaler */
0xFFF0,
/* ucBaudRate */
0x00,
/* blConfigurePrescaler */
PWM_TRUE,
/* uiPwmTAUType */
PWM_HW_TAUC
},
/* TAUA, B or C Index: 3 */
{
/* pTAUABCUnitUserCntlRegs */
(P2VAR(Tdd_Pwm_TAUABCUnitUserRegs, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80B040ul,
/* pTAUABCUnitOsCntlRegs */
(P2VAR(Tdd_Pwm_TAUABCUnitOsRegs, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80B240ul,
/* usTAUChannelMask */
0x000F,
/* usTOMMask */
0x000E,
/* usTOCMask */
0x0000,
/* usTOLMask */
0x000E,
/* usTOMask */
0x0000,
/* usTOEMask */
0x000E,
/* usPrescaler */
0xFFF0,
/* ucBaudRate */
0x00,
/* blConfigurePrescaler */
PWM_TRUE,
/* uiPwmTAUType */
PWM_HW_TAUC
}
};
/* Structure for each TAUJ Unit Configuration set */
/* CONST(Tdd_Pwm_TAUJUnitConfigType,PWM_CONST) Pwm_GstTAUJUnitConfig[]; */
/* Structure for TAUA or TAUB or TAUC Configuration set */
CONST(Tdd_Pwm_TAUABCProperties,PWM_CONST) Pwm_GstTAUABCChannelConfig[] =
{
/* TAUA or TAUB or TAUC Channel Index: 0 */
{
/* usDefaultPeriod */
0x0D05,
/* usChannelMask */
0x0055
},
/* TAUA or TAUB or TAUC Channel Index: 1 */
{
/* usDefaultDuty */
0x8000,
/* usChannelMask */
0x0004
},
/* TAUA or TAUB or TAUC Channel Index: 2 */
{
/* usDefaultDuty */
0x8000,
/* usChannelMask */
0x0010
},
/* TAUA or TAUB or TAUC Channel Index: 3 */
{
/* usDefaultDuty */
0x8000,
/* usChannelMask */
0x0040
},
/* TAUA or TAUB or TAUC Channel Index: 4 */
{
/* usDefaultPeriod */
0x001B,
/* usChannelMask */
0x000F
},
/* TAUA or TAUB or TAUC Channel Index: 5 */
{
/* usDefaultDuty */
0x8000,
/* usChannelMask */
0x0002
},
/* TAUA or TAUB or TAUC Channel Index: 6 */
{
/* usDefaultDuty */
0x4000,
/* usChannelMask */
0x0004
},
/* TAUA or TAUB or TAUC Channel Index: 7 */
{
/* usDefaultDuty */
0x8000,
/* usChannelMask */
0x0008
},
/* TAUA or TAUB or TAUC Channel Index: 8 */
{
/* usDefaultPeriod */
0x001B,
/* usChannelMask */
0x0003
},
/* TAUA or TAUB or TAUC Channel Index: 9 */
{
/* usDefaultDuty */
0x4000,
/* usChannelMask */
0x0002
},
/* TAUA or TAUB or TAUC Channel Index: 10 */
{
/* usDefaultPeriod */
0x001B,
/* usChannelMask */
0x000C
},
/* TAUA or TAUB or TAUC Channel Index: 11 */
{
/* usDefaultDuty */
0x4000,
/* usChannelMask */
0x0008
},
/* TAUA or TAUB or TAUC Channel Index: 12 */
{
/* usDefaultPeriod */
0x001B,
/* usChannelMask */
0x0030
},
/* TAUA or TAUB or TAUC Channel Index: 13 */
{
/* usDefaultDuty */
0x4000,
/* usChannelMask */
0x0020
},
/* TAUA or TAUB or TAUC Channel Index: 14 */
{
/* usDefaultPeriod */
0x001B,
/* usChannelMask */
0x00C0
},
/* TAUA or TAUB or TAUC Channel Index: 15 */
{
/* usDefaultDuty */
0x4000,
/* usChannelMask */
0x0080
},
/* TAUA or TAUB or TAUC Channel Index: 16 */
{
/* usDefaultPeriod */
0x001B,
/* usChannelMask */
0x0300
},
/* TAUA or TAUB or TAUC Channel Index: 17 */
{
/* usDefaultDuty */
0x4000,
/* usChannelMask */
0x0200
},
/* TAUA or TAUB or TAUC Channel Index: 18 */
{
/* usDefaultPeriod */
0x001B,
/* usChannelMask */
0x0C00
},
/* TAUA or TAUB or TAUC Channel Index: 19 */
{
/* usDefaultDuty */
0x4000,
/* usChannelMask */
0x0800
},
/* TAUA or TAUB or TAUC Channel Index: 20 */
{
/* usDefaultPeriod */
0x0D05,
/* usChannelMask */
0x0003
},
/* TAUA or TAUB or TAUC Channel Index: 21 */
{
/* usDefaultDuty */
0x8000,
/* usChannelMask */
0x0002
},
/* TAUA or TAUB or TAUC Channel Index: 22 */
{
/* usDefaultPeriod */
0x0D05,
/* usChannelMask */
0x000C
},
/* TAUA or TAUB or TAUC Channel Index: 23 */
{
/* usDefaultDuty */
0x8000,
/* usChannelMask */
0x0008
},
/* TAUA or TAUB or TAUC Channel Index: 24 */
{
/* usDefaultPeriod */
0x0D05,
/* usChannelMask */
0x0030
},
/* TAUA or TAUB or TAUC Channel Index: 25 */
{
/* usDefaultDuty */
0x8000,
/* usChannelMask */
0x0020
},
/* TAUA or TAUB or TAUC Channel Index: 26 */
{
/* usDefaultPeriod */
0x0D05,
/* usChannelMask */
0x00C0
},
/* TAUA or TAUB or TAUC Channel Index: 27 */
{
/* usDefaultDuty */
0x8000,
/* usChannelMask */
0x0080
},
/* TAUA or TAUB or TAUC Channel Index: 28 */
{
/* usDefaultPeriod */
0x0D05,
/* usChannelMask */
0x0500
},
/* TAUA or TAUB or TAUC Channel Index: 29 */
{
/* usDefaultDuty */
0x8000,
/* usChannelMask */
0x0400
},
/* TAUA or TAUB or TAUC Channel Index: 30 */
{
/* usDefaultPeriod */
0x0D05,
/* usChannelMask */
0x3000
},
/* TAUA or TAUB or TAUC Channel Index: 31 */
{
/* usDefaultDuty */
0x8000,
/* usChannelMask */
0x2000
},
/* TAUA or TAUB or TAUC Channel Index: 32 */
{
/* usDefaultPeriod */
0x0D05,
/* usChannelMask */
0xC000
},
/* TAUA or TAUB or TAUC Channel Index: 33 */
{
/* usDefaultDuty */
0x8000,
/* usChannelMask */
0x8000
}
};
/* Structure for TAUJ Configuration set */
/* CONST(Tdd_Pwm_TAUJProperties,PWM_CONST) Pwm_GstTAUJChannelConfig[]; */
/* Structure for channel Configuration set */
CONST(Tdd_Pwm_ChannelConfigType,PWM_CONST) Pwm_GstChannelConfig[] =
{
/* Channel Index: 0 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[0],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF808000,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF808200,
/* usCMORegSettingsMask */
0x0801,
/* ucMasterOffset */
0x00,
/* ucTimerUnitIndex */
0x00,
/* uiPwmTAUType */
PWM_HW_TAUA,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_MASTER_CHANNEL
},
/* Channel Index: 1 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[1],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF808008,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF808208,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x01,
/* ucTimerUnitIndex */
0x00,
/* uiPwmTAUType */
PWM_HW_TAUA,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
},
/* Channel Index: 2 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[2],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF808010,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF808210,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x02,
/* ucTimerUnitIndex */
0x00,
/* uiPwmTAUType */
PWM_HW_TAUA,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
},
/* Channel Index: 3 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[3],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF808018,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF808218,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x03,
/* ucTimerUnitIndex */
0x00,
/* uiPwmTAUType */
PWM_HW_TAUA,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
},
/* Channel Index: 4 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[20],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809000,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809200,
/* usCMORegSettingsMask */
0x0801,
/* ucMasterOffset */
0x00,
/* ucTimerUnitIndex */
0x01,
/* uiPwmTAUType */
PWM_HW_TAUB,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_MASTER_CHANNEL
},
/* Channel Index: 5 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[21],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809004,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809204,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x01,
/* ucTimerUnitIndex */
0x01,
/* uiPwmTAUType */
PWM_HW_TAUB,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
},
/* Channel Index: 6 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[22],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809008,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809208,
/* usCMORegSettingsMask */
0x0801,
/* ucMasterOffset */
0x00,
/* ucTimerUnitIndex */
0x01,
/* uiPwmTAUType */
PWM_HW_TAUB,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_MASTER_CHANNEL
},
/* Channel Index: 7 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[23],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80900C,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80920C,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x01,
/* ucTimerUnitIndex */
0x01,
/* uiPwmTAUType */
PWM_HW_TAUB,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
},
/* Channel Index: 8 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[24],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809010,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809210,
/* usCMORegSettingsMask */
0x0801,
/* ucMasterOffset */
0x00,
/* ucTimerUnitIndex */
0x01,
/* uiPwmTAUType */
PWM_HW_TAUB,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_MASTER_CHANNEL
},
/* Channel Index: 9 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[25],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809014,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809214,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x01,
/* ucTimerUnitIndex */
0x01,
/* uiPwmTAUType */
PWM_HW_TAUB,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
},
/* Channel Index: 10 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[26],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809018,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809218,
/* usCMORegSettingsMask */
0x0801,
/* ucMasterOffset */
0x00,
/* ucTimerUnitIndex */
0x01,
/* uiPwmTAUType */
PWM_HW_TAUB,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_MASTER_CHANNEL
},
/* Channel Index: 11 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[27],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80901C,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80921C,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x01,
/* ucTimerUnitIndex */
0x01,
/* uiPwmTAUType */
PWM_HW_TAUB,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
},
/* Channel Index: 12 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[28],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809020,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809220,
/* usCMORegSettingsMask */
0x0801,
/* ucMasterOffset */
0x00,
/* ucTimerUnitIndex */
0x01,
/* uiPwmTAUType */
PWM_HW_TAUB,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_MASTER_CHANNEL
},
/* Channel Index: 13 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[29],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809028,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809228,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x01,
/* ucTimerUnitIndex */
0x01,
/* uiPwmTAUType */
PWM_HW_TAUB,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
},
/* Channel Index: 14 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[30],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809030,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809230,
/* usCMORegSettingsMask */
0x0801,
/* ucMasterOffset */
0x00,
/* ucTimerUnitIndex */
0x01,
/* uiPwmTAUType */
PWM_HW_TAUB,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_MASTER_CHANNEL
},
/* Channel Index: 15 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[31],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809034,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809234,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x01,
/* ucTimerUnitIndex */
0x01,
/* uiPwmTAUType */
PWM_HW_TAUB,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
},
/* Channel Index: 16 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[32],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809038,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF809238,
/* usCMORegSettingsMask */
0x0801,
/* ucMasterOffset */
0x00,
/* ucTimerUnitIndex */
0x01,
/* uiPwmTAUType */
PWM_HW_TAUB,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_MASTER_CHANNEL
},
/* Channel Index: 17 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[33],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80903C,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80923C,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x01,
/* ucTimerUnitIndex */
0x01,
/* uiPwmTAUType */
PWM_HW_TAUB,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
},
/* Channel Index: 18 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[8],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A000,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A200,
/* usCMORegSettingsMask */
0x0801,
/* ucMasterOffset */
0x00,
/* ucTimerUnitIndex */
0x02,
/* uiPwmTAUType */
PWM_HW_TAUC,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_MASTER_CHANNEL
},
/* Channel Index: 19 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[9],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A004,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A204,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x01,
/* ucTimerUnitIndex */
0x02,
/* uiPwmTAUType */
PWM_HW_TAUC,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
},
/* Channel Index: 20 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[10],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A008,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A208,
/* usCMORegSettingsMask */
0x0801,
/* ucMasterOffset */
0x00,
/* ucTimerUnitIndex */
0x02,
/* uiPwmTAUType */
PWM_HW_TAUC,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_MASTER_CHANNEL
},
/* Channel Index: 21 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[11],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A00C,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A20C,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x01,
/* ucTimerUnitIndex */
0x02,
/* uiPwmTAUType */
PWM_HW_TAUC,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
},
/* Channel Index: 22 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[12],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A010,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A210,
/* usCMORegSettingsMask */
0x0801,
/* ucMasterOffset */
0x00,
/* ucTimerUnitIndex */
0x02,
/* uiPwmTAUType */
PWM_HW_TAUC,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_MASTER_CHANNEL
},
/* Channel Index: 23 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[13],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A014,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A214,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x01,
/* ucTimerUnitIndex */
0x02,
/* uiPwmTAUType */
PWM_HW_TAUC,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
},
/* Channel Index: 24 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[14],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A018,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A218,
/* usCMORegSettingsMask */
0x0801,
/* ucMasterOffset */
0x00,
/* ucTimerUnitIndex */
0x02,
/* uiPwmTAUType */
PWM_HW_TAUC,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_MASTER_CHANNEL
},
/* Channel Index: 25 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[15],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A01C,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A21C,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x01,
/* ucTimerUnitIndex */
0x02,
/* uiPwmTAUType */
PWM_HW_TAUC,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
},
/* Channel Index: 26 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[16],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A020,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A220,
/* usCMORegSettingsMask */
0x0801,
/* ucMasterOffset */
0x00,
/* ucTimerUnitIndex */
0x02,
/* uiPwmTAUType */
PWM_HW_TAUC,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_MASTER_CHANNEL
},
/* Channel Index: 27 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[17],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A024,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A224,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x01,
/* ucTimerUnitIndex */
0x02,
/* uiPwmTAUType */
PWM_HW_TAUC,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
},
/* Channel Index: 28 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[18],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A028,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A228,
/* usCMORegSettingsMask */
0x0801,
/* ucMasterOffset */
0x00,
/* ucTimerUnitIndex */
0x02,
/* uiPwmTAUType */
PWM_HW_TAUC,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_MASTER_CHANNEL
},
/* Channel Index: 29 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[19],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A02C,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80A22C,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x01,
/* ucTimerUnitIndex */
0x02,
/* uiPwmTAUType */
PWM_HW_TAUC,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
},
/* Channel Index: 30 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[4],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80B000,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80B200,
/* usCMORegSettingsMask */
0x0801,
/* ucMasterOffset */
0x00,
/* ucTimerUnitIndex */
0x03,
/* uiPwmTAUType */
PWM_HW_TAUC,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_MASTER_CHANNEL
},
/* Channel Index: 31 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[5],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80B004,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80B204,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x01,
/* ucTimerUnitIndex */
0x03,
/* uiPwmTAUType */
PWM_HW_TAUC,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
},
/* Channel Index: 32 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[6],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80B008,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80B208,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x02,
/* ucTimerUnitIndex */
0x03,
/* uiPwmTAUType */
PWM_HW_TAUC,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
},
/* Channel Index: 33 */
{
/* pChannelProp */
&Pwm_GstTAUABCChannelConfig[7],
/* pCntlRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80B00C,
/* pCMORRegs */
(P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)) 0xFF80B20C,
/* usCMORegSettingsMask */
0x0409,
/* ucMasterOffset */
0x03,
/* ucTimerUnitIndex */
0x03,
/* uiPwmTAUType */
PWM_HW_TAUC,
/* enClassType */
PWM_VARIABLE_PERIOD,
/* uiIdleLevel */
PWM_LOW,
/* uiTimerMode */
PWM_SLAVE_CHANNEL
}
};
/* structure for Synchronous start Configuration */
/* CONST(Tdd_PwmTAUSynchStartUseType, PWM_CONST) Pwm_GstTAUSynchStartConfig[]; */
/* Pwm Channel index array */
CONST(uint8, PWM_PRIVATE_CONST) Pwm_GaaTimerChIdx[52] =
{
/* Channel Id: 0 */
0x00,
/* Channel Id: 1 */
PWM_CHANNEL_UNCONFIGURED,
/* Channel Id: 2 */
0x01,
/* Channel Id: 3 */
PWM_CHANNEL_UNCONFIGURED,
/* Channel Id: 4 */
0x02,
/* Channel Id: 5 */
PWM_CHANNEL_UNCONFIGURED,
/* Channel Id: 6 */
0x03,
/* Channel Id: 7 */
PWM_CHANNEL_UNCONFIGURED,
/* Channel Id: 8 */
PWM_CHANNEL_UNCONFIGURED,
/* Channel Id: 9 */
PWM_CHANNEL_UNCONFIGURED,
/* Channel Id: 10 */
PWM_CHANNEL_UNCONFIGURED,
/* Channel Id: 11 */
PWM_CHANNEL_UNCONFIGURED,
/* Channel Id: 12 */
PWM_CHANNEL_UNCONFIGURED,
/* Channel Id: 13 */
PWM_CHANNEL_UNCONFIGURED,
/* Channel Id: 14 */
PWM_CHANNEL_UNCONFIGURED,
/* Channel Id: 15 */
PWM_CHANNEL_UNCONFIGURED,
/* Channel Id: 16 */
0x04,
/* Channel Id: 17 */
0x05,
/* Channel Id: 18 */
0x06,
/* Channel Id: 19 */
0x07,
/* Channel Id: 20 */
0x08,
/* Channel Id: 21 */
0x09,
/* Channel Id: 22 */
0x0A,
/* Channel Id: 23 */
0x0B,
/* Channel Id: 24 */
0x0C,
/* Channel Id: 25 */
PWM_CHANNEL_UNCONFIGURED,
/* Channel Id: 26 */
0x0D,
/* Channel Id: 27 */
PWM_CHANNEL_UNCONFIGURED,
/* Channel Id: 28 */
0x0E,
/* Channel Id: 29 */
0x0F,
/* Channel Id: 30 */
0x10,
/* Channel Id: 31 */
0x11,
/* Channel Id: 32 */
0x12,
/* Channel Id: 33 */
0x13,
/* Channel Id: 34 */
0x14,
/* Channel Id: 35 */
0x15,
/* Channel Id: 36 */
0x16,
/* Channel Id: 37 */
0x17,
/* Channel Id: 38 */
0x18,
/* Channel Id: 39 */
0x19,
/* Channel Id: 40 */
0x1A,
/* Channel Id: 41 */
0x1B,
/* Channel Id: 42 */
0x1C,
/* Channel Id: 43 */
0x1D,
/* Channel Id: 44 */
PWM_CHANNEL_UNCONFIGURED,
/* Channel Id: 45 */
PWM_CHANNEL_UNCONFIGURED,
/* Channel Id: 46 */
PWM_CHANNEL_UNCONFIGURED,
/* Channel Id: 47 */
PWM_CHANNEL_UNCONFIGURED,
/* Channel Id: 48 */
0x1E,
/* Channel Id: 49 */
0x1F,
/* Channel Id: 50 */
0x20,
/* Channel Id: 51 */
0x21
};
#define PWM_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
#define PWM_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* Array for Notification status of timers configured */
/* VAR(uint8, PWM_NOINIT_DATA) Pwm_GaaNotifStatus[]; */
/* Array for Idle state status for all configured channels */
VAR(uint8, PWM_NOINIT_DATA) Pwm_GaaChannelIdleStatus[34];
#define PWM_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Port/Port_Ram.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Port_Ram.c */
/* Version = 3.1.4 */
/* Date = 06-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Global RAM variables of PORT Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 27-Jul-2009 : Initial Version
*
* V3.0.1: 29-Sep-2010 : As per SCR 360, Port_GblDriverStatus is initialized
* to PORT_UNINITIALIZED instead of PORT_TRUE.
* V3.1.0: 26-Jul-2011 : Initial Version DK4-H variant
* V3.1.1: 15-Sep-2011 : As per the DK-4H requirements
* 1. Added DK4-H specific JTAG information.
* 2. Added compiler switch for USE_UPD70F3529 device
* name.
* V3.1.2: 04-Oct-2011 : Added comments for the violation of MISRA rule.
* V3.1.3: 16-Feb-2012 : Merged the fixes done for Fx4L.
* V3.1.4: 06-Jun-2012 : As per SCR 033, Compiler version is removed from
* Environment section.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Port_Ram.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define PORT_RAM_C_AR_MAJOR_VERSION PORT_AR_MAJOR_VERSION_VALUE
#define PORT_RAM_C_AR_MINOR_VERSION PORT_AR_MINOR_VERSION_VALUE
#define PORT_RAM_C_AR_PATCH_VERSION PORT_AR_PATCH_VERSION_VALUE
/* File version information */
#define PORT_RAM_C_SW_MAJOR_VERSION 3
#define PORT_RAM_C_SW_MINOR_VERSION 1
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (PORT_RAM_AR_MAJOR_VERSION!= PORT_RAM_C_AR_MAJOR_VERSION)
#error "Port_Ram.c : Mismatch in Specification Major Version"
#endif
#if (PORT_RAM_AR_MINOR_VERSION != PORT_RAM_C_AR_MINOR_VERSION)
#error "Port_Ram.c : Mismatch in Specification Minor Version"
#endif
#if (PORT_RAM_AR_PATCH_VERSION != PORT_RAM_C_AR_PATCH_VERSION)
#error "Port_Ram.c : Mismatch in Specification Patch Version"
#endif
#if (PORT_SW_MAJOR_VERSION != PORT_RAM_C_SW_MAJOR_VERSION)
#error "Port_Ram.c : Mismatch in Major Version"
#endif
#if (PORT_SW_MINOR_VERSION!= PORT_RAM_C_SW_MINOR_VERSION)
#error "Port_Ram.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
#if (PORT_DEV_ERROR_DETECT == STD_ON)
#define PORT_START_SEC_VAR_1BIT
/* MISRA Rule : 19.1 */
/* Message : #include statements in a file */
/* should only be preceded by other*/
/* preprocessor directives or */
/* comments. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
#include "MemMap.h"
/* Global variable to store Initialization status of Port Driver Component */
VAR (boolean, PORT_INIT_DATA) Port_GblDriverStatus = PORT_UNINITIALIZED;
#define PORT_STOP_SEC_VAR_1BIT
#include "MemMap.h"/* PRQA S 5087 */
#endif
#define PORT_START_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"/* PRQA S 5087 */
/* Global variable to store pointer to Configuration */
P2CONST(Port_ConfigType, PORT_CONST, PORT_CONFIG_CONST)Port_GpConfigPtr;
#define PORT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Adc/Adc_Irq.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Adc_Irq.c */
/* Version = 3.1.3 */
/* Date = 04-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* ISR functions of the ADC Driver Component */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 10-Jul-2009 : Initial version
*
* V3.0.1: 12-Oct-2009 : As per SCR 052, the following changes are made
* 1. Template changes are made.
* 2. The prototype of the function call Adc_Isr
* and Adc_DmaIsr are updated based on the priority.
*
* V3.0.2: 02-Dec-2009 : As per SCR 157, the passed parameter for Adc_DmaIsr
* function is updated.
*
* V3.0.3: 18-Mar-2010 : As per SCR 231, the ISR function names for HW Unit 1
* is updated.
*
* V3.0.4: 01-Jul-2010 : As per SCR 295, file is updated to support ISR
* Category configuration by a pre-compile
* option.
* V3.0.5: 20-Jul-2010 : As per SCR 309, ISR Category options are updated
* from MODE to TYPE.
*
* V3.1.0: 27-Jul-2011 : Modified for DK-4
* V3.1.1: 04-Oct-2011 : Added comments for the violation of MISRA rule 19.1
* V3.1.2: 14-Feb-2012 : Merged the fixes done for Fx4L Adc driver
*
* V3.1.3: 04-Jun-2012 : As per SCR 019, the following changes are made
* 1. Compiler version is removed from environment
* section.
* 2. File version is changed.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Adc.h"
#include "Adc_Private.h"
#include "Adc_PBTypes.h"
#include "Adc_LTTypes.h"
#include "Adc_Irq.h"
#include "Adc_Ram.h"
#if(ADC_DEV_ERROR_DETECT == STD_ON)
#include "Det.h"
#endif
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
#include "SchM_Adc.h"
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification version information */
#define ADC_IRQ_C_AR_MAJOR_VERSION ADC_AR_MAJOR_VERSION_VALUE
#define ADC_IRQ_C_AR_MINOR_VERSION ADC_AR_MINOR_VERSION_VALUE
#define ADC_IRQ_C_AR_PATCH_VERSION ADC_AR_PATCH_VERSION_VALUE
/* File version information */
#define ADC_IRQ_C_SW_MAJOR_VERSION 3
#define ADC_IRQ_C_SW_MINOR_VERSION 1
#define ADC_IRQ_C_SW_PATCH_VERSION 3
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (ADC_IRQ_AR_MAJOR_VERSION != ADC_IRQ_C_AR_MAJOR_VERSION)
#error "Adc_Irq.c : Mismatch in Specification Major Version"
#endif
#if (ADC_IRQ_AR_MINOR_VERSION != ADC_IRQ_C_AR_MINOR_VERSION)
#error "Adc_Irq.c : Mismatch in Specification Minor Version"
#endif
#if (ADC_IRQ_AR_PATCH_VERSION != ADC_IRQ_C_AR_PATCH_VERSION)
#error "Adc_Irq.c : Mismatch in Specification Patch Version"
#endif
#if (ADC_IRQ_SW_MAJOR_VERSION != ADC_IRQ_C_SW_MAJOR_VERSION)
#error "Adc_Irq.c : Mismatch in Major Version"
#endif
#if (ADC_IRQ_SW_MINOR_VERSION != ADC_IRQ_C_SW_MINOR_VERSION)
#error "Adc_Irq.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : ADCn_ISR
**
** Service ID : NA
**
** Description : These are Interrupt Service routines for the ADC where
** n represents instances of the hardware unit.
** component.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
** Function(s) invoked:
** Adc_Isr
*******************************************************************************/
#if (ADC0_CG0_ISR_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
/* MISRA Rule : 19.1 */
/* Message : #include statements in a file */
/* should only be preceded by other*/
/* preprocessor directives or */
/* comments. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
#include "MemMap.h"
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC0_CG0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC0_CG0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC0_CG0_ISR(void)
#endif
{
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* HW unit 0 and CGm unit 0 */
Adc_Isr(ADC_ZERO, ADC_ZERO);
#else
/* HW unit 0 */
Adc_Isr(ADC_ZERO);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (ADC0_CG0_ISR_API == STD_ON) */
#if (ADC0_CG1_ISR_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC0_CG1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC0_CG1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC0_CG1_ISR(void)
#endif
{
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* HW unit 0 and CGm unit 1 */
Adc_Isr(ADC_ZERO, ADC_ONE);
#else
/* HW unit 0 */
Adc_Isr(ADC_ZERO);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (ADC0_CG1_ISR_API == STD_ON) */
#if (ADC0_CG2_ISR_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC0_CG2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC0_CG2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC0_CG2_ISR(void)
#endif
{
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* HW unit 0 and CGm unit 2 */
Adc_Isr(ADC_ZERO, ADC_TWO);
#else
/* HW unit 0 */
Adc_Isr(ADC_ZERO);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (ADC0_CG2_ISR_API == STD_ON) */
#if (ADC1_CG0_ISR_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC1_CG0_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC1_CG0_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC1_CG0_ISR(void)
#endif
{
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* HW unit 1 and CGm unit 0 */
Adc_Isr(ADC_ONE, ADC_ZERO);
#else
/* HW unit 1 */
Adc_Isr(ADC_ONE);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (ADC1_CG0_ISR_API == STD_ON) */
#if (ADC1_CG1_ISR_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC1_CG1_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC1_CG1_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC1_CG1_ISR(void)
#endif
{
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* HW unit 1 and CGm unit 1 */
Adc_Isr(ADC_ONE, ADC_ONE);
#else
/* HW unit 1 */
Adc_Isr(ADC_ONE);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (ADC1_CG1_ISR_API == STD_ON) */
#if (ADC1_CG2_ISR_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC1_CG2_ISR(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC1_CG2_ISR)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC1_CG2_ISR(void)
#endif
{
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* HW unit 1 and CGm unit 2 */
Adc_Isr(ADC_ONE, ADC_TWO);
#else
/* HW unit 1 */
Adc_Isr(ADC_ONE);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (ADC1_CG2_ISR_API == STD_ON) */
/*******************************************************************************
** Function Name : ADC_DmaIsrn
**
** Service ID : NA
**
** Description : These are DMA Interrupt Service routines for the ADC
** where n represents DMA channel Id
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
** Function(s) invoked:
** Adc_Isr
*******************************************************************************/
#if (ADC_DMA_ISR_CH0_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH0(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC_DMA_ISR_CH0)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH0(void)
#endif
{
/* DMA Channel 0 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[0], Adc_GpDmaCGUnitMapping[0]);
#else
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[0]);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif
#if (ADC_DMA_ISR_CH1_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH1(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC_DMA_ISR_CH1)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH1(void)
#endif
{
/* DMA Channel 1 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[1], Adc_GpDmaCGUnitMapping[1]);
#else
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[1]);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif
#if (ADC_DMA_ISR_CH2_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH2(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC_DMA_ISR_CH2)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH2(void)
#endif
{
/* DMA Channel 2 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[2], Adc_GpDmaCGUnitMapping[2]);
#else
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[2]);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif
#if (ADC_DMA_ISR_CH3_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH3(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC_DMA_ISR_CH3)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH3(void)
#endif
{
/* DMA Channel 3 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[3], Adc_GpDmaCGUnitMapping[3]);
#else
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[3]);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif
#if (ADC_DMA_ISR_CH4_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH4(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC_DMA_ISR_CH4)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH4(void)
#endif
{
/* DMA Channel 4 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[4], Adc_GpDmaCGUnitMapping[4]);
#else
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[4]);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif
#if (ADC_DMA_ISR_CH5_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH5(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC_DMA_ISR_CH5)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH5(void)
#endif
{
/* DMA Channel 5 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[5], Adc_GpDmaCGUnitMapping[5]);
#else
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[5]);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif
#if (ADC_DMA_ISR_CH6_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH6(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC_DMA_ISR_CH6)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH6(void)
#endif
{
/* DMA Channel 6 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[6], Adc_GpDmaCGUnitMapping[6]);
#else
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[6]);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif
#if (ADC_DMA_ISR_CH7_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH7(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC_DMA_ISR_CH7)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH7(void)
#endif
{
/* DMA Channel 7 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[7], Adc_GpDmaCGUnitMapping[7]);
#else
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[7]);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif
#if (ADC_DMA_ISR_CH8_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH8(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC_DMA_ISR_CH8)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH8(void)
#endif
{
/* DMA Channel 8 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[8], Adc_GpDmaCGUnitMapping[8]);
#else
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[8]);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif
#if (ADC_DMA_ISR_CH9_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH9(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC_DMA_ISR_CH9)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH9(void)
#endif
{
/* DMA Channel 9 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[9], Adc_GpDmaCGUnitMapping[9]);
#else
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[9]);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif
#if (ADC_DMA_ISR_CH10_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH10(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC_DMA_ISR_CH10)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH10(void)
#endif
{
/* DMA Channel 10 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[10], Adc_GpDmaCGUnitMapping[10]);
#else
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[10]);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif
#if (ADC_DMA_ISR_CH11_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH11(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC_DMA_ISR_CH11)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH11(void)
#endif
{
/* DMA Channel 11 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[11], Adc_GpDmaCGUnitMapping[11]);
#else
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[11]);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif
#if (ADC_DMA_ISR_CH12_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH12(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC_DMA_ISR_CH12)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH12(void)
#endif
{
/* DMA Channel 12 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[12], Adc_GpDmaCGUnitMapping[12]);
#else
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[12]);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif
#if (ADC_DMA_ISR_CH13_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH13(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC_DMA_ISR_CH13)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH13(void)
#endif
{
/* DMA Channel 13 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[13], Adc_GpDmaCGUnitMapping[13]);
#else
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[13]);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif
#if (ADC_DMA_ISR_CH14_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH14(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC_DMA_ISR_CH14)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH14(void)
#endif
{
/* DMA Channel 14 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[14], Adc_GpDmaCGUnitMapping[14]);
#else
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[14]);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif
#if (ADC_DMA_ISR_CH15_API == STD_ON)
#define ADC_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/* MCAL_ISR_TYPE_TOOLCHAIN - Toolchain defines the interrupt mapping */
#if (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
_INTERRUPT_ FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH15(void)
/* MCAL_ISR_TYPE_OS - OS declares the ISR and defines the interrupt mapping */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
ISR(ADC_DMA_ISR_CH15)
/* MCAL_ISR_TYPE_NONE - user writed his own dispatcher for ISR */
#elif (ADC_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
FUNC(void, ADC_PUBLIC_CODE) ADC_DMA_ISR_CH15(void)
#endif
{
/* DMA Channel 15 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[15], Adc_GpDmaCGUnitMapping[15]);
#else
Adc_DmaIsr(Adc_GpDmaHWUnitMapping[15]);
#endif
}
#define ADC_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Gpt/Gpt_Irq.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Gpt_Irq.h */
/* Version = 3.0.3a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains ISR prototypes for all Timers of GPT Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 23-Oct-2009 : Initial Version
* V3.0.1: 11-Dec-2009 : As per SCR 167,
* 1.The macro definition of GPT_OSTM1_CH0 is added.
* 2.The extern declaration of the interrupt function
* of OSTM1 is added.
* V3.0.2: 23-Jun-2010 : As per SCR 281, the following changes are made:
* 1. The macro definitions are added to support
* TAUB and TAUC timer units.
* 2. The extern declarations of the interrupt
* functions are added to support TAUB and TAUC
* timer units.
* 3. File is updated to support ISR Category
* configurable by a pre-compile option.
* V3.0.3: 08-Jul-2010 : As per SCR 299, ISR Category options are updated
* from MODE to TYPE.
*
* V3.0.3a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
#ifndef GPT_IRQ_H
#define GPT_IRQ_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define GPT_IRQ_AR_MAJOR_VERSION GPT_AR_MAJOR_VERSION_VALUE
#define GPT_IRQ_AR_MINOR_VERSION GPT_AR_MINOR_VERSION_VALUE
#define GPT_IRQ_AR_PATCH_VERSION GPT_AR_PATCH_VERSION_VALUE
/*
* File version information
*/
#define GPT_IRQ_SW_MAJOR_VERSION 3
#define GPT_IRQ_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Channel Mapping for TAUA Unit Channels */
#define GPT_TAUA0_CH0 0x00
#define GPT_TAUA0_CH1 0x01
#define GPT_TAUA0_CH2 0x02
#define GPT_TAUA0_CH3 0x03
#define GPT_TAUA0_CH4 0x04
#define GPT_TAUA0_CH5 0x05
#define GPT_TAUA0_CH6 0x06
#define GPT_TAUA0_CH7 0x07
#define GPT_TAUA0_CH8 0x08
#define GPT_TAUA0_CH9 0x09
#define GPT_TAUA0_CH10 0x0A
#define GPT_TAUA0_CH11 0x0B
#define GPT_TAUA0_CH12 0x0C
#define GPT_TAUA0_CH13 0x0D
#define GPT_TAUA0_CH14 0x0E
#define GPT_TAUA0_CH15 0x0F
#define GPT_TAUA1_CH0 0x10
#define GPT_TAUA1_CH1 0x11
#define GPT_TAUA1_CH2 0x12
#define GPT_TAUA1_CH3 0x13
#define GPT_TAUA1_CH4 0x14
#define GPT_TAUA1_CH5 0x15
#define GPT_TAUA1_CH6 0x16
#define GPT_TAUA1_CH7 0x17
#define GPT_TAUA1_CH8 0x18
#define GPT_TAUA1_CH9 0x19
#define GPT_TAUA1_CH10 0x1A
#define GPT_TAUA1_CH11 0x1B
#define GPT_TAUA1_CH12 0x1C
#define GPT_TAUA1_CH13 0x1D
#define GPT_TAUA1_CH14 0x1E
#define GPT_TAUA1_CH15 0x1F
#define GPT_TAUA2_CH0 0x20
#define GPT_TAUA2_CH1 0x21
#define GPT_TAUA2_CH2 0x22
#define GPT_TAUA2_CH3 0x23
#define GPT_TAUA2_CH4 0x24
#define GPT_TAUA2_CH5 0x25
#define GPT_TAUA2_CH6 0x26
#define GPT_TAUA2_CH7 0x27
#define GPT_TAUA2_CH8 0x28
#define GPT_TAUA2_CH9 0x29
#define GPT_TAUA2_CH10 0x2A
#define GPT_TAUA2_CH11 0x2B
#define GPT_TAUA2_CH12 0x2C
#define GPT_TAUA2_CH13 0x2D
#define GPT_TAUA2_CH14 0x2E
#define GPT_TAUA2_CH15 0x2F
#define GPT_TAUA3_CH0 0x30
#define GPT_TAUA3_CH1 0x31
#define GPT_TAUA3_CH2 0x32
#define GPT_TAUA3_CH3 0x33
#define GPT_TAUA3_CH4 0x34
#define GPT_TAUA3_CH5 0x35
#define GPT_TAUA3_CH6 0x36
#define GPT_TAUA3_CH7 0x37
#define GPT_TAUA3_CH8 0x38
#define GPT_TAUA3_CH9 0x39
#define GPT_TAUA3_CH10 0x3A
#define GPT_TAUA3_CH11 0x3B
#define GPT_TAUA3_CH12 0x3C
#define GPT_TAUA3_CH13 0x3D
#define GPT_TAUA3_CH14 0x3E
#define GPT_TAUA3_CH15 0x3F
#define GPT_TAUA4_CH0 0x40
#define GPT_TAUA4_CH1 0x41
#define GPT_TAUA4_CH2 0x42
#define GPT_TAUA4_CH3 0x43
#define GPT_TAUA4_CH4 0x44
#define GPT_TAUA4_CH5 0x45
#define GPT_TAUA4_CH6 0x46
#define GPT_TAUA4_CH7 0x47
#define GPT_TAUA4_CH8 0x48
#define GPT_TAUA4_CH9 0x49
#define GPT_TAUA4_CH10 0x4A
#define GPT_TAUA4_CH11 0x4B
#define GPT_TAUA4_CH12 0x4C
#define GPT_TAUA4_CH13 0x4D
#define GPT_TAUA4_CH14 0x4E
#define GPT_TAUA4_CH15 0x4F
#define GPT_TAUA5_CH0 0x50
#define GPT_TAUA5_CH1 0x51
#define GPT_TAUA5_CH2 0x52
#define GPT_TAUA5_CH3 0x53
#define GPT_TAUA5_CH4 0x54
#define GPT_TAUA5_CH5 0x55
#define GPT_TAUA5_CH6 0x56
#define GPT_TAUA5_CH7 0x57
#define GPT_TAUA5_CH8 0x58
#define GPT_TAUA5_CH9 0x59
#define GPT_TAUA5_CH10 0x5A
#define GPT_TAUA5_CH11 0x5B
#define GPT_TAUA5_CH12 0x5C
#define GPT_TAUA5_CH13 0x5D
#define GPT_TAUA5_CH14 0x5E
#define GPT_TAUA5_CH15 0x5F
#define GPT_TAUA6_CH0 0x60
#define GPT_TAUA6_CH1 0x61
#define GPT_TAUA6_CH2 0x62
#define GPT_TAUA6_CH3 0x63
#define GPT_TAUA6_CH4 0x64
#define GPT_TAUA6_CH5 0x65
#define GPT_TAUA6_CH6 0x66
#define GPT_TAUA6_CH7 0x67
#define GPT_TAUA6_CH8 0x68
#define GPT_TAUA6_CH9 0x69
#define GPT_TAUA6_CH10 0x6A
#define GPT_TAUA6_CH11 0x6B
#define GPT_TAUA6_CH12 0x6C
#define GPT_TAUA6_CH13 0x6D
#define GPT_TAUA6_CH14 0x6E
#define GPT_TAUA6_CH15 0x6F
#define GPT_TAUA7_CH0 0x70
#define GPT_TAUA7_CH1 0x71
#define GPT_TAUA7_CH2 0x72
#define GPT_TAUA7_CH3 0x73
#define GPT_TAUA7_CH4 0x74
#define GPT_TAUA7_CH5 0x75
#define GPT_TAUA7_CH6 0x76
#define GPT_TAUA7_CH7 0x77
#define GPT_TAUA7_CH8 0x78
#define GPT_TAUA7_CH9 0x79
#define GPT_TAUA7_CH10 0x7A
#define GPT_TAUA7_CH11 0x7B
#define GPT_TAUA7_CH12 0x7C
#define GPT_TAUA7_CH13 0x7D
#define GPT_TAUA7_CH14 0x7E
#define GPT_TAUA7_CH15 0x7F
#define GPT_TAUA8_CH0 0x80
#define GPT_TAUA8_CH1 0x81
#define GPT_TAUA8_CH2 0x82
#define GPT_TAUA8_CH3 0x83
#define GPT_TAUA8_CH4 0x84
#define GPT_TAUA8_CH5 0x85
#define GPT_TAUA8_CH6 0x86
#define GPT_TAUA8_CH7 0x87
#define GPT_TAUA8_CH8 0x88
#define GPT_TAUA8_CH9 0x89
#define GPT_TAUA8_CH10 0x8A
#define GPT_TAUA8_CH11 0x8B
#define GPT_TAUA8_CH12 0x8C
#define GPT_TAUA8_CH13 0x8D
#define GPT_TAUA8_CH14 0x8E
#define GPT_TAUA8_CH15 0x8F
/* Channel Mapping for TAUB Unit Channels */
#define GPT_TAUB1_CH0 0x10
#define GPT_TAUB1_CH1 0x11
#define GPT_TAUB1_CH2 0x12
#define GPT_TAUB1_CH3 0x13
#define GPT_TAUB1_CH4 0x14
#define GPT_TAUB1_CH5 0x15
#define GPT_TAUB1_CH6 0x16
#define GPT_TAUB1_CH7 0x17
#define GPT_TAUB1_CH8 0x18
#define GPT_TAUB1_CH9 0x19
#define GPT_TAUB1_CH10 0x1A
#define GPT_TAUB1_CH11 0x1B
#define GPT_TAUB1_CH12 0x1C
#define GPT_TAUB1_CH13 0x1D
#define GPT_TAUB1_CH14 0x1E
#define GPT_TAUB1_CH15 0x1F
#define GPT_TAUB2_CH0 0x20
#define GPT_TAUB2_CH1 0x21
#define GPT_TAUB2_CH2 0x22
#define GPT_TAUB2_CH3 0x23
#define GPT_TAUB2_CH4 0x24
#define GPT_TAUB2_CH5 0x25
#define GPT_TAUB2_CH6 0x26
#define GPT_TAUB2_CH7 0x27
#define GPT_TAUB2_CH8 0x28
#define GPT_TAUB2_CH9 0x29
#define GPT_TAUB2_CH10 0x2A
#define GPT_TAUB2_CH11 0x2B
#define GPT_TAUB2_CH12 0x2C
#define GPT_TAUB2_CH13 0x2D
#define GPT_TAUB2_CH14 0x2E
#define GPT_TAUB2_CH15 0x2F
/* Channel Mapping for TAUC Unit Channels */
#define GPT_TAUC2_CH0 0x20
#define GPT_TAUC2_CH1 0x21
#define GPT_TAUC2_CH2 0x22
#define GPT_TAUC2_CH3 0x23
#define GPT_TAUC2_CH4 0x24
#define GPT_TAUC2_CH5 0x25
#define GPT_TAUC2_CH6 0x26
#define GPT_TAUC2_CH7 0x27
#define GPT_TAUC2_CH8 0x28
#define GPT_TAUC2_CH9 0x29
#define GPT_TAUC2_CH10 0x2A
#define GPT_TAUC2_CH11 0x2B
#define GPT_TAUC2_CH12 0x2C
#define GPT_TAUC2_CH13 0x2D
#define GPT_TAUC2_CH14 0x2E
#define GPT_TAUC2_CH15 0x2F
#define GPT_TAUC3_CH0 0x30
#define GPT_TAUC3_CH1 0x31
#define GPT_TAUC3_CH2 0x32
#define GPT_TAUC3_CH3 0x33
#define GPT_TAUC3_CH4 0x34
#define GPT_TAUC3_CH5 0x35
#define GPT_TAUC3_CH6 0x36
#define GPT_TAUC3_CH7 0x37
#define GPT_TAUC3_CH8 0x38
#define GPT_TAUC3_CH9 0x39
#define GPT_TAUC3_CH10 0x3A
#define GPT_TAUC3_CH11 0x3B
#define GPT_TAUC3_CH12 0x3C
#define GPT_TAUC3_CH13 0x3D
#define GPT_TAUC3_CH14 0x3E
#define GPT_TAUC3_CH15 0x3F
#define GPT_TAUC4_CH0 0x40
#define GPT_TAUC4_CH1 0x41
#define GPT_TAUC4_CH2 0x42
#define GPT_TAUC4_CH3 0x43
#define GPT_TAUC4_CH4 0x44
#define GPT_TAUC4_CH5 0x45
#define GPT_TAUC4_CH6 0x46
#define GPT_TAUC4_CH7 0x47
#define GPT_TAUC4_CH8 0x48
#define GPT_TAUC4_CH9 0x49
#define GPT_TAUC4_CH10 0x4A
#define GPT_TAUC4_CH11 0x4B
#define GPT_TAUC4_CH12 0x4C
#define GPT_TAUC4_CH13 0x4D
#define GPT_TAUC4_CH14 0x4E
#define GPT_TAUC4_CH15 0x4F
#define GPT_TAUC5_CH0 0x50
#define GPT_TAUC5_CH1 0x51
#define GPT_TAUC5_CH2 0x52
#define GPT_TAUC5_CH3 0x53
#define GPT_TAUC5_CH4 0x54
#define GPT_TAUC5_CH5 0x55
#define GPT_TAUC5_CH6 0x56
#define GPT_TAUC5_CH7 0x57
#define GPT_TAUC5_CH8 0x58
#define GPT_TAUC5_CH9 0x59
#define GPT_TAUC5_CH10 0x5A
#define GPT_TAUC5_CH11 0x5B
#define GPT_TAUC5_CH12 0x5C
#define GPT_TAUC5_CH13 0x5D
#define GPT_TAUC5_CH14 0x5E
#define GPT_TAUC5_CH15 0x5F
#define GPT_TAUC6_CH0 0x60
#define GPT_TAUC6_CH1 0x61
#define GPT_TAUC6_CH2 0x62
#define GPT_TAUC6_CH3 0x63
#define GPT_TAUC6_CH4 0x64
#define GPT_TAUC6_CH5 0x65
#define GPT_TAUC6_CH6 0x66
#define GPT_TAUC6_CH7 0x67
#define GPT_TAUC6_CH8 0x68
#define GPT_TAUC6_CH9 0x69
#define GPT_TAUC6_CH10 0x6A
#define GPT_TAUC6_CH11 0x6B
#define GPT_TAUC6_CH12 0x6C
#define GPT_TAUC6_CH13 0x6D
#define GPT_TAUC6_CH14 0x6E
#define GPT_TAUC6_CH15 0x6F
#define GPT_TAUC7_CH0 0x70
#define GPT_TAUC7_CH1 0x71
#define GPT_TAUC7_CH2 0x72
#define GPT_TAUC7_CH3 0x73
#define GPT_TAUC7_CH4 0x74
#define GPT_TAUC7_CH5 0x75
#define GPT_TAUC7_CH6 0x76
#define GPT_TAUC7_CH7 0x77
#define GPT_TAUC7_CH8 0x78
#define GPT_TAUC7_CH9 0x79
#define GPT_TAUC7_CH10 0x7A
#define GPT_TAUC7_CH11 0x7B
#define GPT_TAUC7_CH12 0x7C
#define GPT_TAUC7_CH13 0x7D
#define GPT_TAUC7_CH14 0x7E
#define GPT_TAUC7_CH15 0x7F
#define GPT_TAUC8_CH0 0x80
#define GPT_TAUC8_CH1 0x81
#define GPT_TAUC8_CH2 0x82
#define GPT_TAUC8_CH3 0x83
#define GPT_TAUC8_CH4 0x84
#define GPT_TAUC8_CH5 0x85
#define GPT_TAUC8_CH6 0x86
#define GPT_TAUC8_CH7 0x87
#define GPT_TAUC8_CH8 0x88
#define GPT_TAUC8_CH9 0x89
#define GPT_TAUC8_CH10 0x8A
#define GPT_TAUC8_CH11 0x8B
#define GPT_TAUC8_CH12 0x8C
#define GPT_TAUC8_CH13 0x8D
#define GPT_TAUC8_CH14 0x8E
#define GPT_TAUC8_CH15 0x8F
/* Channel Mapping for TAUJ Unit Channels */
#define GPT_TAUJ0_CH0 0x90
#define GPT_TAUJ0_CH1 0x91
#define GPT_TAUJ0_CH2 0x92
#define GPT_TAUJ0_CH3 0x93
#define GPT_TAUJ1_CH0 0x94
#define GPT_TAUJ1_CH1 0x95
#define GPT_TAUJ1_CH2 0x96
#define GPT_TAUJ1_CH3 0x97
#define GPT_TAUJ2_CH0 0x98
#define GPT_TAUJ2_CH1 0x99
#define GPT_TAUJ2_CH2 0x9A
#define GPT_TAUJ2_CH3 0x9B
/* Channel Mapping for OSTM Unit Channels */
#define GPT_OSTM0_CH0 0x9C
#define GPT_OSTM1_CH0 0x9D
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#define GPT_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* The default option for ISR Category MCAL_ISR_TYPE_TOOLCHAIN */
#ifndef GPT_INTERRUPT_TYPE
#define GPT_INTERRUPT_TYPE MCAL_ISR_TYPE_TOOLCHAIN
#endif
#if (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_TOOLCHAIN)
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH4_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH5_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH6_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH7_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH8_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH9_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH10_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH11_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH12_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH13_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH14_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH15_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ0_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ0_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ0_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ0_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ1_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ1_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ1_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ1_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ2_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ2_CH1_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ2_CH2_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) TAUJ2_CH3_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) OSTM0_CH0_ISR(void);
extern _INTERRUPT_ FUNC(void, GPT_PUBLIC_CODE) OSTM1_CH0_ISR(void);
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_OS)
/* Use OS */
#include "Os.h"
#elif (GPT_INTERRUPT_TYPE == MCAL_ISR_TYPE_NONE)
extern FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH4_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH5_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH6_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH7_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH8_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH9_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH10_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH11_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH12_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH13_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH14_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA0_CH15_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH4_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH5_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH6_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH7_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH8_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH9_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH10_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH11_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH12_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH13_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH14_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA1_CH15_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH4_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH5_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH6_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH7_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH8_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH9_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH10_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH11_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH12_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH13_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH14_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA2_CH15_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH4_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH5_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH6_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH7_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH8_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH9_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH10_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH11_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH12_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH13_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH14_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA3_CH15_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH4_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH5_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH6_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH7_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH8_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH9_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH10_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH11_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH12_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH13_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH14_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA4_CH15_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH4_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH5_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH6_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH7_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH8_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH9_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH10_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH11_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH12_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH13_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH14_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA5_CH15_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH4_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH5_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH6_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH7_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH8_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH9_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH10_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH11_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH12_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH13_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH14_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA6_CH15_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH4_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH5_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH6_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH7_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH8_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH9_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH10_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH11_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH12_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH13_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH14_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA7_CH15_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH4_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH5_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH6_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH7_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH8_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH9_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH10_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH11_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH12_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH13_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH14_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUA8_CH15_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH4_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH5_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH6_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH7_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH8_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH9_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH10_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH11_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH12_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH13_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH14_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB1_CH15_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH4_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH5_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH6_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH7_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH8_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH9_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH10_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH11_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH12_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH13_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH14_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUB2_CH15_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH4_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH5_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH6_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH7_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH8_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH9_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH10_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH11_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH12_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH13_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH14_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC2_CH15_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH4_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH5_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH6_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH7_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH8_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH9_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH10_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH11_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH12_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH13_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH14_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC3_CH15_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH4_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH5_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH6_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH7_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH8_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH9_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH10_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH11_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH12_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH13_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH14_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC4_CH15_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH4_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH5_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH6_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH7_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH8_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH9_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH10_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH11_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH12_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH13_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH14_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC5_CH15_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH4_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH5_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH6_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH7_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH8_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH9_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH10_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH11_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH12_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH13_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH14_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC6_CH15_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH4_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH5_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH6_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH7_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH8_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH9_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH10_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH11_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH12_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH13_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH14_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC7_CH15_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH4_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH5_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH6_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH7_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH8_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH9_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH10_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH11_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH12_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH13_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH14_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUC8_CH15_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUJ0_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUJ0_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUJ0_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUJ0_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUJ1_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUJ1_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUJ1_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUJ1_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUJ2_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUJ2_CH1_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUJ2_CH2_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) TAUJ2_CH3_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) OSTM0_CH0_ISR(void);
extern FUNC(void, GPT_PUBLIC_CODE) OSTM1_CH0_ISR(void);
#else
#error "GPT_INTERRUPT_TYPE not set."
#endif /* End of GPT_INTERRUPT_TYPE */
#define GPT_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* GPT_IRQ_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Pwm/Pwm_Version.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Pwm_Version.c */
/* Version = 3.1.3 */
/* Date = 05-Nov-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of Version information */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 18-Aug-2009 : Initial version
* V3.1.0: 26-Jul-2011 : Ported for the DK4 variant.
* V3.1.1: 05-Mar-2012 : Merged the fixes done for Fx4L PWM driver
* V3.1.2: 06-Jun-2012 : As per SCR 034, Compiler version is removed from
* Environment section.
* V3.1.3: 05-Nov-2012 : As per MNT_0007541, comment added at each "#endif"
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Pwm.h" /* PWM Driver Header File */
#include "Pwm_Version.h" /* PWM Version Header File */
#if(PWM_DEV_ERROR_DETECT == STD_ON)
#include "Det.h" /* DET Header File */
#endif
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
#include "SchM.h" /* Scheduler Header File */
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification version information */
#define PWM_VERSION_C_AR_MAJOR_VERSION PWM_AR_MAJOR_VERSION_VALUE
#define PWM_VERSION_C_AR_MINOR_VERSION PWM_AR_MINOR_VERSION_VALUE
#define PWM_VERSION_C_AR_PATCH_VERSION PWM_AR_PATCH_VERSION_VALUE
/* File version information */
#define PWM_VERSION_C_SW_MAJOR_VERSION 3
#define PWM_VERSION_C_SW_MINOR_VERSION 1
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (PWM_VERSION_AR_MAJOR_VERSION != PWM_VERSION_C_AR_MAJOR_VERSION)
#error "Pwm_Version.c : Mismatch in Specification Major Version"
#endif
#if (PWM_VERSION_AR_MINOR_VERSION != PWM_VERSION_C_AR_MINOR_VERSION)
#error "Pwm_Version.c : Mismatch in Specification Minor Version"
#endif
#if (PWM_VERSION_AR_PATCH_VERSION != PWM_VERSION_C_AR_PATCH_VERSION)
#error "Pwm_Version.c : Mismatch in Specification Patch Version"
#endif
#if (PWM_SW_MAJOR_VERSION != PWM_VERSION_C_SW_MAJOR_VERSION)
#error "Pwm_Version.c : Mismatch in Major Version"
#endif
#if (PWM_SW_MINOR_VERSION != PWM_VERSION_C_SW_MINOR_VERSION)
#error "Pwm_Version.c : Mismatch in Minor Version"
#endif
#if(PWM_DEV_ERROR_DETECT == STD_ON)
#if (DET_AR_MAJOR_VERSION != PWM_DET_AR_MAJOR_VERSION)
#error "Det.h : Mismatch in Specification Major Version"
#endif
#if (DET_AR_MINOR_VERSION != PWM_DET_AR_MINOR_VERSION)
#error "Det.h : Mismatch in Specification Minor Version"
#endif
#endif /* #if(PWM_DEV_ERROR_DETECT == STD_ON) */
#if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON)
#if (SCHM_AR_MAJOR_VERSION != PWM_SCHM_AR_MAJOR_VERSION)
#error "SchM.h : Mismatch in Specification Major Version"
#endif
#if (SCHM_AR_MINOR_VERSION != PWM_SCHM_AR_MINOR_VERSION)
#error "SchM.h : Mismatch in Specification Minor Version"
#endif
#endif /* #if(PWM_CRITICAL_SECTION_PROTECTION == STD_ON) */
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Adc/Adc_Private.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Adc_Private.c */
/* Version = 3.1.6 */
/* Date = 28-Mar-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2013 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Internal functions implementation of ADC Driver Component */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 10-Jul-2009 : Initial version
*
* V3.0.1: 12-Oct-2009 : As per SCR 052, the following changes are made
* 1. Template changes are made.
* 2. Prototype of the functions Adc_Isr and ADC_DmaIsr
* are updated based on the priority configured.
* 3. Internal ISR function call based on priority is
* updated in the function Adc_Isr.
* 4. Adc_DmaIsr is updated to set the NTCV bit.
* 5. Adc_ConfigureGroupForConversion is updated to
* load the channel list value.
* 6. Adc_ConfigureGroupForConversion is updated to set
* INF bit.
* 7. Adc_EnableHWGroup is updated for PIC macro
* enhancement.
* 8. Adc_DisableHWGroup is updated to clear the
* channel list to avoid conversion.
*
* V3.0.2: 05-Nov-2009 : As per SCR 088, I/O structure is updated to have
* separate base address for USER and OS registers.
*
* V3.0.3: 02-Dec-2009 : As per SCR 157, the following changes are made
* 1. Adc_ConfigureGroupForConversion is
* updated to clear the pending interrupt before
* enabling the DMA channel.
* 2. Adc_GroupCompleteMode is included within the
* pre-compile option.
*
* V3.0.4: 05-Jan-2010 : As per SCR 179, Adc_GucResultRead and
* Adc_GblSampleComp are replaced by group RAM variable.
*
* V3.0.5: 26-Feb-2010 : As per SCR 200, the following changes are made
* 1. Adc_DisableHWGroup is updated to disable the
* interrupt configured for the CGm unit mapped for
* the requested group.
* 2. Adc_ConfigureGroupForConversion is updated for
* group status change when poped from the queue.
*
* V3.0.6: 03-Mar-2010 : As per SCR 209, initiating the conversion of the
* channel group, is moved after the status is
* changed to ADC_BUSY in the internal function
* 'Adc_ConfigureGroupForConversion', to avoid the
* probability of channel completion interrupt occurring
* before the status is set to ADC_BUSY and causing
* undesired output.
*
* V3.0.7: 01-Jul-2010 : As per SCR 295, the following changes are made
* 1. Adc_Isr and Adc_DmaIsr are updated to get
* the HW unit index from the mapping array
* Adc_GaaHwUnitIndex.
* 2. Queue status updation is updated in the functions
* Adc_PopFromQueue and Adc_SearchnDelete.
* 3. Adc_GaaStreamEnableMask[] and
* Adc_GaaOperationMask[] are added.
* 4. Interrupt control register is replaced by IMR
* register.
*
* V3.0.8: 20-Jul-2010 : As per SCR 309, the following changes are made
* 1. Queue status updation is updated in the functions
* Adc_PushToQueue, Adc_PopFromQueue and
* Adc_SearchnDelete.
* 2. In structure Tdd_Adc_HwUnitConfigType, parameter
* pCGmDmaConfig is deleted. So the function
* Adc_ConfigureGroupForConversion is adapted to use
* ucDmaChannelIndex parameter from the structure
* Tdd_Adc_GroupConfigType.
*
* V3.0.9: 28-Jul-2010 : As per SCR 316, the following changes are made
* 1. Updated the functions Adc_DisableHWGroup and
* Adc_ConfigureGroupForConversion for clearing
* the pending interrupt.
* 2. Updated Indent for the function Adc_PopFromQueue.
* 3. Unnecessary pre-compile option is removed in the
* function Adc_ConfigureGroupForConversion and
* comments are updated.
*
* V3.0.10: 22-Jun-2011 : As per SCR 475, access of DMA channel Id in the
* function pointer 'LpCGmDmaConfig' is updated
*
* V3.1.0: 27-Jul-2011 : Modified for DK-4
* V3.1.1: 04-Oct-2011 : Added comments for the violation of MISRA rule 19.1
* V3.1.2: 14-Feb-2012 : Merged the fixes done for Fx4L Adc driver
*
* V3.1.3: 11-May-2012 : As per SCR 006, following changes are made:
* 1. New line is added at the end of file.
* 2. File version is changed.
*
* V3.1.4: 04-Jun-2012 : As per SCR 019, following changes are made:
* 1. Adc_ConfigureGroupForConversion()
* function is updated to correct the DMA pointer
* access.
* 2. File version is changed.
* V3.1.5: 19-Nov-2012 : As per MNT_0007541, comment added at "#endif'
* in function "Adc_ConfigureGroupForConversion".
* V3.1.6: 28-Mar-2013 : As per SCR 083 for MNT_0009451,
* 1. "Adc_ChannelCompleteMode" & "Adc_GroupCompleteMode
* is implemented as reentrant
* 2. Copyright information is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Adc.h"
#include "Adc_Private.h"
#include "Adc_LTTypes.h"
#include "Adc_Ram.h"
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
#include "SchM_Adc.h"
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define ADC_PRIVATE_C_AR_MAJOR_VERSION ADC_AR_MAJOR_VERSION_VALUE
#define ADC_PRIVATE_C_AR_MINOR_VERSION ADC_AR_MINOR_VERSION_VALUE
#define ADC_PRIVATE_C_AR_PATCH_VERSION ADC_AR_PATCH_VERSION_VALUE
/* File version information */
#define ADC_PRIVATE_C_SW_MAJOR_VERSION 3
#define ADC_PRIVATE_C_SW_MINOR_VERSION 1
#define ADC_PRIVATE_C_SW_PATCH_VERSION 4
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (ADC_PRIVATE_AR_MAJOR_VERSION != ADC_PRIVATE_C_AR_MAJOR_VERSION)
#error "Adc_Private.c : Mismatch in Specification Major Version"
#endif
#if (ADC_PRIVATE_AR_MINOR_VERSION != ADC_PRIVATE_C_AR_MINOR_VERSION)
#error "Adc_Private.c : Mismatch in Specification Minor Version"
#endif
#if (ADC_PRIVATE_AR_PATCH_VERSION != ADC_PRIVATE_C_AR_PATCH_VERSION)
#error "Adc_Private.c : Mismatch in Specification Patch Version"
#endif
#if (ADC_PRIVATE_SW_MAJOR_VERSION != ADC_PRIVATE_C_SW_MAJOR_VERSION)
#error "Adc_Private.c : Mismatch in Major Version"
#endif
#if (ADC_PRIVATE_SW_MINOR_VERSION != ADC_PRIVATE_C_SW_MINOR_VERSION)
#error "Adc_Private.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/* MISRA Rule : 8.7 */
/* Message : Objects shall be defined at block scope if */
/* they are only accessed from within a single */
/* function. */
/* Reason : By Moving the array into the function used */
/* the stack size will be more, hence this is */
/* defined outside. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))
#if (ADC_HW_TRIGGER_API == STD_ON)
#define ADC_START_SEC_CONST_16BIT
/* MISRA Rule : 19.1 */
/* Message : #include statements in a file */
/* should only be preceded by other*/
/* preprocessor directives or */
/* comments. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
#include "MemMap.h"
STATIC CONST(uint16, ADC_CONST) Adc_GaaStreamEnableMask[ADC_FIVE] =
{
ADC_DUMMY,
ADC_ONE_TIME_CONVERSION,
ADC_TWO_TIME_CONVERSION,
ADC_THREE_TIME_CONVERSION,
ADC_FOUR_TIME_CONVERSION
};
#define ADC_STOP_SEC_CONST_16BIT
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (ADC_HW_TRIGGER_API == STD_ON) */
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE)) */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))
#define ADC_START_SEC_CONST_32BIT
#include "MemMap.h"/* PRQA S 5087 */
STATIC CONST(uint32, ADC_CONST) Adc_GaaOperationMask[ADC_TWO] =
{
ADC_CG0_CONV_CONTINUOUS,
ADC_CG0_CONV_ONCE
};
#define ADC_STOP_SEC_CONST_32BIT
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE)) */
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
/*******************************************************************************
** Function Name : Adc_PushToQueue
**
** Service ID : NA
**
** Description : This function add the requested group into Queue.
**
** Sync/Async : Asynchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : LddGroup
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Adc_GpGroupConfig, Adc_GpHwUnitConfig,
** Adc_GpHwUnitRamData
** Function(s) invoked:
** None
*******************************************************************************/
#define ADC_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, ADC_PRIVATE_CODE) Adc_PushToQueue(Adc_GroupType LddGroup)
{
P2CONST(Tdd_Adc_HwUnitConfigType, AUTOMATIC, ADC_CONFIG_CONST) LpHwUnit;
P2VAR(Tdd_Adc_HwUnitRamData, AUTOMATIC, ADC_CONFIG_DATA) LpHwUnitData;
P2VAR(Adc_GroupType, AUTOMATIC, ADC_CONFIG_DATA) LpQueue;
Adc_HwUnitType LddHwUnit;
uint8 LucLoopCount;
uint8 LucQueueSize;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
uint8 LucPriority;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
/* Read for hardware unit and the Priority Queue */
LddHwUnit = Adc_GpGroupConfig[LddGroup].ucHwUnit;
/* Initialise HW RAM data to a local pointer */
LpHwUnitData = &Adc_GpHwUnitRamData[LddHwUnit];
LpHwUnit = &Adc_GpHwUnitConfig[LddHwUnit];
LpQueue = LpHwUnit->pQueue;
/* Read the configured priority queue size */
LucQueueSize = LpHwUnit->ucAdcQueueSize;
/* Read the queue counter */
LucLoopCount = LpHwUnitData->ucQueueCounter;
/* Set the flag indicating that group is present in the queue */
Adc_GpGroupRamData[LddGroup].ucGrpPresent = ADC_TRUE;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* Store the group into queue if queue is empty */
if(LpHwUnitData->ucQueueStatus == ADC_QUEUE_EMPTY)
#else
/* Store the group into queue if queue is empty or not full */
if((LpHwUnitData->ucQueueStatus == ADC_QUEUE_EMPTY) || \
(LpHwUnitData->ucQueueStatus == ADC_QUEUE_FILLED))
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
{
LpQueue[LucLoopCount] = LddGroup;
/* Increment the queue counter */
LpHwUnitData->ucQueueCounter++;
}
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
else /* Queue not empty */
{
/* Read the priority of the requested group */
LucPriority = Adc_GpGroupConfig[LddGroup].ddGroupPriority;
/* Place the requested group in the queue based on this priority */
do
{
/* MISRA Rule : 17.4 */
/* Message : Array indexing shall be the only allowed */
/* form of pointer arithmetic */
/* Reason : To access the channel parameters */
/* Verification : However, part of the code is verified manually*/
/* and it is not having any impact. */
if(((LucLoopCount != ADC_ZERO) &&
((Adc_GpGroupConfig +
LpQueue[LucLoopCount - ADC_ONE])->ddGroupPriority >= LucPriority)))
{
LpQueue[LucLoopCount] = LpQueue[LucLoopCount - ADC_ONE];
}
else
{
LpQueue[LucLoopCount] = LddGroup;
LucLoopCount = ADC_ZERO;
}
/* MISRA Rule : 12.13 */
/* Message : The increment (++) and decrement (--) */
/* operators should not be mixed with other */
/* operators in an expression. */
/* Reason : To make the comparison till the 0th */
/* element in the priority queue. */
/* Verification : However, part of the code is verified */
/* manually and it is not having any impact. */
} while((LucLoopCount--) > ADC_ZERO);
/* Increment the queue counter */
LpHwUnitData->ucQueueCounter++;
}
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
/* Check whether the Queue is Full */
if(LpHwUnitData->ucQueueCounter >= LucQueueSize)
{
/* Set queue status as full */
LpHwUnitData->ucQueueStatus = ADC_QUEUE_FULL;
}
else
{
/* Set queue status as filled */
LpHwUnitData->ucQueueStatus = ADC_QUEUE_FILLED;
}
}
#define ADC_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON))) */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
/*******************************************************************************
** Function Name : Adc_PopFromQueue
**
** Service ID : NA
**
** Description : This function returns the highest priority group that
** was pushed in the Queue.
**
** Sync/Async : Asynchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : LddHwUnit
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Group
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Adc_GpHwUnitConfig, Adc_GpHwUnitRamData,
** Adc_GpGroupRamData
** Function(s) invoked:
** None
*******************************************************************************/
#define ADC_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(Adc_GroupType, ADC_PRIVATE_CODE) Adc_PopFromQueue(Adc_HwUnitType LddHwUnit)
{
P2VAR(Tdd_Adc_HwUnitRamData, AUTOMATIC, ADC_CONFIG_DATA) LpHwUnitData;
P2VAR(Adc_GroupType, AUTOMATIC, ADC_CONFIG_DATA) LpQueue;
Adc_GroupType LddGroup;
uint8 LucQueueCounter;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON))
uint8 LucLoopCount = ADC_ZERO;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)) */
/* Initialise HW RAM data to a local pointer */
LpHwUnitData = &Adc_GpHwUnitRamData[LddHwUnit];
LpQueue = Adc_GpHwUnitConfig[LddHwUnit].pQueue;
/* Read the highest priority task from the queue */
LucQueueCounter = LpHwUnitData->ucQueueCounter;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* Get the Group which is of next priority level */
LddGroup = LpQueue[LucQueueCounter - ADC_ONE];
#elif ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON))
/* Decrement the queue counter value by one */
LucQueueCounter--;
/* Get the group which was requested just after the immediate
conversion completed group */
LddGroup = LpQueue[ADC_ZERO];
do
{
/* Re-arrange the queue based on which channel group was requested first */
LpQueue[LucLoopCount] = LpQueue[LucLoopCount + ADC_ONE];
/* Increment the loop count */
LucLoopCount++;
}while(LucLoopCount < LucQueueCounter);
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
/* Check whether the Queue is cleared */
if(LpHwUnitData->ucQueueCounter > ADC_ZERO)
{
/* Update the queue counter */
LpHwUnitData->ucQueueCounter--;
if(LpHwUnitData->ucQueueCounter == ADC_ZERO)
{
/* Set queue status as empty */
LpHwUnitData->ucQueueStatus = ADC_QUEUE_EMPTY;
}
else
{
/* Set queue status as filled */
LpHwUnitData->ucQueueStatus = ADC_QUEUE_FILLED;
}
}
/* Clear the flag indicating group is no longer in queue */
Adc_GpGroupRamData[LddGroup].ucGrpPresent = ADC_FALSE;
return(LddGroup);
}
#define ADC_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON))) */
/*******************************************************************************
** Function Name : Adc_Isr
**
** Service ID : NA
**
** Description : This function is an interrupt service routine for ADC.
**
** Sync/Async : Asynchronous
**
** Re-entrancy : Non-Reentrant
**
** Input Parameters : LddHwUnit, LucCGUnit
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Adc_GpHwUnitRamData, Adc_GpGroupConfig
** Function(s) invoked:
** Adc_ServiceScanMode, Adc_ServiceSelectMode
*******************************************************************************/
#define ADC_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
FUNC(void, ADC_PRIVATE_CODE) Adc_Isr(Adc_HwUnitType LddHwUnit,
uint8 LucCGUnit)
#else
FUNC(void, ADC_PRIVATE_CODE) Adc_Isr(Adc_HwUnitType LddHwUnit)
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
{
#if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW)
/* Local variable to store the replacement type */
Adc_GroupReplacementType LucGroupReplacement;
#endif /* #if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) */
/* Local variable to store the group number */
uint8 LucCurrentGroup;
/* Get the requested HW unit's index */
LddHwUnit = Adc_GaaHwUnitIndex[LddHwUnit];
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* Read the current conversion group number */
LucCurrentGroup =
Adc_GpHwUnitRamData[LddHwUnit].ddCurrentConvGroup[LucCGUnit];
#else
/* Read the current conversion group number */
LucCurrentGroup =
Adc_GpHwUnitRamData[LddHwUnit].ddCurrentConvGroup[ADC_ZERO];
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
#if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW)
/* Read the ISR type configured for the HW unit */
LucGroupReplacement = Adc_GpGroupConfig[LucCurrentGroup].ddGroupReplacement;
/* Check if group is configured in abort/restart mode */
if(LucGroupReplacement == ADC_GROUP_REPL_ABORT_RESTART)
{
/* Invoke group complete function */
Adc_GroupCompleteMode(LucCurrentGroup, LddHwUnit);
}
else /* channel complete function */
{
/* Invoke channel complete function */
Adc_ChannelCompleteMode(LucCurrentGroup, LddHwUnit);
}
#elif (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE)
/* Invoke group complete function */
Adc_GroupCompleteMode(LucCurrentGroup, LddHwUnit);
#else /* if priority is ADC_PRIORITY_HW or ADC_PRIORITY_HW_SW */
/* Invoke channel complete function */
Adc_ChannelCompleteMode(LucCurrentGroup, LddHwUnit);
#endif
}
#define ADC_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#if (ADC_DMA_MODE_ENABLE == STD_ON)
/*******************************************************************************
** Function Name : Adc_DmaIsr
**
** Service ID : NA
**
** Description : This function is an DMA Completer interrupt service
** routine for ADC.
**
** Sync/Async : Asynchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : LddHwUnit, LucCGUnit
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Adc_GpHwUnitRamData, Adc_GpGroupConfig
** Function(s) invoked:
** Adc_ServiceScanMode, Adc_ServiceSelectMode
*******************************************************************************/
#define ADC_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
FUNC(void, ADC_PRIVATE_CODE) Adc_DmaIsr(Adc_HwUnitType LddHwUnit,
uint8 LucCGUnit)
#else
FUNC(void, ADC_PRIVATE_CODE) Adc_DmaIsr(Adc_HwUnitType LddHwUnit)
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
{
P2VAR(Tdd_Adc_ChannelGroupRamData, AUTOMATIC,ADC_CONFIG_DATA) LpGroupData;
/* Local variable to store the group number */
Adc_GroupType LddGroup;
volatile uint8 LucHwCGUnit;
/* Get the requested HW unit's index */
LddHwUnit = Adc_GaaHwUnitIndex[LddHwUnit];
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* Read the current conversion group number */
LddGroup = Adc_GpHwUnitRamData[LddHwUnit].ddCurrentConvGroup[LucCGUnit];
#else
/* Read the current conversion group number */
LddGroup = Adc_GpHwUnitRamData[LddHwUnit].ddCurrentConvGroup[ADC_ZERO];
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
/* Read the group data pointer */
LpGroupData = &Adc_GpGroupRamData[LddGroup];
/* Set group status as conversion completed */
LpGroupData->ddGroupStatus = ADC_STREAM_COMPLETED;
#if(ADC_GRP_NOTIF_CAPABILITY == STD_ON)
/* Invoke notification function if enabled */
if((LpGroupData->ucNotifyStatus == ADC_TRUE) &&
(Adc_GstChannelGrpFunc[LddGroup].pGroupNotificationPointer != NULL_PTR))
{
Adc_GstChannelGrpFunc[LddGroup].pGroupNotificationPointer();
}
#endif /* #if(ADC_GRP_NOTIF_CAPABILITY == STD_ON) */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
/* Check if the operation mode is continuous */
if(Adc_GpGroupConfig[LddGroup].ucConversionMode == ADC_ONCE)
{
if(Adc_GpHwUnitRamData[LddHwUnit].ucQueueStatus != ADC_QUEUE_EMPTY)
{
/* Fetch the highest priority group from the queue */
LddGroup = Adc_PopFromQueue(LddHwUnit);
/* If Group Priority Enabled */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on*/
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of*/
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Set the flag indicating the group is popped out of the queue */
Adc_GucPopFrmQueue |= (ADC_ONE << LddHwUnit);
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
/* Set the Global variable indicating the HW unit is busy */
Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] = ADC_TRUE;
/* Initiate the group conversion */
Adc_ConfigureGroupForConversion(LddGroup);
}
}
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON))) */
}
#define ADC_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (ADC_DMA_MODE_ENABLE == STD_ON) */
#if (ADC_PRIORITY_IMPLEMENTATION != ADC_PRIORITY_NONE)
/*******************************************************************************
** Function Name : Adc_ChannelCompleteMode
**
** Service ID : NA
**
** Description : This function is invoked from ADC ISR for servicing
** the groups configured in select operation mode.
**
** Sync/Async : Asynchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : LddGroup, LddHwUnit
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Adc_GpGroupConfig, Adc_GpGroupRamData,
** Adc_GstChannelGrpFunc, Adc_GucMaxSwTriggGroups
** Adc_GpHwUnitRamData, Adc_GpHwUnitConfig
** Function(s) invoked:
** Adc_PopFromQueue, Adc_ConfigureGroupForConversion
*******************************************************************************/
#define ADC_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, ADC_PRIVATE_CODE) Adc_ChannelCompleteMode(Adc_GroupType LddGroup,
Adc_HwUnitType LddHwUnit)
{
P2CONST(Tdd_Adc_GroupConfigType, AUTOMATIC, ADC_CONFIG_CONST) LpGroup;
P2CONST(uint8, AUTOMATIC,ADC_CONFIG_DATA) LpChannelToGroup;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))
P2VAR(Tdd_AdcConfigUserRegisters, AUTOMATIC,ADC_CONFIG_DATA)
LpAdcUserRegisters;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE)) */
P2VAR(Tdd_Adc_ChannelGroupRamData, AUTOMATIC,ADC_CONFIG_DATA) LpGroupData;
P2VAR(Tdd_Adc_RunTimeData, AUTOMATIC,ADC_CONFIG_DATA) LpRunTimeData;
P2VAR(uint32, AUTOMATIC,ADC_CONFIG_DATA) LpResultRegister;
Adc_ChannelType LddChannel;
/* MISRA Rule : 18.4 */
/* Message : Unions shall not be used. */
/* Reason : To access the converted values */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
UInt LusConvertedValue;
uint8 LucHwCGUnit;
boolean LblPopGroupFrmQueue = ADC_FALSE;
/* Read the hardware unit of the group */
LpGroup = &Adc_GpGroupConfig[LddGroup];
/* Get the base address of the first channel configured for the
requested group */
LpChannelToGroup = LpGroup->pChannelToGroup;
/* Get the CGm unit to which the channel group is mapped */
LucHwCGUnit = LpGroup->ucHwCGUnit;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))
/* Read the base address of the hardware unit */
LpAdcUserRegisters = Adc_GpHwUnitConfig[LddHwUnit].pUserBaseAddress;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE)) */
/* Read the group's runtime data pointer */
LpRunTimeData =
&Adc_GpRunTimeData[(LddHwUnit * ADC_NUMBER_OF_CG_UNITS) + LucHwCGUnit];
/* Read the group data pointer */
LpGroupData = &Adc_GpGroupRamData[LddGroup];
/* Read the base address of ADC Result Register */
LpResultRegister = Adc_GpHwUnitConfig[LddHwUnit].pAdcResult;
/* MISRA Rule : 17.4 */
/* Message : Array indexing shall be the only allowed */
/* form of pointer arithmetic */
/* Reason : To access the channel parameters */
/* Verification : However, part of the code is verified manually*/
/* and it is not having any impact. */
/* Read the conversion completed channel number */
LddChannel = *(LpChannelToGroup + LpRunTimeData->ucChannelsCompleted);
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter the critical section protection */
SchM_Enter_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* MISRA Rule : 17.4 */
/* Message : Array indexing shall be the only allowed */
/* form of pointer arithmetic */
/* Reason : To access the channel parameters */
/* Verification : However, part of the code is verified manually*/
/* and it is not having any impact. */
/* Read the channel's converted value */
LusConvertedValue.Value = *(LpResultRegister + LddChannel);
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit the critical section protection */
SchM_Exit_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* Load the buffer with 12-bit or 10-bit resolution value */
*(LpRunTimeData->pBuffer) = LusConvertedValue.UChar.LoByte;
/* Update the number of channels that completed conversion */
LpRunTimeData->ucChannelsCompleted++;
/* Increment buffer pointer for the next channel */
(LpRunTimeData->pBuffer) += LpRunTimeData->ucStreamingSamples;
/* MISRA Rule : 17.4 */
/* Message : Array indexing shall be the only allowed */
/* form of pointer arithmetic */
/* Reason : For optimisation. */
/* Verification : However, part of the code is verified manually*/
/* and it is not having any impact. */
(LpRunTimeData->pChannel)++;
/* Check if the result access mode is streaming */
if(LpGroup->ddGroupAccessMode == ADC_ACCESS_MODE_STREAMING)
{
/* Check if the conversion of all the channels in the group is completed */
if(LpRunTimeData->ucChannelsCompleted == LpRunTimeData->ucChannelCount)
{
/* Check if the last streaming values were read */
if(LpGroupData->blResultRead == ADC_TRUE)
{
/* Set group status as conversion completed */
LpGroupData->ddGroupStatus = ADC_COMPLETED;
}
/* Update the completed conversion samples */
LpRunTimeData->ucSamplesCompleted++;
}
/* Check if the conversion of all the samples is completed */
if(LpRunTimeData->ucSamplesCompleted == LpRunTimeData->ucStreamingSamples)
{
/* Set group status as conversion completed */
LpGroupData->ddGroupStatus = ADC_STREAM_COMPLETED;
/* All the samples are completed */
LpGroupData->blSampleComp = ADC_TRUE;
/* Set the flag indicating Adc_ReadGroup or Adc_GetStreamLastPointer
should be called */
LpGroupData->blResultRead = ADC_FALSE;
}
}
/* Check if the conversion of all the channels in the group is completed */
if(LpRunTimeData->ucChannelsCompleted == LpRunTimeData->ucChannelCount)
{
/* Reset the number of conversion completed channel count */
LpRunTimeData->ucChannelsCompleted = ADC_ZERO;
/* Check if the result access mode is Single */
if(LpGroup->ddGroupAccessMode == ADC_ACCESS_MODE_SINGLE)
{
/* Update the completed conversion samples */
LpRunTimeData->ucSamplesCompleted++;
/* Set group status as conversion completed */
LpGroupData->ddGroupStatus = ADC_STREAM_COMPLETED;
}
/* Reload the first channel address for conversion */
LpRunTimeData->pChannel = LpGroup->pChannelToGroup;
/* Reload the the result buffer pointer */
LpRunTimeData->pBuffer = LpGroupData->pChannelBuffer;
/* Check if the operation mode is continuous */
if(LpGroup->ucConversionMode == ADC_CONTINUOUS)
{
#if(ADC_GRP_NOTIF_CAPABILITY == STD_ON)
/* Invoke notification function if enabled */
if((LpGroupData->ucNotifyStatus == ADC_TRUE) &&
(Adc_GstChannelGrpFunc[LddGroup].pGroupNotificationPointer != NULL_PTR))
{
Adc_GstChannelGrpFunc[LddGroup].pGroupNotificationPointer();
}
#endif /* #if(ADC_GRP_NOTIF_CAPABILITY == STD_ON) */
/* Check if the conversion of all the samples is completed */
if(LpRunTimeData->ucSamplesCompleted ==
LpRunTimeData->ucStreamingSamples)
{
/* Re initialise the completed number of samples to zero */
LpRunTimeData->ucSamplesCompleted = ADC_ZERO;
}
}
else /* ADC_CONV_MODE_ONESHOT / ADC_STREAM_BUFFER_LINEAR */
{
/* Reading of the next channel is not required as the conversion
* of the group is completed.
*/
LblPopGroupFrmQueue = ADC_TRUE;
/* Check if it is linear buffer conversion and all samples are
not complete */
if((LpGroup->ddGroupAccessMode == ADC_ACCESS_MODE_STREAMING) &&
(LpGroupData->blSampleComp == ADC_FALSE))
{
/* Clear the flag indicating no group should be popped from queue
since streaming is not complete */
LblPopGroupFrmQueue = ADC_FALSE;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))
if(LddGroup < Adc_GucMaxSwTriggGroups)
{
/* Initiate conversion */
LpAdcUserRegisters->ucADCAnTRG0[LucHwCGUnit * ADC_FOUR] |=
ADC_START_CONVERSION;
}
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE)) */
}
#if(ADC_GRP_NOTIF_CAPABILITY == STD_ON)
/* Invoke notification function if enabled */
if((LpGroupData->ucNotifyStatus == ADC_TRUE) &&
(Adc_GstChannelGrpFunc[LddGroup].pGroupNotificationPointer != NULL_PTR))
{
Adc_GstChannelGrpFunc[LddGroup].pGroupNotificationPointer();
}
#endif /* #if(ADC_GRP_NOTIF_CAPABILITY == STD_ON) */
/* Is Group Priority Enabled */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
#if(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)
if((LblPopGroupFrmQueue == ADC_TRUE) &&
(LddGroup < Adc_GucMaxSwTriggGroups) &&
(Adc_GpHwUnitRamData[LddHwUnit].ucQueueStatus != ADC_QUEUE_EMPTY))
#else
if((LblPopGroupFrmQueue == ADC_TRUE) &&
(Adc_GpHwUnitRamData[LddHwUnit].ucQueueStatus != ADC_QUEUE_EMPTY))
#endif /* #if(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) */
{
/* Fetch the highest priority group from the queue */
LddGroup = Adc_PopFromQueue(LddHwUnit);
/* If Group Priority Enabled */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on*/
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of*/
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Set the flag indicating the group is popped out of the queue */
Adc_GucPopFrmQueue |= (ADC_ONE << LddHwUnit);
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
/* Set the Global variable indicating the HW unit is busy */
Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] = ADC_TRUE;
/* Initiate the group conversion */
Adc_ConfigureGroupForConversion(LddGroup);
}
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON))) */
}
if((LblPopGroupFrmQueue == ADC_FALSE) &&
(LpGroup->ddGroupAccessMode == ADC_ACCESS_MODE_STREAMING))
{
/* MISRA Rule : 17.4 */
/* Message : Array indexing shall be the only allowed */
/* form of pointer arithmetic */
/* Reason : For optimisation. */
/* Verification : However, part of the code is verified manually*/
/* and it is not having any impact. */
/* Increment the result buffer by number of samples completed */
LpRunTimeData->pBuffer += LpRunTimeData->ucSamplesCompleted;
}
}
}
#define ADC_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if (ADC_PRIORITY_IMPLEMENTATION != ADC_PRIORITY_NONE) */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))
/*******************************************************************************
** Function Name : Adc_GroupCompleteMode
**
** Service ID : NA
**
** Description : This function is invoked from ADC ISR for servicing
** the groups configured in scan operation mode.
**
** Sync/Async : Asynchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : LddGroup, LddHwUnit
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Adc_GpGroupConfig, Adc_GpGroupRamData,
** Adc_GucMaxSwTriggGroups, Adc_GstChannelGrpFunc,
** Adc_GpHwUnitRamData, Adc_GpRunTimeData,
** Adc_GpHwUnitConfig, Adc_GucMaxSwTriggGroups
** Function(s) invoked:
** Adc_PopFromQueue, Adc_ConfigureGroupForConversion
*******************************************************************************/
#define ADC_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, ADC_PRIVATE_CODE) Adc_GroupCompleteMode(Adc_GroupType LddGroup,
Adc_HwUnitType LddHwUnit)
{
P2CONST(Tdd_Adc_GroupConfigType, AUTOMATIC, ADC_CONFIG_CONST) LpGroup;
P2CONST(uint8, AUTOMATIC,ADC_CONFIG_DATA) LpChannelToGroup;
P2VAR(Tdd_AdcConfigUserRegisters, AUTOMATIC,ADC_CONFIG_DATA)
LpAdcUserRegisters;
P2VAR(Tdd_Adc_ChannelGroupRamData, AUTOMATIC,ADC_CONFIG_DATA) LpGroupData;
P2VAR(Tdd_Adc_RunTimeData, AUTOMATIC,ADC_CONFIG_DATA) LpRunTimeData;
P2VAR(uint32, AUTOMATIC,ADC_CONFIG_DATA) LpResultRegister;
P2VAR(uint16, AUTOMATIC,ADC_CONFIG_DATA) LpBuffer;
Adc_ChannelType LddChannel;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))
uint8 LucHwCGUnit;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE)) */
uint8 LucChannelCount;
uint8_least LucLoop;
/* MISRA Rule : 18.4 */
/* Message : Unions shall not be used. */
/* Reason : To access the converted values */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
UInt LusConvertedValue;
uint8 LucBufferOffset;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_ENABLE_QUEUING == STD_ON))
boolean LblPopGroupFrmQueue;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_ENABLE_QUEUING == STD_ON)) */
/* Read the hardware unit of the group */
LpGroup = &Adc_GpGroupConfig[LddGroup];
/* Read the group data pointer */
LpGroupData = &Adc_GpGroupRamData[LddGroup];
/* Get the CGm unit to which the channel group is mapped */
LucHwCGUnit = LpGroup->ucHwCGUnit;
/* Read the group's runtime data pointer */
LpRunTimeData =
&Adc_GpRunTimeData[(LddHwUnit * ADC_NUMBER_OF_CG_UNITS) + LucHwCGUnit];
/* Read the base address of ADC Result Register */
LpResultRegister = Adc_GpHwUnitConfig[LddHwUnit].pAdcResult;
/* Get the base address of the first channel configured for the
requested group */
LpChannelToGroup = LpGroup->pChannelToGroup;
/* Load the current group's first channel buffer pointer */
LpBuffer = LpRunTimeData->pBuffer;
/* Load number of channels configured for group */
LucChannelCount = LpRunTimeData->ucChannelCount;
for(LucLoop = ADC_ZERO; LucLoop < LucChannelCount; LucLoop++)
{
/* MISRA Rule : 17.4 */
/* Message : Array indexing shall be the only allowed */
/* form of pointer arithmetic */
/* Reason : To access the channel parameters */
/* Verification : However, part of the code is verified manually*/
/* and it is not having any impact. */
/* Read the conversion completed channel number */
LddChannel = *(LpChannelToGroup + LucLoop);
/* Read the channel's converted value */
LusConvertedValue.Value = *(LpResultRegister + LddChannel);
/* Read the offset of the buffer for normal mode */
LucBufferOffset = (uint8)LucLoop;
/* Check if the group is configured in streaming access mode */
if(LpGroup->ddGroupAccessMode == ADC_ACCESS_MODE_STREAMING)
{
/* Read the offset for the buffer pointer based on
** number of channels and completed samples.
*/
LucBufferOffset *= LpRunTimeData->ucStreamingSamples;
}
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Enter the critical section protection */
SchM_Enter_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
/* Copy the converted value to the internal buffer */
LpBuffer[LucBufferOffset] = LusConvertedValue.UChar.LoByte;
/* Check if critical section protection is required */
#if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON)
/* Exit the critical section protection */
SchM_Exit_Adc(ADC_RAMDATA_PROTECTION);
#endif /* #if(ADC_CRITICAL_SECTION_PROTECTION == STD_ON) */
}
/* Read the base address of the hardware unit */
LpAdcUserRegisters = Adc_GpHwUnitConfig[LddHwUnit].pUserBaseAddress;
/* Update the completed conversion samples */
LpRunTimeData->ucSamplesCompleted++;
/* Check if the result access mode is Single */
if(LpGroup->ddGroupAccessMode == ADC_ACCESS_MODE_SINGLE)
{
/* Set group status as conversion completed */
LpGroupData->ddGroupStatus = ADC_STREAM_COMPLETED;
#if(ADC_GRP_NOTIF_CAPABILITY == STD_ON)
/* Invoke notification function if enabled */
if((LpGroupData->ucNotifyStatus == ADC_TRUE) &&
(Adc_GstChannelGrpFunc[LddGroup].pGroupNotificationPointer != NULL_PTR))
{
Adc_GstChannelGrpFunc[LddGroup].pGroupNotificationPointer();
}
#endif /* #if(ADC_GRP_NOTIF_CAPABILITY == STD_ON) */
/* Check if the conversion mode is continuous */
if(LpGroup->ucConversionMode == ADC_CONTINUOUS)
{
/* Clear the number of samples completed */
LpRunTimeData->ucSamplesCompleted = ADC_ZERO;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_ENABLE_QUEUING == STD_ON))
LblPopGroupFrmQueue = ADC_FALSE;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_ENABLE_QUEUING == STD_ON)) */
}
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_ENABLE_QUEUING == STD_ON))
else /* ADC_CONV_MODE_ONESHOT */
{
LblPopGroupFrmQueue = ADC_TRUE;
}
#endif/* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_ENABLE_QUEUING == STD_ON)) */
}
else /* ADC_ACCESS_MODE_STREAMING */
{
/* MISRA Rule : 17.4 */
/* Message : Array indexing shall be the only allowed */
/* form of pointer arithmetic */
/* Reason : For optimisation. */
/* Verification : However, part of the code is verified manually*/
/* and it is not having any impact. */
/* Update the buffer pointer to point to the next sample */
(LpRunTimeData->pBuffer)++;
/* Check if the conversion of all the samples are completed */
if(LpRunTimeData->ucSamplesCompleted == LpRunTimeData->ucStreamingSamples)
{
/* Set group status as conversion completed */
LpGroupData->ddGroupStatus = ADC_STREAM_COMPLETED;
/* Set the flag indicating Adc_ReadGroup or Adc_GetStreamLastPointer
should be called */
LpGroupData->blResultRead = ADC_FALSE;
#if(ADC_GRP_NOTIF_CAPABILITY == STD_ON)
/* Invoke notification function if enabled */
if((LpGroupData->ucNotifyStatus == ADC_TRUE) &&
(Adc_GstChannelGrpFunc[LddGroup].pGroupNotificationPointer != NULL_PTR))
{
Adc_GstChannelGrpFunc[LddGroup].pGroupNotificationPointer();
}
#endif /* #if(ADC_GRP_NOTIF_CAPABILITY == STD_ON) */
/* Check if the conversion mode is circular buffer */
if(LpGroup->ucConversionMode == ADC_CONTINUOUS)
{
/* Update the number of channels that completed conversion */
LpRunTimeData->ucSamplesCompleted = ADC_ZERO;
LpRunTimeData->pBuffer = LpGroupData->pChannelBuffer;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_ENABLE_QUEUING == STD_ON))
LblPopGroupFrmQueue = ADC_FALSE;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_ENABLE_QUEUING == STD_ON)) */
}
else /* ADC_STREAM_BUFFER_LINEAR */
{
/* Check if the group is configured for hardware trigger */
if(LddGroup >= Adc_GucMaxSwTriggGroups)
{
/* Reset number of samples completed */
LpRunTimeData->ucSamplesCompleted = ADC_ZERO;
/* Reset the buffer pointer */
LpRunTimeData->pBuffer = LpGroupData->pChannelBuffer;
}
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_ENABLE_QUEUING == STD_ON))
LblPopGroupFrmQueue = ADC_TRUE;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_ENABLE_QUEUING == STD_ON)) */
}
}
else /* All samples not completed */
{
/* Check if the last streaming values were read */
if(LpGroupData->blResultRead == ADC_TRUE)
{
/* Set group status as conversion completed */
LpGroupData->ddGroupStatus = ADC_COMPLETED;
}
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_ENABLE_QUEUING == STD_ON))
/* Conversion of the group is not completed */
LblPopGroupFrmQueue = ADC_FALSE;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
(ADC_ENABLE_QUEUING == STD_ON)) */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
((ADC_ENABLE_QUEUING == STD_ON) && \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))|| \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))
/* Check if the conversion mode is linear buffer */
if((LpGroup->ucConversionMode == ADC_ONCE) &&
(LddGroup < Adc_GucMaxSwTriggGroups))
{
/* Initiate conversion */
LpAdcUserRegisters->ucADCAnTRG0[LucHwCGUnit * ADC_FOUR] |=
ADC_START_CONVERSION;
}
#endif/* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
((ADC_ENABLE_QUEUING == STD_ON) && \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))|| \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE)) */
#if(ADC_GRP_NOTIF_CAPABILITY == STD_ON)
/* Invoke notification function if enabled */
if((LpGroupData->ucNotifyStatus == ADC_TRUE) &&
(Adc_GstChannelGrpFunc[LddGroup].pGroupNotificationPointer != NULL_PTR))
{
Adc_GstChannelGrpFunc[LddGroup].pGroupNotificationPointer();
}
#endif /* #if(ADC_GRP_NOTIF_CAPABILITY == STD_ON) */
}
}
/* If Group Priority Enabled or the first come first serve mechanism is
enabled */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
/* Check if the completed group conversion mode is oneshot */
if(LblPopGroupFrmQueue == ADC_TRUE)
{
/* Check if the queue is not empty */
if(Adc_GpHwUnitRamData[LddHwUnit].ucQueueStatus != ADC_QUEUE_EMPTY)
{
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Set the flag indicating the group is popped out of the queue */
Adc_GucPopFrmQueue |= (ADC_ONE << LddHwUnit);
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
/* Fetch the highest priority group from the queue and
** initiate the group conversion
*/
/* Set the Global variable indicating the HW unit is busy */
Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] = ADC_TRUE;
Adc_ConfigureGroupForConversion(Adc_PopFromQueue(LddHwUnit));
}
}
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON))) */
}
#define ADC_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE)) */
/*******************************************************************************
** Function Name : Adc_ConfigureGroupForConversion
**
** Service ID : NA
**
** Description : This function configures the requested group for
** conversion.
**
** Sync/Async : Asynchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : LddGroup
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Adc_GpGroupConfig, Adc_GpHwUnitConfig,
** Adc_GucMaxSwTriggGroups, Adc_GpHwUnitRamData,
** Adc_GpRunTimeData, Adc_GpGroupRamData
** Function(s) invoked:
** None
*******************************************************************************/
#define ADC_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, ADC_PRIVATE_CODE) Adc_ConfigureGroupForConversion(
Adc_GroupType LddGroup)
{
P2CONST(Tdd_Adc_GroupConfigType, AUTOMATIC, ADC_CONFIG_CONST) LpGroup;
#if(ADC_DMA_MODE_ENABLE == STD_ON)
P2CONST(Tdd_Adc_DmaUnitConfig, AUTOMATIC, ADC_CONFIG_DATA) LpCGmDmaConfig;
P2VAR(Tdd_Adc_DmaAddrRegs, AUTOMATIC, ADC_CONFIG_DATA) LpDmaRegisters;
#endif /* #if(ADC_DMA_MODE_ENABLE == STD_ON) */
P2VAR(Tdd_Adc_HwUnitRamData, AUTOMATIC, ADC_CONFIG_DATA) LpHwUnitData;
P2VAR(Tdd_AdcConfigUserRegisters, AUTOMATIC, ADC_CONFIG_DATA)
LpAdcUserRegisters;
P2VAR(Tdd_AdcConfigOsRegisters, AUTOMATIC, ADC_CONFIG_DATA)
LpAdcOsRegisters;
P2VAR(Tdd_Adc_ChannelGroupRamData, AUTOMATIC, ADC_CONFIG_DATA) LpGroupData;
P2VAR(Tdd_Adc_RunTimeData, AUTOMATIC,ADC_CONFIG_DATA) LpRunTimeData;
/* Defining a pointer to the IMR structure */
P2CONST(Tdd_AdcImrAddMaskConfigType, AUTOMATIC, ADC_CONFIG_DATA)
LpAdcImrAddMask;
P2VAR(uint16, AUTOMATIC, ADC_CONFIG_DATA) LpIntpCntrlReg;
#if (ADC_DMA_MODE_ENABLE == STD_ON)
/* Defining a pointer to the Interrupt Control Register */
P2VAR(uint8, AUTOMATIC, ADC_CONFIG_DATA) LpDmaIntpCntrlReg;
#endif /* #if (ADC_DMA_MODE_ENABLE == STD_ON) */
Adc_HwUnitType LddHwUnit;
uint8 LucHwCGUnit;
/* Read the hardware unit of the group */
LpGroup = &Adc_GpGroupConfig[LddGroup];
/* Get the CGm unit to which the channel group is mapped */
LucHwCGUnit = LpGroup->ucHwCGUnit;
LddHwUnit = LpGroup->ucHwUnit;
/* Initialise HW RAM data to a local pointer */
LpHwUnitData = &Adc_GpHwUnitRamData[LddHwUnit];
/* Initialise Group RAM data to a local pointer */
LpGroupData = &Adc_GpGroupRamData[LddGroup];
/* Read the group data pointer */
LpRunTimeData =
&Adc_GpRunTimeData[(LddHwUnit * ADC_NUMBER_OF_CG_UNITS) + LucHwCGUnit];
/* Initialise the number of channels present in the group */
LpRunTimeData->ucChannelCount = LpGroup->ucChannelCount;
/* Read the number of samples configured for that group */
LpRunTimeData->ucStreamingSamples = LpGroup->ddNumberofSamples;
/* Initialise the channel pointer */
LpRunTimeData->pChannel = LpGroup->pChannelToGroup;
/* Initialise the number of converted channels to zero */
LpRunTimeData->ucChannelsCompleted = ADC_ZERO;
/* Check if Group Priority is enabled */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
if((Adc_GucPopFrmQueue & (ADC_ONE << LddHwUnit)) != ADC_ZERO)
{
/* Initialise the number of conversion rounds completed before getting
aborted or suspended */
LpRunTimeData->ucSamplesCompleted = LpGroupData->ucReSamplesCompleted;
/* Clear the samples completed RAM variable */
LpGroupData->ucReSamplesCompleted = ADC_ZERO;
/* MISRA Rule : 17.4 */
/* Message : Array indexing shall be the only allowed */
/* form of pointer arithmetic */
/* Reason : To access the channel parameters */
/* Verification : However, part of the code is verified manually*/
/* and it is not having any impact. */
/* Initialise the group's buffer pointer from the channel
which was suspended or aborted */
LpRunTimeData->pBuffer = LpGroupData->pChannelBuffer +
LpRunTimeData->ucSamplesCompleted;
#if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW)
if(LpGroup->ddGroupReplacement == ADC_GROUP_REPL_SUSPEND_RESUME)
#endif /* #if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) */
{
/* Initialise the number of converted channels to previously
stopped channel count value */
LpRunTimeData->ucChannelsCompleted = LpGroupData->ucReChannelsCompleted;
/* Clear the channels completed RAM variable */
LpGroupData->ucReChannelsCompleted = ADC_ZERO;
/* Initialise the group's buffer pointer from the channel
which was suspended */
LpRunTimeData->pBuffer += LpRunTimeData->ucChannelsCompleted;
/* Initialise the channel pointer */
LpRunTimeData->pChannel += LpRunTimeData->ucChannelsCompleted;
}
}
else
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
{
/* Initialise the streaming samples counter */
LpRunTimeData->ucSamplesCompleted = ADC_ZERO;
/* Initialise the group's buffer pointer */
LpRunTimeData->pBuffer = LpGroupData->pChannelBuffer;
/* Set the flag indicating all the samples are not completed */
LpGroupData->blSampleComp = ADC_FALSE;
/* Set the flag indicating Group is not read so far */
LpGroupData->blResultRead = ADC_TRUE;
}
#if ((ADC_HW_TRIGGER_API == STD_ON) && \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW))
/* Update the type of group which is in conversion */
if(LddGroup >= Adc_GucMaxSwTriggGroups)
{
/* Set the RAM variable indicating current group active in HW unit is HW */
LpHwUnitData->ddTrigSource = ADC_TRIGG_SRC_HW;
}
else
{
/* Set the RAM variable indicating current group active in HW unit is SW */
LpHwUnitData->ddTrigSource = ADC_TRIGG_SRC_SW;
}
#endif /* #if ((ADC_HW_TRIGGER_API == STD_ON) && \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW)) */
/* Read the user base configuration address of the hardware unit */
LpAdcUserRegisters = Adc_GpHwUnitConfig[LddHwUnit].pUserBaseAddress;
/* Read the os base configuration address of the hardware unit */
LpAdcOsRegisters = Adc_GpHwUnitConfig[LddHwUnit].pOsBaseAddress;
#if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW)
if(LpGroup->ddGroupReplacement == ADC_GROUP_REPL_SUSPEND_RESUME)
{
/* Initialise the interrupt register with channel list */
LpAdcUserRegisters->ulADCAnIOCm[LucHwCGUnit] = LpGroup->ulChannelList;
}
else
{
/* Load the register with zero, so interrupt is generated at the end
of channel list */
LpAdcUserRegisters->ulADCAnIOCm[LucHwCGUnit] = ADC_ZERO_LONG;
}
#elif (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE)
/* Load the register with zero, so interrupt is generated at the end
of channel list */
LpAdcUserRegisters->ulADCAnIOCm[LucHwCGUnit] = ADC_ZERO_LONG;
#else /* If priority is ADC_PRIORITY_HW_SW or ADC_PRIORITY_HW */
/* Initialise the interrupt register with channel list */
LpAdcUserRegisters->ulADCAnIOCm[LucHwCGUnit] = LpGroup->ulChannelList;
#endif /* #if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))
/* Clear the ADC enable bit ADCAnCE */
LpAdcOsRegisters->usADCAnCTL0 &= ADC_DISABLE_BIT;
/* Clear the operation mode configured previously */
LpAdcOsRegisters->ulADCAnCTL1 &= ADC_OPERATION_CLEAR_MASK;
/* Configure the hardware unit with the group's operation mode */
LpAdcOsRegisters->ulADCAnCTL1 |=
Adc_GaaOperationMask[LpGroup->ucConversionMode];
/* Clear Streaming samples selection bits */
LpAdcOsRegisters->usADCAnCTL0 &= ADC_CG0_STREAM_CLEAR_MASK;
#if (ADC_HW_TRIGGER_API == STD_ON)
/* Check if the group access is streaming access and HW triggered group */
if((LpGroup->ddGroupAccessMode == ADC_ACCESS_MODE_STREAMING) &&
(LddGroup >= Adc_GucMaxSwTriggGroups))
{
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Set Streaming samples selection bits */
LpAdcOsRegisters->usADCAnCTL0 |=
(Adc_GaaStreamEnableMask[LpGroup->ddNumberofSamples] <<
(LucHwCGUnit * ADC_TWO));
}
#endif /* #if (ADC_HW_TRIGGER_API == STD_ON) */
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE)) */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
LpHwUnitData->ddCurrentPriority[LucHwCGUnit] = LpGroup->ddGroupPriority;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
/* Update the hardware unit ram data with the current group information */
LpHwUnitData->ddCurrentConvGroup[LucHwCGUnit] = LddGroup;
#if (ADC_DMA_MODE_ENABLE == STD_ON)
if(LpGroup->ucResultAccessMode == ADC_DMA_ACCESS)
{
/* Initialise the register for channels configured */
LpAdcUserRegisters->ulADCAnIOCm[LucHwCGUnit] = LpGroup->ulChannelList;
LpCGmDmaConfig = &Adc_GpDmaUnitConfig[LpGroup->ucDmaChannelIndex];
LpDmaRegisters = LpCGmDmaConfig->pDmaCntlRegBase;
/* Clear the DTE bit */
LpDmaRegisters->ucDTSn &= ADC_DMA_DISABLE;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to get the DMA destination address */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Load the destination address register */
LpDmaRegisters->ulDDAn = (uint32)LpRunTimeData->pBuffer;
/* Load the transfer count value to the DMA register */
LpDmaRegisters->usDTCn =
(uint16)(LpGroup->ucChannelCount - LpRunTimeData->ucChannelsCompleted);
if(LpGroup->ucConversionMode == ADC_CONTINUOUS)
{
#if(ADC_CPU_CORE == ADC_E2M)
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Set NTCV bit to 1 in next count register and load the
channel count value */
LpDmaRegisters->usDNTCn =
(uint16)((LpGroup->ucChannelCount - LpRunTimeData->ucChannelsCompleted) | \
ADC_DMA_SET_NEXT);
/* Set the INF bit so that NTCV is retained */
LpDmaRegisters->usDTCTn |= ADC_DMA_SET_INF;
#endif /* #if(ADC_CPU_CORE == ADC_E2M) */
/* Set the MLE bit for continuous data transfer */
LpDmaRegisters->usDTCTn |= ADC_DMA_CONTINUOUS;
}
else
{
/* Clear the MLE bit for continuous data transfer */
LpDmaRegisters->usDTCTn &= ADC_DMA_ONCE;
}
/* Enable the DMA interrupt control register */
LpDmaIntpCntrlReg = LpCGmDmaConfig->pDmaImrIntCntlReg;
/* Enable the DMA channel interrupt */
*LpDmaIntpCntrlReg &= LpCGmDmaConfig->ucDmaImrMask;
/* Disable the interrupt */
LpAdcImrAddMask = Adc_GpHwUnitConfig[LddHwUnit].pImrAddMask;
LpAdcImrAddMask = &LpAdcImrAddMask[LucHwCGUnit];
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
*(LpAdcImrAddMask->pImrIntpAddress) |= ~(LpAdcImrAddMask->ucImrMask);
/* Clear the pending interrupt for the CGm unit to which the
group is mapped */
LpIntpCntrlReg = Adc_GpHwUnitConfig[LddHwUnit].pIntpAddress;
LpIntpCntrlReg = &LpIntpCntrlReg[LucHwCGUnit];
*LpIntpCntrlReg &= ADC_CLEAR_INT_REQUEST_FLAG;
/* MISRA Rule : 11.3 */
/* Message : A cast should not be performed between a */
/* pointer type and an integral type. */
/* Reason : This is to access the hardware registers in the */
/* code. */
/* Verification : However, the part of the code is */
/* verified manually and it is not having */
/* any impact on code. */
/* Clear the pending HW interrupt for the DMA channel */
ADC_DMA_DRQCLR |= LpCGmDmaConfig->usDmaChannelMask;
if((LpDmaRegisters->ucDTSn & ADC_DMA_TRANSFER_COMPLETION) ==
ADC_DMA_TRANSFER_COMPLETION)
{
/* Clear the TC bit */
LpDmaRegisters->ucDTSn &= ADC_DMA_TRANSFER_CLEAR;
}
/* DMA transfer enable */
LpDmaRegisters->ucDTSn = ADC_DMA_ENABLE;
}
else
#endif /* #if (ADC_DMA_MODE_ENABLE == STD_ON) */
{
#if (ADC_DMA_MODE_ENABLE == STD_ON)
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))
if(LpGroup->ucDmaChannelIndex != ADC_NO_DMA_CHANNEL_INDEX)
{
LpCGmDmaConfig = &Adc_GpDmaUnitConfig[LpGroup->ucDmaChannelIndex];
/* Disable the DMA interrupt for the DMA channel Id configured
for the CGm unit in which the group is mapped */
LpDmaIntpCntrlReg = LpCGmDmaConfig->pDmaImrIntCntlReg;
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Disable the DMA channel interrupt */
*LpDmaIntpCntrlReg |= ~LpCGmDmaConfig->ucDmaImrMask;
}
#endif /* (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE)) */
#endif /* (ADC_DMA_MODE_ENABLE == STD_ON) */
/* Clear the pending interrupt for the CGm unit to which the
group is mapped */
LpIntpCntrlReg = Adc_GpHwUnitConfig[LddHwUnit].pIntpAddress;
LpIntpCntrlReg = &LpIntpCntrlReg[LucHwCGUnit];
*LpIntpCntrlReg &= ADC_CLEAR_INT_REQUEST_FLAG;
/* Enable the interrupt for the CGm unit to which the group is mapped */
LpAdcImrAddMask = Adc_GpHwUnitConfig[LddHwUnit].pImrAddMask;
LpAdcImrAddMask = &LpAdcImrAddMask[LucHwCGUnit];
*(LpAdcImrAddMask->pImrIntpAddress) &= (LpAdcImrAddMask->ucImrMask);
}
/* Load the Channels that needs to be converted */
LpAdcUserRegisters->ulADCAnCGm[LucHwCGUnit] =
(LpGroup->ulChannelList & \
(ADC_COMPLETE_CHANNEL_MASK << LpRunTimeData->ucChannelsCompleted));
/* Check if the priority ADC_PRIORITY_SW or ADC_PRIORITY_HW_SW is selected */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Is the group not popped from queue or group status is still idle */
if(((Adc_GucPopFrmQueue & (ADC_ONE << LddHwUnit)) == ADC_ZERO) || \
(Adc_GpGroupRamData[LddGroup].ddGroupStatus == ADC_IDLE))
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
{
/* Set the group status as busy */
LpGroupData->ddGroupStatus = ADC_BUSY;
}
/* Enable ADC Driver */
LpAdcOsRegisters->usADCAnCTL0 |= ADC_ENABLE_BIT;
/* Check if the requested group is SW triggered */
if (LddGroup < Adc_GucMaxSwTriggGroups)
{
/* Initiate conversion */
LpAdcUserRegisters->ucADCAnTRG0[LucHwCGUnit * ADC_FOUR] |=
ADC_START_CONVERSION;
}
Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] = ADC_FALSE;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
#if (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW)
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
/* Check if the Group is poped from the queue and configured for
continuous and resume conversion */
if(((Adc_GucPopFrmQueue & (ADC_ONE << LddHwUnit)) != ADC_ZERO) && \
(LpGroup->ucConversionMode == ADC_CONTINUOUS) && \
(LpGroup->ddGroupReplacement == ADC_GROUP_REPL_SUSPEND_RESUME))
#elif (ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)
/* Check if the Group is poped from the queue and configured for
continuous conversion */
if(((Adc_GucPopFrmQueue & (ADC_ONE << LddHwUnit)) != ADC_ZERO) && \
(LpGroup->ucConversionMode == ADC_CONTINUOUS))
#endif
{
/* load the channel list configured for the group so that in the next
iteration all the channels are converted from the beginning */
LpAdcUserRegisters->ulADCAnCGm[LucHwCGUnit] = LpGroup->ulChannelList;
}
/* Reset the flag to false */
Adc_GucPopFrmQueue &= ~(ADC_ONE << LddHwUnit);
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW)) */
}
#define ADC_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Adc_StateTransition
**
** Service ID : NA
**
** Description : This function does the state transition of the Group
** after the call of the API Adc_ReadGroup or
** Adc_GetStreamLastPointer.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : LddGroup
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Adc_GpGroupConfig, Adc_GpGroupRamData,
** Adc_GucMaxSwTriggGroups
** Function(s) invoked:
** Adc_ConfigureGroupForConversion
*******************************************************************************/
#define ADC_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, ADC_PRIVATE_CODE) Adc_StateTransition(Adc_GroupType LddGroup)
{
P2VAR(Tdd_Adc_ChannelGroupRamData, AUTOMATIC,ADC_CONFIG_DATA) LpGroupData;
volatile Adc_HwUnitType LddHwUnit;
volatile uint8 LucHwCGUnit;
LpGroupData = &Adc_GpGroupRamData[LddGroup];
/* Check if the group status is stream completed */
if(LpGroupData->ddGroupStatus == ADC_STREAM_COMPLETED)
{
if(Adc_GpGroupConfig[LddGroup].ucConversionMode == ADC_CONTINUOUS)
{
LpGroupData->ddGroupStatus = ADC_BUSY;
}
else if(Adc_GpGroupConfig[LddGroup].ucConversionMode == ADC_ONCE)
{
if(LddGroup >= Adc_GucMaxSwTriggGroups)
{
/* Set the Global variable indicating the HW unit is busy */
Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] = ADC_TRUE;
/*
* Configure the group for conversion for the subsequent hardware
* or timer trigger, within this function the group status will be
* changed to ADC_BUSY
*/
Adc_ConfigureGroupForConversion(LddGroup);
}
else
{
LpGroupData->ddGroupStatus = ADC_IDLE;
}
}
else
{
/* To avoid QAC warning */
}
}
else if(LpGroupData->ddGroupStatus == ADC_COMPLETED)
{
LpGroupData->ddGroupStatus = ADC_BUSY;
}
else
{
/* To avoid QAC warning */
}
}
#define ADC_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#if (ADC_HW_TRIGGER_API == STD_ON)
/*******************************************************************************
** Function Name : Adc_EnableHWGroup
**
** Service ID : NA
**
** Description : This function enables the ongoing HW triggered group
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : LddGroup
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Adc_GpGroupConfig, Adc_GpGroupRamData,
** Adc_GpHwUnitConfig, Adc_GpHWGroupTrigg,
** Adc_GucMaxSwTriggGroups
** Function(s) invoked:
** Adc_ConfigureGroupForConversion
*******************************************************************************/
#define ADC_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, ADC_PRIVATE_CODE) Adc_EnableHWGroup(Adc_GroupType LddGroup)
{
volatile Adc_HwUnitType LddHwUnit;
volatile uint8 LucHwCGUnit;
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))
P2VAR(Tdd_AdcConfigOsRegisters, AUTOMATIC,ADC_CONFIG_DATA) LpAdcOsRegisters;
#if (ADC_TO_TIMER_CONNECT_SUPPORT == STD_ON)
P2VAR(Tdd_AdcPicRegisters, AUTOMATIC,ADC_CONFIG_DATA) LpAdcPicRegisters;
#endif /* #if (ADC_TO_TIMER_CONNECT_SUPPORT == STD_ON) */
Adc_GroupType LddVirGroup;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE)) */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE))
/* Get the index to HW trigger details of requested group */
LddVirGroup = LddGroup - Adc_GucMaxSwTriggGroups;
/* Get the Hardware Unit to which the group belongs */
LddHwUnit = Adc_GpGroupConfig[LddGroup].ucHwUnit;
/* Get the base configuration address of the hardware unit */
LpAdcOsRegisters = Adc_GpHwUnitConfig[LddHwUnit].pOsBaseAddress;
#if (ADC_TO_TIMER_CONNECT_SUPPORT == STD_ON)
/* Get the base configuration address of the hardware unit */
LpAdcPicRegisters = Adc_GpHwUnitConfig[LddHwUnit].pPicBaseAddress;
/* load the TAUA0 interrupts configured for this channel group */
LpAdcPicRegisters->usPIC0ADTEN40n[ADC_ZERO] =
Adc_GpHWGroupTrigg[LddVirGroup].usTAUA0TriggerMask;
/* load the TAUA1 interrupts configured for this channel group */
LpAdcPicRegisters->usPIC0ADTEN41n[ADC_ZERO] =
Adc_GpHWGroupTrigg[LddVirGroup].usTAUA1TriggerMask;
#endif /* #if (ADC_TO_TIMER_CONNECT_SUPPORT == STD_ON) */
/* Clear the external trigger bits in ADCAnCTL1 */
LpAdcOsRegisters->ulADCAnCTL1 &= ADC_CG0_EXTTRIG_CLEAR_MASK;
/* Configure for HW edge trigger value */
LpAdcOsRegisters->ulADCAnCTL1 |=
Adc_GpHWGroupTrigg[LddVirGroup].ulExtTrigEnableMask;
/* Configure for HW trigger values configured */
LpAdcOsRegisters->usADCAnTSELm[ADC_ZERO] =
Adc_GpHWGroupTrigg[LddVirGroup].usHWTriggerMask;
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE)) */
/* Set the Global variable indicating the HW unit is busy */
Adc_GaaHwUnitStatus[((LddHwUnit * ADC_THREE) + LucHwCGUnit)] = ADC_TRUE;
/* Configure the group for conversion */
Adc_ConfigureGroupForConversion(LddGroup);
/* Set the Trigger status for the group as true */
Adc_GpGroupRamData[LddGroup].ucHwTriggStatus = ADC_TRUE;
}
#define ADC_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* ADC_HW_TRIGGER_API == STD_ON */
#if (ADC_HW_TRIGGER_API == STD_ON)
/*******************************************************************************
** Function Name : Adc_DisableHWGroup
**
** Service ID : NA
**
** Description : This function disables the ongoing HW triggered group
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : LddGroup
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Adc_GpGroupConfig, Adc_GpGroupRamData,
** Adc_GpHwUnitConfig
** Function(s) invoked:
** None
*******************************************************************************/
#define ADC_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, ADC_PRIVATE_CODE) Adc_DisableHWGroup(Adc_GroupType LddGroup)
{
P2VAR(Tdd_AdcConfigUserRegisters, AUTOMATIC,ADC_CONFIG_DATA)
LpAdcUserRegisters;
P2VAR(Tdd_Adc_ChannelGroupRamData, AUTOMATIC,ADC_CONFIG_DATA) LpGroupData;
P2CONST(Tdd_AdcImrAddMaskConfigType, AUTOMATIC, ADC_CONFIG_DATA)
LpAdcImrAddMask;
P2VAR(uint16, AUTOMATIC, ADC_CONFIG_DATA) LpIntpCntrlReg;
Adc_HwUnitType LddHwUnit;
uint8 LucHwCGUnit;
LpGroupData = &Adc_GpGroupRamData[LddGroup];
/* Read the Hardware Unit to which the group belongs */
LddHwUnit = Adc_GpGroupConfig[LddGroup].ucHwUnit;
LpAdcUserRegisters = Adc_GpHwUnitConfig[LddHwUnit].pUserBaseAddress;
/* Get the CGm unit to which the channel group is mapped */
LucHwCGUnit = Adc_GpGroupConfig[LddGroup].ucHwCGUnit;
/* Stop the conversion of the channel group */
LpAdcUserRegisters->ucADCAnTRG4[LucHwCGUnit * ADC_FOUR] = \
ADC_STOP_CONVERSION;
/* Clear the channel list to avoid conversion on next HW trigger */
LpAdcUserRegisters->ulADCAnCGm[LucHwCGUnit] = ADC_CLEAR_CHANNEL_LIST;
/* Disable the interrupt for the CGm unit to which the group is mapped */
LpAdcImrAddMask = Adc_GpHwUnitConfig[LddHwUnit].pImrAddMask;
LpAdcImrAddMask = &LpAdcImrAddMask[LucHwCGUnit];
/* MISRA Rule : 12.7 */
/* Message : Bitwise operators shall not be applied to */
/* operands whose underlying type is signed. */
/* Reason : Though the bitwise operation is performed on */
/* unsigned data, this warning is generated by */
/* the QAC tool V6.2.1 as an indirect result of */
/* integral promotion in complex bitwise */
/* operations. */
/* Verification : However, this part of the code is verified */
/* manually and it is not having any impact. */
*(LpAdcImrAddMask->pImrIntpAddress) |= ~(LpAdcImrAddMask->ucImrMask);
/* Clear the pending interrupt for the CGm unit to which the
group is mapped */
LpIntpCntrlReg = Adc_GpHwUnitConfig[LddHwUnit].pIntpAddress;
LpIntpCntrlReg = &LpIntpCntrlReg[LucHwCGUnit];
*LpIntpCntrlReg &= ADC_CLEAR_INT_REQUEST_FLAG;
#if (ADC_GRP_NOTIF_CAPABILITY == STD_ON)
/* Store disabled notification into RAM */
LpGroupData->ucNotifyStatus = ADC_FALSE;
#endif /* #if (ADC_GRP_NOTIF_CAPABILITY == STD_ON) */
/* Set the Group status to idle */
LpGroupData->ddGroupStatus = ADC_IDLE;
/* Set the group enable hardware trigger status to false */
LpGroupData->ucHwTriggStatus = ADC_FALSE;
}
#define ADC_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* ADC_HW_TRIGGER_API == STD_ON */
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON)))
/*******************************************************************************
** Function Name : Adc_SearchnDelete
**
** Service ID : NA
**
** Description : This function is called by the Adc_StopGroupConverion
** API to search if the requested group is in the queue
** and remove it from the queue.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Reentrant
**
** Input Parameters : LddGroup, LddHwUnit
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Adc_GpGroupRamData,
** Adc_GpHwUnitConfig, Adc_GpHwUnitRamData
** Function(s) invoked:
** Adc_ConfigureGroupForConversion
*******************************************************************************/
#define ADC_START_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, ADC_PRIVATE_CODE) Adc_SearchnDelete(Adc_GroupType LddGroup,
Adc_HwUnitType LddHwUnit)
{
P2VAR(Tdd_Adc_HwUnitRamData, AUTOMATIC, ADC_CONFIG_DATA) LpHwUnitData;
P2VAR(Adc_GroupType, AUTOMATIC, ADC_CONFIG_DATA) LpQueue;
uint8 LucQueueSize;
uint8_least LucLoopCount;
/* Initialise the loop count to zero */
LucLoopCount = ADC_ZERO;
/* Initialise HW RAM data to a local pointer */
LpHwUnitData = &Adc_GpHwUnitRamData[LddHwUnit];
/* Get the base address of the Queue */
LpQueue = Adc_GpHwUnitConfig[LddHwUnit].pQueue;
/* Read the configured priority queue size */
LucQueueSize = LpHwUnitData->ucQueueCounter;
/* Find the requested group in the queue and re-arrange the
queue by deleting the requested group */
while(LucLoopCount < LucQueueSize)
{
if(LddGroup == LpQueue[LucLoopCount])
{
/* Decrement the queue size by one */
LucQueueSize--;
/* Update the queue counter value */
LpHwUnitData->ucQueueCounter = LucQueueSize;
/* Re-arrange the queue after deleting the requested group */
while(LucLoopCount < LucQueueSize)
{
LpQueue[LucLoopCount] = LpQueue[LucLoopCount + ADC_ONE];
LucLoopCount++;
}
/* To exit from the while loop */
LucLoopCount = LucQueueSize;
}
LucLoopCount++;
}
/* Clear the flag indicating group removed from the queue */
Adc_GpGroupRamData[LddGroup].ucGrpPresent = ADC_FALSE;
/* Update the queue status */
if(LpHwUnitData->ucQueueCounter == ADC_ZERO)
{
/* Set queue status as empty */
LpHwUnitData->ucQueueStatus = ADC_QUEUE_EMPTY;
}
else
{
/* Set queue status as filled */
LpHwUnitData->ucQueueStatus = ADC_QUEUE_FILLED;
}
}
#define ADC_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"/* PRQA S 5087 */
#endif /* #if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_SW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW) || \
((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_NONE) && \
(ADC_ENABLE_QUEUING == STD_ON))) */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Can/Can.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Can.c */
/* Version = 3.0.6a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2008-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of Initialization and Version Control Functionality. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12.12.2008 : Initial Version
* V3.0.1: 10.10.2009 : DET Updated for supporting INVALID_DATABASE and
* updated for changes in wake-up support as per
* SCR ANMCANLINFR3_SCR_031.
* V3.0.2: 20.01.2010 : Can_Init.c file renamed to Can.c as per
* SCR ANMCANLINFR3_SCR_042.
* V3.0.3: 21.04.2010 : As per ANMCANLINFR3_SCR_056,
* 1. Provision for Tied Wakeup interrupts is added.
* 2. MCONF and MIDH registers are write protected with
* respective masks.
* V3.0.4: 11.05.2010 : 1. CAN_MAX_NUMBER_OF_BASICCANHTH is replaced with
* ucMaxNofBasicCanHth for multiple configuration support
* as per ANMCANLINFR3_SCR_060.
* 2. "ddMask<xxx>Reg" are changed to "ucMask<xxx>Reg" as
* per guidelines.
* V3.0.5: 31.12.2010 : Can.h and CanIf_Cbk.h files are included
* SCR ANMCANLINFR3_SCR_087.
* V3.0.6: 20.06.2011 : As per SCR ANMCANLINFR3_SCR_107,
* 1. data width of interrupt control registers is
* changed from unit8 to unit16 in Can_Init().
* 2. Clearing of error counters of FCN procedure is
* implemented in API Can_Initcontroller().
* V3.0.6a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Can.h" /* CAN Driver Header File */
#include "CanIf_Cbk.h" /* CAN Interface call-back Header File */
#include "Can_PBTypes.h" /* CAN Driver Post-Build Config. Header File */
#include "Can_Init.h" /* CAN Initialization Header File */
#include "Can_Ram.h" /* CAN Driver RAM Header File */
#include "Can_Tgt.h" /* CAN Driver Target Header File */
#include "Dem.h" /* DEM Header File */
#if (CAN_DEV_ERROR_DETECT == STD_ON)
#include "Det.h" /* DET Header File */
#endif
#include "SchM_Can.h" /* Scheduler Header File */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define CAN_INIT_C_AR_MAJOR_VERSION 2
#define CAN_INIT_C_AR_MINOR_VERSION 2
#define CAN_INIT_C_AR_PATCH_VERSION 2
/* File version information */
#define CAN_INIT_C_SW_MAJOR_VERSION 3
#define CAN_INIT_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (CAN_INIT_AR_MAJOR_VERSION != CAN_INIT_C_AR_MAJOR_VERSION)
#error "Can_Init.c : Mismatch in Specification Major Version"
#endif
#if (CAN_INIT_AR_MINOR_VERSION != CAN_INIT_C_AR_MINOR_VERSION)
#error "Can_Init.c : Mismatch in Specification Minor Version"
#endif
#if (CAN_INIT_AR_PATCH_VERSION != CAN_INIT_C_AR_PATCH_VERSION)
#error "Can_Init.c : Mismatch in Specification Patch Version"
#endif
#if (CAN_INIT_SW_MAJOR_VERSION != CAN_INIT_C_SW_MAJOR_VERSION)
#error "Can_Init.c : Mismatch in Software Major Version"
#endif
#if (CAN_INIT_SW_MINOR_VERSION != CAN_INIT_C_SW_MINOR_VERSION)
#error "Can_Init.c : Mismatch in Software Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Can_Init
**
** Service ID : 0x00
**
** Description : This service initializes the static variables and CAN HW
** Unit global hardware settings for the further processing
** and initiates the setup of all CAN Controller specific
** settings.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Non Re-entrant
**
** Input Parameters : Config
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s) referred in this function:
** Can_GblCanStatus,Can_GpCntrlIdArray,Can_GpFirstHth,
** Can_GpFirstController,Can_GucLastHthId,Can_GucFirstHthId
** Can_GucLastCntrlId
**
** Function(s) invoked:
** Det_ReportError(), Dem_ReportErrorStatus()
**
*******************************************************************************/
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, CAN_AFCAN_PUBLIC_CODE)Can_Init
(P2CONST(Can_ConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST) Config)
{
P2CONST(Can_ControllerConfigType,AUTOMATIC,
CAN_AFCAN_PRIVATE_CONST) LpController;
P2CONST(Tdd_Can_AFCan_Hrh,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST) LpHrh;
P2CONST(Tdd_Can_AFCan_Hth,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST) LpHth;
P2VAR(Tdd_Can_AFCan_8bit_CntrlReg,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg8bit;
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit;
P2VAR(Tdd_Can_AFCan_8bit_MsgBuffer,AUTOMATIC,CAN_AFCAN_PRIVATE_DATA)
LpMsgBuffer8bit;
P2VAR(Tdd_Can_AFCan_16bit_MsgBuffer,AUTOMATIC,CAN_AFCAN_PRIVATE_DATA)
LpMsgBuffer16bit;
P2VAR(Tdd_Can_AFCan_HwFilterMaskReg,AUTOMATIC,
CAN_AFCAN_PRIVATE_DATA) LpHwFilterMask;
P2CONST(Tdd_Can_AFCan_HwFilterMask,AUTOMATIC,
CAN_AFCAN_PRIVATE_CONST) LpFilterMask;
P2VAR(uint16,AUTOMATIC,CAN_AFCAN_CONFIG_DATA)LpIntCntrlReg;
uint16_least LusTimeOutCount1;
uint8_least LucNoOfController;
uint8 LucCntrlCount;
uint8_least LucCount;
uint8_least LucMsgBufferCount;
boolean LblErrFlag;
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Initialize the error status flag to false */
LblErrFlag = CAN_FALSE;
/* Report to DET, if module is initialized */
if(Can_GblCanStatus == CAN_INITIALIZED)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE, CAN_INIT_SID,
CAN_E_TRANSITION);
/* Set the error status flag to true */
LblErrFlag = CAN_TRUE;
}
/* Report to DET, if Config pointer is equal to Null */
if (Config == NULL_PTR)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE, CAN_INIT_SID,
CAN_E_PARAM_POINTER);
/* Set the error status flag to true */
LblErrFlag = CAN_TRUE;
}
else
{
/* Report to DET, if database is not valid */
if(Config->ulStartOfDbToc != CAN_DBTOC_VALUE)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE, CAN_INIT_SID,
CAN_E_INVALID_DATABASE);
/* Set the error status flag to true */
LblErrFlag = CAN_TRUE;
}
}
/* Check whether any development error occurred */
if(LblErrFlag != CAN_TRUE)
#endif /*#if(CAN_DEV_ERROR_DETECT == STD_ON) */
{
/* MISRA Rule : 1.2
Message : Dereferencing pointer value that is apparently
NULL.
Reason : "Config" pointer is checked and verified when
DET is switched STD_ON.
Verification : However, the part of the code is
verified manually and it is not having
any impact on code.
*/
/* Get the index of first Hth configured */
Can_GucFirstHthId = Config->ucFirstHthId;
/* Get the pointer to first Controller structure */
Can_GpFirstController = Config->pFirstController;
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Get the index of last Hth configured */
Can_GucLastHthId = Config->ucLastHthId;
/* Get the index of last Controller configured */
Can_GucLastCntrlId = Config->ucLastCntrlId;
#endif
/* Get the pointer to first Hth structure */
Can_GpFirstHth =(P2CONST(Tdd_Can_AFCan_Hth,AUTOMATIC,
CAN_AFCAN_PRIVATE_CONST))Config->pFirstHth;
/* Get the pointer to first Cntrl Id Array */
Can_GpCntrlIdArray = Config->pCntrlIdArray;
/* Get the number of Controllers into local variable */
LucNoOfController = CAN_MAX_NUMBER_OF_CONTROLLER;
/* Get the pointer to first Controller structure */
LpController = Can_GpFirstController;
/* Initialize for number of controllers count */
LucCntrlCount = CAN_ZERO;
/* Loop for the number of controllers */
do
{
/* Get the pointer to 8-bit control register structure */
LpCntrlReg8bit = LpController->pCntrlReg8bit;
/* Get the pointer to 16-bit control register structure */
LpCntrlReg16bit = LpController->pCntrlReg16bit;
/* Get the Timeout count value and store it in a local variable */
LusTimeOutCount1 = CAN_TIMEOUT_COUNT;
/* Initialize error flag to true */
LblErrFlag = CAN_TRUE;
/* Loop until GOM bit is cleared */
do
{
/* Enable force shut down bit */
LpCntrlReg16bit->usFcnGmclCtl = CAN_SET_EFSD;
/* Disable the CAN module */
LpCntrlReg16bit->usFcnGmclCtl = CAN_CLR_GOM;
/* Decrement timeout count by one */
LusTimeOutCount1--;
}while((LpCntrlReg16bit->usFcnGmclCtl != CAN_ZERO) &&
(LusTimeOutCount1 != CAN_ZERO));
/* Check whether Timeout count is expired or not */
if(LusTimeOutCount1 != CAN_ZERO)
{
/* Set error flag to false */
LblErrFlag = CAN_FALSE;
/* Set the CAN module system clock */
LpCntrlReg8bit->ucFcnGmcsPre = CAN_SET_SYSTEM_CLOCK;
/* Enable CAN module */
LpCntrlReg16bit->usFcnGmclCtl = CAN_SET_GOM;
/* Clear all interrupt flags of Interrupt Status register*/
LpCntrlReg16bit->usFcnCmisCtl = CAN_CLR_ALL_INTERRUPT;
/* Set CCERC bit to clear INFO and ERC registers */
LpCntrlReg16bit->usFcnCmclCtl = CAN_SET_CCERC_BIT;
/* Set the bit rate prescaler register */
LpCntrlReg8bit->ucFcnCmbrPrs = LpController->ucBRP;
/* Set the bit rate register */
LpCntrlReg16bit->usFcnCmbtCtl = LpController->usBTR;
/* Set interrupt enable register */
LpCntrlReg16bit->usFcnCmieCtl = LpController->usIntEnable;
/* Get the number of masks configured and store it in a local
variable */
LucCount = (LpController->ucNoOfFilterMask);
/* Check whether any mask is configured or not */
if (LucCount != CAN_ZERO)
{
/* Get the pointer to filter mask structure from Controller
structure */
LpFilterMask = LpController->pFilterMask;
/* Get the pointer to the first filtermask from control register
structure */
LpHwFilterMask = LpCntrlReg16bit->ddHwFilterMask;
/* Loop for the number of the masks configured */
do
{
/* Set the Low Mask control register */
LpHwFilterMask->ucFcnCmmkCtl01h = LpFilterMask->usMaskLow;
/* Set the High Mask control register */
LpHwFilterMask->ucFcnCmmkCtl02h = LpFilterMask->usMaskHigh;
/* MISRA Rule : 17.4
Message : Increment or decrement operation performed
on pointer(LpHwFilterMask/LpFilterMask).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to the next filter mask
registers */
LpHwFilterMask++;
/* Increment the pointer to point to the next filter mask
structure */
LpFilterMask++;
/* Decrement the number of masks count configured */
LucCount--;
}while(LucCount != CAN_ZERO);
}/* if (LucCount != CAN_ZERO) */
/* Get the pointer to first message buffer from 8-bit control register
structure */
LpMsgBuffer8bit = LpCntrlReg8bit->ddMsgBuffer;
/* Get the pointer to first message buffer from 16-bit control register
structure */
LpMsgBuffer16bit = LpCntrlReg16bit->ddMsgBuffer;
/* Get the number of CAN Message Buffers of the controller and store it
in a local variable */
LucCount = LpController->ucMaxNoOfMsgBufs;
/* Get the no. of Hrh configured and store it in a local variable */
LucMsgBufferCount = LpController->ucNoOfHrh;
/* Check whether any Hrh is configured or not */
if(LucMsgBufferCount != CAN_ZERO)
{
/* Get the pointer to first Hrh from Controller structure */
LpHrh = (P2CONST(Tdd_Can_AFCan_Hrh,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST))
LpController->pHrh;
/* Loop for the number of Hrh configured */
do
{
/* Get the Timeout count value and store it in a local variable */
LusTimeOutCount1 = CAN_TIMEOUT_COUNT;
/* Clear control bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_CLR_CTRL_BIT;
/* Loop until RDY bit is cleared or Timeout count expired */
do
{
/* Decrement the Timeout count */
LusTimeOutCount1--;
/* Check whether RDY bit is cleared and Timeout count is
expired or not */
}while(((LpMsgBuffer16bit->usFcnMmCtl & CAN_RDY_BIT_STS) !=
CAN_ZERO) && (LusTimeOutCount1 != CAN_ZERO));
/* Check whether Timeout count is expired or not */
if (LusTimeOutCount1 != CAN_ZERO)
{
/*
Check whether the configured CAN-ID is Standard or Extended
*/
#if(CAN_STANDARD_CANID == STD_OFF)
/* Set the Extended CAN-ID Higher bit - 16 to 28 */
LpMsgBuffer16bit->usFcnMmMid1h = LpHrh->usCanIdHigh &
CAN_MIDH_REG_MASK;
/* Set the Extended CAN-ID Lower bit - 0 to 15 */
LpMsgBuffer16bit->usFcnMmMid0h = LpHrh->usCanIdLow;
#else
/* Set the Standard CAN-ID Higher bit - 18 to 28 */
LpMsgBuffer16bit->usFcnMmMid1h = LpHrh->usCanIdHigh &
CAN_MIDH_REG_MASK;
#endif /* #if(CAN_STANDARD_CANID == OFF) */
/* Set the message buffer type */
LpMsgBuffer8bit->ucFcnMmStrb = LpHrh->ucMConfigReg &
CAN_MCONF_REG_MASK;
/* Enable message buffer interrupt request bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_SET_MBUF_INT_EN;
/* Set RDY bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_SET_RDY_BIT;
/* MISRA Rule : 17.4
Message : Increment or decrement operation
performed on pointer(LpHrh/LpMsgBuffer).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any
impact.
*/
/* Increment the pointer to point to next Hrh structure */
LpHrh++;
/* Increment the pointer to point to next 8-bit message buffer
structure */
LpMsgBuffer8bit++;
/* Increment the pointer to point to next 16-bit message buffer
structure */
LpMsgBuffer16bit++;
/* Decrement the number of Hrh count configured */
LucMsgBufferCount--;
/* Decrement LucCount by one */
LucCount--;
} /* if (LusTimeOutCount1 != CAN_ZERO) */
else
{
/* Set the Hrh count to zero to break the loop */
LucMsgBufferCount = CAN_ZERO;
/* Report to DEM for hardware failure */
Dem_ReportErrorStatus(CAN_E_TIMEOUT, DEM_EVENT_STATUS_FAILED);
/* Set the error flag status to true */
LblErrFlag = CAN_TRUE;
}
}while(LucMsgBufferCount != CAN_ZERO);
} /* if(LucCount != CAN_ZERO) */
/* Get the number of Hth configured and store it in a local variable*/
LucMsgBufferCount = LpController->ucNoOfHth;
/* Check whether any Hth configured and any error message occurred */
if((LucMsgBufferCount != CAN_ZERO) && (LblErrFlag != CAN_TRUE))
{
/* Get the pointer to first Hth from Controller structure */
LpHth = (P2CONST(Tdd_Can_AFCan_Hth,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST))
LpController->pHth;
/* Loop for the number of Hth configured */
do
{
/* Get the Timeout count value and store it in a local variable */
LusTimeOutCount1 = CAN_TIMEOUT_COUNT;
/* Clear RDY bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_CLR_CTRL_BIT;
/* Loop until RDY bit cleared or Timeout count expired */
do
{
/* Decrement the Timeout count */
LusTimeOutCount1--;
/* Check whether RDY bit is cleared and Timeout count is
expired or not */
}while(((LpMsgBuffer16bit->usFcnMmCtl & CAN_RDY_BIT_STS) !=
CAN_ZERO) && (LusTimeOutCount1 != CAN_ZERO));
/* Check whether Timeout count is expired or not */
if (LusTimeOutCount1 != CAN_ZERO)
{
/* Check whether Multiplexed transmission is on or not */
#if (CAN_MULTIPLEX_TRANSMISSION == STD_ON)
/* Set the global flag to zero */
*(LpHth->pHwAccessFlag) = CAN_FALSE;
#endif
/* Set the message buffer type */
LpMsgBuffer8bit->ucFcnMmStrb = CAN_SET_MSG_BUFFER_EN &
CAN_MCONF_REG_MASK;
/* Enable message buffer interrupt request bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_SET_MBUF_INT_EN;
/* Set RDY bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_SET_RDY_BIT;
/* MISRA Rule : 17.4
Message : Increment or decrement operation
performed on pointer(LpHth/LpMsgBuffer).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact
*/
/* Increment the pointer to point to the next Hth structure */
LpHth++;
/* Increment the 8-bit message buffer register */
LpMsgBuffer8bit++;
/* Increment the 16-bit message buffer register */
LpMsgBuffer16bit++;
/* Decrement the count */
LucCount--;
/* Decrement the number of Hth count configured */
LucMsgBufferCount--;
}
else
{
/* Set the Hth count to zero to break the loop */
LucMsgBufferCount = CAN_ZERO;
/* Report to DEM */
Dem_ReportErrorStatus(CAN_E_TIMEOUT, DEM_EVENT_STATUS_FAILED);
/* Set the error flag status to true */
LblErrFlag = CAN_TRUE;
}
}while( LucMsgBufferCount != CAN_ZERO);
} /* if(LucCount != CAN_ZERO) */
/* Loop to disable all the message buffers during initialization */
while((LucCount != CAN_ZERO) && (LblErrFlag != CAN_FALSE))
{
/* Clear RDY,DN,TRQ,IE and MOW Bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_CLR_CTRL_BIT;
/* Get the Timeout count value and store it in a local variable */
LusTimeOutCount1 = CAN_TIMEOUT_COUNT;
/* Loop until RDY bit is cleared or Timeout count is expired */
do
{
/* Decrement the Timeout Count */
LusTimeOutCount1--;
/* Check whether RDY bit is cleared and Timeout count is expired
or not*/
} while(((LpMsgBuffer16bit->usFcnMmCtl & CAN_RDY_BIT_STS) != CAN_ZERO)
&& (LusTimeOutCount1 != CAN_ZERO));
/* Disable the message buffer */
LpMsgBuffer8bit->ucFcnMmStrb = CAN_MSG_BUFFER_DISABLE &
CAN_MCONF_REG_MASK;
/* MISRA Rule : 17.4
Message : Increment or decrement operation
performed on pointer(LpMsgBuffer).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to next 8-bit message buffer */
LpMsgBuffer8bit++;
/* Increment the pointer to point to next 16-bit message buffer */
LpMsgBuffer16bit++;
/* Decrement the message buffer count */
LucCount--;
}
}
/* Check whether the error flag is false or not */
if(LblErrFlag == CAN_FALSE)
{
/* Initialize Interrupt Counter to zero */
Can_GucIntCounter[LucCntrlCount] = CAN_ZERO;
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Set the Controller to stop mode */
*(LpController->pCntrlMode) = (uint8)CAN_T_STOP;
#endif /*#if(CAN_DEV_ERROR_DETECT == STD_ON) */
/* Enable protection for exclusive area */
SchM_Enter_Can(CAN_INTERRUPT_CONTROL_PROTECTION_AREA);
/* Get the pointer to ICR register */
LpIntCntrlReg = (LpController->pIntCntrlReg);
/* Enable error interrupt in EIC if bus-off configured */
*LpIntCntrlReg &= (LpController->usMaskERRReg);
/* MISRA Rule : 17.4
Message : Performing pointer arithmetic.
Reason : Increment operator not used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
#if (CAN_WAKEUP_INTERRUPTS_TIED == TRUE)
/* Increment the pointer to point to next EIC register */
LpIntCntrlReg++;
#else
LpIntCntrlReg += CAN_TWO;
#endif
/* Enable receive interrupt in EIC if configured */
*LpIntCntrlReg &= (LpController->usMaskRECReg);
/* MISRA Rule : 17.4
Message : Performing pointer arithmetic.
Reason : Increment operator not used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to next EIC register */
LpIntCntrlReg++;
/* Enable transmit interrupt in EIC if configured */
*LpIntCntrlReg &= (LpController->usMaskTRXReg);
/* Get the pointer to wake-up ICR register */
LpIntCntrlReg = (LpController->pWupIntCntrlReg);
/* Enable wake-up interrupt in EIC if configured */
*LpIntCntrlReg &= (LpController->usMaskWUPReg);
/* Disable protection for exclusive area */
SchM_Exit_Can(CAN_INTERRUPT_CONTROL_PROTECTION_AREA);
}
/* Check whether the error status flag is true or not */
else
{
/* Report to DEM */
Dem_ReportErrorStatus(CAN_E_TIMEOUT, DEM_EVENT_STATUS_FAILED);
}
/* Decrement the number of Controller */
LucNoOfController--;
/* MISRA Rule : 17.4
Message : Increment or decrement operation
performed on pointer(LpController).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to the next Controller structure */
LpController++;
/* Increment LucCntrlCount by one */
LucCntrlCount++;
/* MISRA Rule : 13.7
Message : The result of this logical operation is always
'false'. The value of this 'do - while' control
expression is always 'false'. The loop will be
executed once.
Reason : The result of this logical operation is always
false since only one controller is configured.
However, when two or more controllers are
configured this warning ceases to exist.
Verification : However, part of the code is verified manually
and it is not having any impact.
*/
/* Check whether the number of Controller equals to zero and error flag is
true or not */
}while((LucNoOfController != CAN_ZERO) && (LblErrFlag == CAN_FALSE));
#if (CAN_HW_TRANSMIT_CANCELLATION_SUPPORT == STD_ON)
/* Set local counter start count as zero */
LucCount = CAN_ZERO;
/* Check for maximum number of TxCancel counter */
while(LucCount <= (((Config->ucMaxNofBasicCanHth) - CAN_ONE) >> CAN_THREE))
{
/* Initialize TxCancel counter to zero */
Can_GaaTxCancelCtr[LucCount] = CAN_ZERO;
/* Increment local counter */
LucCount++;
}
/* Initialize TxCancel Interrupt Flag to false */
Can_GblTxCancelIntFlg = CAN_FALSE;
#endif
/* Check whether the error flag is false or not */
if(LblErrFlag == CAN_FALSE)
{
/* Set the CAN status as initialized */
Can_GblCanStatus = CAN_INITIALIZED;
}
}/* if(LblErrFlag != CAN_TRUE) */
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Can_Initcontroller
**
** Service ID : 0x02
**
** Description : This service executes CAN Controller (re)initialization.
** A logical number is assigned to each set statically. The
** parameter *Config selects the configuration set that is
** used for initialization .
**
** Sync/Async : Synchronous
**
** Re-entrancy : Non Re-entrant
**
** Input Parameters : Controller, Config
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : CanDriver module must be initialized.
**
** Remarks : Global Variable(s) referred in this function:
** Can_GblCanStatus, Can_GpFirstController
** Can_GucLastCntrlId
**
** Function(s) invoked:
** Det_ReportError()
*
*******************************************************************************/
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, CAN_AFCAN_PUBLIC_CODE) Can_InitController (uint8 Controller,
P2CONST(Can_ControllerConfigType, AUTOMATIC, CAN_AFCAN_APPL_CONST) Config)
{
P2CONST(Can_ControllerConfigType,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpController;
P2VAR(Tdd_Can_AFCan_8bit_CntrlReg,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg8bit;
P2VAR(Tdd_Can_AFCan_16bit_CntrlReg,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST)
LpCntrlReg16bit;
P2VAR(Tdd_Can_AFCan_HwFilterMaskReg,AUTOMATIC,
CAN_AFCAN_PRIVATE_DATA) LpHwFilterMask;
P2CONST(Tdd_Can_AFCan_HwFilterMask,AUTOMATIC,
CAN_AFCAN_PRIVATE_CONST) LpFilterMask;
P2VAR(Tdd_Can_AFCan_16bit_MsgBuffer,AUTOMATIC,CAN_AFCAN_PRIVATE_DATA)
LpMsgBuffer16bit;
P2VAR(Tdd_Can_AFCan_8bit_MsgBuffer,AUTOMATIC,CAN_AFCAN_PRIVATE_DATA)
LpMsgBuffer8bit;
P2CONST(Tdd_Can_AFCan_Hrh,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST) LpHrh;
P2CONST(Tdd_Can_AFCan_Hth,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST) LpHth;
#if (CAN_DEV_ERROR_DETECT == STD_ON)
boolean LblErrFlag;
#endif
uint16_least LusTimeOutCount, LusTimeOutCount1;
uint16 LusElevenDbtCount;
uint8 LucCount;
uint8_least LucMsgBufferCount;
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Initialize the error status flag to false */
LblErrFlag = CAN_FALSE;
/* Report to DET, if Config pointer is equal to Null */
if (Config == NULL_PTR)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_INIT_CNTRL_SID,CAN_E_PARAM_POINTER);
/* Set the error status flag to true */
LblErrFlag = CAN_TRUE;
}
/* Report to DET, if module is not initialized */
if (Can_GblCanStatus == CAN_UNINITIALIZED)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_INIT_CNTRL_SID, CAN_E_UNINIT);
/* Set the error status flag to true */
LblErrFlag = CAN_TRUE;
}
/* Report to DET,if the Controller Id is out of range */
else if (Controller > Can_GucLastCntrlId)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_INIT_CNTRL_SID, CAN_E_PARAM_CONTROLLER);
/* Set the error status flag to true */
LblErrFlag = CAN_TRUE;
}
else
{
/* Get the Controller index */
Controller = Can_GpCntrlIdArray[Controller];
/* Report to DET, if the Controller index is not present */
if(Controller == CAN_LIMIT)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_INIT_CNTRL_SID, CAN_E_PARAM_CONTROLLER);
/* Set the error status flag to true */
LblErrFlag = CAN_TRUE;
}
else
{
/* Get the pointer to Controller structure */
LpController = &Can_GpFirstController[Controller];
/* Check whether the Controller is in stop mode */
if(*(LpController->pCntrlMode) != (uint8)CAN_T_STOP)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_INIT_CNTRL_SID, CAN_E_TRANSITION);
/* Set the error status flag to true */
LblErrFlag = CAN_TRUE;
} /* if(*(LpController->pCntrlMode) != (uint8)CAN_T_STOP) */
}
}
/* Check whether any development error occurred */
if(LblErrFlag != CAN_TRUE)
#endif /* #if(CAN_DEV_ERROR_DETECT == STD_ON) */
{
#if (CAN_DEV_ERROR_DETECT == STD_OFF)
/* Get the Controller Index value */
Controller = Can_GpCntrlIdArray[Controller];
/* Get the pointer to Controller structure */
LpController = &Can_GpFirstController[Controller];
#endif
/* MISRA Rule : 9.1
Message : The variable(LpController) may be unset at this
point.
Reason : This is to achieve throughput in the code.
Verification : It is assured that variable is initialized
correctly before actually being used by the
embedded portion.
*/
/* Get the pointer to 8-bit control register structure */
LpCntrlReg8bit = LpController->pCntrlReg8bit;
/* Get the pointer to 16-bit control register structure */
LpCntrlReg16bit = LpController->pCntrlReg16bit;
/* Get the pointer to first message buffer from 16-bit control register
structure */
LpMsgBuffer16bit = LpCntrlReg16bit->ddMsgBuffer;
/* Stop Automatic block transmission */
LpCntrlReg16bit->usFcnGmabCtl = CAN_CLR_ABT_BIT;
/* Get the Timeout count value and store it in a local variable */
LusTimeOutCount = CAN_TIMEOUT_COUNT;
/* Loop until ABTT bit is cleared */
do
{
/* Decrement the Timeout count */
LusTimeOutCount--;
/* Check whether ABTT bit is cleared and Timeout count is
expired or not */
}while(((LpCntrlReg16bit->usFcnGmabCtl & CAN_CLR_ABT_BIT) !=
CAN_ZERO) && (LusTimeOutCount != CAN_ZERO));
/* Check whether Timeout count is expired or not */
if (LusTimeOutCount != CAN_ZERO)
{
/* Clear TRQ bit to start cancellation of pending messages */
LpMsgBuffer16bit->usFcnMmCtl = CAN_CLR_TRQ_BIT;
/* Get the DBT count value and store it in a local variable */
LusElevenDbtCount = CAN_ELEVEN_DBT_COUNT;
/* Wait for 11 CAN data bits */
do
{
LusElevenDbtCount--;
}while(LusElevenDbtCount != CAN_ZERO);
/* Get the Timeout count value and store it in a local variable */
LusTimeOutCount = CAN_TIMEOUT_COUNT;
/* Loop until ABTT bit is cleared */
do
{
/* Decrement the Timeout Count */
LusTimeOutCount--;
/* Check whether Transmission progress bit is cleared and Timeout count
is expired or not*/
}while(((LpCntrlReg16bit->usFcnCmclCtl & CAN_TRANSMISSION_STS) !=
CAN_ZERO) && (LusTimeOutCount != CAN_ZERO));
/* Check whether Timeout count is expired or not */
if(LusTimeOutCount != CAN_ZERO)
{
/* Set the operation mode as initialization mode */
LpCntrlReg16bit->usFcnCmclCtl = CAN_SET_INIT_OPMODE;
/* Get the Timeout count value and store it in a local variable */
LusTimeOutCount = CAN_TIMEOUT_COUNT;
/* Loop to clear to INIT mode */
do
{
/* Decrement the TimeoutCount */
LusTimeOutCount--;
/* Check whether initialization mode is set and Timeout count is
expired or not */
}while(((LpCntrlReg16bit->usFcnCmclCtl & CAN_SET_INIT_OPMODE) !=
CAN_ZERO) && (LusTimeOutCount != CAN_ZERO));
/* Check whether TimeOutCount is equal to zero */
if(LusTimeOutCount != CAN_ZERO)
{
/* Disable CAN module */
LpCntrlReg16bit->usFcnGmclCtl = CAN_CLR_GOM;
if((LpCntrlReg16bit->usFcnGmclCtl & CAN_CLR_GOM) == CAN_CLR_GOM)
{
/* Enable Forced shutdown of CAN module */
LpCntrlReg16bit->usFcnGmclCtl = CAN_SET_EFSD;
/* Disable the CAN module */
LpCntrlReg16bit->usFcnGmclCtl = CAN_CLR_GOM;
/* Decrement timeout count by one */
}
/* Enable CAN module */
LpCntrlReg16bit->usFcnGmclCtl = CAN_SET_GOM;
/* Get the pointer to first message buffer from 8-bit control register
structure */
LpMsgBuffer8bit = LpCntrlReg8bit->ddMsgBuffer;
/* Get the pointer to first message buffer from 16-bit control register
structure */
LpMsgBuffer16bit = LpCntrlReg16bit->ddMsgBuffer;
/* Get the number of CAN Message Buffers of the controller and store it
in a local variable */
LucCount = LpController->ucMaxNoOfMsgBufs;
/* Get the no. of Hrh configured and store it in a local variable */
LucMsgBufferCount = LpController->ucNoOfHrh;
/* Check whether any Hrh is configured or not */
if(LucMsgBufferCount != CAN_ZERO)
{
/* Get the pointer to first Hrh from Controller structure */
LpHrh = (P2CONST(Tdd_Can_AFCan_Hrh,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST))
LpController->pHrh;
/* Loop for the number of Hrh configured */
do
{
/* Get the Timeout count value and store it in a local variable */
LusTimeOutCount1 = CAN_TIMEOUT_COUNT;
/* Clear control bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_CLR_CTRL_BIT;
/* Loop until RDY bit is cleared or Timeout count expired */
do
{
/* Decrement the Timeout count */
LusTimeOutCount1--;
/* Check whether RDY bit is cleared and Timeout count is
expired or not */
}while(((LpMsgBuffer16bit->usFcnMmCtl & CAN_RDY_BIT_STS) !=
CAN_ZERO) && (LusTimeOutCount1 != CAN_ZERO));
/* Check whether Timeout count is expired or not */
if (LusTimeOutCount1 != CAN_ZERO)
{
/* Check whether the configured CAN-ID is Standard or Extended */
#if(CAN_STANDARD_CANID == STD_OFF)
/* Set the Extended CAN-ID Higher bit - 16 to 28 */
LpMsgBuffer16bit->usFcnMmMid1h = LpHrh->usCanIdHigh &
CAN_MIDH_REG_MASK;
/* Set the Extended CAN-ID Lower bit - 0 to 15 */
LpMsgBuffer16bit->usFcnMmMid0h = LpHrh->usCanIdLow;
#else
/* Set the Standard CAN-ID Higher bit - 18 to 28 */
LpMsgBuffer16bit->usFcnMmMid1h = LpHrh->usCanIdHigh &
CAN_MIDH_REG_MASK;
#endif /* #if(CAN_STANDARD_CANID == OFF) */
/* Set the message buffer type */
LpMsgBuffer8bit->ucFcnMmStrb = LpHrh->ucMConfigReg &
CAN_MCONF_REG_MASK;
/* Enable message buffer interrupt request bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_SET_MBUF_INT_EN;
/* Set RDY bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_SET_RDY_BIT;
/* MISRA Rule : 17.4
Message : Increment or decrement operation
performed on pointer(LpHrh/LpMsgBuffer).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any
impact.
*/
/* Increment the pointer to point to next Hrh structure */
LpHrh++;
/* Increment the pointer to point to next 8-bit message buffer
structure */
LpMsgBuffer8bit++;
/* Increment the pointer to point to next 16-bit message buffer
structure */
LpMsgBuffer16bit++;
/* Decrement the number of Hrh count configured */
LucMsgBufferCount--;
/* Decrement LucCount by one */
LucCount--;
} /* if (LusTimeOutCount1 != CAN_ZERO) */
else
{
/* Set the Hrh count to zero to break the loop */
LucMsgBufferCount = CAN_ZERO;
/* Report to DEM for hardware failure */
Dem_ReportErrorStatus(CAN_E_TIMEOUT, DEM_EVENT_STATUS_FAILED);
}
}while(LucMsgBufferCount != CAN_ZERO);
} /* if(LucCount != CAN_ZERO) */
/* Get the number of Hth configured and store it in a local variable*/
LucMsgBufferCount = LpController->ucNoOfHth;
/* Check whether any Hth configured and any error message occurred */
if(LucMsgBufferCount != CAN_ZERO)
{
/* Get the pointer to first Hth from Controller structure */
LpHth = (P2CONST(Tdd_Can_AFCan_Hth,AUTOMATIC,CAN_AFCAN_PRIVATE_CONST))
LpController->pHth;
/* Loop for the number of Hth configured */
do
{
/* Get the Timeout count value and store it in a local variable */
LusTimeOutCount1 = CAN_TIMEOUT_COUNT;
/* Clear RDY bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_CLR_CTRL_BIT;
/* Loop until RDY bit cleared or Timeout count expired */
do
{
/* Decrement the Timeout count */
LusTimeOutCount1--;
/* Check whether RDY bit is cleared and Timeout count is
expired or not */
}while(((LpMsgBuffer16bit->usFcnMmCtl & CAN_RDY_BIT_STS) !=
CAN_ZERO) && (LusTimeOutCount1 != CAN_ZERO));
/* Check whether Timeout count is expired or not */
if (LusTimeOutCount1 != CAN_ZERO)
{
/* Check whether Multiplexed transmission is on or not */
#if (CAN_MULTIPLEX_TRANSMISSION == STD_ON)
/* Set the global flag to zero */
*(LpHth->pHwAccessFlag) = CAN_FALSE;
#endif
/* Set the message buffer type */
LpMsgBuffer8bit->ucFcnMmStrb = CAN_SET_MSG_BUFFER_EN &
CAN_MCONF_REG_MASK;
/* Enable message buffer interrupt request bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_SET_MBUF_INT_EN;
/* Set RDY bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_SET_RDY_BIT;
/* MISRA Rule : 17.4
Message : Increment or decrement operation
performed on pointer(LpHth/LpMsgBuffer).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact
*/
/* Increment the pointer to point to the next Hth structure */
LpHth++;
/* Increment the 8-bit message buffer register */
LpMsgBuffer8bit++;
/* Increment the 16-bit message buffer register */
LpMsgBuffer16bit++;
/* Decrement the count */
LucCount--;
/* Decrement the number of Hth count configured */
LucMsgBufferCount--;
}
else
{
/* Set the Hth count to zero to break the loop */
LucMsgBufferCount = CAN_ZERO;
/* Report to DEM */
Dem_ReportErrorStatus(CAN_E_TIMEOUT, DEM_EVENT_STATUS_FAILED);
}
}while( LucMsgBufferCount != CAN_ZERO);
} /* if(LucCount != CAN_ZERO) */
/* Loop to disable all the message buffers during initialization */
while(LucCount != CAN_ZERO)
{
/* Clear RDY,DN,TRQ,IE and MOW Bit */
LpMsgBuffer16bit->usFcnMmCtl = CAN_CLR_CTRL_BIT;
/* Get the Timeout count value and store it in a local variable */
LusTimeOutCount1 = CAN_TIMEOUT_COUNT;
/* Loop until RDY bit is cleared or Timeout count is expired */
do
{
/* Decrement the Timeout Count */
LusTimeOutCount1--;
/* Check whether RDY bit is cleared and Timeout count is expired
or not*/
} while(((LpMsgBuffer16bit->usFcnMmCtl & CAN_RDY_BIT_STS) != CAN_ZERO)
&& (LusTimeOutCount1 != CAN_ZERO));
/* Disable the message buffer */
LpMsgBuffer8bit->ucFcnMmStrb = CAN_MSG_BUFFER_DISABLE &
CAN_MCONF_REG_MASK;
/* MISRA Rule : 17.4
Message : Increment or decrement operation
performed on pointer(LpMsgBuffer).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to next 8-bit message buffer */
LpMsgBuffer8bit++;
/* Increment the pointer to point to next 16-bit message buffer */
LpMsgBuffer16bit++;
/* Decrement the message buffer count */
LucCount--;
}
/* Set CCERC bit to clear INFO and ERC registers */
LpCntrlReg16bit->usFcnCmclCtl = CAN_SET_CCERC_BIT;
/* Set the bit rate prescaler register */
LpCntrlReg8bit->ucFcnCmbrPrs = LpController->ucBRP;
/* Set the bit rate register */
LpCntrlReg16bit->usFcnCmbtCtl = LpController->usBTR;
/* Clear all interrupt flags of Interrupt Status register*/
LpCntrlReg16bit->usFcnCmisCtl = CAN_CLR_ALL_INTERRUPT;
/* Set interrupt enable register */
LpCntrlReg16bit->usFcnCmieCtl = LpController->usIntEnable;
/* Get the number of masks configured and store it in a local
variable */
LucCount = (LpController->ucNoOfFilterMask);
/* Check whether any mask is configured or not */
if (LucCount != CAN_ZERO)
{
/* Get the pointer to filter mask structure from Controller
structure */
LpFilterMask = LpController->pFilterMask;
/* Get the pointer to the first filtermask from control register
structure */
LpHwFilterMask = LpCntrlReg16bit->ddHwFilterMask;
/* Loop for the number of the masks configured */
do
{
/* Set the Low Mask control register */
LpHwFilterMask->ucFcnCmmkCtl01h = LpFilterMask->usMaskLow;
/* Set the High Mask control register */
LpHwFilterMask->ucFcnCmmkCtl02h = LpFilterMask->usMaskHigh;
/* MISRA Rule : 17.4
Message : Increment or decrement operation performed
on pointer(LpHwFilterMask/LpFilterMask).
Reason : Increment operator is used to achieve
better throughput.
Verification : However, part of the code is verified
manually and it is not having any impact.
*/
/* Increment the pointer to point to the next filter mask
registers */
LpHwFilterMask++;
/* Increment the pointer to point to the next filter mask
structure */
LpFilterMask++;
/* Decrement the number of masks count configured */
LucCount--;
}while(LucCount != CAN_ZERO);
}/* if (LucCount != CAN_ZERO) */
}
else
{
/* Report to DEM for hardware failure */
Dem_ReportErrorStatus(CAN_E_TIMEOUT, DEM_EVENT_STATUS_FAILED);
}
}
else
{
/* Report to DEM for hardware failure */
Dem_ReportErrorStatus(CAN_E_TIMEOUT, DEM_EVENT_STATUS_FAILED);
}
} /* if (LusTimeOutCount1 != CAN_ZERO) */
else
{
/* Report to DEM for hardware failure */
Dem_ReportErrorStatus(CAN_E_TIMEOUT, DEM_EVENT_STATUS_FAILED);
}
}
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Can_GetVersionInfo
**
** Service ID : 0x07
**
** Description : This service returns the version information of this
** module.
**
** Sync/Async : Synchronous
**
** Re-entrancy : Non Re-entrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : versioninfo
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s) referred in this function:
** None
**
** Function(s) invoked:
** Det_ReportError()
**
*******************************************************************************/
#if (CAN_VERSION_INFO_API == STD_ON)
#define CAN_AFCAN_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void,CAN_AFCAN_PUBLIC_CODE) Can_GetVersionInfo
(P2VAR(Std_VersionInfoType, AUTOMATIC, CAN_AFCAN_APPL_DATA) versioninfo)
{
#if (CAN_DEV_ERROR_DETECT == STD_ON)
/* Report to DET, if versioninfo pointer is equal to Null */
if(versioninfo == NULL_PTR)
{
/* Report to DET */
Det_ReportError(CAN_MODULE_ID_VALUE, CAN_INSTANCE_ID_VALUE,
CAN_GET_VERSIONINFO_SID,CAN_E_PARAM_POINTER);
}
else
#endif /*#if(CAN_DEV_ERROR_DETECT == STD_ON) */
{
/* Copy the vendor Id */
versioninfo->vendorID = CAN_VENDOR_ID_VALUE;
/* Copy the module Id */
versioninfo->moduleID = CAN_MODULE_ID_VALUE;
/* Copy the instance Id */
versioninfo->instanceID = CAN_INSTANCE_ID_VALUE;
/* Copy Software Major Version */
versioninfo->sw_major_version = CAN_SW_MAJOR_VERSION_VALUE;
/* Copy Software Minor Version */
versioninfo->sw_minor_version = CAN_SW_MINOR_VERSION_VALUE;
/* Copy Software Patch Version */
versioninfo->sw_patch_version = CAN_SW_PATCH_VERSION_VALUE;
}
}
#define CAN_AFCAN_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Fee/Fee_Cfg.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Fee_Cfg.h */
/* Version = 3.0.0 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains pre-compile time parameters. */
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: : Initial version
*/
/******************************************************************************/
/*******************************************************************************
** FEE Component Generation Tool Version **
*******************************************************************************/
/*
* TOOL VERSION: 3.0.6a
*/
/*******************************************************************************
** Input File **
*******************************************************************************/
/*
* INPUT FILE: FK4_4010_FEE_V304_130924_NEWCLEAPLUS.arxml
* GENERATED ON: 26 Sep 2013 - 09:00:16
*/
#ifndef FEE_CFG_H
#define FEE_CFG_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "MemIf_Types.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define FEE_CFG_AR_MAJOR_VERSION 1
#define FEE_CFG_AR_MINOR_VERSION 2
#define FEE_CFG_AR_PATCH_VERSION 0
/*
* File version information
*/
#define FEE_CFG_SW_MAJOR_VERSION 3
#define FEE_CFG_SW_MINOR_VERSION 0
/*******************************************************************************
** Common Published Information **
*******************************************************************************/
#define FEE_AR_MAJOR_VERSION_VALUE 1
#define FEE_AR_MINOR_VERSION_VALUE 2
#define FEE_AR_PATCH_VERSION_VALUE 0
#define FEE_SW_MAJOR_VERSION_VALUE 3
#define FEE_SW_MINOR_VERSION_VALUE 0
#define FEE_SW_PATCH_VERSION_VALUE 0
#define FEE_VENDOR_ID_VALUE (uint16)23
#define FEE_MODULE_ID_VALUE (uint16)21
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* This defines the instance ID of the module */
#define FEE_INSTANCE_ID_VALUE (uint8)0
/* To enable / disable development error detection */
#define FEE_DEV_ERROR_DETECT STD_OFF
/* To enable / disable the Fee_GetVersionInfo API */
#define FEE_VERSION_INFO_API STD_ON
/* Macro enabled when the upper layer notifications are configured */
#define FEE_UPPER_LAYER_NOTIFICATION STD_OFF
/* To enable / disable automatic formatting of flash */
#define FEE_AUTO_FORMAT_FLASH STD_ON
/* Macro enabled when notifications are configured or Dataset selection bits is
not configured */
#define FEE_NVM_CBK_PRESENT STD_OFF
/* To enable / disable FEE_Init function */
#define FEE_STARTUP_INTERNAL STD_OFF
/* To enable / disable the Read and Write function with or without limitation */
#define FEE_STARTUP_LIMITED_ACCESS STD_OFF
/* Enable/disable the Critical section protection */
#define FEE_CRITICAL_SECTION_PROTECTION STD_OFF
/*******************************************************************************
** Macro Definitions **
*******************************************************************************/
/* Following option should be used to define the size in bytes to which logical
blocks shall be aligned */
#define FEE_VIRTUAL_PAGE_SIZE (uint16)0x0004
/* Defines the number of Blocks configured */
#define FEE_NUM_BLOCKS 0x04
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* FEE_CFG_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/IoHwAb/IoHwAb_SwitchCfg.h
/*****************************************************************************
|File Name: SwitchDef.h
|
|Description: Switch enumation definition here and interface provide here
|
|-----------------------------------------------------------------------------
| PATAC Confidential
|-----------------------------------------------------------------------------
|
| This software is copyright is proprietary of Pan Asia Technical Automotive Company(PATAC).
| All rights are reserved by PATAC.
|
|-----------------------------------------------------------------------------
| A U T H O R I D E N T I T Y
|-----------------------------------------------------------------------------
| Initials Name Company
| ------------------------------------ ---------------------------------------
|
|
|-----------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|-----------------------------------------------------------------------------
| Date Version Author Description
|---------- -------- ------ ----------------------------------------------
|2009-09-16 01.00.00 FRED Creation
*****************************************************************************/
#ifndef __SWITCH_DEF_H
#define __SWITCH_DEF_H
/******************************************************************************
* Inclusion of Other Header Files
*****************************************************************************/
//#include "Std_Types.h"
/******************************************************************************
* Configure Region - optional header file according to config requirements
*****************************************************************************/
#include "Sys_QueueHandler.h" /*if use OS event*/
#include "Dio.h"
#include "IoHwAb_Adc.h"
//#include "Api_SchdTbl.h"
/*******************************************************************************
| Macro Definition
|******************************************************************************/
#define TAPUP_ON_ACTIVE 0x01
#define TAPDN_ON_ACTIVE 0x02
#define TAPONOFF_ACTIVE 0x04
/*******************************************************************************
| Enum Definition
|******************************************************************************/
/*define an analog switch, first step is to define group name here */
typedef enum
{
SWGRUP_REARWIP,
SWGRUP_WIPER,
SWGRUP_STE1,
SWGRUP_STE2,
SWGRUP_HOOD,
SWGRUP_IA1,
SWGRUP_NUM
} TeADSW_GrupId;
/*define at least one digital switch and one analog switch!!
* if no switches needed, you can define a dummy digital switch and a dummy analog switch*/
typedef enum
{
SWID_IDL0,
SWID_IDL1,
SWID_IDL2,
SWID_IDL3,
SWID_IDL4,
SWID_IDL5,
SWID_IDL6,
SWID_IDL7,
SWID_IDL8,
SWID_IDL9,
SWID_IDL10,
SWID_IDL11,
SWID_IDL12,
SWID_IDL13,
SWID_IDL14,
SWID_IDL15,
SWID_IDL16,
SWID_IDL17,
SWID_IDL18,
SWID_IDL19,
SWID_IDL20,
SWID_IDL21,
SWID_IDL22,
SWID_IDL23,
SWID_IDL24,
SWID_IDL25,
SWID_IDL26,
SWID_IDL27,
SWID_IDL28,
SWID_IDL29,
SWID_IDL30,
SWID_IDL31,
SWID_IDL32,
SWID_IDL33,
SWID_IDL34,
SWID_IDL35,
SWID_IDL36,
SWID_IDL37,
SWID_IDL38,
SWID_IDL39,
SWID_IDL40,
SWID_IDL41,
SWID_IDL42,
SWID_IDL43,
SWID_IDL44,
SWID_IDL45,
SWID_IDL46,
SWID_IDL47,
SWID_IDH0,
SWID_IDH1,
SWID_IDH2,
SWID_IDH3,
/*Start AD switch define*/
SWID_TAPON,
SWID_TAPUP,
SWID_TAPDN,
SWID_CRUISEON,
SWID_CRUISESET,
SWID_CRUISERES,
SWID_CRUISECAN,
SWID_WIPER_1,
SWID_WIPER_2,
SWID_WIPER_3,
SWID_WIPER_4,
SWID_WIPER_5,
SWID_WIPER_6,
SWID_WIPER_7,
SWID_NUM
}
TeHWIO_e_InputId;
#define SWID_RSRVED SWID_NUM
#define CeIoHwAb_e_SwIdNull SWID_NUM
/*On board digital in
* Reflect the raw input value. no debounce.
* define board internal digital input here.
*/
typedef enum
{
OBDI_H_PWM_DIAG_0,
OBDI_H_PWM_DIAG_1,
OBDI_H_PWM_DIAG_2,
OBDI_rsv03,
OBDI_L_PWM_DIAG_0,
OBDI_rsv05,
OBDI_rsv06,
OBDI_rsv07,
OBDI_L_DO_DIAG_0,
OBDI_L_DO_DIAG_1,
OBDI_rsv12,
OBDI_L_DO_DIAG_11,
OBDI_rsv14,
OBDI_HSD_Diag_DO0,
OBDI_HSD_Diag_DO1,
OBDI_rsv17,
OBDI_rsv20,
OBDI_rsv21,
OBDI_rsv22,
OBDI_rsv23,
OBDI_rsv24,
OBDI_rsv25,
OBDI_rsv26,
OBDI_rsv27,
OBDI_Diag_ACC,
OBDI_Diag_RUN_RELAY,
OBDI_Diag_RAP_RELAY,
OBDI_Diag_Left_Turn_FB,
OBDI_Diag_Right_Turn_FB,
OBDI_rsv35,
OBDI_rsv36,
OBDI_rsv37,
OBDI_Num,
/*note OBDI_NULL is not a valid ID*/
OBDI_NULL = OBDI_Num
} TeSW_OBDI;
typedef struct
{
boolean e_b_Enable;
uint8 * e_p_Port;
uint8 e_u_Offset;
} TeSW_h_OBDIInfo;
/******************************************************************************
* Object Declarations and Inline Function Definitions
*****************************************************************************/
#define SetSW_Event(x) EVENTQUEUE_PUSH((OS_EVENTID_TYPE)(x));
/******************************************************************************
* Configure AD swith AD sample buffer source
*****************************************************************************/
#define ADSW_SAM_BUF_TUTD &VeIoHwAb_w_AdcResultBuffer[0]
#define ADSW_SAM_BUF_REARWIP &VeIoHwAb_w_AdcResultBuffer[5]
#define ADSW_SAM_BUF_WIPR &VeIoHwAb_w_AdcResultBuffer[4]
#define ADSW_SAM_BUF_IGN &VeIoHwAb_w_AdcResultBuffer[6]
#define ADSW_SAM_BUF_STE1 &VeIoHwAb_w_AdcResultBuffer[7]
#define ADSW_SAM_BUF_STE2 &VeIoHwAb_w_AdcResultBuffer[10]
#define ADSW_SAM_BUF_HOOD &VeIoHwAb_w_AdcResultBuffer[3]
#define ADSW_SAM_BUF_IA1 &VeIoHwAb_w_AdcResultBuffer[1]
/******************************************************************************
* Configure AD swith reference voltage source
*****************************************************************************/
#define ADSW_REF_ADDR_TUTD &VeIoHwAb_w_BatteryVoltage
#define ADSW_REF_ADDR_REARWIP &VeIoHwAb_w_BatteryVoltage
#define ADSW_REF_ADDR_WIPR &VeIoHwAb_w_BatteryVoltage
#define ADSW_REF_ADDR_IGN &VeIoHwAb_w_BatteryVoltage
#define ADSW_REF_ADDR_STE1 &VeIoHwAb_w_BatteryVoltage /*Steering Wheel Control Switch 1*/
#define ADSW_REF_ADDR_STE2 &VeIoHwAb_w_BatteryVoltage /*Steering Wheel Control Switch 2*/
#define ADSW_REF_ADDR_HOOD &VeIoHwAb_w_BatteryVoltage
#define ADSW_REF_ADDR_IA1 &VeIoHwAb_w_BatteryVoltage
/******************************************************************************
* Configure AD swith enum list, note: not all AD switch need enum value, refer to APP-RTE interface requirements.
*****************************************************************************/
#define ADSW_ENUM_UNDEF 0 /*if AD switch enum value undefined, */
/*Tap Up Tap Down Switch Enum Value, , should be same as model enum*/
typedef enum
{
CeTRS_e_TutdSwOn,
CeTRS_e_TutdSwOff,
CeTRS_e_TutdSwUp,
CeTRS_e_TutdSwDown,
CeTRS_e_TutdSwErr
} ADSW_ENUM_TUTD;
/*Cruise Control Switch Enum Value, should be same as model enum*/
typedef enum
{
CeCRUZ_e_SwIndtrmnt,
CeCRUZ_e_SwOpenShrtToGnd,
CeCRUZ_e_SwCancel,
CeCRUZ_e_SwOff,
CeCRUZ_e_SwOn,
CeCRUZ_e_SwResume,
CeCRUZ_e_SwSet,
CeCRUZ_e_SpdLimWrnOn,
CeCRUZ_e_SwErr,
CeCRUZ_e_SwShrtToPwr
} ADSW_ENUM_CRUS;
/*DIM/FOG Switch Enum Value, should be same as model enum*/
typedef enum
{
CeILS_e_DimmingDec,
CeILS_e_DimmingInc,
CeELS_e_FogFront,
CeELS_e_FogRear,
CeLS_e_NULL
} ADSW_ENUM_IA1;
/*Wiper Switch Enum Value, should be same as model enum*/
/*typedef enum
{
CeWIP_e_FtWipersOff,
CeWIP_e_FtIntermittent,
CeWIP_e_FtLowSpeed,
CeWIP_e_FtHighSpeed,
CeWIP_e_FtWiperSwFault
} ADSW_ENUM_WIPR;
*/
#if 0 //delete by shiqs
/*Wiper Switch Enum Value, should be same as model enum*/
typedef enum
{
CeWIP_e_RrWipLow,
CeWIP_e_RrWipInt,
CeWIP_e_RrWshOn,
CeWIP_e_RrWshWipOff
} ADSW_ENUM_REAR_WIPR;
/*Front Wiper Switch Enum Value, should be same as model enum*/
typedef enum
{
CeWIP_e_FrtWipLow,
CeWIP_e_FrtWipInt1,
CeWIP_e_FrtWipInt2,
CeWIP_e_FrtWipInt3,
CeWIP_e_FrtWipInt4,
CeWIP_e_FrtWipInt5,
CeWIP_e_FrtWipOff,
CeWIP_e_FrtWipFault
} ADSW_ENUM_FRONT_WIPR;
/*Wiper intermittent Switch Enum Value, should be same as model enum*/
/*typedef enum
{
CeWIP_e_Intermittent1 = 5,
CeWIP_e_Intermittent2,
CeWIP_e_Intermittent3,
CeWIP_e_Intermittent4,
CeWIP_e_Intermittent5
} ADSW_ENUM_WIPR_INT;
*/
/*Steering Wheel Control Switch Enum Value, should be same as model enum*/
typedef enum
{
CeSWC_e_SwtFltIndtrmnt,
CeSWC_e_SwtFltNoActtn,
CeSWC_e_SwtFltFct1,
CeSWC_e_SwtFltFct2,
CeSWC_e_SwtFltFct3,
CeSWC_e_SwtFltFct4,
CeSWC_e_SwtFltFct5,
CeSWC_e_SwtFltFct6,
CeSWC_e_SwtFltFct7,
CeSWC_e_SwtFltFct8,
CeSWC_e_SwtFltFct9,
CeSWC_e_SwtFltFct10,
CeSWC_e_SwtFltFct11,
CeSWC_e_SwtFltFct12,
CeSWC_e_SwtFltFct13,
CeSWC_e_SwtFltFct14,
CeSWC_e_SwtFltFct15,
CeSWC_e_SwtFltOpenShrtToGnd,
CeSWC_e_SwtFltBtwnRng,
CeSWC_e_SwtFltShrtToPwr
} ADSW_ENUM_STE;
#endif
/******************************************************************************
* Function:
* Description:
*****************************************************************************/
/******************************************************************************
* Function Declarations
*****************************************************************************/
#endif
/*EOF*/
<file_sep>/BSP/MCAL/Gpt.dp/Gpt_PBTypes.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Gpt_PBTypes.h */
/* Version = 3.1.2 */
/* Date = 06-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains macros and structure datatypes for post build */
/* parameters of GPT Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 23-Oct-2009 : Initial Version
* V3.0.1: 05-Nov-2009 : As per SCR 088, I/O structure is updated to have
* separate base address for USER and OS registers.
* V3.0.2: 11-Dec-2009 : As per SCR 167, "STagTdd_Gpt_TAUJUnitOsUserRegs" is
* renamed to "STagTdd_Gpt_TAUJUnitOsRegs".
* V3.0.3: 25-Feb-2010 : As per SCR 194, following changes are made:
* 1. Precompile option
* GPT_ENABLE_DISABLE_NOTIFICATION_API is added for the
* 'ucNotificationConfig' in the structure
* Tdd_Gpt_ChannelConfigType.
* 2. Precompile option is added for the array
* "Gpt_GstTAUUnitConfig" and the structure
* "Tdd_Gpt_TAUUnitConfigType".
* V3.0.4: 23-Jun-2010 : As per SCR 281, structures are added/modified to
* support TAUB and TAUC timer units.
* V3.0.5: 08-Jul-2010 : As per SCR 299, in the structure
* Tdd_Gpt_ChannelConfigType, pImrIntrCntlAddress is
* updated to type uint8.
* V3.0.6: 28-Jul-2010 : As per SCR 317, macro GPT_MODE_OSTM_CONTINUOUS
* is added.
* V3.0.7: 17-Jun-2011 : As per SCR 474,
* 1. Access size is updated for registers TAUAnBRS,
* TAUJnBRS, TAUJnTS, TAUJnTT, TAUJnTO, TAUJnTOE,
* TAUJnTOL, TAUJnRDT, TAUJnTOM, TAUJnRDE, TAUABCnCMURm
* TAUJnCMURm. Structures STagTdd_Gpt_TAUABCUnitOsRegs,
* STagTdd_Gpt_TAUJUnitUserRegs,
* STagTdd_Gpt_TAUJUnitOsRegs,STagTdd_Gpt_TAUABCUserRegs
* STagTdd_Gpt_TAUJUserRegs are modified.
* 2. OSTMnTO and OSTMnTOE registers are not available
* in some of the Xx4 devices and also these registers
* are not required for any functionality of the GPT
* Driver Module, hence these registers are removed from
* structure STagTdd_Gpt_OSTMUnitUserRegs.
* V3.1.0: 27-July-2011 : Modified software version to 3.1.0
* V3.1.1: 16-Feb-2012 : Merged the fixes done for Fx4L Gpt driver
* V3.1.2: 06-Jun-2012 : As per SCR 029, Environment section is updated to
* remove compiler version.
*/
/******************************************************************************/
#ifndef GPT_PBTYPES_H
#define GPT_PBTYPES_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Gpt.h"
#include "V850_Types.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define GPT_PBTYPES_AR_MAJOR_VERSION GPT_AR_MAJOR_VERSION_VALUE
#define GPT_PBTYPES_AR_MINOR_VERSION GPT_AR_MINOR_VERSION_VALUE
#define GPT_PBTYPES_AR_PATCH_VERSION GPT_AR_PATCH_VERSION_VALUE
/* File version information */
#define GPT_PBTYPES_SW_MAJOR_VERSION 3
#define GPT_PBTYPES_SW_MINOR_VERSION 1
#define GPT_PBTYPES_SW_PATCH_VERSION 2
#if (GPT_SW_MAJOR_VERSION != GPT_PBTYPES_SW_MAJOR_VERSION)
#error "Software major version of Gpt.h and Gpt_PBTypes.h did not match!"
#endif
#if (GPT_SW_MINOR_VERSION!= GPT_PBTYPES_SW_MINOR_VERSION )
#error "Software minor version of Gpt.h and Gpt_PBTypes.h did not match!"
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Macros for Hardware Timer type */
#define GPT_HW_TAUA (uint8)0x00
#define GPT_HW_TAUB (uint8)0x01
#define GPT_HW_TAUC (uint8)0x02
#define GPT_HW_TAUJ (uint8)0x03
#define GPT_HW_OSTM (uint8)0x04
/* Macros for channel modes */
#define GPT_MODE_ONESHOT (uint8)0x00
#define GPT_MODE_CONTINUOUS (uint8)0x01
#define GPT_MODE_OSTM_CONTINUOUS (uint8)0x00
#define GPT_TRUE (uint8)0x01
#define GPT_FALSE (uint8)0x00
#define GPT_ZERO (uint8)0x00
#define GPT_ONE (uint8)0x01
#define GPT_NO_CBK_CONFIGURED (uint8)0xFF
#define GPT_INITIALIZED (uint8)0x01
#define GPT_UNINITIALIZED (uint8)0x00
/* Reset values */
#define GPT_RESET_BYTE (uint8)0x00
#define GPT_RESET_WORD (uint16)0x0000
#define GPT_RESET_LONG_WORD (uint32)0x00000000ul
/* set values */
#define GPT_SET_BYTE (uint8)0xFF
#define GPT_SET_WORD (uint16)0xFFFF
#define GPT_SET_LONG_WORD (uint32)0xFFFFFFFFul
#define GPT_WORD_ONE (uint16)0x0001
#define GPT_WORD_ZERO (uint16)0x0000
#define GPT_CLEAR_INT_REQUEST_FLAG (uint16)0xEFFF
/* Macros to avoid Magic numbers */
#define GPT_DBTOC_VALUE \
((GPT_VENDOR_ID_VALUE << 22) \
| (GPT_MODULE_ID_VALUE << 14) \
| (GPT_SW_MAJOR_VERSION_VALUE << 8) \
| (GPT_SW_MINOR_VERSION_VALUE << 3))
/* Macros for masks */
#define GPT_OSTMTO_MASK (uint8)0x00
#define GPT_OSTMTOE_MASK (uint8)0x00
#define GPT_OSTM_START_MASK (uint8)0x01
#define GPT_OSTM_STOP_MASK (uint8)0x01
#define GPT_OSTMTTF_STOP_MASK (uint8)0x01
#define GPT_NOTIFICATION_ENABLED (uint8)0x01
#define GPT_NOTIFICATION_DISABLED (uint8)0x00
#define GPT_WAKEUP_NOTIFICATION_ENABLED (uint8)0x01
#define GPT_WAKEUP_NOTIFICATION_DISABLED (uint8)0x00
/* Macros to hold timer status */
#define GPT_CH_NOTRUNNING (uint8)0x00
#define GPT_CH_RUNNING (uint8)0x01
#define GPT_CHANNEL_UNCONFIGURED (uint8)0xFF
/*******************************************************************************
** Structure for TAUA/TAUB/TAUC unit user register configuration **
*******************************************************************************/
#if ((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
typedef struct STagTdd_Gpt_TAUABCUnitUserRegs
{
uint16 volatile usTAUABCnTOL;
uint16 volatile usReserved1;
uint16 volatile usTAUABCnRDT;
uint16 volatile aaReserved2[9];
uint16 volatile usTAUABCnTO;
uint16 volatile usReserved3;
uint16 volatile usTAUABCnTOE;
uint16 volatile aaReserved4[179];
uint16 volatile usTAUABCnTS;
uint16 volatile usReserved5;
uint16 volatile usTAUABCnTT;
} Tdd_Gpt_TAUABCUnitUserRegs;
#endif
/*******************************************************************************
** Structure for TAUA/TAUB/TAUC unit os register configuration **
*******************************************************************************/
#if ((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
typedef struct STagTdd_Gpt_TAUABCUnitOsRegs
{
uint16 volatile usTAUABCnTPS;
uint16 volatile usReserved1;
uint8 volatile ucTAUAnBRS;
uint8 volatile ucReserved2;
uint16 volatile usReserved3;
uint16 volatile usTAUABCnTOM;
uint16 volatile aaReserved4[11];
uint16 volatile usTAUABCnRDE;
} Tdd_Gpt_TAUABCUnitOsRegs;
#endif
/*******************************************************************************
** Structure for TAUJ unit user configuration **
*******************************************************************************/
#if (GPT_TAUJ_UNIT_USED == STD_ON)
typedef struct STagTdd_Gpt_TAUJUnitUserRegs
{
uint8 volatile ucTAUJnTS;
uint8 volatile ucReserved1;
uint16 volatile usReserved2;
uint8 volatile ucTAUJnTT;
uint8 volatile ucReserved3;
uint16 volatile usReserved4;
uint8 volatile ucTAUJnTO;
uint8 volatile ucReserved5;
uint16 volatile aaReserved6;
uint8 volatile ucTAUJnTOE;
uint8 volatile ucReserved7;
uint16 volatile aaReserved8;
uint8 volatile ucTAUJnTOL;
uint8 volatile ucReserved9;
uint16 volatile usReserved10;
uint8 volatile ucTAUJnRDT;
} Tdd_Gpt_TAUJUnitUserRegs;
#endif
/*******************************************************************************
** Structure for TAUJ unit os configuration **
*******************************************************************************/
#if (GPT_TAUJ_UNIT_USED == STD_ON)
typedef struct STagTdd_Gpt_TAUJUnitOsRegs
{
uint16 volatile usTAUJnTPS;
uint16 volatile usReserved1;
uint8 volatile ucTAUJnBRS;
uint8 volatile ucReserved2;
uint16 volatile usReserved3;
uint8 volatile ucTAUJnTOM;
uint8 volatile ucReserved4;
uint16 volatile aaReserved5[3];
uint8 volatile ucTAUJnRDE;
} Tdd_Gpt_TAUJUnitOsRegs;
#endif
/*******************************************************************************
** Structure for OSTM channel user control register **
*******************************************************************************/
#if (GPT_OSTM_UNIT_USED == STD_ON)
typedef struct STagTdd_Gpt_OSTMUnitUserRegs
{
uint32 volatile ulOSTMnCMP;
uint32 volatile ulOSTMnCNT;
uint8 volatile ucReserved1;
uint8 volatile aaReserved2[3];
uint8 volatile ucReserved3;
uint8 volatile aaReserved4[3];
uint8 volatile ucOSTMnTE;
uint8 volatile aaReserved5[3];
uint8 volatile ucOSTMnTS;
uint8 volatile aaReserved6[3];
uint8 volatile ucOSTMnTT;
} Tdd_Gpt_OSTMUnitUserRegs;
#endif
/*******************************************************************************
** Structure for TAUA/TAUB/TAUC channel user control register **
*******************************************************************************/
#if ((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUB_UNIT_USED == STD_ON) \
|| (GPT_TAUC_UNIT_USED == STD_ON))
typedef struct STagTdd_Gpt_TAUABCUserRegs
{
uint16 volatile usTAUABCnCDRm;
uint16 volatile aaReserved1[63];
uint16 volatile usTAUABCnCNTm;
uint16 volatile aaReserved2[31];
uint8 volatile ucTAUABCnCMURm;
} Tdd_Gpt_TAUABCChannelUserRegs;
#endif
/*******************************************************************************
** Structure for TAUJ channel user control register **
*******************************************************************************/
#if (GPT_TAUJ_UNIT_USED == STD_ON)
typedef struct STagTdd_Gpt_TAUJUserRegs
{
uint32 volatile ulTAUJnCDRm;
uint32 volatile aaReserved1[3];
uint32 volatile ulTAUJnCNTm;
uint32 volatile aaReserved2[3];
uint8 volatile ucTAUJnCMURm;
} Tdd_Gpt_TAUJChannelUserRegs;
#endif
/*******************************************************************************
** Structure for TAU Unit configuration type **
*******************************************************************************/
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON) \
|| (GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON))
typedef struct STagTdd_Gpt_TAUUnitConfigType
{
/* Pointer to base address of TAU Unit user control registers */
P2VAR(void, AUTOMATIC, GPT_CONFIG_DATA)pTAUUnitUserCntlRegs;
/* Pointer to base address of TAU Unit os control registers */
P2VAR(void, AUTOMATIC, GPT_CONFIG_DATA)pTAUUnitOsCntlRegs;
/* TAU Channels Mask value */
uint16 usTAUChannelMaskValue;
/* TAU Unit prescaler for clock sources CK0, CK1, CK3 and CK4 */
#if (GPT_CONFIG_PRESCALER_SUPPORTED == STD_ON)
uint16 usPrescaler;
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON))
/* TAU Unit baudrate value */
uint8 ucBaudRate;
/* Prescaler shared between ICU/GPT module
* blConfigurePrescaler = TRUE Prescaler for CK0-CK3 has to be set by GPT
* blConfigurePrescaler = FALSE Prescaler for CK0-CK3 need not be set by GPT
*/
#endif
boolean blConfigurePrescaler;
#endif
} Tdd_Gpt_TAUUnitConfigType;
#endif
/*******************************************************************************
** Structure for GPT Channel RAM data **
*******************************************************************************/
typedef struct STagTdd_Gpt_ChannelRamData
{
/* RAM used to maintain timer status */
uint8 ucChannelStatus;
#if (GPT_ENABLE_DISABLE_NOTIFICATION_API)
/* RAM used to store Notification status */
uinteger uiNotifyStatus:1;
#endif
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
/* RAM used to store Wakeup Notification status */
uinteger uiWakeupStatus:1;
#endif
} Tdd_Gpt_ChannelRamData;
/*******************************************************************************
** Structure for channel information **
*******************************************************************************/
typedef struct STagGpt_ChannelConfigType
{
/* Pointer to base address of channel user control register */
P2VAR(void, AUTOMATIC, GPT_CONFIG_DATA)pBaseCtlAddress;
/* Pointer to base address of channel CMOR/OSTMnCTL register */
P2VAR(uint16, AUTOMATIC, GPT_CONFIG_DATA)pCMORorCTLAddress;
/* Pointer to Timer IMR Interrupt control register */
P2VAR(uint8, AUTOMATIC, GPT_CONFIG_DATA)pImrIntrCntlAddress;
/* Pointer to Timer Interrupt Control register */
P2VAR(uint16, AUTOMATIC, GPT_CONFIG_DATA)pIntrCntlAddress;
/* Individual channel mask value */
uint16 usChannelMask;
/* For channels belonging to TAUA/TAUB/TAUC/TAUJ
* Bit 3-0: 0001: if GPT_MODE_CONTINOUS/GPT_MODE_ONESHOT
*/
/* Other bits should be generated with 0 */
uint16 usModeSettingsMask;
/* Channel Wakeup Source */
#if (GPT_REPORT_WAKEUP_SOURCE == STD_ON)
EcuM_WakeupSourceType ddWakeupSourceId;
#endif
#if (GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON)
/* If the value is equal to GPT_NO_CBK_CONFIGURED then the callback
* function is not configured. If the value is other than
* GPT_NO_CBK_CONFIGURED, it indicates index to the configured
* call back function in the array Gpt_GstChannelNotifFunc
*/
uint8 ucNotificationConfig;
#endif
/* IMR mask value */
uint8 ucImrMaskValue;
/* Timer Unit Index in the array Gpt_GstTAUAUnitConfig or
Gpt_GstTAUJUnitConfig */
uint8 ucTimerUnitIndex;
/* Type of GPT timer (TAUA/TAUB/TAUC/TAUJ/OSTM) */
uinteger uiTimerType:3;
/* Enabling wakeup capability of CPU for a channel when timeout occurs */
uinteger uiGptEnableWakeup:1;
/* Mode for the GPT channel */
uinteger uiGptChannelMode:1;
} Tdd_Gpt_ChannelConfigType;
/*******************************************************************************
** Global configuration constants **
*******************************************************************************/
#define GPT_START_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
/* Array to map channel to timer index */
extern CONST(uint8, GPT_CONST) Gpt_GaaTimerChIdx[];
#define GPT_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
#define GPT_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* RAM Allocation of Channel data */
extern VAR(Tdd_Gpt_ChannelRamData, GPT_NOINIT_DATA) Gpt_GstChannelRamData[];
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON) \
|| (GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON))
/* Array of structures for TAU Unit Channel Configuration */
extern CONST(Tdd_Gpt_TAUUnitConfigType, GPT_CONST) Gpt_GstTAUUnitConfig[];
#endif
/* Array of structures for Channel Configuration */
extern CONST(Tdd_Gpt_ChannelConfigType, GPT_CONST) Gpt_GstChannelConfig[];
#define GPT_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* GPT_PBTYPES_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Dio/Dio.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Dio.h */
/* Version = 3.1.2 */
/* Date = 05-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains macros, DIO type definitions, structure data types and */
/* API function prototypes of DIO Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied,including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 10-Nov-2009 : Initial version
*
* V3.0.1: 13-Nov-2009 : As per SCR 124, updated to include boolean parameter
* for JTAG Ports.
*
* V3.0.2: 31-Mar-2010 : As per SCR 238, new line added at the end of file.
* V3.1.0: 27-Jul-2011 : Modified for Dk4.
* V3.1.1: 10-Feb-2012 : Merged the fixes done to Fx4L Dio driver.
* V3.1.2: 05-Jun-2012 : As per SCR 027, following changes are made:
* 1. File version is changed.
* 2. Compiler version is removed from Environment
* section.
* 3. Function Dio_GetVersionInfo is implemented as
* Macro.
*/
/******************************************************************************/
#ifndef DIO_H
#define DIO_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Std_Types.h" /* Standard AUTOSAR types */
#include "Dio_Cfg.h" /* DIO Configuration header file */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define DIO_AR_MAJOR_VERSION DIO_AR_MAJOR_VERSION_VALUE
#define DIO_AR_MINOR_VERSION DIO_AR_MINOR_VERSION_VALUE
#define DIO_AR_PATCH_VERSION DIO_AR_PATCH_VERSION_VALUE
/* File version information */
#define DIO_SW_MAJOR_VERSION 3
#define DIO_SW_MINOR_VERSION 1
#define DIO_SW_PATCH_VERSION 2
#if (DIO_CFG_SW_MAJOR_VERSION != DIO_SW_MAJOR_VERSION)
#error "Software major version of Dio.h and Dio_Cfg.h did not match!"
#endif
#if (DIO_CFG_SW_MINOR_VERSION!= DIO_SW_MINOR_VERSION )
#error "Software minor version of Dio.h and Dio_Cfg.h did not match!"
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Vendor and Module IDs */
#define DIO_VENDOR_ID DIO_VENDOR_ID_VALUE
#define DIO_MODULE_ID DIO_MODULE_ID_VALUE
#define DIO_INSTANCE_ID DIO_INSTANCE_ID_VALUE
/* Service ID for DIO read Channel */
#define DIO_READ_CHANNEL_SID (uint8)0x00
/* Service ID for DIO write Channel */
#define DIO_WRITE_CHANNEL_SID (uint8)0x01
/* Service ID for DIO read Port */
#define DIO_READ_PORT_SID (uint8)0x02
/* Service ID for DIO write Port */
#define DIO_WRITE_PORT_SID (uint8)0x03
/* Service ID for DIO read Channel Group */
#define DIO_READ_CHANNEL_GROUP_SID (uint8)0x04
/* Service ID for DIO write Channel Group */
#define DIO_WRITE_CHANNEL_GROUP_SID (uint8)0x05
/* Service ID for DIO getting Version Information */
#define DIO_GETVERSIONINFO_SID (uint8)0x12
/*******************************************************************************
** DET Error Codes **
*******************************************************************************/
/* DET code to report Invalid Channel */
#define DIO_E_PARAM_INVALID_CHANNEL_ID (uint8)0x0A
/* DET code to report Invalid Port */
#define DIO_E_PARAM_INVALID_PORT_ID (uint8)0x14
/* DET code to report Invalid Channel Group */
#define DIO_E_PARAM_INVALID_GROUP_ID (uint8)0x1F
/* DET code to report Invalid pointer passed to the Dio_GetVersionInfo */
#define DIO_E_PARAM_INVALID_POINTER (uint8)0xF0
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* Type definition for Dio_ChannelType used by the DIO APIs */
typedef uint8 Dio_ChannelType;
/* Type definition for Dio_PortType used by the DIO APIs */
typedef uint8 Dio_PortType;
/* Type definition for Dio_LevelType used by the DIO APIs */
typedef uint8 Dio_LevelType;
/* Type definition for Dio_PortLevelType used by the DIO APIs */
typedef uint16 Dio_PortLevelType;
/* Structure for Dio_ChannelGroup*/
typedef struct STagDio_ChannelGroupType
{
/* Address of the port */
P2VAR(uint32, AUTOMATIC, DIO_CONFIG_DATA) pPortAddress;
/* Positions of the Channel Group */
uint16 usMask;
/* Position from LSB */
uint8 ucOffset;
/* Boolean paramter: 1 = JTAG port, 0 = Numeric/Alphabatic port */
boolean blJtagPort;
} Dio_ChannelGroupType;
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#define DIO_START_SEC_PUBLIC_CODE
#include "MemMap.h"
/* Function for DIO read Channel API */
extern FUNC(Dio_PortLevelType, DIO_PUBLIC_CODE) Dio_ReadPort
(Dio_PortType PortId);
/* Function for DIO write Channel API */
extern FUNC(void, DIO_PUBLIC_CODE) Dio_WritePort
(Dio_PortType PortId, Dio_PortLevelType Level);
/* Function for DIO read Port API */
extern FUNC(Dio_LevelType, DIO_PUBLIC_CODE) Dio_ReadChannel
(Dio_ChannelType ChannelId);
/* Function for DIO write Port API */
extern FUNC(void, DIO_PUBLIC_CODE) Dio_WriteChannel
(Dio_ChannelType ChannelId, Dio_LevelType Level);
/* Function for DIO read Channel Group API */
extern FUNC(Dio_PortLevelType, DIO_PUBLIC_CODE) Dio_ReadChannelGroup
(CONSTP2CONST(Dio_ChannelGroupType, AUTOMATIC, DIO_CONST) ChannelGroupIdPtr);
/* Function for DIO write Channel Group API */
extern FUNC(void, DIO_PUBLIC_CODE) Dio_WriteChannelGroup
(CONSTP2CONST(Dio_ChannelGroupType, AUTOMATIC, DIO_CONST) ChannelGroupIdPtr,
Dio_PortLevelType Level);
/* Function for DIO getting Version Information API */
#if (DIO_VERSION_INFO_API == STD_ON)
#define Dio_GetVersionInfo(versioninfo) \
{ \
(versioninfo)->vendorID = (uint16)DIO_VENDOR_ID; \
(versioninfo)->moduleID = (uint16)DIO_MODULE_ID; \
(versioninfo)->instanceID = (uint8)DIO_INSTANCE_ID; \
(versioninfo)->sw_major_version = DIO_SW_MAJOR_VERSION; \
(versioninfo)->sw_minor_version = DIO_SW_MINOR_VERSION; \
(versioninfo)->sw_patch_version = DIO_SW_PATCH_VERSION; \
}
#endif /* STD_ON == DIO_VERSION_INFO_API */
#define DIO_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#define DIO_START_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
extern CONST(Dio_ChannelGroupType, DIO_CONST) Dio_GstChannelGroupData[];
#define DIO_STOP_SEC_CONST_UNSPECIFIED
#include "MemMap.h"
#endif /* DIO_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Can/CanIf.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = CanIf.h */
/* Version = 3.0.0a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2008-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision of external declaration of constants, global data, type */
/* definitions, APIs and service IDs. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision History **
*******************************************************************************/
/*
* V3.0.0: 12.12.2008 : Initial Version
* V3.0.0a: 18-Oct-2011 : Copyright is updated.
*/
#ifndef CANIF_H
#define CANIF_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "ComStack_Types.h" /* Com Stack Types Header File */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* Vendor ID */
#define CANIF_VENDOR_ID (uint8)23
/* Module ID */
#define CANIF_MODULE_ID (uint16)60
/* AUTOSAR SPECIFICATION VERSION */
#define CANIF_AR_MAJOR_VERSION 3
#define CANIF_AR_MINOR_VERSION 0
#define CANIF_AR_PATCH_VERSION 2
/* SOFTWARE VERSION INFORMATION */
#define CANIF_SW_MAJOR_VERSION 3
#define CANIF_SW_MINOR_VERSION 0
#define CANIF_SW_PATCH_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/* Return value of the WakeupSourceType. */
typedef enum
{
CANIF_CONTROLLER_WAKEUP = 0,
CANIF_TRANSCEIVER_WAKEUP
}CanIf_WakeupSourceType;
/* Return value of the CanIf_TransceiverModeType. */
typedef enum
{
CANIF_TRCV_MODE_NORMAL = 0,
CANIF_TRCV_MODE_STANDBY,
CANIF_TRCV_MODE_SLEEP
}CanIf_TransceiverModeType;
/* Return value of the CanIf_TrcvWakeupReasonType. */
typedef enum
{
CANIF_TRCV_WU_ERROR = 0,
CANIF_TRCV_WU_NOT_SUPPORTED,
CANIF_TRCV_WU_BY_BUS,
CANIF_TRCV_WU_INTERNALLY,
CANIF_TRCV_WU_RESET,
CANIF_TRCV_WU_POWER_ON
}CanIf_TrcvWakeupReasonType;
/* Return value of the CanIf_TrcvWakeupModeType. */
typedef enum
{
CANIF_TRCV_WU_ENABLE = 0,
CANIF_TRCV_WU_DISABLE,
CANIF_TRCV_WU_CLEAR
}CanIf_TrcvWakeupModeType;
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* CANIF_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Wdg/Wdg_23_DriverA_Ram.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Wdg_23_DriverA_Ram.c */
/* Version = 3.0.1a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Global RAM variable definitions for Watchdog Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12-Jun-2009 : Initial Version
* V3.0.1: 14-Jul-2009 : As per SCR 015, compiler version is changed from
* V5.0.5 to V5.1.6c in the header of the file.
* V3.0.1a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Wdg_23_DriverA_Ram.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* Autosar Specification Version information */
#define WDG_23_DRIVERA_RAM_C_AR_MAJOR_VERSION \
WDG_23_DRIVERA_AR_MAJOR_VERSION_VALUE
#define WDG_23_DRIVERA_RAM_C_AR_MINOR_VERSION \
WDG_23_DRIVERA_AR_MINOR_VERSION_VALUE
#define WDG_23_DRIVERA_RAM_C_AR_PATCH_VERSION \
WDG_23_DRIVERA_AR_PATCH_VERSION_VALUE
/* File version information */
#define WDG_23_DRIVERA_RAM_C_SW_MAJOR_VERSION 3
#define WDG_23_DRIVERA_RAM_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (WDG_23_DRIVERA_RAM_AR_MAJOR_VERSION != \
WDG_23_DRIVERA_RAM_C_AR_MAJOR_VERSION)
#error "WDG_23_DriverA_Ram.c : Mismatch in Specification Major Version"
#endif
#if (WDG_23_DRIVERA_RAM_AR_MINOR_VERSION != \
WDG_23_DRIVERA_RAM_C_AR_MINOR_VERSION)
#error "WDG_23_DriverA_Ram.c : Mismatch in Specification Minor Version"
#endif
#if (WDG_23_DRIVERA_RAM_AR_PATCH_VERSION != \
WDG_23_DRIVERA_RAM_C_AR_PATCH_VERSION)
#error "WDG_23_DriverA_Ram.c : Mismatch in Specification Patch Version"
#endif
#if (WDG_23_DRIVERA_RAM_SW_MAJOR_VERSION != \
WDG_23_DRIVERA_RAM_C_SW_MAJOR_VERSION)
#error "WDG_23_DriverA_Ram.c : Mismatch in Major Version"
#endif
#if (WDG_23_DRIVERA_RAM_SW_MINOR_VERSION != \
WDG_23_DRIVERA_RAM_C_SW_MINOR_VERSION)
#error "WDG_23_DriverA_Ram.c : Mismatch in Minor Version"
#endif
/******************************************************************************
** Global Data Types **
******************************************************************************/
#if (WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON)
#define WDG_23_DRIVERA_START_SEC_VAR_UNSPECIFIED
#include "MemMap.h"
/* Global variable to store the current watchdog driver state */
VAR(Wdg_23_DriverA_StatusType, WDG_23_DRIVERA_INIT_DATA)
Wdg_GddDriverState = WDG_UNINIT;
#define WDG_23_DRIVERA_STOP_SEC_VAR_UNSPECIFIED
#include "MemMap.h"
#endif
#define WDG_23_DRIVERA_START_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* Global variable to store the current watchdog driver mode */
VAR(WdgIf_ModeType, WDG_23_DRIVERA_NOINIT_DATA) Wdg_GddCurrentMode;
/* Global database pointer */
P2CONST(Wdg_23_DriverA_ConfigType, AUTOMATIC,
WDG_23_DRIVERA_CONFIG_CONST)Wdg_23_DriverA_GpConfigPtr;
#define WDG_23_DRIVERA_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/APP/LEDTemperature/LEDTemperatureRTE.h
#ifndef _LEDTemperatureRTE_H
#define _LEDTemperatureRTE_H
#include "Std_Types.h"
void SetLEDTemperature_ADCValue1(UINT16 Value);
UINT16 GetLEDTemperature_ADCValue1(void);
void SetLEDTemperature_ADCValue2(UINT16 Value);
UINT16 GetLEDTemperature_ADCValue2(void);
UINT16 GetLEDTemperature_Value1(void);
UINT16 GetLEDTemperature_Value2(void);
UINT8 GetLEDTempPWMDutyOut1(void);
UINT8 GetLEDTempPWMDutyOut2(void);
#endif
<file_sep>/BSP/IoHwAb/IoHwAb_Api.c
/*****************************************************************************
|File Name: IoHwAb_Api.c
|
|Description:
|
|-----------------------------------------------------------------------------
| PATAC Confidential
|-----------------------------------------------------------------------------
|
| This software is copyright is proprietary of Pan Asia Technical Automotive Company(PATAC).
| All rights are reserved by PATAC.
|
|-----------------------------------------------------------------------------
| A U T H O R I D E N T I T Y
|-----------------------------------------------------------------------------
| Initials Name Company
| ------------------------------------ ---------------------------------------
|
|
|-----------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|-----------------------------------------------------------------------------
| Date Version Author Description
|---------- -------- ------ ----------------------------------------------
|2014-04-01 01.00.00 ZhanYi Create
*****************************************************************************/
#include "IoHwAb_Api.h"
#include "IoHwAb_LED.h"
extern uint8 GaaByteArrayCanRdData[8];
uint16 KeBSP_w_CourtesyLampPwmPeriod;
#define TSTBIT(target,bit) target&(0x01<<bit)
#define BIT0 0x00
#define BIT1 0x01
#define BIT2 0x02
#define BIT3 0x03
#define BIT4 0x04
#define BIT5 0x05
#define BIT6 0x06
#define BIT7 0x07
/*-----------------------------------------------------------------------------
- Can Inputs
-----------------------------------------------------------------------------*/
boolean IoHwAb_ILCLevelLowBeam(void){
boolean swStatus;
if(TSTBIT(GaaByteArrayCanRdData[0],BIT0)){
swStatus = TRUE;
}else{
swStatus = FALSE;
}
return swStatus;
}
boolean IoHwAb_ILBendingRightControl(void){
boolean swStatus;
if(TSTBIT(GaaByteArrayCanRdData[0],BIT1)){
swStatus = TRUE;
}else{
swStatus = FALSE;
}
return swStatus;
}
boolean IoHwAb_ILBendingLeftControl(void){
boolean swStatus;
if(TSTBIT(GaaByteArrayCanRdData[0],BIT2)){
swStatus = TRUE;
}else{
swStatus = FALSE;
}
return swStatus;
}
boolean IoHwAb_ILTurnRightControl(void){
boolean swStatus;
if(TSTBIT(GaaByteArrayCanRdData[0],BIT3)){
swStatus = TRUE;
}else{
swStatus = FALSE;
}
return swStatus;
}
boolean IoHwAb_ILTurnLeftControl(void){
boolean swStatus;
if(TSTBIT(GaaByteArrayCanRdData[0],BIT4)){
swStatus = TRUE;
}else{
swStatus = FALSE;
}
return swStatus;
}
boolean IoHwAb_ILParkLampControl(void){
boolean swStatus;
if(TSTBIT(GaaByteArrayCanRdData[0],BIT5)){
swStatus = TRUE;
}else{
swStatus = FALSE;
}
return swStatus;
}
boolean IoHwAb_ILLowBeamControl(void){
boolean swStatus;
if(TSTBIT(GaaByteArrayCanRdData[0],BIT6)){
swStatus = TRUE;
}else{
swStatus = FALSE;
}
return swStatus;
}
boolean IoHwAb_ILHighBeamControl(void){
boolean swStatus;
if(TSTBIT(GaaByteArrayCanRdData[0],BIT7)){
swStatus = TRUE;
}else{
swStatus = FALSE;
}
return swStatus;
}
boolean IoHwAb_ILDRLControl(void){
boolean swStatus;
if(TSTBIT(GaaByteArrayCanRdData[1],BIT7)){
swStatus = TRUE;
}else{
swStatus = FALSE;
}
return swStatus;
}
boolean IoHwAb_ILELevelHighSpeedModeControl(void){
boolean swStatus;
if(TSTBIT(GaaByteArrayCanRdData[1],BIT6)){
swStatus = TRUE;
}else{
swStatus = FALSE;
}
return swStatus;
}
boolean IoHwAb_ILVLevelCityModeControl(void){
boolean swStatus;
if(TSTBIT(GaaByteArrayCanRdData[1],BIT5)){
swStatus = TRUE;
}else{
swStatus = FALSE;
}
return swStatus;
}
boolean IoHwAb_ILWLevelBadWeatherControl(void){
boolean swStatus;
if(TSTBIT(GaaByteArrayCanRdData[1],BIT4)){
swStatus = TRUE;
}else{
swStatus = FALSE;
}
return swStatus;
}
/*-----------------------------------------------------------------------------
- Digital Inputs
-----------------------------------------------------------------------------*/
boolean IoHwAb_GetSW_ParkLamp(void){
boolean swStatus;
swStatus = Dio_ReadChannel(DioChannel25_13);
return swStatus;
}
boolean IoHwAb_GetSW_LowBeam(void){
boolean swStatus;
swStatus = Dio_ReadChannel(DioChannel25_12);
return swStatus;
}
boolean IoHwAb_GetSW_HighBeam(void){
boolean swStatus;
swStatus = Dio_ReadChannel(DioChannel25_11);
return swStatus;
}
boolean IoHwAb_GetSW_TurnLamp(void){
boolean swStatus;
swStatus = Dio_ReadChannel(DioChannel25_10);
return swStatus;
}
boolean IoHwAb_GetSW_CornerLamp(void){
boolean swStatus;
swStatus = Dio_ReadChannel(DioChannel25_9);
return swStatus;
}
boolean IoHwAb_GetSW_DRL(void){
boolean swStatus;
swStatus = Dio_ReadChannel(DioChannel25_8);
return swStatus;
}
boolean IoHwAb_GetSW_CityMode(void){
boolean swStatus;
swStatus = Dio_ReadChannel(DioChannel25_7);
return swStatus;
}
boolean IoHwAb_GetSW_HighSpeed(void){
boolean swStatus;
swStatus = Dio_ReadChannel(DioChannel25_6);
return swStatus;
}
boolean IoHwAb_GetSW_BadWeatherMode(void){
boolean swStatus;
swStatus = Dio_ReadChannel(DioChannel25_5);
return swStatus;
}
boolean IoHwAb_GetSW_ControlEnable(void){
boolean swStatus;
swStatus = Dio_ReadChannel(DioChannel0_0);
return swStatus;
}
uint32 IoHwAb_GetVolPTC1(void){
}
uint32 IoHwAb_GetVolPTC2(void){
}
/*-----------------------------------------------------------------------------
- LED Outputs
-----------------------------------------------------------------------------*/
void IoHwAb_SetLED1(uint16 percent){
uint16 Period;
LED_SetHwLED_TPS(CeIoHwAb_e_LED_1,Period, percent, LED_MODE_NORMAL);
}
void IoHwAb_SetLED2(uint16 percent){
uint16 Period;
LED_SetHwLED_TPS(CeIoHwAb_e_LED_2,Period, percent, LED_MODE_NORMAL);
}
void IoHwAb_SetLowBeam1(uint16 percent){
uint16 Period;
LED_SetHwLED_TLD(CeIoHwAb_e_LowBeam_1,Period, percent, LED_MODE_NORMAL);
}
void IoHwAb_SetLowBeam2(uint16 percent){
uint16 Period;
LED_SetHwLED_TPS(CeIoHwAb_e_LowBeam_2,Period, percent, LED_MODE_NORMAL);
}
void IoHwAb_SetHighSpeed(uint16 percent){
uint16 Period;
LED_SetHwLED_TPS(CeIoHwAb_e_HighSpeed,Period, percent, LED_MODE_NORMAL);
}
void IoHwAb_SetBadWeather(uint16 percent){
uint16 Period;
LED_SetHwLED_TPS(CeIoHwAb_e_BadWeather,Period, percent, LED_MODE_NORMAL);
}
void IoHwAb_SetLED3(uint16 percent){
uint16 Period;
LED_SetHwLED_TLD(CeIoHwAb_e_LED_3,Period, percent, LED_MODE_NORMAL);
}
void IoHwAb_SetTurnLamp(uint16 percent){
uint16 Period;
LED_SetHwLED_TLD(CeIoHwAb_e_TurnLamp,Period, percent, LED_MODE_NORMAL);
}
void IoHwAb_SetParkLamp(uint16 percent){
uint16 Period;
LED_SetHwLED_TLD(CeIoHwAb_e_ParkLamp,Period, percent, LED_MODE_NORMAL);
}
/*EOF*/
<file_sep>/BSP/Include/BrsAsrInitBsw.h
/**********************************************************************************************************************
* COPYRIGHT
* -------------------------------------------------------------------------------------------------------------------
* \verbatim
* Copyright (c) 2009 by Vector Informatik GmbH. All rights reserved.
*
* This software is copyright protected and proprietary to Vector Informatik GmbH.
* Vector Informatik GmbH grants to you only those rights as set out in the license conditions.
* All other rights remain with Vector Informatik GmbH.
* \endverbatim
* -------------------------------------------------------------------------------------------------------------------
* FILE DESCRIPTION
* -------------------------------------------------------------------------------------------------------------------
* File: BrsAsrInitBsw.h
* Component: BrsAsr
* Module: BrsAsrInitBsw
* Generator: -
*
* Description: BrsAsrInitBsw contains the functions BrsAsrInitBswDriverInitZero,One,Two,Three which are
* meant to be called in the related initialization stages from the Ecu State Manager
* The functions BrsAsrInitBswDriverInitZero to Three execute the basic initialisation of
* the hardware and calls to the InitMemory and Init routines of the BSW modules.
*
* The initialisation sequence is derived from the Specification of Ecu Statemanager (AUTOSAR 3.1)
*
*********************************************************************************************************************/
#if !defined (BRSASRINITBSW_H)
# define BRSASRINITBSW_H
/**********************************************************************************************************************
* GLOBAL CONSTANT MACROS
*********************************************************************************************************************/
/* Component Version Information */
# define BRSASRINITBSW_MAJOR_VERSION (0x01)
# define BRSASRINITBSW_MINOR_VERSION (0x00)
# define BRSASRINITBSW_PATCH_VERSION (0x07)
/**********************************************************************************************************************
* GLOBAL FUNCTION PROTOTYPES
*********************************************************************************************************************/
void BrsAsrInitBswDriverInitZero(void);
void BrsAsrInitBswDriverInitOne(void);
void BrsAsrInitBswDriverInitTwo(void);
void BrsAsrInitBswDriverInitThree(void);
#endif
<file_sep>/APP/LEDLightControl/CAL1_LEDLightControl.h
#ifndef _LEDSwitchRTE_H
#define _LEDSwitchRTE_H
#include "ipc_types.h"
#endif
<file_sep>/BSP/Common/Compiler/InterruptType.h
/*define interrupt type*/
#ifndef _INTERRUPT_TYPE_H
#define _INTERRUPT_TYPE_H
#include "CompilerSelect.h"
#if COMPILER_GHS
#define PRAGMA_INTERRUPT() _Pragma("ghs interrupt")
#elif COMPILER_CX
#define PRAGMA_INTERRUPT(x) _Pragma("interrupt NO_VECT "##x)
#else
#error "compiler is not specified, select the compiler in \"CompilerSelect.h\" "
#endif
#endif
<file_sep>/BSP/MCAL/Gpt/Gpt_Ram.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Gpt_Ram.c */
/* Version = 3.0.3a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains Global variable definitions of GPT Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 23-Oct-2009 : Initial Version
* V3.0.1: 25-Feb-2010 : As per SCR 194, precompile option is added for the
* pointer variable "Gpt_GpTAUUnitConfig".
* V3.0.2: 23-Jun-2010 : As per SCR 281, precompile option is updated for
* the pointer variable "Gpt_GpTAUUnitConfig".
* V3.0.3: 08-Jul-2010 : As per SCR 299, precompile option
* "GPT_DEV_ERROR_DETECT" is added for
* Initializing Gpt_GblDriverStatus.
* V3.0.3a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Gpt.h"
#include "Gpt_Ram.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR Specification version information */
#define GPT_RAM_C_AR_MAJOR_VERSION GPT_AR_MAJOR_VERSION_VALUE
#define GPT_RAM_C_AR_MINOR_VERSION GPT_AR_MINOR_VERSION_VALUE
#define GPT_RAM_C_AR_PATCH_VERSION GPT_AR_PATCH_VERSION_VALUE
/* File version information */
#define GPT_RAM_C_SW_MAJOR_VERSION 3
#define GPT_RAM_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (GPT_RAM_AR_MAJOR_VERSION != GPT_RAM_C_AR_MAJOR_VERSION)
#error "Gpt_Ram.c : Mismatch in Specification Major Version"
#endif
#if (GPT_RAM_AR_MINOR_VERSION != GPT_RAM_C_AR_MINOR_VERSION)
#error "Gpt_Ram.c : Mismatch in Specification Minor Version"
#endif
#if (GPT_RAM_AR_PATCH_VERSION != GPT_RAM_C_AR_PATCH_VERSION)
#error "Gpt_Ram.c : Mismatch in Specification Patch Version"
#endif
#if (GPT_RAM_SW_MAJOR_VERSION != GPT_RAM_C_SW_MAJOR_VERSION)
#error "Gpt_Ram.c : Mismatch in Major Version"
#endif
#if (GPT_RAM_SW_MINOR_VERSION != GPT_RAM_C_SW_MINOR_VERSION)
#error "Gpt_Ram.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
#define GPT_START_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
#if((GPT_TAUA_UNIT_USED == STD_ON)||(GPT_TAUJ_UNIT_USED == STD_ON)||\
(GPT_TAUB_UNIT_USED == STD_ON)||(GPT_TAUC_UNIT_USED == STD_ON))
/* Global pointer variable for TAU Unit configuration */
P2CONST(Tdd_Gpt_TAUUnitConfigType, GPT_CONST, GPT_CONFIG_CONST)
Gpt_GpTAUUnitConfig;
#endif
/* Global pointer variable for channel configuration */
P2CONST(Tdd_Gpt_ChannelConfigType, GPT_CONST, GPT_CONFIG_CONST)
Gpt_GpChannelConfig;
/* Global pointer variable for channel to timer mapping */
P2CONST(uint8, GPT_CONST, GPT_CONFIG_CONST) Gpt_GpChannelTimerMap;
/* Global pointer variable for channel data */
P2VAR(Tdd_Gpt_ChannelRamData, GPT_NOINIT_DATA, GPT_CONFIG_DATA)
Gpt_GpChannelRamData;
#define GPT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
#define GPT_START_SEC_VAR_NOINIT_8BIT
#include "MemMap.h"
/* Holds the status of GPT Driver Component */
VAR(uint8, GPT_NOINIT_DATA) Gpt_GucGptDriverMode;
#define GPT_STOP_SEC_VAR_NOINIT_8BIT
#include "MemMap.h"
#define GPT_START_SEC_VAR_1BIT
#include "MemMap.h"
#if (GPT_DEV_ERROR_DETECT == STD_ON)
/* Holds the status of Initialization */
VAR(boolean, GPT_INIT_DATA) Gpt_GblDriverStatus = GPT_UNINITIALIZED;
#endif
#define GPT_STOP_SEC_VAR_1BIT
#include "MemMap.h"
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Pwm/Pwm_PBTypes.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Pwm_PBTypes.h */
/* Version = 3.1.6 */
/* Date = 05-Nov-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains post-compile time parameters. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 18-Aug-2009 : Initial version
*
* V3.0.1: 28-Oct-2009 : Updated as per the SCR 054
* ucPolarity is removed.
*
* V3.0.2: 05-Nov-2009 : As per SCR 088, I/O structure is updated to have
* separate base address for USER and OS registers.
*
* V3.0.3: 02-Jul-2010 : As per SCR 290, structures are added/modified to
* support TAUB and TAUC timer units.
*
* V3.0.4: 29-Apr-2011 : As per SCR 435, PWM_CORRECTION_MASK macro is added
* TAUABC_MAX_DUTY_REG_VALUE and TAUJ_MAX_DUTY_REG_VALUE
* macros are removed.
* V3.0.5: 21-Jun-2011 : As per SCR 478, the following changes are made:
* 1 Structures Tdd_Pwm_TAUABCUnitOsRegs,
* Tdd_Pwm_TAUJUnitUserRegs,Tdd_Pwm_TAUJUnitOsRegs,
* Tdd_Pwm_TAUABCChannelUserRegs and
* Tdd_Pwm_TAUJChannelUserRegs are modified for change
* in the register sizes of their elements.
* 2 The element usChannelMask from stucture
* Tdd_Pwm_ChannelConfigType is moved to
* individual Tdd_Pwm_TAUABCProperties and
* Tdd_Pwm_TAUJProperties structures with change in
* size.
* V3.1.0: 26-Jul-2011 : Ported for the DK4 variant.
* V3.1.2: 12-Jan-2012 : TEL have fixed The Issues reported by mantis id
* : #4246,#4210,#4207,#4206,#4202,#4259,#4257,#4248.
* V3.1.3: 05-Mar-2012 : Merged the fixes done for Fx4L PWM driver
* V3.1.4: 31-Mar-2012 : Remove an unwanted check from prescalar baudrate
* V3.1.5: 06-Jun-2012 : As per SCR 034, Compiler version is removed from
* Environment section.
* V3.1.6: 05-Nov-2012 : As per MNT_0007541,comment added at each "#endif".
*/
/******************************************************************************/
#ifndef PWM_PBTYPES_H
#define PWM_PBTYPES_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Pwm.h"
#include "V850_Types.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define PWM_PBTYPES_AR_MAJOR_VERSION PWM_AR_MAJOR_VERSION_VALUE
#define PWM_PBTYPES_AR_MINOR_VERSION PWM_AR_MINOR_VERSION_VALUE
#define PWM_PBTYPES_AR_PATCH_VERSION PWM_AR_PATCH_VERSION_VALUE
/* File version information */
#define PWM_PBTYPES_SW_MAJOR_VERSION 3
#define PWM_PBTYPES_SW_MINOR_VERSION 1
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (PWM_SW_MAJOR_VERSION != PWM_PBTYPES_SW_MAJOR_VERSION)
#error "Pwm_PBTypes.h : Mismatch in Major Version"
#endif
#if (PWM_SW_MINOR_VERSION != PWM_PBTYPES_SW_MINOR_VERSION)
#error "Pwm_PBTypes.h : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Macro Definitions **
*******************************************************************************/
#define PWM_ZERO (uint8)0x00
#define PWM_ONE (uint8)0x01
#define PWM_TWO (uint8)0x02
#define PWM_THREE (uint8)0x03
#define PWM_FOUR (uint8)0x04
#define PWM_TRUE (uint8)0x01
#define PWM_FALSE (uint8)0x00
#define PWM_INITIALIZED (uint8)0x01
#define PWM_UNINITIALIZED (uint8)0x00
#define PWM_NO_CBK_CONFIGURED 0xFF
#define PWM_CHANNEL_UNCONFIGURED 0xFF
/* Macros to avoid Magic numbers */
#define PWM_DBTOC_VALUE ((PWM_VENDOR_ID_VALUE << 22) | \
(PWM_MODULE_ID_VALUE << 14) | \
(PWM_SW_MAJOR_VERSION_VALUE << 8) | \
(PWM_SW_MINOR_VERSION_VALUE << 3))
/* Macros for Hardware Timer type */
#define PWM_HW_TAUA (uint8)0x00
#define PWM_HW_TAUB (uint8)0x01
#define PWM_HW_TAUC (uint8)0x02
#define PWM_HW_TAUJ (uint8)0x03
/* Macro for Timer Unit Type*/
#define PWM_TAUA0 (uint8)0x00
#define PWM_TAUA1 (uint8)0x01
#define PWM_TAUJ (uint8)0x02
/* Macros for Timer Mode type */
#define PWM_MASTER_CHANNEL (uint8)0x00
#define PWM_SLAVE_CHANNEL (uint8)0x01
/* Macro for setting the PWM mode in Control registers */
#define MIN_DUTY_CYCLE 0x0000
#define MAX_DUTY_CYCLE 0x8000
#define PWM_TAUABC_MAX_PERIOD_VALUE (uint16)0xFFFF
#define PWM_PERIOD_LIMIT (uint16)0xFFFF
#define PWM_DUTY_CALC_DIV (uint8)0x0F
/* Reset values */
#define PWM_RESET_WORD 0x0000
#define PWM_RESET_LONG_WORD 0x00000000
/* set values */
#define PWM_SET_WORD 0xFFFF
#define PWM_SET_LONG_WORD (uint32)0xFFFFFFFFul
#define PWM_SYNCH_TAUJ_MASK 0x000F
#define PWM_CORRECTION_MASK (uint32)0x00007FFF
#define PWM_CLEAR_INT_REQUEST_FLAG (uint16)0xEFFF
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Structure for TAUA/TAUB/TAUC User control registers **
*******************************************************************************/
#if ((PWM_TAUA_UNIT_USED == STD_ON)||(PWM_TAUB_UNIT_USED == STD_ON)||\
(PWM_TAUC_UNIT_USED == STD_ON))
typedef struct STagTdd_Pwm_TAUABCUnitUserRegs
{
uint16 volatile usTAUABCnTOL;
uint16 volatile usReserved1;
uint16 volatile usTAUABCnRDT;
uint16 volatile aaReserved2;
uint16 volatile usTAUABCnRSF;
uint16 volatile aaReserved3[7];
uint16 volatile usTAUABCnTO;
uint16 volatile usReserved4;
uint16 volatile usTAUABCnTOE;
uint16 volatile aaReserved5[177];
uint16 volatile usTAUABCnTE;
uint16 volatile usReserved6;
uint16 volatile usTAUABCnTS;
uint16 volatile usReserved7;
uint16 volatile usTAUABCnTT;
}Tdd_Pwm_TAUABCUnitUserRegs;
#endif
/*******************************************************************************
** Structure for TAUA/TAUB/TAUC OS control registers **
*******************************************************************************/
#if ((PWM_TAUA_UNIT_USED == STD_ON)||(PWM_TAUB_UNIT_USED == STD_ON)||\
(PWM_TAUC_UNIT_USED == STD_ON))
typedef struct STagTdd_Pwm_TAUABCUnitOsRegs
{
uint16 volatile usTAUABCnTPS;
uint16 volatile usReserved1;
uint8 volatile ucTAUAnBRS;
uint8 volatile ucReserved2;
uint16 volatile usReserved3;
uint16 volatile usTAUABCnTOM;
uint16 volatile usReserved4;
uint16 volatile usTAUABnTOC;
uint16 volatile aaReserved5[9];
uint16 volatile usTAUABCnRDE;
}Tdd_Pwm_TAUABCUnitOsRegs;
#endif /*#if((PWM_TAUA_UNIT_USED == STD_ON)||(PWM_TAUB_UNIT_USED == STD_ON)||\
(PWM_TAUC_UNIT_USED == STD_ON)) */
/*******************************************************************************
** Structure for TAUJ User control registers **
*******************************************************************************/
#if (PWM_TAUJ_UNIT_USED == STD_ON)
typedef struct STagTdd_Pwm_TAUJUnitUserRegs
{
uint8 volatile ucTAUJnTE;
uint8 volatile ucReserved1;
uint16 volatile usReserved2;
uint8 volatile ucTAUJnTS;
uint8 volatile ucReserved3;
uint16 volatile usReserved4;
uint8 volatile ucTAUJnTT;
uint8 volatile ucReserved5;
uint16 volatile usReserved6;
uint8 volatile ucTAUJnTO;
uint8 volatile ucReserved7;
uint16 volatile usReserved8;
uint8 volatile ucTAUJnTOE;
uint8 volatile ucReserved9;
uint16 volatile usReserved10;
uint8 volatile ucTAUJnTOL;
uint8 volatile ucReserved11;
uint16 volatile usReserved12;
uint8 volatile ucTAUJnRDT;
uint8 volatile ucReserved13;
uint16 volatile usReserved14;
uint16 volatile ucTAUJnRSF;
}Tdd_Pwm_TAUJUnitUserRegs;
#endif /* #if(PWM_TAUJ_UNIT_USED == STD_ON) */
/*******************************************************************************
** Structure for TAUJ Unit OS control registers **
*******************************************************************************/
#if (PWM_TAUJ_UNIT_USED == STD_ON)
typedef struct STagTdd_Pwm_TAUJUnitOsRegs
{
uint16 volatile usTAUJnTPS;
uint16 volatile usReserved1;
uint8 volatile ucTAUJnBRS;
uint8 volatile ucReserved2;
uint16 volatile usReserved3;
uint8 volatile ucTAUJnTOM;
uint8 volatile ucReserved4;
uint16 volatile usReserved5;
uint8 volatile ucTAUJnTOC;
uint8 volatile ucReserved6;
uint16 volatile usReserved7;
uint8 volatile ucTAUJnRDE;
}Tdd_Pwm_TAUJUnitOsRegs;
#endif /* #if (PWM_TAUJ_UNIT_USED == STD_ON) */
/*******************************************************************************
** Structure for TAUA/TAUB/TAUC channel User control registers **
*******************************************************************************/
#if ((PWM_TAUA_UNIT_USED == STD_ON)||(PWM_TAUB_UNIT_USED == STD_ON)||\
(PWM_TAUC_UNIT_USED == STD_ON))
typedef struct STagTdd_Pwm_TAUABCUserRegs
{
uint16 volatile usTAUABCnCDRm;
uint16 volatile aaReserved1[63];
uint16 volatile usTAUABCnCNTm;
uint16 volatile aaReserved2[31];
uint8 volatile ucTAUABCnCMURm;
}Tdd_Pwm_TAUABCChannelUserRegs;
#endif
/*******************************************************************************
** Structure for TAUJ channel User control registers **
*******************************************************************************/
#if (PWM_TAUJ_UNIT_USED == STD_ON)
typedef struct STagTdd_Pwm_TAUJUserRegs
{
uint32 volatile ulTAUJnCDRm;
uint32 volatile aaReserved1[3];
uint32 volatile ulTAUJnCNTm;
uint32 volatile aaReserved2[3];
uint8 volatile ucTAUJnCMURm;
}Tdd_Pwm_TAUJChannelUserRegs;
#endif
/*******************************************************************************
** Data Structure for TAUA/TAUB/TAUC Unit configuration type **
*******************************************************************************/
#if ((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
typedef struct STagTdd_Pwm_TAUABCUnitConfigType
{
/* pointer to base address of TAUA/TAUB/TAUC Unit user control registers */
P2VAR(Tdd_Pwm_TAUABCUnitUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
pTAUABCUnitUserCntlRegs;
/* pointer to base address of TAUA/TAUB/TAUC Unit OS control registers */
P2VAR(Tdd_Pwm_TAUABCUnitOsRegs, AUTOMATIC, PWM_CONFIG_DATA)
pTAUABCUnitOsCntlRegs;
#if(PWM_DELAY_MACRO_SUPPORT == STD_ON)
/* void pointer to base address of Delay control register */
P2VAR(uint32, AUTOMATIC, PWM_CONFIG_DATA) pDelayCntlRegs;
/* Mask value for delay enable */
uint32 ulDelayEnableMask;
#endif
/* Mask value for all channels in a TAUA/TAUB/TAUC */
uint16 usTAUChannelMask;
/* Mask value for the TOM register based on configuration of channels */
uint16 usTOMMask;
#if((PWM_TAUA_UNIT_USED == STD_ON)||(PWM_TAUB_UNIT_USED == STD_ON))
/* Mask value for the TOC register based on configuration of channels */
uint16 usTOCMask;
#endif
/* Mask value for the TOL register based on configuration of channels */
uint16 usTOLMask;
/* Mask value for the TO register based on configuration of channels */
uint16 usTOMask;
/* Mask value for the TOE register based on configuration of channels */
uint16 usTOEMask;
/* TAU Unit prescaler for clock sources CK0, CK1, CK3 and CK4 */
#if (PWM_CONFIG_PRESCALER_SUPPORTED == STD_ON)
uint16 usPrescaler;
#if(PWM_TAUA_UNIT_USED == STD_ON)
/* TAU Unit baudrate value */
uint8 ucBaudRate;
/*
* Prescaler shared between ICU/GPT module
* blConfigurePrescaler = TRUE Prescaler for CK0-CK3 has to be set by PWM
* blConfigurePrescaler = FALSE Prescaler for CK0-CK3 need not be set by PWM
*/
#endif /* #if(PWM_TAUA_UNIT_USED == STD_ON) */
boolean blConfigurePrescaler;
#endif /* #if (PWM_CONFIG_PRESCALER_SUPPORTED == STD_ON) */
/* PWM Unit type, the channel belongs to TAUA or TAUB or TAUC or TAUJ */
uinteger uiPwmTAUType:2;
}Tdd_Pwm_TAUABCUnitConfigType;
#endif /*#if((PWM_TAUA_UNIT_USED == STD_ON)||(PWM_TAUB_UNIT_USED == STD_ON)||\
(PWM_TAUC_UNIT_USED == STD_ON)) */
/*******************************************************************************
** Data structure for TAUJ Unit configuration type **
*******************************************************************************/
#if (PWM_TAUJ_UNIT_USED == STD_ON)
typedef struct STagTdd_Pwm_TAUJUnitConfigType
{
/* pointer to base address of TAUJ Unit user control registers */
P2VAR(Tdd_Pwm_TAUJUnitUserRegs, AUTOMATIC, PWM_CONFIG_DATA)
pTAUJUnitUserCntlRegs;
/* pointer to base address of TAUJ Unit os control registers */
P2VAR(Tdd_Pwm_TAUJUnitOsRegs, AUTOMATIC, PWM_CONFIG_DATA)pTAUJUnitOsCntlRegs;
/* Mask value for all channels in a TAUA*/
uint16 usTAUChannelMask;
/* Mask value for the TOM register based on configuration of channels */
uint16 usTOMMask;
/* Mask value for the TOL register based on configuration of channels */
uint16 usTOLMask;
/* Mask value for the TO register based on configuration of channels */
uint16 usTOMask;
/* Mask value for the TOE register based on configuration of channels */
uint16 usTOEMask;
/* TAU Unit prescaler for clock sources CK0, CK1, CK3 and CK4 */
#if(PWM_CONFIG_PRESCALER_SUPPORTED == STD_ON)
uint16 usPrescaler;
/* TAU Unit baudrate value */
uint8 ucBaudRate;
/*
* Prescaler shared between ICU/GPT module
* blConfigurePrescaler = TRUE Prescaler for CK0-CK3 has to be set by PWM
* blConfigurePrescaler = FALSE Prescaler for CK0-CK3 need not be set by PWM
*/
boolean blConfigurePrescaler;
#endif /* #if(PWM_CONFIG_PRESCALER_SUPPORTED == STD_ON) */
}Tdd_Pwm_TAUJUnitConfigType;
#endif /* #if (PWM_TAUJ_UNIT_USED == STD_ON) */
/*******************************************************************************
** Structure for the start of various timer array units at the same time **
** Valid for TAUA0, TAUA1 TAUJ0, TAUJ1 **
*******************************************************************************/
#if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON)
typedef struct STagTdd_PwmSynchStartTAUType
{
/*
* Pointer to the address of synchronous start between different
* TAU Unit control registers
*/
P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA) pPICCntlRegs;
/*
* Mask to Enable the TAUA & TAUJ Units, if any of the channels of
* TAUA & TAUJ units configured for the Synchronous start
* PIC0SSER0: Bit 15 - 0: Channels 15 - 0 for TAUA0
* PIC0SSER1: Bit 15 - 0: Channels 15 - 0 for TAUA1
* PIC0SSER2: Bit 7 - 4: Channels 3 - 0 for TAUJ1
* Bit 3 - 0: Channels 3 - 0 for TAUJ0
*/
uint16 usSyncTAUMask;
/* PWM channel type, the channel belongs to TAUA0 or TAUA1 or TAUJ */
uint8 ucTAUUnitType;
}Tdd_PwmTAUSynchStartUseType;
#endif /* #if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON) */
/*******************************************************************************
** Structure for configuring 16-bit period value for TAUA/TAUB/TAUC timers **
*******************************************************************************/
#if ((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
typedef struct STagTdd_Pwm_TAUABCProperties
{
#if(PWM_DELAY_MACRO_SUPPORT == STD_ON)
/* pointer to base address of Delay Compare register of this channel */
P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)pDlyCompRegs;
/* Delay value (0 - 2^12) */
uint16 usDelayValue;
#endif /* #if(PWM_DELAY_MACRO_SUPPORT == STD_ON) */
/* Default Period of channel in timer ticks (0 - 2^16) */
Pwm_PeriodType ddDefaultPeriodOrDuty;
/* Individual channel mask value */
uint16 usChannelMask;
}Tdd_Pwm_TAUABCProperties;
#endif /*#if((PWM_TAUA_UNIT_USED == STD_ON)||(PWM_TAUB_UNIT_USED == STD_ON) ||\
(PWM_TAUC_UNIT_USED == STD_ON)) */
/*******************************************************************************
** Structure for configuring 32-bit period value for TAUJ timers **
*******************************************************************************/
#if (PWM_TAUJ_UNIT_USED == STD_ON)
typedef struct STagTdd_Pwm_TAUJProperties
{
/* Default Period of channel in timer ticks (0 - 2^32) */
Pwm_PeriodType ddDefaultPeriodOrDuty;
/* Individual channel mask value */
uint8 ucChannelMask;
}Tdd_Pwm_TAUJProperties;
#endif /* #if (PWM_TAUJ_UNIT_USED == STD_ON) */
/*******************************************************************************
** Data structure for PWM channel configuration **
*******************************************************************************/
typedef struct STagPwm_ChannelConfigType
{
/* Pointer to the PWM Channel properties based on Timer Type */
P2CONST(void, AUTOMATIC, PWM_CONFIG_CONST)pChannelProp;
/* void pointer to user base address of Timer control register */
P2VAR(void, AUTOMATIC, PWM_CONFIG_DATA)pCntlRegs;
/* pointer to base address of CMOR register */
P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)pCMORRegs;
#if (PWM_NOTIFICATION_SUPPORTED == STD_ON)
/* void pointer to base address of Timer Interrupt control register */
P2VAR(uint8, AUTOMATIC, PWM_CONFIG_DATA)pImrIntrCntlRegs;
P2VAR(uint16, AUTOMATIC, PWM_CONFIG_DATA)pIntrCntlRegs;
#endif
/*
* Bit 15-14: 00: This bits are already set during initialization for
* clock source
* Bit 13-12: 00: Selects the Operation Clock
* Bit 11: 0: The channel operates as the slave channel in the
* synchronous channel operation function.
* 1: The channel operates as the master channel in the
* synchronous channel operation function.
* Bit 10- 8: 000: Valid only in software trigger start.
* 100: Selects the INTn output signal of the master channel
* 101: Selects the INTn output signal of the upper channel,
* regardless of the setting of the master
* Bit 7- 6: 00: Not Used, so set to 00
* Bit 4- 0: 00001: Interval Timer mode *a
* 01001: One Count mode *b
* 10101: Pulse One Count mode *b
*(Bit 0: *a: Outputs INTn (timer interrupt) at the start of count operation.
* *b: Enables start trigger detected during count operation)
*/
uint16 usCMORegSettingsMask;
#if(PWM_NOTIFICATION_SUPPORTED == STD_ON)
/*
* If the value is equal to PWM_NO_CBK_CONFIGURED then the callback
* function is not configured. If the value is other than
* PWM_NO_CBK_CONFIGURED, it indicates index to the configured
* call back function in the array Pwm_GstChannelNotifFunc
*/
uint8 ucNotificationConfig;
/* Mask value of the IMR Interrupt control register */
uint8 ucImrMaskValue;
#endif /* #if(PWM_NOTIFICATION_SUPPORTED == STD_ON) */
/*
* Offset with respect to base Timer control register of the master
* channel of corresponding channel
*/
uint8 ucMasterOffset;
/*
* Timer Unit Index in the Array Pwm_GstTAUABCUnitConfig /
* Pwm_GstTAUJUnitConfig based on the channel belongs to
* TAUA or TAUB or TAUC or TAUJ
*/
uint8 ucTimerUnitIndex;
/* PWM channel type, the channel belongs to TAUA or TAUB or TAUC or TAUJ */
uinteger uiPwmTAUType:2;
/*
* Class type of the PWM channel (Fixed Period /Fixed Period Shifted /
* Variable period)
*/
Pwm_ChannelClassType enClassType;
/* Idle state of the channel (HIGH/LOW) */
uinteger uiIdleLevel:1;
/*
* uiTimerMode = true means channel acts as master channel
* uiTimerMode = false means channel acts as slave channel
*/
uinteger uiTimerMode:1;
}Tdd_Pwm_ChannelConfigType;
/*******************************************************************************
** Global configuration constants **
*******************************************************************************/
#define PWM_START_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
#if ((PWM_TAUA_UNIT_USED == STD_ON) || (PWM_TAUB_UNIT_USED == STD_ON) || \
(PWM_TAUC_UNIT_USED == STD_ON))
/* Array of structures for TAUA/B/C Unit Channel Configuration */
extern CONST(Tdd_Pwm_TAUABCUnitConfigType, PWM_CONST) Pwm_GstTAUABCUnitConfig[];
/* Array of structures for Timer unit A/B/C channel Configuration */
extern CONST(Tdd_Pwm_TAUABCProperties, PWM_CONST) Pwm_GstTAUABCChannelProp[];
#endif
#if (PWM_TAUJ_UNIT_USED == STD_ON)
/* Array of structures for TAUJ Unit Configuration */
extern CONST(Tdd_Pwm_TAUJUnitConfigType, PWM_CONST) Pwm_GstTAUJUnitConfig[];
/* Array of structures for Timer unit J channel Configuration */
extern CONST(Tdd_Pwm_TAUJProperties, PWM_CONST) Pwm_GstTAUJChannelProp[];
#endif
/* Array of structures for Channel Configuration */
extern CONST(Tdd_Pwm_ChannelConfigType, PWM_CONST) Pwm_GstChannelConfig[];
#if(PWM_SYNCHSTART_BETWEEN_TAU_USED == STD_ON)
/* Array of structures for Synchronous start Configuration */
extern CONST(Tdd_PwmTAUSynchStartUseType, PWM_CONST)
Pwm_GstTAUSynchStartConfig[];
#endif
/* Array to map channel to timer index */
extern CONST(uint8, PWM_CONST) Pwm_GaaTimerChIdx[];
#define PWM_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#include "MemMap.h"
#define PWM_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
#if(PWM_NOTIFICATION_SUPPORTED == STD_ON)
/* Array for Notification status of timers configured */
extern VAR(uint8, PWM_NOINIT_DATA) Pwm_GaaNotifStatus[];
#endif
/* Array for Idle state status for all configured channels */
extern VAR(uint8, PWM_NOINIT_DATA) Pwm_GaaChannelIdleStatus[];
#define PWM_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* PWM_PBTYPES_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/Include/SchM_Nm.h
#ifndef SCHM_NM_H
#define SCHM_NM_H
#include "SchM.h"
#include "SchM_Types.h"
#include "SchM_Cfg.h"
#define NM_EXCLUSIVE_AREA_0 SCHM_EA_SUSPENDALLINTERRUPTS
#define NM_EXCLUSIVE_AREA_1 SCHM_EA_SUSPENDALLINTERRUPTS
# define SchM_Enter_Nm(ExclusiveArea) \
SCHM_ENTER_EXCLUSIVE(ExclusiveArea)
# define SchM_Exit_Nm(ExclusiveArea) \
SCHM_EXIT_EXCLUSIVE(ExclusiveArea)
#endif /* SCHM_NM_H */
<file_sep>/APP/LEDTemperature/CAL2_LEDTemperature.c
#include "std_types.h"
#define CAL_ConvertVolToADVal(vol) (UINT16)(((float)(vol)*4095)/5.0f)
#define CAL_SCALEUP_2TIMES_SINT16(x) (SINT16)((x)*32)
const SINT16 KaLED_sw_LEDTempVoltLookupTbl[][2]=
{
/*the application adopt following first data pair as default value,
because 20 degree is normal temperature. Please don't change temperature here*/
{CAL_ConvertVolToADVal(1.27f),125}, /*temperature 120*/
{CAL_ConvertVolToADVal(1.53f),115}, /*temperature 115*/
{CAL_ConvertVolToADVal(1.84f),105}, /*temperature 105*/
{CAL_ConvertVolToADVal(2.19f),95}, /*temperature 95*/
{CAL_ConvertVolToADVal(2.57f),85}, /*temperature 85*/
{CAL_ConvertVolToADVal(2.98f),75}, /*temperature 75*/
{CAL_ConvertVolToADVal(3.37f),65}, /*temperature 65*/
{CAL_ConvertVolToADVal(3.74f),55}, /*temperature 55*/
{CAL_ConvertVolToADVal(4.07f),45}, /*temperature 45*/
{CAL_ConvertVolToADVal(4.34f),35}, /*temperature 35*/
{CAL_ConvertVolToADVal(4.55f),25}, /*temperature 25*/
{CAL_ConvertVolToADVal(4.70f),15}, /*temperature 15*/
{CAL_ConvertVolToADVal(4.81f),5}, /*temperature 5*/
{CAL_ConvertVolToADVal(4.89f),-5}, /*temperature -5*/
{CAL_ConvertVolToADVal(4.93f),-15}, /*temperature -15*/
{CAL_ConvertVolToADVal(4.96f),-25}, /*temperature -25*/
{CAL_ConvertVolToADVal(4.98f),-35}, /*temperature -35*/
{CAL_ConvertVolToADVal(4.99f),-45}, /*temperature -45*/
};
/* temperature look up array size */
const UINT8 KeLED_u_TempLookupArraySize =
sizeof(KaLED_sw_LEDTempVoltLookupTbl)/(sizeof(SINT16) * 2);
const SINT16 KaLED_sw_LEDTempPWMLookupTbl[][2]=
{
/*the application adopt following first data pair as default value,
because 20 degree is normal temperature. Please don't change temperature here*/
{50,125}, /*temperature 120*/
{60,115}, /*temperature 115*/
{70,105}, /*temperature 105*/
{80,95}, /*temperature 95*/
{90,85}, /*temperature 85*/
{100,75}, /*temperature 75*/
{100,65}, /*temperature 65*/
{100,55}, /*temperature 55*/
{100,45}, /*temperature 45*/
{100,35}, /*temperature 35*/
{100,25}, /*temperature 25*/
{100,15}, /*temperature 15*/
{100,5}, /*temperature 5*/
};
/* PWM look up array size */
const UINT8 KeLED_u_PWMLookupArraySize =
sizeof(KaLED_sw_LEDTempPWMLookupTbl)/(sizeof(SINT16) * 2);
<file_sep>/BSP/SERV/Os/Sys_StackHandler.h
/*****************************************************************************
| File Name: Sys_stackhandler.h
|
| Description: System stack handler
|
|-----------------------------------------------------------------------------
| PATAC Confidential
|-----------------------------------------------------------------------------
|
| This software is copyright is proprietary of
| Pan Asia Technical Automotive Company(PATAC).
| All rights are reserved by PATAC.
|
|-----------------------------------------------------------------------------
| A U T H O R I D E N T I T Y
|-----------------------------------------------------------------------------
| Initials Name Company
| -------- -------------------- ---------------------------------------
| FRED <NAME> PATAC
|
|-----------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|-----------------------------------------------------------------------------
| Date Version Author Description
| ---------- -------- ------ ----------------------------------------------
| 2008-12-28 01.00.00 FRED Creation
| 2009-10-16 01.01.01 FRED Add Interface for operation system to command to start algorithm calculation.
|****************************************************************************/
#ifndef __SYS_STACK_H
#define __SYS_STACK_H
#include "platform_types.h"
extern UINT16 VaSysSrvc_uwStkUsage[3];
void SysSrvc_StackCheck(void);
#endif
<file_sep>/BSP/Common/Types/Platform_Types.h
/*******************************************************************************
| File Name: Platform_Types.h
| Description: the head file to define the hardware platform types
|-------------------------------------------------------------------------------
| (copy right) This software is the proprietary of (PATAC).
| All rights are reserved by PATAC.
|-------------------------------------------------------------------------------
| Initials Name Company
| -------- -------------------- -----------------------------------------
| Zephan XXXX PATAC
|-------------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|-------------------------------------------------------------------------------
| Date Version Author Description
| ---------- -------- ------ -------------------------------------------
| 2012-03-06 01.00.00 zephan Creation
|
*******************************************************************************/
#ifndef _PLATFORM_TYPES_H_
#define _PLATFORM_TYPES_H_
/*******************************************************************************
| Other Header File Inclusion (if needed)
*******************************************************************************/
/*******************************************************************************
| Macro,Enum,Type...defines
*******************************************************************************/
#define __32_BIT_MCU
/*****************************************************************************
| 8 bit Data Types
|****************************************************************************/
typedef unsigned char UINT8;
typedef signed char SINT8;
typedef unsigned char BOOL;
/*****************************************************************************
| 16 bit Data Types
|****************************************************************************/
typedef unsigned short UINT16;
typedef signed short SINT16;
/*****************************************************************************
| 32 bit Data Types
|****************************************************************************/
#if defined( __32_BIT_MCU )
typedef unsigned int UINT32;
typedef signed int SINT32;
#elif defined(__16_BIT_MCU)
typedef unsigned long UINT32;
typedef signed long SINT32;
#endif
/*****************************************************************************
| PATAC Data Types
|****************************************************************************/
typedef unsigned char BYTE;
typedef unsigned short int PCT_UW_15;
typedef unsigned long T_PCT_UW_15;
typedef signed short int INTEGER;
/*****************************************************************************
| Bits Data Types
|****************************************************************************/
typedef struct
{
unsigned Bit0 :1;
unsigned Bit1 :1;
unsigned Bit2 :1;
unsigned Bit3 :1;
unsigned Bit4 :1;
unsigned Bit5 :1;
unsigned Bit6 :1;
unsigned Bit7 :1;
} BITS8;
typedef struct
{
unsigned Bit0 :1;
unsigned Bit1 :1;
unsigned Bit2 :1;
unsigned Bit3 :1;
unsigned Bit4 :1;
unsigned Bit5 :1;
unsigned Bit6 :1;
unsigned Bit7 :1;
unsigned Bit8 :1;
unsigned Bit9 :1;
unsigned Bit10 :1;
unsigned Bit11 :1;
unsigned Bit12 :1;
unsigned Bit13 :1;
unsigned Bit14 :1;
unsigned Bit15 :1;
} BITS16;
typedef union
{
UINT8 byte;
BITS8 bits;
} BIT_UN8;
typedef union
{
UINT8 byte[2];
UINT16 word;
BITS16 bits;
} BIT_UN16;
typedef enum boolean_T
{
False = 0,
True = !False,
}BOOLEAN;
/*****************************************************************************
| String Data Types
|****************************************************************************/
typedef const char * STRING;
/*****************************************************************************
| Function Pointer
|****************************************************************************/
typedef void (* FUNCTPTR)(void);
typedef const FUNCTPTR * FarFtnPtr_Arry;
typedef void (* const CONSTFUNCTPTR)(void);
typedef CONSTFUNCTPTR CFPTR;
/*****************************************************************************
| Basic data defines
|****************************************************************************/
#define boolean BOOL
#define uint8 UINT8
#define sint8 SINT8
#define uint16 UINT16
#define sint16 SINT16
#define uint32 UINT32
#define sint32 SINT32
#ifndef NULL
#define NULL ((void *)0x0000)
#endif
#ifndef TRUE
#define TRUE (!0)
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef false
#define false False
#endif
#ifndef true
#define true True
#endif
/*******************************************************************************
| Global Variable with extern linkage
*******************************************************************************/
typedef unsigned long uint8_least; /* At least 8 bit */
typedef unsigned long uint16_least; /* At least 16 bit */
typedef unsigned long uint32_least; /* At least 32 bit */
typedef signed long sint8_least; /* At least 7 bit + 1 bit sign */
typedef signed long sint16_least; /* At least 15 bit + 1 bit sign */
typedef signed long sint32_least; /* At least 31 bit + 1 bit sign */
typedef unsigned char boolean; /* for use with TRUE/FALSE */
/*******************************************************************************
| Global Function Prototypes
*******************************************************************************/
#endif/*End of File*/
<file_sep>/BSP/IoHwAb/IoHwAb_Do.h
/*****************************************************************************
|File Name: IoHwAb_Do.h
|
|Description: Abstracted digital output channels.
|
|-----------------------------------------------------------------------------
| PATAC Confidential
|-----------------------------------------------------------------------------
|
| This software is copyright is proprietary of Pan Asia Technical Automotive Company(PATAC).
| All rights are reserved by PATAC.
|
|-----------------------------------------------------------------------------
| A U T H O R I D E N T I T Y
|-----------------------------------------------------------------------------
| Initials Name Company
| ------------------------------------ ---------------------------------------
|
|
|-----------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|-----------------------------------------------------------------------------
| Date Version Author Description
|---------- -------- ------ ----------------------------------------------
|2011-08-19 01.00.00 ZhanYi Create
*****************************************************************************/
#ifndef _IOHWAB_DO_H
#define _IOHWAB_DO_H
/******************************************************************************
** Include Section **
******************************************************************************/
#include "Dio.h"
#include "IoHwAb_DoCfg.h"
void DoAb_Init(void);
void DoAb_UpdateChannel(void);
void SetDO_DevCtrl(TeIoHwAb_e_DoIds Le_e_DoId, boolean Le_b_value);
void ClrDO_DevCtrl(TeIoHwAb_e_DoIds Le_e_DoId);
void SetDO_AppCtrl(TeIoHwAb_e_DoIds Le_e_DoId, boolean Le_b_value);
boolean GetDO_OutputVal(TeIoHwAb_e_DoIds Le_e_DoId);
#endif
/*EOF*/
<file_sep>/BSP/MCAL/Mcu.dp/Mcu_Ram.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Mcu_Ram.h */
/* Version = 3.0.1 */
/* Date = 15-Mar-2013 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2010-2013 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains the extern declarations of global RAM variables of MCU */
/* Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Fx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 02-Jul-2010 : Initial Version
* V3.0.0a: 18-Oct-2011 : Copyright is updated.
* V3.0.1: 15-Mar-2013 : As per SCR 091, The following changes have been made,
* 1. Alignment is changed as per code guidelines.
*/
/******************************************************************************/
#ifndef MCU_RAM_H
#define MCU_RAM_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Mcu.h"
#include "Mcu_PBTypes.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define MCU_RAM_AR_MAJOR_VERSION MCU_AR_MAJOR_VERSION_VALUE
#define MCU_RAM_AR_MINOR_VERSION MCU_AR_MINOR_VERSION_VALUE
#define MCU_RAM_AR_PATCH_VERSION MCU_AR_PATCH_VERSION_VALUE
/*
* File version information
*/
#define MCU_RAM_SW_MAJOR_VERSION 3
#define MCU_RAM_SW_MINOR_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
#define MCU_START_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* Global variable to store the config pointer */
extern P2CONST(Mcu_ConfigType, MCU_CONST, MCU_CONFIG_CONST) Mcu_GpConfigPtr;
/* Global pointer variable for MCU Clock Setting configuration */
extern P2CONST(Tdd_Mcu_ClockSetting, MCU_CONST, MCU_CONFIG_CONST)
Mcu_GpClockSetting;
#define MCU_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
#define MCU_START_SEC_VAR_NOINIT_16BIT
#include "MemMap.h"
/* Global pointer to CKSC register offset */
extern P2CONST(uint16, AUTOMATIC, MCU_CONFIG_CONST) Mcu_GpCkscRegOffset;
#define MCU_STOP_SEC_VAR_NOINIT_16BIT
#include "MemMap.h"
#define MCU_START_SEC_VAR_NOINIT_32BIT
#include "MemMap.h"
/* Global pointer to CKSC register value */
extern P2CONST(uint32, AUTOMATIC, MCU_CONFIG_CONST) Mcu_GpCkscRegValue;
#define MCU_STOP_SEC_VAR_NOINIT_32BIT
#include "MemMap.h"
#define MCU_START_SEC_VAR_1BIT
#include "MemMap.h"
#if (MCU_DEV_ERROR_DETECT == STD_ON)
/* Global variable to store Initialization status of MCU Driver */
extern VAR(boolean, MCU_INIT_DATA) Mcu_GblDriverStatus;
#endif
#define MCU_STOP_SEC_VAR_1BIT
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* MCU_RAM_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/SERV/Os/Api_SchdTbl.h
/*****************************************************************************
| File Name: SysQueueInfo.h
|
| Description: Mange periodically called system tasks
|
|-----------------------------------------------------------------------------
| PATAC Confidential
|-----------------------------------------------------------------------------
|
| This software is copyright is proprietary of
| Pan Asia Technical Automotive Company(PATAC).
| All rights are reserved by PATAC.
|
|-----------------------------------------------------------------------------
| A U T H O R I D E N T I T Y
|-----------------------------------------------------------------------------
| Initials Name Company
| -------- -------------------- ---------------------------------------
| FRED <NAME> PATAC
|
|-----------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|-----------------------------------------------------------------------------
| Date Version Author Description
| ---------- -------- ------ ----------------------------------------------
| 2012-02-16 01.00.00 zephan Creation
|****************************************************************************/
#ifndef __API_SCHDTBL_H_
#define __API_SCHDTBL_H_
#define Reset_Event_OnceUse(EvtId) ((EvtId) = 0)
/******************************************************************************
* Add new event here and add its corresponding handle function list in QueueFuncsList.h, then put the
* function list's pointer in CaKERNEL_fp_TaskFuncs at correct position.
*
*Call EVENTQUEUE_PUSH when a change happen and corresponding event need to posted to notify to
* handle related sub-system function.
******************************************************************************/
enum EVENT_LIST
{
CeEVT_e_Dummy = 0,
CeEVT_e_Test,
CeEVT_e_TotalNum
};
#endif
<file_sep>/BSP/MCAL/Adc/Adc_Private.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Adc_Private.h */
/* Version = 3.1.2 */
/* Date = 04-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Private functions declarations. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 10-Jul-2009 : Initial version
*
* V3.0.1: 12-Oct-2009 : As per SCR 052, the following changes are made
* 1. Prototype of the functions Adc_Isr and Adc_DmaIsr
* are updated.
*
* V3.1.0: 27-Jul-2011 : Modified for DK-4
* V3.1.1: 14-Feb-2012 : Merged the fixes done for Fx4L Adc driver
*
* V3.1.2: 04-Jun-2012 : As per SCR 019, the following changes are made
* 1. Compiler version is removed from environment
* section.
* 2. File version is changed.
*/
/******************************************************************************/
#ifndef ADC_PRIVATE_H
#define ADC_PRIVATE_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Adc_PBTypes.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define ADC_PRIVATE_AR_MAJOR_VERSION ADC_AR_MAJOR_VERSION_VALUE
#define ADC_PRIVATE_AR_MINOR_VERSION ADC_AR_MINOR_VERSION_VALUE
#define ADC_PRIVATE_AR_PATCH_VERSION ADC_AR_PATCH_VERSION_VALUE
/*
* File version information
*/
#define ADC_PRIVATE_SW_MAJOR_VERSION 3
#define ADC_PRIVATE_SW_MINOR_VERSION 1
#define ADC_PRIVATE_SW_PATCH_VERSION 2
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (ADC_PRIVATE_SW_MAJOR_VERSION != ADC_SW_MAJOR_VERSION)
#error "Software major version of Adc.h and Adc_Private.h did not match!"
#endif
#if (ADC_PRIVATE_SW_MINOR_VERSION!= ADC_SW_MINOR_VERSION )
#error "Software minor version of Adc.h and Adc_Private.h did not match!"
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#define ADC_START_SEC_PRIVATE_CODE
#include "MemMap.h"
FUNC(void, ADC_PRIVATE_CODE) Adc_PushToQueue(Adc_GroupType LddGroup);
FUNC(Adc_GroupType, ADC_PRIVATE_CODE) Adc_PopFromQueue
(Adc_HwUnitType LddHwUnit);
FUNC(void, ADC_PRIVATE_CODE) Adc_ConfigureGroupForConversion
(Adc_GroupType LddGroup);
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
FUNC(void, ADC_PRIVATE_CODE) Adc_Isr(Adc_HwUnitType LddHwUnit,
uint8 LucCGUnit);
#else
FUNC(void, ADC_PRIVATE_CODE) Adc_Isr(Adc_HwUnitType LddHwUnit);
#endif
#if ((ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW) || \
(ADC_PRIORITY_IMPLEMENTATION == ADC_PRIORITY_HW_SW))
FUNC(void, ADC_PRIVATE_CODE) Adc_DmaIsr(Adc_HwUnitType LddHwUnit,
uint8 LucCGUnit);
#else
FUNC(void, ADC_PRIVATE_CODE) Adc_DmaIsr(Adc_HwUnitType LddHwUnit);
#endif
FUNC(void, ADC_PRIVATE_CODE) Adc_ServiceSelectMode
(Adc_GroupType LddGroup, Adc_HwUnitType LddHwUnit);
FUNC(void, ADC_PRIVATE_CODE) Adc_ServiceScanMode(Adc_GroupType LddGroup,
Adc_HwUnitType LddHwUnit);
FUNC(void, ADC_PRIVATE_CODE) Adc_StateTransition(Adc_GroupType LddGroup);
FUNC(void, ADC_PRIVATE_CODE) Adc_SearchnDelete(Adc_GroupType LddGroup,
Adc_HwUnitType LddHwUnit);
FUNC(void, ADC_PRIVATE_CODE) Adc_EnableHWGroup(Adc_GroupType LddGroup);
FUNC(void, ADC_PRIVATE_CODE) Adc_DisableHWGroup(Adc_GroupType LddGroup);
FUNC(void, ADC_PRIVATE_CODE) Adc_GroupCompleteMode(Adc_GroupType LddGroup,
Adc_HwUnitType LddHwUnit);
FUNC(void, ADC_PRIVATE_CODE) Adc_ChannelCompleteMode(Adc_GroupType LddGroup,
Adc_HwUnitType LddHwUnit);
#define ADC_STOP_SEC_PRIVATE_CODE
#include "MemMap.h"
#endif /* ADC_PRIVATE_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/APP/LEDPWMActOut/LEDPWMActOutRTE.h
#ifndef __LEDPWMActOutRTE_H
#define __LEDPWMActOutRTE_H
#include "Std_Types.h"
void SetParkLampOutPWMDuty(UINT8 value);
void SetHighBeamOutPWMDuty(UINT8 value);
void SetLowBeam1OutPWMDuty(UINT8 value);
void SetLowBeam2OutPWMDuty(UINT8 value);
void SetTurnLampOutPWMDuty(UINT8 value);
void SetCornerLampOutPWMDuty(UINT8 value);
void SetHighSpeedLightOutPWMDuty(UINT8 value);
void SetBadWeatherLightOutPWMDuty(UINT8 value);
#endif<file_sep>/BSP/MCAL/Port/Port_Ram.h
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Port_Ram.h */
/* Version = 3.1.4 */
/* Date = 10-Jul-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains the extern declarations of global RAM variables of PORT */
/* Driver */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 27-Jul-2009 : Initial Version
*
* V3.0.1: 27-Aug-2011 : As per SCR 502, Copyright Information is changed.
* V3.0.2: 05-Jan-2012 : As part of Improvement fix,following changes are
* made:
* 1.Version check for SW major version and minor
* version added.
* V3.1.2: 16-Feb-2012 : Merged the fixes done for Fx4L.
* V3.1.3: 06-Jun-2012 : As per SCR 033, File version is changed.
* V3.1.4: 10-Jul-2012 : As per SCR 047, File version is changed.
*/
/******************************************************************************/
#ifndef PORT_RAM_H
#define PORT_RAM_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Port.h"
#include "Port_PBTypes.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define PORT_RAM_AR_MAJOR_VERSION PORT_AR_MAJOR_VERSION_VALUE
#define PORT_RAM_AR_MINOR_VERSION PORT_AR_MINOR_VERSION_VALUE
#define PORT_RAM_AR_PATCH_VERSION PORT_AR_PATCH_VERSION_VALUE
/* File version information */
#define PORT_RAM_SW_MAJOR_VERSION 3
#define PORT_RAM_SW_MINOR_VERSION 1
#define PORT_RAM_SW_PATCH_VERSION 4
#if (PORT_SW_MAJOR_VERSION != PORT_RAM_SW_MAJOR_VERSION )
#error "Software major version of Port_Ram.h and Port.h did not match!"
#endif
#if ( PORT_SW_MINOR_VERSION!= PORT_RAM_SW_MINOR_VERSION)
#error "Software minor version of Port_Ram.h and Port.h did not match!"
#endif
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
#define PORT_START_SEC_VAR_1BIT
#include "MemMap.h"
/* Global variable to store Initialization status of Port Driver Component */
extern VAR (boolean, PORT_INIT_DATA) Port_GblDriverStatus;
#define PORT_STOP_SEC_VAR_1BIT
#include "MemMap.h"
#define PORT_START_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/* Global variable to store pointer to Configuration */
extern P2CONST(Port_ConfigType, PORT_CONST, PORT_CONFIG_CONST)Port_GpConfigPtr;
#define PORT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#include "MemMap.h"
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* PORT_RAM_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/Common/Types/Std_Types.h
#ifndef STD_TYPES_H
#define STD_TYPES_H
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Compiler.h" /* mapping compiler specific keywords */
#include "Platform_Types.h" /* platform specific type definitions */
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define STD_TYPES_AR_MAJOR_VERSION 1
#define STD_TYPES_AR_MINOR_VERSION 2
#define STD_TYPES_AR_PATCH_VERSION 0
/*
* File version information
*/
#define STD_TYPES_SW_MAJOR_VERSION 3
#define STD_TYPES_SW_MINOR_VERSION 0
#define STD_TYPES_SW_PATCH_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/* for OSEK compliance this typedef has been added */
#ifndef STATUSTYPEDEFINED
#define STATUSTYPEDEFINED
#define E_OK 0
typedef unsigned char StatusType;
#endif
/* STD011
The Std_ReturnType (STD005) may be used with the following values (STD006):
E_OK: 0
E_NOT_OK: 1
*/
typedef uint8 Std_ReturnType;
#define E_NOT_OK 1
#define E_PENDING 2u
typedef struct
{
uint16 vendorID;
uint16 moduleID;
uint8 instanceID;
uint8 sw_major_version;
uint8 sw_minor_version;
uint8 sw_patch_version;
} Std_VersionInfoType; /* STD015 */
#define STD_HIGH 1 /* Physical state 5V or 3.3V */
#define STD_LOW 0 /* Physical state 0V */
#define STD_ACTIVE 1 /* Logical state active */
#define STD_IDLE 0 /* Logical state idle */
#define STD_ON 1
#define STD_OFF 0
/*****************************************************************************
| Function Pointer
|****************************************************************************/
/*Note: all pointers in ghs is always far*/
typedef void (* FtnPtr)(void);
typedef void (* FarFtnPtr)(void);
typedef void (* FarEvtFtnPtr)(UINT16);
typedef const FarFtnPtr* FarFtnPtr_Arry;
/***
Constant Function pointer
***/
typedef void (* const CnstFtnPtr)(void);
/*=======================================================================*
* Fixed width word size data types: *
* int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers *
* uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers *
*=======================================================================*/
typedef signed char int8_T;
typedef unsigned char uint8_T;
typedef int int16_T;
typedef unsigned short uint16_T;
typedef long int32_T;
typedef unsigned long uint32_T;
/*===========================================================================*
* Generic type definitions: boolean_T, int_T, uint_T, ulong_T, char_T, *
* and byte_T. *
*===========================================================================*/
typedef unsigned char boolean_T;
typedef int int_T;
typedef unsigned int uint_T;
typedef unsigned long ulong_T;
typedef char char_T;
typedef char_T byte_T;
#ifndef GMLAN_VALID
#define GMLAN_VALID 0
#endif
#ifndef GMLAN_INVALID
#define GMLAN_INVALID 1
#endif
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* STD_TYPES_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Wdg/Wdg_23_DriverA.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Wdg_23_DriverA.c */
/* Version = 3.0.5a */
/* Date = 18-Oct-2011 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2011 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Driver code of the Watchdog Driver A Component */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied, including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 12-Jun-2009 : Initial Version
*
* V3.0.1: 14-Jul-2009 : As per SCR 015, compiler version is changed from
* V5.0.5 to V5.1.6c in the header of the file.
*
* V3.0.2: 22-Feb-2010 : As per SCR 196, initializing the timer counter
* register is done in Wdg_Init() API.
*
* V3.0.3: 25-Feb-2010 : As per SCR 198, watchdog timer is started in
* Wdg_SetMode() API.
*
* V3.0.4: 06-Mar-2010 : As per SCR 219, Wdg_SetMode() API is updated
* to start watchdog after setting the requested mode.
*
* V3.0.5: 20-Jun-2011 : As per SCR 476, Wdg_23_DriverAInit() and
* Wdg_23_DriverASetMode() API are updated for code
* optimization.
* V3.0.5a: 18-Oct-2011 : Copyright is updated.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Wdg_23_DriverA.h"
#include "Wdg_23_DriverA_PBTypes.h"
#if (WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON)
#include "Det.h"
#endif
#include "Dem.h"
#include "Wdg_23_DriverA_Ram.h"
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define WDG_23_DRIVERA_C_AR_MAJOR_VERSION WDG_23_DRIVERA_AR_MAJOR_VERSION_VALUE
#define WDG_23_DRIVERA_C_AR_MINOR_VERSION WDG_23_DRIVERA_AR_MINOR_VERSION_VALUE
#define WDG_23_DRIVERA_C_AR_PATCH_VERSION WDG_23_DRIVERA_AR_PATCH_VERSION_VALUE
/* File version information */
#define WDG_23_DRIVERA_C_SW_MAJOR_VERSION 3
#define WDG_23_DRIVERA_C_SW_MINOR_VERSION 0
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (WDG_23_DRIVERA_AR_MAJOR_VERSION != WDG_23_DRIVERA_C_AR_MAJOR_VERSION)
#error "Wdg_23_DriverA.c : Mismatch in Specification Major Version"
#endif
#if (WDG_23_DRIVERA_AR_MINOR_VERSION != WDG_23_DRIVERA_C_AR_MINOR_VERSION)
#error "Wdg_23_DriverA.c : Mismatch in Specification Minor Version"
#endif
#if (WDG_23_DRIVERA_AR_PATCH_VERSION != WDG_23_DRIVERA_C_AR_PATCH_VERSION)
#error "Wdg_23_DriverA.c : Mismatch in Specification Patch Version"
#endif
#if (WDG_23_DRIVERA_SW_MAJOR_VERSION != WDG_23_DRIVERA_C_SW_MAJOR_VERSION)
#error "Wdg_23_DriverA.c : Mismatch in Major Version"
#endif
#if (WDG_23_DRIVERA_SW_MINOR_VERSION != WDG_23_DRIVERA_C_SW_MINOR_VERSION)
#error "Wdg_23_DriverA.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Wdg_23_DriverAInit
**
** Service ID : 0x00
**
** Description : This service initialise the Watchdog driver and
** hardware.
**
** Sync/Async : Synchronous
**
** Reentrancy : Non-Reentrant
**
** Input Parameters : ConfigPtr Pointer to the configuration
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return Parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Wdg_23_DriverA_GpConfigPtr,
** Wdg_GddDriverState,
** Wdg_GddCurrentMode
** Function(s) invoked:
** Det_ReportError
** Dem_ReportErrorStatus
*******************************************************************************/
#define WDG_23_DRIVERA_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, WDG_23_DRIVERA_PUBLIC_CODE) Wdg_23_DriverAInit
(P2CONST(Wdg_23_DriverA_ConfigType, AUTOMATIC, WDG_23_DRIVERA_APPL_CONST)
ConfigPtr)
{
#if (WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON)
/* Report Error to DET, if the config pointer value is NULL */
if (ConfigPtr == NULL_PTR)
{
/* Report Error to DET */
Det_ReportError(WDG_23_DRIVERA_MODULE_ID,WDG_23_DRIVERA_INSTANCE_ID,
WDG_23_DRIVERA_INIT_SID, WDG_23_DRIVERA_E_PARAM_CONFIG);
}
else
#endif /* (WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON) */
{
/* Check whether the existing database is correct */
if ((ConfigPtr->ulStartOfDbToc) == WDG_23_DRIVERA_DBTOC_VALUE)
{
/* Assign the config pointer value to global pointer */
Wdg_23_DriverA_GpConfigPtr = ConfigPtr;
/* Check whether Watchdog disable is allowed */
#if (WDG_23_DRIVERA_DISABLE_ALLOWED == STD_OFF)
if(Wdg_23_DriverA_GpConfigPtr->ddWdtamdDefaultMode == WDGIF_OFF_MODE)
{
/* Report Error to DEM */
Dem_ReportErrorStatus(WDG_23_DRVA_E_DISABLE_REJECTED,
DEM_EVENT_STATUS_FAILED);
}
else
#endif
{
/* To check whether the default mode is not OFF mode */
if (Wdg_23_DriverA_GpConfigPtr->ddWdtamdDefaultMode != WDGIF_OFF_MODE)
{
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified */
/* manually and it is not having any impact. */
/* Set Default mode value to Mode register */
WDG_23_DRIVERA_WDTAMD_ADDRESS =
Wdg_23_DriverA_GpConfigPtr->ucWdtamdDefaultValue;
/* Check whether Varying Activation Code is enabled or disabled */
#if (WDG_23_DRIVERA_VAC_ALLOWED == STD_OFF)
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified */
/* manually and it is not having any impact. */
/* Initialise the register with preconfigured value */
WDG_23_DRIVERA_WDTAWDTE_ADDRESS = WDG_23_DRIVERA_RESTART;
#else
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified */
/* manually and it is not having any impact. */
/* Initialise VAC register */
WDG_23_DRIVERA_WDTAEVAC_ADDRESS = WDG_23_DRIVERA_RESTART -
WDG_23_DRIVERA_WDTAREF_ADDRESS;
#endif /* WDG_23_DRIVERA_VAC_ALLOWED == STD_OFF */
}
/* Set current mode */
Wdg_GddCurrentMode = Wdg_23_DriverA_GpConfigPtr->ddWdtamdDefaultMode;
/* Check if WDG_23_DRIVERA_DEV_ERROR_DETECT is enabled */
#if (WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON)
/* Set the state of Watchdog as idle */
Wdg_GddDriverState = WDG_IDLE;
#endif
}
}
#if (WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON)
else
{
/* Report Error to DET */
Det_ReportError(WDG_23_DRIVERA_MODULE_ID,WDG_23_DRIVERA_INSTANCE_ID,
WDG_23_DRIVERA_INIT_SID, WDG_23_DRVA_E_INVALID_DATABASE);
} /* End of Check to check database */
#endif
}
}
#define WDG_23_DRIVERA_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Wdg_23_DriverASetMode
**
** Service ID : 0x01
**
** Sync/Async : Synchronous
**
** Description : This service change the mode of the Watchdog timer
**
** Re-entrancy : Non-Reentrant
**
** Input Parameters : WdgIf_ModeType Mode
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return Parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):Wdg_GddDriverState,
** Wdg_GddCurrentMode
** Function(s) Invoked:
** Dem_ReportErrorStatus
** Det_ReportError
*******************************************************************************/
#define WDG_23_DRIVERA_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(Std_ReturnType, WDG_23_DRIVERA_PUBLIC_CODE) Wdg_23_DriverASetMode
(WdgIf_ModeType Mode)
{
Std_ReturnType LenReturnValue = E_OK;
/* Report Error to DET, if state of Watchdog is not idle */
#if (WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON)
if (Wdg_GddDriverState != WDG_IDLE)
{
/* Report Error to DET */
Det_ReportError(WDG_23_DRIVERA_MODULE_ID, WDG_23_DRIVERA_INSTANCE_ID,
WDG_23_DRIVERA_SETMODE_SID, WDG_23_DRIVERA_E_DRIVER_STATE);
/* Set Return Value as E_NOT_OK */
LenReturnValue = E_NOT_OK;
}
/* MISRA Rule : 13.7 */
/* Message : The result of this logical operation is always */
/* 'false'. The value of this control expression */
/* is always 'false'. */
/* Reason : Since e-num type is used it is not possible to */
/* provide out of range value but as per AUTOSAR */
/* all the input paramters of an API have to be */
/* verified. */
/* Verification : However, part of the code is verified manually */
/* and it is not giving any impact */
/* MISRA Rule : 14.1 */
/* Message : This statement is unreachable. */
/* Reason : Since e-num type is used it is not possible to */
/* provide out of range value but as per AUTOSAR */
/* all the input paramters of an API have to be */
/* verified. */
/* Verification : However, part of the code is verified manually */
/* and it is not giving any impact */
/* Check whether input parameter 'Mode' is within the range */
if(Mode > WDGIF_FAST_MODE)
{
/* Report Error to DET, if the parameter mode is not within the range */
Det_ReportError(WDG_23_DRIVERA_MODULE_ID, WDG_23_DRIVERA_INSTANCE_ID,
WDG_23_DRIVERA_SETMODE_SID, WDG_23_DRIVERA_E_PARAM_MODE);
/* Set Return Value as E_NOT_OK */
LenReturnValue = E_NOT_OK;
}
if(LenReturnValue == E_OK)
#endif /* #if (WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON) */
{
#if (WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON)
/* Set the state of Watchdog as busy */
Wdg_GddDriverState = WDG_BUSY;
#endif
/* Switching the Watchdog Mode from OFF to SLOW */
if ((Wdg_GddCurrentMode == WDGIF_OFF_MODE) && (Mode != WDGIF_OFF_MODE))
{
/* Switching the Watchdog Mode from OFF to SLOW */
if(Mode == WDGIF_SLOW_MODE)
{
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Set configured slow mode value to Mode register */
WDG_23_DRIVERA_WDTAMD_ADDRESS =
Wdg_23_DriverA_GpConfigPtr->ucWdtamdSlowValue;
}
/* Switching the Watchdog Mode from OFF to FAST */
else
{
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Set configured fast mode value to Mode register */
WDG_23_DRIVERA_WDTAMD_ADDRESS =
Wdg_23_DriverA_GpConfigPtr->ucWdtamdFastValue;
}
/* Set the current mode */
Wdg_GddCurrentMode = Mode;
/* Check whether Varying Activation Code is enabled or disabled */
#if (WDG_23_DRIVERA_VAC_ALLOWED == STD_OFF)
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified */
/* manually and it is not having any impact. */
/* Initialise the register with preconfigured value */
WDG_23_DRIVERA_WDTAWDTE_ADDRESS = WDG_23_DRIVERA_RESTART;
#else
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified */
/* manually and it is not having any impact. */
/* Initialise VAC register */
WDG_23_DRIVERA_WDTAEVAC_ADDRESS = WDG_23_DRIVERA_RESTART -
WDG_23_DRIVERA_WDTAREF_ADDRESS;
#endif /* WDG_23_DRIVERA_VAC_ALLOWED == STD_OFF */
}
else if (Wdg_GddCurrentMode != Mode)
{
/* Report Error to DEM */
Dem_ReportErrorStatus(WDG_23_DRVA_E_MODE_SWITCH_FAILED,
DEM_EVENT_STATUS_FAILED);
/* Set Return Value as E_NOT_OK */
LenReturnValue = E_NOT_OK;
}
else
{
/* To avoid QAC warning */
}
/* Set Watchdog Driver State to IDLE after Mode Switch operation */
#if (WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON)
/* Set the state of Watchdog as idle */
Wdg_GddDriverState = WDG_IDLE;
#endif /* (WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON) */
}
return(LenReturnValue);
}
#define WDG_23_DRIVERA_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Wdg_23_DriverATrigger
**
** Service ID : 0x02
**
** Sync/Async : Synchronous
**
** Description : This service is used to trigger the Watchdog timer
**
** Re-entrancy : Non-Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return Parameter : None
**
** Preconditions : Wdg_23_DriverAInit must be called before this function
**
** Remarks : Global Variable(s):
** Wdg_GddDriverState
** Function(s) Invoked:
** Det_ReportError
**
*******************************************************************************/
#define WDG_23_DRIVERA_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC(void, WDG_23_DRIVERA_PUBLIC_CODE) Wdg_23_DriverATrigger(void)
{
/* Check if DET is enabled */
#if (WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON)
/* Check whether Watchdog is in idle state */
if (Wdg_GddDriverState != WDG_IDLE)
{
/* Report to DET, if Watchdog is not in idle state */
Det_ReportError(WDG_23_DRIVERA_MODULE_ID, WDG_23_DRIVERA_INSTANCE_ID,
WDG_23_DRIVERA_TRIGGER_SID, WDG_23_DRIVERA_E_DRIVER_STATE);
}
else
#endif
{
#if (WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON)
/* Set the state of Watchdog as busy */
Wdg_GddDriverState = WDG_BUSY;
#endif /* WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON */
/* Check whether Varying Activation Code is enabled */
#if (WDG_23_DRIVERA_VAC_ALLOWED == STD_OFF)
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Initialise the register with preconfigured value */
WDG_23_DRIVERA_WDTAWDTE_ADDRESS = WDG_23_DRIVERA_RESTART;
#else
/* MISRA Rule : 11.3 */
/* Message : Type casting from any type to or from */
/* pointers shall not be used. */
/* Reason : To access hardware registers */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
/* Initialise VAC register */
WDG_23_DRIVERA_WDTAEVAC_ADDRESS = WDG_23_DRIVERA_RESTART -
WDG_23_DRIVERA_WDTAREF_ADDRESS;
#endif /* WDG_23_DRIVERA_VAC_ALLOWED == STD_OFF */
#if (WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON)
/* Set the state of Watchdog as idle */
Wdg_GddDriverState = WDG_IDLE;
#endif /* WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON */
}
}
#define WDG_23_DRIVERA_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
/*******************************************************************************
** Function Name : Wdg_23_DriverAGetVersionInfo
**
** Service ID : 0x04
**
** Sync/Async : Synchronous
**
** Description : This service returns the version information of Watchdog
** Driver Component
**
** Re-entrancy : Non-Reentrant
**
** Input Parameters : None
**
** InOut Parameters : None
**
** Output Parameters : versioninfo
**
** Return Parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
** Function(s) Invoked:
** Det_ReportError
**
*******************************************************************************/
#if (WDG_23_DRIVERA_VERSION_INFO_API == STD_ON)
#define WDG_23_DRIVERA_START_SEC_PUBLIC_CODE
#include "MemMap.h"
FUNC (void, WDG_23_DRIVERA_PUBLIC_CODE) Wdg_23_DriverAGetVersionInfo
(P2VAR(Std_VersionInfoType, AUTOMATIC, WDG_23_DRIVERA_APPL_DATA)versioninfo)
{
#if (WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON)
/* Check whether Version Information is equal to Null Ptr */
if(versioninfo == NULL_PTR)
{
/* Report to DET */
Det_ReportError(WDG_23_DRIVERA_MODULE_ID, WDG_23_DRIVERA_INSTANCE_ID,
WDG_23_DRIVERA_GETVERSIONINFO_SID, WDG_23_DRIVERA_E_PARAM_POINTER);
}
else
#endif /* (WDG_23_DRIVERA_DEV_ERROR_DETECT == STD_ON) */
{
/* Copy the vendor Id */
versioninfo->vendorID = WDG_23_DRIVERA_VENDOR_ID;
/* Copy the module Id */
versioninfo->moduleID = WDG_23_DRIVERA_MODULE_ID;
/* Copy the instance Id */
versioninfo->instanceID = WDG_23_DRIVERA_INSTANCE_ID;
/* Copy Software Major Version */
versioninfo->sw_major_version = WDG_23_DRIVERA_SW_MAJOR_VERSION_VALUE;
/* Copy Software Minor Version */
versioninfo->sw_minor_version = WDG_23_DRIVERA_SW_MINOR_VERSION_VALUE;
/* Copy Software Patch Version */
versioninfo->sw_patch_version = WDG_23_DRIVERA_SW_PATCH_VERSION_VALUE;
}
}
#define WDG_23_DRIVERA_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"
#endif /* (WDG_23_DRIVERA_VERSION_INFO_API == STD_ON) */
/*******************************************************************************
** End Of File **
*******************************************************************************/
<file_sep>/BSP/SERV/Os/Sys_QueueHandler.h
/*****************************************************************************
| File Name: ApiQueueHandler.h
|
| Description: Event Queue Handler
|
|-----------------------------------------------------------------------------
| PATAC Confidential
|-----------------------------------------------------------------------------
|
| This software is copyright is proprietary of
| Pan Asia Technical Automotive Company(PATAC).
| All rights are reserved by PATAC.
|
|-----------------------------------------------------------------------------
| A U T H O R I D E N T I T Y
|-----------------------------------------------------------------------------
| Initials Name Company
| -------- -------------------- ---------------------------------------
| FRED <NAME> PATAC
|
|-----------------------------------------------------------------------------
| R E V I S I O N H I S T O R Y
|-----------------------------------------------------------------------------
| Date Version Author Description
| ---------- -------- ------ ----------------------------------------------
| 2009-1-28 01.00.00 FRED Creation
|****************************************************************************/
#ifndef __API_QUEUE_HANDLER_H
#define __API_QUEUE_HANDLER_H
#include "platform_types.h"
#define TASK_QUEUE_SIZE 20u
#define EVENT_QUEUE_SIZE 1000u
#define DUMMY_ID_IN_QUEUE 0u
#if DUMMY_ID_IN_QUEUE != 0
#error "I'm sorry"
#endif
#if (TASK_QUEUE_SIZE > 256) || (EVENT_QUEUE_SIZE > 256)
#define QuequeSizeType UINT16
#else
#define QuequeSizeType UINT8
#endif
//#define ADOPT_UINT8_FOR_QUEUE_ITME_ID
#define ADOPT_UINT16_FOR_QUEUE_ITME_ID
#if defined(ADOPT_UINT8_FOR_QUEUE_ITME_ID) && defined(ADOPT_UINT16_FOR_QUEUE_ITME_ID)
#error "Can't define both type for Queue Item ID"
#elif defined ADOPT_UINT8_FOR_QUEUE_ITME_ID
#define QueueItemIDType UINT8
#elif defined ADOPT_UINT16_FOR_QUEUE_ITME_ID
#define QueueItemIDType UINT16
#else
#error "A type must be defined for Queue Item ID"
#endif
/******************************************************************************
* Macro Definition
*
******************************************************************************/
#define EnterCritical() __DI()
#define LeaveCritical() __EI()
#define TASKQUEUE_PUSH(x) (void)AddKERNEL_b_QueueItem(&VsKERNEL_h_PeriodTaskQueue, x)
#define TASKQUEUE_POP() GetKERNEL_w_QueueItem(&VsKERNEL_h_PeriodTaskQueue)
#define TASKQUEUE_ISEMPTY() IS_QUEUE_EMPTY(VsKERNEL_h_PeriodTaskQueue)
/*EVENTQUEUE_PUSH is for usage after OS is started*/
#define OSEVENT_PUSH(x) (void)AddKERNEL_b_QueueItem(&VsKERNEL_h_EventTaskQueue, (x))
#define EVENTQUEUE_PUSH(x) {\
__DI();\
OSEVENT_PUSH(x);\
__EI();}
#define EVENTQUEUE_POP() GetKERNEL_w_QueueItem(&VsKERNEL_h_EventTaskQueue)
#define EVENTQUEUE_ISEMPTY() IS_QUEUE_EMPTY(VsKERNEL_h_EventTaskQueue)
/*QueueStruct defines the queue object. */
typedef struct QueueStruct
{
/* structure data members. */
/** The pre-allocated memory. */
QueueItemIDType* pArrayMemory;
/* Points at the front of the queue, where the data will be retrieved
from. */
QuequeSizeType iFrontItem;
/* Points at the next available position. */
QuequeSizeType INextItem;
/* The size of the queue, max number of items in the queue */
QuequeSizeType ArraySize;
/* The number of items currently stored on the queue. */
QuequeSizeType NumInQue;
} QueueStruct_t;
/**
* Macros to reduce function call depth. Having adverse effect on stack
* size.
*/
/** Check if the queue is empty. Variable Version*/
#define IS_QUEUE_EMPTY(MyQueue) \
((MyQueue.NumInQue > 0) ? FALSE : TRUE)
/******************************************************************************
* Extern function and variable declaration.
*
******************************************************************************/
extern QueueStruct_t VsKERNEL_h_PeriodTaskQueue;
extern QueueStruct_t VsKERNEL_h_EventTaskQueue;
void SysSrvc_InitAllQueue(void);
/******************************************************************************
* Function Name : AddKERNEL_b_QueueItem
* Description : Add an item to the back of the queue
* Parameters Passed : pQueue: The Queue object we're adding to.
EventID : The item we're adding.
* Parameters Returned : None
* Return Type : TRUE if value was inserted.
* FALSE otherwise.
******************************************************************************/
BOOL AddKERNEL_b_QueueItem (QueueStruct_t* const pQueue, const QueueItemIDType EventID);
/******************************************************************************
* Function Name : AddKERNEL_b_QueueInitPhase
* Description : Add an item to the back of the queue in OS init phase, which is used in
startup hook. Never use it after OS is start.
* Parameters Passed : pQueue: The Queue object we're adding to.
EventID : The item we're adding.
* Parameters Returned : None
* Return Type : TRUE if value was inserted.
* FALSE otherwise.
******************************************************************************/
BOOL AddKERNEL_b_QueueInitPhase(QueueStruct_t* const pQueue, const QueueItemIDType EventID);
QueueItemIDType GetKERNEL_w_QueueItem (QueueStruct_t* const pQueue);
BOOL AddKERNEL_b_QueueFrontItem(QueueStruct_t* const pQueue, const QueueItemIDType EventID);
BOOL QueryKERNEL_b_QueueEmpty (const QueueStruct_t* const pQueue);
BOOL RemoveKERNEL_b_QueueItem(QueueStruct_t* const pQueue, const QueueItemIDType EventID);
BOOL QueryKERNEL_b_ItemInQueue (const QueueStruct_t* const pQueue,
const QueueItemIDType EventID);
QuequeSizeType QueryKERNEL_u_QueueStoredNum(QueueStruct_t* const pQueue);
void ClearKERNEL_Queue (QueueStruct_t* const pQueue);
#endif
<file_sep>/BSP/Include/Appl_Include.h
#include "Std_Types.h"
extern boolean Appl_CriticalErrorCallback(Fee_SectorErrorType ErrorCode);
/************ Organi, Version 3.9.1 Vector-Informatik GmbH ************/
<file_sep>/BSP/Include/_Os.h
#ifndef OS_H
#define OS_H
#include "ComStack_Types.h"
#define osqRAM1
#define osqRAM2
#define osqRAM3
#define PROTOTYPETASK(x) extern void x##func(void)
#define CALLTASK(x) (void)x##func()
/* If the SchM-Generator is used (and SchMOsSupport is deactivated
replace the 2 definitions above with the following */
/*
#define PROTOTYPETASK(x) extern void x##(void)
#define CALLTASK(x) (void)x##()
*/
#define TASK(x) void x##func(void)
#define ISR(x) void x(void)
#define DeclareTask(TaskId) extern osqRAM1 osqRAM2 TaskType osqRAM3 osNotUsed1##TaskId
#define SetRelAlarm(a, b, c) 0
#define CancelAlarm(a) 0
#define WaitEvent(a) 0
#define GetEvent(a, b) 0
#define ClearEvent(a) 0
#define GetResource(a) 0
#define ReleaseResource(a) 0
#define ShutdownOS(a)
#define OsAppMode 0
#define OSDEFAULTAPPMODE 0x01
typedef uint8 AppModeType;
typedef uint8 EventMaskType;
typedef uint16 osTaskIndexType;
typedef osTaskIndexType TaskType;
/* Inclusion of BrsHw.h makes our include structure fail -> define required function prototypes ourselves */
void BrsHwDisableInterrupt(void);
void BrsHwRestoreInterrupt(void);
void StartOS(uint8);
#define SuspendAllInterrupts BrsHwDisableInterrupt
#define ResumeAllInterrupts BrsHwRestoreInterrupt
/* With activated OS Emulation we do not want to create the interrupt service routines with the ISR() macro in can_irq.c
* For some platforms additional pragmas are required for interrupt functions
* As the C_ENABLE_OSEK_OS_INTCAT2 is only used by CAN Drivers till now, we are able to redefine this switch.
* (Does not affect library delivery as can_irq.c has to be delivered as source code)
*/
#if defined (C_ENABLE_OSEK_OS_INTCAT2)
# undef C_ENABLE_OSEK_OS_INTCAT2
# if !defined (C_DISABLE_OSEK_OS_INTCAT2)
# define C_DISABLE_OSEK_OS_INTCAT2
# endif
#endif
#endif
<file_sep>/BSP/MCAL/Dio/Dio.c
/*============================================================================*/
/* Project = AUTOSAR Renesas Xx4 MCAL Components */
/* Module = Dio.c */
/* Version = 3.1.3 */
/* Date = 05-Jun-2012 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009-2012 by Renesas Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains API implementations of Dio Driver Component. */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* Renesas Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by Renesas. Any */
/* warranty is expressly disclaimed and excluded by Renesas, either expressed */
/* or implied,including but not limited to those for non-infringement of */
/* intellectual property, merchantability and/or fitness for the particular */
/* purpose. */
/* */
/* Renesas shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall Renesas be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. Renesas shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by Renesas in connection with the Product(s) and/or */
/* the Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 04-Sep-2009 : Initial Version
*
* V3.0.1: 13-Nov-2009 : As per SCR 124, Updated to overcome the difference
* of offset for PPR register address for JTAG Ports
* as compared to Numeric and Alphabetic Ports.
*
* V3.0.2: 31-Mar-2010 : As per SCR 238, Dio_WriteChannel is updated for
* change in used macro name from DIO_ZERO to STD_LOW.
*
* V3.0.3: 30-Aug-2010 : As per SCR 342, Dio_WriteChannelGroup(),
* Dio_WriteChannel(), Dio_WritePort(),
* Dio_readChannel(), Dio_readPort(),
* Dio_readChannelGroup() are updated for SchM
* Protection.
*
* V3.0.4: 14-Sep-2010 : As per SCR 352, Dio_WriteChannelGroup(),
* Dio_WriteChannel(), Dio_WritePort(),
* Dio_readChannel(), Dio_readPort(),
* Dio_readChannelGroup() are updated for the removal
* of SchM Protection.
* V3.1.0: 27-Jul-2011 : Updated software version 3.1.0 .
* V3.1.1: 04-Oct-2011 : Added comments for the violation of MISRA rule 19.1.
* V3.1.2: 10-Feb-2012 : Merged the fixes done to Fx4L Dio driver.
* V3.1.3: 05-Jun-2012 : As per SCR 027, following changes are made:
* 1. Dio_GetVersionInfo API is removed.
* 2. File version is changed.
* 3. Compiler version is removed from Environment
* section.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#include "Dio.h"
#include "Dio_LTTypes.h"
#if (DIO_DEV_ERROR_DETECT == STD_ON)
#include "Det.h"
#endif
/*******************************************************************************
** Version Information **
*******************************************************************************/
/* AUTOSAR specification version information */
#define DIO_C_AR_MAJOR_VERSION DIO_AR_MAJOR_VERSION_VALUE
#define DIO_C_AR_MINOR_VERSION DIO_AR_MINOR_VERSION_VALUE
#define DIO_C_AR_PATCH_VERSION DIO_AR_PATCH_VERSION_VALUE
/* File version information */
#define DIO_C_SW_MAJOR_VERSION 3
#define DIO_C_SW_MINOR_VERSION 1
#define DIO_C_SW_PATCH_VERSION 3
/*******************************************************************************
** Version Check **
*******************************************************************************/
#if (DIO_AR_MAJOR_VERSION != DIO_C_AR_MAJOR_VERSION)
#error "Dio.c : Mismatch in Specification Major Version"
#endif
#if (DIO_AR_MINOR_VERSION != DIO_C_AR_MINOR_VERSION)
#error "Dio.c : Mismatch in Specification Minor Version"
#endif
#if (DIO_AR_PATCH_VERSION != DIO_C_AR_PATCH_VERSION)
#error "Dio.c : Mismatch in Specification Patch Version"
#endif
#if (DIO_SW_MAJOR_VERSION != DIO_C_SW_MAJOR_VERSION)
#error "Dio.c : Mismatch in Major Version"
#endif
#if (DIO_SW_MINOR_VERSION != DIO_C_SW_MINOR_VERSION)
#error "Dio.c : Mismatch in Minor Version"
#endif
/*******************************************************************************
** Global Data **
*******************************************************************************/
/*******************************************************************************
** Function Definitions **
*******************************************************************************/
/*******************************************************************************
** Function Name : Dio_ReadPort
**
** Service ID : 0x02
**
** Description : This service returns the level of all channels of
** given Port.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : PortlId
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Returns the value of physical level of the channels
** that form the Port
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Dio_GaaPortGroup
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
#define DIO_START_SEC_PUBLIC_CODE
/* MISRA Rule : 19.1 */
/* Message : #include statements in a file */
/* should only be preceded by other*/
/* preprocessor directives or */
/* comments. */
/* Reason : For code optimization. */
/* Verification : However, part of the code is */
/* verified manually and it is not */
/* having any impact. */
#include "MemMap.h"
FUNC(Dio_PortLevelType, DIO_PUBLIC_CODE) Dio_ReadPort(Dio_PortType PortId)
{
P2CONST(Tdd_Dio_PortGroup, AUTOMATIC, DIO_PRIVATE_CONST) LpPortGroup;
P2VAR(uint32, AUTOMATIC, DIO_PRIVATE_DATA) LpPortAddress;
Dio_PortLevelType LddPortLevel;
/* Initialize the return value to 0 */
LddPortLevel = DIO_ZERO;
/* Check whether DIO_DEV_ERROR_DETECT is enabled */
#if (DIO_DEV_ERROR_DETECT == STD_ON)
/* Check whether the Port Id is out of range */
if (PortId >= DIO_MAXNOOFPORT)
{
/* Report Error to DET */
Det_ReportError(DIO_MODULE_ID, DIO_INSTANCE_ID,
DIO_READ_PORT_SID, DIO_E_PARAM_INVALID_PORT_ID);
}
else
#endif /* (DIO_DEV_ERROR_DETECT == STD_ON) */
{
/* Get the pointer to the required Port */
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : To get access of port parameters. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LpPortGroup = Dio_GstPortGroup + PortId;
/* Get the Port Address for the required port */
LpPortAddress = LpPortGroup->pPortAddress;
/* Check if the required port is JTAG port */
if(DIO_TRUE == LpPortGroup->blJtagPort)
{
/*
* Read the port value from PPR register by adding offset to
* PSR register address for JTAG Port
*/
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : To get PPR register address. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LddPortLevel = (Dio_PortLevelType)(*(LpPortAddress
+ DIO_PPR_OFFSET_JTAG));
}
else
{
/*
* Read the port value from PPR register by adding offset to
* PSR register address for Numeric/Alphabetic Port
*/
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : To get PPR register address. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LddPortLevel = (Dio_PortLevelType)(*(LpPortAddress
+ DIO_PPR_OFFSET_NONJTAG));
}
}
/* Return the Port Level */
return(LddPortLevel);
}
#define DIO_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Dio_WritePort
**
** Service ID : 0x03
**
** Description : This service writes the specified level to all the
** channels in given Port.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : PortId
** Level
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Dio_GaaPortGroup
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
#define DIO_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, DIO_PUBLIC_CODE) Dio_WritePort
(Dio_PortType PortId, Dio_PortLevelType Level)
{
P2CONST(Tdd_Dio_PortGroup, AUTOMATIC, DIO_PRIVATE_CONST) LpPortGroup;
/* Check whether DIO_DEV_ERROR_DETECT is enabled */
#if (DIO_DEV_ERROR_DETECT == STD_ON)
/* Check whether the Port Id is out of range */
if (PortId >= DIO_MAXNOOFPORT)
{
/* Report Error to DET */
Det_ReportError(DIO_MODULE_ID, DIO_INSTANCE_ID,
DIO_WRITE_PORT_SID, DIO_E_PARAM_INVALID_PORT_ID);
}
else
#endif /* (DIO_DEV_ERROR_DETECT == STD_ON) */
{
/* Get the pointer to the required Port */
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : To get access of port parameters. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LpPortGroup = Dio_GstPortGroup + PortId;
/*
* Write the Port value using 32-bit PSR register
* Enable upper 16-bits using mask to effectively write to lower 16-bits
*/
*(LpPortGroup->pPortAddress) = (Level | DIO_MSB_MASK);
}
}
#define DIO_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Dio_ReadChannel
**
** Service ID : 0x00
**
** Description : This service returns the value of the specified
** DIO Channel.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : ChannelId
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Dio_LevelType - STD_HIGH/STD_LOW depending on the
** physical level of the Pin
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Dio_GstPortChannel
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
#define DIO_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(Dio_LevelType, DIO_PUBLIC_CODE) Dio_ReadChannel(Dio_ChannelType ChannelId)
{
#if (DIO_CHANNEL_CONFIGURED == STD_ON)
P2CONST(Tdd_Dio_PortChannel, AUTOMATIC, DIO_PRIVATE_CONST) LpPortChannel;
P2VAR(uint32, AUTOMATIC, DIO_PRIVATE_DATA) LpPortAddress;
Dio_PortLevelType LddPortLevel;
#endif
Dio_LevelType LddLevel;
/* Initialize the return value to STD_LOW */
LddLevel = STD_LOW;
/* Check whether DIO_DEV_ERROR_DETECT is enabled */
#if (DIO_DEV_ERROR_DETECT == STD_ON)
/* Check whether the Channel Id is out of range */
if (ChannelId >= DIO_MAXNOOFCHANNEL)
{
/* Report Error to DET */
Det_ReportError(DIO_MODULE_ID, DIO_INSTANCE_ID,
DIO_READ_CHANNEL_SID, DIO_E_PARAM_INVALID_CHANNEL_ID);
}
else
#endif /* (DIO_DEV_ERROR_DETECT == STD_ON) */
{
/* Check if atleast one Channel is configured */
#if (DIO_CHANNEL_CONFIGURED == STD_ON)
/* Get the pointer to the required Channel */
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : To get access of the channel parameters. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LpPortChannel = Dio_GstPortChannel + ChannelId;
/* Get the Port Address in which the Channel is configured */
LpPortAddress = LpPortChannel->pPortAddress;
/* Check if the required port is JTAG port */
if(DIO_TRUE == LpPortChannel->blJtagPort)
{
/*
* Read the port value from PPR register by adding offset to
* PSR register address for JTAG Port
*/
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : To get PPR register address. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LddPortLevel = (Dio_PortLevelType)(*(LpPortAddress
+ DIO_PPR_OFFSET_JTAG));
}
else
{
/*
* Read the port value from PPR register by adding offset to
* PSR register address for Numeric/Alphabetic Port
*/
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : To get PPR register address. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LddPortLevel = (Dio_PortLevelType)(*(LpPortAddress
+ DIO_PPR_OFFSET_NONJTAG));
}
/*
* Mask the port value for required Channel bit position and
* clear other bit positions
*/
LddPortLevel &= (LpPortChannel->usMask);
/* Check whether value is not equal to zero */
if (LddPortLevel != DIO_ZERO )
{
/* Set the return value to STD_HIGH */
LddLevel = STD_HIGH;
}
else
{
/* To Avoid Misra Warning */
}
#endif /* (DIO_CHANNEL_CONFIGURED == STD_ON) */
}
/* Return the Channel Level */
return LddLevel;
}
#define DIO_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Dio_WriteChannel
**
** Service ID : 0x01
**
** Description : This service writes the given value into the specified
** DIO Channel.
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : ChannelId
** Level
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** Dio_GstPortChannel
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
#define DIO_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, DIO_PUBLIC_CODE) Dio_WriteChannel
(Dio_ChannelType ChannelId, Dio_LevelType Level)
{
#if (DIO_CHANNEL_CONFIGURED == STD_ON)
P2CONST(Tdd_Dio_PortChannel, AUTOMATIC, DIO_PRIVATE_CONST) LpPortChannel;
/* MISRA Rule : 18.4 */
/* Message : An object of union type has been defined. */
/* Reason : For accessing 32-bit PSR register separately for */
/* lower 16-bit data and upper 16-bit mask. */
/* Verification : However, part of the code is verified manually and */
/* it is not having any impact. */
Tun_Dio_PortData LunPSRContent;
uint16 LusMask;
#endif /* (DIO_CHANNEL_CONFIGURED == STD_ON) */
/* Check whether DIO_DEV_ERROR_DETECT is enabled */
#if (DIO_DEV_ERROR_DETECT == STD_ON)
/* Check whether the Channel Id is out of range */
if (ChannelId >= DIO_MAXNOOFCHANNEL)
{
/* Report Error to DET */
Det_ReportError(DIO_MODULE_ID, DIO_INSTANCE_ID,
DIO_WRITE_CHANNEL_SID, DIO_E_PARAM_INVALID_CHANNEL_ID);
}
else
#endif /* (DIO_DEV_ERROR_DETECT == STD_ON) */
{
/* Check if atleast one Channel is configured */
#if (DIO_CHANNEL_CONFIGURED == STD_ON)
/* Get the pointer to the Port Channel */
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : To get access of the channel parameters. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LpPortChannel = Dio_GstPortChannel + ChannelId;
/* Get the mask value for the Channel */
LusMask = LpPortChannel->usMask;
/*
* Enable appropriate Channel position by writing
* upper 16bits of PSR register
*/
LunPSRContent.Tst_WordValue.usMSWord = LusMask;
/* Check if the input level value is ZERO */
if (STD_LOW == Level)
{
/*
* Make the Channel value as ZERO by writing
* lower 16-bits of PSR register
*/
LunPSRContent.Tst_WordValue.usLSWord = DIO_ZERO;
}
else
{
/*
* Make the Channel value as ONE by writing
* lower 16-bits of PSR register
*/
LunPSRContent.Tst_WordValue.usLSWord = LusMask;
}
/* Load 32 bit value to PSR register */
*(LpPortChannel->pPortAddress) = LunPSRContent.ulLongWord;
#endif /* (DIO_CHANNEL_CONFIGURED == STD_ON) */
}
}
#define DIO_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Dio_ReadChannelGroup
**
** Service ID : 0x04
**
** Description : This service returns the value of the ChannelGroup
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : ChannelGroupIdPtr
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : Returns the value of physical level of the Channels
** that form the ChannelGroup
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
#define DIO_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(Dio_PortLevelType, DIO_PUBLIC_CODE) Dio_ReadChannelGroup
(CONSTP2CONST(Dio_ChannelGroupType, AUTOMATIC, DIO_CONST) ChannelGroupIdPtr)
{
#if (DIO_CHANNELGROUP_CONFIGURED == STD_ON)
P2VAR(uint32, AUTOMATIC, DIO_PRIVATE_DATA) LpPortAddress;
#endif
Dio_PortLevelType LddPortLevel;
/* Set the return value to 0 */
LddPortLevel = DIO_ZERO;
/* Check whether DIO_DEV_ERROR_DETECT is enabled */
#if (DIO_DEV_ERROR_DETECT == STD_ON)
/* Check whether ChannelGroupIdPtr is NULL_PTR */
if (NULL_PTR == ChannelGroupIdPtr)
{
/* Report Error to DET */
Det_ReportError(DIO_MODULE_ID, DIO_INSTANCE_ID,DIO_READ_CHANNEL_GROUP_SID,
DIO_E_PARAM_INVALID_GROUP_ID);
}
else
#endif /* (DIO_DEV_ERROR_DETECT == STD_ON) */
{
/* Check if atleast one ChannelGroup is configured */
#if (DIO_CHANNELGROUP_CONFIGURED == STD_ON)
/* Get the Port Address in which the Channel is configured */
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : To access the PPR register. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LpPortAddress = ChannelGroupIdPtr->pPortAddress;
/* Check if the required port is JTAG port */
if(DIO_TRUE == ChannelGroupIdPtr->blJtagPort)
{
/* Read the port value from PPR register by adding offset to */
/* PSR register address for JTAG Port */
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : To get PPR register address. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LddPortLevel = (Dio_PortLevelType)(*(LpPortAddress
+ DIO_PPR_OFFSET_JTAG));
}
else
{
/* Read the port value from PPR register by adding offset to */
/* PSR register address for Numeric/Alphabetic Port */
/* MISRA Rule : 17.4 */
/* Message : Performing pointer arithmetic. */
/* Reason : To get PPR register address. */
/* Verification : However, part of the code is verified manually */
/* and it is not having any impact. */
LddPortLevel = (Dio_PortLevelType)(*(LpPortAddress
+ DIO_PPR_OFFSET_NONJTAG));
}
/*
* Mask the port value for required ChannelGroup related bit positions
* and clear other bit positions
*/
LddPortLevel &= (ChannelGroupIdPtr->usMask);
/* Rotate right to get the corresponding ChannelGroup value */
LddPortLevel >>= (ChannelGroupIdPtr->ucOffset);
#endif /* (DIO_CHANNELGROUP_CONFIGURED == STD_ON) */
}
/* Return the ChannelGroup Level */
return(LddPortLevel);
}
#define DIO_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** Function Name : Dio_WriteChannelGroup
**
** Service ID : 0x05
**
** Description : This service writes specified level to the
** ChannelGroup
**
** Sync/Async : Synchronous
**
** Reentrancy : Reentrant
**
** Input Parameters : ChannelGroupIdPtr
** Level
**
** InOut Parameters : None
**
** Output Parameters : None
**
** Return parameter : None
**
** Preconditions : None
**
** Remarks : Global Variable(s):
** None
** Function(s) invoked:
** Det_ReportError
*******************************************************************************/
#define DIO_START_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
FUNC(void, DIO_PUBLIC_CODE) Dio_WriteChannelGroup
(CONSTP2CONST(Dio_ChannelGroupType, AUTOMATIC, DIO_CONST) ChannelGroupIdPtr,
Dio_PortLevelType Level)
{
#if (DIO_CHANNELGROUP_CONFIGURED == STD_ON)
/* MISRA Rule : 18.4 */
/* Message : An object of union type has been defined. */
/* Reason : For accessing 32-bit PSR register separately for */
/* lower 16-bit data and upper 16-bit mask. */
/* Verification : However, part of the code is verified manually and */
/* it is not having any impact. */
Tun_Dio_PortData LunPSRContent;
uint16 LusMask;
#endif
/* Check whether DIO_DEV_ERROR_DETECT is enabled */
#if (DIO_DEV_ERROR_DETECT == STD_ON)
/* Check whether ChannelGroupIdPtr is NULL_PTR */
if (NULL_PTR == ChannelGroupIdPtr)
{
/* Report Error to DET */
Det_ReportError(DIO_MODULE_ID, DIO_INSTANCE_ID, DIO_WRITE_CHANNEL_GROUP_SID,
DIO_E_PARAM_INVALID_GROUP_ID);
}
else
#endif /* (DIO_DEV_ERROR_DETECT == STD_ON) */
{
/* Check if atleast one ChannelGroup is configured */
#if (DIO_CHANNELGROUP_CONFIGURED == STD_ON)
/* Get the mask for the ChannelGroup */
LusMask = ChannelGroupIdPtr->usMask;
/* Rotate left the input level to get the value to be written to port */
Level <<= (ChannelGroupIdPtr->ucOffset);
/*
* Enable appropriate ChannelGroup related positions
* by writing upper 16-bits of PSR register
*/
LunPSRContent.Tst_WordValue.usMSWord = LusMask;
/* Write the Level value to lower 16-bits of PSR register*/
LunPSRContent.Tst_WordValue.usLSWord = Level;
/*Load 32 bit value to PSR register*/
*(ChannelGroupIdPtr->pPortAddress) = LunPSRContent.ulLongWord;
#endif /* (DIO_CHANNELGROUP_CONFIGURED == STD_ON) */
}
}
#define DIO_STOP_SEC_PUBLIC_CODE
#include "MemMap.h"/* PRQA S 5087 */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/Common/MemMap/MemMap_GHS.h
/*============================================================================*/
/* Project = AUTOSAR NEC Xx4 MCAL Components */
/* Module = MemMap.h */
/* Version = 3.0.8 */
/* Date = 20-May-2010 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009 by NEC Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* Provision for sections for Memory Mapping */
/* */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* NEC Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by NEC. Any warranty */
/* is expressly disclaimed and excluded by NEC, either expressed or implied, */
/* including but not limited to those for non-infringement of intellectual */
/* property, merchantability and/or fitness for the particular purpose. */
/* */
/* NEC shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall NEC be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. NEC shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by NEC in connection with the Product(s) and/or the */
/* Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/* Compiler: GHS V5.1.6c */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 30-Mar-2009 : Initial version
* V3.0.1: 23-Jun-2009 : As per SCR 012,
* 1. Memory sections for mapping global constants of
* unspecified size for post build parameters is
* added.
* 2. The sections for FlexRay Driver, CAN Driver,
* LIN and LINIF are removed.
* 3. Memory sections for WDG DRIVER B is added.
* V3.0.2: 14-Jul-2009 : As per SCR 015, compiler version is changed from
* V5.0.5 to V5.1.6c in the header of the file.
* V3.0.3: 22-Oct-2009 : As per SCR 051, sections for FlexRay Driver and CAN
* Driver are added.
* V3.0.4: 11-Nov-2009 : As per SCR 122, section names of public and private
* code of FLS are modified.
* V3.0.5: 09-Feb-2010 : As per SCR 184, sections of public, private and
* application code of FEE are modified.
* V3.0.6: 01-Mar-2010 : As per SCR 205, for Fee module section of EEL_data is
* changed to DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED.
* V3.0.7: 08-Apr-2010 : As per SCR 246, for Mcu module memory section of
* MCU_CFG_BURAM_UNSPECIFIED added.
* V3.0.8: 20-May-2010 : As per SCR 264, memory section is updated for LIN
* module.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define MEMMAP_AR_MAJOR_VERSION 1
#define MEMMAP_AR_MINOR_VERSION 1
#define MEMMAP_AR_PATCH_VERSION 0
/*
* File version information
*/
#define MEMMAP_SW_MAJOR_VERSION 3
#define MEMMAP_SW_MINOR_VERSION 0
#define MEMMAP_SW_PATCH_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Module section mapping **
*******************************************************************************/
/*
* The symbol 'START_WITH_IF' is undefined.
*
* Thus, the preprocessor continues searching for defined symbols
* This first #ifdef makes integration of delivered parts of MemMap.h
* easier because every supplier starts with #elif
*/
#if defined (START_WITH_IF)
/* -------------------------------------------------------------------------- */
/* MCU */
/* -------------------------------------------------------------------------- */
#elif defined (MCU_START_SEC_VAR_1BIT)
#ifdef VAR_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_1BIT_SEC_STARTED
#undef MCU_START_SEC_VAR_1BIT
#define DEFAULT_START_SEC_VAR_1BIT
#endif
#elif defined (MCU_STOP_SEC_VAR_1BIT)
#ifndef VAR_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_1BIT_SEC_STARTED
#undef MCU_STOP_SEC_VAR_1BIT
#define DEFAULT_STOP_SEC_VAR_1BIT
#endif
#elif defined (MCU_START_SEC_VAR_NOINIT_1BIT)
#ifdef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_1BIT_SEC_STARTED
#undef MCU_START_SEC_VAR_NOINIT_1BIT
#define DEFAULT_START_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (MCU_STOP_SEC_VAR_NOINIT_1BIT)
#ifndef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_1BIT_SEC_STARTED
#undef MCU_STOP_SEC_VAR_NOINIT_1BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (MCU_START_SEC_VAR_FAST_1BIT)
#ifdef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_1BIT_SEC_STARTED
#undef MCU_START_SEC_VAR_FAST_1BIT
#define DEFAULT_START_SEC_VAR_FAST_1BIT
#endif
#elif defined (MCU_STOP_SEC_VAR_FAST_1BIT)
#ifndef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_1BIT_SEC_STARTED
#undef MCU_STOP_SEC_VAR_FAST_1BIT
#define DEFAULT_STOP_SEC_VAR_FAST_1BIT
#endif
#elif defined (MCU_START_SEC_VAR_8BIT)
#ifdef VAR_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_8BIT_SEC_STARTED
#undef MCU_START_SEC_VAR_8BIT
#define DEFAULT_START_SEC_VAR_8BIT
#endif
#elif defined (MCU_STOP_SEC_VAR_8BIT)
#ifndef VAR_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_8BIT_SEC_STARTED
#undef MCU_STOP_SEC_VAR_8BIT
#define DEFAULT_STOP_SEC_VAR_8BIT
#endif
#elif defined (MCU_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef MCU_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (MCU_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef MCU_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (MCU_START_SEC_VAR_FAST_8BIT)
#ifdef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_8BIT_SEC_STARTED
#undef MCU_START_SEC_VAR_FAST_8BIT
#define DEFAULT_START_SEC_VAR_FAST_8BIT
#endif
#elif defined (MCU_STOP_SEC_VAR_FAST_8BIT)
#ifndef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_8BIT_SEC_STARTED
#undef MCU_STOP_SEC_VAR_FAST_8BIT
#define DEFAULT_STOP_SEC_VAR_FAST_8BIT
#endif
#elif defined (MCU_START_SEC_VAR_16BIT)
#ifdef VAR_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_16BIT_SEC_STARTED
#undef MCU_START_SEC_VAR_16BIT
#define DEFAULT_START_SEC_VAR_16BIT
#endif
#elif defined (MCU_STOP_SEC_VAR_16BIT)
#ifndef VAR_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_16BIT_SEC_STARTED
#undef MCU_STOP_SEC_VAR_16BIT
#define DEFAULT_STOP_SEC_VAR_16BIT
#endif
#elif defined (MCU_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef MCU_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (MCU_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef MCU_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (MCU_START_SEC_VAR_FAST_16BIT)
#ifdef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_16BIT_SEC_STARTED
#undef MCU_START_SEC_VAR_FAST_16BIT
#define DEFAULT_START_SEC_VAR_FAST_16BIT
#endif
#elif defined (MCU_STOP_SEC_VAR_FAST_16BIT)
#ifndef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_16BIT_SEC_STARTED
#undef MCU_STOP_SEC_VAR_FAST_16BIT
#define DEFAULT_STOP_SEC_VAR_FAST_16BIT
#endif
#elif defined (MCU_START_SEC_VAR_32BIT)
#ifdef VAR_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_32BIT_SEC_STARTED
#undef MCU_START_SEC_VAR_32BIT
#define DEFAULT_START_SEC_VAR_32BIT
#endif
#elif defined (MCU_STOP_SEC_VAR_32BIT)
#ifndef VAR_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_32BIT_SEC_STARTED
#undef MCU_STOP_SEC_VAR_32BIT
#define DEFAULT_STOP_SEC_VAR_32BIT
#endif
#elif defined (MCU_START_SEC_VAR_NOINIT_32BIT)
#ifdef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_32BIT_SEC_STARTED
#undef MCU_START_SEC_VAR_NOINIT_32BIT
#define DEFAULT_START_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (MCU_STOP_SEC_VAR_NOINIT_32BIT)
#ifndef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_32BIT_SEC_STARTED
#undef MCU_STOP_SEC_VAR_NOINIT_32BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (MCU_START_SEC_VAR_FAST_32BIT)
#ifdef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_32BIT_SEC_STARTED
#undef MCU_START_SEC_VAR_FAST_32BIT
#define DEFAULT_START_SEC_VAR_FAST_32BIT
#endif
#elif defined (MCU_STOP_SEC_VAR_FAST_32BIT)
#ifndef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_32BIT_SEC_STARTED
#undef MCU_STOP_SEC_VAR_FAST_32BIT
#define DEFAULT_STOP_SEC_VAR_FAST_32BIT
#endif
#elif defined (MCU_START_SEC_VAR_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef MCU_START_SEC_VAR_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (MCU_STOP_SEC_VAR_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef MCU_STOP_SEC_VAR_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
#elif defined (MCU_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef MCU_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (MCU_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef MCU_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (MCU_START_SEC_VAR_FAST_UNSPECIFIED)
#ifdef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef MCU_START_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (MCU_STOP_SEC_VAR_FAST_UNSPECIFIED)
#ifndef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef MCU_STOP_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (MCU_START_SEC_BURAM_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef MCU_START_SEC_BURAM_VAR_NOINIT_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sbss=".MCU_CFG_BURAM_UNSPECIFIED"
#endif
#elif defined (MCU_STOP_SEC_BURAM_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef MCU_STOP_SEC_BURAM_VAR_NOINIT_UNSPECIFIED
#pragma ghs section sbss=default
#pragma ghs endsda
#endif
#elif defined (MCU_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef MCU_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sbss=".MCU_CFG_RAM_UNSPECIFIED"
#endif
#elif defined (MCU_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef MCU_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs section sbss=default
#pragma ghs endsda
#endif
#elif defined (MCU_START_SEC_CONST_1BIT)
#ifdef CONST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_1BIT_SEC_STARTED
#undef MCU_START_SEC_CONST_1BIT
#define DEFAULT_START_SEC_CONST_1BIT
#endif
#elif defined (MCU_STOP_SEC_CONST_1BIT)
#ifndef CONST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_1BIT_SEC_STARTED
#undef MCU_STOP_SEC_CONST_1BIT
#define DEFAULT_STOP_SEC_CONST_1BIT
#endif
#elif defined (MCU_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef MCU_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (MCU_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef MCU_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (MCU_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef MCU_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (MCU_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef MCU_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (MCU_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef MCU_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (MCU_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef MCU_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (MCU_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef MCU_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (MCU_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef MCU_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (MCU_START_SEC_CONFIG_DATA_UNSPECIFIED)
#ifdef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef MCU_START_SEC_CONFIG_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".MCU_CFG_DATA_UNSPECIFIED"
#endif
#elif defined (MCU_STOP_SEC_CONFIG_DATA_UNSPECIFIED)
#ifndef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef MCU_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (MCU_START_SEC_DBTOC_DATA_UNSPECIFIED)
#ifdef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef MCU_START_SEC_DBTOC_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".MCU_CFG_DBTOC_UNSPECIFIED"
#endif
#elif defined (MCU_STOP_SEC_DBTOC_DATA_UNSPECIFIED)
#ifndef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef MCU_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (MCU_START_SEC_PUBLIC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef MCU_START_SEC_PUBLIC_CODE
#pragma ghs section text=".MCU_PUBLIC_CODE_ROM"
#endif
#elif defined (MCU_STOP_SEC_PUBLIC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef MCU_STOP_SEC_PUBLIC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (MCU_START_SEC_PRIVATE_CODE)
#ifdef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PRIVATE_CODE_SEC_STARTED
#undef MCU_START_SEC_PRIVATE_CODE
#pragma ghs section text=".MCU_PRIVATE_CODE_ROM"
#endif
#elif defined (MCU_STOP_SEC_PRIVATE_CODE)
#ifndef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PRIVATE_CODE_SEC_STARTED
#undef MCU_STOP_SEC_PRIVATE_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (MCU_START_SEC_APPL_CODE)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef MCU_START_SEC_APPL_CODE
#pragma ghs section text=".MCU_APPL_CODE_ROM"
#endif
#elif defined (MCU_STOP_SEC_APPL_CODE)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef APPL_CODE_SEC_STARTED
#undef MCU_STOP_SEC_APPL_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/* -------------------------------------------------------------------------- */
/* LIN */
/* -------------------------------------------------------------------------- */
#elif defined (LIN_START_SEC_VAR_1BIT)
#ifdef VAR_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_1BIT_SEC_STARTED
#undef LIN_START_SEC_VAR_1BIT
#define DEFAULT_START_SEC_VAR_1BIT
#endif
#elif defined (LIN_STOP_SEC_VAR_1BIT)
#ifndef VAR_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_1BIT_SEC_STARTED
#undef LIN_STOP_SEC_VAR_1BIT
#define DEFAULT_STOP_SEC_VAR_1BIT
#endif
#elif defined (LIN_START_SEC_VAR_NOINIT_1BIT)
#ifdef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_1BIT_SEC_STARTED
#undef LIN_START_SEC_VAR_NOINIT_1BIT
#define DEFAULT_START_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (LIN_STOP_SEC_VAR_NOINIT_1BIT)
#ifndef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_1BIT_SEC_STARTED
#undef LIN_STOP_SEC_VAR_NOINIT_1BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (LIN_START_SEC_VAR_FAST_1BIT)
#ifdef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_1BIT_SEC_STARTED
#undef LIN_START_SEC_VAR_FAST_1BIT
#define DEFAULT_START_SEC_VAR_FAST_1BIT
#endif
#elif defined (LIN_STOP_SEC_VAR_FAST_1BIT)
#ifndef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_1BIT_SEC_STARTED
#undef LIN_STOP_SEC_VAR_FAST_1BIT
#define DEFAULT_STOP_SEC_VAR_FAST_1BIT
#endif
#elif defined (LIN_START_SEC_VAR_8BIT)
#ifdef VAR_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_8BIT_SEC_STARTED
#undef LIN_START_SEC_VAR_8BIT
#define DEFAULT_START_SEC_VAR_8BIT
#endif
#elif defined (LIN_STOP_SEC_VAR_8BIT)
#ifndef VAR_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_8BIT_SEC_STARTED
#undef LIN_STOP_SEC_VAR_8BIT
#define DEFAULT_STOP_SEC_VAR_8BIT
#endif
#elif defined (LIN_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef LIN_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (LIN_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef LIN_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (LIN_START_SEC_VAR_FAST_8BIT)
#ifdef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_8BIT_SEC_STARTED
#undef LIN_START_SEC_VAR_FAST_8BIT
#define DEFAULT_START_SEC_VAR_FAST_8BIT
#endif
#elif defined (LIN_STOP_SEC_VAR_FAST_8BIT)
#ifndef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_8BIT_SEC_STARTED
#undef LIN_STOP_SEC_VAR_FAST_8BIT
#define DEFAULT_STOP_SEC_VAR_FAST_8BIT
#endif
#elif defined (LIN_START_SEC_VAR_16BIT)
#ifdef VAR_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_16BIT_SEC_STARTED
#undef LIN_START_SEC_VAR_16BIT
#define DEFAULT_START_SEC_VAR_16BIT
#endif
#elif defined (LIN_STOP_SEC_VAR_16BIT)
#ifndef VAR_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_16BIT_SEC_STARTED
#undef LIN_STOP_SEC_VAR_16BIT
#define DEFAULT_STOP_SEC_VAR_16BIT
#endif
#elif defined (LIN_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef LIN_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (LIN_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef LIN_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (LIN_START_SEC_VAR_FAST_16BIT)
#ifdef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_16BIT_SEC_STARTED
#undef LIN_START_SEC_VAR_FAST_16BIT
#define DEFAULT_START_SEC_VAR_FAST_16BIT
#endif
#elif defined (LIN_STOP_SEC_VAR_FAST_16BIT)
#ifndef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_16BIT_SEC_STARTED
#undef LIN_STOP_SEC_VAR_FAST_16BIT
#define DEFAULT_STOP_SEC_VAR_FAST_16BIT
#endif
#elif defined (LIN_START_SEC_VAR_32BIT)
#ifdef VAR_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_32BIT_SEC_STARTED
#undef LIN_START_SEC_VAR_32BIT
#define DEFAULT_START_SEC_VAR_32BIT
#endif
#elif defined (LIN_STOP_SEC_VAR_32BIT)
#ifndef VAR_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_32BIT_SEC_STARTED
#undef LIN_STOP_SEC_VAR_32BIT
#define DEFAULT_STOP_SEC_VAR_32BIT
#endif
#elif defined (LIN_START_SEC_VAR_NOINIT_32BIT)
#ifdef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_32BIT_SEC_STARTED
#undef LIN_START_SEC_VAR_NOINIT_32BIT
#define DEFAULT_START_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (LIN_STOP_SEC_VAR_NOINIT_32BIT)
#ifndef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_32BIT_SEC_STARTED
#undef LIN_STOP_SEC_VAR_NOINIT_32BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (LIN_START_SEC_VAR_FAST_32BIT)
#ifdef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_32BIT_SEC_STARTED
#undef LIN_START_SEC_VAR_FAST_32BIT
#define DEFAULT_START_SEC_VAR_FAST_32BIT
#endif
#elif defined (LIN_STOP_SEC_VAR_FAST_32BIT)
#ifndef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_32BIT_SEC_STARTED
#undef LIN_STOP_SEC_VAR_FAST_32BIT
#define DEFAULT_STOP_SEC_VAR_FAST_32BIT
#endif
#elif defined (LIN_START_SEC_VAR_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef LIN_START_SEC_VAR_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (LIN_STOP_SEC_VAR_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef LIN_STOP_SEC_VAR_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
#elif defined (LIN_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef LIN_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (LIN_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef LIN_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (LIN_START_SEC_VAR_FAST_UNSPECIFIED)
#ifdef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef LIN_START_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (LIN_STOP_SEC_VAR_FAST_UNSPECIFIED)
#ifndef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef LIN_STOP_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (LIN_START_SEC_BURAM_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef LIN_START_SEC_BURAM_VAR_NOINIT_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sbss=".LIN_CFG_BURAM_UNSPECIFIED"
#endif
#elif defined (LIN_STOP_SEC_BURAM_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef LIN_STOP_SEC_BURAM_VAR_NOINIT_UNSPECIFIED
#pragma ghs section sbss=default
#pragma ghs endsda
#endif
#elif defined (LIN_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef LIN_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sbss=".LIN_CFG_RAM_UNSPECIFIED"
#endif
#elif defined (LIN_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef LIN_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs section sbss=default
#pragma ghs endsda
#endif
#elif defined (LIN_START_SEC_CONST_1BIT)
#ifdef CONST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_1BIT_SEC_STARTED
#undef LIN_START_SEC_CONST_1BIT
#define DEFAULT_START_SEC_CONST_1BIT
#endif
#elif defined (LIN_STOP_SEC_CONST_1BIT)
#ifndef CONST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_1BIT_SEC_STARTED
#undef LIN_STOP_SEC_CONST_1BIT
#define DEFAULT_STOP_SEC_CONST_1BIT
#endif
#elif defined (LIN_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef LIN_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (LIN_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef LIN_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (LIN_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef LIN_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (LIN_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef LIN_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (LIN_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef LIN_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (LIN_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef LIN_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (LIN_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef LIN_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (LIN_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef LIN_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (LIN_START_SEC_CONFIG_DATA_UNSPECIFIED)
#ifdef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef LIN_START_SEC_CONFIG_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".LIN_CFG_DATA_UNSPECIFIED"
#endif
#elif defined (LIN_STOP_SEC_CONFIG_DATA_UNSPECIFIED)
#ifndef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef LIN_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (LIN_START_SEC_DBTOC_DATA_UNSPECIFIED)
#ifdef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef LIN_START_SEC_DBTOC_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".LIN_CFG_DBTOC_UNSPECIFIED"
#endif
#elif defined (LIN_STOP_SEC_DBTOC_DATA_UNSPECIFIED)
#ifndef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef LIN_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (LIN_START_SEC_PUBLIC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef LIN_START_SEC_PUBLIC_CODE
#pragma ghs section text=".LIN_PUBLIC_CODE_ROM"
#endif
#elif defined (LIN_STOP_SEC_PUBLIC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef LIN_STOP_SEC_PUBLIC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (LIN_START_SEC_PRIVATE_CODE)
#ifdef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PRIVATE_CODE_SEC_STARTED
#undef LIN_START_SEC_PRIVATE_CODE
#pragma ghs section text=".LIN_PRIVATE_CODE_ROM"
#endif
#elif defined (LIN_STOP_SEC_PRIVATE_CODE)
#ifndef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PRIVATE_CODE_SEC_STARTED
#undef LIN_STOP_SEC_PRIVATE_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (LIN_START_SEC_APPL_CODE)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef LIN_START_SEC_APPL_CODE
#pragma ghs section text=".LIN_APPL_CODE_ROM"
#endif
#elif defined (LIN_STOP_SEC_APPL_CODE)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef APPL_CODE_SEC_STARTED
#undef LIN_STOP_SEC_APPL_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/* -------------------------------------------------------------------------- */
/* GPT */
/* -------------------------------------------------------------------------- */
#elif defined (GPT_START_SEC_VAR_1BIT)
#ifdef VAR_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_1BIT_SEC_STARTED
#undef GPT_START_SEC_VAR_1BIT
#define DEFAULT_START_SEC_VAR_1BIT
#endif
#elif defined (GPT_STOP_SEC_VAR_1BIT)
#ifndef VAR_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_1BIT_SEC_STARTED
#undef GPT_STOP_SEC_VAR_1BIT
#define DEFAULT_STOP_SEC_VAR_1BIT
#endif
#elif defined (GPT_START_SEC_VAR_NOINIT_1BIT)
#ifdef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_1BIT_SEC_STARTED
#undef GPT_START_SEC_VAR_NOINIT_1BIT
#define DEFAULT_START_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (GPT_STOP_SEC_VAR_NOINIT_1BIT)
#ifndef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_1BIT_SEC_STARTED
#undef GPT_STOP_SEC_VAR_NOINIT_1BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (GPT_START_SEC_VAR_FAST_1BIT)
#ifdef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_1BIT_SEC_STARTED
#undef GPT_START_SEC_VAR_FAST_1BIT
#define DEFAULT_START_SEC_VAR_FAST_1BIT
#endif
#elif defined (GPT_STOP_SEC_VAR_FAST_1BIT)
#ifndef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_1BIT_SEC_STARTED
#undef GPT_STOP_SEC_VAR_FAST_1BIT
#define DEFAULT_STOP_SEC_VAR_FAST_1BIT
#endif
#elif defined (GPT_START_SEC_VAR_8BIT)
#ifdef VAR_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_8BIT_SEC_STARTED
#undef GPT_START_SEC_VAR_8BIT
#define DEFAULT_START_SEC_VAR_8BIT
#endif
#elif defined (GPT_STOP_SEC_VAR_8BIT)
#ifndef VAR_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_8BIT_SEC_STARTED
#undef GPT_STOP_SEC_VAR_8BIT
#define DEFAULT_STOP_SEC_VAR_8BIT
#endif
#elif defined (GPT_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef GPT_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (GPT_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef GPT_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (GPT_START_SEC_VAR_FAST_8BIT)
#ifdef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_8BIT_SEC_STARTED
#undef GPT_START_SEC_VAR_FAST_8BIT
#define DEFAULT_START_SEC_VAR_FAST_8BIT
#endif
#elif defined (GPT_STOP_SEC_VAR_FAST_8BIT)
#ifndef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_8BIT_SEC_STARTED
#undef GPT_STOP_SEC_VAR_FAST_8BIT
#define DEFAULT_STOP_SEC_VAR_FAST_8BIT
#endif
#elif defined (GPT_START_SEC_VAR_16BIT)
#ifdef VAR_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_16BIT_SEC_STARTED
#undef GPT_START_SEC_VAR_16BIT
#define DEFAULT_START_SEC_VAR_16BIT
#endif
#elif defined (GPT_STOP_SEC_VAR_16BIT)
#ifndef VAR_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_16BIT_SEC_STARTED
#undef GPT_STOP_SEC_VAR_16BIT
#define DEFAULT_STOP_SEC_VAR_16BIT
#endif
#elif defined (GPT_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef GPT_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (GPT_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef GPT_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (GPT_START_SEC_VAR_FAST_16BIT)
#ifdef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_16BIT_SEC_STARTED
#undef GPT_START_SEC_VAR_FAST_16BIT
#define DEFAULT_START_SEC_VAR_FAST_16BIT
#endif
#elif defined (GPT_STOP_SEC_VAR_FAST_16BIT)
#ifndef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_16BIT_SEC_STARTED
#undef GPT_STOP_SEC_VAR_FAST_16BIT
#define DEFAULT_STOP_SEC_VAR_FAST_16BIT
#endif
#elif defined (GPT_START_SEC_VAR_32BIT)
#ifdef VAR_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_32BIT_SEC_STARTED
#undef GPT_START_SEC_VAR_32BIT
#define DEFAULT_START_SEC_VAR_32BIT
#endif
#elif defined (GPT_STOP_SEC_VAR_32BIT)
#ifndef VAR_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_32BIT_SEC_STARTED
#undef GPT_STOP_SEC_VAR_32BIT
#define DEFAULT_STOP_SEC_VAR_32BIT
#endif
#elif defined (GPT_START_SEC_VAR_NOINIT_32BIT)
#ifdef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_32BIT_SEC_STARTED
#undef GPT_START_SEC_VAR_NOINIT_32BIT
#define DEFAULT_START_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (GPT_STOP_SEC_VAR_NOINIT_32BIT)
#ifndef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_32BIT_SEC_STARTED
#undef GPT_STOP_SEC_VAR_NOINIT_32BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (GPT_START_SEC_VAR_FAST_32BIT)
#ifdef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_32BIT_SEC_STARTED
#undef GPT_START_SEC_VAR_FAST_32BIT
#define DEFAULT_START_SEC_VAR_FAST_32BIT
#endif
#elif defined (GPT_STOP_SEC_VAR_FAST_32BIT)
#ifndef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_32BIT_SEC_STARTED
#undef GPT_STOP_SEC_VAR_FAST_32BIT
#define DEFAULT_STOP_SEC_VAR_FAST_32BIT
#endif
#elif defined (GPT_START_SEC_VAR_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef GPT_START_SEC_VAR_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (GPT_STOP_SEC_VAR_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef GPT_STOP_SEC_VAR_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
#elif defined (GPT_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef GPT_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (GPT_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef GPT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (GPT_START_SEC_VAR_FAST_UNSPECIFIED)
#ifdef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef GPT_START_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (GPT_STOP_SEC_VAR_FAST_UNSPECIFIED)
#ifndef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef GPT_STOP_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (GPT_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef GPT_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sbss=".GPT_CFG_RAM_UNSPECIFIED"
#endif
#elif defined (GPT_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef GPT_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs section sbss=default
#pragma ghs endsda
#endif
#elif defined (GPT_START_SEC_CONST_1BIT)
#ifdef CONST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_1BIT_SEC_STARTED
#undef GPT_START_SEC_CONST_1BIT
#define DEFAULT_START_SEC_CONST_1BIT
#endif
#elif defined (GPT_STOP_SEC_CONST_1BIT)
#ifndef CONST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_1BIT_SEC_STARTED
#undef GPT_STOP_SEC_CONST_1BIT
#define DEFAULT_STOP_SEC_CONST_1BIT
#endif
#elif defined (GPT_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef GPT_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (GPT_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef GPT_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (GPT_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef GPT_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (GPT_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef GPT_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (GPT_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef GPT_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (GPT_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef GPT_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (GPT_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef GPT_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (GPT_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef GPT_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (GPT_START_SEC_CONFIG_DATA_UNSPECIFIED)
#ifdef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef GPT_START_SEC_CONFIG_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".GPT_CFG_DATA_UNSPECIFIED"
#endif
#elif defined (GPT_STOP_SEC_CONFIG_DATA_UNSPECIFIED)
#ifndef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef GPT_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (GPT_START_SEC_DBTOC_DATA_UNSPECIFIED)
#ifdef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef GPT_START_SEC_DBTOC_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".GPT_CFG_DBTOC_UNSPECIFIED"
#endif
#elif defined (GPT_STOP_SEC_DBTOC_DATA_UNSPECIFIED)
#ifndef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef GPT_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (GPT_START_SEC_PUBLIC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef GPT_START_SEC_PUBLIC_CODE
#pragma ghs section text=".GPT_PUBLIC_CODE_ROM"
#endif
#elif defined (GPT_STOP_SEC_PUBLIC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef GPT_STOP_SEC_PUBLIC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (GPT_START_SEC_PRIVATE_CODE)
#ifdef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PRIVATE_CODE_SEC_STARTED
#undef GPT_START_SEC_PRIVATE_CODE
#pragma ghs section text=".GPT_PRIVATE_CODE_ROM"
#endif
#elif defined (GPT_STOP_SEC_PRIVATE_CODE)
#ifndef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PRIVATE_CODE_SEC_STARTED
#undef GPT_STOP_SEC_PRIVATE_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (GPT_START_SEC_APPL_CODE)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef GPT_START_SEC_APPL_CODE
#pragma ghs section text=".GPT_APPL_CODE_ROM"
#endif
#elif defined (GPT_STOP_SEC_APPL_CODE)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef APPL_CODE_SEC_STARTED
#undef GPT_STOP_SEC_APPL_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/* -------------------------------------------------------------------------- */
/* WDG DRIVER A */
/* -------------------------------------------------------------------------- */
#elif defined (WDG_23_DRIVERA_START_SEC_VAR_1BIT)
#ifdef VAR_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_1BIT_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_VAR_1BIT
#define DEFAULT_START_SEC_VAR_1BIT
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_VAR_1BIT)
#ifndef VAR_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_1BIT_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_VAR_1BIT
#define DEFAULT_STOP_SEC_VAR_1BIT
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_VAR_NOINIT_1BIT)
#ifdef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_1BIT_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_VAR_NOINIT_1BIT
#define DEFAULT_START_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_VAR_NOINIT_1BIT)
#ifndef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_1BIT_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_VAR_NOINIT_1BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_VAR_FAST_1BIT)
#ifdef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_1BIT_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_VAR_FAST_1BIT
#define DEFAULT_START_SEC_VAR_FAST_1BIT
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_VAR_FAST_1BIT)
#ifndef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_1BIT_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_VAR_FAST_1BIT
#define DEFAULT_STOP_SEC_VAR_FAST_1BIT
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_VAR_8BIT)
#ifdef VAR_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_8BIT_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_VAR_8BIT
#define DEFAULT_START_SEC_VAR_8BIT
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_VAR_8BIT)
#ifndef VAR_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_8BIT_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_VAR_8BIT
#define DEFAULT_STOP_SEC_VAR_8BIT
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_VAR_FAST_8BIT)
#ifdef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_8BIT_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_VAR_FAST_8BIT
#define DEFAULT_START_SEC_VAR_FAST_8BIT
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_VAR_FAST_8BIT)
#ifndef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_8BIT_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_VAR_FAST_8BIT
#define DEFAULT_STOP_SEC_VAR_FAST_8BIT
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_VAR_16BIT)
#ifdef VAR_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_16BIT_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_VAR_16BIT
#define DEFAULT_START_SEC_VAR_16BIT
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_VAR_16BIT)
#ifndef VAR_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_16BIT_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_VAR_16BIT
#define DEFAULT_STOP_SEC_VAR_16BIT
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_VAR_FAST_16BIT)
#ifdef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_16BIT_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_VAR_FAST_16BIT
#define DEFAULT_START_SEC_VAR_FAST_16BIT
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_VAR_FAST_16BIT)
#ifndef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_16BIT_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_VAR_FAST_16BIT
#define DEFAULT_STOP_SEC_VAR_FAST_16BIT
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_VAR_32BIT)
#ifdef VAR_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_32BIT_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_VAR_32BIT
#define DEFAULT_START_SEC_VAR_32BIT
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_VAR_32BIT)
#ifndef VAR_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_32BIT_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_VAR_32BIT
#define DEFAULT_STOP_SEC_VAR_32BIT
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_VAR_NOINIT_32BIT)
#ifdef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_32BIT_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_VAR_NOINIT_32BIT
#define DEFAULT_START_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_VAR_NOINIT_32BIT)
#ifndef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_32BIT_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_VAR_NOINIT_32BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_VAR_FAST_32BIT)
#ifdef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_32BIT_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_VAR_FAST_32BIT
#define DEFAULT_START_SEC_VAR_FAST_32BIT
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_VAR_FAST_32BIT)
#ifndef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_32BIT_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_VAR_FAST_32BIT
#define DEFAULT_STOP_SEC_VAR_FAST_32BIT
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_VAR_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_VAR_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_VAR_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_VAR_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_VAR_FAST_UNSPECIFIED)
#ifdef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_VAR_FAST_UNSPECIFIED)
#ifndef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifdef CONFIG_VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONFIG_VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sbss=".WDG23_A_CFG_RAM_UNSPECIFIED"
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifndef CONFIG_VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONFIG_VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs section sbss=default
#pragma ghs endsda
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_CONST_1BIT)
#ifdef CONST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_1BIT_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_CONST_1BIT
#define DEFAULT_START_SEC_CONST_1BIT
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_CONST_1BIT)
#ifndef CONST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_1BIT_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_CONST_1BIT
#define DEFAULT_STOP_SEC_CONST_1BIT
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_CONFIG_DATA_UNSPECIFIED)
#ifdef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_CONFIG_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".WDG23_A_CFG_DATA_UNSPECIFIED"
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_CONFIG_DATA_UNSPECIFIED)
#ifndef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_DBTOC_DATA_UNSPECIFIED)
#ifdef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_DBTOC_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".WDG23_A_CFG_DBTOC_UNSPECIFIED"
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_DBTOC_DATA_UNSPECIFIED)
#ifndef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_PUBLIC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_PUBLIC_CODE
#pragma ghs section text=".WDG23_A_PUBLIC_CODE_ROM"
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_PUBLIC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_PUBLIC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_PRIVATE_CODE)
#ifdef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PRIVATE_CODE_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_PRIVATE_CODE
#pragma ghs section text=".WDG23_A_PRIVATE_CODE_ROM"
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_PRIVATE_CODE)
#ifndef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PRIVATE_CODE_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_PRIVATE_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (WDG_23_DRIVERA_START_SEC_APPL_CODE)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef WDG_23_DRIVERA_START_SEC_APPL_CODE
#pragma ghs section text=".WDG23_A_APPL_CODE_ROM"
#endif
#elif defined (WDG_23_DRIVERA_STOP_SEC_APPL_CODE)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef APPL_CODE_SEC_STARTED
#undef WDG_23_DRIVERA_STOP_SEC_APPL_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/* -------------------------------------------------------------------------- */
/* WDG DRIVER B */
/* -------------------------------------------------------------------------- */
#elif defined (WDG_23_DRIVERB_START_SEC_VAR_1BIT)
#ifdef VAR_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_1BIT_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_VAR_1BIT
#define DEFAULT_START_SEC_VAR_1BIT
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_VAR_1BIT)
#ifndef VAR_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_1BIT_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_VAR_1BIT
#define DEFAULT_STOP_SEC_VAR_1BIT
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_VAR_NOINIT_1BIT)
#ifdef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_1BIT_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_VAR_NOINIT_1BIT
#define DEFAULT_START_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_VAR_NOINIT_1BIT)
#ifndef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_1BIT_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_VAR_NOINIT_1BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_VAR_FAST_1BIT)
#ifdef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_1BIT_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_VAR_FAST_1BIT
#define DEFAULT_START_SEC_VAR_FAST_1BIT
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_VAR_FAST_1BIT)
#ifndef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_1BIT_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_VAR_FAST_1BIT
#define DEFAULT_STOP_SEC_VAR_FAST_1BIT
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_VAR_8BIT)
#ifdef VAR_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_8BIT_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_VAR_8BIT
#define DEFAULT_START_SEC_VAR_8BIT
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_VAR_8BIT)
#ifndef VAR_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_8BIT_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_VAR_8BIT
#define DEFAULT_STOP_SEC_VAR_8BIT
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_VAR_FAST_8BIT)
#ifdef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_8BIT_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_VAR_FAST_8BIT
#define DEFAULT_START_SEC_VAR_FAST_8BIT
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_VAR_FAST_8BIT)
#ifndef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_8BIT_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_VAR_FAST_8BIT
#define DEFAULT_STOP_SEC_VAR_FAST_8BIT
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_VAR_16BIT)
#ifdef VAR_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_16BIT_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_VAR_16BIT
#define DEFAULT_START_SEC_VAR_16BIT
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_VAR_16BIT)
#ifndef VAR_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_16BIT_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_VAR_16BIT
#define DEFAULT_STOP_SEC_VAR_16BIT
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_VAR_FAST_16BIT)
#ifdef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_16BIT_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_VAR_FAST_16BIT
#define DEFAULT_START_SEC_VAR_FAST_16BIT
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_VAR_FAST_16BIT)
#ifndef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_16BIT_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_VAR_FAST_16BIT
#define DEFAULT_STOP_SEC_VAR_FAST_16BIT
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_VAR_32BIT)
#ifdef VAR_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_32BIT_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_VAR_32BIT
#define DEFAULT_START_SEC_VAR_32BIT
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_VAR_32BIT)
#ifndef VAR_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_32BIT_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_VAR_32BIT
#define DEFAULT_STOP_SEC_VAR_32BIT
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_VAR_NOINIT_32BIT)
#ifdef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_32BIT_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_VAR_NOINIT_32BIT
#define DEFAULT_START_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_VAR_NOINIT_32BIT)
#ifndef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_32BIT_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_VAR_NOINIT_32BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_VAR_FAST_32BIT)
#ifdef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_32BIT_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_VAR_FAST_32BIT
#define DEFAULT_START_SEC_VAR_FAST_32BIT
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_VAR_FAST_32BIT)
#ifndef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_32BIT_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_VAR_FAST_32BIT
#define DEFAULT_STOP_SEC_VAR_FAST_32BIT
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_VAR_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_VAR_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_VAR_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_VAR_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_VAR_FAST_UNSPECIFIED)
#ifdef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_VAR_FAST_UNSPECIFIED)
#ifndef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifdef CONFIG_VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONFIG_VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sbss=".WDG23_A_CFG_RAM_UNSPECIFIED"
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifndef CONFIG_VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONFIG_VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs section sbss=default
#pragma ghs endsda
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_CONST_1BIT)
#ifdef CONST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_1BIT_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_CONST_1BIT
#define DEFAULT_START_SEC_CONST_1BIT
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_CONST_1BIT)
#ifndef CONST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_1BIT_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_CONST_1BIT
#define DEFAULT_STOP_SEC_CONST_1BIT
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_CONFIG_DATA_UNSPECIFIED)
#ifdef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_CONFIG_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".WDG23_A_CFG_DATA_UNSPECIFIED"
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_CONFIG_DATA_UNSPECIFIED)
#ifndef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_DBTOC_DATA_UNSPECIFIED)
#ifdef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_DBTOC_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".WDG23_A_CFG_DBTOC_UNSPECIFIED"
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_DBTOC_DATA_UNSPECIFIED)
#ifndef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_PUBLIC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_PUBLIC_CODE
#pragma ghs section text=".WDG23_A_PUBLIC_CODE_ROM"
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_PUBLIC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_PUBLIC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_PRIVATE_CODE)
#ifdef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PRIVATE_CODE_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_PRIVATE_CODE
#pragma ghs section text=".WDG23_A_PRIVATE_CODE_ROM"
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_PRIVATE_CODE)
#ifndef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PRIVATE_CODE_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_PRIVATE_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (WDG_23_DRIVERB_START_SEC_APPL_CODE)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef WDG_23_DRIVERB_START_SEC_APPL_CODE
#pragma ghs section text=".WDG23_A_APPL_CODE_ROM"
#endif
#elif defined (WDG_23_DRIVERB_STOP_SEC_APPL_CODE)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef APPL_CODE_SEC_STARTED
#undef WDG_23_DRIVERB_STOP_SEC_APPL_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/*----------------------------------------------
* COMM
----------------------------------------------*/
/*****************************CODE SECTIONS**********************/
#elif defined (COMM_START_SEC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef COMM_START_SEC_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (COMM_STOP_SEC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef COMM_STOP_SEC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (COMM_START_SEC_APPL_CODE)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef COMM_START_SEC_APPL_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (COMM_STOP_SEC_APPL_CODE)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef COMM_STOP_SEC_APPL_CODE
#undef APPL_CODE_SEC_STARTED
#define DEFAULT_STOP_SEC_CODE
#endif
/* CONST sections */
#elif defined (COMM_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef COMM_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (COMM_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef COMM_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (COMM_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef COMM_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (COMM_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef COMM_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (COMM_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef COMM_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (COMM_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef COMM_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (COMM_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef COMM_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (COMM_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef COMM_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/*****************Varible sections***************************/
/* VAR NOINIT sections */
#elif defined (COMM_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef COMM_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (COMM_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef COMM_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (COMM_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef COMM_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (COMM_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef COMM_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (COMM_START_SEC_VAR_NOINIT_32BIT)
#ifdef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_32BIT_SEC_STARTED
#undef COMM_START_SEC_VAR_NOINIT_32BIT
#define DEFAULT_START_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (COMM_STOP_SEC_VAR_NOINIT_32BIT)
#ifndef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_32BIT_SEC_STARTED
#undef COMM_STOP_SEC_VAR_NOINIT_32BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (COMM_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef COMM_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (COMM_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef COMM_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
/********************* VAR ZERO INIT sections*********** */
#elif defined (COMM_START_SEC_VAR_ZERO_INIT_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef COMM_START_SEC_VAR_ZERO_INIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (COMM_STOP_SEC_VAR_ZERO_INIT_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef COMM_STOP_SEC_VAR_ZERO_INIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
/* VAR NVRAM sections */
#elif defined (COMM_START_SEC_VAR_SAVED_ZONE0_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef COMM_START_SEC_VAR_SAVED_ZONE0_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (COMM_STOP_SEC_VAR_SAVED_ZONE0_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef COMM_STOP_SEC_VAR_SAVED_ZONE0_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
/* Postbuild CFG CONST sections */
/* Root pointer to postbuild data */
#elif defined (COMM_START_SEC_PBCFG_ROOT)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef COMM_START_SEC_PBCFG_ROOT
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (COMM_STOP_SEC_PBCFG_ROOT)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef COMM_STOP_SEC_PBCFG_ROOT
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/**********************************************************************************************************************
* COMM END
*********************************************************************************************************************/
/**********************************************************************************************************************
* CanSM START
*********************************************************************************************************************/
/******* CODE sections **********************************************************************************************/
#elif defined (CANSM_START_SEC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef CANSM_START_SEC_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (CANSM_STOP_SEC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef CANSM_STOP_SEC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (CANSM_START_SEC_APPL_CODE)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef CANSM_START_SEC_APPL_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (CANSM_STOP_SEC_APPL_CODE)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef CANSM_STOP_SEC_APPL_CODE
#undef APPL_CODE_SEC_STARTED
#define DEFAULT_STOP_SEC_CODE
#endif
/******* CONST sections ********************************************************************************************/
/* CONST sections */
#elif defined (CANSM_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef CANSM_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (CANSM_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef CANSM_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (CANSM_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef CANSM_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (CANSM_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef CANSM_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (CANSM_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef CANSM_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (CANSM_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef CANSM_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
/* FAST CONST sections */
/* Postbuild CFG CONST sections */
/* Root pointer to postbuild data */
#elif defined (CANSM_START_SEC_PBCFG_ROOT)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef CANSM_START_SEC_PBCFG_ROOT
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANSM_STOP_SEC_PBCFG_ROOT)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef CANSM_STOP_SEC_PBCFG_ROOT
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/* Root table for postbuild data */
#elif defined (CANSM_START_SEC_PBCFG)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef CANSM_START_SEC_PBCFG
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANSM_STOP_SEC_PBCFG)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef CANSM_STOP_SEC_PBCFG
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/*****************Varible sections***************************/
/* VAR NOINIT sections */
#elif defined (CANSM_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef CANSM_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (CANSM_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef CANSM_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (CANSM_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef CANSM_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (CANSM_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef CANSM_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
/********************* VAR ZERO INIT sections*********** */
#elif defined (CANSM_START_SEC_VAR_ZERO_INIT_8BIT)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef CANSM_START_SEC_VAR_ZERO_INIT_8BIT
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (CANSM_STOP_SEC_VAR_ZERO_INIT_8BIT)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef CANSM_STOP_SEC_VAR_ZERO_INIT_8BIT
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
/**********************************************************************************************************************
* CanSM END
*********************************************************************************************************************/
/***************************DCM***************************************************/
/******************code******************/
#elif defined (DCM_START_SEC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef DCM_START_SEC_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (DCM_STOP_SEC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef DCM_STOP_SEC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (DCM_APPL_START_SEC_CODE)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef DCM_APPL_START_SEC_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (DCM_APPL_STOP_SEC_CODE)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef APPL_CODE_SEC_STARTED
#undef DCM_APPL_STOP_SEC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/*****CONST************/
#elif defined (DCM_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef DCM_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (DCM_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef DCM_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (DCM_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef DCM_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (DCM_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef DCM_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (DCM_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef DCM_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (DCM_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef DCM_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (DCM_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef DCM_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (DCM_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef DCM_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/************NOINIT VARIBLE************/
#elif defined (DCM_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef DCM_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (DCM_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef DCM_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (DCM_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef DCM_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_FAST_16BIT
#endif
#elif defined (DCM_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef DCM_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_FAST_16BIT
#endif
#elif defined (DCM_START_SEC_VAR_NOINIT_32BIT)
#ifdef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_32BIT_SEC_STARTED
#undef DCM_START_SEC_VAR_NOINIT_32BIT
#define DEFAULT_START_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (DCM_STOP_SEC_VAR_NOINIT_32BIT)
#ifndef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_32BIT_SEC_STARTED
#undef DCM_STOP_SEC_VAR_NOINIT_32BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (DCM_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef DCM_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (DCM_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef DCM_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
/* vars saved in non volatile memory */
#elif defined (DEM_START_SEC_VAR_SAVED_ZONE0_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef DEM_START_SEC_VAR_SAVED_ZONE0_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (DEM_STOP_SEC_VAR_SAVED_ZONE0_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef DEM_STOP_SEC_VAR_SAVED_ZONE0_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
/** DEM ***************************************************************************/
/*****************************CODE SECTIONS**********************/
#elif defined (DEM_START_SEC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef DEM_START_SEC_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (DEM_STOP_SEC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef DEM_STOP_SEC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/* vars initialized by startup code */
#elif defined (DEM_START_SEC_VAR_8BIT)
#ifdef VAR_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_8BIT_SEC_STARTED
#undef DEM_START_SEC_VAR_8BIT
#define DEFAULT_START_SEC_VAR_8BIT
#endif
#elif defined (DEM_STOP_SEC_VAR_8BIT)
#ifndef VAR_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef DEM_STOP_SEC_VAR_8BIT
#undef VAR_8BIT_SEC_STARTED
#define DEFAULT_STOP_SEC_VAR_8BIT
#endif
#elif defined (DEM_START_SEC_VAR_32BIT)
#ifdef VAR_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_32BIT_SEC_STARTED
#undef DEM_START_SEC_VAR_32BIT
#define DEFAULT_START_SEC_VAR_32BIT
#endif
#elif defined (DEM_STOP_SEC_VAR_32BIT)
#ifndef VAR_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_32BIT_SEC_STARTED
#undef DEM_STOP_SEC_VAR_32BIT
#define DEFAULT_STOP_SEC_VAR_32BIT
#endif
/* never initialized vars with high number of accesses */
#elif defined (DEM_START_SEC_VAR_FAST_8BIT)
#ifdef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_8BIT_SEC_STARTED
#undef DEM_START_SEC_VAR_FAST_8BIT
#define DEFAULT_START_SEC_VAR_FAST_8BIT
#endif
#elif defined (DEM_STOP_SEC_VAR_FAST_8BIT)
#ifndef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_8BIT_SEC_STARTED
#undef DEM_STOP_SEC_VAR_FAST_8BIT
#define DEFAULT_STOP_SEC_VAR_FAST_8BIT
#endif
#elif defined (DEM_START_SEC_VAR_FAST_16BIT)
#ifdef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_16BIT_SEC_STARTED
#undef DEM_START_SEC_VAR_FAST_16BIT
#define DEFAULT_START_SEC_VAR_FAST_16BIT
#endif
#elif defined (DEM_STOP_SEC_VAR_FAST_16BIT)
#ifndef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_16BIT_SEC_STARTED
#undef DEM_STOP_SEC_VAR_FAST_16BIT
#define DEFAULT_STOP_SEC_VAR_FAST_16BIT
#endif
#elif defined (DEM_START_SEC_VAR_FAST_32BIT)
#ifdef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_32BIT_SEC_STARTED
#undef DEM_START_SEC_VAR_FAST_32BIT
#define DEFAULT_START_SEC_VAR_FAST_32BIT
#endif
#elif defined (DEM_STOP_SEC_VAR_FAST_32BIT)
#ifndef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_32BIT_SEC_STARTED
#undef DEM_STOP_SEC_VAR_FAST_32BIT
#define DEFAULT_STOP_SEC_VAR_FAST_32BIT
#endif
/* never initialized vars */
#elif defined (DEM_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef DEM_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (DEM_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef DEM_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (DEM_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef DEM_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (DEM_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef DEM_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (DEM_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef DEM_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (DEM_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef DEM_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_FAST_UNSPECIFIED
#endif
/* vars saved in non volatile memory */
#elif defined (DEM_START_SEC_VAR_SAVED_ZONE0_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef DEM_START_SEC_VAR_SAVED_ZONE0_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (DEM_STOP_SEC_VAR_SAVED_ZONE0_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef DEM_STOP_SEC_VAR_SAVED_ZONE0_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
/* global or static constants */
#elif defined (DEM_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef DEM_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (DEM_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef DEM_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (DEM_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef DEM_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (DEM_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef DEM_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (DEM_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef DEM_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (DEM_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef DEM_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/* global or static constants (linktime) */
#elif defined (DEM_START_SEC_CONST_LCFG)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef DEM_START_SEC_CONST_LCFG
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (DEM_STOP_SEC_CONST_LCFG)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef DEM_STOP_SEC_CONST_LCFG
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/* global or static constants (postbuild) */
#elif defined (DEM_START_SEC_PBCONST_ROOT)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef DEM_START_SEC_PBCONST_ROOT
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (DEM_STOP_SEC_PBCONST_ROOT)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef DEM_STOP_SEC_PBCONST_ROOT
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (DEM_START_SEC_PBCONST)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef DEM_START_SEC_PBCONST
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (DEM_STOP_SEC_PBCONST)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef DEM_STOP_SEC_PBCONST
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/** End of DEM *******************************************************************/
/*-------------------------------------------------------------------------------------------------------------------*/
/* CAN driver start MemMap.inc */
/*-------------------------------------------------------------------------------------------------------------------*/
/*---------------------------------- Code ---------------------------------------------------------------------------*/
#elif defined (CAN_START_SEC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef CAN_START_SEC_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (CAN_STOP_SEC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef CAN_STOP_SEC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (CAN_START_SEC_CODE_APPL)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef CAN_START_SEC_CODE_APPL
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (CAN_STOP_SEC_CODE_APPL)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef APPL_CODE_SEC_STARTED
#undef CAN_STOP_SEC_CODE_APPL
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (CAN_START_SEC_STATIC_CODE)
#ifdef STATIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define STATIC_CODE_SEC_STARTED
#undef CAN_START_SEC_STATIC_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (CAN_STOP_SEC_STATIC_CODE)
#ifndef STATIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef STATIC_CODE_SEC_STARTED
#undef CAN_STOP_SEC_STATIC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/*---------------------------------- Const --------------------------------------------------------------------------*/
#elif defined (CAN_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef CAN_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (CAN_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef CAN_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (CAN_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef CAN_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (CAN_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef CAN_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (CAN_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef CAN_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (CAN_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef CAN_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (CAN_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef CAN_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CAN_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef CAN_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CAN_START_SEC_PBCFG)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef CAN_START_SEC_PBCFG
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CAN_STOP_SEC_PBCFG)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef CAN_STOP_SEC_PBCFG
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CAN_START_SEC_PBCFG_ROOT)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef CAN_START_SEC_PBCFG_ROOT
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CAN_STOP_SEC_PBCFG_ROOT)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef CAN_STOP_SEC_PBCFG_ROOT
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/*---------------------------------- RAM ----------------------------------------------------------------------------*/
#elif defined (CAN_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef CAN_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (CAN_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef CAN_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
#elif defined (CAN_START_SEC_VAR_INIT_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef CAN_START_SEC_VAR_INIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (CAN_STOP_SEC_VAR_INIT_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef CAN_STOP_SEC_VAR_INIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
/*-------------------------------------------------------------------------------------------------------------------*/
/* End CAN driver end MemMap.inc */
/*-------------------------------------------------------------------------------------------------------------------*/
/**********************************************************************************************************************
* PDUR START
*********************************************************************************************************************/
/******* CODE sections **********************************************************************************************/
#elif defined (PDUR_START_SEC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef PDUR_START_SEC_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (PDUR_STOP_SEC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef PDUR_STOP_SEC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/******* CONST sections ********************************************************************************************/
/* CONST sections */
#elif defined (PDUR_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef PDUR_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (PDUR_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef PDUR_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (PDUR_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef PDUR_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (PDUR_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef PDUR_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (PDUR_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef PDUR_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (PDUR_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef PDUR_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (PDUR_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef PDUR_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (PDUR_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef PDUR_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/* Root table for postbuild data */
#elif defined (PDUR_START_SEC_PBCFG)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef PDUR_START_SEC_PBCFG
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (PDUR_STOP_SEC_PBCFG)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef PDUR_STOP_SEC_PBCFG
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (PDUR_START_SEC_PBCFG_ROOT)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef PDUR_START_SEC_PBCFG_ROOT
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (PDUR_STOP_SEC_PBCFG_ROOT)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef PDUR_STOP_SEC_PBCFG_ROOT
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/*****************Varible sections***************************/
/* VAR INIT sections */
#elif defined (PDUR_START_SEC_VAR_ZERO_INIT_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef PDUR_START_SEC_VAR_ZERO_INIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (PDUR_STOP_SEC_VAR_ZERO_INIT_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef PDUR_STOP_SEC_VAR_ZERO_INIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
/* VAR NOINIT sections */
#elif defined (PDUR_START_SEC_VAR_NOINIT_BOOLEAN)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef PDUR_START_SEC_VAR_NOINIT_BOOLEAN
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (PDUR_STOP_SEC_VAR_NOINIT_BOOLEAN)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef PDUR_STOP_SEC_VAR_NOINIT_BOOLEAN
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (PDUR_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef PDUR_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (PDUR_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef PDUR_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (PDUR_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef PDUR_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (PDUR_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef PDUR_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
/**********************************************************************************************************************
* PDUR END
*********************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------*/
/* CANIF */
/*-------------------------------------------------------------------------------------------------------------------*/
/* Code */
#elif defined (CANIF_START_SEC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef CANIF_START_SEC_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (CANIF_STOP_SEC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef CANIF_STOP_SEC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (CANIF_START_SEC_APPL_CODE)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef CANIF_START_SEC_APPL_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (CANIF_STOP_SEC_APPL_CODE)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef APPL_CODE_SEC_STARTED
#undef CANIF_STOP_SEC_APPL_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/*---------------------------------- Const --------------------------------------------------------------------------*/
#elif defined (CANIF_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef CANIF_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (CANIF_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef CANIF_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (CANIF_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef CANIF_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (CANIF_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef CANIF_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (CANIF_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef CANIF_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANIF_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef CANIF_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANIF_START_SEC_PBCFG)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef CANIF_START_SEC_PBCFG
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANIF_STOP_SEC_PBCFG)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef CANIF_STOP_SEC_PBCFG
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANIF_START_SEC_PBCFG_ROOT)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef CANIF_START_SEC_PBCFG_ROOT
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANIF_STOP_SEC_PBCFG_ROOT)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef CANIF_STOP_SEC_PBCFG_ROOT
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/* Var noinit unspecified */
#elif defined (CANIF_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef CANIF_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (CANIF_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef CANIF_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
/* Var zero init unspecified */
#elif defined (CANIF_START_SEC_VAR_ZERO_INIT_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef CANIF_START_SEC_VAR_ZERO_INIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (CANIF_STOP_SEC_VAR_ZERO_INIT_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef CANIF_STOP_SEC_VAR_ZERO_INIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
/* Var init unspecified */
#elif defined (CANIF_START_SEC_VAR_INIT_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef CANIF_START_SEC_VAR_INIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (CANIF_STOP_SEC_VAR_INIT_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef CANIF_STOP_SEC_VAR_INIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
/*-------------------------------------------------------------------------------------------------------------------*/
/* CANIF */
/*-------------------------------------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------*/
/* trcv */
/*-------------------------------------------------------------------------------------------------------------------*/
/*mapped to default code section*/
#elif defined (CANTRCV_30_TJA1145_START_SEC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef CANTRCV_30_TJA1145_START_SEC_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (CANTRCV_30_TJA1145_STOP_SEC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef CANTRCV_30_TJA1145_STOP_SEC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/*default const section */
#elif defined (CANTRCV_30_TJA1145_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef CANTRCV_30_TJA1145_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANTRCV_30_TJA1145_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef CANTRCV_30_TJA1145_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/* Var noinit unspecified */
#elif defined (CANTRCV_30_TJA1145_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef CANTRCV_30_TJA1145_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (CANTRCV_30_TJA1145_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef CANTRCV_30_TJA1145_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
#elif defined (CANTRCV_30_TJA1145_START_SEC_PBCFG)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef CANTRCV_30_TJA1145_START_SEC_PBCFG
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANTRCV_30_TJA1145_STOP_SEC_PBCFG)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef CANTRCV_30_TJA1145_STOP_SEC_PBCFG
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANTRCV_30_TJA1145_START_SEC_PBCFG_ROOT)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef CANTRCV_30_TJA1145_START_SEC_PBCFG_ROOT
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANTRCV_30_TJA1145_STOP_SEC_PBCFG_ROOT)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef CANTRCV_30_TJA1145_STOP_SEC_PBCFG_ROOT
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/**********************************************************************************************************************
* END OF cantrcv
*********************************************************************************************************************/
/**********************************************************************************************************************
* Com START
*********************************************************************************************************************/
/******* CODE sections **********************************************************************************************/
#elif defined (COM_START_SEC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef COM_START_SEC_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (COM_STOP_SEC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef COM_STOP_SEC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (COM_START_SEC_APPL_CODE)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef COM_START_SEC_APPL_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (COM_STOP_SEC_APPL_CODE)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef APPL_CODE_SEC_STARTED
#undef COM_STOP_SEC_APPL_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/*---------------------------------- Const --------------------------------------------------------------------------*/
#elif defined (COM_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef COM_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (COM_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef COM_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (COM_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef COM_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (COM_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef COM_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (COM_START_SEC_PBCFG)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef COM_START_SEC_PBCFG
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (COM_STOP_SEC_PBCFG)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef COM_STOP_SEC_PBCFG
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (COM_START_SEC_PBCFG_ROOT)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef COM_START_SEC_PBCFG_ROOT
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (COM_STOP_SEC_PBCFG_ROOT)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef COM_STOP_SEC_PBCFG_ROOT
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/******* VAR sections **********************************************************************************************/
/* Var INIT SECTIONS */
#elif defined (COM_START_SEC_VAR_INIT_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef COM_START_SEC_VAR_INIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (COM_STOP_SEC_VAR_INIT_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef COM_STOP_SEC_VAR_INIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
/* Var NOINIT SECTIONS*/
#elif defined (COM_START_SEC_VAR_NOINIT_BOOLEAN)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef COM_START_SEC_VAR_NOINIT_BOOLEAN
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (COM_STOP_SEC_VAR_NOINIT_BOOLEAN)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef COM_STOP_SEC_VAR_NOINIT_BOOLEAN
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (COM_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef COM_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (COM_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef COM_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (COM_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef COM_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (COM_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef COM_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (COM_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef COM_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (COM_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef COM_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
/**********************************************************************************************************************
* Com END
*********************************************************************************************************************/
/**********************************************************************************************************************
* CANNM START
*********************************************************************************************************************/
/******* CODE sections **********************************************************************************************/
#elif defined (CANNM_START_SEC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef CANNM_START_SEC_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (CANNM_STOP_SEC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef CANNM_STOP_SEC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/******* CONST sections ********************************************************************************************/
/* CONST sections */
#elif defined (CANNM_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef CANNM_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (CANNM_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef CANNM_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (CANNM_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef CANNM_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (CANNM_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef CANNM_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (CANNM_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef CANNM_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANNM_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef CANNM_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/* Postbuild CFG CONST sections */
#elif defined (CANNM_START_SEC_PBCFG)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef CANNM_START_SEC_PBCFG
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANNM_STOP_SEC_PBCFG)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef CANNM_STOP_SEC_PBCFG
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANNM_START_SEC_PBCFG_ROOT)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef CANNM_START_SEC_PBCFG_ROOT
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANNM_STOP_SEC_PBCFG_ROOT)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef CANNM_STOP_SEC_PBCFG_ROOT
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/*****************Varible sections***************************/
/* VAR NOINIT sections */
#elif defined (CANNM_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef CANNM_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (CANNM_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef CANNM_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (CANNM_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef CANNM_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (CANNM_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef CANNM_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
/* VAR FAST NOINIT sections */
#elif defined (CANNM_START_SEC_VAR_FAST_NOINIT_8BIT)
#ifdef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_8BIT_SEC_STARTED
#undef CANNM_START_SEC_VAR_FAST_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (CANNM_STOP_SEC_VAR_FAST_NOINIT_8BIT)
#ifndef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_8BIT_SEC_STARTED
#undef CANNM_STOP_SEC_VAR_FAST_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (CANNM_START_SEC_VAR_FAST_NOINIT_16BIT)
#ifdef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_16BIT_SEC_STARTED
#undef CANNM_START_SEC_VAR_FAST_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (CANNM_STOP_SEC_VAR_FAST_NOINIT_16BIT)
#ifndef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_16BIT_SEC_STARTED
#undef CANNM_STOP_SEC_VAR_FAST_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (CANNM_START_SEC_VAR_FAST_NOINIT_UNSPECIFIED)
#ifdef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef CANNM_START_SEC_VAR_FAST_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (CANNM_STOP_SEC_VAR_FAST_NOINIT_UNSPECIFIED)
#ifndef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef CANNM_STOP_SEC_VAR_FAST_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
/* VAR FAST ZERO INIT sections */
#elif defined (CANNM_START_SEC_VAR_FAST_ZERO_INIT_UNSPECIFIED)
#ifdef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef CANNM_START_SEC_VAR_FAST_ZERO_INIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (CANNM_STOP_SEC_VAR_FAST_ZERO_INIT_UNSPECIFIED)
#ifndef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef CANNM_STOP_SEC_VAR_FAST_ZERO_INIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
/**********************************************************************************************************************
* CANNM END
*********************************************************************************************************************/
/**********************************************************************************************************************
* CANTP START
*********************************************************************************************************************/
/******* CODE sections **********************************************************************************************/
#elif defined (CANTP_START_SEC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef CANTP_START_SEC_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (CANTP_STOP_SEC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef CANTP_STOP_SEC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/******************** CONST section **************************************************************/
#elif defined (CANTP_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef CANTP_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (CANTP_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef CANTP_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (CANTP_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef CANTP_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (CANTP_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef CANTP_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
/* Postbuild CFG CONST sections */
#elif defined (CANTP_START_SEC_CONST_PBCFG_ROOT)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef CANTP_START_SEC_CONST_PBCFG_ROOT
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANTP_STOP_SEC_CONST_PBCFG_ROOT)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef CANTP_STOP_SEC_CONST_PBCFG_ROOT
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANTP_START_SEC_PBCFG_ROOT)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef CANTP_START_SEC_PBCFG_ROOT
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANTP_STOP_SEC_PBCFG_ROOT)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef CANTP_STOP_SEC_PBCFG_ROOT
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANTP_START_SEC_CONST_PBCFG)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef CANTP_START_SEC_CONST_PBCFG
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (CANTP_STOP_SEC_CONST_PBCFG)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef CANTP_STOP_SEC_CONST_PBCFG
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/**************************************VAR SECTIONS********************************************************/
#elif defined (CANTP_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef CANTP_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (CANTP_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef CANTP_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (CANTP_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef CANTP_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (CANTP_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef CANTP_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (CANTP_START_SEC_VAR_INIT_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef CANTP_START_SEC_VAR_INIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_INIT_UNSPECIFIED
#endif
#elif defined (CANTP_STOP_SEC_VAR_INIT_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef CANTP_STOP_SEC_VAR_INIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_INIT_UNSPECIFIED
#endif
/**********************************************************************************************************************
* CANTP END
*********************************************************************************************************************/
/**********************************************************************************************************************
* NM START
*********************************************************************************************************************/
/******* CODE sections **********************************************************************************************/
#elif defined (NM_START_SEC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef NM_START_SEC_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (NM_STOP_SEC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef NM_STOP_SEC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/******* CONST sections ********************************************************************************************/
#elif defined (NM_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef NM_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (NM_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef NM_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (NM_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef NM_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (NM_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef NM_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (NM_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef NM_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (NM_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef NM_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/*****************Varible sections***************************/
/* VAR NOINIT sections */
#elif defined (NM_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef NM_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (NM_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef NM_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
/* VAR FAST NOINIT sections */
#elif defined (NM_START_SEC_VAR_FAST_NOINIT_8BIT)
#ifdef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_8BIT_SEC_STARTED
#undef NM_START_SEC_VAR_FAST_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (NM_STOP_SEC_VAR_FAST_NOINIT_8BIT)
#ifndef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_8BIT_SEC_STARTED
#undef NM_STOP_SEC_VAR_FAST_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (NM_START_SEC_VAR_FAST_NOINIT_16BIT)
#ifdef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_16BIT_SEC_STARTED
#undef NM_START_SEC_VAR_FAST_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (NM_STOP_SEC_VAR_FAST_NOINIT_16BIT)
#ifndef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_16BIT_SEC_STARTED
#undef NM_STOP_SEC_VAR_FAST_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (NM_START_SEC_VAR_FAST_NOINIT_UNSPECIFIED)
#ifdef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef NM_START_SEC_VAR_FAST_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (NM_STOP_SEC_VAR_FAST_NOINIT_UNSPECIFIED)
#ifndef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef NM_STOP_SEC_VAR_FAST_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
/* VAR FAST ZERO INIT sections */
#elif defined (NM_START_SEC_VAR_FAST_ZERO_INIT_UNSPECIFIED)
#ifdef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef NM_START_SEC_VAR_FAST_ZERO_INIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (NM_STOP_SEC_VAR_FAST_ZERO_INIT_UNSPECIFIED)
#ifndef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef NM_STOP_SEC_VAR_FAST_ZERO_INIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
/**********************************************************************************************************************
* NM END
*********************************************************************************************************************/
/**********************************************************************************************************************
* BSWM START
*********************************************************************************************************************/
/******* CODE sections **********************************************************************************************/
#elif defined (BSWM_START_SEC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef BSWM_START_SEC_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (BSWM_STOP_SEC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef BSWM_STOP_SEC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/******* CONST sections ********************************************************************************************/
#elif defined (BSWM_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef BSWM_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (BSWM_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef BSWM_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (BSWM_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef BSWM_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (BSWM_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef BSWM_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (BSWM_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef BSWM_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (BSWM_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef BSWM_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
/*****************Varible sections***************************/
/* VAR NOINIT sections */
#elif defined (BSWM_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef BSWM_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (BSWM_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef BSWM_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (BSWM_START_SEC_VAR_NOINIT_32BIT)
#ifdef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_32BIT_SEC_STARTED
#undef BSWM_START_SEC_VAR_NOINIT_32BIT
#define DEFAULT_START_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (BSWM_STOP_SEC_VAR_NOINIT_32BIT)
#ifndef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_32BIT_SEC_STARTED
#undef BSWM_STOP_SEC_VAR_NOINIT_32BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (BSWM_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef BSWM_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (BSWM_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef BSWM_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (BSWM_START_SEC_VAR_INIT_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef BSWM_START_SEC_VAR_INIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (BSWM_STOP_SEC_VAR_INIT_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef BSWM_STOP_SEC_VAR_INIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
/**********************************************************************************************************************
* BSWM END
*********************************************************************************************************************/
/**********************************************************************************************************************
* SYSSERVICE_ASRECUM START
*********************************************************************************************************************/
/******* CODE sections **********************************************************************************************/
#elif defined (ECUM_START_SEC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef ECUM_START_SEC_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (ECUM_STOP_SEC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef ECUM_STOP_SEC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (ECUM_START_SEC_CODE_SET_BOOT_TARGET)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef ECUM_START_SEC_CODE_SET_BOOT_TARGET
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (ECUM_STOP_SEC_CODE_SET_BOOT_TARGET)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef ECUM_STOP_SEC_CODE_SET_BOOT_TARGET
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (ECUM_START_SEC_CODE_GET_BOOT_TARGET)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef ECUM_START_SEC_CODE_GET_BOOT_TARGET
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (ECUM_STOP_SEC_CODE_GET_BOOT_TARGET)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef ECUM_STOP_SEC_CODE_GET_BOOT_TARGET
#define DEFAULT_STOP_SEC_CODE
#endif
/******* CONST sections ********************************************************************************************/
#elif defined (ECUM_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef ECUM_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (ECUM_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#undef CONST_8BIT_SEC_STARTED
#undef ECUM_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (ECUM_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef ECUM_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (ECUM_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef ECUM_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/* Root table for postbuild data */
#elif defined (ECUM_START_SEC_CONST_PBCFG_ROOT)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef ECUM_START_SEC_CONST_PBCFG_ROOT
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (ECUM_STOP_SEC_CONST_PBCFG_ROOT)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef ECUM_STOP_SEC_CONST_PBCFG_ROOT
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (ECUM_START_SEC_CONST_PBCFG)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef ECUM_START_SEC_CONST_PBCFG
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (ECUM_STOP_SEC_CONST_PBCFG)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef ECUM_STOP_SEC_CONST_PBCFG
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/*****************Varible sections***************************/
/* VAR INIT sections */
#elif defined (ECUM_START_SEC_VAR_INIT_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef ECUM_START_SEC_VAR_INIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (ECUM_STOP_SEC_VAR_INIT_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef ECUM_STOP_SEC_VAR_INIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
/* VAR NOINIT sections */
#elif defined (ECUM_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef ECUM_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (ECUM_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef ECUM_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (ECUM_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef ECUM_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (ECUM_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef ECUM_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (ECUM_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef ECUM_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (ECUM_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef ECUM_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
/**********************************************************************************************************************
* SYSSERVICE_ASRECUM END
*********************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------*/
/* VStdLib start MemMap.inc */
/*-------------------------------------------------------------------------------------------------------------------*/
/*---------------------------------- Code ---------------------------------------------------------------------------*/
#elif defined (VSTDLIB_START_SEC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef VSTDLIB_START_SEC_CODE
#define DEFAULT_START_SEC_CODE
#endif
#elif defined (VSTDLIB_STOP_SEC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef VSTDLIB_STOP_SEC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/******* CONST sections ********************************************************************************************/
#elif defined (VSTDLIB_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef VSTDLIB_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (VSTDLIB_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef VSTDLIB_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
/*---------------------------------- RAM ----------------------------------------------------------------------------*/
#elif defined (VSTDLIB_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef VSTDLIB_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (VSTDLIB_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef VSTDLIB_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
/*-------------------------------------------------------------------------------------------------------------------*/
/* VStdLib end MemMap.inc */
/*-------------------------------------------------------------------------------------------------------------------*/
/* -------------------------------------------------------------------------- */
/* PORT */
/* -------------------------------------------------------------------------- */
#elif defined (PORT_START_SEC_VAR_1BIT)
#ifdef VAR_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_1BIT_SEC_STARTED
#undef PORT_START_SEC_VAR_1BIT
#define DEFAULT_START_SEC_VAR_1BIT
#endif
#elif defined (PORT_STOP_SEC_VAR_1BIT)
#ifndef VAR_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_1BIT_SEC_STARTED
#undef PORT_STOP_SEC_VAR_1BIT
#define DEFAULT_STOP_SEC_VAR_1BIT
#endif
#elif defined (PORT_START_SEC_VAR_NOINIT_1BIT)
#ifdef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_1BIT_SEC_STARTED
#undef PORT_START_SEC_VAR_NOINIT_1BIT
#define DEFAULT_START_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (PORT_STOP_SEC_VAR_NOINIT_1BIT)
#ifndef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_1BIT_SEC_STARTED
#undef PORT_STOP_SEC_VAR_NOINIT_1BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (PORT_START_SEC_VAR_FAST_1BIT)
#ifdef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_1BIT_SEC_STARTED
#undef PORT_START_SEC_VAR_FAST_1BIT
#define DEFAULT_START_SEC_VAR_FAST_1BIT
#endif
#elif defined (PORT_STOP_SEC_VAR_FAST_1BIT)
#ifndef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_1BIT_SEC_STARTED
#undef PORT_STOP_SEC_VAR_FAST_1BIT
#define DEFAULT_STOP_SEC_VAR_FAST_1BIT
#endif
#elif defined (PORT_START_SEC_VAR_8BIT)
#ifdef VAR_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_8BIT_SEC_STARTED
#undef PORT_START_SEC_VAR_8BIT
#define DEFAULT_START_SEC_VAR_8BIT
#endif
#elif defined (PORT_STOP_SEC_VAR_8BIT)
#ifndef VAR_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_8BIT_SEC_STARTED
#undef PORT_STOP_SEC_VAR_8BIT
#define DEFAULT_STOP_SEC_VAR_8BIT
#endif
#elif defined (PORT_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef PORT_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (PORT_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef PORT_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (PORT_START_SEC_VAR_FAST_8BIT)
#ifdef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_8BIT_SEC_STARTED
#undef PORT_START_SEC_VAR_FAST_8BIT
#define DEFAULT_START_SEC_VAR_FAST_8BIT
#endif
#elif defined (PORT_STOP_SEC_VAR_FAST_8BIT)
#ifndef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_8BIT_SEC_STARTED
#undef PORT_STOP_SEC_VAR_FAST_8BIT
#define DEFAULT_STOP_SEC_VAR_FAST_8BIT
#endif
#elif defined (PORT_START_SEC_VAR_16BIT)
#ifdef VAR_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_16BIT_SEC_STARTED
#undef PORT_START_SEC_VAR_16BIT
#define DEFAULT_START_SEC_VAR_16BIT
#endif
#elif defined (PORT_STOP_SEC_VAR_16BIT)
#ifndef VAR_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_16BIT_SEC_STARTED
#undef PORT_STOP_SEC_VAR_16BIT
#define DEFAULT_STOP_SEC_VAR_16BIT
#endif
#elif defined (PORT_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef PORT_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (PORT_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef PORT_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (PORT_START_SEC_VAR_FAST_16BIT)
#ifdef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_16BIT_SEC_STARTED
#undef PORT_START_SEC_VAR_FAST_16BIT
#define DEFAULT_START_SEC_VAR_FAST_16BIT
#endif
#elif defined (PORT_STOP_SEC_VAR_FAST_16BIT)
#ifndef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_16BIT_SEC_STARTED
#undef PORT_STOP_SEC_VAR_FAST_16BIT
#define DEFAULT_STOP_SEC_VAR_FAST_16BIT
#endif
#elif defined (PORT_START_SEC_VAR_32BIT)
#ifdef VAR_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_32BIT_SEC_STARTED
#undef PORT_START_SEC_VAR_32BIT
#define DEFAULT_START_SEC_VAR_32BIT
#endif
#elif defined (PORT_STOP_SEC_VAR_32BIT)
#ifndef VAR_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_32BIT_SEC_STARTED
#undef PORT_STOP_SEC_VAR_32BIT
#define DEFAULT_STOP_SEC_VAR_32BIT
#endif
#elif defined (PORT_START_SEC_VAR_NOINIT_32BIT)
#ifdef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_32BIT_SEC_STARTED
#undef PORT_START_SEC_VAR_NOINIT_32BIT
#define DEFAULT_START_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (PORT_STOP_SEC_VAR_NOINIT_32BIT)
#ifndef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_32BIT_SEC_STARTED
#undef PORT_STOP_SEC_VAR_NOINIT_32BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (PORT_START_SEC_VAR_FAST_32BIT)
#ifdef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_32BIT_SEC_STARTED
#undef PORT_START_SEC_VAR_FAST_32BIT
#define DEFAULT_START_SEC_VAR_FAST_32BIT
#endif
#elif defined (PORT_STOP_SEC_VAR_FAST_32BIT)
#ifndef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_32BIT_SEC_STARTED
#undef PORT_STOP_SEC_VAR_FAST_32BIT
#define DEFAULT_STOP_SEC_VAR_FAST_32BIT
#endif
#elif defined (PORT_START_SEC_VAR_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef PORT_START_SEC_VAR_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (PORT_STOP_SEC_VAR_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef PORT_STOP_SEC_VAR_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
#elif defined (PORT_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef PORT_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (PORT_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef PORT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (PORT_START_SEC_VAR_FAST_UNSPECIFIED)
#ifdef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef PORT_START_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (PORT_STOP_SEC_VAR_FAST_UNSPECIFIED)
#ifndef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef PORT_STOP_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (PORT_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef PORT_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sbss=".PORT_CFG_RAM_UNSPECIFIED"
#endif
#elif defined (PORT_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef PORT_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs section sbss=default
#pragma ghs endsda
#endif
#elif defined (PORT_START_SEC_CONST_1BIT)
#ifdef CONST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_1BIT_SEC_STARTED
#undef PORT_START_SEC_CONST_1BIT
#define DEFAULT_START_SEC_CONST_1BIT
#endif
#elif defined (PORT_STOP_SEC_CONST_1BIT)
#ifndef CONST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_1BIT_SEC_STARTED
#undef PORT_STOP_SEC_CONST_1BIT
#define DEFAULT_STOP_SEC_CONST_1BIT
#endif
#elif defined (PORT_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef PORT_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (PORT_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef PORT_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (PORT_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef PORT_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (PORT_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef PORT_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (PORT_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef PORT_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (PORT_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef PORT_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (PORT_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef PORT_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (PORT_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef PORT_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (PORT_START_SEC_CONFIG_DATA_UNSPECIFIED)
#ifdef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef PORT_START_SEC_CONFIG_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".PORT_CFG_DATA_UNSPECIFIED"
#endif
#elif defined (PORT_STOP_SEC_CONFIG_DATA_UNSPECIFIED)
#ifndef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef PORT_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (PORT_START_SEC_DBTOC_DATA_UNSPECIFIED)
#ifdef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef PORT_START_SEC_DBTOC_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".PORT_CFG_DBTOC_UNSPECIFIED"
#endif
#elif defined (PORT_STOP_SEC_DBTOC_DATA_UNSPECIFIED)
#ifndef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef PORT_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (PORT_START_SEC_PUBLIC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef PORT_START_SEC_PUBLIC_CODE
#pragma ghs section text=".PORT_PUBLIC_CODE_ROM"
#endif
#elif defined (PORT_STOP_SEC_PUBLIC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef PORT_STOP_SEC_PUBLIC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (PORT_START_SEC_PRIVATE_CODE)
#ifdef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PRIVATE_CODE_SEC_STARTED
#undef PORT_START_SEC_PRIVATE_CODE
#pragma ghs section text=".PORT_PRIVATE_CODE_ROM"
#endif
#elif defined (PORT_STOP_SEC_PRIVATE_CODE)
#ifndef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PRIVATE_CODE_SEC_STARTED
#undef PORT_STOP_SEC_PRIVATE_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (PORT_START_SEC_APPL_CODE)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef PORT_START_SEC_APPL_CODE
#pragma ghs section text=".PORT_APPL_CODE_ROM"
#endif
#elif defined (PORT_STOP_SEC_APPL_CODE)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef APPL_CODE_SEC_STARTED
#undef PORT_STOP_SEC_APPL_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/* -------------------------------------------------------------------------- */
/* DIO */
/* -------------------------------------------------------------------------- */
#elif defined (DIO_START_SEC_VAR_1BIT)
#ifdef VAR_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_1BIT_SEC_STARTED
#undef DIO_START_SEC_VAR_1BIT
#define DEFAULT_START_SEC_VAR_1BIT
#endif
#elif defined (DIO_STOP_SEC_VAR_1BIT)
#ifndef VAR_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_1BIT_SEC_STARTED
#undef DIO_STOP_SEC_VAR_1BIT
#define DEFAULT_STOP_SEC_VAR_1BIT
#endif
#elif defined (DIO_START_SEC_VAR_NOINIT_1BIT)
#ifdef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_1BIT_SEC_STARTED
#undef DIO_START_SEC_VAR_NOINIT_1BIT
#define DEFAULT_START_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (DIO_STOP_SEC_VAR_NOINIT_1BIT)
#ifndef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_1BIT_SEC_STARTED
#undef DIO_STOP_SEC_VAR_NOINIT_1BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (DIO_START_SEC_VAR_FAST_1BIT)
#ifdef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_1BIT_SEC_STARTED
#undef DIO_START_SEC_VAR_FAST_1BIT
#define DEFAULT_START_SEC_VAR_FAST_1BIT
#endif
#elif defined (DIO_STOP_SEC_VAR_FAST_1BIT)
#ifndef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_1BIT_SEC_STARTED
#undef DIO_STOP_SEC_VAR_FAST_1BIT
#define DEFAULT_STOP_SEC_VAR_FAST_1BIT
#endif
#elif defined (DIO_START_SEC_VAR_8BIT)
#ifdef VAR_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_8BIT_SEC_STARTED
#undef DIO_START_SEC_VAR_8BIT
#define DEFAULT_START_SEC_VAR_8BIT
#endif
#elif defined (DIO_STOP_SEC_VAR_8BIT)
#ifndef VAR_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_8BIT_SEC_STARTED
#undef DIO_STOP_SEC_VAR_8BIT
#define DEFAULT_STOP_SEC_VAR_8BIT
#endif
#elif defined (DIO_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef DIO_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (DIO_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef DIO_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (DIO_START_SEC_VAR_FAST_8BIT)
#ifdef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_8BIT_SEC_STARTED
#undef DIO_START_SEC_VAR_FAST_8BIT
#define DEFAULT_START_SEC_VAR_FAST_8BIT
#endif
#elif defined (DIO_STOP_SEC_VAR_FAST_8BIT)
#ifndef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_8BIT_SEC_STARTED
#undef DIO_STOP_SEC_VAR_FAST_8BIT
#define DEFAULT_STOP_SEC_VAR_FAST_8BIT
#endif
#elif defined (DIO_START_SEC_VAR_16BIT)
#ifdef VAR_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_16BIT_SEC_STARTED
#undef DIO_START_SEC_VAR_16BIT
#define DEFAULT_START_SEC_VAR_16BIT
#endif
#elif defined (DIO_STOP_SEC_VAR_16BIT)
#ifndef VAR_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_16BIT_SEC_STARTED
#undef DIO_STOP_SEC_VAR_16BIT
#define DEFAULT_STOP_SEC_VAR_16BIT
#endif
#elif defined (DIO_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef DIO_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (DIO_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef DIO_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (DIO_START_SEC_VAR_FAST_16BIT)
#ifdef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_16BIT_SEC_STARTED
#undef DIO_START_SEC_VAR_FAST_16BIT
#define DEFAULT_START_SEC_VAR_FAST_16BIT
#endif
#elif defined (DIO_STOP_SEC_VAR_FAST_16BIT)
#ifndef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_16BIT_SEC_STARTED
#undef DIO_STOP_SEC_VAR_FAST_16BIT
#define DEFAULT_STOP_SEC_VAR_FAST_16BIT
#endif
#elif defined (DIO_START_SEC_VAR_32BIT)
#ifdef VAR_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_32BIT_SEC_STARTED
#undef DIO_START_SEC_VAR_32BIT
#define DEFAULT_START_SEC_VAR_32BIT
#endif
#elif defined (DIO_STOP_SEC_VAR_32BIT)
#ifndef VAR_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_32BIT_SEC_STARTED
#undef DIO_STOP_SEC_VAR_32BIT
#define DEFAULT_STOP_SEC_VAR_32BIT
#endif
#elif defined (DIO_START_SEC_VAR_NOINIT_32BIT)
#ifdef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_32BIT_SEC_STARTED
#undef DIO_START_SEC_VAR_NOINIT_32BIT
#define DEFAULT_START_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (DIO_STOP_SEC_VAR_NOINIT_32BIT)
#ifndef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_32BIT_SEC_STARTED
#undef DIO_STOP_SEC_VAR_NOINIT_32BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (DIO_START_SEC_VAR_FAST_32BIT)
#ifdef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_32BIT_SEC_STARTED
#undef DIO_START_SEC_VAR_FAST_32BIT
#define DEFAULT_START_SEC_VAR_FAST_32BIT
#endif
#elif defined (DIO_STOP_SEC_VAR_FAST_32BIT)
#ifndef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_32BIT_SEC_STARTED
#undef DIO_STOP_SEC_VAR_FAST_32BIT
#define DEFAULT_STOP_SEC_VAR_FAST_32BIT
#endif
#elif defined (DIO_START_SEC_VAR_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef DIO_START_SEC_VAR_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (DIO_STOP_SEC_VAR_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef DIO_STOP_SEC_VAR_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
#elif defined (DIO_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef DIO_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (DIO_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef DIO_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (DIO_START_SEC_VAR_FAST_UNSPECIFIED)
#ifdef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef DIO_START_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (DIO_STOP_SEC_VAR_FAST_UNSPECIFIED)
#ifndef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef DIO_STOP_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (DIO_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef DIO_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sbss=".DIO_CFG_RAM_UNSPECIFIED"
#endif
#elif defined (DIO_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef DIO_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs section sbss=default
#pragma ghs endsda
#endif
#elif defined (DIO_START_SEC_CONST_1BIT)
#ifdef CONST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_1BIT_SEC_STARTED
#undef DIO_START_SEC_CONST_1BIT
#define DEFAULT_START_SEC_CONST_1BIT
#endif
#elif defined (DIO_STOP_SEC_CONST_1BIT)
#ifndef CONST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_1BIT_SEC_STARTED
#undef DIO_STOP_SEC_CONST_1BIT
#define DEFAULT_STOP_SEC_CONST_1BIT
#endif
#elif defined (DIO_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef DIO_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (DIO_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef DIO_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (DIO_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef DIO_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (DIO_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef DIO_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (DIO_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef DIO_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (DIO_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef DIO_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (DIO_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef DIO_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (DIO_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef DIO_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (DIO_START_SEC_CONFIG_DATA_UNSPECIFIED)
#ifdef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef DIO_START_SEC_CONFIG_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".DIO_CFG_DATA_UNSPECIFIED"
#endif
#elif defined (DIO_STOP_SEC_CONFIG_DATA_UNSPECIFIED)
#ifndef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef DIO_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (DIO_START_SEC_DBTOC_DATA_UNSPECIFIED)
#ifdef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef DIO_START_SEC_DBTOC_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".DIO_CFG_DBTOC_UNSPECIFIED"
#endif
#elif defined (DIO_STOP_SEC_DBTOC_DATA_UNSPECIFIED)
#ifndef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef DIO_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (DIO_START_SEC_PUBLIC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef DIO_START_SEC_PUBLIC_CODE
#pragma ghs section text=".DIO_PUBLIC_CODE_ROM"
#endif
#elif defined (DIO_STOP_SEC_PUBLIC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef DIO_STOP_SEC_PUBLIC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (DIO_START_SEC_PRIVATE_CODE)
#ifdef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PRIVATE_CODE_SEC_STARTED
#undef DIO_START_SEC_PRIVATE_CODE
#pragma ghs section text=".DIO_PRIVATE_CODE_ROM"
#endif
#elif defined (DIO_STOP_SEC_PRIVATE_CODE)
#ifndef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PRIVATE_CODE_SEC_STARTED
#undef DIO_STOP_SEC_PRIVATE_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (DIO_START_SEC_APPL_CODE)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef DIO_START_SEC_APPL_CODE
#pragma ghs section text=".DIO_APPL_CODE_ROM"
#endif
#elif defined (DIO_STOP_SEC_APPL_CODE)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef APPL_CODE_SEC_STARTED
#undef DIO_STOP_SEC_APPL_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/* -------------------------------------------------------------------------- */
/* PWM */
/* -------------------------------------------------------------------------- */
#elif defined (PWM_START_SEC_VAR_1BIT)
#ifdef VAR_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_1BIT_SEC_STARTED
#undef PWM_START_SEC_VAR_1BIT
#define DEFAULT_START_SEC_VAR_1BIT
#endif
#elif defined (PWM_STOP_SEC_VAR_1BIT)
#ifndef VAR_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_1BIT_SEC_STARTED
#undef PWM_STOP_SEC_VAR_1BIT
#define DEFAULT_STOP_SEC_VAR_1BIT
#endif
#elif defined (PWM_START_SEC_VAR_NOINIT_1BIT)
#ifdef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_1BIT_SEC_STARTED
#undef PWM_START_SEC_VAR_NOINIT_1BIT
#define DEFAULT_START_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (PWM_STOP_SEC_VAR_NOINIT_1BIT)
#ifndef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_1BIT_SEC_STARTED
#undef PWM_STOP_SEC_VAR_NOINIT_1BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (PWM_START_SEC_VAR_FAST_1BIT)
#ifdef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_1BIT_SEC_STARTED
#undef PWM_START_SEC_VAR_FAST_1BIT
#define DEFAULT_START_SEC_VAR_FAST_1BIT
#endif
#elif defined (PWM_STOP_SEC_VAR_FAST_1BIT)
#ifndef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_1BIT_SEC_STARTED
#undef PWM_STOP_SEC_VAR_FAST_1BIT
#define DEFAULT_STOP_SEC_VAR_FAST_1BIT
#endif
#elif defined (PWM_START_SEC_VAR_8BIT)
#ifdef VAR_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_8BIT_SEC_STARTED
#undef PWM_START_SEC_VAR_8BIT
#define DEFAULT_START_SEC_VAR_8BIT
#endif
#elif defined (PWM_STOP_SEC_VAR_8BIT)
#ifndef VAR_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_8BIT_SEC_STARTED
#undef PWM_STOP_SEC_VAR_8BIT
#define DEFAULT_STOP_SEC_VAR_8BIT
#endif
#elif defined (PWM_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef PWM_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (PWM_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef PWM_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (PWM_START_SEC_VAR_FAST_8BIT)
#ifdef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_8BIT_SEC_STARTED
#undef PWM_START_SEC_VAR_FAST_8BIT
#define DEFAULT_START_SEC_VAR_FAST_8BIT
#endif
#elif defined (PWM_STOP_SEC_VAR_FAST_8BIT)
#ifndef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_8BIT_SEC_STARTED
#undef PWM_STOP_SEC_VAR_FAST_8BIT
#define DEFAULT_STOP_SEC_VAR_FAST_8BIT
#endif
#elif defined (PWM_START_SEC_VAR_16BIT)
#ifdef VAR_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_16BIT_SEC_STARTED
#undef PWM_START_SEC_VAR_16BIT
#define DEFAULT_START_SEC_VAR_16BIT
#endif
#elif defined (PWM_STOP_SEC_VAR_16BIT)
#ifndef VAR_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_16BIT_SEC_STARTED
#undef PWM_STOP_SEC_VAR_16BIT
#define DEFAULT_STOP_SEC_VAR_16BIT
#endif
#elif defined (PWM_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef PWM_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (PWM_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef PWM_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (PWM_START_SEC_VAR_FAST_16BIT)
#ifdef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_16BIT_SEC_STARTED
#undef PWM_START_SEC_VAR_FAST_16BIT
#define DEFAULT_START_SEC_VAR_FAST_16BIT
#endif
#elif defined (PWM_STOP_SEC_VAR_FAST_16BIT)
#ifndef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_16BIT_SEC_STARTED
#undef PWM_STOP_SEC_VAR_FAST_16BIT
#define DEFAULT_STOP_SEC_VAR_FAST_16BIT
#endif
#elif defined (PWM_START_SEC_VAR_32BIT)
#ifdef VAR_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_32BIT_SEC_STARTED
#undef PWM_START_SEC_VAR_32BIT
#define DEFAULT_START_SEC_VAR_32BIT
#endif
#elif defined (PWM_STOP_SEC_VAR_32BIT)
#ifndef VAR_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_32BIT_SEC_STARTED
#undef PWM_STOP_SEC_VAR_32BIT
#define DEFAULT_STOP_SEC_VAR_32BIT
#endif
#elif defined (PWM_START_SEC_VAR_NOINIT_32BIT)
#ifdef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_32BIT_SEC_STARTED
#undef PWM_START_SEC_VAR_NOINIT_32BIT
#define DEFAULT_START_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (PWM_STOP_SEC_VAR_NOINIT_32BIT)
#ifndef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_32BIT_SEC_STARTED
#undef PWM_STOP_SEC_VAR_NOINIT_32BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (PWM_START_SEC_VAR_FAST_32BIT)
#ifdef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_32BIT_SEC_STARTED
#undef PWM_START_SEC_VAR_FAST_32BIT
#define DEFAULT_START_SEC_VAR_FAST_32BIT
#endif
#elif defined (PWM_STOP_SEC_VAR_FAST_32BIT)
#ifndef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_32BIT_SEC_STARTED
#undef PWM_STOP_SEC_VAR_FAST_32BIT
#define DEFAULT_STOP_SEC_VAR_FAST_32BIT
#endif
#elif defined (PWM_START_SEC_VAR_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef PWM_START_SEC_VAR_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (PWM_STOP_SEC_VAR_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef PWM_STOP_SEC_VAR_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
#elif defined (PWM_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef PWM_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (PWM_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef PWM_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (PWM_START_SEC_VAR_FAST_UNSPECIFIED)
#ifdef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef PWM_START_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (PWM_STOP_SEC_VAR_FAST_UNSPECIFIED)
#ifndef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef PWM_STOP_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (PWM_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef PWM_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sbss=".PWM_CFG_RAM_UNSPECIFIED"
#endif
#elif defined (PWM_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef PWM_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs section sbss=default
#pragma ghs endsda
#endif
#elif defined (PWM_START_SEC_CONST_1BIT)
#ifdef CONST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_1BIT_SEC_STARTED
#undef PWM_START_SEC_CONST_1BIT
#define DEFAULT_START_SEC_CONST_1BIT
#endif
#elif defined (PWM_STOP_SEC_CONST_1BIT)
#ifndef CONST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_1BIT_SEC_STARTED
#undef PWM_STOP_SEC_CONST_1BIT
#define DEFAULT_STOP_SEC_CONST_1BIT
#endif
#elif defined (PWM_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef PWM_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (PWM_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef PWM_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (PWM_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef PWM_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (PWM_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef PWM_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (PWM_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef PWM_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (PWM_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef PWM_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (PWM_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef PWM_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (PWM_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef PWM_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (PWM_START_SEC_CONFIG_DATA_UNSPECIFIED)
#ifdef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef PWM_START_SEC_CONFIG_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".PWM_CFG_DATA_UNSPECIFIED"
#endif
#elif defined (PWM_STOP_SEC_CONFIG_DATA_UNSPECIFIED)
#ifndef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef PWM_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (PWM_START_SEC_DBTOC_DATA_UNSPECIFIED)
#ifdef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef PWM_START_SEC_DBTOC_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".PWM_CFG_DBTOC_UNSPECIFIED"
#endif
#elif defined (PWM_STOP_SEC_DBTOC_DATA_UNSPECIFIED)
#ifndef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef PWM_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (PWM_START_SEC_PUBLIC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef PWM_START_SEC_PUBLIC_CODE
#pragma ghs section text=".PWM_PUBLIC_CODE_ROM"
#endif
#elif defined (PWM_STOP_SEC_PUBLIC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef PWM_STOP_SEC_PUBLIC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (PWM_START_SEC_PRIVATE_CODE)
#ifdef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PRIVATE_CODE_SEC_STARTED
#undef PWM_START_SEC_PRIVATE_CODE
#pragma ghs section text=".PWM_PRIVATE_CODE_ROM"
#endif
#elif defined (PWM_STOP_SEC_PRIVATE_CODE)
#ifndef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PRIVATE_CODE_SEC_STARTED
#undef PWM_STOP_SEC_PRIVATE_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (PWM_START_SEC_APPL_CODE)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef PWM_START_SEC_APPL_CODE
#pragma ghs section text=".PWM_APPL_CODE_ROM"
#endif
#elif defined (PWM_STOP_SEC_APPL_CODE)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef APPL_CODE_SEC_STARTED
#undef PWM_STOP_SEC_APPL_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/* -------------------------------------------------------------------------- */
/* SPI */
/* -------------------------------------------------------------------------- */
#elif defined (SPI_START_SEC_VAR_1BIT)
#ifdef VAR_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_1BIT_SEC_STARTED
#undef SPI_START_SEC_VAR_1BIT
#define DEFAULT_START_SEC_VAR_1BIT
#endif
#elif defined (SPI_STOP_SEC_VAR_1BIT)
#ifndef VAR_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_1BIT_SEC_STARTED
#undef SPI_STOP_SEC_VAR_1BIT
#define DEFAULT_STOP_SEC_VAR_1BIT
#endif
#elif defined (SPI_START_SEC_VAR_NOINIT_1BIT)
#ifdef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_1BIT_SEC_STARTED
#undef SPI_START_SEC_VAR_NOINIT_1BIT
#define DEFAULT_START_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (SPI_STOP_SEC_VAR_NOINIT_1BIT)
#ifndef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_1BIT_SEC_STARTED
#undef SPI_STOP_SEC_VAR_NOINIT_1BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (SPI_START_SEC_VAR_FAST_1BIT)
#ifdef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_1BIT_SEC_STARTED
#undef SPI_START_SEC_VAR_FAST_1BIT
#define DEFAULT_START_SEC_VAR_FAST_1BIT
#endif
#elif defined (SPI_STOP_SEC_VAR_FAST_1BIT)
#ifndef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_1BIT_SEC_STARTED
#undef SPI_STOP_SEC_VAR_FAST_1BIT
#define DEFAULT_STOP_SEC_VAR_FAST_1BIT
#endif
#elif defined (SPI_START_SEC_VAR_8BIT)
#ifdef VAR_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_8BIT_SEC_STARTED
#undef SPI_START_SEC_VAR_8BIT
#define DEFAULT_START_SEC_VAR_8BIT
#endif
#elif defined (SPI_STOP_SEC_VAR_8BIT)
#ifndef VAR_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_8BIT_SEC_STARTED
#undef SPI_STOP_SEC_VAR_8BIT
#define DEFAULT_STOP_SEC_VAR_8BIT
#endif
#elif defined (SPI_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef SPI_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (SPI_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef SPI_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (SPI_START_SEC_VAR_FAST_8BIT)
#ifdef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_8BIT_SEC_STARTED
#undef SPI_START_SEC_VAR_FAST_8BIT
#define DEFAULT_START_SEC_VAR_FAST_8BIT
#endif
#elif defined (SPI_STOP_SEC_VAR_FAST_8BIT)
#ifndef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_8BIT_SEC_STARTED
#undef SPI_STOP_SEC_VAR_FAST_8BIT
#define DEFAULT_STOP_SEC_VAR_FAST_8BIT
#endif
#elif defined (SPI_START_SEC_VAR_16BIT)
#ifdef VAR_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_16BIT_SEC_STARTED
#undef SPI_START_SEC_VAR_16BIT
#define DEFAULT_START_SEC_VAR_16BIT
#endif
#elif defined (SPI_STOP_SEC_VAR_16BIT)
#ifndef VAR_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_16BIT_SEC_STARTED
#undef SPI_STOP_SEC_VAR_16BIT
#define DEFAULT_STOP_SEC_VAR_16BIT
#endif
#elif defined (SPI_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef SPI_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (SPI_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef SPI_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (SPI_START_SEC_VAR_FAST_16BIT)
#ifdef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_16BIT_SEC_STARTED
#undef SPI_START_SEC_VAR_FAST_16BIT
#define DEFAULT_START_SEC_VAR_FAST_16BIT
#endif
#elif defined (SPI_STOP_SEC_VAR_FAST_16BIT)
#ifndef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_16BIT_SEC_STARTED
#undef SPI_STOP_SEC_VAR_FAST_16BIT
#define DEFAULT_STOP_SEC_VAR_FAST_16BIT
#endif
#elif defined (SPI_START_SEC_VAR_32BIT)
#ifdef VAR_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_32BIT_SEC_STARTED
#undef SPI_START_SEC_VAR_32BIT
#define DEFAULT_START_SEC_VAR_32BIT
#endif
#elif defined (SPI_STOP_SEC_VAR_32BIT)
#ifndef VAR_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_32BIT_SEC_STARTED
#undef SPI_STOP_SEC_VAR_32BIT
#define DEFAULT_STOP_SEC_VAR_32BIT
#endif
#elif defined (SPI_START_SEC_VAR_NOINIT_32BIT)
#ifdef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_32BIT_SEC_STARTED
#undef SPI_START_SEC_VAR_NOINIT_32BIT
#define DEFAULT_START_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (SPI_STOP_SEC_VAR_NOINIT_32BIT)
#ifndef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_32BIT_SEC_STARTED
#undef SPI_STOP_SEC_VAR_NOINIT_32BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (SPI_START_SEC_VAR_FAST_32BIT)
#ifdef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_32BIT_SEC_STARTED
#undef SPI_START_SEC_VAR_FAST_32BIT
#define DEFAULT_START_SEC_VAR_FAST_32BIT
#endif
#elif defined (SPI_STOP_SEC_VAR_FAST_32BIT)
#ifndef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_32BIT_SEC_STARTED
#undef SPI_STOP_SEC_VAR_FAST_32BIT
#define DEFAULT_STOP_SEC_VAR_FAST_32BIT
#endif
#elif defined (SPI_START_SEC_VAR_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef SPI_START_SEC_VAR_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (SPI_STOP_SEC_VAR_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef SPI_STOP_SEC_VAR_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
#elif defined (SPI_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef SPI_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (SPI_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef SPI_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (SPI_START_SEC_VAR_FAST_UNSPECIFIED)
#ifdef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef SPI_START_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (SPI_STOP_SEC_VAR_FAST_UNSPECIFIED)
#ifndef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef SPI_STOP_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (SPI_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef SPI_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sbss=".SPI_CFG_RAM_UNSPECIFIED"
#endif
#elif defined (SPI_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef SPI_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs section sbss=default
#pragma ghs endsda
#endif
#elif defined (SPI_START_SEC_CONST_1BIT)
#ifdef CONST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_1BIT_SEC_STARTED
#undef SPI_START_SEC_CONST_1BIT
#define DEFAULT_START_SEC_CONST_1BIT
#endif
#elif defined (SPI_STOP_SEC_CONST_1BIT)
#ifndef CONST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_1BIT_SEC_STARTED
#undef SPI_STOP_SEC_CONST_1BIT
#define DEFAULT_STOP_SEC_CONST_1BIT
#endif
#elif defined (SPI_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef SPI_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (SPI_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef SPI_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (SPI_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef SPI_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (SPI_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef SPI_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (SPI_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef SPI_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (SPI_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef SPI_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (SPI_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef SPI_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (SPI_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef SPI_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (SPI_START_SEC_CONFIG_DATA_UNSPECIFIED)
#ifdef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef SPI_START_SEC_CONFIG_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".SPI_CFG_DATA_UNSPECIFIED"
#endif
#elif defined (SPI_STOP_SEC_CONFIG_DATA_UNSPECIFIED)
#ifndef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef SPI_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (SPI_START_SEC_DBTOC_DATA_UNSPECIFIED)
#ifdef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef SPI_START_SEC_DBTOC_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".SPI_CFG_DBTOC_UNSPECIFIED"
#endif
#elif defined (SPI_STOP_SEC_DBTOC_DATA_UNSPECIFIED)
#ifndef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef SPI_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (SPI_START_SEC_PUBLIC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef SPI_START_SEC_PUBLIC_CODE
#pragma ghs section text=".SPI_PUBLIC_CODE_ROM"
#endif
#elif defined (SPI_STOP_SEC_PUBLIC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef SPI_STOP_SEC_PUBLIC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (SPI_START_SEC_PRIVATE_CODE)
#ifdef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PRIVATE_CODE_SEC_STARTED
#undef SPI_START_SEC_PRIVATE_CODE
#pragma ghs section text=".SPI_PRIVATE_CODE_ROM"
#endif
#elif defined (SPI_STOP_SEC_PRIVATE_CODE)
#ifndef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PRIVATE_CODE_SEC_STARTED
#undef SPI_STOP_SEC_PRIVATE_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (SPI_START_SEC_APPL_CODE)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef SPI_START_SEC_APPL_CODE
#pragma ghs section text=".SPI_APPL_CODE_ROM"
#endif
#elif defined (SPI_STOP_SEC_APPL_CODE)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef APPL_CODE_SEC_STARTED
#undef SPI_STOP_SEC_APPL_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/* -------------------------------------------------------------------------- */
/* ADC */
/* -------------------------------------------------------------------------- */
#elif defined (ADC_START_SEC_VAR_1BIT)
#ifdef VAR_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_1BIT_SEC_STARTED
#undef ADC_START_SEC_VAR_1BIT
#define DEFAULT_START_SEC_VAR_1BIT
#endif
#elif defined (ADC_STOP_SEC_VAR_1BIT)
#ifndef VAR_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_1BIT_SEC_STARTED
#undef ADC_STOP_SEC_VAR_1BIT
#define DEFAULT_STOP_SEC_VAR_1BIT
#endif
#elif defined (ADC_START_SEC_VAR_NOINIT_1BIT)
#ifdef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_1BIT_SEC_STARTED
#undef ADC_START_SEC_VAR_NOINIT_1BIT
#define DEFAULT_START_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (ADC_STOP_SEC_VAR_NOINIT_1BIT)
#ifndef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_1BIT_SEC_STARTED
#undef ADC_STOP_SEC_VAR_NOINIT_1BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (ADC_START_SEC_VAR_FAST_1BIT)
#ifdef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_1BIT_SEC_STARTED
#undef ADC_START_SEC_VAR_FAST_1BIT
#define DEFAULT_START_SEC_VAR_FAST_1BIT
#endif
#elif defined (ADC_STOP_SEC_VAR_FAST_1BIT)
#ifndef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_1BIT_SEC_STARTED
#undef ADC_STOP_SEC_VAR_FAST_1BIT
#define DEFAULT_STOP_SEC_VAR_FAST_1BIT
#endif
#elif defined (ADC_START_SEC_VAR_8BIT)
#ifdef VAR_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_8BIT_SEC_STARTED
#undef ADC_START_SEC_VAR_8BIT
#define DEFAULT_START_SEC_VAR_8BIT
#endif
#elif defined (ADC_STOP_SEC_VAR_8BIT)
#ifndef VAR_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_8BIT_SEC_STARTED
#undef ADC_STOP_SEC_VAR_8BIT
#define DEFAULT_STOP_SEC_VAR_8BIT
#endif
#elif defined (ADC_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef ADC_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (ADC_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef ADC_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (ADC_START_SEC_VAR_FAST_8BIT)
#ifdef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_8BIT_SEC_STARTED
#undef ADC_START_SEC_VAR_FAST_8BIT
#define DEFAULT_START_SEC_VAR_FAST_8BIT
#endif
#elif defined (ADC_STOP_SEC_VAR_FAST_8BIT)
#ifndef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_8BIT_SEC_STARTED
#undef ADC_STOP_SEC_VAR_FAST_8BIT
#define DEFAULT_STOP_SEC_VAR_FAST_8BIT
#endif
#elif defined (ADC_START_SEC_VAR_16BIT)
#ifdef VAR_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_16BIT_SEC_STARTED
#undef ADC_START_SEC_VAR_16BIT
#define DEFAULT_START_SEC_VAR_16BIT
#endif
#elif defined (ADC_STOP_SEC_VAR_16BIT)
#ifndef VAR_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_16BIT_SEC_STARTED
#undef ADC_STOP_SEC_VAR_16BIT
#define DEFAULT_STOP_SEC_VAR_16BIT
#endif
#elif defined (ADC_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef ADC_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (ADC_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef ADC_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (ADC_START_SEC_VAR_FAST_16BIT)
#ifdef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_16BIT_SEC_STARTED
#undef ADC_START_SEC_VAR_FAST_16BIT
#define DEFAULT_START_SEC_VAR_FAST_16BIT
#endif
#elif defined (ADC_STOP_SEC_VAR_FAST_16BIT)
#ifndef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_16BIT_SEC_STARTED
#undef ADC_STOP_SEC_VAR_FAST_16BIT
#define DEFAULT_STOP_SEC_VAR_FAST_16BIT
#endif
#elif defined (ADC_START_SEC_VAR_32BIT)
#ifdef VAR_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_32BIT_SEC_STARTED
#undef ADC_START_SEC_VAR_32BIT
#define DEFAULT_START_SEC_VAR_32BIT
#endif
#elif defined (ADC_STOP_SEC_VAR_32BIT)
#ifndef VAR_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_32BIT_SEC_STARTED
#undef ADC_STOP_SEC_VAR_32BIT
#define DEFAULT_STOP_SEC_VAR_32BIT
#endif
#elif defined (ADC_START_SEC_VAR_NOINIT_32BIT)
#ifdef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_32BIT_SEC_STARTED
#undef ADC_START_SEC_VAR_NOINIT_32BIT
#define DEFAULT_START_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (ADC_STOP_SEC_VAR_NOINIT_32BIT)
#ifndef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_32BIT_SEC_STARTED
#undef ADC_STOP_SEC_VAR_NOINIT_32BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (ADC_START_SEC_VAR_FAST_32BIT)
#ifdef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_32BIT_SEC_STARTED
#undef ADC_START_SEC_VAR_FAST_32BIT
#define DEFAULT_START_SEC_VAR_FAST_32BIT
#endif
#elif defined (ADC_STOP_SEC_VAR_FAST_32BIT)
#ifndef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_32BIT_SEC_STARTED
#undef ADC_STOP_SEC_VAR_FAST_32BIT
#define DEFAULT_STOP_SEC_VAR_FAST_32BIT
#endif
#elif defined (ADC_START_SEC_VAR_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef ADC_START_SEC_VAR_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (ADC_STOP_SEC_VAR_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef ADC_STOP_SEC_VAR_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
#elif defined (ADC_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef ADC_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (ADC_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef ADC_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (ADC_START_SEC_VAR_FAST_UNSPECIFIED)
#ifdef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef ADC_START_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (ADC_STOP_SEC_VAR_FAST_UNSPECIFIED)
#ifndef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef ADC_STOP_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (ADC_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef ADC_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sbss=".ADC_CFG_RAM_UNSPECIFIED"
#endif
#elif defined (ADC_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef ADC_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs section sbss=default
#pragma ghs endsda
#endif
#elif defined (ADC_START_SEC_CONST_1BIT)
#ifdef CONST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_1BIT_SEC_STARTED
#undef ADC_START_SEC_CONST_1BIT
#define DEFAULT_START_SEC_CONST_1BIT
#endif
#elif defined (ADC_STOP_SEC_CONST_1BIT)
#ifndef CONST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_1BIT_SEC_STARTED
#undef ADC_STOP_SEC_CONST_1BIT
#define DEFAULT_STOP_SEC_CONST_1BIT
#endif
#elif defined (ADC_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef ADC_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (ADC_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef ADC_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (ADC_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef ADC_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (ADC_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef ADC_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (ADC_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef ADC_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (ADC_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef ADC_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (ADC_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef ADC_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (ADC_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef ADC_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (ADC_START_SEC_CONFIG_DATA_UNSPECIFIED)
#ifdef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef ADC_START_SEC_CONFIG_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".ADC_CFG_DATA_UNSPECIFIED"
#endif
#elif defined (ADC_STOP_SEC_CONFIG_DATA_UNSPECIFIED)
#ifndef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef ADC_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (ADC_START_SEC_DBTOC_DATA_UNSPECIFIED)
#ifdef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef ADC_START_SEC_DBTOC_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".ADC_CFG_DBTOC_UNSPECIFIED"
#endif
#elif defined (ADC_STOP_SEC_DBTOC_DATA_UNSPECIFIED)
#ifndef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef ADC_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (ADC_START_SEC_PUBLIC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef ADC_START_SEC_PUBLIC_CODE
#pragma ghs section text=".ADC_PUBLIC_CODE_ROM"
#endif
#elif defined (ADC_STOP_SEC_PUBLIC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef ADC_STOP_SEC_PUBLIC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (ADC_START_SEC_PRIVATE_CODE)
#ifdef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PRIVATE_CODE_SEC_STARTED
#undef ADC_START_SEC_PRIVATE_CODE
#pragma ghs section text=".ADC_PRIVATE_CODE_ROM"
#endif
#elif defined (ADC_STOP_SEC_PRIVATE_CODE)
#ifndef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PRIVATE_CODE_SEC_STARTED
#undef ADC_STOP_SEC_PRIVATE_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (ADC_START_SEC_APPL_CODE)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef ADC_START_SEC_APPL_CODE
#pragma ghs section text=".ADC_APPL_CODE_ROM"
#endif
#elif defined (ADC_STOP_SEC_APPL_CODE)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef APPL_CODE_SEC_STARTED
#undef ADC_STOP_SEC_APPL_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/* -------------------------------------------------------------------------- */
/* ICU */
/* -------------------------------------------------------------------------- */
#elif defined (ICU_START_SEC_VAR_1BIT)
#ifdef VAR_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_1BIT_SEC_STARTED
#undef ICU_START_SEC_VAR_1BIT
#define DEFAULT_START_SEC_VAR_1BIT
#endif
#elif defined (ICU_STOP_SEC_VAR_1BIT)
#ifndef VAR_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_1BIT_SEC_STARTED
#undef ICU_STOP_SEC_VAR_1BIT
#define DEFAULT_STOP_SEC_VAR_1BIT
#endif
#elif defined (ICU_START_SEC_VAR_NOINIT_1BIT)
#ifdef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_1BIT_SEC_STARTED
#undef ICU_START_SEC_VAR_NOINIT_1BIT
#define DEFAULT_START_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (ICU_STOP_SEC_VAR_NOINIT_1BIT)
#ifndef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_1BIT_SEC_STARTED
#undef ICU_STOP_SEC_VAR_NOINIT_1BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (ICU_START_SEC_VAR_FAST_1BIT)
#ifdef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_1BIT_SEC_STARTED
#undef ICU_START_SEC_VAR_FAST_1BIT
#define DEFAULT_START_SEC_VAR_FAST_1BIT
#endif
#elif defined (ICU_STOP_SEC_VAR_FAST_1BIT)
#ifndef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_1BIT_SEC_STARTED
#undef ICU_STOP_SEC_VAR_FAST_1BIT
#define DEFAULT_STOP_SEC_VAR_FAST_1BIT
#endif
#elif defined (ICU_START_SEC_VAR_8BIT)
#ifdef VAR_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_8BIT_SEC_STARTED
#undef ICU_START_SEC_VAR_8BIT
#define DEFAULT_START_SEC_VAR_8BIT
#endif
#elif defined (ICU_STOP_SEC_VAR_8BIT)
#ifndef VAR_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_8BIT_SEC_STARTED
#undef ICU_STOP_SEC_VAR_8BIT
#define DEFAULT_STOP_SEC_VAR_8BIT
#endif
#elif defined (ICU_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef ICU_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (ICU_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef ICU_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (ICU_START_SEC_VAR_FAST_8BIT)
#ifdef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_8BIT_SEC_STARTED
#undef ICU_START_SEC_VAR_FAST_8BIT
#define DEFAULT_START_SEC_VAR_FAST_8BIT
#endif
#elif defined (ICU_STOP_SEC_VAR_FAST_8BIT)
#ifndef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_8BIT_SEC_STARTED
#undef ICU_STOP_SEC_VAR_FAST_8BIT
#define DEFAULT_STOP_SEC_VAR_FAST_8BIT
#endif
#elif defined (ICU_START_SEC_VAR_16BIT)
#ifdef VAR_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_16BIT_SEC_STARTED
#undef ICU_START_SEC_VAR_16BIT
#define DEFAULT_START_SEC_VAR_16BIT
#endif
#elif defined (ICU_STOP_SEC_VAR_16BIT)
#ifndef VAR_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_16BIT_SEC_STARTED
#undef ICU_STOP_SEC_VAR_16BIT
#define DEFAULT_STOP_SEC_VAR_16BIT
#endif
#elif defined (ICU_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef ICU_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (ICU_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef ICU_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (ICU_START_SEC_VAR_FAST_16BIT)
#ifdef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_16BIT_SEC_STARTED
#undef ICU_START_SEC_VAR_FAST_16BIT
#define DEFAULT_START_SEC_VAR_FAST_16BIT
#endif
#elif defined (ICU_STOP_SEC_VAR_FAST_16BIT)
#ifndef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_16BIT_SEC_STARTED
#undef ICU_STOP_SEC_VAR_FAST_16BIT
#define DEFAULT_STOP_SEC_VAR_FAST_16BIT
#endif
#elif defined (ICU_START_SEC_VAR_32BIT)
#ifdef VAR_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_32BIT_SEC_STARTED
#undef ICU_START_SEC_VAR_32BIT
#define DEFAULT_START_SEC_VAR_32BIT
#endif
#elif defined (ICU_STOP_SEC_VAR_32BIT)
#ifndef VAR_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_32BIT_SEC_STARTED
#undef ICU_STOP_SEC_VAR_32BIT
#define DEFAULT_STOP_SEC_VAR_32BIT
#endif
#elif defined (ICU_START_SEC_VAR_NOINIT_32BIT)
#ifdef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_32BIT_SEC_STARTED
#undef ICU_START_SEC_VAR_NOINIT_32BIT
#define DEFAULT_START_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (ICU_STOP_SEC_VAR_NOINIT_32BIT)
#ifndef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_32BIT_SEC_STARTED
#undef ICU_STOP_SEC_VAR_NOINIT_32BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (ICU_START_SEC_VAR_FAST_32BIT)
#ifdef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_32BIT_SEC_STARTED
#undef ICU_START_SEC_VAR_FAST_32BIT
#define DEFAULT_START_SEC_VAR_FAST_32BIT
#endif
#elif defined (ICU_STOP_SEC_VAR_FAST_32BIT)
#ifndef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_32BIT_SEC_STARTED
#undef ICU_STOP_SEC_VAR_FAST_32BIT
#define DEFAULT_STOP_SEC_VAR_FAST_32BIT
#endif
#elif defined (ICU_START_SEC_VAR_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef ICU_START_SEC_VAR_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (ICU_STOP_SEC_VAR_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef ICU_STOP_SEC_VAR_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
#elif defined (ICU_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef ICU_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (ICU_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef ICU_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (ICU_START_SEC_VAR_FAST_UNSPECIFIED)
#ifdef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef ICU_START_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (ICU_STOP_SEC_VAR_FAST_UNSPECIFIED)
#ifndef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef ICU_STOP_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (ICU_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef ICU_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sbss=".ICU_CFG_RAM_UNSPECIFIED"
#endif
#elif defined (ICU_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef ICU_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs section sbss=default
#pragma ghs endsda
#endif
#elif defined (ICU_START_SEC_CONST_1BIT)
#ifdef CONST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_1BIT_SEC_STARTED
#undef ICU_START_SEC_CONST_1BIT
#define DEFAULT_START_SEC_CONST_1BIT
#endif
#elif defined (ICU_STOP_SEC_CONST_1BIT)
#ifndef CONST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_1BIT_SEC_STARTED
#undef ICU_STOP_SEC_CONST_1BIT
#define DEFAULT_STOP_SEC_CONST_1BIT
#endif
#elif defined (ICU_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef ICU_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (ICU_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef ICU_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (ICU_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef ICU_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (ICU_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef ICU_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (ICU_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef ICU_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (ICU_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef ICU_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (ICU_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef ICU_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (ICU_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef ICU_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (ICU_START_SEC_CONFIG_DATA_UNSPECIFIED)
#ifdef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef ICU_START_SEC_CONFIG_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".ICU_CFG_DATA_UNSPECIFIED"
#endif
#elif defined (ICU_STOP_SEC_CONFIG_DATA_UNSPECIFIED)
#ifndef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef ICU_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (ICU_START_SEC_DBTOC_DATA_UNSPECIFIED)
#ifdef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef ICU_START_SEC_DBTOC_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".ICU_CFG_DBTOC_UNSPECIFIED"
#endif
#elif defined (ICU_STOP_SEC_DBTOC_DATA_UNSPECIFIED)
#ifndef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef ICU_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (ICU_START_SEC_PUBLIC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef ICU_START_SEC_PUBLIC_CODE
#pragma ghs section text=".ICU_PUBLIC_CODE_ROM"
#endif
#elif defined (ICU_STOP_SEC_PUBLIC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef ICU_STOP_SEC_PUBLIC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (ICU_START_SEC_PRIVATE_CODE)
#ifdef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PRIVATE_CODE_SEC_STARTED
#undef ICU_START_SEC_PRIVATE_CODE
#pragma ghs section text=".ICU_PRIVATE_CODE_ROM"
#endif
#elif defined (ICU_STOP_SEC_PRIVATE_CODE)
#ifndef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PRIVATE_CODE_SEC_STARTED
#undef ICU_STOP_SEC_PRIVATE_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (ICU_START_SEC_APPL_CODE)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef ICU_START_SEC_APPL_CODE
#pragma ghs section text=".ICU_APPL_CODE_ROM"
#endif
#elif defined (ICU_STOP_SEC_APPL_CODE)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef APPL_CODE_SEC_STARTED
#undef ICU_STOP_SEC_APPL_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/* ---------------------------------------------------------------------------*/
/* FlexRay Driver */
/* ---------------------------------------------------------------------------*/
#elif defined (FR_START_SEC_VAR_1BIT)
#ifdef VAR_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_1BIT_SEC_STARTED
#undef FR_START_SEC_VAR_1BIT
#define DEFAULT_START_SEC_VAR_1BIT
#endif
#elif defined (FR_STOP_SEC_VAR_1BIT)
#ifndef VAR_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_1BIT_SEC_STARTED
#undef FR_STOP_SEC_VAR_1BIT
#define DEFAULT_STOP_SEC_VAR_1BIT
#endif
#elif defined (FR_START_SEC_VAR_NOINIT_1BIT)
#ifdef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_1BIT_SEC_STARTED
#undef FR_START_SEC_VAR_NOINIT_1BIT
#define DEFAULT_START_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (FR_STOP_SEC_VAR_NOINIT_1BIT)
#ifndef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_1BIT_SEC_STARTED
#undef FR_STOP_SEC_VAR_NOINIT_1BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (FR_START_SEC_VAR_FAST_1BIT)
#ifdef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_1BIT_SEC_STARTED
#undef FR_START_SEC_VAR_FAST_1BIT
#define DEFAULT_START_SEC_VAR_FAST_1BIT
#endif
#elif defined (FR_STOP_SEC_VAR_FAST_1BIT)
#ifndef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_1BIT_SEC_STARTED
#undef FR_STOP_SEC_VAR_FAST_1BIT
#define DEFAULT_STOP_SEC_VAR_FAST_1BIT
#endif
#elif defined (FR_START_SEC_VAR_8BIT)
#ifdef VAR_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_8BIT_SEC_STARTED
#undef FR_START_SEC_VAR_8BIT
#define DEFAULT_START_SEC_VAR_8BIT
#endif
#elif defined (FR_STOP_SEC_VAR_8BIT)
#ifndef VAR_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_8BIT_SEC_STARTED
#undef FR_STOP_SEC_VAR_8BIT
#define DEFAULT_STOP_SEC_VAR_8BIT
#endif
#elif defined (FR_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef FR_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (FR_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef FR_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (FR_START_SEC_VAR_FAST_8BIT)
#ifdef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_8BIT_SEC_STARTED
#undef FR_START_SEC_VAR_FAST_8BIT
#define DEFAULT_START_SEC_VAR_FAST_8BIT
#endif
#elif defined (FR_STOP_SEC_VAR_FAST_8BIT)
#ifndef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_8BIT_SEC_STARTED
#undef FR_STOP_SEC_VAR_FAST_8BIT
#define DEFAULT_STOP_SEC_VAR_FAST_8BIT
#endif
#elif defined (FR_START_SEC_VAR_16BIT)
#ifdef VAR_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_16BIT_SEC_STARTED
#undef FR_START_SEC_VAR_16BIT
#define DEFAULT_START_SEC_VAR_16BIT
#endif
#elif defined (FR_STOP_SEC_VAR_16BIT)
#ifndef VAR_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_16BIT_SEC_STARTED
#undef FR_STOP_SEC_VAR_16BIT
#define DEFAULT_STOP_SEC_VAR_16BIT
#endif
#elif defined (FR_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef FR_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (FR_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef FR_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (FR_START_SEC_VAR_FAST_16BIT)
#ifdef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_16BIT_SEC_STARTED
#undef FR_START_SEC_VAR_FAST_16BIT
#define DEFAULT_START_SEC_VAR_FAST_16BIT
#endif
#elif defined (FR_STOP_SEC_VAR_FAST_16BIT)
#ifndef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_16BIT_SEC_STARTED
#undef FR_STOP_SEC_VAR_FAST_16BIT
#define DEFAULT_STOP_SEC_VAR_FAST_16BIT
#endif
#elif defined (FR_START_SEC_VAR_32BIT)
#ifdef VAR_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_32BIT_SEC_STARTED
#undef FR_START_SEC_VAR_32BIT
#define DEFAULT_START_SEC_VAR_32BIT
#endif
#elif defined (FR_STOP_SEC_VAR_32BIT)
#ifndef VAR_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_32BIT_SEC_STARTED
#undef FR_STOP_SEC_VAR_32BIT
#define DEFAULT_STOP_SEC_VAR_32BIT
#endif
#elif defined (FR_START_SEC_VAR_NOINIT_32BIT)
#ifdef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_32BIT_SEC_STARTED
#undef FR_START_SEC_VAR_NOINIT_32BIT
#define DEFAULT_START_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (FR_STOP_SEC_VAR_NOINIT_32BIT)
#ifndef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_32BIT_SEC_STARTED
#undef FR_STOP_SEC_VAR_NOINIT_32BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (FR_START_SEC_VAR_FAST_32BIT)
#ifdef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_32BIT_SEC_STARTED
#undef FR_START_SEC_VAR_FAST_32BIT
#define DEFAULT_START_SEC_VAR_FAST_32BIT
#endif
#elif defined (FR_STOP_SEC_VAR_FAST_32BIT)
#ifndef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_32BIT_SEC_STARTED
#undef FR_STOP_SEC_VAR_FAST_32BIT
#define DEFAULT_STOP_SEC_VAR_FAST_32BIT
#endif
#elif defined (FR_START_SEC_VAR_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef FR_START_SEC_VAR_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (FR_STOP_SEC_VAR_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef FR_STOP_SEC_VAR_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
#elif defined (FR_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef FR_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (FR_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef FR_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (FR_START_SEC_VAR_POWER_ON_INIT_UNSPECIFIED)
#undef FR_START_SEC_VAR_POWER_ON_INIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_POWER_ON_INIT_UNSPECIFIED
#elif defined (FR_STOP_SEC_VAR_POWER_ON_INIT_UNSPECIFIED)
#undef FR_STOP_SEC_VAR_POWER_ON_INIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_POWER_ON_INIT_UNSPECIFIED
#elif defined (FR_START_SEC_VAR_FAST_UNSPECIFIED)
#ifdef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef FR_START_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (FR_STOP_SEC_VAR_FAST_UNSPECIFIED)
#ifndef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef FR_STOP_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (FR_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef FR_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sbss=".FR_CFG_RAM_UNSPECIFIED"
#endif
#elif defined (FR_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef FR_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs section sbss=default
#pragma ghs endsda
#endif
#elif defined (FR_START_SEC_CONST_1BIT)
#ifdef CONST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_1BIT_SEC_STARTED
#undef FR_START_SEC_CONST_1BIT
#define DEFAULT_START_SEC_CONST_1BIT
#endif
#elif defined (FR_STOP_SEC_CONST_1BIT)
#ifndef CONST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_1BIT_SEC_STARTED
#undef FR_STOP_SEC_CONST_1BIT
#define DEFAULT_STOP_SEC_CONST_1BIT
#endif
#elif defined (FR_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef FR_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (FR_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef FR_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (FR_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef FR_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (FR_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef FR_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (FR_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef FR_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (FR_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef FR_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (FR_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef FR_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (FR_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef FR_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (FR_START_SEC_CONFIG_CONST_UNSPECIFIED)
#undef FR_START_SEC_CONFIG_CONST_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".FR_CFG_CONST_UNSPEC"
#elif defined (FR_STOP_SEC_CONFIG_CONST_UNSPECIFIED)
#undef FR_STOP_SEC_CONFIG_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#elif defined (FR_START_SEC_DBTOC_CONFIG_CONST_UNSPECIFIED)
#undef FR_START_SEC_DBTOC_CONFIG_CONST_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".FR_DBTOC_CFG_CONST_UNSPEC"
#elif defined (FR_STOP_SEC_DBTOC_CONFIG_CONST_UNSPECIFIED)
#undef FR_STOP_SEC_DBTOC_CONFIG_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#elif defined (FR_START_SEC_CONFIG_DATA_UNSPECIFIED)
#ifdef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef FR_START_SEC_CONFIG_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".FR_CFG_DATA_UNSPECIFIED"
#endif
#elif defined (FR_STOP_SEC_CONFIG_DATA_UNSPECIFIED)
#ifndef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef FR_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (FR_START_SEC_DBTOC_DATA_UNSPECIFIED)
#ifdef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef FR_START_SEC_DBTOC_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".FR_CFG_DBTOC_UNSPECIFIED"
#endif
#elif defined (FR_STOP_SEC_DBTOC_DATA_UNSPECIFIED)
#ifndef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef FR_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (FR_START_SEC_PUBLIC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef FR_START_SEC_PUBLIC_CODE
#pragma ghs section text=".FR_PUBLIC_CODE_ROM"
#endif
#elif defined (FR_STOP_SEC_PUBLIC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef FR_STOP_SEC_PUBLIC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (FR_START_SEC_CODE)
#undef FR_START_SEC_CODE
#pragma ghs section text=".FR_CODE_ROM"
#elif defined (FR_STOP_SEC_CODE)
#undef FR_STOP_SEC_CODE
#pragma ghs section text=default
#elif defined (FR_START_SEC_STATIC_CODE)
#undef FR_START_SEC_STATIC_CODE
#pragma ghs section text=".FR_STATIC_CODE_ROM"
#elif defined (FR_STOP_SEC_STATIC_CODE)
#undef FR_STOP_SEC_STATIC_CODE
#pragma ghs section text=default
#elif defined (FR_START_SEC_PRIVATE_CODE)
#ifdef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PRIVATE_CODE_SEC_STARTED
#undef FR_START_SEC_PRIVATE_CODE
#pragma ghs section text=".FR_PRIVATE_CODE_ROM"
#endif
#elif defined (FR_STOP_SEC_PRIVATE_CODE)
#ifndef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PRIVATE_CODE_SEC_STARTED
#undef FR_STOP_SEC_PRIVATE_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (FR_START_SEC_APPL_CODE)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef FR_START_SEC_APPL_CODE
#pragma ghs section text=".FR_APPL_CODE_ROM"
#endif
#elif defined (FR_STOP_SEC_APPL_CODE)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef APPL_CODE_SEC_STARTED
#undef FR_STOP_SEC_APPL_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/* ---------------------------------------------------------------------------*/
/* FEE */
/* ---------------------------------------------------------------------------*/
#elif defined (FEE_START_SEC_VAR_1BIT)
#ifdef VAR_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_1BIT_SEC_STARTED
#undef FEE_START_SEC_VAR_1BIT
#pragma ghs startsda
#pragma ghs section sbss=".EEL_Data"
#endif
#elif defined (FEE_STOP_SEC_VAR_1BIT)
#ifndef VAR_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_1BIT_SEC_STARTED
#undef FEE_STOP_SEC_VAR_1BIT
#define DEFAULT_STOP_SEC_VAR_1BIT
#endif
#elif defined (FEE_START_SEC_VAR_NOINIT_1BIT)
#ifdef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_1BIT_SEC_STARTED
#undef FEE_START_SEC_VAR_NOINIT_1BIT
#define DEFAULT_START_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (FEE_STOP_SEC_VAR_NOINIT_1BIT)
#ifndef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_1BIT_SEC_STARTED
#undef FEE_STOP_SEC_VAR_NOINIT_1BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (FEE_START_SEC_VAR_FAST_1BIT)
#ifdef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_1BIT_SEC_STARTED
#undef FEE_START_SEC_VAR_FAST_1BIT
#define DEFAULT_START_SEC_VAR_FAST_1BIT
#endif
#elif defined (FEE_STOP_SEC_VAR_FAST_1BIT)
#ifndef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_1BIT_SEC_STARTED
#undef FEE_STOP_SEC_VAR_FAST_1BIT
#define DEFAULT_STOP_SEC_VAR_FAST_1BIT
#endif
#elif defined (FEE_START_SEC_VAR_8BIT)
#ifdef VAR_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_8BIT_SEC_STARTED
#undef FEE_START_SEC_VAR_8BIT
#define DEFAULT_START_SEC_VAR_8BIT
#endif
#elif defined (FEE_STOP_SEC_VAR_8BIT)
#ifndef VAR_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_8BIT_SEC_STARTED
#undef FEE_STOP_SEC_VAR_8BIT
#define DEFAULT_STOP_SEC_VAR_8BIT
#endif
#elif defined (FEE_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef FEE_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (FEE_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef FEE_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (FEE_START_SEC_VAR_FAST_8BIT)
#ifdef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_8BIT_SEC_STARTED
#undef FEE_START_SEC_VAR_FAST_8BIT
#define DEFAULT_START_SEC_VAR_FAST_8BIT
#endif
#elif defined (FEE_STOP_SEC_VAR_FAST_8BIT)
#ifndef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_8BIT_SEC_STARTED
#undef FEE_STOP_SEC_VAR_FAST_8BIT
#define DEFAULT_STOP_SEC_VAR_FAST_8BIT
#endif
#elif defined (FEE_START_SEC_VAR_16BIT)
#ifdef VAR_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_16BIT_SEC_STARTED
#undef FEE_START_SEC_VAR_16BIT
#define DEFAULT_START_SEC_VAR_16BIT
#endif
#elif defined (FEE_STOP_SEC_VAR_16BIT)
#ifndef VAR_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_16BIT_SEC_STARTED
#undef FEE_STOP_SEC_VAR_16BIT
#define DEFAULT_STOP_SEC_VAR_16BIT
#endif
#elif defined (FEE_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef FEE_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (FEE_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef FEE_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (FEE_START_SEC_VAR_FAST_16BIT)
#ifdef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_16BIT_SEC_STARTED
#undef FEE_START_SEC_VAR_FAST_16BIT
#define DEFAULT_START_SEC_VAR_FAST_16BIT
#endif
#elif defined (FEE_STOP_SEC_VAR_FAST_16BIT)
#ifndef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_16BIT_SEC_STARTED
#undef FEE_STOP_SEC_VAR_FAST_16BIT
#define DEFAULT_STOP_SEC_VAR_FAST_16BIT
#endif
#elif defined (FEE_START_SEC_VAR_32BIT)
#ifdef VAR_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_32BIT_SEC_STARTED
#undef FEE_START_SEC_VAR_32BIT
#define DEFAULT_START_SEC_VAR_32BIT
#endif
#elif defined (FEE_STOP_SEC_VAR_32BIT)
#ifndef VAR_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_32BIT_SEC_STARTED
#undef FEE_STOP_SEC_VAR_32BIT
#define DEFAULT_STOP_SEC_VAR_32BIT
#endif
#elif defined (FEE_START_SEC_VAR_NOINIT_32BIT)
#ifdef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_32BIT_SEC_STARTED
#undef FEE_START_SEC_VAR_NOINIT_32BIT
#define DEFAULT_START_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (FEE_STOP_SEC_VAR_NOINIT_32BIT)
#ifndef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_32BIT_SEC_STARTED
#undef FEE_STOP_SEC_VAR_NOINIT_32BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (FEE_START_SEC_VAR_FAST_32BIT)
#ifdef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_32BIT_SEC_STARTED
#undef FEE_START_SEC_VAR_FAST_32BIT
#define DEFAULT_START_SEC_VAR_FAST_32BIT
#endif
#elif defined (FEE_STOP_SEC_VAR_FAST_32BIT)
#ifndef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_32BIT_SEC_STARTED
#undef FEE_STOP_SEC_VAR_FAST_32BIT
#define DEFAULT_STOP_SEC_VAR_FAST_32BIT
#endif
#elif defined (FEE_START_SEC_VAR_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef FEE_START_SEC_VAR_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (FEE_STOP_SEC_VAR_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef FEE_STOP_SEC_VAR_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
#elif defined (FEE_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef FEE_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (FEE_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef FEE_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (FEE_START_SEC_VAR_FAST_UNSPECIFIED)
#ifdef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef FEE_START_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (FEE_STOP_SEC_VAR_FAST_UNSPECIFIED)
#ifndef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef FEE_STOP_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (FEE_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef FEE_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sbss=".FEE_CFG_RAM_UNSPECIFIED"
#endif
#elif defined (FEE_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef FEE_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs section sbss=default
#pragma ghs endsda
#endif
#elif defined (FEE_START_SEC_CONST_1BIT)
#ifdef CONST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_1BIT_SEC_STARTED
#undef FEE_START_SEC_CONST_1BIT
#define DEFAULT_START_SEC_CONST_1BIT
#endif
#elif defined (FEE_STOP_SEC_CONST_1BIT)
#ifndef CONST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_1BIT_SEC_STARTED
#undef FEE_STOP_SEC_CONST_1BIT
#define DEFAULT_STOP_SEC_CONST_1BIT
#endif
#elif defined (FEE_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef FEE_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (FEE_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef FEE_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (FEE_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef FEE_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (FEE_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef FEE_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (FEE_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef FEE_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (FEE_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef FEE_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (FEE_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef FEE_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (FEE_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef FEE_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (FEE_START_SEC_CONFIG_DATA_UNSPECIFIED)
#ifdef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef FEE_START_SEC_CONFIG_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".FEE_CFG_DATA_UNSPECIFIED"
#endif
#elif defined (FEE_STOP_SEC_CONFIG_DATA_UNSPECIFIED)
#ifndef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef FEE_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (FEE_START_SEC_DBTOC_DATA_UNSPECIFIED)
#ifdef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef FEE_START_SEC_DBTOC_DATA_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".FEE_CFG_DBTOC_UNSPECIFIED"
#endif
#elif defined (FEE_STOP_SEC_DBTOC_DATA_UNSPECIFIED)
#ifndef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef FEE_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (FEE_START_SEC_PUBLIC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef FEE_START_SEC_PUBLIC_CODE
#pragma ghs section text=".FEE_PUBLIC_CODE_ROM"
#endif
#elif defined (FEE_STOP_SEC_PUBLIC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef FEE_STOP_SEC_PUBLIC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (FEE_START_SEC_PRIVATE_CODE)
#ifdef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PRIVATE_CODE_SEC_STARTED
#undef FEE_START_SEC_PRIVATE_CODE
#pragma ghs section text=".FEE_PRIVATE_CODE_ROM"
#endif
#elif defined (FEE_STOP_SEC_PRIVATE_CODE)
#ifndef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PRIVATE_CODE_SEC_STARTED
#undef FEE_STOP_SEC_PRIVATE_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (FEE_START_SEC_APPL_CODE)
#ifdef APPL_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define APPL_CODE_SEC_STARTED
#undef FEE_START_SEC_APPL_CODE
#pragma ghs section text=".FEE_APPL_CODE_ROM"
#endif
#elif defined (FEE_STOP_SEC_APPL_CODE)
#ifndef APPL_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef FEE_STOP_SEC_APPL_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
/* -------------------------------------------------------------------------- */
/* FLS */
/* -------------------------------------------------------------------------- */
#elif defined (FLS_START_SEC_VAR_1BIT)
#ifdef VAR_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_1BIT_SEC_STARTED
#undef FLS_START_SEC_VAR_1BIT
#define DEFAULT_START_SEC_VAR_1BIT
#endif
#elif defined (FLS_STOP_SEC_VAR_1BIT)
#ifndef VAR_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_1BIT_SEC_STARTED
#undef FLS_STOP_SEC_VAR_1BIT
#define DEFAULT_STOP_SEC_VAR_1BIT
#endif
#elif defined (FLS_START_SEC_VAR_NOINIT_1BIT)
#ifdef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_1BIT_SEC_STARTED
#undef FLS_START_SEC_VAR_NOINIT_1BIT
#define DEFAULT_START_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (FLS_STOP_SEC_VAR_NOINIT_1BIT)
#ifndef VAR_NOINIT_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_1BIT_SEC_STARTED
#undef FLS_STOP_SEC_VAR_NOINIT_1BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_1BIT
#endif
#elif defined (FLS_START_SEC_VAR_FAST_1BIT)
#ifdef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_1BIT_SEC_STARTED
#undef FLS_START_SEC_VAR_FAST_1BIT
#define DEFAULT_START_SEC_VAR_FAST_1BIT
#endif
#elif defined (FLS_STOP_SEC_VAR_FAST_1BIT)
#ifndef VAR_FAST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_1BIT_SEC_STARTED
#undef FLS_STOP_SEC_VAR_FAST_1BIT
#define DEFAULT_STOP_SEC_VAR_FAST_1BIT
#endif
#elif defined (FLS_START_SEC_VAR_8BIT)
#ifdef VAR_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_8BIT_SEC_STARTED
#undef FLS_START_SEC_VAR_8BIT
#define DEFAULT_START_SEC_VAR_8BIT
#endif
#elif defined (FLS_STOP_SEC_VAR_8BIT)
#ifndef VAR_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_8BIT_SEC_STARTED
#undef FLS_STOP_SEC_VAR_8BIT
#define DEFAULT_STOP_SEC_VAR_8BIT
#endif
#elif defined (FLS_START_SEC_VAR_NOINIT_8BIT)
#ifdef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_8BIT_SEC_STARTED
#undef FLS_START_SEC_VAR_NOINIT_8BIT
#define DEFAULT_START_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (FLS_STOP_SEC_VAR_NOINIT_8BIT)
#ifndef VAR_NOINIT_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_8BIT_SEC_STARTED
#undef FLS_STOP_SEC_VAR_NOINIT_8BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#endif
#elif defined (FLS_START_SEC_VAR_FAST_8BIT)
#ifdef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_8BIT_SEC_STARTED
#undef FLS_START_SEC_VAR_FAST_8BIT
#define DEFAULT_START_SEC_VAR_FAST_8BIT
#endif
#elif defined (FLS_STOP_SEC_VAR_FAST_8BIT)
#ifndef VAR_FAST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_8BIT_SEC_STARTED
#undef FLS_STOP_SEC_VAR_FAST_8BIT
#define DEFAULT_STOP_SEC_VAR_FAST_8BIT
#endif
#elif defined (FLS_START_SEC_VAR_16BIT)
#ifdef VAR_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_16BIT_SEC_STARTED
#undef FLS_START_SEC_VAR_16BIT
#define DEFAULT_START_SEC_VAR_16BIT
#endif
#elif defined (FLS_STOP_SEC_VAR_16BIT)
#ifndef VAR_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_16BIT_SEC_STARTED
#undef FLS_STOP_SEC_VAR_16BIT
#define DEFAULT_STOP_SEC_VAR_16BIT
#endif
#elif defined (FLS_START_SEC_VAR_NOINIT_16BIT)
#ifdef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_16BIT_SEC_STARTED
#undef FLS_START_SEC_VAR_NOINIT_16BIT
#define DEFAULT_START_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (FLS_STOP_SEC_VAR_NOINIT_16BIT)
#ifndef VAR_NOINIT_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_16BIT_SEC_STARTED
#undef FLS_STOP_SEC_VAR_NOINIT_16BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#endif
#elif defined (FLS_START_SEC_VAR_FAST_16BIT)
#ifdef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_16BIT_SEC_STARTED
#undef FLS_START_SEC_VAR_FAST_16BIT
#define DEFAULT_START_SEC_VAR_FAST_16BIT
#endif
#elif defined (FLS_STOP_SEC_VAR_FAST_16BIT)
#ifndef VAR_FAST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_16BIT_SEC_STARTED
#undef FLS_STOP_SEC_VAR_FAST_16BIT
#define DEFAULT_STOP_SEC_VAR_FAST_16BIT
#endif
#elif defined (FLS_START_SEC_VAR_32BIT)
#ifdef VAR_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_32BIT_SEC_STARTED
#undef FLS_START_SEC_VAR_32BIT
#define DEFAULT_START_SEC_VAR_32BIT
#endif
#elif defined (FLS_STOP_SEC_VAR_32BIT)
#ifndef VAR_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_32BIT_SEC_STARTED
#undef FLS_STOP_SEC_VAR_32BIT
#define DEFAULT_STOP_SEC_VAR_32BIT
#endif
#elif defined (FLS_START_SEC_VAR_NOINIT_32BIT)
#ifdef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_32BIT_SEC_STARTED
#undef FLS_START_SEC_VAR_NOINIT_32BIT
#define DEFAULT_START_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (FLS_STOP_SEC_VAR_NOINIT_32BIT)
#ifndef VAR_NOINIT_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_32BIT_SEC_STARTED
#undef FLS_STOP_SEC_VAR_NOINIT_32BIT
#define DEFAULT_STOP_SEC_VAR_NOINIT_32BIT
#endif
#elif defined (FLS_START_SEC_VAR_FAST_32BIT)
#ifdef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_32BIT_SEC_STARTED
#undef FLS_START_SEC_VAR_FAST_32BIT
#define DEFAULT_START_SEC_VAR_FAST_32BIT
#endif
#elif defined (FLS_STOP_SEC_VAR_FAST_32BIT)
#ifndef VAR_FAST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_32BIT_SEC_STARTED
#undef FLS_STOP_SEC_VAR_FAST_32BIT
#define DEFAULT_STOP_SEC_VAR_FAST_32BIT
#endif
#elif defined (FLS_START_SEC_VAR_UNSPECIFIED)
#ifdef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_UNSPECIFIED_SEC_STARTED
#undef FLS_START_SEC_VAR_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_UNSPECIFIED
#endif
#elif defined (FLS_STOP_SEC_VAR_UNSPECIFIED)
#ifndef VAR_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_UNSPECIFIED_SEC_STARTED
#undef FLS_STOP_SEC_VAR_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#endif
#elif defined (FLS_START_SEC_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef FLS_START_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (FLS_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef FLS_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#endif
#elif defined (FLS_START_SEC_VAR_FAST_UNSPECIFIED)
#ifdef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef FLS_START_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_START_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (FLS_STOP_SEC_VAR_FAST_UNSPECIFIED)
#ifndef VAR_FAST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_FAST_UNSPECIFIED_SEC_STARTED
#undef FLS_STOP_SEC_VAR_FAST_UNSPECIFIED
#define DEFAULT_STOP_SEC_VAR_FAST_UNSPECIFIED
#endif
#elif defined (FLS_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifdef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef FLS_START_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sbss=".FLS_CFG_RAM_UNSPECIFIED"
#endif
#elif defined (FLS_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED)
#ifndef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef VAR_NOINIT_UNSPECIFIED_SEC_STARTED
#undef FLS_STOP_SEC_CONFIG_VAR_NOINIT_UNSPECIFIED
#pragma ghs section sbss=default
#pragma ghs endsda
#endif
#elif defined (FLS_START_SEC_CONST_1BIT)
#ifdef CONST_1BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_1BIT_SEC_STARTED
#undef FLS_START_SEC_CONST_1BIT
#define DEFAULT_START_SEC_CONST_1BIT
#endif
#elif defined (FLS_STOP_SEC_CONST_1BIT)
#ifndef CONST_1BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_1BIT_SEC_STARTED
#undef FLS_STOP_SEC_CONST_1BIT
#define DEFAULT_STOP_SEC_CONST_1BIT
#endif
#elif defined (FLS_START_SEC_CONST_8BIT)
#ifdef CONST_8BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_8BIT_SEC_STARTED
#undef FLS_START_SEC_CONST_8BIT
#define DEFAULT_START_SEC_CONST_8BIT
#endif
#elif defined (FLS_STOP_SEC_CONST_8BIT)
#ifndef CONST_8BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_8BIT_SEC_STARTED
#undef FLS_STOP_SEC_CONST_8BIT
#define DEFAULT_STOP_SEC_CONST_8BIT
#endif
#elif defined (FLS_START_SEC_CONST_16BIT)
#ifdef CONST_16BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_16BIT_SEC_STARTED
#undef FLS_START_SEC_CONST_16BIT
#define DEFAULT_START_SEC_CONST_16BIT
#endif
#elif defined (FLS_STOP_SEC_CONST_16BIT)
#ifndef CONST_16BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_16BIT_SEC_STARTED
#undef FLS_STOP_SEC_CONST_16BIT
#define DEFAULT_STOP_SEC_CONST_16BIT
#endif
#elif defined (FLS_START_SEC_CONST_32BIT)
#ifdef CONST_32BIT_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_32BIT_SEC_STARTED
#undef FLS_START_SEC_CONST_32BIT
#define DEFAULT_START_SEC_CONST_32BIT
#endif
#elif defined (FLS_STOP_SEC_CONST_32BIT)
#ifndef CONST_32BIT_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_32BIT_SEC_STARTED
#undef FLS_STOP_SEC_CONST_32BIT
#define DEFAULT_STOP_SEC_CONST_32BIT
#endif
#elif defined (FLS_START_SEC_CONST_UNSPECIFIED)
#ifdef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONST_UNSPECIFIED_SEC_STARTED
#undef FLS_START_SEC_CONST_UNSPECIFIED
#define DEFAULT_START_SEC_CONST_UNSPECIFIED
#endif
#elif defined (FLS_STOP_SEC_CONST_UNSPECIFIED)
#ifndef CONST_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONST_UNSPECIFIED_SEC_STARTED
#undef FLS_STOP_SEC_CONST_UNSPECIFIED
#define DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#endif
#elif defined (FLS_START_SEC_CONFIG_DATA_UNSPECIFIED)
#ifdef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef FLS_START_SEC_CONFIG_DATA_UNSPECIFIED
#pragma ghs section text=".FLS_CFG_DBTOC_UNSPECIFIED"
#endif
#elif defined (FLS_STOP_SEC_CONFIG_DATA_UNSPECIFIED)
#ifndef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef CONFIG_DATA_UNSPECIFIED_SEC_STARTED
#undef FLS_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (FLS_START_SEC_DBTOC_DATA_UNSPECIFIED)
#ifdef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not stopped"
#else
#define DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef FLS_START_SEC_DBTOC_DATA_UNSPECIFIED
#pragma ghs section text=".FLS_CFG_DBTOC_UNSPECIFIED"
#endif
#elif defined (FLS_STOP_SEC_DBTOC_DATA_UNSPECIFIED)
#ifndef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#error "Memory section is not started"
#else
#undef DBTOC_DATA_UNSPECIFIED_SEC_STARTED
#undef FLS_STOP_SEC_DBTOC_DATA_UNSPECIFIED
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (FLS_START_SEC_PUBLIC_CODE)
#ifdef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PUBLIC_CODE_SEC_STARTED
#undef FLS_START_SEC_PUBLIC_CODE
#pragma ghs section text=".FLS_PUBLIC_CODE_RAM"
#endif
#elif defined (FLS_STOP_SEC_PUBLIC_CODE)
#ifndef PUBLIC_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PUBLIC_CODE_SEC_STARTED
#undef FLS_STOP_SEC_PUBLIC_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (FLS_START_SEC_PRIVATE_CODE)
#ifdef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define PRIVATE_CODE_SEC_STARTED
#undef FLS_START_SEC_PRIVATE_CODE
#pragma ghs section text=".FLS_PRIVATE_CODE_RAM"
#endif
#elif defined (FLS_STOP_SEC_PRIVATE_CODE)
#ifndef PRIVATE_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef PRIVATE_CODE_SEC_STARTED
#undef FLS_STOP_SEC_PRIVATE_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (FLS_START_SEC_SCHEDULER_CODE)
#ifdef SCHEDULER_CODE_SEC_STARTED
#error "Memory section is not stopped"
#else
#define SCHEDULER_CODE_SEC_STARTED
#undef FLS_START_SEC_SCHEDULER_CODE
#pragma ghs section text=".FLS_PRIVATE_CODE_RAM"
#endif
#elif defined (FLS_STOP_SEC_SCHEDULER_CODE)
#ifndef SCHEDULER_CODE_SEC_STARTED
#error "Memory section is not started"
#else
#undef SCHEDULER_CODE_SEC_STARTED
#undef FLS_STOP_SEC_SCHEDULER_CODE
#define DEFAULT_STOP_SEC_CODE
#endif
#elif defined (FLS_START_SEC_BUFFER_CODE)
#undef FLS_START_SEC_BUFFER_CODE
#pragma ghs section sbss=".FLS_BUFFER_CODE_RAM"
#elif defined (FLS_STOP_SEC_BUFFER_CODE)
#undef FLS_STOP_SEC_BUFFER_CODE
#pragma ghs section sbss=default
#elif defined (FLS_START_SEC_APPL_CODE)
#undef FLS_START_SEC_APPL_CODE
#pragma ghs section text=".FLS_APPL_CODE_ROM"
#elif defined (FLS_STOP_SEC_APPL_CODE)
#undef FLS_STOP_SEC_APPL_CODE
#define DEFAULT_STOP_SEC_CODE
/* -------------------------------------------------------------------------- */
/* Code sections */
/* -------------------------------------------------------------------------- */
/*Code section - TEXT_SECT*/
#elif defined (CODE_START_TEXT_SECT)
#undef CODE_START_TEXT_SECT
#pragma ghs section text="TEXT_SECT"
#elif defined (CODE_STOP_TEXT_SECT)
#undef CODE_STOP_TEXT_SECT
#pragma ghs section text=default
/*Code section - APP_VECT*/
#elif defined(CODE_START_APP_VECT)
#undef CODE_START_APP_VECT
#pragma ghs section text="APP_VECT"
#elif defined(CODE_STOP_APP_VECT)
#undef CODE_STOP_APP_VECT
#pragma ghs section text=default
/*Code section - ISR_SECT*/
#elif defined(CODE_START_ISR_SECT)
#undef CODE_START_ISR_SECT
#pragma ghs section text="ISR_SECT"
#elif defined(CODE_STOP_ISR_SECT)
#undef CODE_STOP_ISR_SECT
#pragma ghs section text=default
/* -------------------------------------------------------------------------- */
/* Calibrations */
/* -------------------------------------------------------------------------- */
#endif /* START_WITH_IF */
/*******************************************************************************
** Default section mapping **
*******************************************************************************/
/* general start of #elif chain whith #if */
#if defined (START_WITH_IF)
/* -------------------------------------------------------------------------- */
/* RAM variables initialized from ROM on reset */
/* -------------------------------------------------------------------------- */
#elif defined (DEFAULT_START_SEC_VAR_1BIT)
#undef DEFAULT_START_SEC_VAR_1BIT
#pragma ghs startsda
#pragma ghs section sdata=".RAM_1BIT"
#elif defined (DEFAULT_STOP_SEC_VAR_1BIT)
#undef DEFAULT_STOP_SEC_VAR_1BIT
#pragma ghs section sdata=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_VAR_8BIT)
#undef DEFAULT_START_SEC_VAR_8BIT
#pragma ghs startsda
#pragma ghs section sdata=".RAM_8BIT"
#elif defined (DEFAULT_STOP_SEC_VAR_8BIT)
#undef DEFAULT_STOP_SEC_VAR_8BIT
#pragma ghs section sdata=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_VAR_16BIT)
#undef DEFAULT_START_SEC_VAR_16BIT
#pragma ghs startsda
#pragma ghs section sdata=".RAM_16BIT"
#elif defined (DEFAULT_STOP_SEC_VAR_16BIT)
#undef DEFAULT_STOP_SEC_VAR_16BIT
#pragma ghs section sdata=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_VAR_32BIT)
#undef DEFAULT_START_SEC_VAR_32BIT
#pragma ghs startsda
#pragma ghs section sdata=".RAM_32BIT"
#elif defined (DEFAULT_STOP_SEC_VAR_32BIT)
#undef DEFAULT_STOP_SEC_VAR_32BIT
#pragma ghs section sdata=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_VAR_UNSPECIFIED)
#undef DEFAULT_START_SEC_VAR_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sdata=".RAM_UNSPECIFIED"
#elif defined (DEFAULT_STOP_SEC_VAR_UNSPECIFIED)
#undef DEFAULT_STOP_SEC_VAR_UNSPECIFIED
#pragma ghs section sdata=default
#pragma ghs endsda
/* -------------------------------------------------------------------------- */
/* RAM variables not initialized */
/* -------------------------------------------------------------------------- */
#elif defined (DEFAULT_START_SEC_VAR_NOINIT_1BIT)
#undef DEFAULT_START_SEC_VAR_NOINIT_1BIT
#pragma ghs startsda
#pragma ghs section sbss=".NOINIT_RAM_1BIT"
#elif defined (DEFAULT_STOP_SEC_VAR_NOINIT_1BIT)
#undef DEFAULT_STOP_SEC_VAR_NOINIT_1BIT
#pragma ghs section sbss=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_VAR_NOINIT_8BIT)
#undef DEFAULT_START_SEC_VAR_NOINIT_8BIT
#pragma ghs startsda
#pragma ghs section sbss=".NOINIT_RAM_8BIT"
#elif defined (DEFAULT_STOP_SEC_VAR_NOINIT_8BIT)
#undef DEFAULT_STOP_SEC_VAR_NOINIT_8BIT
#pragma ghs section sbss=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_VAR_NOINIT_16BIT)
#undef DEFAULT_START_SEC_VAR_NOINIT_16BIT
#pragma ghs startsda
#pragma ghs section sbss=".NOINIT_RAM_16BIT"
#elif defined (DEFAULT_STOP_SEC_VAR_NOINIT_16BIT)
#undef DEFAULT_STOP_SEC_VAR_NOINIT_16BIT
#pragma ghs section sbss=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_VAR_NOINIT_32BIT)
#undef DEFAULT_START_SEC_VAR_NOINIT_32BIT
#pragma ghs startsda
#pragma ghs section sbss=".NOINIT_RAM_32BIT"
#elif defined (DEFAULT_STOP_SEC_VAR_NOINIT_32BIT)
#undef DEFAULT_STOP_SEC_VAR_NOINIT_32BIT
#pragma ghs section sbss=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED)
#undef DEFAULT_START_SEC_VAR_NOINIT_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sbss=".NOINIT_RAM_UNSPECIFIED"
#elif defined (DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED)
#undef DEFAULT_STOP_SEC_VAR_NOINIT_UNSPECIFIED
#pragma ghs section sbss=default
#pragma ghs endsda
/* -------------------------------------------------------------------------- */
/* RAM variables frequently used or accessed bitwise */
/* -------------------------------------------------------------------------- */
#elif defined (DEFAULT_START_SEC_VAR_FAST_1BIT)
#undef DEFAULT_START_SEC_VAR_FAST_1BIT
#pragma ghs startsda
#pragma ghs section sdata=".FAST_RAM_1BIT"
#elif defined (DEFAULT_STOP_SEC_VAR_FAST_1BIT)
#undef DEFAULT_STOP_SEC_VAR_FAST_1BIT
#pragma ghs section sdata=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_VAR_FAST_8BIT)
#undef DEFAULT_START_SEC_VAR_FAST_8BIT
#pragma ghs startsda
#pragma ghs section sdata=".FAST_RAM_8BIT"
#elif defined (DEFAULT_STOP_SEC_VAR_FAST_8BIT)
#undef DEFAULT_STOP_SEC_VAR_FAST_8BIT
#pragma ghs section sdata=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_VAR_FAST_16BIT)
#undef DEFAULT_START_SEC_VAR_FAST_16BIT
#pragma ghs startsda
#pragma ghs section sdata=".FAST_RAM_16BIT"
#elif defined (DEFAULT_STOP_SEC_VAR_FAST_16BIT)
#undef DEFAULT_STOP_SEC_VAR_FAST_16BIT
#pragma ghs section sdata=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_VAR_FAST_32BIT)
#undef DEFAULT_START_SEC_VAR_FAST_32BIT
#pragma ghs startsda
#pragma ghs section sdata=".FAST_RAM_32BIT"
#elif defined (DEFAULT_STOP_SEC_VAR_FAST_32BIT)
#undef DEFAULT_STOP_SEC_VAR_FAST_32BIT
#pragma ghs section sdata=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_VAR_FAST_UNSPECIFIED)
#undef DEFAULT_START_SEC_VAR_FAST_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section sdata=".FAST_RAM_UNSPECIFIED"
#elif defined (DEFAULT_STOP_SEC_VAR_FAST_UNSPECIFIED)
#undef DEFAULT_STOP_SEC_VAR_FAST_UNSPECIFIED
#pragma ghs section sdata=default
#pragma ghs endsda
/* -------------------------------------------------------------------------- */
/* ROM constants */
/* -------------------------------------------------------------------------- */
#elif defined (DEFAULT_START_SEC_CONST_1BIT)
#undef DEFAULT_START_SEC_CONST_1BIT
#pragma ghs startsda
#pragma ghs section rosdata=".CONST_ROM_1BIT"
#elif defined (DEFAULT_STOP_SEC_CONST_1BIT)
#undef DEFAULT_STOP_SEC_CONST_1BIT
#pragma ghs section rosdata=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_CONST_8BIT)
#undef DEFAULT_START_SEC_CONST_8BIT
#pragma ghs startsda
#pragma ghs section rosdata=".CONST_ROM_8BIT"
#elif defined (DEFAULT_STOP_SEC_CONST_8BIT)
#undef DEFAULT_STOP_SEC_CONST_8BIT
#pragma ghs section rosdata=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_CONST_16BIT)
#undef DEFAULT_START_SEC_CONST_16BIT
#pragma ghs startsda
#pragma ghs section rosdata=".CONST_ROM_16BIT"
#elif defined (DEFAULT_STOP_SEC_CONST_16BIT)
#undef DEFAULT_STOP_SEC_CONST_16BIT
#pragma ghs section rosdata=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_CONST_32BIT)
#undef DEFAULT_START_SEC_CONST_32BIT
#pragma ghs startsda
#pragma ghs section rosdata=".CONST_ROM_32BIT"
#elif defined (DEFAULT_STOP_SEC_CONST_32BIT)
#undef DEFAULT_STOP_SEC_CONST_32BIT
#pragma ghs section rosdata=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_CONST_UNSPECIFIED)
#undef DEFAULT_START_SEC_CONST_UNSPECIFIED
#pragma ghs startsda
#pragma ghs section rosdata=".CONST_ROM_UNSPECIFIED"
#elif defined (DEFAULT_STOP_SEC_CONST_UNSPECIFIED)
#undef DEFAULT_STOP_SEC_CONST_UNSPECIFIED
#pragma ghs section rosdata=default
#pragma ghs endsda
/* -------------------------------------------------------------------------- */
/* ROM FAR constants */
/* -------------------------------------------------------------------------- */
#elif defined (DEFAULT_START_SEC_CONST_1BIT_FAR)
#undef DEFAULT_START_SEC_CONST_1BIT_FAR
#pragma ghs startsda
#pragma ghs section rosdata=".CONST_FAR_ROM_1BIT"
#elif defined (DEFAULT_STOP_SEC_CONST_1BIT_FAR)
#undef DEFAULT_STOP_SEC_CONST_1BIT_FAR
#pragma ghs section rosdata=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_CONST_8BIT_FAR)
#undef DEFAULT_START_SEC_CONST_8BIT_FAR
#pragma ghs startsda
#pragma ghs section rosdata=".CONST_FAR_ROM_8BIT"
#elif defined (DEFAULT_STOP_SEC_CONST_8BIT_FAR)
#undef DEFAULT_STOP_SEC_CONST_8BIT_FAR
#pragma ghs section rosdata=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_CONST_16BIT_FAR)
#undef DEFAULT_START_SEC_CONST_16BIT_FAR
#pragma ghs startsda
#pragma ghs section rosdata=".CONST_FAR_ROM_16BIT"
#elif defined (DEFAULT_STOP_SEC_CONST_16BIT_FAR)
#undef DEFAULT_STOP_SEC_CONST_16BIT_FAR
#pragma ghs section rosdata=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_CONST_32BIT_FAR)
#undef DEFAULT_START_SEC_CONST_32BIT_FAR
#pragma ghs startsda
#pragma ghs section rosdata=".CONST_FAR_ROM_32BIT"
#elif defined (DEFAULT_STOP_SEC_CONST_32BIT_FAR)
#undef DEFAULT_STOP_SEC_CONST_32BIT_FAR
#pragma ghs section rosdata=default
#pragma ghs endsda
#elif defined (DEFAULT_START_SEC_CONST_UNSPECIFIED_FAR)
#undef DEFAULT_START_SEC_CONST_UNSPECIFIED_FAR
#pragma ghs startsda
#pragma ghs section rosdata=".CONST_FAR_ROM_UNSPECIFIED"
#elif defined (DEFAULT_STOP_SEC_CONST_UNSPECIFIED_FAR)
#undef DEFAULT_STOP_SEC_CONST_UNSPECIFIED_FAR
#pragma ghs section rosdata=default
#pragma ghs endsda
/* -------------------------------------------------------------------------- */
/* ROM code */
/* -------------------------------------------------------------------------- */
/*move DEFAULT_START_SEC_CODE*/
/* ---------------------------------------------------------------------------*/
/* End of default section mapping */
/* ---------------------------------------------------------------------------*/
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* START_WITH_IF */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/Common/Compiler/Compiler_Cfg.h
/*============================================================================*/
/* Project = AUTOSAR NEC Xx4 MCAL Components */
/* Module = Compiler_Cfg.h */
/* Version = 3.0.2 */
/* Date = 14-Jul-2009 */
/*============================================================================*/
/* COPYRIGHT */
/*============================================================================*/
/* Copyright (c) 2009 by NEC Electronics Corporation */
/*============================================================================*/
/* Purpose: */
/* This file contains compiler macros */
/*============================================================================*/
/* */
/* Unless otherwise agreed upon in writing between your company and */
/* NEC Electronics Corporation the following shall apply! */
/* */
/* Warranty Disclaimer */
/* */
/* There is no warranty of any kind whatsoever granted by NEC. Any warranty */
/* is expressly disclaimed and excluded by NEC, either expressed or implied, */
/* including but not limited to those for non-infringement of intellectual */
/* property, merchantability and/or fitness for the particular purpose. */
/* */
/* NEC shall not have any obligation to maintain, service or provide bug */
/* fixes for the supplied Product(s) and/or the Application. */
/* */
/* Each User is solely responsible for determining the appropriateness of */
/* using the Product(s) and assumes all risks associated with its exercise */
/* of rights under this Agreement, including, but not limited to the risks */
/* and costs of program errors, compliance with applicable laws, damage to */
/* or loss of data, programs or equipment, and unavailability or */
/* interruption of operations. */
/* */
/* Limitation of Liability */
/* */
/* In no event shall NEC be liable to the User for any incidental, */
/* consequential, indirect, or punitive damage (including but not limited */
/* to lost profits) regardless of whether such liability is based on breach */
/* of contract, tort, strict liability, breach of warranties, failure of */
/* essential purpose or otherwise and even if advised of the possibility of */
/* such damages. NEC shall not be liable for any services or products */
/* provided by third party vendors, developers or consultants identified or */
/* referred to the User by NEC in connection with the Product(s) and/or the */
/* Application. */
/* */
/*============================================================================*/
/* Environment: */
/* Devices: Xx4 */
/* Compiler: GHS V5.1.6c */
/*============================================================================*/
/*******************************************************************************
** Revision Control History **
*******************************************************************************/
/*
* V3.0.0: 30-Mar-2009 : Initial Version
* V3.0.1: 23-Jun-2009 : As per SCR 012, compiler macros for Watchdog Driver
* B is added.
* V3.0.2: 14-Jul-2009 : As per SCR 015, compiler version is changed from
* V5.0.5 to V5.1.6c in the header of the file.
*/
/******************************************************************************/
/*******************************************************************************
** Include Section **
*******************************************************************************/
#ifndef COMPILER_CFG_H
#define COMPILER_CFG_H
/*******************************************************************************
** Version Information **
*******************************************************************************/
/*
* AUTOSAR specification version information
*/
#define COMPILER_CFG_AR_MAJOR_VERSION 2
#define COMPILER_CFG_AR_MINOR_VERSION 0
#define COMPILER_CFG_AR_PATCH_VERSION 0
/*
* File version information
*/
#define COMPILER_CFG_SW_MAJOR_VERSION 3
#define COMPILER_CFG_SW_MINOR_VERSION 0
#define COMPILER_CFG_SW_PATCH_VERSION 0
/*******************************************************************************
** Global Symbols **
*******************************************************************************/
#define V_SUPPRESS_EXTENDED_VERSION_CHECK
//#define V_EXTENDED_BUILD_LIB_CHECK
#define V_USE_DUMMY_STATEMENT STD_ON
/*******************************************************************************
** Configuration data **
*******************************************************************************/
/*
* The following memory and pointer classes can be configured per module.
* These #defines are passed to the compiler abstraction macros in Compiler.h
*
* Note:
* module internal functions (statics) that get into one section
* (together with API) shall fit into one page.
*/
/* ---------------------------------------------------------------------------*/
/* MCU */
/* ---------------------------------------------------------------------------*/
#define MCU_PUBLIC_CODE /* API functions */
#define MCU_PUBLIC_CONST /* API constants */
#define MCU_PRIVATE_CODE /* Internal functions */
#define MCU_PRIVATE_DATA /* Module internal data */
#define MCU_PRIVATE_CONST /* Internal ROM Data */
#define MCU_APPL_CODE /* callbacks of the Application */
#define MCU_APPL_CONST /* Applications' ROM Data */
#define MCU_APPL_DATA /* Applications' RAM Data */
#define MCU_FAST_DATA /* 'Near' RAM Data */
#define MCU_CONFIG_CONST /* Desc. Tables -> Config-dependent */
#define MCU_CONFIG_DATA /* Config. dependent (reg. size) data */
#define MCU_INIT_DATA /* Data which is initialized during
Startup */
#define MCU_NOINIT_DATA /* Data which is not initialized during
Startup */
#define MCU_CONST /* Data Constants */
/* ---------------------------------------------------------------------------*/
/* GPT */
/* ---------------------------------------------------------------------------*/
#define GPT_PUBLIC_CODE /* API functions */
#define GPT_PUBLIC_CONST /* API constants */
#define GPT_PRIVATE_CODE /* Internal functions */
#define GPT_PRIVATE_DATA /* Module internal data */
#define GPT_PRIVATE_CONST /* Internal ROM Data */
#define GPT_APPL_CODE /* callbacks of the Application */
#define GPT_APPL_CONST /* Applications' ROM Data */
#define GPT_APPL_DATA /* Applications' RAM Data */
#define GPT_FAST_DATA /* 'Near' RAM Data */
#define GPT_CONFIG_CONST /* Desc. Tables -> Config-dependent */
#define GPT_CONFIG_DATA /* Config. dependent (reg. size) data */
#define GPT_INIT_DATA /* Data which is initialized during
Startup */
#define GPT_NOINIT_DATA /* Data which is not initialized during
Startup */
#define GPT_CONST /* Data Constants */
/* ---------------------------------------------------------------------------*/
/* WDG DRIVER A */
/* ---------------------------------------------------------------------------*/
#define WDG_23_DRIVERA_PUBLIC_CODE /* API functions */
#define WDG_23_DRIVERA_PUBLIC_CONST /* API constants */
#define WDG_23_DRIVERA_PRIVATE_CODE /* Internal functions */
#define WDG_23_DRIVERA_PRIVATE_DATA /* Module internal data */
#define WDG_23_DRIVERA_PRIVATE_CONST /* Internal ROM Data */
#define WDG_23_DRIVERA_APPL_CODE /* callbacks of the Application */
#define WDG_23_DRIVERA_APPL_CONST /* Applications' ROM Data */
#define WDG_23_DRIVERA_APPL_DATA /* Applications' RAM Data */
#define WDG_23_DRIVERA_FAST_DATA /* 'Near' RAM Data */
#define WDG_23_DRIVERA_CONFIG_CONST /* Desc. Tables -> Config-dependent */
#define WDG_23_DRIVERA_CONFIG_DATA /* Config. dependent (reg. size)
data */
#define WDG_23_DRIVERA_INIT_DATA /* Data which is initialized during
Startup */
#define WDG_23_DRIVERA_NOINIT_DATA /* Data which is not initialized
during Startup */
#define WDG_23_DRIVERA_CONST /* Data Constants */
/* ---------------------------------------------------------------------------*/
/* WDG DRIVER B */
/* ---------------------------------------------------------------------------*/
#define WDG_23_DRIVERB_PUBLIC_CODE /* API functions */
#define WDG_23_DRIVERB_PUBLIC_CONST /* API constants */
#define WDG_23_DRIVERB_PRIVATE_CODE /* Internal functions */
#define WDG_23_DRIVERB_PRIVATE_DATA /* Module internal data */
#define WDG_23_DRIVERB_PRIVATE_CONST /* Internal ROM Data */
#define WDG_23_DRIVERB_APPL_CODE /* callbacks of the Application */
#define WDG_23_DRIVERB_APPL_CONST /* Applications' ROM Data */
#define WDG_23_DRIVERB_APPL_DATA /* Applications' RAM Data */
#define WDG_23_DRIVERB_FAST_DATA /* 'Near' RAM Data */
#define WDG_23_DRIVERB_CONFIG_CONST /* Desc. Tables -> Config-dependent */
#define WDG_23_DRIVERB_CONFIG_DATA /* Config. dependent (reg. size)
data */
#define WDG_23_DRIVERB_INIT_DATA /* Data which is initialized during
Startup */
#define WDG_23_DRIVERB_NOINIT_DATA /* Data which is not initialized
during Startup */
#define WDG_23_DRIVERB_CONST /* Data Constants */
/* ---------------------------------------------------------------------------*/
/* PORT */
/* ---------------------------------------------------------------------------*/
#define PORT_PUBLIC_CODE /* API functions */
#define PORT_PUBLIC_CONST /* API constants */
#define PORT_PRIVATE_CODE /* Internal functions */
#define PORT_PRIVATE_DATA /* Module internal data */
#define PORT_PRIVATE_CONST /* Internal ROM Data */
#define PORT_APPL_CODE /* callbacks of the Application */
#define PORT_APPL_CONST /* Applications' ROM Data */
#define PORT_APPL_DATA /* Applications' RAM Data */
#define PORT_FAST_DATA /* 'Near' RAM Data */
#define PORT_CONFIG_CONST /* Desc. Tables -> Config-dependent */
#define PORT_CONFIG_DATA /* Config. dependent (reg. size) data */
#define PORT_INIT_DATA /* Data which is initialized during
Startup */
#define PORT_NOINIT_DATA /* Data which is not initialized during
Startup */
#define PORT_CONST /* Data Constants */
/* ---------------------------------------------------------------------------*/
/* DIO */
/* ---------------------------------------------------------------------------*/
#define DIO_PUBLIC_CODE /* API functions */
#define DIO_PUBLIC_CONST /* API constants */
#define DIO_PRIVATE_CODE /* Internal functions */
#define DIO_PRIVATE_DATA /* Module internal data */
#define DIO_PRIVATE_CONST /* Internal ROM Data */
#define DIO_APPL_CODE /* callbacks of the Application */
#define DIO_APPL_CONST /* Applications' ROM Data */
#define DIO_APPL_DATA /* Applications' RAM Data */
#define DIO_FAST_DATA /* 'Near' RAM Data */
#define DIO_CONFIG_CONST /* Desc. Tables -> Config-dependent */
#define DIO_CONFIG_DATA /* Config. dependent (reg. size) data */
#define DIO_INIT_DATA /* Data which is initialized during
Startup */
#define DIO_NOINIT_DATA /* Data which is not initialized during
Startup */
#define DIO_CONST /* Data Constants */
/* ---------------------------------------------------------------------------*/
/* FEE */
/* ---------------------------------------------------------------------------*/
#define FEE_PUBLIC_CODE /* API functions */
#define FEE_PUBLIC_CONST /* API constants */
#define FEE_PRIVATE_CODE /* Internal functions */
#define FEE_PRIVATE_DATA /* Module internal data */
#define FEE_PRIVATE_CONST /* Internal ROM Data */
#define FEE_APPL_CODE /* callbacks of the Application */
#define FEE_APPL_CONST /* Applications' ROM Data */
#define FEE_APPL_DATA /* Applications' RAM Data */
#define FEE_FAST_DATA /* 'Near' RAM Data */
#define FEE_CONFIG_CONST /* Desc. Tables -> Config-dependent */
#define FEE_CONFIG_DATA /* Config. dependent (reg. size) data */
#define FEE_INIT_DATA /* Data which is initialized during
Startup */
#define FEE_NOINIT_DATA /* Data which is not initialized during
Startup */
#define FEE_CONST /* Data Constants */
/* ---------------------------------------------------------------------------*/
/* PWM */
/* ---------------------------------------------------------------------------*/
#define PWM_PUBLIC_CODE /* API functions */
#define PWM_PUBLIC_CONST /* API constants */
#define PWM_PRIVATE_CODE /* Internal functions */
#define PWM_PRIVATE_DATA /* Module internal data */
#define PWM_PRIVATE_CONST /* Internal ROM Data */
#define PWM_APPL_CODE /* callbacks of the Application */
#define PWM_APPL_CONST /* Applications' ROM Data */
#define PWM_APPL_DATA /* Applications' RAM Data */
#define PWM_FAST_DATA /* 'Near' RAM Data */
#define PWM_CONFIG_CONST /* Desc. Tables -> Config-dependent */
#define PWM_CONFIG_DATA /* Config. dependent (reg. size) data */
#define PWM_INIT_DATA /* Data which is initialized during
Startup */
#define PWM_NOINIT_DATA /* Data which is not initialized during
Startup */
#define PWM_CONST /* Data Constants */
/* ---------------------------------------------------------------------------*/
/* SPI */
/* ---------------------------------------------------------------------------*/
#define SPI_PUBLIC_CODE /* API functions */
#define SPI_PUBLIC_CONST /* API constants */
#define SPI_PRIVATE_CODE /* Internal functions */
#define SPI_PRIVATE_DATA /* Module internal data */
#define SPI_PRIVATE_CONST /* Internal ROM Data */
#define SPI_APPL_CODE /* callbacks of the Application */
#define SPI_APPL_CONST /* Applications' ROM Data */
#define SPI_APPL_DATA /* Applications' RAM Data */
#define SPI_FAST_DATA /* 'Near' RAM Data */
#define SPI_CONFIG_CONST /* Desc. Tables -> Config-dependent */
#define SPI_CONFIG_DATA /* Config. dependent (reg. size) data */
#define SPI_INIT_DATA /* Data which is initialized during
Startup */
#define SPI_NOINIT_DATA /* Data which is not initialized during
Startup */
#define SPI_CONST /* Data Constants */
/* ---------------------------------------------------------------------------*/
/* ADC */
/* ---------------------------------------------------------------------------*/
#define ADC_PUBLIC_CODE /* API functions */
#define ADC_PUBLIC_CONST /* API constants */
#define ADC_PRIVATE_CODE /* Internal functions */
#define ADC_PRIVATE_DATA /* Module internal data */
#define ADC_PRIVATE_CONST /* Internal ROM Data */
#define ADC_APPL_CODE /* callbacks of the Application */
#define ADC_APPL_CONST /* Applications' ROM Data */
#define ADC_APPL_DATA /* Applications' RAM Data */
#define ADC_FAST_DATA /* 'Near' RAM Data */
#define ADC_CONFIG_CONST /* Desc. Tables -> Config-dependent */
#define ADC_CONFIG_DATA /* Config. dependent (reg. size) data */
#define ADC_INIT_DATA /* Data which is initialized during
Startup */
#define ADC_NOINIT_DATA /* Data which is not initialized during
Startup */
#define ADC_CONST /* Data Constants */
/* ---------------------------------------------------------------------------*/
/* ICU */
/* ---------------------------------------------------------------------------*/
#define ICU_PUBLIC_CODE /* API functions */
#define ICU_PUBLIC_CONST /* API constants */
#define ICU_PRIVATE_CODE /* Internal functions */
#define ICU_PRIVATE_DATA /* Module internal data */
#define ICU_PRIVATE_CONST /* Internal ROM Data */
#define ICU_APPL_CODE /* callbacks of the Application */
#define ICU_APPL_CONST /* Applications' ROM Data */
#define ICU_APPL_DATA /* Applications' RAM Data */
#define ICU_FAST_DATA /* 'Near' RAM Data */
#define ICU_CONFIG_CONST /* Desc. Tables -> Config-dependent */
#define ICU_CONFIG_DATA /* Config. dependent (reg. size) data */
#define ICU_INIT_DATA /* Data which is initialized during
Startup */
#define ICU_NOINIT_DATA /* Data which is not initialized during
Startup */
#define ICU_CONST /* Data Constants */
/* -------------------------------------------------------------------------- */
/* FlexRay Driver */
/* -------------------------------------------------------------------------- */
#define FR_PRIVATE_CODE /* module internal functions */
#define FR_PRIVATE_CONST /* module internal consts */
#define FR_FAST_DATA /* module internal data in fast RAM */
#define FR_PRIVATE_DATA /* module internal data */
#define FR_PUBLIC_CODE /* API functions */
#define FR_PUBLIC_CONST /* API constants */
#define FR_CODE
#define FR_APPL_CODE /* callbacks of the Application */
#define FR_APPL_CONST /* Applications' ROM Data */
#define FR_VAR
#define FR_INIT_DATA /* module variables */
#define FR_CONST /* module constants */
#define FR_NOINIT_DATA /* module variables that are */
/* not initialized */
#define FR_VAR_POWER_ON_INIT /* module variables that are */
/* initialized on Powerup */
/*
* the applications' data blocks must have the same classifier
* like the EEPIF expects
*/
#define FR_APPL_DATA /* Applications' Ram Data */
#define FR_CONFIG_CONST /* Descriptor Tables -> Config-dependent */
#define FR_CONFIG_DATA /* Configuration dependent (reg. size) data */
#define FR_DATA /* Global Variables */
/* ---------------------------------------------------------------------------*/
/* CAN */
/* ---------------------------------------------------------------------------*/
#define CAN_AFCAN_PUBLIC_CODE /* API functions */
#define CAN_AFCAN_PUBLIC_CONST /* API constants */
#define CAN_AFCAN_PRIVATE_CODE /* Internal functions */
#define CAN_AFCAN_PRIVATE_DATA /* Module internal data */
#define CAN_AFCAN_PRIVATE_CONST /* Internal ROM Data */
#define CAN_AFCAN_APPL_CODE /* callbacks of the Application */
#define CAN_AFCAN_APPL_CONST /* Applications' ROM Data */
#define CAN_AFCAN_APPL_DATA /* Applications' RAM Data */
#define CAN_AFCAN_FAST_DATA /* 'Near' RAM Data */
#define CAN_AFCAN_CONFIG_CONST /* Desc. Tables -> Config-dependent */
#define CAN_AFCAN_CONFIG_DATA /* Config. dependent (reg. size) data */
#define CAN_AFCAN_INIT_DATA /* Data which is initialized during
Startup */
#define CAN_AFCAN_NOINIT_DATA /* Data which is not initialized during
Startup */
#define CAN_AFCAN_CONST /* Data Constants */
/* ---------------------------------------------------------------------------*/
/* LIN */
/* ---------------------------------------------------------------------------*/
#define LIN_PUBLIC_CODE /* API functions */
#define LIN_PUBLIC_CONST /* API constants */
#define LIN_PRIVATE_CODE /* Internal functions */
#define LIN_PRIVATE_DATA /* Module internal data */
#define LIN_PRIVATE_CONST /* Internal ROM Data */
#define LIN_APPL_CODE /* callbacks of the Application */
#define LIN_APPL_CONST /* Applications' ROM Data */
#define LIN_APPL_DATA /* Applications' RAM Data */
#define LIN_FAST_DATA /* 'Near' RAM Data */
#define LIN_CONFIG_CONST /* Desc. Tables -> Config-dependent */
#define LIN_CONFIG_DATA /* Config. dependent (reg. size) data */
#define LIN_INIT_DATA /* Data which is initialized during
Startup */
#define LIN_NOINIT_DATA /* Data which is not initialized during
Startup */
#define LIN_CONST /* Data Constants */
/* ---------------------------------------------------------------------------*/
/* FLS */
/* ---------------------------------------------------------------------------*/
#define FLS_PUBLIC_CODE /* API functions */
#define FLS_PUBLIC_CONST /* API constants */
#define FLS_PRIVATE_CODE /* Internal functions */
#define FLS_PRIVATE_DATA /* Module internal data */
#define FLS_PRIVATE_CONST /* Internal ROM Data */
#define FLS_APPL_CODE /* callbacks of the Application */
#define FLS_APPL_CONST /* Applications' ROM Data */
#define FLS_APPL_DATA /* Applications' RAM Data */
#define FLS_FAST_DATA /* 'Near' RAM Data */
#define FLS_CONFIG_CONST /* Desc. Tables -> Config-dependent */
#define FLS_CONFIG_DATA /* Config. dependent (reg. size) data */
#define FLS_INIT_DATA /* Data which is initialized during
Startup */
#define FLS_NOINIT_DATA /* Data which is not initialized during
Startup */
#define FLS_CONST /* Data Constants */
/**********************************************************************************************************************
* EcuAb_AsrIoHwAb START
*********************************************************************************************************************/
/*define error code or information code*/
#define IOHWAB_CODE
#define IOHWAB_VAR
#define IOHWAB_APPL_DATA
#define IOHWAB_APPL_CODE
#define IOHWAB_CONST
/*******************************************************************************
** Global Data Types **
*******************************************************************************/
/*******************************************************************************
** Function Prototypes **
*******************************************************************************/
#endif /* COMPILER_CFG_H */
/*******************************************************************************
** End of File **
*******************************************************************************/
<file_sep>/BSP/MCAL/Generic/Compiler/GHS/Startup_Files/Fx4/mak/startup_necv850_fx4_defs.mak
################################################################################
# REGISTRY
#
CC_INCLUDE_PATH += $(STARTUP_FX4_CORE_PATH)\src \
$(STARTUP_FX4_CORE_PATH)\inc
CPP_INCLUDE_PATH +=
ASM_INCLUDE_PATH += $(STARTUP_FX4_CORE_PATH)\src\
$(STARTUP_FX4_CORE_PATH)\inc
PREPROCESSOR_DEFINES +=
<file_sep>/BSP/MCAL/NvM/NvM_Cbk.h
/**
\addtogroup MODULE_NvM NvM
Non-volatile Memory Management Module.
*/
/*@{*/
/***************************************************************************//**
\file NvM_Cfg.h
\brief Callback of NVRAM Management Module.
\author zhaoyg
\version 1.0
\date 2012-3-27
\warning Copyright (C), 2012, PATAC.
*//*----------------------------------------------------------------------------
\history
<No.> <author> <time> <version> <description>
1 zhaoyg 2012-3-27 1.0 Create
*******************************************************************************/
#ifndef _NVM_CBK_H
#define _NVM_CBK_H
/*******************************************************************************
Include Files
*******************************************************************************/
/*******************************************************************************
Macro Definition
*******************************************************************************/
/*******************************************************************************
Type Definition
*******************************************************************************/
/*******************************************************************************
Prototype Declaration
*******************************************************************************/
extern void NvM_JobEndNotification(void);
extern void NvM_JobErrorNotification(void);
#endif /* #ifndef _NVM_CBK_H */
/*@}*/
|
d533b79da0fe810e0e63c1d682b65d9dbc9f93eb
|
[
"C",
"Makefile"
] | 218
|
C
|
HappyDg/ledheadlampbasedonfk4
|
76099a2f7af689bcda01ed415f33ae7f707b97b6
|
99bdcda47e8bf91119a02f97a4d9782eddf02465
|
refs/heads/master
|
<repo_name>edgard/docker-rtorrent<file_sep>/README.md
docker-rtorrent
---------------
This container runs rtorrent and rutorrent (using nginx and php-fpm).
Running manually
----------------
docker build -t edgard/rtorrent .
docker run -d --name rtorrent -p 80:80 -p 63256:63256 -v /srv/rtorrent:/data edgard/rtorrent
Running with make tasks
-----------------------
* **build**: build image
* **start**: start container in background
* **test**: start temporary test container *rtorrent-test*
* **test-stop**: stop and remove temporary test container
* **run**: start interactive container
* **push**: push image to docker hub
Check *Makefile* for additional information.
Login info
----------
Configure user/pass starting container with:
> -e USER=admin -e PASS=<PASSWORD>
Otherwise a 'admin' user with a random password will be created and you can get it from the logs.
rTorrent configuration
----------------------
If you want to use your own rtorrent config file or if you use the data directory mounted on host, you need to create the file at:
> $DATADIR/config/rtorrent.rc
<file_sep>/Dockerfile
FROM docker.io/ubuntu:vivid
MAINTAINER <NAME> <<EMAIL>>
# Keep image updated
ENV REFRESHED_AT 2015-07-28-05-16Z
# Add repositories and update base
RUN echo "deb http://archive.ubuntu.com/ubuntu/ vivid main restricted universe multiverse" > /etc/apt/sources.list \
&& echo "deb http://archive.ubuntu.com/ubuntu/ vivid-updates main restricted universe multiverse" >> /etc/apt/sources.list \
&& echo "deb http://archive.ubuntu.com/ubuntu/ vivid-backports main restricted universe multiverse" >> /etc/apt/sources.list \
&& echo "deb http://security.ubuntu.com/ubuntu vivid-security main restricted universe multiverse" >> /etc/apt/sources.list \
&& apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -qy
# Install software
RUN DEBIAN_FRONTEND=noninteractive apt-get install -qy --no-install-recommends supervisor ca-certificates unzip unrar rtorrent nginx curl procps ffmpeg mediainfo php5-fpm php5-cli php5-geoip \
&& mkdir -p /var/www \
&& curl -Ls http://dl.bintray.com/novik65/generic/rutorrent-3.6.tar.gz | tar zxf - -C /var/www \
&& curl -Ls http://dl.bintray.com/novik65/generic/plugins-3.6.tar.gz | tar zxf - -C /var/www/rutorrent \
&& chown www-data:www-data -R /var/www \
&& apt-get clean \
&& rm -rf /var/lib/apt /tmp/* /var/tmp/*
# Add custom files
COPY files/root /
# Start command
CMD ["/start"]
<file_sep>/files/root/start
#!/bin/bash
# -----------------------------------------------------------------------------
# docker /start script
# -----------------------------------------------------------------------------
# Create dir structure
if [ ! -d /data/config ]; then
mkdir -p /data/config
fi
if [ ! -d /data/rtorrent/download ]; then
mkdir -p /data/rtorrent/download
fi
if [ ! -d /data/rtorrent/session ]; then
mkdir -p /data/rtorrent/session
fi
if [ ! -d /data/rtorrent/watch ]; then
mkdir -p /data/rtorrent/watch
fi
# Remove stale rtorrent session lock
if [ -f /data/rtorrent/session/rtorrent.lock ]; then
rm -f /data/rtorrent/session/rtorrent.lock
fi
# Create user and password
user=${USER:-admin}
if [ -z "$PASS" ]; then
pass=$(openssl rand -base64 8)
cryptpass=$(openssl passwd -crypt "$pass")
else
pass=$PASS
cryptpass=$(openssl passwd -crypt "$PASS")
fi
echo "$user:$cryptpass" > /etc/nginx/htpasswd
echo "*** Credentials: $user:$pass"
# Run supervisor that in turn run the servers
exec /usr/bin/supervisord -n
|
6e9841c7c8e65aa4b4c4e48e20ae9b86fd826b30
|
[
"Markdown",
"Dockerfile",
"Shell"
] | 3
|
Markdown
|
edgard/docker-rtorrent
|
b5bc1e064e037a36d671831c9a5f2a9573a44d51
|
e6a84702a7654448656c635381880da08c9f9aae
|
refs/heads/master
|
<repo_name>Grandpied33/IOT_crypto<file_sep>/API.py
#!/usr/bin/env python3.5
#-*- coding: utf-8 -*-
############################################
#__author__ = <NAME> #
# __email__ = "<EMAIL>" #
# __status__ = "Production" #
############################################
import pandas
import requests
coinlist = requests.get('https://www.cryptocompare.com/api/data/coinlist/').json()
data=coinlist['Data']
choix = 0
while choix != 'bye':
choix = raw_input("Bonjour. \n Pour afficher la liste des cryptomonnaies, tapez 'liste'. Sinon taper le nom de la criptomonnaire dont vous voulez le prix. \n Pour quitter le programme tapez 'bye'.")
if(choix == 'liste'):
for datas in data:
print (datas)
elif(choix == 'bye'):
print('bye !')
else:
coinlist = requests.get('https://min-api.cryptocompare.com/data/price?fsym='+choix.upper()+'&tsyms=EUR').json()
prix= str(coinlist['EUR'])
print ("Votre cryptomonnaircryptomonnaie a une valeur de : "+prix +" €")
<file_sep>/README.md
# IOT_crypto
Un truc qui va taper dans une api en Python pour avoir le prix des cryptomonnaies
|
f2867ca506b3becc4cf6fc1033db3e62a1b4b981
|
[
"Markdown",
"Python"
] | 2
|
Python
|
Grandpied33/IOT_crypto
|
f7219ec9b17f461998d78f71f68cc0c27ab30780
|
67a2889af6b2a2d5dcb1eaab54f7223e1d1ac10e
|
refs/heads/master
|
<file_sep>using System;
using System.Data;
using System.Data.SqlClient;
using System.Web;
public partial class client_Webforms_Afterlogin_ClientALDivorceRegForm : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}<file_sep>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class client_Webforms_Beforelogin_ClientBLHome : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
lblTotActUsers.Text = Application["ActiveUsers"].ToString();
lblTotVisitors.Text = Application["TotalUsers"].ToString();
}
}<file_sep>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class client_Webforms_Afterlogin_Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
GetCookie();
}
void GetCookie()
{
HttpCookie marInfo = Request.Cookies["MarRegInfo"];
lblRegNo.Text = marInfo["RegNo"].ToString();
lblPlace.Text = marInfo["Place"].ToString();
lblRoomnm.Text = marInfo["RoomNo"].ToString();
lblDate.Text = marInfo["RegDate"].ToString();
lblTime.Text = marInfo["RegTime"].ToString();
lblRegUnder.Text = marInfo["RegUnder"].ToString();
}
}<file_sep>using System;
using System.Data.SqlClient;
public partial class client_Webforms_Beforelogin_ClientBLLogin : System.Web.UI.Page
{
static string strcon = @"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|Datadirectory|mardiv.mdf;Integrated Security=True";
SqlConnection con = new SqlConnection(strcon);
protected void Page_Load(object sender, EventArgs e)
{
txtUName.Focus();
}
protected void btnLogin_Click(object sender, EventArgs e)
{
string strSel;
strSel = "Select * from ClientMaster where UName= '" + txtUName.Text.Trim() + "'";
SqlCommand cmdSel = new SqlCommand(strSel, con);
SqlDataReader dr;
con.Open();
dr = cmdSel.ExecuteReader();
if (dr.Read() == true)
{
if (dr["Passwd"].ToString() == txtPasswd.Text.Trim())
{
//lblErrMsg.Text = "Login Successfull...";
Session["FirstName"] = dr["FirstName"].ToString();
Session["LastName"] = dr["LastName"].ToString();
Response.Redirect("../Afterlogin/ClientALHome.aspx");
}
else
{
lblErrMsg.Text = "Invalid Password";
txtPasswd.Text = "";
txtPasswd.Focus();
}
}
else
{
lblErrMsg.Text = "Invalid UserName";
txtUName.Text = "";
txtUName.Focus();
}
}
}<file_sep>using System;
using System.Data;
using System.Data.SqlClient;
using System.Web;
public partial class client_Webforms_Afterlogin_ClientALMarriageRegForm : System.Web.UI.Page
{
static string strcon = @"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|Datadirectory|mardiv.mdf;Integrated Security=True";
SqlConnection con = new SqlConnection(strcon);//establishes connection
int marId;
SqlCommand sqlCmd;
SqlDataReader dr;
protected void Page_Load(object sender, EventArgs e)
{
if(Session["FirstName"] !=null)
{
lblWelcomeMsg.Text = "Welcome Mr./Miss " + Session["FirstName"] + "" + Session["LastName"];
}
}
void SetValues()
{
txtmFName.Text = "Maniyo";
txtmLName.Text = "Patel";
txtmDOB.Text = "12-12-1998";
txtmAddress.Text = "xyz";
txtmEMailId.Text = "<EMAIL>";
txtmPhone.Text = "942784236";
ddlmReligion.Text = "Muslim";
txtfFName.Text = "Mena";
txtfLName.Text = "Shah";
txtfDOB.Text = "12-01-1998";
txtfAddress.Text = "xyz";
txtfEmailId.Text = "<EMAIL>";
txtfPhone.Text = "942784236";
ddlfReligion.Text = "Muslim";
}
void ClearAll()
{
txtmFName.Text = "";
txtmLName.Text = "";
txtmDOB.Text = "";
txtmAddress.Text = "";
txtmEMailId.Text = "";
txtmPhone.Text = "";
ddlmReligion.Text = "";
txtfFName.Text = "";
txtfLName.Text = "";
txtfDOB.Text = "";
txtfAddress.Text = "";
txtfEmailId.Text = "";
txtfPhone.Text = "";
ddlfReligion.Text = "";
}
protected void btnReset_Click(object sender, EventArgs e)
{
ClearAll();
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
sqlCmd = new SqlCommand();
sqlCmd.Connection = con;
sqlCmd.CommandType = CommandType.StoredProcedure;
con.Open();
SetValues();
sqlCmd.CommandText = "RetriveData";
SqlParameter[] cmdParam = {new SqlParameter("@TblNm","MarReg"),
new SqlParameter("@ClmNm","*"),
new SqlParameter("@strWhereClause",
"Where mEmailId='"+txtmEMailId.Text +
"' or fEmailId='"+txtfEmailId.Text+ "'" )};
foreach (SqlParameter parm in cmdParam)
{
sqlCmd.Parameters.Add(parm);
}
dr = sqlCmd.ExecuteReader(); // dr gets all data
//if (dr.Read())
//{
// con.Close(); //means dr got the data then true
// lblErrMsg.Text = "Email-id Already exist....";
// txtmEMailId.Text = "";
// txtfEmailId.Text = "";
// txtmEMailId.Focus();
//}
//else
//{
con.Close();
sqlCmd = new SqlCommand();
sqlCmd.Connection = con;
sqlCmd.CommandType = CommandType.StoredProcedure;
con.Open();
sqlCmd.CommandText = "InsertMarReg";
SqlParameter[] cmdParamIns = {new SqlParameter("@mFName",txtmFName.Text), new SqlParameter("@mLName",txtmLName.Text),
new SqlParameter("@mDOB",txtmDOB.Text), new SqlParameter("@mAddress",txtmAddress.Text),
new SqlParameter("@mEmailId",txtmEMailId.Text), new SqlParameter("@mPhone",txtmPhone.Text),
new SqlParameter("@mReligion", ddlmReligion.Text),
new SqlParameter("@fFName",txtfFName.Text), new SqlParameter("@fLName",txtfLName.Text),
new SqlParameter("@fDOB",txtfDOB.Text), new SqlParameter("@fAddress",txtfAddress.Text),
new SqlParameter("@fEmailId",txtfEmailId.Text), new SqlParameter("@fPhone",txtfPhone.Text),
new SqlParameter("@fReligion", ddlfReligion.Text)};
foreach (SqlParameter parm in cmdParamIns)
{
sqlCmd.Parameters.Add(parm);
}
sqlCmd.ExecuteNonQuery();
con.Close();
lblErrMsg.Text = "record Inserted Successfully........";
//ClearAll();
sqlCmd = new SqlCommand();
sqlCmd.Connection = con;
sqlCmd.CommandType = CommandType.StoredProcedure;
con.Open();
marId = GetId();
SetCookies();
Response.Redirect("ClientALMarriageReply.aspx");
//}
}
int GetId()
{
int myId;
sqlCmd.CommandText = "RetriveData";
SqlParameter[] cmdParam = {new SqlParameter("@TblNm","MarReg"),
new SqlParameter("@ClmNm","max(mrgId)"),
new SqlParameter("@strWhereClause","" )};
foreach (SqlParameter parm in cmdParam)
{
sqlCmd.Parameters.Add(parm);
}
dr = sqlCmd.ExecuteReader();
if (dr.Read())
{
myId = Convert.ToInt32(dr[0]);
return myId;
}
return 0;
}
void SetCookies()
{
HttpCookie MarRegInfo = new HttpCookie("MarRegInfo");
MarRegInfo["RegNo"] = marId.ToString();
MarRegInfo["Place"] = "Bhuti Japa";
MarRegInfo["RoomNo"] = "13";
MarRegInfo["RegDate"] = DateTime.Today.AddDays(2).ToString().Substring(0, 10).ToString();
MarRegInfo["RegTime"] = "12:00 P.M.";
if ((ddlmReligion.Text == "Muslim" || ddlmReligion.Text == "Christian") || (ddlfReligion.Text == "Muslim" || ddlfReligion.Text == "Christian"))
{
MarRegInfo["RegUnder"] = "Special Marriage Act";
}
else
{
MarRegInfo["RegUnder"] = "Hindu Marriage Act";
}
MarRegInfo.Expires = DateTime.Now.AddDays(1);
Response.Cookies.Add(MarRegInfo);
}
}<file_sep># Marriage-Registration-Web-App-MarDiv-
Web application (localhost) where user can register themselves for marriage and divorce purpose. Admin can view and manage all registered user. (all CRUD functionality with database)


<file_sep>using System;
using System.Data.SqlClient; //for sqlconnection,sqlcommand
using System.Data; //for dataset client
public partial class client_Webforms_Beforelogin_ClientBLSignup : System.Web.UI.Page
{
static string strcon = @"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|Datadirectory|mardiv.mdf;Integrated Security=True";
SqlConnection con = new SqlConnection(strcon);//establishes connection
protected void Page_Load(object sender, EventArgs e)
{
txtFName.Focus();
}
protected void btnSignUp_Click(object sender, EventArgs e)
{
string strSel = "Select * from ClientMaster where UName ='" + txtUName.Text.Trim() + "'" ;
SqlDataAdapter adptSel = new SqlDataAdapter();//to work in disconnected, (fill) can be used with this
DataSet ds = new DataSet();
SqlCommand cmdSel = new SqlCommand(strSel, con);//select update delete query
adptSel.SelectCommand = cmdSel;//execute cmdsel stored in strsel on connection con
adptSel.Fill(ds);//opens connection then strsel is executed then data is stored in ds
//ds can have multiple table. initially it has 0 tbales
// if username is same as txtUName then rows will me more than 0
if(ds.Tables[0].Rows.Count > 0)
{
lblErrMsg.Text = "Please Enter another User Name";
txtUName.Text = "";
txtUName.Focus();
}
else
{
string strGen;
if(rbGender.SelectedValue == "Male")
{
strGen = "Male";
}
else
{
strGen = "Female";
}
string strIns;
strIns = "Insert into ClientMaster (FirstName,LastName,DOB,Address,Email,Phone,Gender,ClientRel,UName,Passwd) values ('" +
txtFName.Text + "','" + txtLName.Text + "','" + txtDOB.Text + "','" + txtAddress.Text + "','" +
txtEmail.Text + "','" + txtPhone.Text + "','" + strGen + "','" + txtOther.Text + "','" + txtUName.Text + "','" +
txtPasswd.Text + "')";
con.Open();//to insert we need connection
//if we need to modify the database then dataset is of no use so we deed explicitly here disconnected wont work
SqlDataAdapter adptIns = new SqlDataAdapter();
//SqlCommand cmdIns = new SqlCommand(strIns, con);
//adptIns.InsertCommand = cmdIns;
//or
adptIns.InsertCommand = new SqlCommand(strIns,con);
adptIns.InsertCommand.ExecuteNonQuery();
lblErrMsg.Text = "Record Inserted Successfully...";
con.Close();
}
}
}<file_sep>using System;
using System.Data.SqlClient; // for sqlconnection , sqlcommand
public partial class admin_Webforms_Beforelogin_AdminBLAddAdmin : System.Web.UI.Page
{
static string constr = @"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|Datadirectory|mardiv.mdf;Integrated Security=True";
SqlConnection con = new SqlConnection(constr);
protected void Page_Load(object sender, EventArgs e)
{
txtFName.Focus();
// con.Open(); //
// lblErrMsg.Text = "Connection Established successfully....";
}
public void ClearAll()
{
txtFName.Text = "";
txtLName.Text = "";
txtUName.Text = "";
txtEmail.Text = "";
txtPasswd.Text = "";
txtCPasswd.Text = "";
lblErrMsg.Text = "";
}
protected void btnReset_Click(object sender, EventArgs e)
{
ClearAll();
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
string strIns;
strIns = "Insert into AdminMaster (FirstName,LastName," +
"Email,UName,Passwd) values('" + txtFName.Text.Trim() + "','" +
txtLName.Text.Trim() + "','" + txtEmail.Text.Trim() + "','" +
txtUName.Text.Trim() + "','" + txtPasswd.Text.Trim() + "')";
SqlCommand cmdIns = new SqlCommand(strIns, con);// con means road and what to be taken is shown by strins
con.Open();//establish the connection so we can drive vehicle
cmdIns.ExecuteNonQuery();//insert into table //it is not query so DML so we wrote nonquery
con.Close();// connection is closed because if connection is kept established then it will not get load
ClearAll();// clear all text box value
txtFName.Focus();// set focus on first
lblErrMsg.Text = "Record Inserted Successfully...";
}
}
|
11aa696da0f296f762713a516228cfedbc8a092d
|
[
"Markdown",
"C#"
] | 8
|
C#
|
vrajsoni98/Marriage-Registration-Web-App-MarDiv-
|
7d73582cf0c078027aa5e5285aa539f468a51001
|
e44883149b1d31949ad800e93f7c7a726db2beca
|
refs/heads/master
|
<repo_name>hungnso/btvn1<file_sep>/interger/main.js
class Interger {
constructor(output, firstSelector, secondSelector) {
this.firstSelector = firstSelector;
this.secondSelector = secondSelector;
this.output = document.getElementById(output)
}
find = () => {
let outputHTML = ''
const firstNumber = parseInt(
document.querySelector(this.firstSelector).value
);
const secondNumber = parseInt(
document.querySelector(this.secondSelector).value
);
let content = `<p class="title"> Các số nguyên tố trong khoảng ${firstNumber} và ${secondNumber} là: </p>`
outputHTML += content
for (let i = firstNumber; i <= secondNumber; i++) {
let result = 0
if (i == 2) {
let p1 = `<span class="text">${i}</span> `
outputHTML += p1
} else if (i > 2 && i % 2 != 0) {
for (let j = 3; j <= Math.sqrt(i); j += 2) {
if (i % j == 0) {
result = 1
break;
}
}
if(i > 1 && result == 0){
let p2 = `<span class="text">${i} - </span> `
outputHTML += p2
}
}
}
this.output.innerHTML = outputHTML
};
}
const interger = new Interger('output','.first','.second');
document.querySelector("button").addEventListener("click", () => {
interger.find();
});
<file_sep>/table/main.js
class Table {
constructor (tableSelector, rowsSelector, columnsSelector) {
this.rowsSelector = rowsSelector
this.columnsSelector = columnsSelector
this.table = document.querySelector(tableSelector)
}
generate = () => {
let tableHTML = ''
const rowsNumber = parseInt(document.querySelector(this.rowsSelector).value)
const columnsNumber = parseInt(document.querySelector(this.columnsSelector).value)
for (let i = 1; i <= rowsNumber; i++) {
let tr = '<tr>'
let td = ''
for (let j = 1; j <= columnsNumber; j++) {
if (i === 1) {
td = `<th class="header">
<input class ="header--text" type="text">
</th>`;
}
else {
td = `<td class = "content">
<input class ="content--text" type="text">
</td>`;
}
tr += td
}
tr += '</tr>'
tableHTML += tr
}
this.table.innerHTML = tableHTML
}
}
const table = new Table('.table', '.rows', '.columns')
document.querySelector('.button').addEventListener('click', () => {
table.generate()
});
|
0603c2ef2aaccd292b82efc953f0eef5dacb29e1
|
[
"JavaScript"
] | 2
|
JavaScript
|
hungnso/btvn1
|
d6169d2f480e151cbbb10d0837a1b5960795b21a
|
ff31b371081a59a03a35a96837d01feafc4fc640
|
refs/heads/master
|
<repo_name>kananats/slv<file_sep>/Assets/Controller.cs
using UnityEngine;
using UnityEngine.UI;
public class Controller : MonoBehaviour
{
public static Controller instance;
private static string KEY_CURRENT_LEVEL = "CurrentLevel";
private static string KEY_CURRENT_PERCENTAGE = "CurrentPercentage";
private static string KEY_TARGET_LEVEL = "TargetLevel";
public int[] accumulatedRounds;
public CurrentSkillLevel currentSkillLevel;
public TargetSkillLevel targetSkillLevel;
public InputField result;
void Start()
{
instance = this;
Load();
Calculate();
}
public void Calculate()
{
int currentRound = SkillLevelToRound(currentSkillLevel.level, currentSkillLevel.percentage);
int targetRound = SkillLevelToRound(targetSkillLevel.level);
int diff = targetRound - currentRound;
if (diff < 0)
diff = 0;
result.text = diff.ToString();
Save();
}
private int SkillLevelToRound(int level, int percentage = 0)
{
return (int)(accumulatedRounds[level - 1] + percentage * 0.01f * (accumulatedRounds[level] - accumulatedRounds[level - 1]));
}
private void Load()
{
if (!PlayerPrefs.HasKey(KEY_CURRENT_LEVEL))
PlayerPrefs.SetInt(KEY_CURRENT_LEVEL, 1);
if (!PlayerPrefs.HasKey(KEY_CURRENT_PERCENTAGE))
PlayerPrefs.SetInt(KEY_CURRENT_PERCENTAGE, 0);
if (!PlayerPrefs.HasKey(KEY_TARGET_LEVEL))
PlayerPrefs.SetInt(KEY_TARGET_LEVEL, 10);
currentSkillLevel.level = PlayerPrefs.GetInt(KEY_CURRENT_LEVEL);
currentSkillLevel.percentage = PlayerPrefs.GetInt(KEY_CURRENT_PERCENTAGE);
targetSkillLevel.level = PlayerPrefs.GetInt(KEY_TARGET_LEVEL);
}
private void Save()
{
PlayerPrefs.SetInt(KEY_CURRENT_LEVEL, currentSkillLevel.level);
PlayerPrefs.SetInt(KEY_CURRENT_PERCENTAGE, currentSkillLevel.percentage);
PlayerPrefs.SetInt(KEY_TARGET_LEVEL, targetSkillLevel.level);
}
}<file_sep>/README.md
# slv
Tower of Saviors Skill Level Calculator
<file_sep>/Assets/TargetSkillLevel.cs
using UnityEngine;
using UnityEngine.UI;
public class TargetSkillLevel : MonoBehaviour
{
public InputField levelField;
protected int _level;
public virtual int level
{
get
{
return _level;
}
set
{
_level = value;
if (_level >= 15)
_level = 15;
else if (level < 1)
_level = 1;
levelField.text = level.ToString();
}
}
public virtual void EV_EndEdit()
{
try
{
int level = int.Parse(levelField.text);
this.level = level;
}
catch (System.Exception)
{
levelField.text = level.ToString();
}
Controller.instance.Calculate();
}
}
<file_sep>/Assets/CurrentSkillLevel.cs
using UnityEngine;
using UnityEngine.UI;
public class CurrentSkillLevel : TargetSkillLevel
{
public InputField percentageField;
protected int _percentage;
public override int level
{
get
{
return _level;
}
set
{
_level = value;
if (_level >= 15)
{
_level = 15;
_percentage = 0;
}
else if (level < 1)
{
_level = 1;
_percentage = 0;
}
levelField.text = level.ToString();
percentageField.text = percentage.ToString();
}
}
public int percentage
{
get
{
return _percentage;
}
set
{
_percentage = value;
if (level == 15 || _percentage < 0)
_percentage = 0;
else if (_percentage > 99)
_percentage = 99;
levelField.text = level.ToString();
percentageField.text = percentage.ToString();
}
}
public override void EV_EndEdit()
{
try
{
int level = int.Parse(levelField.text);
int percentage = int.Parse(percentageField.text);
this.level = level;
this.percentage = percentage;
}
catch (System.Exception)
{
levelField.text = level.ToString();
percentageField.text = percentage.ToString();
}
Controller.instance.Calculate();
}
}
|
447d80454ba788541d6c7e68a641d571a26087fb
|
[
"Markdown",
"C#"
] | 4
|
C#
|
kananats/slv
|
8cc3c1a342c17e75ceeaf37c4419ea63ca038dbb
|
602c1adea382b727ca68eea60f9b3990d1ac10ed
|
refs/heads/master
|
<file_sep>def crossover(parents: list, probability: float):
pass<file_sep>import numpy as np
class University:
def __init__(self, rooms: list, courses: list):
self.rooms = rooms
self.courses = courses
times = []
for room in rooms:
times = times + room.available_time_slots
times = np.unique(times)
self.num_time_slots = max(times)
<file_sep>class Room:
def __init__(self, cap, times):
self.capacity = cap
self.available_time_slots = times<file_sep>import random
from Representation.University import University
import numpy as np
def eval_fitness(individual: list, university: University):
no_courses = [(x[1], x[2]) for x in individual]
unique = np.unique(no_courses)
double_bookings = len(no_courses) - len(unique)
room_vio = 0
for course in individual:
room_capacity = university.rooms[course[1]].capacity
if room_capacity < course[0].num_students:
room_vio += 1
time_dict = {}
clashes = 0
for course in individual:
if course[2] not in time_dict.keys():
time_dict[course[2]] = []
time_dict[course[2]] += course[0].courses_which_can_take
for item in time_dict.items():
item = item[1]
unique = np.unique(item)
clashes += len(item) - len(unique)
return double_bookings + room_vio + clashes
def penalty(individual: list):
pass
<file_sep>import random
def select(num_to_select: int, fitnesses: list, population: list):
selected = []
for i in range(num_to_select):
x = random.randint(0, len(population) - 1)
y = random.randint(0, len(population) - 1)
if fitnesses[x] > fitnesses[y]:
selected.append(population[x])
else:
selected.append(population[y])
return selected
def elitism(num_to_take: int, fitnesses: list, population: list):
both = zip(fitnesses, population)
both = sorted(both, key=lambda x: x[0])
fit, pop = zip(*both)
print(fit)
return pop[:num_to_take]
<file_sep>import random
from Representation.Random_Generator import generate_random_uni
from Representation.University import University
from Genetic_Algorithm.Selection import select
from Genetic_Algorithm.Recombination import crossover
from Genetic_Algorithm.Mutation import mutate
from Genetic_Algorithm.Fitness import eval_fitness
from Genetic_Algorithm.Selection import elitism
def ga(university: University):
max_gens = 100
pop_size = 50
num_elite = 5
mutation_prob = 0.3
crossover_prob = 0.8
gen_count = 0
population = generate_initial_population(university, pop_size)
fitness = [eval_fitness(indiv, university) for indiv in population]
while gen_count < max_gens and not stopping_criteria(fitness):
elites = elitism(num_elite, fitness, population)
parents = select(pop_size - len(elites), fitness, population)
print(parents)
offspring = crossover(parents, crossover_prob)
offspring = mutate(offspring, mutation_prob)
population = elites + offspring
fitness = [eval_fitness(indiv, university) for indiv in population]
gen_count += 1
def generate_initial_population(university: University, pop_size: int):
population = []
for i in range(pop_size):
indiv = []
for mod in university.courses:
room_no = random.randint(0, len(university.rooms)-1)
time_slot = random.randint(0, university.num_time_slots)
indiv.append((mod, room_no, time_slot))
population.append(indiv)
return population
def stopping_criteria(fitness):
return False
if __name__ == '__main__':
medium_uni = generate_random_uni(150, 10, 800, 10)
ga(medium_uni)
<file_sep>import random
from Representation.Course import Course
from Representation.Room import Room
from Representation.University import University
def generate_random_courses(n: int, lecturers: list, courses: list):
modules = []
for i in range(n):
num_students = random.randint(5, 200)
max_courses = 10 if 10 > len(courses) else len(courses)
num_courses = random.randint(1, max_courses)
num_lecturers = random.randint(1, 2)
random.shuffle(lecturers)
lecturers_module = lecturers[:num_lecturers]
random.shuffle(courses)
courses_module = courses[:num_courses]
two_hr = random.randint(0, 1)
num_hrs = random.randint(2, 4)
course = Course(num_students, lecturers_module, courses_module, num_hrs, two_hr)
modules.append(course)
return modules
def generate_random_rooms(n: int):
rooms = []
times = list(range(10))
for i in range(n):
capacity = random.randint(10, 300)
time = []
for j in range(5):
for x in random.sample(times, random.randint(0, 10)):
time.append((j * 10) + x)
room = Room(capacity, time)
rooms.append(room)
return rooms
def generate_random_uni(num_modules: int, num_rooms: int, num_lecturers: int, num_courses):
lecturers = list(range(num_lecturers))
courses = list(range(num_courses))
modules = generate_random_courses(num_modules, lecturers, courses)
rooms = generate_random_rooms(num_rooms)
return University(rooms, modules)
if __name__ == '__main__':
small_uni = generate_random_uni(50, 5, 35, 7)
medium_uni = generate_random_uni(150, 10, 800, 20)
large_uni = generate_random_uni(300, 25, 200, 30)
very_large_uni = generate_random_uni(1000, 100, 570, 175)
<file_sep>def mutate(offspring: list, probability: float):
pass<file_sep>class Course:
def __init__(self, num_students, lecturers, courses, hours, two_hours):
self.num_students = num_students
self.lecturers = lecturers
self.courses_which_can_take = courses
self.num_hours = hours
self.two_hour_count = two_hours
|
f41eaf5edfb010fcf38f86d38770b96b7b0a0774
|
[
"Python"
] | 9
|
Python
|
JamesKelly3/GeneticTimetabling
|
318ef8a2014b3b5e18a4118649c7d7d054639aba
|
ead7376d2b03e6ea4bddacbf6a4000c2a4669cf6
|
refs/heads/master
|
<file_sep>/*
*File: Car.h
*Author: <NAME>.
*Description: Declaration of the Car class.
*Last Mod: 11/09/2019
* */
class Car{
public:
char id;
int len;
enum orientation;
bool polarity;
Pos* head;
}
struct Pos{
int x;
int y;
}
<file_sep>/*
*File: Screen.h
*Author: <NAME>.
*Description: Interface of a Screen class
*Last Mod: 11/09/2019
* */
class Screen{
public:
//Displays its contents
void show() = 0;
//Clears screen and updates its contents
void update() = 0;
}
<file_sep>/*
*File: Garage.h
*Author: <NAME>.
*Description: Declaration of the Garage class, which is a container for Car.
*Last Mod: 11/09/2019
* */
class Garage{
public:
//Returns a pointer to a Car object given an ID
Car* getCar( string );
}
<file_sep>/*
*File: Logger.h
*Author: <NAME>.
*Description: Interface of a Logger class
*Last Mod: 11/09/2019
* */
#include <string>
using std::string;
class Logger{
public:
virtual void log( string ) = 0;
}
<file_sep>/*
*File: Matrix.h
*Author: <NAME>.
*Description: Interface of a Matrix class
*Last Mod: 11/09/2019
* */
class Matrix{
}
|
85ea383e6cd8391f03fc64c421d7e796086b869b
|
[
"C++"
] | 5
|
C++
|
carrral/rush-hour-cpp
|
2b18d76760362f111f100d50b49f549d93bdb0fa
|
904e60dbf5a12bd36ffe95c59517a12e40ac230c
|
refs/heads/master
|
<file_sep><?php
/**
* Created by PhpStorm.
* User: vad
* Date: 2/7/16
* Time: 11:54 PM
*/
namespace AppBundle\Controller\Administration;
use AppBundle\Form\Type\UserType;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use AppBundle\Entity\User;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Request;
/**
* @Route("/administration/user")
*/
class UserController extends Controller
{
/**
* @return array
* @Route("/", name="show_all_users")
* @Method("GET")
* @Template("AppBundle:User:showAll.html.twig")
*/
public function showAllAction()
{
$repository = $this->getDoctrine()->getRepository('AppBundle:User');
$users = $repository->findAll();
return ['users' => $users];
}
/**
* @param $slug
* @return array
* @Route("/set_user_role/{slug}", name="set_user_role")
* @Method("GET")
*/
public function setUserRoleAction($slug)
{
$em = $this->getDoctrine()->getManager();
$user = $em->getRepository('AppBundle:User')->findOneBy(['slug' => $slug]);
if (!$user) {
throw $this->createNotFoundException('Unable to find User entity.');
}
$user->setRoles(['ROLE_USER']);
$em->flush();
return $this->redirect($this->generateUrl('show_all_users'));
}
/**
* @param $slug
* @return array
* @Route("/set_moderator_role/{slug}", name="set_moderator_role")
* @Method("GET")
*/
public function setModeratorRoleAction($slug)
{
$em = $this->getDoctrine()->getManager();
$user = $em->getRepository('AppBundle:User')->findOneBy(['slug' => $slug]);
if (!$user) {
throw $this->createNotFoundException('Unable to find User entity.');
}
$user->setRoles(['ROLE_MODERATOR']);
$em->flush();
return $this->redirect($this->generateUrl('show_all_users'));
}
/**
* @param $slug
* @return array
* @Route("/switch_active/{slug}", name="switch_active")
* @Method("GET")
*/
public function switchActiveAction($slug)
{
$em = $this->getDoctrine()->getManager();
$user = $em->getRepository('AppBundle:User')->findOneBy(['slug' => $slug]);
if (!$user) {
throw $this->createNotFoundException('Unable to find User entity.');
}
$user->setIsActive(!$user->getIsActive());
$em->flush();
return $this->redirect($this->generateUrl('show_all_users'));
}
}<file_sep><?php
/**
* Created by PhpStorm.
* User: vad
* Date: 1/16/16
* Time: 7:37 PM
*/
namespace AppBundle\Controller\Administration;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use AppBundle\Entity\Article;
/**
* @Route("/administration")
*/
class AdministrationController extends Controller
{
/**
* @param Request $request
* @return array
* @Route("/", name="administration_homepage")
* @Method("GET")
* @Template("AppBundle:Administration:articlesList.html.twig")
*/
public function indexAction(Request $request)
{
$currentPage = $request->query->getInt('page', 1);
$repository = $this->getDoctrine()->getRepository('AppBundle:Article');
$articlesCount = $repository->findAllArticlesCount();
$nextPage = $this->get('app.pagination_service')->getNextPageNumber($articlesCount, $currentPage);
$articles = $repository->findAllArticles($currentPage, $this->getParameter('articles_show_at_a_time'));
if ($nextPage) {
$nextPageUrl = $this->generateUrl('administration_homepage', ['page' => $nextPage]);
} else {
$nextPageUrl = false;
}
$delete_forms = $this->get('app.delete_form_service')->getArticlesDeleteForms($articles);
if ($request->isXmlHttpRequest()) {
$content = $this->renderView('AppBundle:Administration:articlesForList.html.twig',
['articles' => $articles, 'delete_forms' => $delete_forms, 'nextPageUrl' => $nextPageUrl]);
return new Response($content);
}
return ['articles' => $articles, 'delete_forms' => $delete_forms, 'nextPageUrl' => $nextPageUrl];
}
}<file_sep><?php
/**
* Created by PhpStorm.
* User: vad
* Date: 2/7/16
* Time: 11:20 PM
*/
namespace AppBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class TagType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('name', TextType::class);
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => 'AppBundle\Entity\Tag',
]);
}
}<file_sep><?php
/**
* Created by PhpStorm.
* User: vad
* Date: 1/17/16
* Time: 6:02 PM
*/
namespace AppBundle\Controller\Blog;
use AppBundle\Entity\Comment;
use AppBundle\Form\Type\CommentType;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use AppBundle\Entity\Article;
use AppBundle\Form\Type\ArticleType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Request;
/**
* @Route("/article")
*/
class ArticleController extends Controller
{
/**
* @param $slug
* @return array
* @Route("/show/{slug}", name="show_article")
* @Method("GET")
* @Template("AppBundle:Blog:article.html.twig")
*/
public function showArticleAction($slug)
{
$repository = $this->getDoctrine()->getRepository('AppBundle:Article');
$article = $repository->findArticleBySlug($slug);
if (!$article) {
return $this->redirectToRoute('homepage');
}
$delete_comment_forms = $this->get('app.delete_form_service')->getCommentsDeleteForms($article[0]->getComments());
$comment = new Comment();
$form = $this->createForm(CommentType::class, $comment, [
'action' => $this->generateUrl('add_comment', ['slug' => $slug]),
'method' => 'POST',
])
->add('save', SubmitType::class, ['label' => 'Add comment']);
return [
'article' => $article,
'form' => $form->createView(),
'delete_comment_forms' => $delete_comment_forms
];
}
/**
* @param Request $request
* @param $slug
* @return \Symfony\Component\HttpFoundation\RedirectResponse
* @Route("/show/{slug}", name="add_comment")
* @Method("POST")
* @Template("AppBundle:Blog:article.html.twig")
*/
public function addCommentAction(Request $request, $slug)
{
if (!$this->get('security.authorization_checker')->isGranted('ROLE_USER')) {
throw $this->createAccessDeniedException();
}
$user = $this->getUser();
$repository = $this->getDoctrine()->getRepository('AppBundle:Article');
$article = $repository->findArticleBySlug($slug);
$comment = new Comment();
$comment->setUser($user);
$comment->setArticle($article[0]);
$form = $this->createForm(CommentType::class, $comment, [
'action' => $this->generateUrl('add_comment', ['slug' => $slug]),
'method' => 'POST',
])
->add('save', SubmitType::class, ['label' => 'Add comment']);
$form->handleRequest($request);
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->persist($comment);
$em->flush();
return $this->redirect($this->generateUrl('show_article', ['slug' => $comment->getArticle()->getSlug()]));
}
return [
'article' => $article,
'form' => $form->createView(),
];
}
/**
* @return array
* @Route("/new", name="new_article")
* @Method("GET")
* @Template("AppBundle:Article:form.html.twig")
*/
public function newAction()
{
$article = new Article();
$form = $this->createForm(ArticleType::class, $article, [
'action' => $this->generateUrl('create_article'),
'method' => 'POST',
])
->add('save', SubmitType::class, ['label' => 'Create']);
return ['form' => $form->createView()];
}
/**
* @param $slug
* @return array
* @Route("/edit/{slug}", name="edit_article")
* @Method("GET")
* @Template("AppBundle:Article:form.html.twig")
*/
public function editAction($slug)
{
$em = $this->getDoctrine()->getManager();
$article = $em->getRepository('AppBundle:Article')->findOneBy(['slug' => $slug]);
if (!$article) {
throw $this->createNotFoundException('Unable to find Article entity.');
}
$this->denyAccessUnlessGranted('edit', $article);
$form = $this->createForm(ArticleType::class, $article, [
'action' => $this->generateUrl('update_article', ['slug' => $slug]),
'method' => 'PUT',
])
->add('save', SubmitType::class, ['label' => 'Update']);
return ['form' => $form->createView(), 'article' => $article];
}
/**
* @param Request $request
* @return \Symfony\Component\HttpFoundation\RedirectResponse
* @Route("/", name="create_article")
* @Method("POST")
* @Template("AppBundle:Article:form.html.twig")
*/
public function createAction(Request $request)
{
if (!$this->get('security.authorization_checker')->isGranted('ROLE_MODERATOR')) {
throw $this->createAccessDeniedException();
}
$user = $this->getUser();
$article = new Article();
$article->setUser($user);
$form = $this->createForm(ArticleType::class, $article, [
'action' => $this->generateUrl('create_article'),
'method' => 'POST',
])
->add('save', SubmitType::class, ['label' => 'Create']);
$form->handleRequest($request);
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->persist($article);
$em->flush();
return $this->redirect($this->generateUrl('show_article', ['slug' => $article->getSlug()]));
}
return ['form' => $form->createView()];
}
/**
* @param Request $request
* @param $slug
* @return \Symfony\Component\HttpFoundation\RedirectResponse
* @Route("/{slug}", name="update_article")
* @Method("PUT")
* @Template("AppBundle:Article:form.html.twig")
*/
public function updateAction(Request $request, $slug)
{
$em = $this->getDoctrine()->getManager();
$article = $em->getRepository('AppBundle:Article')->findOneBy(['slug' => $slug]);
if (!$article) {
throw $this->createNotFoundException('Unable to find Article entity.');
}
$this->denyAccessUnlessGranted('edit', $article);
$form = $this->createForm(ArticleType::class, $article, [
'action' => $this->generateUrl('update_article', ['slug' => $slug]),
'method' => 'PUT',
])
->add('save', SubmitType::class, ['label' => 'Update']);
$form->handleRequest($request);
if ($form->isValid()) {
$em->flush();
return $this->redirect($this->generateUrl('show_article', ['slug' => $article->getSlug()]));
}
return ['form' => $form->createView()];
}
/**
* @param Request $request
* @param $slug
* @return \Symfony\Component\HttpFoundation\RedirectResponse
* @Route("/{slug}", name="delete_article")
* @Method("DELETE")
*/
public function deleteAction(Request $request, $slug)
{
$form = $this->get('app.delete_form_service')->createArticleDeleteForm($slug);
$form->handleRequest($request);
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$article = $em->getRepository('AppBundle:Article')->findOneBy(['slug' => $slug]);
if (!$article) {
throw $this->createNotFoundException('Unable to find Article entity.');
}
$this->denyAccessUnlessGranted('edit', $article);
$em->remove($article);
$em->flush();
}
return $this->redirect($this->generateUrl('homepage'));
}
}<file_sep><?php
/**
* Created by PhpStorm.
* User: vad
* Date: 2/8/16
* Time: 7:22 PM
*/
namespace AppBundle\Controller\Blog;
use AppBundle\Form\Type\CommentType;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Request;
/**
* @Route("/comment")
*/
class CommentController extends Controller
{
/**
* @param $id
* @return array
* @Route("/edit/{id}", name="edit_comment")
* @Method("GET")
* @Template("AppBundle:Comment:form.html.twig")
*/
public function editAction($id)
{
$em = $this->getDoctrine()->getManager();
$comment = $em->getRepository('AppBundle:Comment')->findOneBy(['id' => $id]);
if (!$comment) {
throw $this->createNotFoundException('Unable to find Comment entity.');
}
$this->denyAccessUnlessGranted('edit', $comment);
$form = $this->createForm(CommentType::class, $comment, [
'action' => $this->generateUrl('update_comment', ['id' => $id]),
'method' => 'PUT',
])
->add('save', SubmitType::class, ['label' => 'Update']);
return ['form' => $form->createView()];
}
/**
* @param Request $request
* @param $id
* @return \Symfony\Component\HttpFoundation\RedirectResponse
* @Route("/{id}", name="update_comment")
* @Method("PUT")
* @Template("AppBundle:Comment:form.html.twig")
*/
public function updateAction(Request $request, $id)
{
$em = $this->getDoctrine()->getManager();
$comment = $em->getRepository('AppBundle:Comment')->findOneBy(['id' => $id]);
if (!$comment) {
throw $this->createNotFoundException('Unable to find Comment entity.');
}
$this->denyAccessUnlessGranted('edit', $comment);
$form = $this->createForm(CommentType::class, $comment, [
'action' => $this->generateUrl('update_comment', ['id' => $id]),
'method' => 'PUT',
])
->add('save', SubmitType::class, ['label' => 'Update']);
$form->handleRequest($request);
if ($form->isValid()) {
$em->flush();
return $this->redirect($this->generateUrl('show_article', ['slug' => $comment->getArticle()->getSlug()]));
}
return ['form' => $form->createView()];
}
/**
* @param Request $request
* @param $id
* @return \Symfony\Component\HttpFoundation\RedirectResponse
* @Route("/{id}", name="delete_comment")
* @Method("DELETE")
*/
public function deleteAction(Request $request, $id)
{
$em = $this->getDoctrine()->getManager();
$comment = $em->getRepository('AppBundle:Comment')->findOneBy(['id' => $id]);
if (!$comment) {
throw $this->createNotFoundException('Unable to find Comment entity.');
}
$this->denyAccessUnlessGranted('edit', $comment);
$article_slug = $comment->getArticle()->getSlug();
$form = $this->get('app.delete_form_service')->createCommentDeleteForm($id);
$form->handleRequest($request);
if ($form->isValid()) {
$em->remove($comment);
$em->flush();
}
return $this->redirect($this->generateUrl('show_article', ['slug' => $article_slug]));
}
}<file_sep><?php
/**
* Created by PhpStorm.
* User: vad
* Date: 1/11/16
* Time: 11:47 PM
*/
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="comments")
* @ORM\Entity(repositoryClass="AppBundle\Entity\CommentRepository")
*/
class Comment
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="integer")
* @Assert\NotBlank()
* @Assert\Range(min = 1, max = 5)
*/
private $rating;
/**
* @ORM\Column(type="string", length=1000)
* @Assert\NotBlank()
* @Assert\Length(max = 1000)
*/
private $messageText;
/**
* @Gedmo\Timestampable(on="create")
* @ORM\Column(type="integer")
*/
private $createdAt;
/**
* @ORM\ManyToOne(targetEntity="Article", inversedBy="comments")
* @ORM\JoinColumn(name="article_id", referencedColumnName="id")
*/
private $article;
/**
* @ORM\ManyToOne(targetEntity="User", inversedBy="comments")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
*/
private $user;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set rating
*
* @param integer $rating
*
* @return Comment
*/
public function setRating($rating)
{
$this->rating = $rating;
return $this;
}
/**
* Get rating
*
* @return integer
*/
public function getRating()
{
return $this->rating;
}
/**
* Set messageText
*
* @param string $messageText
*
* @return Comment
*/
public function setMessageText($messageText)
{
$this->messageText = $messageText;
return $this;
}
/**
* Get messageText
*
* @return string
*/
public function getMessageText()
{
return $this->messageText;
}
/**
* Set createdAt
*
* @param integer $createdAt
*
* @return Comment
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Get createdAt
*
* @return integer
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Set article
*
* @param \AppBundle\Entity\Article $article
*
* @return Comment
*/
public function setArticle(\AppBundle\Entity\Article $article = null)
{
$this->article = $article;
return $this;
}
/**
* Get article
*
* @return \AppBundle\Entity\Article
*/
public function getArticle()
{
return $this->article;
}
/**
* Set user
*
* @param \AppBundle\Entity\User $user
*
* @return Comment
*/
public function setUser(\AppBundle\Entity\User $user = null)
{
$this->user = $user;
return $this;
}
/**
* Get user
*
* @return \AppBundle\Entity\User
*/
public function getUser()
{
return $this->user;
}
}
<file_sep>#!/bin/bash
echo "1. Install project"
echo "2. Create database"
echo "3. Load fixtures"
echo "4. Clear cache and logs"
echo "5. Generate entities"
echo "6. Run tests"
echo "7. Exit"
read item
case "$item" in
1)
curl -sS https://getcomposer.org/installer | php -- --install-dir=bin --filename=composer
php bin/composer install
rm bin/composer
npm install
./node_modules/.bin/bower install
./node_modules/.bin/gulp
;;
2)
php app/console doctrine:database:drop --force
php app/console doctrine:database:create
php app/console doctrine:schema:update --force
;;
3)
php app/console h:d:f:l --no-interaction
app/console create:blog:admin admin 1 <EMAIL>
;;
4)
app/console cache:clear
rm -rf app/cache/*
rm -rf app/logs/*
;;
5)
php app/console doctrine:generate:entities --no-backup AppBundle
;;
6)
php bin/phpunit -c app
;;
7)
exit
;;
esac<file_sep><?php
/**
* Created by PhpStorm.
* User: vad
* Date: 1/31/16
* Time: 4:31 PM
*/
namespace AppBundle\Services;
use AppBundle\Entity\Article;
use AppBundle\Entity\Comment;
use AppBundle\Entity\Tag;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormBuilder;
use Symfony\Component\Form\FormFactory;
use Symfony\Component\Routing\Router;
class DeleteFormService
{
private $formFactory;
private $router;
public function __construct(FormFactory $formFactory, Router $router)
{
$this->formFactory = $formFactory;
$this->router = $router;
}
/**
* @param $slug
* @return \Symfony\Component\Form\Form The form
*/
public function createArticleDeleteForm($slug)
{
/** @var FormBuilder $formBuilder */
$formBuilder = $this->formFactory->createBuilder();
return $formBuilder
->setAction($this->router->generate('delete_article', ['slug' => $slug]))
->setMethod('DELETE')
->add('submit', SubmitType::class)
->getForm();
}
/**
* @param $articles
* @return array
*/
public function getArticlesDeleteForms($articles) {
$delete_forms = [];
foreach ($articles as $article) {
/** @var Article $article_entity */
$article_entity = $article[0];
$delete_forms[$article_entity->getId()] = $this->createArticleDeleteForm($article_entity->getSlug())->createView();
}
return $delete_forms;
}
/**
* @param $slug
* @return \Symfony\Component\Form\Form The form
*/
public function createTagDeleteForm($slug)
{
/** @var FormBuilder $formBuilder */
$formBuilder = $this->formFactory->createBuilder();
return $formBuilder
->setAction($this->router->generate('delete_tag', ['slug' => $slug]))
->setMethod('DELETE')
->add('submit', SubmitType::class)
->getForm();
}
/**
* @param $tags
* @return array
*/
public function getTagsDeleteForms($tags) {
$delete_forms = [];
/** @var Tag $tag */
foreach ($tags as $tag) {
$delete_forms[$tag->getId()] = $this->createTagDeleteForm($tag->getSlug())->createView();
}
return $delete_forms;
}
/**
* @param $id
* @return \Symfony\Component\Form\Form The form
*/
public function createCommentDeleteForm($id)
{
/** @var FormBuilder $formBuilder */
$formBuilder = $this->formFactory->createBuilder();
return $formBuilder
->setAction($this->router->generate('delete_comment', ['id' => $id]))
->setMethod('DELETE')
->add('submit', SubmitType::class)
->getForm();
}
/**
* @param $comments
* @return array
*/
public function getCommentsDeleteForms($comments) {
$delete_forms = [];
/** @var Comment $comment */
foreach ($comments as $comment) {
$delete_forms[$comment->getId()] = $this->createCommentDeleteForm($comment->getId())->createView();
}
return $delete_forms;
}
}<file_sep>GeekHub, Advanced PHP 2015, Symfony
Blog by <NAME>
master:
[](https://travis-ci.org/vsmihaylovsky/gh_symfony_blog)
[](https://scrutinizer-ci.com/g/vsmihaylovsky/gh_symfony_blog/?branch=master)
[](https://scrutinizer-ci.com/g/vsmihaylovsky/gh_symfony_blog/?branch=master)
develop:
[](https://travis-ci.org/vsmihaylovsky/gh_symfony_blog)
[](https://scrutinizer-ci.com/g/vsmihaylovsky/gh_symfony_blog/?branch=develop)
[](https://scrutinizer-ci.com/g/vsmihaylovsky/gh_symfony_blog/?branch=develop)
=
A Symfony project created on January 9, 2016, 7:15 pm.
<file_sep><?php
/**
* Created by PhpStorm.
* User: vad
* Date: 2/7/16
* Time: 6:50 PM
*/
namespace AppBundle\Controller\Security;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use AppBundle\Form\Type\UserType;
use AppBundle\Entity\User;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Request;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
class RegistrationController extends Controller
{
/**
* @Route("/register", name="user_registration")
* @param Request $request
* @return \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
* @Template("AppBundle:Security:register.html.twig")
*/
public function registerAction(Request $request)
{
// 1) build the form
$user = new User();
$form = $this->createForm(UserType::class, $user)
->add('register', SubmitType::class, ['label' => 'Register!']);;
// 2) handle the submit (will only happen on POST)
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
// 3) Encode the password (you could also do this via Doctrine listener)
$password = $this->get('security.password_encoder')
->encodePassword($user, $user->getPlainPassword());
$user->setPassword($password);
// 4) save the User!
$em = $this->getDoctrine()->getManager();
$em->persist($user);
$em->flush();
// ... do any other work - like send them an email, etc
// maybe set a "flash" success message for the user
return $this->redirectToRoute('homepage');
}
return ['form' => $form->createView()];
}
}<file_sep><?php
/**
* Created by PhpStorm.
* User: vad
* Date: 2/7/16
* Time: 11:01 PM
*/
namespace AppBundle\Controller\Administration;
use AppBundle\Form\Type\TagType;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use AppBundle\Entity\Tag;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Request;
/**
* @Route("/administration/tag")
*/
class TagController extends Controller
{
/**
* @return array
* @Route("/", name="show_all_tags")
* @Method("GET")
* @Template("AppBundle:Tag:showAll.html.twig")
*/
public function showAllAction()
{
$repository = $this->getDoctrine()->getRepository('AppBundle:Tag');
$tags = $repository->findAll();
$delete_forms = $this->get('app.delete_form_service')->getTagsDeleteForms($tags);
return ['tags' => $tags, 'delete_forms' => $delete_forms];
}
/**
* @return array
* @Route("/new", name="new_tag")
* @Method("GET")
* @Template("AppBundle:Tag:form.html.twig")
*/
public function newAction()
{
$tag = new Tag();
$form = $this->createForm(TagType::class, $tag, [
'action' => $this->generateUrl('create_tag'),
'method' => 'POST',
])
->add('save', SubmitType::class, ['label' => 'Create']);
return ['form' => $form->createView()];
}
/**
* @param $slug
* @return array
* @Route("/edit/{slug}", name="edit_tag")
* @Method("GET")
* @Template("AppBundle:Tag:form.html.twig")
*/
public function editAction($slug)
{
$em = $this->getDoctrine()->getManager();
$tag = $em->getRepository('AppBundle:Tag')->findOneBy(['slug' => $slug]);
if (!$tag) {
throw $this->createNotFoundException('Unable to find Tag entity.');
}
$form = $this->createForm(TagType::class, $tag, [
'action' => $this->generateUrl('update_tag', ['slug' => $slug]),
'method' => 'PUT',
])
->add('save', SubmitType::class, ['label' => 'Update']);
return ['form' => $form->createView()];
}
/**
* @param Request $request
* @return \Symfony\Component\HttpFoundation\RedirectResponse
* @Route("/", name="create_tag")
* @Method("POST")
* @Template("AppBundle:Tag:form.html.twig")
*/
public function createAction(Request $request)
{
$tag = new Tag();
$form = $this->createForm(TagType::class, $tag, [
'action' => $this->generateUrl('create_tag'),
'method' => 'POST',
])
->add('save', SubmitType::class, ['label' => 'Create']);
$form->handleRequest($request);
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->persist($tag);
$em->flush();
return $this->redirect($this->generateUrl('new_tag'));
}
return ['form' => $form->createView()];
}
/**
* @param Request $request
* @param $slug
* @return \Symfony\Component\HttpFoundation\RedirectResponse
* @Route("/{slug}", name="update_tag")
* @Method("PUT")
* @Template("AppBundle:Tag:form.html.twig")
*/
public function updateAction(Request $request, $slug)
{
$em = $this->getDoctrine()->getManager();
$tag = $em->getRepository('AppBundle:Tag')->findOneBy(['slug' => $slug]);
if (!$tag) {
throw $this->createNotFoundException('Unable to find Tag entity.');
}
$form = $this->createForm(TagType::class, $tag, [
'action' => $this->generateUrl('update_tag', ['slug' => $slug]),
'method' => 'PUT',
])
->add('save', SubmitType::class, ['label' => 'Update']);
$form->handleRequest($request);
if ($form->isValid()) {
$em->flush();
return $this->redirect($this->generateUrl('edit_tag', ['slug' => $tag->getSlug()]));
}
return ['form' => $form->createView()];
}
/**
* @param Request $request
* @param $slug
* @return \Symfony\Component\HttpFoundation\RedirectResponse
* @Route("/{slug}", name="delete_tag")
* @Method("DELETE")
*/
public function deleteAction(Request $request, $slug)
{
$form = $this->get('app.delete_form_service')->createTagDeleteForm($slug);
$form->handleRequest($request);
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$tag = $em->getRepository('AppBundle:Tag')->findOneBy(['slug' => $slug]);
if (!$tag) {
throw $this->createNotFoundException('Unable to find Tag entity.');
}
$em->remove($tag);
$em->flush();
}
return $this->redirect($this->generateUrl('show_all_tags'));
}
}<file_sep><?php
/**
* Created by PhpStorm.
* User: vad
* Date: 1/31/16
* Time: 3:20 PM
*/
namespace AppBundle\Services;
class PaginationService
{
private $articlesShowAtATime;
/**
* PaginationService constructor.
* @param $articlesShowAtATime
*/
public function __construct($articlesShowAtATime)
{
$this->articlesShowAtATime = $articlesShowAtATime;
}
/**
* @param $articlesCount
* @param $currentPage
* @return mixed
*/
public function getNextPageNumber($articlesCount, $currentPage)
{
if ($articlesCount > ($this->articlesShowAtATime * $currentPage)) {
$nextPage = $currentPage + 1;
} else {
$nextPage = false;
}
return $nextPage;
}
}<file_sep><?php
/**
* Created by PhpStorm.
* User: vad
* Date: 1/13/16
* Time: 12:34 AM
*/
namespace AppBundle\Entity;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Tools\Pagination\Paginator;
class ArticleRepository extends EntityRepository
{
/**
* @param $slug
* @return array
*/
public function findArticleBySlug($slug)
{
return $this->createQueryBuilder('a')
->select('a, user, t, c, avg(c1.rating) as comments_rating')
->leftJoin('a.user', 'user')
->leftJoin('a.tags', 't')
->leftJoin('a.comments', 'c')
->leftJoin('a.comments', 'c1')
->groupBy('a, t, c')
->orderBy('c.createdAt', 'DESC')
->where("a.slug = '$slug'")
->getQuery()
->getOneOrNullResult();
}
/**
* @param $articlesShowAtATime
* @param $currentPage
* @return Article[] array
*/
public function findAllArticles($currentPage, $articlesShowAtATime)
{
$query = $this->getFindAllArticlesQuery()
->getQuery()
->setFirstResult($articlesShowAtATime * ($currentPage - 1))
->setMaxResults($articlesShowAtATime);
return new Paginator($query);
}
public function findAllArticlesCount()
{
return $this->getFindAllArticlesCountQuery()
->getQuery()
->getSingleScalarResult();
}
/**
* @param $slug
* @param $currentPage
* @param $articlesShowAtATime
* @return Article[] array
*/
public function findAllUserArticles($slug, $currentPage, $articlesShowAtATime)
{
$query = $this->getFindAllArticlesQuery()
->where("user.slug = '$slug'")
->getQuery()
->setFirstResult($articlesShowAtATime * ($currentPage - 1))
->setMaxResults($articlesShowAtATime);
return new Paginator($query);
}
/**
* @param $slug
* @return mixed
*/
public function findAllUserArticlesCount($slug)
{
return $this->getFindAllArticlesCountQuery()
->join('a.user', 'user')
->where("user.slug = '$slug'")
->getQuery()
->getSingleScalarResult();
}
/**
* @param $slug
* @param $currentPage
* @param $articlesShowAtATime
* @return Article[] array
*/
public function findAllTagArticles($slug, $currentPage, $articlesShowAtATime)
{
$query = $this->getFindAllArticlesQuery()
->join('a.tags', 't1')
->where("t1.slug = '$slug'")
->getQuery()
->setFirstResult($articlesShowAtATime * ($currentPage - 1))
->setMaxResults($articlesShowAtATime);
return new Paginator($query);
}
/**
* @param $slug
* @return mixed
*/
public function findAllTagArticlesCount($slug)
{
return $this->getFindAllArticlesCountQuery()
->join('a.tags', 't')
->where("t.slug = '$slug'")
->getQuery()
->getSingleScalarResult();
}
/**
* @param $search_string
* @param $currentPage
* @param $articlesShowAtATime
* @return Article[] array
*/
public function findSearchedArticles($search_string, $currentPage, $articlesShowAtATime)
{
$query = $this->getFindAllArticlesQuery()
->where("a.header LIKE '%$search_string%'")
->getQuery()
->setFirstResult($currentPage)
->setMaxResults($articlesShowAtATime);
return new Paginator($query);
}
/**
* @param $search_string
* @return mixed
*/
public function findSearchedArticlesCount($search_string)
{
return $this->getFindAllArticlesCountQuery()
->where("a.header LIKE '%$search_string%'")
->getQuery()
->getSingleScalarResult();
}
/**
* @param $articles_count
* @return array
*/
public function findMostPopularArticles($articles_count)
{
return $this->createQueryBuilder('a')
->select('a.header, a.slug, avg(c.rating) as comments_rating')
->join('a.comments', 'c')
->groupBy('a.header, a.slug')
->orderBy('comments_rating', 'DESC')
->setFirstResult(0)
->setMaxResults($articles_count)
->getQuery()
->getResult();
}
/**
* @return \Doctrine\ORM\QueryBuilder
*/
private function getFindAllArticlesQuery()
{
return $this->createQueryBuilder('a')
->select('a, user, t, count(c.id) as comments_count, avg(c.rating) as comments_rating')
->join('a.user', 'user')
->leftJoin('a.tags', 't')
->leftJoin('a.comments', 'c')
->groupBy('a, t')
->orderBy('a.createdAt', 'DESC');
}
/**
* @return \Doctrine\ORM\QueryBuilder
*/
private function getFindAllArticlesCountQuery()
{
return $this->createQueryBuilder('a')
->select('count(a.id)');
}
}<file_sep><?php
namespace AppBundle\Controller\Blog;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Component\HttpFoundation\Request;
use AppBundle\Entity\User;
use AppBundle\Entity\Tag;
use Symfony\Component\HttpFoundation\Response;
class BlogController extends Controller
{
/**
* @param Request $request
* @return array
* @Route("/", name="homepage")
* @Method("GET")
* @Template("AppBundle:Blog:articlesList.html.twig")
*/
public function indexAction(Request $request)
{
$currentPage = $request->query->getInt('page', 1);
$repository = $this->getDoctrine()->getRepository('AppBundle:Article');
$articlesCount = $repository->findAllArticlesCount();
$nextPage = $this->get('app.pagination_service')->getNextPageNumber($articlesCount, $currentPage);
$articles = $repository->findAllArticles($currentPage, $this->getParameter('articles_show_at_a_time'));
if ($nextPage) {
$nextPageUrl = $this->generateUrl('homepage', ['page' => $nextPage]);
} else {
$nextPageUrl = false;
}
$delete_forms = $this->get('app.delete_form_service')->getArticlesDeleteForms($articles);
if ($request->isXmlHttpRequest()) {
$content = $this->renderView('AppBundle:Blog:articlesForList.html.twig',
[
'articles' => $articles,
'nextPageUrl' => $nextPageUrl,
'delete_forms' => $delete_forms
]);
return new Response($content);
}
return [
'articles' => $articles,
'nextPageUrl' => $nextPageUrl,
'delete_forms' => $delete_forms
];
}
/**
* @param Request $request
* @param $slug
* @return array
* @Route("/author/{slug}", name="show_user_articles")
* @Method("GET")
* @Template("AppBundle:Blog:articlesList.html.twig")
*/
public function showUserArticlesAction(Request $request, $slug)
{
$currentPage = $request->query->getInt('page', 1);
$repository = $this->getDoctrine()->getRepository('AppBundle:Article');
$articlesCount = $repository->findAllUserArticlesCount($slug);
$nextPage = $this->get('app.pagination_service')->getNextPageNumber($articlesCount, $currentPage);
$articles = $repository->findAllUserArticles($slug, $currentPage, $this->getParameter('articles_show_at_a_time'));
if ($nextPage) {
$nextPageUrl = $this->generateUrl('show_user_articles', ['slug' => $slug, 'page' => $nextPage]);
} else {
$nextPageUrl = false;
}
$delete_forms = $this->get('app.delete_form_service')->getArticlesDeleteForms($articles);
if ($request->isXmlHttpRequest()) {
$content = $this->renderView('AppBundle:Blog:articlesForList.html.twig',
['articles' => $articles, 'nextPageUrl' => $nextPageUrl, 'delete_forms' => $delete_forms]);
return new Response($content);
}
$repository = $this->getDoctrine()->getRepository('AppBundle:User');
$user = $repository->findOneBy(['slug' => $slug]);
return [
'articles' => $articles,
'articles_description' => ['type' => 1, 'text' => $user ? $user->getUsername() : null],
'nextPageUrl' => $nextPageUrl,
'delete_forms' => $delete_forms
];
}
/**
* @param Request $request
* @param $slug
* @return array
* @Route("/tag/{slug}", name="show_tag_articles")
* @Method("GET")
* @Template("AppBundle:Blog:articlesList.html.twig")
*/
public function showTagArticlesAction(Request $request, $slug)
{
$currentPage = $request->query->getInt('page', 1);
$repository = $this->getDoctrine()->getRepository('AppBundle:Article');
$articlesCount = $repository->findAllTagArticlesCount($slug);
$nextPage = $this->get('app.pagination_service')->getNextPageNumber($articlesCount, $currentPage);
$articles = $repository->findAllTagArticles($slug, $currentPage, $this->getParameter('articles_show_at_a_time'));
if ($nextPage) {
$nextPageUrl = $this->generateUrl('show_tag_articles', ['slug' => $slug, 'page' => $nextPage]);
} else {
$nextPageUrl = false;
}
$delete_forms = $this->get('app.delete_form_service')->getArticlesDeleteForms($articles);
if ($request->isXmlHttpRequest()) {
$content = $this->renderView('AppBundle:Blog:articlesForList.html.twig',
['articles' => $articles, 'nextPageUrl' => $nextPageUrl, 'delete_forms' => $delete_forms]);
return new Response($content);
}
$repository = $this->getDoctrine()->getRepository('AppBundle:Tag');
$tag = $repository->findOneBy(['slug' => $slug]);
return [
'articles' => $articles,
'articles_description' => ['type' => 2, 'text' => $tag ? $tag->getName() : null],
'nextPageUrl' => $nextPageUrl,
'delete_forms' => $delete_forms
];
}
/**
* @param Request $request
* @return array
* @Route("/search/", name="search_articles")
* @Method("GET")
* @Template("AppBundle:Blog:articlesList.html.twig")
*/
public function showSearchArticlesAction(Request $request)
{
$currentPage = $request->query->getInt('page', 1);
$search_string = $request->query->get('q');
$repository = $this->getDoctrine()->getRepository('AppBundle:Article');
$articlesCount = $repository->findSearchedArticlesCount($search_string);
$nextPage = $this->get('app.pagination_service')->getNextPageNumber($articlesCount, $currentPage);
$articles = $repository->findSearchedArticles($search_string, $currentPage, $this->getParameter('articles_show_at_a_time'));
if ($nextPage) {
$nextPageUrl = $this->generateUrl('search_articles', ['q' => $search_string, 'page' => $nextPage]);
} else {
$nextPageUrl = false;
}
$delete_forms = $this->get('app.delete_form_service')->getArticlesDeleteForms($articles);
if ($request->isXmlHttpRequest()) {
$content = $this->renderView('AppBundle:Blog:articlesForList.html.twig',
['articles' => $articles, 'nextPageUrl' => $nextPageUrl, 'delete_forms' => $delete_forms]);
return new Response($content);
}
return [
'articles' => $articles,
'articles_description' => ['type' => 3, 'text' => $search_string],
'nextPageUrl' => $nextPageUrl,
'delete_forms' => $delete_forms
];
}
}<file_sep><?php
/**
* Created by PhpStorm.
* User: vad
* Date: 1/11/16
* Time: 11:46 PM
*/
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="tags")
* @ORM\Entity(repositoryClass="AppBundle\Entity\TagRepository")
*/
class Tag
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=50)
* @Assert\NotBlank()
* @Assert\Length(max = 50)
*/
private $name;
/**
* @Gedmo\Slug(fields={"name"}, updatable=true, separator="_")
* @ORM\Column(type="string", length=50)
* @Assert\Length(max = 50)
*/
private $slug;
/**
* @ORM\ManyToMany(targetEntity="Article", mappedBy="tags")
* @ORM\JoinTable(name="articles_tags")
*/
private $articles;
public function __construct() {
$this->articles = new ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set name
*
* @param string $name
*
* @return Tag
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set slug
*
* @param string $slug
*
* @return Tag
*/
public function setSlug($slug)
{
$this->slug = $slug;
return $this;
}
/**
* Get slug
*
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* Add article
*
* @param \AppBundle\Entity\Article $article
*
* @return Tag
*/
public function addArticle(\AppBundle\Entity\Article $article)
{
$this->articles[] = $article;
return $this;
}
/**
* Remove article
*
* @param \AppBundle\Entity\Article $article
*/
public function removeArticle(\AppBundle\Entity\Article $article)
{
$this->articles->removeElement($article);
}
/**
* Get articles
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getArticles()
{
return $this->articles;
}
}
<file_sep><?php
namespace AppBundle\Entity;
use Doctrine\ORM\EntityRepository;
/**
* CommentRepository
*
* This class was generated by the PhpStorm "Php Annotations" Plugin. Add your own custom
* repository methods below.
*/
class CommentRepository extends EntityRepository
{
/**
* @param $comments_count
* @return array
*/
public function findLatestComments($comments_count)
{
return $this->createQueryBuilder('c')
->select('c, a')
->join('c.article', 'a')
->orderBy('c.createdAt', 'DESC')
->setFirstResult(0)
->setMaxResults($comments_count)
->getQuery()
->getResult();
}
}
<file_sep><?php
/**
* Created by PhpStorm.
* User: vad
* Date: 1/11/16
* Time: 11:41 PM
*/
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
/**
* @ORM\Entity
* @ORM\Table(name="articles")
* @ORM\Entity(repositoryClass="AppBundle\Entity\ArticleRepository")
* @Vich\Uploadable
*/
class Article
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=100)
* @Assert\NotBlank()
* @Assert\Length(max = 100)
*/
private $header;
/**
* @Vich\UploadableField(mapping="article_image", fileNameProperty="imageName")
*
* @Assert\File(maxSize="6000000",
* mimeTypes={
* "image/jpeg",
* "image/jpg",
* "image/png"})
*
* @var File
*/
private $imageFile;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @var string
*/
private $imageName;
/**
* @Gedmo\Slug(fields={"header"}, updatable=true, separator="_")
* @ORM\Column(type="string", length=100)
* @Assert\Length(max = 100)
*/
private $slug;
/**
* @ORM\Column(type="text")
* @Assert\Length(max = 10000)
*/
private $content;
/**
* @Gedmo\Timestampable(on="create")
* @ORM\Column(type="integer")
*/
private $createdAt;
/**
* @Gedmo\Timestampable(on="change", field={"header", "content"})
* @ORM\Column(type="integer", nullable=true)
*/
private $updatedAt;
/**
* @ORM\ManyToOne(targetEntity="User", inversedBy="articles")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
*/
private $user;
/**
* @ORM\ManyToMany(targetEntity="Tag", inversedBy="articles")
*/
private $tags;
/**
* @ORM\OneToMany(targetEntity="Comment", mappedBy="article", cascade={"persist", "remove"}, orphanRemoval=true)
*/
private $comments;
public function __construct()
{
$this->tags = new ArrayCollection();
$this->comments = new ArrayCollection();
}
/**
* @param File|\Symfony\Component\HttpFoundation\File\UploadedFile $image
*/
public function setImageFile(File $image = null)
{
$this->imageFile = $image;
if ($image) {
$this->updatedAt = time();
}
}
/**
* @return File
*/
public function getImageFile()
{
return $this->imageFile;
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set header
*
* @param string $header
*
* @return Article
*/
public function setHeader($header)
{
$this->header = $header;
return $this;
}
/**
* Get header
*
* @return string
*/
public function getHeader()
{
return $this->header;
}
/**
* Set imageName
*
* @param string $imageName
*
* @return Article
*/
public function setImageName($imageName)
{
$this->imageName = $imageName;
return $this;
}
/**
* Get imageName
*
* @return string
*/
public function getImageName()
{
return $this->imageName;
}
/**
* Set slug
*
* @param string $slug
*
* @return Article
*/
public function setSlug($slug)
{
$this->slug = $slug;
return $this;
}
/**
* Get slug
*
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* Set content
*
* @param string $content
*
* @return Article
*/
public function setContent($content)
{
$this->content = $content;
return $this;
}
/**
* Get content
*
* @return string
*/
public function getContent()
{
return $this->content;
}
/**
* Set createdAt
*
* @param integer $createdAt
*
* @return Article
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Get createdAt
*
* @return integer
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Set updatedAt
*
* @param integer $updatedAt
*
* @return Article
*/
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Get updatedAt
*
* @return integer
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Set user
*
* @param \AppBundle\Entity\User $user
*
* @return Article
*/
public function setUser(\AppBundle\Entity\User $user = null)
{
$this->user = $user;
return $this;
}
/**
* Get user
*
* @return \AppBundle\Entity\User
*/
public function getUser()
{
return $this->user;
}
/**
* Add tag
*
* @param \AppBundle\Entity\Tag $tag
*
* @return Article
*/
public function addTag(\AppBundle\Entity\Tag $tag)
{
$this->tags[] = $tag;
return $this;
}
/**
* Remove tag
*
* @param \AppBundle\Entity\Tag $tag
*/
public function removeTag(\AppBundle\Entity\Tag $tag)
{
$this->tags->removeElement($tag);
}
/**
* Get tags
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getTags()
{
return $this->tags;
}
/**
* Add comment
*
* @param \AppBundle\Entity\Comment $comment
*
* @return Article
*/
public function addComment(\AppBundle\Entity\Comment $comment)
{
$this->comments[] = $comment;
return $this;
}
/**
* Remove comment
*
* @param \AppBundle\Entity\Comment $comment
*/
public function removeComment(\AppBundle\Entity\Comment $comment)
{
$this->comments->removeElement($comment);
}
/**
* Get comments
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getComments()
{
return $this->comments;
}
}
<file_sep><?php
/**
* Created by PhpStorm.
* User: vad
* Date: 1/11/16
* Time: 11:39 PM
*/
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\AdvancedUserInterface;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="blog_users")
* @ORM\Entity(repositoryClass="AppBundle\Entity\UserRepository")
* @UniqueEntity(fields="email", message="Email already taken")
* @UniqueEntity(fields="username", message="Username already taken")
*/
class User implements AdvancedUserInterface, \Serializable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, unique=true)
* @Assert\NotBlank()
* @Assert\Length(max = 255)
*/
private $username;
/**
* @ORM\Column(type="string", length=64)
*/
private $password;
/**
* @ORM\Column(type="string", length=60, unique=true)
* @Assert\NotBlank()
* @Assert\Length(max = 60)
* @Assert\Email()
*/
private $email;
/**
* @ORM\Column(name="is_active", type="boolean")
*/
private $isActive;
/**
* @ORM\Column(name="roles", type="simple_array")
* @Assert\NotBlank()
*/
private $roles;
/**
* @Gedmo\Slug(fields={"username"}, updatable=true, separator="_")
* @ORM\Column(type="string", length=255, unique=true)
* @Assert\Length(max = 255)
*/
private $slug;
/**
* @ORM\OneToMany(targetEntity="Article", mappedBy="user", cascade={"persist", "remove"}, orphanRemoval=true)
*/
private $articles;
/**
* @ORM\OneToMany(targetEntity="Comment", mappedBy="user", cascade={"persist", "remove"}, orphanRemoval=true)
*/
private $comments;
/**
* @Assert\NotBlank()
* @Assert\Length(max = 4096)
*/
private $plainPassword;
public function __construct()
{
$this->isActive = true;
$this->articles = new ArrayCollection();
$this->roles = ['ROLE_USER'];
}
public function getUsername()
{
return $this->username;
}
public function getRoles()
{
return $this->roles;
}
public function getSalt()
{
// you *may* need a real salt depending on your encoder
// see section on salt below
return null;
}
public function getPassword()
{
return $this-><PASSWORD>;
}
public function eraseCredentials()
{
}
/** @see \Serializable::serialize() */
public function serialize()
{
return serialize(array(
$this->id,
$this->username,
$this->password,
$this->isActive,
// see section on salt below
// $this->salt,
));
}
/** @see \Serializable::unserialize()
* @param string $serialized
*/
public function unserialize($serialized)
{
list (
$this->id,
$this->username,
$this->password,
$this->isActive,
// see section on salt below
// $this->salt
) = unserialize($serialized);
}
/**
* @return mixed
*/
public function getPlainPassword()
{
return $this->plainPassword;
}
/**
* @param mixed $plainPassword
*/
public function setPlainPassword($plainPassword)
{
$this->plainPassword = $plainPassword;
}
public function isAccountNonExpired()
{
return true;
}
public function isAccountNonLocked()
{
return true;
}
public function isCredentialsNonExpired()
{
return true;
}
public function isEnabled()
{
return $this->isActive;
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set username
*
* @param string $username
*
* @return User
*/
public function setUsername($username)
{
$this->username = $username;
return $this;
}
/**
* Set password
*
* @param string $password
*
* @return User
*/
public function setPassword($password)
{
$this->password = $password;
return $this;
}
/**
* Set email
*
* @param string $email
*
* @return User
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
/**
* Get email
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* Set isActive
*
* @param boolean $isActive
*
* @return User
*/
public function setIsActive($isActive)
{
$this->isActive = $isActive;
return $this;
}
/**
* Get isActive
*
* @return boolean
*/
public function getIsActive()
{
return $this->isActive;
}
/**
* Set roles
*
* @param array $roles
*
* @return User
*/
public function setRoles($roles)
{
$this->roles = $roles;
return $this;
}
/**
* Set slug
*
* @param string $slug
*
* @return User
*/
public function setSlug($slug)
{
$this->slug = $slug;
return $this;
}
/**
* Get slug
*
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* Add article
*
* @param \AppBundle\Entity\Article $article
*
* @return User
*/
public function addArticle(\AppBundle\Entity\Article $article)
{
$this->articles[] = $article;
return $this;
}
/**
* Remove article
*
* @param \AppBundle\Entity\Article $article
*/
public function removeArticle(\AppBundle\Entity\Article $article)
{
$this->articles->removeElement($article);
}
/**
* Get articles
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getArticles()
{
return $this->articles;
}
/**
* Add comment
*
* @param \AppBundle\Entity\Comment $comment
*
* @return User
*/
public function addComment(\AppBundle\Entity\Comment $comment)
{
$this->comments[] = $comment;
return $this;
}
/**
* Remove comment
*
* @param \AppBundle\Entity\Comment $comment
*/
public function removeComment(\AppBundle\Entity\Comment $comment)
{
$this->comments->removeElement($comment);
}
/**
* Get comments
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getComments()
{
return $this->comments;
}
}
<file_sep><?php
/**
* Created by PhpStorm.
* User: vad
* Date: 1/31/16
* Time: 5:43 PM
*/
namespace AppBundle\Twig;
use Doctrine\Bundle\DoctrineBundle\Registry;
use Twig_Extension;
use Twig_SimpleFunction;
class AppExtension extends Twig_Extension
{
protected $doctrine;
private $mostPopularArticlesCount;
private $latestCommentsCount;
public function __construct(Registry $doctrine, $mostPopularArticlesCount, $latestCommentsCount)
{
$this->doctrine = $doctrine;
$this->mostPopularArticlesCount = $mostPopularArticlesCount;
$this->latestCommentsCount = $latestCommentsCount;
}
public function getFunctions()
{
return [
new Twig_SimpleFunction('tagsCloud', [$this, 'getTagsCloud']),
new Twig_SimpleFunction('mostPopularArticles', [$this, 'getMostPopularArticles']),
new Twig_SimpleFunction('latestComments', [$this, 'getLatestComments']),
];
}
/**
* @return array
*/
public function getTagsCloud()
{
$repository = $this->doctrine->getRepository('AppBundle:Tag');
$tagsCloud = $repository->getTagCloud();
if (!$tagsCloud) {
return null;
}
$tag_weights = array_map(function ($tag) {
return $tag['articles_count'];
}, $tagsCloud);
$t_min = min($tag_weights);
$t_max = max($tag_weights);
$f_max = 2;
foreach ($tagsCloud as &$tag) {
$tag['tag_weight'] = 65 * (1 + (($f_max * ($tag['articles_count'] - $t_min)) / ($t_max - $t_min)));
}
return $tagsCloud;
}
/**
* @return array
*/
public function getMostPopularArticles()
{
$repository = $this->doctrine->getRepository('AppBundle:Article');
return $repository->findMostPopularArticles($this->mostPopularArticlesCount);
}
/**
* @return array
*/
public function getLatestComments()
{
$repository = $this->doctrine->getRepository('AppBundle:Comment');
return $repository->findLatestComments($this->latestCommentsCount);
}
/**
* @return string
*/
public function getName()
{
return 'app_extension';
}
}<file_sep><?php
/**
* Created by PhpStorm.
* User: vad
* Date: 1/18/16
* Time: 10:49 PM
*/
namespace AppBundle\Tests\Form\Type;
use AppBundle\Form\Type\CommentType;
use Symfony\Component\Form\Test\TypeTestCase;
use AppBundle\Entity\Comment;
class CommentTypeTest extends TypeTestCase
{
public function testSubmitValidData()
{
$formData = array(
'rating' => '5',
'messageText' => 'message text',
);
$form = $this->factory->create(CommentType::class);
$object = new Comment();
$object->setRating(5);
$object->setMessageText('message text');
$form->submit($formData);
$this->assertTrue($form->isSynchronized());
$this->assertEquals($object, $form->getData());
$view = $form->createView();
$children = $view->children;
foreach (array_keys($formData) as $key) {
$this->assertArrayHasKey($key, $children);
}
}
}<file_sep><?php
/**
* Created by PhpStorm.
* User: vad
* Date: 2/7/16
* Time: 4:16 PM
*/
namespace AppBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use AppBundle\Entity\User;
class CreateUserWithAdminRoleCommand extends ContainerAwareCommand
{
protected function configure()
{
$this
->setName('create:blog:admin')
->setDescription('Create user with admin role')
->addArgument(
'username',
InputArgument::REQUIRED,
'username'
)
->addArgument(
'password',
InputArgument::REQUIRED,
'password'
)
->addArgument(
'email',
InputArgument::REQUIRED,
'email'
);
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$user = new User();
$user->setUsername($input->getArgument('username'));
$user->setEmail($input->getArgument('email'));
$user->setRoles(['ROLE_ADMIN']);
$password = $this->getContainer()->get('security.password_encoder')
->encodePassword($user, $input->getArgument('password'));
$user->setPassword($password);
$em = $this->getContainer()->get('doctrine')->getManager();
$em->persist($user);
$em->flush();
}
}<file_sep><?php
/**
* Created by PhpStorm.
* User: vad
* Date: 1/13/16
* Time: 12:34 AM
*/
namespace AppBundle\Entity;
use Doctrine\ORM\EntityRepository;
class TagRepository extends EntityRepository
{
/**
* @return array
*/
public function getTagCloud()
{
return $this->createQueryBuilder('t')
->select('t, count(a.id) as articles_count')
->join('t.articles', 'a')
->groupBy('t')
->orderBy('t.name')
->getQuery()
->getResult();
}
}
|
1fa7d18f8259dfadec305aa05765bce7a44a0211
|
[
"Markdown",
"PHP",
"Shell"
] | 22
|
PHP
|
vsmihaylovsky/gh_symfony_blog
|
67fea874e0db79c156e63ea08387b57c4ac87f6d
|
1875fb3e1e567a11e45317674e586653eb27325c
|
refs/heads/8.0
|
<file_sep>
# -*- coding: utf-8 -*-
##############################################################################
#
# Authors: <NAME>
# Copyright (c) 2015 Acsone SA/NV (http://www.acsone.eu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp import fields, models
class HrTimesheetReport(models.Model):
_inherit = "hr.timesheet.report"
_name = "hr.timesheet.report"
task_id = fields.Many2one('project.task', string='Task', readonly=True)
def _select(self):
select_str = super(HrTimesheetReport, self)._select()
select_str += ", aal.task_id as task_id"
return select_str
def _group_by(self):
group_by_str = super(HrTimesheetReport, self)._group_by()
group_by_str += ", aal.task_id"
return group_by_str
<file_sep># -*- coding: utf-8 -*-
##############################################################################
#
# Author: <NAME> (Camptocamp)
# Author: <NAME> (Camptocamp)
# Copyright 2011 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from datetime import datetime, timedelta
from pytz import timezone
import pytz
from openerp.osv import orm, fields
from openerp.tools.translate import _
from openerp.tools import (DEFAULT_SERVER_DATE_FORMAT,
DEFAULT_SERVER_DATETIME_FORMAT)
def get_number_days_between_dates(date_from, date_to):
datetime_from = datetime.strptime(
date_from, DEFAULT_SERVER_DATETIME_FORMAT)
datetime_to = datetime.strptime(date_to, DEFAULT_SERVER_DATETIME_FORMAT)
difference = datetime_to - datetime_from
# return result and add a day
return difference.days + 1
def get_start_of_day(date_str):
dt_start = datetime.strptime(date_str, DEFAULT_SERVER_DATE_FORMAT)
return dt_start.replace(hour=0, minute=0, second=0)
def get_end_of_day(date_str):
dt_end = datetime.strptime(date_str, DEFAULT_SERVER_DATE_FORMAT)
return dt_end.replace(hour=23, minute=59, second=59)
def get_utc_datetime(date, local_tz):
local_dt = local_tz.localize(date)
return local_dt.astimezone(pytz.utc)
def get_utc_start_of_day(date_str, local_tz):
return get_utc_datetime(get_start_of_day(date_str), local_tz)
def get_utc_end_of_day(date_str, local_tz):
return get_utc_datetime(get_end_of_day(date_str), local_tz)
class HolidaysImport(orm.TransientModel):
_name = 'hr.timesheet.holidays.import'
_description = 'Wizard to import holidays in a timesheet'
def _get_default_holidays(self, cr, uid, context=None):
res = []
timesheet_obj = self.pool['hr_timesheet_sheet.sheet']
line_obj = self.pool['hr.analytic.timesheet']
timesheet_id = context['active_id']
timesheet = timesheet_obj.browse(
cr, uid, timesheet_id, context=context)
local_tz = timezone(context.get('tz'))
date_from = get_start_of_day(timesheet.date_from)
date_from_str = date_from.strftime(DEFAULT_SERVER_DATETIME_FORMAT)
date_utc_from = get_utc_datetime(date_from, local_tz).strftime(
DEFAULT_SERVER_DATETIME_FORMAT)
date_to = get_end_of_day(timesheet.date_to)
date_to_str = date_to.strftime(DEFAULT_SERVER_DATETIME_FORMAT)
date_utc_to = get_utc_datetime(date_to, local_tz).strftime(
DEFAULT_SERVER_DATETIME_FORMAT)
cr.execute(
"select id, date_from, date_to, name from hr_holidays where "
"(((date_from <= %s and date_to >= %s and date_to <= %s) or "
"(date_from >= %s and date_from <= %s and date_to >= %s) or "
"(date_from >= %s and date_from <= %s and date_to >= %s and "
"date_to <= %s) or "
"(date_from <= %s and date_to >= %s)) and user_id = %s and "
"state = 'validate')",
(date_utc_from, date_utc_from, date_utc_to,
date_utc_from, date_utc_to, date_utc_to,
date_utc_from, date_utc_to, date_utc_from, date_utc_to,
date_utc_from, date_utc_to, uid))
holidays = cr.fetchall()
if not holidays:
raise orm.except_orm(
_('Information'), _('No holidays for the current timesheet.'))
for holiday in holidays:
valid = True
h_id = holiday[0]
h_date_from = holiday[1] < timesheet.date_from \
and date_from_str or holiday[1]
h_date_to = holiday[2] > timesheet.date_to \
and date_to_str or holiday[2]
h_name = holiday[3]
nb_days = get_number_days_between_dates(h_date_from, h_date_to)
for day in range(nb_days):
str_datetime_current = (
datetime.strptime(h_date_from,
DEFAULT_SERVER_DATETIME_FORMAT)
+ timedelta(days=day)).strftime(DEFAULT_SERVER_DATE_FORMAT)
line_ids = line_obj.search(
cr, uid, [('date', '=', str_datetime_current),
('name', '=', h_name),
('user_id', '=', uid)], context=context)
if line_ids:
valid = False
if not valid:
raise orm.except_orm(
_('UserError'), _('Holidays already imported.'))
res.append(h_id)
return res
_columns = {
'holidays_ids': fields.many2many(
'hr.holidays', 'hr_holidays_rel', 'id', 'holiday_id', 'Holidays',
domain="[('state', '=', 'validate'),('user_id','=',uid)]"),
}
_defaults = {
'holidays_ids': _get_default_holidays,
}
def import_holidays(self, cr, uid, ids, context=None):
if context is None:
context = {}
timesheet_obj = self.pool['hr_timesheet_sheet.sheet']
employee_obj = self.pool['hr.employee']
al_ts_obj = self.pool['hr.analytic.timesheet']
attendance_obj = self.pool['hr.attendance']
anl_account_obj = self.pool['account.analytic.account']
timesheet_id = context['active_id']
timesheet = timesheet_obj.browse(cr, uid, timesheet_id,
context=context)
employee_id = employee_obj.search(
cr, uid, [('user_id', '=', uid)], context=context)[0]
if timesheet.state != 'draft':
raise orm.except_orm(
_('UserError'),
_('You can not modify a confirmed timesheet, please ask the '
'manager !'))
wizard = self.browse(cr, uid, ids, context=context)[0]
employee = employee_obj.browse(cr, uid, employee_id, context=context)
hours_per_day = employee.company_id.timesheet_hours_per_day
if not hours_per_day:
raise orm.except_orm(
_('UserError'),
_('The number of hours per day is not configured on the '
'company.'))
if not wizard.holidays_ids:
raise orm.except_orm(_('Information'), _('No holidays to import.'))
local_tz = timezone(context.get('tz'))
errors = []
for holiday in wizard.holidays_ids:
if not holiday.holiday_status_id.analytic_account_id.id:
raise orm.except_orm(
_('Error !'),
_("Holiday Leave Type %s has no associated analytic "
"account !") % holiday.holiday_status_id.name)
analytic_account_id = \
holiday.holiday_status_id.analytic_account_id.id
anl_account = anl_account_obj.browse(cr, uid, analytic_account_id,
context)
if holiday.date_from < timesheet.date_from:
dt_ts_from = get_utc_start_of_day(timesheet.date_from,
local_tz)
holiday.date_from = dt_ts_from.strftime(
DEFAULT_SERVER_DATETIME_FORMAT)
if holiday.date_to > timesheet.date_to:
dt_ts_to = get_utc_end_of_day(timesheet.date_to, local_tz)
holiday.date_to = dt_ts_to.strftime(
DEFAULT_SERVER_DATETIME_FORMAT)
nb_days = get_number_days_between_dates(holiday.date_from,
holiday.date_to)
for day in range(nb_days):
dt_current = (datetime.strptime(holiday.date_from,
DEFAULT_SERVER_DATETIME_FORMAT)
+ timedelta(days=day))
# datetime as date at midnight
str_dt_current = dt_current.strftime(
DEFAULT_SERVER_DATETIME_FORMAT)
dt_utc_current = get_utc_datetime(
dt_current.replace(hour=0, minute=0, second=0), local_tz)
str_dt_utc_current = dt_utc_current.strftime(
DEFAULT_SERVER_DATETIME_FORMAT)
# Test if is week day in local tz
day_of_the_week = dt_current.isoweekday()
# skip the non work days
if day_of_the_week in (6, 7):
continue
# Create timesheet lines
existing_ts_ids = al_ts_obj.search(
cr, uid, [('date', '=', str_dt_current),
('name', '=', holiday.name),
('user_id', '=', uid)])
if not existing_ts_ids:
unit_id = al_ts_obj._getEmployeeUnit(cr, uid, context)
product_id = al_ts_obj._getEmployeeProduct(cr, uid,
context)
journal_id = al_ts_obj._getAnalyticJournal(cr, uid,
context)
holiday_day = {
'name': holiday.name or _('Holidays'),
'date': str_dt_current,
'unit_amount': hours_per_day,
'product_uom_id': unit_id,
'product_id': product_id,
'user_id': uid,
'account_id': anl_account.id,
'to_invoice': anl_account.to_invoice.id,
'sheet_id': timesheet.id,
'journal_id': journal_id,
}
on_change_values = al_ts_obj.on_change_unit_amount(
cr, uid, False, product_id, hours_per_day,
employee.company_id.id, unit=unit_id,
journal_id=journal_id, context=context)
if on_change_values:
holiday_day.update(on_change_values['value'])
al_ts_obj.create(cr, uid, holiday_day, context)
else:
errors.append('%s: There already is an analytic line.' %
str_dt_current)
# Create attendances
existing_attendances = attendance_obj.search(
cr, uid, [('name', '=', str_dt_utc_current),
('employee_id', '=', employee_id)])
if not existing_attendances:
# get hours and minutes (tuple) from a float time
hours = divmod(hours_per_day * 60, 60)
date_end = dt_utc_current + \
timedelta(hours=int(hours[0]), minutes=int(hours[1]))
str_date_end = date_end.strftime(
DEFAULT_SERVER_DATETIME_FORMAT)
start = {
'name': str_dt_utc_current,
'action': 'sign_in',
'employee_id': employee_id,
'sheet_id': timesheet.id,
}
end = {
'name': str_date_end,
'action': 'sign_out',
'employee_id': employee_id,
'sheet_id': timesheet.id,
}
attendance_obj.create(cr, uid, start, context)
attendance_obj.create(cr, uid, end, context)
else:
errors.append('%s: There already is an attendance.' %
str_dt_current)
if errors:
errors_str = "\n".join(errors)
raise orm.except_orm(_('Errors'), errors_str)
return {'type': 'ir.actions.act_window_close'}
|
21d23dc45c8ba2d772a0cacfaa389a3186f287a1
|
[
"Python"
] | 2
|
Python
|
taktik/hr-timesheet
|
d5ab96dde1ebd24e4f74c8a4b79f57d3d99d10c7
|
dfa55ab4657b74da10abc0f18a8b0c69e1a3dec3
|
refs/heads/master
|
<file_sep># Argentometry
### Common psychometric task implementations for Silver Lab
#### How to use DigitSpan and SART v2.0
**Introduction**
These tasks are designed to be as plug-and-play as possible, with a simple CSV-based data output format.
The tasks have been tested to run on PsychoPy Standalone version 1.84.0 only. The PsychoPy development team is not very consistent about maintaining backwards compatability of experiment scripts between versions, and the tasks may need updating to work with future releases.
When setting up the experiment, one should create a run file for each task you want to use, on each computer you intend to run the task on. One can use the "<task>-example.py" file as a template. The options you can change are visible at the top of the task definitions in the argentometry folder (i.e. `sart.py` and `digitspan.py`). It's a good idea to change the data output directory, for example, and for the computer in 582J, to add "sound_init_samples = 44100" to the run file, as that computer has sound output issues. After the run files have been created, you can simply use these in PsychoPy to run the experiments.
**Usage:**
DigitSpan:
1. Open PsychoPy 1.84.0
2. Open the DigitSpan run file in PsychoPy.
3. Click the green "run" button on the top row of the PsychoPy command ribbon.
4. The test will begin. Instructions for the user will be presented on the initial screen.
5. Once the test has successfully completed, data will be written in a folder entitled "digitspan_data" (by default, this can be overridden in the run file) in the run file's working directory, to a file named '<subject_id>_<test_num>.csv'.
6. Once the test has completed, (i.e., the "Thank you for your participation." screen has shown), the program will quit. You should take a look at the data that was printed to make sure it looks reasonable.
7. If the test errors, pressing "q" at any time during the trials will quit the test immediately. Alternatively, Command-Alt-Esc can be used to force PsychoPy to quit from the Force Quit menu.
SART:
1. Open PsychoPy 1.84.0
2. Open the SART runfile in PsychoPy.
3. Click the green "run" button on the top row of the PsychoPy command ribbon.
4. The test will begin. Instructions for the user will be presented on the initial screen.
5. Once the test has successfully completed, data will be written in a folder entitled "sart_data" (by default, this can be overridden in the run file) in the run file's working directory, to a file named '<subject_id>_<test_num>.csv'.
6. Once the test has completed, (i.e. the "Thank you for your participation." screen has shown), the program will quit. You should take a look at the data that was printed and make sure it looks reasonable.
7. If the test errors, pressing "q" at any time during the trials will quit the test immediately. Alternatively, Command-Alt-Esc can be used to force PsychoPy to quit from the Force Quit menu.
**Known Bugs:**
Due to some problems in the audio libraries PsychoPy uses on x64 Macs, the program may occasionally have trouble quitting, or may have irregular sound. On failures to quit, the Command-Alt-Esc method seems to be the most reliable way to regain control, at the risk of losing data. On sound problems, one should see if changing the value of the sampling frequency in the sound initialization from 48000 to 44100 fixes the problem. Different computers may require different values.
**Development Notes:**
The tasks have been written to be somewhat modular and adaptable. Changing parameters can be achieved by passing keyword arguments to the object created in the run files. Please contibute any improvements, extensions, or bug fixes by contacting <EMAIL> or by filing an issue/pull request in the Git repository. Credit and attribution is given to <NAME>, who wrote the initial version of the task, as well as to <NAME>, Dr. <NAME>, <NAME>, <NAME>, and other contributors at UC Berkeley, Silver Lab, and elsewhere.
<file_sep>from psychopy import visual, core, event, gui, sound
from datetime import datetime
import random
import numpy
import sys
import os
import csv
from collections import defaultdict
import json
from pprint import pprint
class DigitSpan(object):
def __init__(self, **kwargs):
self.DATA_DIR = kwargs.get('data_dir', 'digitspan_data')
self.MONITOR = kwargs.get('monitor', 'testMonitor')
self.MONITOR_RESOLUTION = kwargs.get('monitor_resolution', (1024, 768))
self.SOUND_GENDER = kwargs.get('sound_gender', 'female')
self.SOUND_PATH = kwargs.get('sound_path', os.path.join(os.path.dirname(os.path.realpath(__file__)), 'sounds'))
self.SOUND_INIT_SAMPLES = kwargs.get('sound_init_samples', 48000)
self.N_PRACTICE_TRIALS = kwargs.get('practice_trials', 2)
self.LEN_PRACTICE_TRIAL = kwargs.get('practice_trial_len', 3)
self.DIGIT_DISPLAY_TIME = kwargs.get('digit_display_time', 0.500)
# renamed from "IN_BETWEEN_DIGITS_TIME"
self.DIGIT_DISPLAY_GAP = kwargs.get('digit_display_gap', 0.300)
self.NUM_TRIAL_BLOCKS = kwargs.get('trial_blocks', 1)
self.INTER_TRIAL_DELAY = kwargs.get('inter_trial_delay', 0.500)
self.sequence_range = {
'forward': {
'min': kwargs.get('forward_min', 3),
'max': kwargs.get('forward_max', 15)
},
'reverse': {
'min': kwargs.get('reverse_min', 2),
'max': kwargs.get('reverse_max', 15)
}
}
self.MAX_TRIALS_WRONG = kwargs.get('max_wrong_trials', 2)
self.FULLSCREEN = kwargs.get('fullscreen', True)
if not os.path.isdir(self.DATA_DIR):
try:
os.mkdir(self.DATA_DIR)
except Exception as e:
print e.getMessage()
print "Error: cannot create data directory: " + self.DATA_DIR
sys.exit(1)
while True:
# tuple of form: (subject_id, test_number)
subject_info = self.get_subject_info(sys.argv[1:])
self.log_file = os.path.join(
self.DATA_DIR, '_'.join(subject_info) + '.csv')
if os.path.isfile(self.log_file):
rename_dialog = gui.Dlg(title='Error: Log File Exists')
rename_dialog.addText("A log file with the subject ID " + subject_info[0] +
" and test number " + subject_info[1] + " already exists. Overwrite?")
rename_dialog.show()
if rename_dialog.OK:
self.log_file = open(self.log_file, "w")
break
else:
# not exactly necessary but w/e
continue
else:
self.log_file = open(self.log_file, "w")
break
# now log_file is a proper file
self.data = []
# this should load Pyo. However, it may require manually symlinking in
# the newest liblo.
sound.init(self.SOUND_INIT_SAMPLES, buffer=128)
self.sound_correct = sound.Sound(value=440, secs=0.4)
self.sound_incorrect = sound.Sound(value=330, secs=0.4)
self.sound_files = [sound.Sound(value=os.path.join(self.SOUND_PATH, fn)) for fn in os.listdir(self.SOUND_PATH)
if fn.startswith(self.SOUND_GENDER) and fn.endswith('.wav')]
# this is a bad way of doing this. Should load from a file.
self.sequences = {
'forward': [(9, 7),
(6, 3),
(5, 8, 2),
(6, 9, 4),
(7, 2, 8, 6),
(6, 4, 3, 9),
(4, 2, 7, 3, 1),
(7, 5, 8, 3, 6),
(3, 9, 2, 4, 8, 7),
(6, 1, 9, 4, 7, 3),
(4, 1, 7, 9, 3, 8, 6),
(6, 9, 1, 7, 4, 2, 8),
(3, 8, 2, 9, 6, 1, 7, 4),
(5, 8, 1, 3, 2, 6, 4, 7),
(2, 7, 5, 8, 6, 3, 1, 9, 4),
(7, 1, 3, 9, 4, 2, 5, 6, 8)],
'reverse': [(3, 1),
(2, 4),
(4, 6),
(5, 7),
(6, 2, 9),
(4, 7, 5),
(8, 2, 7, 9),
(4, 9, 6, 8),
(6, 5, 8, 4, 3),
(1, 5, 4, 8, 6),
(5, 3, 7, 4, 1, 8),
(7, 2, 4, 8, 5, 6),
(8, 1, 4, 9, 3, 6, 2),
(4, 7, 3, 9, 6, 2, 8),
(9, 4, 3, 7, 6, 2, 1, 8),
(7, 2, 8, 1, 5, 6, 4, 3)]
}
# after this line executes, the window is showing.
self.window = visual.Window(
self.MONITOR_RESOLUTION, monitor=self.MONITOR, units='deg', fullscr=self.FULLSCREEN)
self.mouse = event.Mouse(win=self.window)
def run(self):
# initialization
visual.TextStim(self.window,
text="Practice" + "\n\n" +
"In this task, you will hear a sequence of numbers. When the " +
"audio has finished, enter all of the numbers in the same " +
"order as they were recited. " + "\n\n" +
"Press any key to continue.",
wrapWidth=30).draw()
self.window.flip()
event.waitKeys()
visual.TextStim(
self.window, text="This is the sound of a correct response.").draw()
self.window.flip()
self.sound_correct.play()
core.wait(2)
visual.TextStim(
self.window, text="This is the sound of an incorrect response.").draw()
self.window.flip()
self.sound_incorrect.play()
core.wait(2)
# now we start section 1, practice trials
self.practice_trial()
# begin section 2
self.main_trial('forward')
# start section 3 - reverse digit span
self.main_trial('reverse')
# we can show the user some additonal things, but we prefer to end.
self.quit()
def quit(self):
csvwriter = csv.writer(self.log_file, delimiter=',',
quotechar='"', quoting=csv.QUOTE_MINIMAL)
for row in self.data:
csvwriter.writerow(row)
visual.TextStim(
self.window, "Thank you for your participation.").draw()
self.window.flip()
core.wait(3)
# print self.data
# self.log_file.write(json.dumps(self.data))
self.log_file.close()
self.window.close()
sys.exit(0)
def practice_trial(self):
for trial_num in range(self.N_PRACTICE_TRIALS):
expected = random.sample(xrange(10), self.LEN_PRACTICE_TRIAL)
for num in expected:
self.display_digit(num)
self.window.flip()
core.wait(self.DIGIT_DISPLAY_GAP)
actual, timestamp = self.accept_sequence()
if actual == expected:
self.sound_correct.play()
else:
self.sound_incorrect.play()
# we're going to offload ALL analysis to later stages. Task only records data.
# new data format is [trial_type, trial_num, expected, actual,
# timestamp]
self.write_data('practice', trial_num, expected, actual, timestamp)
core.wait(self.INTER_TRIAL_DELAY) # between trials
def main_trial(self, direction):
intro_text = """In this section, listen to the sequence of numbers, \
and when the audio finishes, enter all the numbers in the {0} order \
as they were recited.""".format('same' if direction is 'forward' else 'REVERSE')
if direction is 'reverse':
intro_text += ' For example, if you hear 1, 2, 3, you would enter 3, 2, 1.\n'
intro_text += '\nPress any key to continue.'
visual.TextStim(self.window, text=intro_text, wrapWidth=30).draw()
self.window.flip()
event.waitKeys()
for block_num in range(self.NUM_TRIAL_BLOCKS):
trials_wrong = 0
max_span = 0
sequence = []
sequence_index = 0
sequence_size = len(sequence)
repeat = 0
def bye(self):
visual.TextStim(self.window,
text="This block is over. Your max {0} digitspan was {1}.".format(direction, max_span)).draw()
self.window.flip()
core.wait(5)
# while true is a bad habit
while True:
# if there's a pre-defined seq we can use, use it
if sequence_index < len(self.sequences[direction]):
sequence = self.sequences[direction][sequence_index]
sequence_size = len(sequence)
sequence_index += 1
else:
if repeat >= 2:
# else, define a new random seq, but only until
# FORWARD_MAX
if sequence_size >= self.sequence_range[direction]['max']:
bye(self)
break
else:
sequence_size += 1
repeat = 0
else:
repeat += 1
# this functionality differs a little from 3.0: repetitions in line are allowed
# whereas 3.0 specifically does not allow the same number
# to occur twice in series
sequence = numpy.random.choice(
10, size=sequence_size, replace=True)
# at this point sequence and sequence_size are defined
# read out all the digits in the sequence
for digit in sequence:
self.display_digit(digit)
self.window.flip()
core.wait(self.DIGIT_DISPLAY_GAP)
# take user input and log immediately -> this is the function
# that actually reads in the data from the user
actual, timestamp = self.accept_sequence(
direction is 'reverse')
# write data...
self.write_data(direction, block_num,
sequence, actual, timestamp)
#self.data.append([direction, block_num, '-'.join(sequence), '-'.join(user_sequence[0]), user_sequence[1]])
if all(map(lambda x, y: x == y, actual, sequence)):
self.sound_correct.play()
max_span = max(max_span, sequence_size)
trials_wrong = 0
else:
self.sound_incorrect.play()
trials_wrong += 1
# if you fail N times (2 default) in a row, you're done
if trials_wrong >= self.MAX_TRIALS_WRONG:
core.wait(0.5) # ?
bye(self)
break
self.window.flip()
core.wait(0.5)
def get_subject_info(self, args=[]):
# no cli args
if len(args) == 0:
subject_info = gui.DlgFromDict(
dictionary={'Subject ID': '', 'Test Number': '1'},
title='Digit-Span Task')
if (subject_info.OK):
subject_id = subject_info.data[0].upper()
subject_test_number = subject_info.data[1]
else:
sys.exit(1)
# all args recvd
elif len(args) == 2:
subject_id = args[0].upper()
subject_test_number = args[1]
else:
print "Usage: digitspan.py [subject_id] [subject_test_number] -- Warning: functionality not guaranteed when called from CLI"
sys.exit(1)
return subject_id, subject_test_number
def display_digit(self, digit):
self.window.flip()
self.sound_files[digit].play()
core.wait(self.DIGIT_DISPLAY_TIME +
self.sound_files[digit].getDuration())
# returns (<list: clicked>, <timestemp: time_elapsed>)
def accept_sequence(self, reverse=False):
instructions = visual.TextStim(self.window,
text="Type the digits in the {0}".format('reverse ' if reverse else '') +
"order in which they were recited. " +
"Press the delete button if you want to erase the last letter " +
"you typed. For any digits you do not remember, press the letter x " +
"instead of guessing. Press enter when you are done.",
pos=(0, 6),
wrapWidth=30)
instructions.setAutoDraw(True) # auto-rerender on each windowflip
instructions.draw()
self.window.flip()
# NUMBERS = ramge(10)
timer = core.Clock()
clicked = [] # list for return to user
numbers = [] # list to hold pointers for display
event.clearEvents()
# my thinking for this loop was:
# 1. get the current keybuffer.
# 2. loop through several possibilities and act accordingly
# 3. repeat until the user hits enter, then break the loop and return.
# However, this doesn't work apparently, and the documentation for how getKeys()
# works is rather limited, even in Pygame
while True:
if event.getKeys(keyList=['q', 'escape']):
# self.log_file.write(json.dumps(self.data))
self.quit()
if event.getKeys(keyList=['backspace', 'delete', '[.]', 'period', '.']) and len(clicked) > 0:
clicked = clicked[:-1]
# I don't think this is necessary before the next step.
numbers[-1].setAutoDraw(False)
# ...[-1] should get GC'd and autoremoved from the window. I think.
numbers = numbers[:-1]
self.window.flip()
core.wait(0.200)
if event.getKeys(keyList=['num_enter', 'return']):
# I highly doubt these two are necessary. But apparently they
# are.
map(lambda n: n.setAutoDraw(False), numbers)
instructions.setAutoDraw(False)
if reverse:
clicked.reverse()
return (clicked, timer.getTime())
# this is where it returns out from the while true loop!
if event.getKeys(keyList=['x']):
clicked.append('x')
ast = visual.TextStim(self.window, text="x", color="DarkMagenta",
pos=(-10 + 2 * len(numbers), 0))
ast.setAutoDraw(True)
ast.draw()
numbers.append(ast)
self.window.flip()
core.wait(0.200)
for i in range(10): # we're looking for nums 0..9
capture_list = "{0},num_{0},[{0}]".format(i).split(',')
if event.getKeys(keyList=capture_list):
clicked.append(i)
num = visual.TextStim(self.window, text=str(i), color="DarkMagenta",
pos=(-10 + 2 * len(numbers), 0))
num.setAutoDraw(True)
num.draw()
numbers.append(num)
self.window.flip()
core.wait(0.200)
break
def write_data(self, direction, trial_num, expected, actual, timestamp):
# '-'.join(...) for csv compat
self.data.append([direction, trial_num,
'-'.join(str(i) for i in expected), '-'.join(str(i) for i in actual), timestamp])
# if __name__ == '__main__':
# ds = DigitSpan(data_dir = "kelly_data_digitspan", monitor_resolution=(1600, 900))
# ds.run()
# sys.exit(0)
<file_sep>from argentometry import digitspan
import sys
def main():
task = digitspan.DigitSpan(
data_dir = "kelly_data_digitspan",
monitor_resolution = (1600, 900),
fullscreen = True,
sound_path = '/Users/localadmin/Desktop/argentometry/sounds')
# sound_init_samples = 44100
task.run()
return 0
if __name__ == '__main__':
sys.exit(main())
<file_sep>from psychopy import visual, core, event, gui, sound
import random
import numpy
import sys
import os
import csv
from datetime import datetime
from collections import namedtuple
class SART(object):
def __init__(self, **kwargs):
self.DIGIT_DISPLAY_TIME = kwargs.get('digit_display_time', 0.250)
self.DIGIT_RANGE = kwargs.get('digit_range', (0, 9))
self.DIGIT_SIZES = kwargs.get('digit_sizes', [1.8, 2.7, 3.5, 3.8, 4.5])
self.TARGET_DIGIT = kwargs.get(
'target_digit', random.randint(*self.DIGIT_RANGE))
self.NUM_DIGIT_SETS = kwargs.get('num_digit_sets', 25)
self.MASK_TIME = kwargs.get('mask_time', 0.900)
self.MASK_DIAMETER = kwargs.get('mask_diameter', 3.0)
self.MAX_FAILS = kwargs.get('max_fails', 3)
self.CORRECT_FREQ = kwargs.get('correct_freq', 440)
self.WRONG_FREQ = kwargs.get('wrong_freq', 330)
self.TONE_LENGTH = kwargs.get('tone_length', 0.5)
self.SOUND_INIT_SAMPLES = kwargs.get('sound_init_samples', 48000)
self.PRACTICE_DIGIT_SETS = kwargs.get('practice_digit_sets', 2)
self.DATA_DIR = kwargs.get('data_dir', 'sart_data')
self.MONITOR_RESOLUTION = kwargs.get('monitor_resolution', (1024, 768))
self.FULLSCREEN = kwargs.get('fullscreen', True)
# if the datadir doesn't exist, create it.
if not os.path.isdir(self.DATA_DIR):
try:
os.mkdir(self.DATA_DIR)
except Exception as e:
print e.getMessage()
print "Error: cannot create data directory: " + self.DATA_DIR
sys.exit(1)
# then, collect the subject's ID and text number. If the file already exists, prompt to confirm overwrite
while True:
subject_info = self.get_subject_info(sys.argv[1:])
self.log_file = os.path.join(
self.DATA_DIR, '_'.join(subject_info) + '.csv')
if os.path.isfile(self.log_file):
rename_dialog = gui.Dlg(title='Error: Log File Exists')
rename_dialog.addText(
'A log file with this subject id ({0}) and test number {1} already exists. Overwrite?'.format(*subject_info))
rename_dialog.show()
if rename_dialog.OK:
break
else:
break
else:
break
#self.log_file = open(self.log_file, "w")
self.data = []
# this is the basic data output format (to CSV)
self.Datum = namedtuple(
'Datum', ['trial', 'target', 'digit', 'success', 'rt', 'note'])
sound.init(self.SOUND_INIT_SAMPLES, buffer=128)
# init components for rest of experiment
self.sound_correct = sound.Sound(
value=self.CORRECT_FREQ, secs=self.TONE_LENGTH)
self.sound_incorrect = sound.Sound(
value=self.WRONG_FREQ, secs=self.TONE_LENGTH)
self.window = visual.Window(
self.MONITOR_RESOLUTION, monitor='testMonitor', units='cm', fullscr=self.FULLSCREEN)
self.mouse = event.Mouse(win=self.window)
self.MASTER_CLOCK = core.Clock() # this is never used, holdover from original code
self.TIMER = core.Clock()
def run(self):
instructions = visual.TextStim(self.window, text="Practice\n\nIn this task, a number will be shown on the screen.\n\n" +
"If it is not {0}, then click your mouse anywhere on the screen. If it is a {0}, then do not click anywhere.\n\n".format(self.TARGET_DIGIT) +
"Please give equal importance to accuracy and speed.\n\nClick anywhere to continue.", wrapWidth=30).draw()
self.window.flip()
# wait for a mouseclick to continue
while 1 not in self.mouse.getPressed():
pass
visual.TextStim(
self.window, text="This is the sound of a correct response.").draw()
self.window.flip()
self.sound_correct.play()
core.wait(2)
visual.TextStim(
self.window, text="This is the sound of an incorrect response.").draw()
self.window.flip()
self.sound_incorrect.play()
core.wait(2)
# run the practice trial
self.practice_trial()
instructions = visual.TextStim(
self.window,
text="Sustained Attention\n\n" +
"In this task, a number will be shown on the screen.\n\n" +
"If it is not {0}, then click you rmouse anywhere on the screen. If it is {0}, do not click anywhere.\n\n".format(self.TARGET_DIGIT) +
"Please give equal importance to accuracy and speed.\n\n" +
"Click anywhere to continue.",
wrapWidth=30).draw()
self.window.flip()
# wait for mouse click
while 1 not in self.mouse.getPressed():
pass
self.main_trial()
self.quit()
def quit(self):
with open(self.log_file, "w") as output:
csvwriter = csv.writer(output, delimiter=',',
quotechar='"', quoting=csv.QUOTE_MINIMAL)
for row in self.data:
csvwriter.writerow(row)
goodbye = visual.TextStim(self.window, "Thank you for your participation.", wrapWidth = 30).draw()
self.window.flip()
core.wait(2)
self.window.close()
sys.exit(0)
def practice_trial(self):
# clear the mouseclick buffers
# while 1 not in self.mouse.getPressed():
# pass
# while 1 in self.mouse.getPressed():
# pass
mask1 = visual.Circle(
self.window, radius=self.MASK_DIAMETER / 2, pos=[0.05, -0.39], lineWidth=10)
mask2 = visual.TextStim(self.window, text="+",
height=(self.MASK_DIAMETER + 2.4))
digitSet = range(self.DIGIT_RANGE[0], self.DIGIT_RANGE[
1] + 1) * self.PRACTICE_DIGIT_SETS
random.shuffle(digitSet)
correct = 0
for digit in digitSet:
pressed = False
self.TIMER.reset()
self.displayDigit(digit)
reactionTime = 0
success = False
note = ''
# in this loop the digit is visible
while self.TIMER.getTime() < self.DIGIT_DISPLAY_TIME * 2:
if 1 in self.mouse.getPressed() and not pressed:
reactionTime = self.TIMER.getTime()
pressed = True
success = (digit is not self.TARGET_DIGIT)
note = 'press nomask'
# mouseclick was registered before the mask was shown.
# The test was successful if the digit displayed
# was NOT the target digit.
if success:
correct += 1
self.sound_correct.play()
else:
self.sound_incorrect.play()
mask1.draw()
mask2.draw()
self.window.flip()
# in this loop the digit is hidden and the mask is visible
while self.TIMER.getTime() < (self.DIGIT_DISPLAY_TIME + self.MASK_TIME) * 2:
if 1 in self.mouse.getPressed() and not pressed:
reactionTime = self.TIMER.getTime()
pressed = True
success = (digit is not self.TARGET_DIGIT)
note = 'press mask'
# mouseclick was registered after the mask was shown.
# The test was successful if the digit displayed
# was NOT the target digit.
if success:
correct += 1
self.sound_correct.play()
else:
self.sound_incorrect.play()
if event.getKeys(keyList=['q', 'excape']):
self.quit()
#core.quit()
if not pressed:
reactionTime = self.TIMER.getTime()
success = (digit is self.TARGET_DIGIT)
note = 'nopress'
# no mouseclick was registered.
# the test was successful if the target digit WAS the digit
# displayed.
if success:
correct += 1
self.sound_correct.play()
else:
self.sound_incorrect.play()
d = self.Datum(trial='practice',
target=self.TARGET_DIGIT,
digit=digit,
success=success,
rt=reactionTime,
note=note)
self.data.append(d)
accuracy = (1.0 * correct) / len(digitSet)
feedback = visual.TextStim(
self.window, text="You had an accuracy of {:%}".format(accuracy))
feedback.draw()
self.window.flip()
core.wait(5)
def main_trial(self):
# flush mouse click buffers
# while 1 not in self.mouse.getPressed():
# pass
# while 1 in self.mouse.getPressed():
# pass
mask1 = visual.Circle(
self.window, radius=self.MASK_DIAMETER / 2, pos=[0.01, -0.63], lineWidth=10)
mask2 = visual.TextStim(self.window, text="+",
height=self.MASK_DIAMETER + 2.4)
digitSet = range(self.DIGIT_RANGE[0], self.DIGIT_RANGE[
1] + 1) * self.NUM_DIGIT_SETS
random.shuffle(digitSet)
correct = 0
for digit in digitSet:
pressed = False
self.TIMER.reset()
self.displayDigit(digit)
reactionTime = 0
success = False
note = ''
while self.TIMER.getTime() < self.DIGIT_DISPLAY_TIME:
if 1 in self.mouse.getPressed() and not pressed:
pressed = True
reactionTime = self.TIMER.getTime()
success = (digit is not self.TARGET_DIGIT)
note = 'press nomask'
if success:
correct += 1
self.sound_correct.play()
else:
self.sound_incorrect.play()
mask1.draw()
mask2.draw()
self.window.flip()
while self.TIMER.getTime() < self.DIGIT_DISPLAY_TIME + self.MASK_TIME:
if 1 in self.mouse.getPressed() and not pressed:
pressed = True
reactionTime = self.TIMER.getTime()
success = (digit is not self.TARGET_DIGIT)
note = 'press mask'
if success:
correct += 1
self.sound_correct.play()
else:
self.sound_incorrect.play()
if event.getKeys(keyList=['q', 'escape']):
self.quit()
#core.quit()
if not pressed:
reactionTime = self.TIMER.getTime()
success = (digit is self.TARGET_DIGIT)
note = 'nopress'
# no mouseclick was registered.
# the test was successful if the target digit WAS the digit
# displayed.
if success:
correct += 1
self.sound_correct.play()
else:
self.sound_incorrect.play()
d = self.Datum(trial='main',
target=self.TARGET_DIGIT,
digit=digit,
success=success,
rt=reactionTime,
note=note)
self.data.append(d)
accuracy = (1.0 * correct) / len(digitSet)
targetaccuracy = (1.0 * 5) / self.NUM_DIGIT_SETS
feedback = visual.TextStim(
self.window, text="--Disregard-- You had an accuracy of {:%}".format(targetaccuracy))
feedback.draw()
self.window.flip()
def displayDigit(self, digit):
digit = visual.TextStim(self.window, text=str(digit))
digit.setHeight(random.choice(self.DIGIT_SIZES))
digit.draw()
self.window.flip()
def get_subject_info(self, args=[]):
# no cli args
if len(args) == 0:
subject_info = gui.DlgFromDict(
dictionary={'Subject ID': '', 'Test Number': '1'},
title='SART Task')
if (subject_info.OK):
subject_id = subject_info.data[0].upper()
subject_test_number = subject_info.data[1]
else:
sys.exit(1)
# all args recvd
elif len(args) == 2:
subject_id = args[0].upper()
subject_test_number = args[1]
else:
print "Usage: sart.py [subject_id] [test_number] -- Warning: functionality not guaranteed when called from CLI"
sys.exit(1)
return subject_id, subject_test_number
# if __name__ == '__main__':
# task = SART(data_dir = "kelly_data_sart", monitor_resolution = (1600, 900))
# task.run()
|
e9469c7e31a1a4ed61237cc8c16d38e940729882
|
[
"Markdown",
"Python"
] | 4
|
Markdown
|
abizer/argentometry
|
b8a3f3139ed01cdd0a52fd4024241d5d7a198038
|
388ed02df202d5c92981641acbdff80649df48dc
|
refs/heads/master
|
<file_sep>rm (list = ls())
setwd("D:/Disco_LorenaD_2020/003_Cursos/017_CursoR_Uni/Clase24052020/Clase02_R4DS")
dir()
#### Cargamos la data ####
retail <- read.csv(file = "RetailSales.csv.txt")
#### Alguna informacion de DF ####
class(retail)
str(retail)
colnames(retail)
View(retail)
####Limpieza de datos ####
# Notamos que existe filas que poseen elementos vacios
#Asi como elementos tipo NA
help("na.omit")
retail <- na.omit(retail)
#limpia datos que no contienen informacion
#str para ver la estructura de los datos
str(retail)
#### Retail : Analisis por anios ####
#Me interesa cual es e ttoal de ventas en todo el year
#veamos cuanto el lo que produjo de ventas por a;o
retail
# en la primera dimension estoy filtrando al a;o 2000
# la segunda dimension no hago nada
retail[retail$Year==2000,]
class(retail[retail$Year==2000,])
sum(retail[retail$Year==2000,]$Sales)
# me interesa saber que vaores uico tiene la columna year'
unique(retail$Year)[5:9]
# quiero utilizar para barrer todos los elemntos de years
unique(retail$Year)
#Utilicemos una estructura for para crear un data frame donde
#almacenaremos un resumen por anio
ResumenSales <- data.frame(Year = integer(),
VentaTotal = double())
NuevaFila <- data.frame()
for (y in unique(retail$Year)) {
NuevaFila <- data.frame(Year=y, VentaTotal = sum(retail[retail$Year==y,]$Sales))
ResumenSales <- rbind(ResumenSales,NuevaFila)
}
plot(x=ResumenSales$Year, y=ResumenSales$VentaTotal)
#### Comportamiento data x mes ####
retail[retail$Month=="Jan",]$Sales
unique(retail$Month)
help("aggregate")
for (m in retail$Month) {
print(retail[retail$Month==m,])
}
# ~ dependencia
RetailMes <- aggregate(Sales ~ Month, data= retail, FUN = sum )
RetailMes
month.abb
month.name
RetailMes <- RetailMes[order(match(RetailMes$Month,month.abb)),]
<file_sep>rm(list=ls())
getwd()
setwd("D:/Disco_LorenaD_2020/003_Cursos/017_CursoR_Uni/Clase24052020/Clase02_R4DS")
dir()
class(AirPassengers)
help(ts)
library(help="datasets")
class(AirPassengers)
help(ts)
plot(AirPassengers)
class(CO2)
help("CO2")
str(CO2)
data(cars)
data(CO2)
library(car)
install.packages("CARS")
data(Prestige)
str(Prestige)
head(Prestige)
tail(Prestige)
summary(Prestige)
View(Prestige)
Prestige[is.na(Prestige$type),]
help(Prestige)
#Analizamos la correlacion entre todas las variables numericas
cor(Prestige[,-6])
library(corrplot)
corrplot(cor(Prestige[,-6]))
help("CO2")
library(readxl)
library(help="readxl")
<file_sep>rm(list=ls())
getwd()
dir(pattern = "xlsx")
#### Cargar la data en memoria ####
excel_sheets(path="excel_prueba.xlsx")
# Asimple vista debemos ver que tiene comportamiento vectorai
excel_iris <- read_excel("excel_prueba.xlsx",sheet = "iris")
excel_women <- read_excel("excel_prueba.xlsx",
sheet = excel_sheets(path = "excel_prueba.xlsx")[2],
col_names = FALSE)
str(excel_women)
colnames(excel_women)
colnames(excel_women) <- c("col1","col2")
#skip saltar para que empiza a leer los datos
excel_air <- read_excel(path="excel_prueba.xlsx",sheet="airquality",skip = 3)
View(excel_air)
colnames(excel_air)
excel_air$Observaciones
#sumar elementos
sum(excel_air$Observaciones)
#sumar solo eleemntos con NA
sum(excel_air$Observaciones,na.rm = TRUE)
#suma de datos de la columna fecha
sum(excel_air$Fechas,na.rm = TRUE)
#le quitamos una columna
excel_air[,-c(1,6,11)]
#Le deicmos qu el NA es el guion
excel_air <- read_excel(path="excel_prueba.xlsx",sheet="airquality",skip = 3, na='-')
excel_air <- excel_air[,-c(1,6,11)]
excel_air <- na.omit(excel_air)
<file_sep>#Comentario
#En Rstudio la combinación de teclas ctrl+shift+N apertura nuevo editor
#Limpiar memoria
rm(list=ls())
#Seteo/configuración
setwd("D:/Disco_LorenaD_2020/003_Cursos/017_CursoR_Uni/Clase24052020/Clase02_R4DS")
#Verificar > obtneer el working
getwd()
#Lista el contenido
<file_sep>#### Cargar datos ####
setwd("D:/Disco_LorenaD_2020/003_Cursos/017_CursoR_Uni/Clase24052020/Clase02_R4DS")
dir()
gluc <- read.table(file="glucosa.txt",header = TRUE)
class(gluc)
str(gluc)
colnames(gluc)
class(colnames(gluc))
gluc$glucosa
mean(gluc$glucosa)
median(gluc$glucosa)
sd(gluc$glucosa)
var(gluc$glucosa)
quantile(gluc$glucosa,probs = 0.1)
quantile(gluc$glucosa,probs = 0.5)
quantile(gluc$glucosa,probs = c(0.1,0.9))
#Variable temperatura
#Diagrama de disperison
gluc$temperatura
plot(x=1:31, y=gluc$temperatura)
plot(x=1:31, y= gluc$temperatura,
main = "Dataset glucosa.txt",xlab="indices", ylab = "Temperatura")
<file_sep>#Estructuras de decision
#ejecuto un numero
x<- runif(1,0,10)
if(x>5){
y <- TRUE
} else{
y <- FALSE
}
# #En general
# if(condl){
# bloque
# }
#### Estructura de repeticion : FOR ####
for(i in 1:5){
print(i)
}
#En general
# for(variable in objetoiterable){
# algo de cogigo que depende de variable
# }
#Para cargar el paquete extradir
library(extraDistr)
help("extraDistr") #Accedemos a la ayuda del paquete
library(help="extraDistr") #Mostramos toda la informacion
#que posee el paquete
help("BetaPrime") #Accdemos a la ayuda de una funcion
#### Definicion de funciones de usuario en R ####
# NombreDeLaFuncion <- funtion(arg1,arg2,arg3,...){
# #AlgunafunionalidadImplementadaCodigoR
# }
<file_sep>#### Archivo cloud.txt ####
#primero elarchivo debe sr txt
#2 buscamos si tiene cabeceras o no
setwd("D:/Disco_LorenaD_2020/003_Cursos/017_CursoR_Uni/Clase24052020/Clase02_R4DS")
dir()
cloud <- read.table(file="cloud.txt",header = TRUE)
colnames(cloud)
str(cloud)
class(cloud)
cloud$Ispc
cloud$Cloudpt
#### Histograma ####
help(hist)
#fue calculada en funcion de R surges
hist(cloud$Cloudpt)
h_cloudpt <- hist(cloud$Cloudpt)
#mids puntos medios de los intervalos de clase
#breaks me permite accedereje X
h_cloudpt$breaks
h_cloudpt$counts
range(cloud$Cloudpt)
#quiero una secuencia de puntos que va desde 20 a 34 con
#saltos de uno en uno
b1 <- 20:34
b2<-seq(20,34,1)
hist(cloud$Cloudpt,breaks = b1)
#### Boxplot ####
help("boxplot")
boxplot(cloud$Cloudpt)
<file_sep>#### Data Frame ####
#Definicion
Nota1 <- runif(10,1,19)
Nota2 <- runif(1:20,10)
MiprimerDF <- data.frame(NOTAAP=Nota1, NOTAF=Nota2)
view(MiprimerDF)
#### Acceso a la informacion de un DF ####
MiPrimerDF$NOTAP
MiPrimerDF[[1]]
MiprimerDF[,1]
<file_sep>rm(list=ls())
setwd("D:/Disco_LorenaD_2020/003_Cursos/017_CursoR_Uni/Clase24052020/Clase02_R4DS")
#### Creacion de matrices ####
#Para definir un vector
x1 <- c(2,4,5,8,1,12,23,34)
#Para saber la clase de dato que R le ah asignado a x1
class(x1)
#Definir matrices
help(matrix)
mat1 <- matrix(data = 1:9,nrow = 3,ncol = 3)
mat2 <- matrix(data = 1:9,ncol = 3)
mat3 <- matrix(data = 1:15,nrow = 5)
#byrow= FALSE : lo primero que se llena son las columnas
#y le cmabiamos el nombre de cada columna
mat3 <- matrix(data = 1:15,nrow = 5,byrow = TRUE,
dimnames = list(c("r1","r2","r3","r4","r5"),c("c1","c2","c3")))
### ALgunas propiedaes del objeto matriz ####
class(mat3)
#me da un vector con las componentes de
dim(mat3)
help("dim")
dimensiones <- dim(mat3)
dimensiones[1]
dimensiones[2]
colnames(mat3)
rownames(mat3)
colnames(mat3) <- c("col1","col2","col2")
mat3
#### Accedo a los elemtnos de un objeto matrix ####
# Notacion matricial
help(sample)
#Sample numeros aleatorios
mat4 <- matrix(data = sample(1:129,9),ncol = 3)
mat4[2,2] #mostramos el elemento (2,2)
mat4[2,2] <- pi #Modificamos el valor del elemento (2,2)
mat4[,3]
mat4[3,]
# Elementos especiales
-1:1/0
x <- NA
|
9ba8ab33ed0fd43f4fa7e3619aae441a3b90be72
|
[
"R"
] | 9
|
R
|
LorenaDuenas/Clase02R4DS
|
f6c76757977b76fe15f4240f920256f4a9008b26
|
b8c62d50027eeb13d0d4425319bd4e0c6b73169a
|
refs/heads/master
|
<repo_name>keitaroemotion/tstac<file_sep>/README.md
# tstac
simple testing tool to enrich the stack trace such that
you more can focus on debugging:
## Installation
```
./installer
```
## usage
```
$tstac [file path]
```
<file_sep>/tstac
#!/usr/bin/env ruby
require "colorize"
file = ARGV[0]
command = "ruby -I test #{file}"
test_result = `#{command}`
def paint_y(f, i, count)
puts f[count + i].chomp.yellow
rescue
end
def paint_g(f, i, count)
puts f[count + i].chomp.green
rescue
end
stacks = test_result.split("\n").reverse.map do |line|
/[^\s]+\.(rb|erb):\d+/.match(line).to_s
end.compact.select do |line|
line.strip != ""
end.each do |line|
lsp = line.chomp.split(":")
file = lsp[0]
count = lsp[1].to_i - 1
f = File.open(file, "r").each_line.to_a
puts "[#{file} #{count}]"
paint_y(f, count, -2)
paint_y(f, count, -1)
paint_g(f, count, 0)
paint_y(f, count, 1)
paint_y(f, count, 2)
puts
end
|
5d7e83aad35e593549c7d7ebd746edcf07a94585
|
[
"Markdown",
"Ruby"
] | 2
|
Markdown
|
keitaroemotion/tstac
|
eb2e06c219810f590f0cadfa992fec5b97bd1183
|
a7a3db9076ec5d26cc6ef8442cbb633647e86928
|
refs/heads/master
|
<repo_name>prabhatks12/NewsFeed<file_sep>/README.md
# Overview :
Its an app to feed the news from json file uploaded to the server .
## Details :
The first page is login page. The second page shows temperature and on scrolling it shows the news. The news type can be either :
- An image with a text.
- A video file with a text.
- Or only text.<br />
Each news contain a heading, reporter's name, date and place along with the things mentioned above. Everyting is taken from server. Also the user can perform the following functions :
- Sort by news type (Sports ,Entertainment,Poliitcs etc..)
- Search by entering in the search filed provided in the taskbar.
<file_sep>/NewsFeed2/app/src/main/java/com/example/prabhat/newsfeed2/Contacts.java
package com.example.prabhat.newsfeed2;
/**
* Created by prabhat on 06-08-2017.
*/
public class Contacts {
private String headline,rname,date,image,content;
public Contacts(String headline, String rname, String date, String image, String content) {
this.headline = headline;
this.rname = rname;
this.date = date;
this.image = image;
this.content = content;
}
public String getHeadline() {
return headline;
}
public void setHeadline(String headline) {
this.headline = headline;
}
public String getRname() {
return rname;
}
public void setRname(String rname) {
this.rname = rname;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
}
|
bdd205188e7627c61c0e379bea6add7b5202c25a
|
[
"Markdown",
"Java"
] | 2
|
Markdown
|
prabhatks12/NewsFeed
|
c2ee8acd152a408438ed283e8c7d4ea0e4186d54
|
5146579d559cd70fef830d4278f6e57295a6ed37
|
refs/heads/master
|
<file_sep>import random
def get_best_index(x, top):
ordered = sorted(x, reverse=True)
indeces = sorted(range(len(x)), key=lambda k: x[k], reverse=True)
unused_probs = 0.0
for i in range(top, len(ordered)):
unused_probs += ordered[i]
for i in range(0, top):
ordered[i] += unused_probs / top
prev_limit = 0
r = random.random()
for i in range(0, top - 1):
if prev_limit <= r < prev_limit + ordered[i]:
return indeces[i]
prev_limit += ordered[i]
return indeces[top - 1]
<file_sep>import os
from subprocess import call
class DatasetBuilder:
pause_value = 200
def __init__(self, source, destination):
self.source = source
self.destination = destination
self.time_signature = "1, 0, time_signature, 4, 2, 24, 8\n"
@staticmethod
def delete_file(file_path):
os.remove(file_path)
@staticmethod
def fix_time(time, time_unit):
difference = time % time_unit
# the note is slightly shifted to the left, so we need to shift it to the next time_unit
if difference >= time_unit // 2:
return time // time_unit + 1
# the note is slightly shifted to the right or not at all, so we need to shift it to the previous time unit
return time // time_unit
@staticmethod
def pad_spaces(prev_time, start_time, x):
while prev_time < start_time:
x.append(DatasetBuilder.pause_value)
prev_time += 1
@staticmethod
def delete_extra_spaces(seq):
tokens = seq
i = 0
while i < len(seq):
if seq[i] == DatasetBuilder.pause_value:
j = i + 1
while j < len(seq) and seq[j] == DatasetBuilder.pause_value:
j += 1
j -= 1
# if we have spaces spanning more than a measure and a half
if j - i + 1 >= 24:
limit = i - i % 16 + 16 + j % 16
seq = seq[:limit] + seq[j + 1:]
i = limit + 1
else:
i = j + 1
else:
i += 1
return seq
@staticmethod
def map_csv_to_sequence(seq):
tokens = seq[0].split(',')
x = []
time_unit = int(seq[0].split(',')[-1]) // 4
prev_time = 0
tokens = seq[7].split(',')
time = DatasetBuilder.fix_time(int(tokens[1]), time_unit)
deduction = (time // 16)*16 * time_unit
start_time = time % 16
DatasetBuilder.pad_spaces(prev_time, start_time, x)
for i in range(8, len(seq) - 1):
tokens = seq[i].split(',')
if i % 2 == 0:
if "Note_off_c" in tokens[2] or int(tokens[-1]) == 0:
time = DatasetBuilder.fix_time(int(tokens[1]) - deduction, time_unit)
duration = time - start_time
if duration < 1:
raise ValueError('One note is too short')
while duration > 0:
x.append(int(tokens[4]))
duration -= 1
x.append(DatasetBuilder.pause_value)
prev_time = time
else:
raise ValueError('Non-alternating note-on note-off pattern on line ' + str(i))
else:
start_time = DatasetBuilder.fix_time(int(tokens[1]) - deduction, time_unit)
DatasetBuilder.pad_spaces(prev_time, start_time, x)
return DatasetBuilder.delete_extra_spaces(x)
@staticmethod
def map_sequence_to_csv(x, file_path):
bass_lines = [
"0, 0, Header, 1, 2, 120\n",
"1, 0, Start_track\n",
"1, 0, Title_t, \"" + file_path + "\"\n",
"1, 0, Time_signature, 4, 2, 24, 8\n",
"1, 0, End_track\n",
"2, 0, Start_track\n"
]
time_unit = 30
i = 0
while x[i] == DatasetBuilder.pause_value:
i += 1
start_time = i*time_unit
end_time = start_time
no_note_endings = 0
for step in range(i + 1, len(x)):
if x[step] == DatasetBuilder.pause_value:
if x[step-1] != DatasetBuilder.pause_value:
# end of a note
end_time = (step - no_note_endings)*time_unit
bass_lines.append("2, " + str(start_time) + ", Note_on_c, 1, " + str(x[step-1]) + ", 113\n")
bass_lines.append("2, " + str(end_time) + ", Note_off_c, 1, " + str(x[step - 1]) + ", 113\n")
no_note_endings += 1
elif x[step] != DatasetBuilder.pause_value and x[step-1] == DatasetBuilder.pause_value:
start_time = (step - no_note_endings)*time_unit
bass_lines.append("2, " + str(end_time) + ", End_track\n")
return bass_lines
def process_file(self, file_path):
try:
found_bass = False
found_time_signature = False
bass_lines = ["0, 0, Header, 1, 2,",
"1, 0, Start_track\n",
"1, 0, Title_t, \"" + file_path + "\"\n",
"1, 0, Time_signature, 4, 2, 24, 8\n",
"1, 0, End_track\n",
"2, 0, Start_track\n"]
should_delete = False
with open(file_path) as my_file:
bass_track_number = ""
file_enum = enumerate(my_file, 0)
for num, line in file_enum:
line_lower = line.lower()
if num == 0:
bass_lines[0] += line.split(',')[-1]
if "time_signature" in line_lower:
found_time_signature = True
if self.time_signature != line_lower:
should_delete = True
break
tokens = line.split(',')
if found_bass is True:
if tokens[0] == bass_track_number:
if "pitch" in line_lower:
should_delete = True
break
elif "Note_on_c" in line or "Note_off_c" in line or "End_track" in line:
bass_lines.append("2" + line[len(tokens[0]):])
if "End_track" in line and len(bass_lines) < 15:
should_delete = True
break
elif " piano" in line_lower or "\"piano\"" in line_lower or " guitar" in line_lower\
or "\"guitar\"" in line_lower:
found_bass = True
bass_track_number = tokens[0]
bass_lines.append("2" + line[len(tokens[0]):])
if found_bass is False or found_time_signature is False or should_delete is True:
DatasetBuilder.delete_file(file_path)
return
else:
if len(bass_lines) > 1200 or len(bass_lines) < 100:
DatasetBuilder.delete_file(file_path)
return
try:
x = DatasetBuilder.map_csv_to_sequence(bass_lines)
back_to_csv = DatasetBuilder.map_sequence_to_csv(x, file_path)
with open(file_path, 'w') as the_file:
for line in back_to_csv:
the_file.write(line)
with open(self.destination + "/all.txt", 'a+') as the_file:
for time_step in x:
the_file.write(str(time_step) + ' ')
the_file.write("\n ")
except:
DatasetBuilder.delete_file(file_path)
return
except:
pass
def build(self):
counter = 0
for root, dirs, files in os.walk(self.source):
for name in files:
if ".mid" in name:
counter += 1
new_filename = os.path.join(self.destination, name.replace(".mid", ".txt"))
call(["midicsv", os.path.join(root, name), new_filename])
self.process_file(new_filename)
print(counter)
<file_sep>import numpy
from keras.models import Sequential
from keras.layers import Dense, Lambda
from keras.layers import Dropout
from keras.layers import LSTM
from keras.callbacks import ModelCheckpoint, ReduceLROnPlateau
from keras.utils import np_utils
from DatasetBuilder import DatasetBuilder
import sys
from probabilityHelpers import get_best_index
from subprocess import call
class Lstm:
def __init__(self, filename):
self.filename = filename
self.raw_text = ""
self.songs = []
self.dataX = []
self.dataY = []
self.n_patterns = 0
self.n_chars = 0
self.seq_length = 100
self.n_vocab = 0
self.int_to_char = dict()
self.char_to_int = dict()
self.model = Sequential()
self.load_data()
def load_data(self):
# load text and covert to lowercase
self.raw_text = open(self.filename).read()
self.raw_text = self.raw_text.lower()
# create mapping of unique chars to integers
tokens = self.raw_text.split(" ")
# delete tokens containing anything other than numbers
i = 0
l = len(tokens)
while i < l:
try:
int(tokens[i])
i += 1
except ValueError:
tokens.pop(i)
l -= 1
chars = sorted(list(set(tokens)))
self.char_to_int = dict((c, i) for i, c in enumerate(chars))
self.int_to_char = dict((i, c) for i, c in enumerate(chars))
self.n_chars = len(tokens)
self.n_vocab = len(chars)
print("Total Characters: ", self.n_chars)
print("Total Vocab: ", self.n_vocab)
# prepare the dataset of input to output pairs encoded as integers
songs = self.raw_text.split("\n")
for song in songs:
notes = song.split(" ")
i = 0
l = len(notes)
# delete invalid notes (strings that are not integers)
while i < l:
try:
int(notes[i])
i += 1
except ValueError:
notes.pop(i)
l -= 1
song_length = len(notes)
for i in range(0, song_length - self.seq_length, 1):
seq_in = notes[i:i + self.seq_length]
seq_out = notes[i + self.seq_length]
self.dataX.append([self.char_to_int[char] for char in seq_in])
self.dataY.append(self.char_to_int[seq_out])
self.n_patterns = len(self.dataX)
print("Total Patterns: ", self.n_patterns)
def train(self, checkpoint_name, improvement):
# reshape X to be [samples, time steps, features]
X = numpy.reshape(self.dataX, (self.n_patterns, self.seq_length, 1))
# normalize
X = X / float(self.n_vocab)
# one hot encode the output variable
y = np_utils.to_categorical(self.dataY)
# define the LSTM model
model = Sequential()
model.add(LSTM(512, input_shape=(X.shape[1], X.shape[2])))
model.add(Dropout(0.2))
model.add(Lambda(lambda inpx: inpx))
model.add(Dense(y.shape[1], activation='softmax'))
if improvement != "":
model.load_weights(improvement)
model.compile(loss='categorical_crossentropy', optimizer='adam')
# define the checkpoint
filepath = checkpoint_name
checkpoint = ModelCheckpoint(filepath, monitor='loss', verbose=1, save_best_only=True, mode='min')
reduce_lr = ReduceLROnPlateau(monitor='loss', factor=0.2,
patience=2, min_lr=0.001)
callbacks_list = [checkpoint, reduce_lr]
# fit the model
model.fit(X, y, epochs=40, batch_size=128, callbacks=callbacks_list)
def prepare_to_generate(self, improvement, temperature):
# reshape X to be [samples, time steps, features]
X = numpy.reshape(self.dataX, (self.n_patterns, self.seq_length, 1))
# normalize
X = X / float(self.n_vocab)
# one hot encode the output variable
y = np_utils.to_categorical(self.dataY)
# define the LSTM model
self.model = Sequential()
self.model.add(LSTM(512, input_shape=(X.shape[1], X.shape[2])))
self.model.add(Dropout(0.2))
self.model.add(Lambda(lambda inpx: inpx / temperature))
self.model.add(Dense(y.shape[1], activation='softmax'))
# load the network weights
filename = improvement
self.model.load_weights(filename)
self.model.compile(loss='categorical_crossentropy', optimizer='adam')
def generate(self, text_file_path, midi_file_path):
# pick a random seed
start = numpy.random.randint(0, len(self.dataX) - 1)
pattern = self.dataX[start]
print("start:", pattern)
# generate characters
notes = []
for i in range(2000):
x = numpy.reshape(pattern, (1, len(pattern), 1))
x = x / float(self.n_vocab)
prediction = self.model.predict(x, verbose=0)
index = 0
while index == 0:
index = get_best_index(prediction[0], 10)
result = self.int_to_char[index]
notes.append(int(result))
seq_in = [self.int_to_char[value] for value in pattern]
# sys.stdout.write(result + " ")
print(i)
pattern.append(index)
pattern = pattern[1:len(pattern)]
csv_notes = DatasetBuilder.map_sequence_to_csv(notes, text_file_path)
with open(text_file_path, 'w+') as the_file:
for line in csv_notes:
the_file.write(line)
call(["csvmidi", text_file_path, midi_file_path])
print("\nDone.")
<file_sep>from Lstm import Lstm
# checkpoint name: "weights-improvement-mainpiano-{epoch:02d}-{loss:.4f}.hdf5"
lstm = Lstm("D:/environments/licenta/data/all.txt")
# lstm.train("weights-improvement-{epoch:02d}-{loss:.4f}.hdf5", "weights-improvement-03-0.2972.hdf5")
lstm.prepare_to_generate("weights-improvement-03-0.2972.hdf5", 1000)
lstm.generate("D:/environments/licenta/results/result.txt", "D:/environments/licenta/results/result.mid")
<file_sep>from DatasetBuilder import DatasetBuilder
class DatasetBuilderTransition(DatasetBuilder):
@staticmethod
def map_csv_to_sequence(seq):
tokens = seq[0].split(',')
hit_first_note = False
x = []
time_unit = int(seq[0].split(',')[-1]) // 4
prev_time = 0
tokens = seq[7].split(',')
time = DatasetBuilder.fix_time(int(tokens[1]), time_unit)
deduction = (time // 16)*16 * time_unit
start_time = time % 16
DatasetBuilder.pad_spaces(prev_time, start_time, x)
last_val = 0
for i in range(8, len(seq) - 1):
tokens = seq[i].split(',')
if i % 2 == 0:
if "Note_off_c" in tokens[2] or int(tokens[-1]) == 0:
time = DatasetBuilder.fix_time(int(tokens[1]) - deduction, time_unit)
duration = time - start_time
if duration < 1:
raise ValueError('One note is too short')
note_val = int(tokens[4])
if not hit_first_note:
x.append(note_val)
hit_first_note = True
else:
x.append(note_val - last_val)
while duration > 1:
x.append(0)
duration -= 1
x.append(DatasetBuilder.pause_value)
last_val = note_val
prev_time = time
else:
raise ValueError('Non-alternating note-on note-off pattern on line ' + str(i))
else:
start_time = DatasetBuilder.fix_time(int(tokens[1]) - deduction, time_unit)
DatasetBuilder.pad_spaces(prev_time, start_time, x)
return DatasetBuilder.delete_extra_spaces(x)
@staticmethod
def map_sequence_to_csv(x, file_path):
bass_lines = ["0, 0, Header, 1, 2, 120\n",
"1, 0, Start_track\n",
"1, 0, Title_t, \"" + file_path + "\"\n",
"1, 0, Time_signature, 4, 2, 24, 8\n",
"1, 0, End_track\n",
"2, 0, Start_track\n"]
time_unit = 30
i = 0
while x[i] == DatasetBuilder.pause_value:
i += 1
start_time = i*time_unit
end_time = start_time
current_note = x[i]
no_note_endings = 0
last_note = 0
for step in range(i + 1, len(x)):
if x[step] == DatasetBuilder.pause_value:
if x[step-1] != DatasetBuilder.pause_value:
# end of a note
end_time = (step - no_note_endings)*time_unit
bass_lines.append("2, " + str(start_time) + ", Note_on_c, 1, " + str(current_note) + ", 113\n")
bass_lines.append("2, " + str(end_time) + ", Note_off_c, 1, " + str(current_note) + ", 113\n")
last_note = current_note
no_note_endings += 1
elif x[step] != DatasetBuilder.pause_value and x[step-1] == DatasetBuilder.pause_value:
current_note = last_note + x[step]
start_time = (step - no_note_endings)*time_unit
bass_lines.append("2, " + str(end_time) + ", End_track\n")
return bass_lines
<file_sep>from DatasetBuilder import DatasetBuilder
builder = DatasetBuilder("D:/environments/licenta/dataset", "D:/environments/licenta/data")
builder.build()
|
f551719c11da3183b188816f8e7477aa5d41de49
|
[
"Python"
] | 6
|
Python
|
stevefai/bandmate
|
e33d7f20509adbcabbbde43a3caa8b66c68544ac
|
043d7af7a85175201a28e31369382439948cb82d
|
refs/heads/master
|
<file_sep><?php
$vcducount = 0;
$vcdu_packet_size = 882;
$vcdu_header_size = 10;
$mpdus = null;
$vcdus = null;
// $fh = fopen ("2015_06_09_15_16_10.vcdu", "rb");
$fh = fopen ( "2015_06_11_14_51_10.vcdu", "rb" );
$cur = 1;
$header = fread ( $fh, filesize ( "2015_06_11_14_51_10.vcdu" ) );
$res = @unpack ( "C*", $header );
fclose ( $fh );
if (sizeof ( $res ) < 10) {
die ( "" );
}
while ( $cur < sizeof ( $res ) ) {
$vcdu_header1 = $res[$cur];
$vcdu_header2 = $res[$cur+1];
$vcdu_header3 = $res[$cur+2];
$vcdu_header4 = $res[$cur+3];
$vcdu_header5 = $res[$cur+4];
$vcdu_header6 = $res[$cur+5];
$insert_zone1 = $res[$cur+6];
$insert_zone2 = $res[$cur+7];
$mpdu_header1 = $res[$cur+8];
$mpdu_header2 = $res[$cur+9];
if ($vcdu_header2 != 5) {
echo "Abortando pacote!";
exit ();
}
$hedpos = (($mpdu_header1 << 8) + $mpdu_header2) & 0x7FF;
$flag = ($mpdu_header1 >> 3) != 0;
//echo "VCDU=$vcducount flag=$flag Headpos: " . $hedpos . "\n";
// Populate VCDU's object
$vcdus[$vcducount]['flag'] = $flag;
$vcdus[$vcducount]['hedpos'] = $hedpos;
// Calculate position for start and end of MPDU packets
$tmp1 = ($cur + $vcdu_header_size) + $hedpos;
$tmp2 = $cur + ($vcdu_packet_size + $vcdu_header_size);
// Debug information
if ($vcducount==0) {
// echo "\nInicio: ".$tmp1;
// echo "\nFim: ".$tmp2."\n";
}
for ($i=$tmp1;$i<$tmp2;$i++) {
$mpdus[$vcducount][] = $res[$i];
}
proccessMPDU($mpdus[$vcducount],$vcducount);
// Increment VCDU count
$vcducount ++;
// Forward do proccess nest VCPDU
$cur = $cur + ($vcdu_packet_size + $vcdu_header_size);
}
function proccessMPDU($mpdu,$vcdu) {
global $vcdus;
// Invalid or ampty MPDU
if (sizeof($mpdu)<0) {
return false;
}
$cur = 0;
while ($cur<sizeof($mpdu)) {
$APID1 = $mpdu[$cur];
$APID2 = $mpdu[$cur+1];
$CONTROL1 = $mpdu[$cur+2];
$CONTROL2 = $mpdu[$cur+3];
$PLEN1 = $mpdu[$cur+4];
$PLEN2 = $mpdu[$cur+5];
$PDUAPID = somaBinario(array($APID1,$APID2));
$PDUCONTROL = somaBinario(array($CONTROL1,$CONTROL2));
$PDULEN = somaBinario(array($PLEN1,$PLEN2));
$PDUDays = somaBinario(array($mpdu[$cur+6],$mpdu[$cur+7]));
$PDUMilisecs = somaBinario(array($mpdu[$cur+8],$mpdu[$cur+9],$mpdu[$cur+10],$mpdu[$cur+11] ));
$PDUMicroseconds = somaBinario(array($mpdu[$cur+12],$mpdu[$cur+13]));
$PDUScanHeader = somaBinario(array($mpdu[$cur+15],$mpdu[$cur+16]));
$PDUSegmentHeader = somaBinario(array($mpdu[$cur+17],$mpdu[$cur+18],$mpdu[$cur+19]));
//$PDUmilisecs = somaBinario(array( $mpdu ));
$indice = sizeof($vcdus[$vcdu]['packets']);
$vcdus[$vcdu]['packets'][$indice]['APID'] = $PDUAPID & 0x7ff;
$vcdus[$vcdu]['packets'][$indice]['miliseconds'] = $PDUMilisecs;
$vcdus[$vcdu]['packets'][$indice]['PACKETLEN'] = $PDULEN+1;
$vcdus[$vcdu]['packets'][$indice]['SEQCOUNT'] = $PDUCONTROL & 0x3FFF;
$vcdus[$vcdu]['packets'][$indice]['SECHEDFLAG'] = (($PDUAPID >> 11) & 1);
$vcdus[$vcdu]['packets'][$indice]['SIZE'] = 6 + $PDULEN +1;
$vcdus[$vcdu]['packets'][$indice]['SEQFLAG'] = ($PDUCONTROL >> 14);
$vcdus[$vcdu]['packets'][$indice]['N_MCU'] = $mpdu[$cur+14];
$vcdus[$vcdu]['packets'][$indice]['SCANHEADER'] = $PDUScanHeader;
$vcdus[$vcdu]['packets'][$indice]['SEGMENTHEADER'] = $PDUSegmentHeader;
$total_data_len = $PDULEN;
for ($j=0;$j<$total_data_len;$j++) {
$vcdus[$vcdu]['packets'][$indice]['DATA'][] = $mpdu[($cur+20)+$j];
}
//if ($vcdu==0) {
// print_r($vcdus[$vcdu]['packets'][$cur]);
//}
$cur = $cur + 6 + $PDULEN+1;
}
}
//print_r($packets[1]);
// Join X hex values in binary
function somaBinario($valores) {
$saida = "";
for ($x=0;$x<sizeof($valores);$x++) {
$tmp = decbin($valores[$x]);
if (strlen($tmp)<8) {
$total = 8 - strlen($tmp);
for ($i=0;$i<$total;$i++) {
$tmp = "0".$tmp;
}
}
$saida = $saida . $tmp;
}
return bindec($saida);
}
// Debug / test
$saida = "";
$apid64 = 0;
$apid65 = 0;
$apid66 = 0;
$apid67 = 0;
$apid68 = 0;
$apid69 = 0;
for ($x=0;$x<sizeof($vcdus);$x++) {
if ($vcdus[$x]['flag']==1) {
$flag = "true";
} else {
$flag = "false";
}
$saida = $saida . "VCDU=$x flag={$flag} hedpos={$vcdus[$x]['hedpos']}\n";
for ($i=0;$i<sizeof($vcdus[$x]['packets']);$i++) {
switch ($vcdus[$x]['packets'][$i]['APID']) {
case "64":
$apid64++;
break;
case "65":
$apid65++;
break;
case "66":
$apid66++;
break;
case "67":
$apid67++;
break;
case "68":
$apid68++;
break;
case "69":
$apid69++;
break;
}
$saida = $saida . "CHECKED APID:{$vcdus[$x]['packets'][$i]['APID']} SeqCOUNT:{$vcdus[$x]['packets'][$i]['SEQCOUNT']} PacketLEN:{$vcdus[$x]['packets'][$i]['PACKETLEN']} Size:{$vcdus[$x]['packets'][$i]['SIZE']} SecHedFlag:{$vcdus[$x]['packets'][$i]['SECHEDFLAG']} SeqFlag:{$vcdus[$x]['packets'][$i]['SEQFLAG']}\n";
}
}
//echo nl2br($saida);
echo $saida;
// function o show data stored in $vcdus
function mostraDados($vcdu,$pdu) {
global $vcdus;
echo "\nAPID: ";
echo $vcdus[$vcdu]['packets'][$pdu]['APID'];
echo "\nseqCount: ";
echo $vcdus[$vcdu]['packets'][$pdu]['SEQCOUNT'];
echo "\nN_MCU: ";
print_r($vcdus[$vcdu]['packets'][$pdu]['N_MCU']);
echo "\nScanHeader: ";
print_r($vcdus[$vcdu]['packets'][$pdu]['SCANHEADER']);
echo "\nSegmentHeader: ";
print_r($vcdus[$vcdu]['packets'][$pdu]['SEGMENTHEADER']);
echo "\n\n";
}
mostraDados(7,3);
mostraDados(7,4);
mostraDados(8,0);
mostraDados(8,1);
<file_sep># php-meteor
This is an PHP-Implementation of METEOR data files, provided by AMIGOS project.
The goal os this implementation is to open and proccess data from .vcdu files and generate JPEG images of METEOR satellite.
Docs: http://meteor.robonuka.ru/for-experts/soft/
|
fe493d9afff62be0b420dc84575da43e24878a70
|
[
"Markdown",
"PHP"
] | 2
|
PHP
|
jmceara/php-meteor
|
dd528f8ca3cd3dbd83456d0dd2019ab7cbe2b4e3
|
a015325559218c9fdbacdb99686bea47cc954121
|
refs/heads/main
|
<repo_name>jiaz123/mvc<file_sep>/application/static/js/admin/admin.js
$(function (){
$(".form-horizontal").validate({
rules: {
user: {
required: true,
minlength: 5
},
pass: {
required: true
}
},
messages: {
user: {
required: "用户名没有填写",
minlength: "要符合用户名规则"
},
pass: {
required: "密码没有填写"
}
}
})
})
<file_sep>/libs/engine.class.php
<?php
class engine{
//第一步获取原始数据
//编译
//显示到页面当中
//分配变量
private $templateDir = "template";
private $compileDir = "compile";
private $cacheDir = "cache";
public $cache = false;
private $arr = array();
private function getData($file){
$destfile = $this->templateDir.$file;
if(is_file($destfile)){
return $this->con=file_get_contents($destfile);
}else{
die("this template not found");
}
}
public function setTemplateDir($path){
$this->templateDir=$path;
}
public function setCompileDir($path){
$this->compileDir=$path;
}
public function setCacheDir($path){
$this->cacheDir=$path;
}
private function compile($file){
$con = $this->getData($file);
$reg = '/\{(\$[a-zA-Z][^\}]*)\}/';
$one = preg_replace_callback($reg,function ($val){
return "<?php echo ".$val[1]." ?>";
},$con);//变量解析完了
//解析foreach
$reg1 = '/\{foreach([^\}]*)\}/';
$two = preg_replace_callback($reg1,function ($val){
return '<?php foreach ('.$val[1].'){ ?>';
},$one);//foreach 的开始解析完了
$reg2 = '/\{\/foreach\}/';
$three = preg_replace_callback($reg2,function ($val){
return '<?php } ?>';
},$two);
return $three;
}
function display($file){
$outFileName = $this->compileDir.basename($file,".html").".php";
$cacheFileName = $this->cacheDir.basename($file,".html").".htm";
$inFileName = $this->templateDir.$file;
if($this->cache&&is_file($cacheFileName)&&filemtime($cacheFileName)>filemtime($inFileName)){
include_once $cacheFileName;
}else{
if(is_file($outFileName)&&filemtime($outFileName)>filemtime($inFileName)){
foreach ($this->arr as $k => $v){
$$k = $v;
}
include_once $outFileName;
}else{
$result = $this->compile($file);
file_put_contents($outFileName,$result);
foreach ($this->arr as $k=>$v){
$$k = $v;
}
if($this->cache){
ob_start();
include_once $outFileName;
$con = ob_get_contents();
file_put_contents($cacheFileName,$con);
ob_end_flush();
}else{
include_once $outFileName;
}
}
}
}
function assign($attr,$val){
$this->arr[$attr]=$val;
}
}<file_sep>/application/template/9599bb1055ea9cb3989b20527fea00bfe1eb1872_0.file.category.html.php
<?php
/* Smarty version 3.1.34-dev-7, created on 2020-09-26 02:36:37
from 'C:\wamp64\www\study\mvc\application\template\admin\category.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.34-dev-7',
'unifunc' => 'content_5f6ea935be0638_79687411',
'has_nocache_code' => false,
'file_dependency' =>
array (
'9599bb1055ea9cb3989b20527fea00bfe1eb1872' =>
array (
0 => 'C:\\wamp64\\www\\study\\mvc\\application\\template\\admin\\category.html',
1 => 1601087794,
2 => 'file',
),
),
'includes' =>
array (
),
),false)) {
function content_5f6ea935be0638_79687411 (Smarty_Internal_Template $_smarty_tpl) {
?><!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="<?php echo CSS_ADD;?>
admin/bootstrap.min.css">
<link rel="stylesheet" href="<?php echo CSS_ADD;?>
admin/category.css">
<?php echo '<script'; ?>
src="<?php echo JS_ADD;?>
jquery-3.5.1.js"><?php echo '</script'; ?>
>
</head>
<body>
<div class="container">
<form action="/study/mvc/index.php/admin/category/add" style="margin-top: 30px;border-bottom: 30px" method="post">
<input type="text" placeholder="添加一级栏目" name="cname">
<input type="submit" value="添加">
</form>
<?php if ($_smarty_tpl->tpl_vars['data']->value) {?>
<table class="table table-bordered table-striped">
<?php echo $_smarty_tpl->tpl_vars['data']->value;?>
</table>
<?php } else { ?>
<table>
<tr>
<td>
没有数据
</td>
</tr>
</table>
<?php }?>
</div>
<div class="pannel addpannel">
<div class="close">
X
</div>
<form action="/study/mvc/index.php/admin/category/add" method="post">
<input type="text" name="cname">
<input type="hidden" name="cid">
<input type="submit" value="提交">
</form>
</div>
<div class="pannel editpannel">
<div class="close">
X
</div>
<form action="/study/mvc/index.php/admin/category/add" method="post">
<input type="text" name="cname">
<select name="pid" id="opts">
</select>
<input type="button" value="修改" >
</form>
</div>
<?php echo '<script'; ?>
src="<?php echo JS_ADD;?>
admin/category.js"><?php echo '</script'; ?>
>
</body>
</html><?php }
}
<file_sep>/libs/cookie.class.php
<?php
namespace libs;
class cookie{
function setCookie($attr,$val,$second=0){
if ($second){
setcookie($attr,$val,time()+$second);
}else{
setcookie($attr,$val);
}
}
function getCookie($attr){
return $_COOKIE[$attr];
}
function delCookie($attr){
setcookie($attr,"",time()-10);
}
function isCookie($attr){
return isset($_COOKIE[$attr]);
}
}<file_sep>/application/static/js/admin/category.js
$(".add").click(function () {
var cid= $(this).attr("attr");
$("input[type=hidden]").val(cid);
$("<div class='mask'>").appendTo("body").css({
width:"100%",
height:"100%",
opacity:0.3,
background:"#000",
position:"absolute",
left:0,
top:0
})
$(".addpannel").css("display","block");
})
$(".addpannel .close").click(function () {
$(".addpannel").css("display","none");
$(".mask").remove();
})
var cid;
$(".edit").click(function () {
cid= $(this).attr("attr");
var pid= $(this).attr("pid");
$("input[type=hidden]").val(cid);
$("<div class='mask'>").appendTo("body").css({
width:"100%",
height:"100%",
opacity:0.3,
background:"#000",
position:"absolute",
left:0,
top:0
})
$(".editpannel").css("display","block");
// 修改信息查询
$.ajax({
url:"/study/mvc/index.php/admin/category/show",
data:{cid},
dataType:"json",
success:function (e) {
$(".editpannel input[name=cname]").val(e["cname"])
}
})
$.ajax({
url:"/study/mvc/index.php/admin/category/getOption",
dataType:"json",
success:function (e) {
tree(e,1,cid,pid)
$("#opts").html(str)
str="<option value='0'>一级</option>";
}
})
})
// 修改内容
$(".editpannel input[type=button]").click(function () {
var data=($(".editpannel form").serialize()+"&cid="+cid);
$.ajax({
url:"/study/mvc/index.php/admin/category/editcon",
data:data,
success:function (e) {
if ($.trim(e)=="ok"){
location.reload()
}
}
})
})
var str="<option value='0'>一级</option>";
// 循环插入空格实现层次
function str_repeat(str,num) {
var result="";
for (var i=0;i<num;i++){
result+=str;
}
return result;
}
function tree(data,$i,cid,pid){
for (var i=0;i<data.length;i++){
if (data[i].child){
if(data[i].cid!=cid){
if (data[i].cid == pid){
str += "<option value='" + data[i].cid + "' selected>"+ str_repeat(" ",$i) + data[i].cname + "</option>"
}else {
str += "<option value='" + data[i].cid + "'>"+ str_repeat(" ",$i) + data[i].cname + "</option>"
}
}
tree(data[i].child,$i+1,cid,pid)
}else {
if(data[i].cid!=cid) {
if (data[i].cid == pid) {
str += "<option value='" + data[i].cid + "' selected>" + str_repeat(" ", $i) + data[i].cname + "</option>"
} else {
str += "<option value='" + data[i].cid + "'>" + str_repeat(" ", $i) + data[i].cname + "</option>"
}
}
}
}
}
$(".editpannel .close").click(function () {
$(".editpannel").css("display","none");
$(".mask").remove();
})<file_sep>/application/index/index.class.php
<?php
header("content-type:text/html;charset=utf-8");
if(!defined("MVC")){
die("访问路径不合法");
}
class index extends main{
function int(){
$arr=array();
$i=0;
$result=$this->db->query("select * from mvc_category where pid = 0");
while ($row=$result->fetch_assoc()){
$arr[$i]=$row;
$result1=$this->db->query("select * from mvc_category where pid=".$row['cid']);
while ($row1=$result1->fetch_assoc()){
$arr[$i][]=$row1;
}
$i++;
}
$this->smarty->assign("menudata",$arr);
$this->smarty->display("index/index.html");
}
function about(){
$this->smarty->display("index/about.html");
}
}<file_sep>/application/admin/category.class.php
<?php
class category extends main
{
public $arr=array();
function int(){
$str = "";
$this->tree(0,$str);
$this->smarty->assign("data",$str);
$this->smarty->display("admin/category.html");
}
function add(){
if (isset($_POST["cid"])){
$gid=$_POST["cid"];
}else{
$gid = 0;
}
$cname=$_POST["cname"];
$this->db->query("insert into mvc_category (cname,pid) values ('$cname',$gid)");
if ($this->db->affected_rows>0){
header("location:/study/mvc/index.php/admin/category");
}
}
function show(){
$cid=$_GET["cid"];
$result=$this->db->query("select * from mvc_category where cid=".$cid);
$row=$result->fetch_assoc();
echo json_encode($row);
}
function tree($pid=0,&$str,$i=0){
$result = $this->db->query("select * from mvc_category where pid = ".$pid);
while ($row=$result->fetch_assoc()){
$str.='<tr><td>'.($i+1).'级目录</td><td>'.str_repeat("↪",$i).$row["cname"].'</td> <td>
<a href="javascript:;" class="add" attr="'.$row["cid"].'">添加</a>
<a href="/study/mvc/index.php/admin/category/del?cid='.$row["cid"].'" attr="'.$row["cid"].'" class="remove">删除</a>
<a href="javascript:;" attr="'.$row["cid"].'"class="edit" pid="'.$row["pid"].'">修改</a>
</td></tr>';
$this->tree($row["cid"],$str,$i+1);
}
}
function getOption(){
$this->treeOption(0,$this->arr);
echo json_encode($this->arr);
}
function treeOption($pid,&$arr){
$result = $this->db->query("select * from mvc_category where pid=".$pid);
$i=0;
while ($row=$result->fetch_assoc()){
$arr[$i]=array(
"cname"=>$row["cname"],
"cid"=>$row["cid"],
"pid"=>$row["pid"]
);
$this->treeOption($row["cid"],$arr[$i]["child"]);
$i++;
}
}
function del(){
$cid=$_GET["cid"];
$result=$this->db->query("select * from mvc_category where pid =".$cid);
if ($result->num_rows>0){
echo "<script>alert('请先删除子目录');location.href='/study/mvc/index.php/admin/category'</script>";
}else{
$this->db->query("delete from mvc_category where cid=".$cid);
if($this->db->affected_rows>0){
header("location:/study/mvc/index.php/admin/category");
}
}
}
// 修改内容
function editcon(){
$cname=$_GET["cname"];
$pid=$_GET["pid"];
$cid=$_GET["cid"];
$this->db->query("update mvc_category set cname='{$cname}',pid='{$pid}' where cid=".$cid);
if ($this->db->affected_rows>0){
echo "ok";
}
}
function edit(){
echo "请在表格中修改";
}
}<file_sep>/application/template/57f076d863c0c71a6baf53ecb444e72e5bcaf1a8_0.file.index.html.php
<?php
/* Smarty version 3.1.34-dev-7, created on 2020-09-26 08:33:02
from 'C:\wamp64\www\study\mvc\application\template\admin\index.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.34-dev-7',
'unifunc' => 'content_5f6efcbe286353_82947429',
'has_nocache_code' => false,
'file_dependency' =>
array (
'57f076d863c0c71a6baf53ecb444e72e5bcaf1a8' =>
array (
0 => 'C:\\wamp64\\www\\study\\mvc\\application\\template\\admin\\index.html',
1 => 1601108200,
2 => 'file',
),
),
'includes' =>
array (
),
),false)) {
function content_5f6efcbe286353_82947429 (Smarty_Internal_Template $_smarty_tpl) {
?><!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="<?php echo CSS_ADD;?>
admin/index.css">
</head>
<body>
<div class="header">
<div class="headerlogo">
<a href="http://localhost/study/mvc/index.php/index/index" target="_blank">
<img src="<?php echo IMG_ADD;?>
logo.png" alt="" class="img">
</a>
</div>
<div class="logininfo">
<span><?php echo $_smarty_tpl->tpl_vars['user']->value;?>
</span>
<span>
<a href="/study/mvc/index.php/admin/index/logout">退出登录</a>
</span>
</div>
</div>
<div class="main">
<div class="left">
<ul>
<li>
<h3>用户管理</h3>
<ul class="son">
<li>
<a href="adduser" target="main">添加用户</a></li>
<li>
<a href="edituser" target="main">修改用户</a>
</li>
</ul>
</li>
<li>
<h3>栏目管理</h3>
<ul class="son">
<li><a href="/study/mvc/index.php/admin/category/" target="main">添加栏目</a></li>
<li><a href="/study/mvc/index.php/admin/category/edit" target="main">修改栏目</a></li>
</ul>
</li>
<li>
<h3>内容管理</h3>
<ul class="son">
<li><a href="/study/mvc/index.php/admin/content/" target="main">查看内容</a></li>
<li><a href="/study/mvc/index.php/admin/content/edit" target="main">修改内容</a></li>
</ul>
</li>
</ul>
</div>
<div class="right">
<iframe src="" frameborder="0" name="main"></iframe>
</div>
</div>
<div class="bottom">
<span>衡源金属后台管理</span>
</div>
</body>
</html><?php }
}
<file_sep>/application/admin/index.class.php
<?php
header("content-type:text/html;charset=utf-8");
if(!defined("MVC")){
die("访问路径不合法");
}
use libs\code;
class index extends main {
function int()
{
$this->smarty->display("admin/login.html");
}
function login(){
global $config;
$user=addslashes($_POST["user"]);
$pass=md5(md5($_POST["pass"]));
if ($config["code"]["ischeck"]){
if ($_POST["code"] !== $_SESSION["code"]){
echo "验证码有误";
return;
}
}
if (strlen($user)<5 || empty($pass)){
echo "用户名或密码不符合规范";
return;
}
/*$db= @new mysqli("localhost","root","","test","3308");
// 不希望用户看到数据库连接失败的具体信息
if(mysqli_connect_error()){
die("数据库连接错误");
}*/
$db=$this->db;
$db->query("set names utf8");
$result = $db->query("select * from admin where user='$user' and pass = '$pass'");
// 结果数据为空 则重新登陆
if ($result->num_rows<1){
echo "没有相应数据,请重新登录";
}else {
$_SESSION["login"]="yes";
$_SESSION["user"]=$user;
header("location:first");
}
}
function logout(){
session_destroy();
header("location:/study/mvc/index.php/admin");
}
function first(){
if(isset($_SESSION["login"])&& $_SESSION["login"] == "yes"){
$this->smarty->assign("user",$_SESSION["user"]);
$this->smarty->display("admin/index.html");
}
}
function mycode(){
$code=new code();
$code->out();
}
function adduser(){
$this->smarty->display('admin/adduser.html');
}
function edituser(){
$this->smarty->display('admin/edituser.html');
}
}<file_sep>/libs/start.php
<?php
header("content-type:text/html;charset=utf8");
if(!defined("MVC")){
die("访问路径不合法");
}
// 服务器所在的根路径
define("ROOT_PATH",$_SERVER["DOCUMENT_ROOT"]);
//入口文件的路径
define("ENTRY_PATH",$_SERVER["SCRIPT_FILENAME"]);
//框架所在的路径
define("MAIN_PATH",dirname(ENTRY_PATH).DIRECTORY_SEPARATOR);
// 核心库所在的路径
define("LIBS_PATH",MAIN_PATH."libs".DIRECTORY_SEPARATOR);
//插件所在路径
define("PLU_PATH",MAIN_PATH."plugins".DIRECTORY_SEPARATOR);
// 模板所在的路径
define("TPL_PATH",APP_NAME."template".DIRECTORY_SEPARATOR);
//编译文件所在的目录
define("COMPILE_PATH",APP_NAME."compile".DIRECTORY_SEPARATOR);
// 缓存文件所在的目录
define("CACHE_PATH",APP_NAME."cache".DIRECTORY_SEPARATOR);
//定义smarty 路径
define("SMARTY_PATH",LIBS_PATH."smarty".DIRECTORY_SEPARATOR);
// 以上定义的都是各种文件在本地的路径
//通过http协议访问的路径
define("HOST_ADD","http://".$_SERVER["HTTP_HOST"]);
// 单入口文件地址
define("ENTRY_ADD",$_SERVER["SCRIPT_NAME"]);
// 框架入口地址
define("MAIN_ADD",dirname($_SERVER["SCRIPT_NAME"]).DIRECTORY_SEPARATOR);
// 当前应用的地址
define("APP_ADD",MAIN_ADD.APP_DIR_NAME.DIRECTORY_SEPARATOR);
// 静态文件的地址
define("STATIC_ADD",APP_ADD."static".DIRECTORY_SEPARATOR);
// css地址
define("CSS_ADD",STATIC_ADD."css".DIRECTORY_SEPARATOR);
// bootstrap地址
define("BOOT_ADD",STATIC_ADD."css".DIRECTORY_SEPARATOR."admin/bootstrap.min.css");
// js地址
define("JS_ADD",STATIC_ADD."js".DIRECTORY_SEPARATOR);
// image地址
define("IMG_ADD",STATIC_ADD."img".DIRECTORY_SEPARATOR);
// font地址
define("FONT_ADD",STATIC_ADD."font".DIRECTORY_SEPARATOR);
$config=include_once APP_NAME."config.php";
include_once LIBS_PATH."engine.class.php";
include_once SMARTY_PATH."Smarty.class.php";
include_once LIBS_PATH."route.class.php";
include_once LIBS_PATH."main.class.php";
include_once LIBS_PATH."code.class.php";
function auto($classname){
include_once MAIN_PATH.str_replace("\\",DIRECTORY_SEPARATOR,$classname).".class.php";
}
spl_autoload_register("auto");
$router=new \libs\route();
$router->run();
<file_sep>/application/template/d2c6707c72ec838d7436ae24683dc66ba940e6e5_0.file.login.html.php
<?php
/* Smarty version 3.1.34-dev-7, created on 2020-09-26 01:51:20
from 'C:\wamp64\www\study\mvc\application\template\admin\login.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.34-dev-7',
'unifunc' => 'content_5f6e9e980d7e25_28358074',
'has_nocache_code' => false,
'file_dependency' =>
array (
'd2c6707c72ec838d7436ae24683dc66ba940e6e5' =>
array (
0 => 'C:\\wamp64\\www\\study\\mvc\\application\\template\\admin\\login.html',
1 => 1601085074,
2 => 'file',
),
),
'includes' =>
array (
),
),false)) {
function content_5f6e9e980d7e25_28358074 (Smarty_Internal_Template $_smarty_tpl) {
?><!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>登录我的后台</title>
<link rel="stylesheet" href="<?php echo CSS_ADD;?>
admin/bootstrap.min.css">
<link rel="stylesheet" href="<?php echo CSS_ADD;?>
admin/login.css">
<?php echo '<script'; ?>
src="<?php echo JS_ADD;?>
jquery-3.5.1.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
src="<?php echo JS_ADD;?>
jquery.validate.min.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
src="<?php echo JS_ADD;?>
admin/admin.js"><?php echo '</script'; ?>
>
<style>
body{
background-image: url("https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1462841369,2966836788&fm=26&gp=0.jpg");
background-size: 100% auto;
}
</style>
</head>
<body>
<form class="form-horizontal" action="admin/index/login" method="post" style="height: 380px;">
<h1>衡源金属后台管理</h1>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">用户名</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputEmail3" placeholder="用户名" name="user">
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-2 control-label">密码</label>
<div class="col-sm-10">
<input type="password" class="form-control" id="inputPassword3" placeholder="密码" name="pass">
</div>
</div>
<div class="form-group">
<label for="inputPassword4" class="col-sm-2 control-label">验证码</label>
<div class="col-sm-10">
<input type="text" class="form-control" placeholder="请输入验证码" id="inputPassword4" name="code" style="width: 35%">
<img src="http://localhost/study/mvc/index.php/admin/index/mycode" alt="" onclick="this.src='http://localhost/study/mvc/index.php/admin/index/mycode?'+Math.random()" style="cursor: pointer" width="120px"><span style="font-size: 14px">看不清楚?点击更换</span></img>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="checkbox">
<label>
<input type="checkbox">记住密码
</label>
</div>
</div>
</div>
<div class="form-group" >
<div class="col-sm-offset-2 col-sm-10" style="float:right;">
<button type="submit" class="btn btn-default">登录</button>
</div>
</div>
</form>
</body>
</html><?php }
}
<file_sep>/application/template/3ac4a98e278de8eba5aeb57410cfb8c00ad04e50_0.file.about.html.php
<?php
/* Smarty version 3.1.34-dev-7, created on 2020-09-26 02:23:49
from 'C:\wamp64\www\study\mvc\application\template\index\about.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.34-dev-7',
'unifunc' => 'content_5f6ea635caa262_03758540',
'has_nocache_code' => false,
'file_dependency' =>
array (
'3ac4a98e278de8eba5aeb57410cfb8c00ad04e50' =>
array (
0 => 'C:\\wamp64\\www\\study\\mvc\\application\\template\\index\\about.html',
1 => 1601086968,
2 => 'file',
),
),
'includes' =>
array (
),
),false)) {
function content_5f6ea635caa262_03758540 (Smarty_Internal_Template $_smarty_tpl) {
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>衡源金属仿写</title>
<link rel="stylesheet" href="<?php echo CSS_ADD;?>
index/about.css">
</head>
<body>
<?php echo '<script'; ?>
src="<?php echo JS_ADD;?>
index/wheel.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
src="<?php echo JS_ADD;?>
index/aniMath.js"><?php echo '</script'; ?>
>
<div id="top-bar">
<div class="top-wrap">
<div id="top-table top-mobile-collapsed">
<div class="top-td">
<div class="mini-top-left">
<ul> </ul>
</div>
<div class="top-left">
仅供学习使用,如有侵权,立即删除!!!
</div>
</div>
<div class="top-right">
<form class="searchform" method="GET" action="http://www.dg-hengyuan.com">
<input results="s"type="search" class="assistive-text searchsubmit"
value placeholder="请输入需要搜索的文字">
<a href="#go" style="margin: 0px;height: 25px;line-height: 25px;top: 2px;color:#8d9095;" class="submit fa fa-search"></a>
</form>
</div>
</div>
</div>
</div>
<header id="header" class="logo-classic" role="banner" style="text-align: center;">
<div class="wf-wrap">
<div class="headerlogo">
<a href="http://www.dg-hengyuan.com/">
<div class="logospan">
<img src="<?php echo IMG_ADD;?>
logo.png" width="225.79px;" height="54px" alt="衡源金属科技专业生产:人脸识别外壳,门禁闸机头通道一体机外壳,测温模块热成像铝外壳,广告机外壳铝合金框,铝型材框显示器面板,7寸8寸10.1寸外壳加工厂家,咨询:15919816244">
</div>
<div class="logospans">
<span class="first-span" style="font-size: 23px;color: rgb(14,27,132);"><b><p></p>东莞市衡源金属科技有限公司</b></span>
<span style="font-size: 16px; font-family: 微软雅黑, sans-serif; color: rgb(34, 34, 34);"><b>专业人脸识别终端一体机套料外壳供应商</b></span>
</div>
</a>
</div>
<div class="headerright">
<table class="qtable" style="
width:99%;margin-right:calc(1%);margin-top: 29.5px;">
<tr>
<td rowspan="2" style="width: 8.011%;border-color: rgb(255,255,255);">
<img src="https://cdn.goodq.top/caches/3ca69b90d929ab5db370a99817545413/aHR0cDovL3d3dy5kZy1oZW5neXVhbi5jb20vcWZ5LWNvbnRlbnQvdXBsb2Fkcy8yMDE4LzA5L2JhMDJhM2M1MDA1OTNjNjdkODQzMDRiYWE5NGNiZjcyLnBuZw_p_p100_p_3D_p_p100_p_3D.png" alt="" title="" style="width: 50px; height: 50px;">
</td>
<td rowspan="2" style="width: 29.9264%;border-color: rgb(255,255,255);">
全国咨询热线<br>
<span style="font-size: 28px;">
<span style="color: rgb(14,27,132);font-family: 楷体;">15919816244</span>
</span>
</td>
<td rowspan="2" style="width: 8.5635%;background-color:rgb(255,255,255);border-color: rgb(255,255,255);">
<img data-fr-image-pasted="true" src="https://cdn.goodq.top/caches/3ca69b9<KEY>p_3D_p_p100_p_3D.png" alt="" title="" style="width: 50px; height: 50px;">
</td>
<td rowspan="2" style="width: 33.2413%;background-color:rgb(255,255,255);border-color: rgb(255,255,255);">
全国咨询热线<br>
<span style="font-size: 28px;">
<span style="color: rgb(14,27,132);font-family: 楷体;">15919816244</span>
</span>
</td>
<td style="width: 9.4844%;border-color: rgb(255,255,255);text-align: center;">
<a href="http://dg-hengyuan.com/" target="_blank">
<img src="https://cdn.goodq.top/caches/3ca69b90d929ab5db370a99817545413/aHR0cDovL3d3dy5kZy<KEY>_p_p100_p_3D_p_p100_p_3D.jpg" alt="" title="">
</a>
</td>
<td style="width: 9.4844%;border-color: rgb(255,255,255);text-align: center;">
<a href="http://en.dg-hengyuan.com/" target="_blank">
<img src="https://cdn.goodq.top/caches/3ca69b90d929ab5db370a99817545413/aHR0cDovL3d3dy5kZy1oZW5neXVhbi5jb20vcWZ5LWNvbnRlbnQvdXBsb2Fkcy8yMDE5LzAyL2Y4MDViMGRlNjk4ZDIyNjQwMzQwMDhmMjVhNTgwMjQ5LmpwZw_p_p100_p_3D_p_p100_p_3D.jpg" alt="" title="">
</a>
</td>
</tr>
<tr>
<td style="width: 10.5893%;background-color: rgb(255,255,255);border-color: rgb(255,255,255);text-align: center;">
<span style="color: rgb(0,0,0);">中文</span>
</td>
<td style="width: 9.4844%;background-color: rgb(255,255,255);border-color: rgb(255,255,255);text-align: center;">
<span style="color: rgb(0,0,0);">英文</span>
</td>
</tr>
</table>
</div>
</div>
<div class="header-nav">
<nav id="navigation" class="wf-wrap">
<ul id="main-nav">
<li>
<a href="http://localhost/study/mvc/index.php/index/index">
<div class="nav-1" style="color: #ffffff;text-align: center;line-height: 50px;">首页</div>
</a>
</li>
<li>
<a href="http://localhost/study/mvc/index.php/index/index/about">
<div class="nav-2" style="color: #ffffff;text-align: center;line-height: 50px;">关于衡源</div>
</a>
</li>
<li>
<a href="http://dg-hengyuan.com/">
<div class="nav-3" style="color: #ffffff;text-align: center;line-height: 50px;">产品中心</div>
</a>
</li>
<li>
<a href="http://dg-hengyuan.com/">
<div class="nav-4" style="color: #ffffff;text-align: center;line-height: 50px;">解决方案</div>
</a>
</li>
<li>
<a href="http://dg-hengyuan.com/">
<div class="nav-5" style="color: #ffffff;text-align: center;line-height: 50px;">新闻资讯</div>
</a>
</li>
<li>
<a href="http://dg-hengyuan.com/">
<div class="nav-6" style="color: #ffffff;text-align: center;line-height: 50px;">典型案例</div>
</a>
</li>
<li>
<a href="http://dg-hengyuan.com/">
<div class="nav-7"style="color: #ffffff;text-align: center;line-height: 50px;">销售支持</div>
</a>
</li>
<li>
<a href="http://dg-hengyuan.com/">
<div class="nav-8" style="color: #ffffff;text-align: center;line-height: 50px;">联系我们</div>
</a>
</li>
</ul>
</nav>
</div>
</header>
<section class="bitBanner" id="bitBanner">
<div class="wheel">
<?php echo '<script'; ?>
>
wheel(".wheel",{
imgs:["https://cdn.goodq.top/caches/3ca69b90d929ab5db370a99817545413/aHR0cDovL3d3dy5kZy1oZW5neXVhbi5jb20vcWZ5LWNvbnRlbnQvdXBsb2Fkcy8yMDE5LzAyLzM3MDUxYjQ2MGY2ZjJhNTM5ODZjYWUwNjk0NTAwMWQ4LmpwZw_p_p100_p_3D_p_p100_p_3D.jpg","https://cdn.goodq.top/caches/3ca69b90d929ab5db370a99817545413/aHR0cDovL3d3dy5kZy1oZW5neXVhbi5jb20vcWZ5LWNvbnRlbnQvdXBsb2Fkcy8yMDE5LzAyLzM3MDUxYjQ2MGY2ZjJhNTM5ODZjYWUwNjk0NTAwMWQ4LmpwZw_p_p100_p_3D_p_p100_p_3D.jpg"],
links:["about.html","about.html"],
imgColor:["white","white"],
imgSize:[1519.2,330],
btnColor:"gray",
btnActive:"white",
btnPos:["center","10"]
},{
eachTime:1
})
<?php echo '</script'; ?>
>
</div>
</section>
<div style="width: 1519.8px;height: 220.28px;">
<div style="width: 1519.8px;height: 160.28px;margin-top: 30px;">
</div>
</div>
<!-- <div style="width: 1519.2px;">
<img src="imgs/foot.jpg" alt="" style="width: 100%;height: auto;">
</div> -->
</body>
</html><?php }
}
<file_sep>/application/template/a06d207caebc6415042114a796650e6ae6642277_0.file.index.html.php
<?php
/* Smarty version 3.1.34-dev-7, created on 2020-09-26 07:01:18
from 'C:\wamp64\www\study\mvc\application\template\index\index.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.34-dev-7',
'unifunc' => 'content_5f6ee73e5e0e40_60376150',
'has_nocache_code' => false,
'file_dependency' =>
array (
'a06d207caebc6415042114a796650e6ae6642277' =>
array (
0 => 'C:\\wamp64\\www\\study\\mvc\\application\\template\\index\\index.html',
1 => 1601103677,
2 => 'file',
),
),
'includes' =>
array (
),
),false)) {
function content_5f6ee73e5e0e40_60376150 (Smarty_Internal_Template $_smarty_tpl) {
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>衡源金属仿写</title>
<link rel="stylesheet" href="<?php echo CSS_ADD;?>
index/index.css">
<?php echo '<script'; ?>
src="<?php echo JS_ADD;?>
index/aniMath.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
src="<?php echo JS_ADD;?>
index/wheel.js"><?php echo '</script'; ?>
>
</head>
<body>
<div id="top-bar">
<div class="top-wrap">
<div id="top-table top-mobile-collapsed">
<div class="top-td">
<div class="mini-top-left">
<ul> </ul>
</div>
<div class="top-left">
仅供学习使用,如有侵权,立即删除!!!
</div>
</div>
<div class="top-right">
<form class="searchform" method="GET" action="http://www.dg-hengyuan.com">
<input results="s"type="search" class="assistive-text searchsubmit"
value placeholder="请输入需要搜索的文字">
<a href="#go" style="margin: 0px;height: 25px;line-height: 25px;top: 2px;color:#8d9095;" class="submit fa fa-search"></a>
</form>
</div>
</div>
</div>
</div>
<header id="header" class="logo-classic" role="banner">
<div class="wf-wrap">
<div class="headerlogo">
<a href="http://www.dg-hengyuan.com/">
<div class="logospan">
<img src="<?php echo IMG_ADD;?>
logo.png" width="225.79px;" height="54px" alt="衡源金属科技专业生产:人脸识别外壳,门禁闸机头通道一体机外壳,测温模块热成像铝外壳,广告机外壳铝合金框,铝型材框显示器面板,7寸8寸10.1寸外壳加工厂家,咨询:15919816244">
</div>
<div class="logospans">
<span class="first-span" style="font-size: 23px;color: rgb(14,27,132);"><b><p></p>东莞市衡源金属科技有限公司</b></span>
<span style="font-size: 16px; font-family: 微软雅黑, sans-serif; color: rgb(34, 34, 34);"><b>专业人脸识别终端一体机套料外壳供应商</b></span>
</div>
</a>
</div>
<div class="headerright">
<table class="qtable" style="
width:99%;margin-right:calc(1%);margin-top: 29.5px;">
<tr>
<td rowspan="2" style="width: 8.011%;border-color: rgb(255,255,255);">
<img src="https://cdn.goodq.top/caches/3ca69b90d929ab5db370a99817545413/aHR0cDovL3d3dy5kZy1oZW5neXVhbi5jb20vcWZ5LWNvbnRlbnQvdXBsb2Fkcy8yMDE4LzA5L2JhMDJhM2M1MDA1OTNjNjdkODQzMDRiYWE5NGNiZjcyLnBuZw_p_p100_p_3D_p_p100_p_3D.png" alt="" title="" style="width: 50px; height: 50px;">
</td>
<td rowspan="2" style="width: 29.9264%;border-color: rgb(255,255,255);">
全国咨询热线<br>
<span style="font-size: 28px;">
<span style="color: rgb(14,27,132);font-family: 楷体;">15919816244</span>
</span>
</td>
<td rowspan="2" style="width: 8.5635%;background-color:rgb(255,255,255);border-color: rgb(255,255,255);">
<img data-fr-image-pasted="true" src="https://cdn.goodq.top/caches/3ca69b<KEY>p_3D_p_p100_p_3D.png" alt="" title="" style="width: 50px; height: 50px;">
</td>
<td rowspan="2" style="width: 33.2413%;background-color:rgb(255,255,255);border-color: rgb(255,255,255);">
全国咨询热线<br>
<span style="font-size: 28px;">
<span style="color: rgb(14,27,132);font-family: 楷体;">15919816244</span>
</span>
</td>
<td style="width: 9.4844%;border-color: rgb(255,255,255);text-align: center;">
<a href="http://dg-hengyuan.com/" target="_blank">
<img src="https://cdn.goodq.top/caches/3ca69b90d929ab5db370a99817545413/aHR0cDovL3d3dy5kZy<KEY>_p_p100_p_3D_p_p100_p_3D.jpg" alt="" title="">
</a>
</td>
<td style="width: 9.4844%;border-color: rgb(255,255,255);text-align: center;">
<a href="http://en.dg-hengyuan.com/" target="_blank">
<img src="https://cdn.goodq.top/caches/3ca69b90d929ab5db370a99817545413/aHR0cDovL3d3dy5kZy1oZW5neXVhbi5jb20vcWZ5LWNvbnRlbnQvdXBsb2Fkcy8yMDE5LzAyL2Y4MDViMGRlNjk4ZDIyNjQwMzQwMDhmMjVhNTgwMjQ5LmpwZw_p_p100_p_3D_p_p100_p_3D.jpg" alt="" title="">
</a>
</td>
</tr>
<tr>
<td style="width: 10.5893%;background-color: rgb(255,255,255);border-color: rgb(255,255,255);text-align: center;">
<span style="color: rgb(0,0,0);">中文</span>
</td>
<td style="width: 9.4844%;background-color: rgb(255,255,255);border-color: rgb(255,255,255);text-align: center;">
<span style="color: rgb(0,0,0);">英文</span>
</td>
</tr>
</table>
</div>
</div>
<div class="header-nav">
<nav id="navigation" class="wf-wrap">
<ul id="main-nav">
<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['menudata']->value, 'v');
$_smarty_tpl->tpl_vars['v']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['v']->value) {
$_smarty_tpl->tpl_vars['v']->do_else = false;
?>
<li>
<a href="http://localhost/study/mvc/index.php/index/index">
<div class="nav"><?php echo $_smarty_tpl->tpl_vars['v']->value["cname"];?>
</div>
</a>
</li>
<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
</ul>
</nav>
</div>
</header>
<section class="bitBanner" id="bitBanner">
<div class="wheel">
<?php echo '<script'; ?>
>
wheel(".wheel",{
imgs:["https://cdn.goodq.top/caches/3ca69b90d929ab5db370a99817545413/aHR0cDovL3d3dy5kZy1oZW<KEY>WZ<KEY>MT<KEY>ODIyYjJmNmVmMzdkLmpwZw_p_p100_p_3D_p_p100_p_3D.jpg","https://cdn.goodq.top/caches/3ca69b90d929ab5db370a99817545413/aHR0cDovL3d3dy5kZy1oZW5neXVhbi5jb<KEY>Nj<KEY>2YTZlZDM0MWMzLmpwZw_p_p100_p_3D_p_p100_p_3D.jpg","https://cdn.goodq.top/caches/3ca69b90<KEY>00_p_3D_p_p100_p_3D.jpg","https://cdn.goodq.top/caches/3ca69b90d929ab5db370a99817545413/<KEY>00_p_3D_p_p100_p_3D.jpg"],
links:["hengyuan.html","hengyuan.html","hengyuan.html","hengyuan.html"],
imgColor:["white","white","white","white"],
imgSize:[1518,500],
btnColor:"gray",
btnActive:"white",
btnPos:["center","10"]
},{
eachTime:1
})
<?php echo '</script'; ?>
>
</div>
</section>
<div class="product">
<div class="title">
<div style="float: left;"><hr></div>
<div style="font-family:tahoma;font-size:50px;font-weight:bold;font-style:normal;color:#0b1d83;padding:0 10px 0 0;display:inline-block;padding:0 10px 0 0;vertical-align:middle;">PRODUCT</div>
<div style="font-family:微软雅黑;font-size:40px;font-weight:normal;font-style:normal;color:#2b2b2b;display:inline-block;padding:2px;vertical-align:middle;margin-top: -86px;margin-left: 250px;">产品系列</div>
</div>
<span class="line-abs" style="overflow:hidden;border-bottom-style:solid;width:455px;max-width:455px;border-bottom-width:1px;border-bottom-color:#e2e2e2;margin-right:20px;"></span>
<div class="newtitle">
<div style="font-family:微软雅黑;font-size:25px;font-weight:normal;font-style:normal;color:#7f7f7f;padding:0 10px 0 0;padding:0 10px 0 0;vertical-align:bottom;">智能人脸识别终端一体机行业供应商</div>
</div>
<span class="line-abs right" style="overflow:hidden;border-bottom-style:solid;width:455px;max-width:455px;border-bottom-width:1px;border-bottom-color:#e2e2e2;margin-left:20px;"></span>
</div>
<div class="productDetail">
<div class="productbutton">
<ul style="text-align:center; width:100%;display: table;">
<li class="left" style="display: table-cell;"></li>
<li class="item" id="item" style="display: table-cell;text-align:center; position:relative;width:150px;">
<a href="" style="cursor:pointer;line-height:17px;display: block;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;width:150px;border-style: solid;font-family:微软雅黑; font-size:17px; font-weight:bold; background-color:transparent; color:#0b1d83; border: 1px solid rgba(11,29,131,1); padding:14px 20px 14px 20px;">人脸/识别/外壳</a></li>
<li class="itemblank" id="item" style="display: table-cell;width:20px"></li>
<li class="item" style="display: table-cell;text-align:center; position:relative;width:150px;">
<a href="" style="cursor:pointer;line-height:17px;display: block;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;width:150px;border-style: solid;font-family:微软雅黑; font-size:17px; font-weight:bold; background-color:transparent; color:#0b1d83; border-top:1px solid rgba(11,29,131,1); border-bottom:1px solid rgba(11,29,131,1); border-left:1px solid rgba(11,29,131,1); border-right:1px solid rgba(11,29,131,1); padding:14px 20px 14px 20px;">标准/配件/系列</a></li>
<li class="itemblank" id="item" style="display: table-cell;width:20px"></li>
<li class="item" style="display: table-cell;text-align:center; position:relative;width:150px;">
<a href="" style="cursor:pointer;line-height:17px;display: block;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;width:150px;border-style: solid;font-family:微软雅黑; font-size:17px; font-weight:bold; background-color:transparent; color:#0b1d83; border-top:1px solid rgba(11,29,131,1); border-bottom:1px solid rgba(11,29,131,1); border-left:1px solid rgba(11,29,131,1); border-right:1px solid rgba(11,29,131,1); padding:14px 20px 14px 20px;">支持/定制/系列</a></li>
<li class="right" style="display: table-cell;"></li>
</ul>
</div>
<?php echo '<script'; ?>
>
var items=document.querySelector(".item")
// for(var i=0;i<items.length;i++){
items.onmouseover=function(){
items.style.cssText="border: 2px solid rgba(11,29,131,1);"
}
items.onmouseout=function(){
items.style.cssText=" "
}
// }
<?php echo '</script'; ?>
>
<div class="productimgbox">
<ul>
<li class="productimg" style="border:1px solid #7f7f7f;">
<div style="float: left;">
<div style=" border-top:1px solid rgba(216,216,216,1);border-bottom:1px solid rgba(216,216,216,1);border-left:1px solid rgba(216,216,216,1);border-right:1px solid rgba(216,216,216,1);background-color:transparent;"></div>
<div style="overflow:hidden;display:block;width: 100%;text-align: center;padding-bottom:10px;">
<a href="http://www.dg-hengyuan.com/?products=%e4%ba%ba%e8%84%b8%e6%b5%8b%e6%b8%a9%e8%80%83%e5%8b%a4%e9%97%a8%e7%a6%81%e5%a4%96%e5%a3%b3" class="bitImageAhover link_image" title="人脸测温考勤门禁外壳">
<img data-t-id="22522" style="width: 100%;height: 100%;" class=" ag_image" src="https://cdn.goodq.top/caches/3ca69b90d929ab5db370a99817545413/aHR0cDovL3d3dy5kZy1oZW5neXVhbi5jb20vcWZ5LWNvbnRlbnQvdXBsb2Fkcy8yMDIwLzA2LzRjNjBmN2YyMjcyNzE2ZDVlMTllZDNmNmMzZTU2ODRkLTQ1MHg0NTAuanBn.jpg" alt="HY-K817BV03" description="" data-attach-id="22522" data-title="HY-K817BV03" title="" src-img="">
</a>
</div>
<div style="padding-top:20px;padding-bottom:20px;color:#373A41;line-height:14px; vertical-align: top; text-align:center; width: 314.58px;height:60.6px;">
<a data-title="true" style="color:#373A41;font-size:14px;line-height:1" href="http://www.dg-hengyuan.com/?products=%e4%ba%ba%e8%84%b8%e6%b5%8b%e6%b8%a9%e8%80%83%e5%8b%a4%e9%97%a8%e7%a6%81%e5%a4%96%e5%a3%b3" class="bitImageAhover link_title" title="人脸测温考勤门禁外壳">人脸测温考勤门禁外壳</a>
</div>
</div>
</div>
<div style="float: left;width: 200px;height: 200px;"></div>
</li>
</ul>
</div>
</div>
<?php echo '<script'; ?>
>
var product=document.querySelector(".productimg")
product.onmouseover=function(){
}
<?php echo '</script'; ?>
>
<div class="about" style="width: 1519.2px;height: 880.8px;background-image: url('https://cdn.goodq.top/caches/3ca69b90d929ab5db370a99817545413/aHR0cDovL3d3dy5kZy1oZW5neXVhbi5jb20vcWZ5LWNvbnRlbnQvdXBsb2Fkcy8yMDE5LzAzL2YyODlmNDQ2Y2MxYTZlYzg3MDRkN2Y0ODc2OGRlMGJmLmpwZw_p_p100_p_3D_p_p100_p_3D.jpg'); background-repeat:no-repeat; background-size:cover; background-attachment:scroll; background-position:center center;">
<div style="width: 384px;height: 86px;display:inline-block;position:relative;max-width:100%;margin-left: 300px;margin-top: 70px;">
<div style="font-family:微软雅黑;font-size:26px;font-weight:bold;font-style:normal;color:#ffffff;padding:0 0 15px 0;display:block;padding:0 0 15px 0;text-align: center;">ABOUT-关于我们</div>
<div style="font-family:century gothic;font-size:16px;font-weight:normal;font-style:normal;color:#1e73be;display:block;padding:0 0 15px 0;">专业从事产品、研发、生产、营销、服务为一体供应商</div>
</div>
<div style="width: 1500px;height: 425px;">
<div style="float: left;">
<img src="<?php echo IMG_ADD;?>
about.jpg" style="margin-left: 200px;margin-top:110px ;">
</div>
<div style="width: 719.3px;height: 426.6px;float: left;margin-left: 100px;margin-top: 200px;">
<div style="font-size: 38px;font-family: 楷体;color: rgb(41, 105, 176);">
东莞市衡源金属科技有限公司
</div>
<div style="font-size: 26px;font-family: 楷体;">
专业智能人脸识别终端一体机外壳供应商
</div>
<b>
<div style="font-family: 楷体; background-color: initial; word-spacing: normal;">
公司专业设计开发,生产,销售,人脸识别终端一体机外壳,主要产品有,人脸识别一体机,人脸支付机,人脸识别门禁,智能人脸收银机,兼容市场各种人脸识别主板,宽动态摄像,人脸识别终端外壳,帮助客户快速实现组装人脸识别终端一体机,为客户提高生产效益.
</div>
<div style="font-family: 楷体; background-color: initial; word-spacing: normal;">
东莞衡源专业人脸识别终端一体机外壳供应商采用开放性合作方式,支持只提供电子硬件部分,二次设计生产定制,适配客户自己的电子硬件,为客户快速提供人脸识别终端外壳,提供整机代工,公司生产的人脸识别套料外壳已被国内外众多客户采用,广泛应用于,智能化城市,学校,医院,小区,三站一场,超市,银行等场所.
</div>
<div style="font-family: 楷体; background-color: initial; word-spacing: normal;">
为客户带来显著的经济效益和社会效益,遵循“严谨、专业、进取、团队”的企业经营念。
</div></b>
</div>
</div>
</div>
<div class="case">
<div class="title">
<div style="font-family:tahoma;font-size:50px;font-weight:bold;font-style:normal;color:#0b1d83;padding:0 10px 0 0;display:inline-block;padding:0 10px 0 0;vertical-align:middle;margin-left: 30px;">CASE</div>
<div style="font-family:微软雅黑;font-size:40px;font-weight:normal;font-style:normal;color:#2b2b2b;display:inline-block;padding:2px;vertical-align:middle;">应用场所</div>
</div>
<span class="line-abs" style="overflow:hidden;border-bottom-style:solid;width:455px;max-width:455px;border-bottom-width:1px;border-bottom-color:#e2e2e2;margin-right:20px;"></span>
<div class="newtitle">
<div style="font-family:微软雅黑;font-size:25px;font-weight:normal;font-style:normal;color:#7f7f7f;padding:0 10px 0 0;padding:0 10px 0 0;vertical-align:bottom;">专业智能人脸识别一体机供应商</div>
</div>
<span class="line-abs right" style="overflow:hidden;border-bottom-style:solid;width:455px;max-width:455px;border-bottom-width:1px;border-bottom-color:#e2e2e2;margin-left:20px;"></span>
</div>
<div class="productimgbox">
<ul>
<li class="productimg" style="border:1px solid #7f7f7f;">
<div style="float: left;">
<div style=" border-top:1px solid rgba(216,216,216,1);border-bottom:1px solid rgba(216,216,216,1);border-left:1px solid rgba(216,216,216,1);border-right:1px solid rgba(216,216,216,1);background-color:transparent;float: left;"></div>
<div style="overflow:hidden;display:block;width: 100%;text-align: center;padding-bottom:10px;">
<a href="http://www.dg-hengyuan.com/?products=%e4%ba%ba%e8%84%b8%e6%b5%8b%e6%b8%a9%e8%80%83%e5%8b%a4%e9%97%a8%e7%a6%81%e5%a4%96%e5%a3%b3" class="bitImageAhover link_image" title="人脸测温考勤门禁外壳">
<img data-t-id="22522" style="width: 100%;height: 100%;" class=" ag_image" src="https://cdn.goodq.top/caches/3ca69b90d929ab5db370a99817545413/aHR0cDovL3d3dy5kZy1oZW5neXVhbi5jb20vcWZ5LWNvbnRlbnQvdXBsb2Fkcy8yMDIwLzA2LzBiMjEzMDU4NDU3MWNmZTFjYjlhMjVhYjZhZWU1MGUyLTQwMHg0MDAuanBn.jpg" alt="HY-K817BV03" description="" data-attach-id="22522" data-title="HY-K817BV03" title="" src-img="">
</a>
</div>
<div style="padding-top:20px;padding-bottom:20px;color:#373A41;line-height:14px; vertical-align: top; text-align:center; width: 314.58px;height:60.6px;">
<a data-title="true" style="color:#373A41;font-size:14px;line-height:1" href="http://www.dg-hengyuan.com/?products=%e4%ba%ba%e8%84%b8%e6%b5%8b%e6%b8%a9%e8%80%83%e5%8b%a4%e9%97%a8%e7%a6%81%e5%a4%96%e5%a3%b3" class="bitImageAhover link_title" title="人脸测温考勤门禁外壳">人脸识别开放平台的市场机遇</a>
</div>
</div>
</div>
</li>
</ul>
</div>
<div class="news" style="width: 1519.2px;height: 763.2px;">
<div class="title">
<div style="font-family:tahoma;font-size:50px;font-weight:bold;font-style:normal;color:#0b1d83;padding:0 10px 0 0;display:inline-block;padding:0 10px 0 0;vertical-align:middle;margin-left: 30px;">NEWS</div>
<div style="font-family:微软雅黑;font-size:40px;font-weight:normal;font-style:normal;color:#2b2b2b;display:inline-block;padding:2px;vertical-align:middle;">新闻资讯</div>
</div>
<div class="new" style="margin-left:180px ;margin-top: 100px;">
<div style="float: left;width: 522px;height: 547.6px;">
<span style="color:#c4c4c4;font-size:28px;font-family:幼圆;;">05-07</span>
<div style="color:#666666;font-size:28px;font-family:幼圆;font-weight:700;padding-bottom:10px;">
人脸识别开放平台的市场机遇
</div>
<div style="color:#999999;font-size:16px;max-width:px;word-break:break-all;font-family:微软雅黑;line-height:20px;padding-bottom:10px;">
这两年人工智能的火热,已经从概念进入到落地的阶段,尤其是语音的人工智能音箱和机器视觉人脸识别的相关产品。...
</div>
<img data-t-id="22475" style="border:1px solid #cccccc;" class="vc_box_outline ag_image" src="https://cdn.goodq.top/caches/3ca69b90d929ab5db370a99817545413/aHR0cDovL3d3dy5kZy1oZW5neXVhbi5jb20vcWZ5LWNvbnRlbnQvdXBsb2Fkcy8yMDIwLzA2LzBiMjEzMDU4NDU3MWNmZTFjYjlhMjVhYjZhZWU1MGUyLTQwMHg0MDAuanBn.jpg" alt="微信支付A5" description="" data-attach-id="22475" data-title="微信支付A5" title="" src-img="">
</div>
<div style="float: left;width: 577.8px;height: 491.4px;margin-left: 200px;">
<div style="width: 577.8px;height: 163.8px;float: left;">
<div style="color:#666666;font-size:28px;font-family:幼圆;font-weight:700;padding-bottom:10px;float: left;">
人脸识别一体机终端
</div>
<div>
<span style="color:#c4c4c4;font-size:28px;font-family:幼圆;float: left;margin-left: 200px;">08-03</span>
</div>
<div style="margin-left: 500px;margin-top: 60px;">
<a href="http://www.dg-hengyuan.com/?p=21771" style="color:#0c0c0c;font-size:16px;">-></a>
</div>
</div>
<div style="width: 577.8px;height: 163.8px;float: left;">
<div style="color:#666666;font-size:28px;font-family:幼圆;font-weight:700;padding-bottom:10px;float: left;">
人脸识别平板终端
</div>
<div>
<span style="color:#c4c4c4;font-size:28px;font-family:幼圆;float: left;margin-left: 200px;">08-03</span>
</div>
<div style="margin-left: 500px;margin-top: 60px;">
<a href="http://www.dg-hengyuan.com/?p=21771" style="color:#0c0c0c;font-size:16px;">-></a>
</div>
</div>
<div style="width: 577.8px;height: 163.8px;float: left;">
<div style="color:#666666;font-size:28px;font-family:幼圆;font-weight:700;padding-bottom:10px;float: left;">
人脸识别门禁终端
</div>
<div>
<span style="color:#c4c4c4;font-size:28px;font-family:幼圆;float: left;margin-left: 200px;">08-03</span>
</div>
<div style="margin-left: 500px;margin-top: 60px;">
<a href="http://www.dg-hengyuan.com/?p=21771" style="color:#0c0c0c;font-size:16px;">-></a>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="width:1519.2px;height: 590px;text-align: left;background: rgb(233, 235, 240);">
<div style="width:461.5px;height: 353.6px;float: left;margin-left: 240px;margin-top: 140px;">
<div style="font-family:微软雅黑;font-size:22px;font-weight:bold;font-style:normal;color:#333333;padding:0 10px 0 0;display:block;padding:0 10px 0 0;text-align: left;">
东莞市衡源金属科技有限公司
</div>
<div style="font-family:century gothic;font-size:12px;font-weight:normal;font-style:normal;color:#b5b5b5;display:block;padding:2px;text-align: left;">
Dongguan hengyuan metal technology co. LTD
</div>
<div style="font-family: 微软雅黑;font-size: 16px;color: rgb(105,105,105);letter-spacing: 1px;line-height: 30px;text-align: left;margin-top: 50px;">
<strong>地址:</strong>
<span style="color: rgb(105,105,105);letter-spacing: 1px;font-size: 16px;line-height: 22px;">
东莞市横沥镇石涌村石涌民营工业区38号B栋一楼
</span>
</div>
<div style="font-family: 微软雅黑;font-size: 16px;color: rgb(105,105,105);letter-spacing: 1px;line-height: 30px;text-align: left;">
<strong>手机:</strong>
<span style="color: rgb(105,105,105);letter-spacing: 1px;font-size: 16px;line-height: 22px;">
18925484550
</span>
</div>
<div style="font-family: 微软雅黑;font-size: 16px;color: rgb(105,105,105);letter-spacing: 1px;line-height: 30px;text-align: left;">
<strong>手机:</strong>
<span style="color: rgb(105,105,105);letter-spacing: 1px;font-size: 16px;line-height: 22px;">
18925736875
</span>
</div>
<div style="font-family: 微软雅黑;font-size: 16px;color: rgb(105,105,105);letter-spacing: 1px;line-height: 30px;text-align: left;">
<strong>Q Q:</strong>
<span style="color: rgb(105,105,105);letter-spacing: 1px;font-size: 16px;line-height: 22px;">
108526330
</span>
</div>
<div style="font-family: 微软雅黑;font-size: 16px;color: rgb(105,105,105);letter-spacing: 1px;line-height: 30px;text-align: left;">
<strong>邮箱:</strong>
<span style="color: rgb(105,105,105);letter-spacing: 1px;font-size: 16px;line-height: 22px;">
<EMAIL>
</span>
</div>
<div style="font-family: 微软雅黑;font-size: 16px;color: rgb(105,105,105);letter-spacing: 1px;line-height: 30px;text-align: left;">
<strong>网站:</strong>
<span style="color: rgb(105,105,105);letter-spacing: 1px;font-size: 16px;line-height: 22px;">
www.dg-hengyuan.com
</span>
</div>
</div>
<div style="width:441.5px;height: 420px;float: left;margin-top: 140px;margin-left: 200px;">
<div style="font-family:微软雅黑;font-size:16px;font-weight:normal;font-style:normal;color:#0c0c0c;padding:0 10px 0 0;display:block;padding:0 10px 0 0;text-align: left;">
在线留言
</div>
<div style="font-family:century gothic;font-size:14px;font-weight:normal;font-style:normal;color:#8e8e8e;display:block;padding:2px;text-align: left;">
ONLINE FORM
</div>
<div style="width: 500px;height: 300px;">
<div style="margin-top:50px;">
姓 名:<input type="text" name="" id=""style="color: rgb(8, 8, 8);width: 300px;font-size: 14px;line-height:14px;">
</div>
<div style="margin-top:20px;">
邮 箱:<input type="text" name="" id=""style="color: rgb(8, 8, 8);width: 300px;font-size: 14px;line-height:14px;">
</div>
<div style="margin-top:20px;">
电 话:<input type="text" name="" id=""style="color: rgb(8, 8, 8);width: 300px;font-size: 14px;line-height:14px;text-align:center;">
</div>
<div style="margin-top:20px;">
内 容:<input type="text" name="" id=""style="color: rgb(8, 8, 8);width: 300px;font-size: 14px;line-height:42px;">
</div>
<button>发送</button>
</div>
</div>
</div>
<div style="width: 1519.2px;">
<img src="imgs/foot.jpg" alt="" style="width: 100%;height: auto;">
</div>
</body>
</html><?php }
}
<file_sep>/application/template/3564ee81bc616cd61a34ca1086682dc07cf53ff7_0.file.adduser.html.php
<?php
/* Smarty version 3.1.34-dev-7, created on 2020-09-24 14:21:40
from 'C:\wamp64\www\study\mvc\application\template\admin\adduser.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.34-dev-7',
'unifunc' => 'content_5f6cab746d6d03_54532037',
'has_nocache_code' => false,
'file_dependency' =>
array (
'3564ee81bc616cd61a34ca1086682dc07cf53ff7' =>
array (
0 => 'C:\\wamp64\\www\\study\\mvc\\application\\template\\admin\\adduser.html',
1 => 1600948457,
2 => 'file',
),
),
'includes' =>
array (
),
),false)) {
function content_5f6cab746d6d03_54532037 (Smarty_Internal_Template $_smarty_tpl) {
?><!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
添加用户
</body>
</html><?php }
}
<file_sep>/application/config.php
<?php
return array(
"database"=>array(
"host"=>"localhost",
"username"=>"root",
"password"=>"",
"dbname"=>"test",
"port"=>3308
),
"smarty"=>array(
"templateDir"=>TPL_PATH,
"compileDir"=>COMPILE_PATH,
"cacheDir"=>CACHE_PATH,
),
"code"=>array(
"type"=>"png",
"width"=>160,
"height"=>50,
"codeLen"=>4,
"seed"=>"abcdefhjkmnprstvwxyABCDEFGHJKMNPQRSTUVWXY345678",
"fontSize"=>array("min"=>20,"max"=>35),
"fontAngle"=>array("min"=>-15,"max"=>15),
"lineNum"=>array("min"=>2,"max"=>4),
"lineWidth"=>array("min"=>1,"max"=>3),
"pixNum"=>array("min"=>80,"max"=>150),
"fontFile"=>"C:/wamp64/www/study/mvc\application\static/font/verdanai.ttf",
"ischeck"=>false
)
);<file_sep>/application/static/js/index/wheel.js
/*
无缝轮播图
wins 要放入轮播图的窗口 //选择器
opts json 实现轮播图的各个属性
img 数组 要包含的轮播图的图片的地址
links 数组 图片的链接地址
imgColor 数组 图片的颜色,用于实现全屏的颜色拼接
imgSize 数组 第一个参数代表的宽,第二个参数代表高
btnColor String 按钮的颜色
btnActive String 获得焦点的按钮的颜色
btnPos 数组 第一个参数代表X位置 y位置
*/
function wheel(wins,opts,Run){
//初始化
var wins = document.querySelector(wins);
if(!(wins&&wins.nodeType==1)){
console.error("窗口元素 not find")
return ;
}
var btnColor = opts.btnColor||"green";
var btnActive = opts.btnActive||"red";
var btnPos = opts.btnPos||["center","20"] ;
//图片的地址添加一个
opts.imgs.push(opts.imgs[0])
opts.links.push(opts.links[0])
opts.imgColor.push(opts.imgColor[0])
var imgLength = opts.imgs.length;
console.log(opts.imgs);
console.log(imgLength);
if(imgLength==0){
console.error("没有传入相应的轮播图");
}
var imgSize = opts.imgSize;
if (!(imgSize instanceof Array)) {
console.log("请输入合法的尺寸类型");
}
if(imgSize.length==0){
imgSize[0] = document,documentElement.clienWidth;
imgSize[1] = 400;
}
if(imgSize.some(function(val){
return val==0
})){
for(var i=0;i<2;i++){
if(imgSize[i]==0){
imgSize[i] = 500;
}
}
}
var Run = Run||{};
var time = 0;
if (Run.time) {
time = Run.time * 100;
}
else {
time = 5000;
}
var eachTime = 0;
if (Run.eachTime) {
eachTime = Run.eachTime * 1000;
}
else {
eachTime = 500;
}
var runStyle = null;
if (Run.runStyle == "inner" || !(Run.runStyle)) {
runStyle = Tween.Linear;
}
else if (Run.runStyle == "in") {
runStyle = Tween.Quad.easeIn;
}
else if (Run.runStyle == "out") {
runStyle = Tween.Quad.easeOut;
}
//1.win样式
wins.style.cssText = "width:100%;height:"+imgSize[1]+"px;overflow:hidden;position: relative";
//2.添加容器
var box = document.createElement("div");
box.style.cssText = "width:"+(imgLength*100)+"%;height:100%;overflow:hidden"
wins.appendChild(box);
//创建每一个轮播图
for(var i=0;i<imgLength;i++){
var divList = document.createElement("div");
divList.style.cssText = `float:left;width:${100/imgLength}%;height: 100%;background:${opts.imgColor[i]}`;
var link = document.createElement("a");
link.href = opts.links[i];
link.style.cssText = "background:url("+opts.imgs[i]+") no-repeat 0 0;width:100%;height:"+imgSize[1]+"px;display:block;margin:0"
divList.appendChild(link);
box.appendChild(divList);
console.log(opts);
}
//创建按钮
var btnBox = document.createElement("div");
btnBox.style.cssText = "width:300px;height:20px;position:absolute;left:0;right:0;margin:auto;bottom:"+btnPos[1]+"px;";
var btns=[];
for(var i=0;i<imgLength-1;i++){
if(i==0){
var bgcolor = btnActive;
}else{
var bgcolor = btnColor;
}
var btn = document.createElement("div");
btn.style.cssText = "width:5px;height:5px;background:"+bgcolor+";border-radius:50%;margin:0 10px;cursor:pointer;float:left";
btnBox.appendChild(btn);
btns.push(btn);
}
wins.appendChild(btnBox);
//无缝轮播
var win = wins;
console.log(btns);
//如何获得窗口的大小
// console.log(window.innerWidth)
// console.log(document.documentElement.clientWidth)
var winW = parseInt(getComputedStyle(win,null).width);
var num = 0;
function move(){
num++;
if(num >btns.length-1){
animate(box,{
"margin-left": -(num * winW)
},eachTime,runStyle,function(){
box.style.marginLeft = 0;
})
num=0;
}else{
animate(box,{
"margin-left": -(num * winW)
},eachTime)
}
for(var i=0;i<btns.length;i++){
btns[i].style.background= btnColor;
}
btns[num].style.background = btnActive;
}
//自动轮播
var t = setInterval(move,time)
//按钮轮播
for(let i=0;i<btns.length;i++){
btns[i].onclick = function(){
num=i;
animate(box,{
"margin-left": -(num*winW)
},eachTime,runStyle)
for(var j=0;j<btns.length;j++){
btns[j].style.background = btnColor;
}
btns[num].style.background = btnActive;
}
}
//鼠标移入,移出
win.onmouseover = function(){
clearInterval(t)
}
win.onmouseout = function(){
t = setInterval(move,time)
}
}<file_sep>/application/template/55f10b37baf680fff48f3050ef29d4e985f6dbf1_0.file.content.html.php
<?php
/* Smarty version 3.1.34-dev-7, created on 2020-09-26 07:38:32
from 'C:\wamp64\www\study\mvc\application\template\admin\content.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.34-dev-7',
'unifunc' => 'content_5f6eeff8b094e5_77698605',
'has_nocache_code' => false,
'file_dependency' =>
array (
'55f10b37baf680fff48f3050ef29d4e985f6dbf1' =>
array (
0 => 'C:\\wamp64\\www\\study\\mvc\\application\\template\\admin\\content.html',
1 => 1601105907,
2 => 'file',
),
),
'includes' =>
array (
),
),false)) {
function content_5f6eeff8b094e5_77698605 (Smarty_Internal_Template $_smarty_tpl) {
?><!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="<?php echo CSS_ADD;?>
admin/bootstrap.min.css">
<?php echo '<script'; ?>
src="<?php echo JS_ADD;?>
admin/content.js"><?php echo '</script'; ?>
>
</head>
<body>
<div class="container">
<?php if ($_smarty_tpl->tpl_vars['data']->value) {?>
<table class="table table-bordered">
<tr>
<td>所属栏目</td>
<td>内容标题</td>
<td>图片地址</td>
<td>内容详情</td>
</tr>
<tr>
<input type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['data']->value['conid'];?>
">
<td><?php echo $_smarty_tpl->tpl_vars['data']->value["cid"];?>
</td>
<td><?php echo $_smarty_tpl->tpl_vars['data']->value["ctitle"];?>
</td>
<td><?php echo $_smarty_tpl->tpl_vars['data']->value["imgurl"];?>
</td>
<td><?php echo $_smarty_tpl->tpl_vars['data']->value["cons"];?>
</td>
</tr>
</table>
<?php } else { ?>
<table>
<tr>
<td>
没有数据
</td>
</tr>
</table>
<?php }?>
</div>
</body>
</html><?php }
}
|
f725d021dd6bd8fa95b83f34e27a0c6b1319a2fb
|
[
"JavaScript",
"PHP"
] | 17
|
JavaScript
|
jiaz123/mvc
|
0a65950035e3534f61f90e6a1d7f68fbc717d6ab
|
626c165ba9d3271305c6057bf54191f5d8655fe3
|
refs/heads/master
|
<repo_name>teambition/hexo<file_sep>/test/util.js
var util = require('../lib/util'),
titlecase = util.titlecase,
yfm = util.yfm;
describe('Utilities', function(){
describe('titlecase()', function(){
it('All upper case', function(){
titlecase('TODAY IS A BEATUIFUL DAY').should.eql('Today Is a Beatuiful Day');
});
it('All lower case', function(){
titlecase('today is a beatuiful day').should.eql('Today Is a Beatuiful Day');
});
it('Normal sentence', function(){
titlecase('Today is a beatuiful day').should.eql('Today Is a Beatuiful Day');
});
});
describe('yfm()', function(){
it('YAML Front Matter', function(){
var content = [
'---',
'layout: post',
'title: Today is a beatuiful day',
'date: 2013-01-08 22:37:49',
'comments: true',
'tags:',
'- Foo',
'- Bar',
'categories:',
' foo: 1',
' bar: 2',
'---',
'content'
].join('\n');
yfm(content).should.eql({
layout: 'post',
title: 'Today is a beatuiful day',
date: new Date(2013, 0, 8, 22, 37, 49),
comments: true,
tags: ['Foo', 'Bar'],
categories: {foo: 1, bar: 2},
_content: 'content'
});
});
});
});
|
d2195f75fa3e2dd49354652fc6eab44378dda97f
|
[
"JavaScript"
] | 1
|
JavaScript
|
teambition/hexo
|
9d9a1ccfc16a44cbbf94afe8a779d791ac70258a
|
2ec6e79eb7e16bb6910557ec3e5646c819386f7d
|
refs/heads/master
|
<file_sep># stu_manage
这是一个简单的学生信息管理系统。
<file_sep>#include<stdio.h>
#include<gtk/gtk.h>
int main(int argc ,char *argv[])
{
GtkWidget *login_window;
GtkWidget *login_table0;
GtkWidget *login_table1;
GtkWidget *login_table2;
GtkWidget *login_table3;
GtkWidget *login_table4;
GtkWidget *login_ok_btn;
GtkWidget *login_cancel_btn;
GtkWidget *name_entry;
GtkWidget *pwd_entry;
GtkWidget *name_lable;
GtkWidget *pwd_lable;
GtkWidget *login_lable;
GtkWidget *iden_radio_btn;
GSList *iden_group;
gtk_init(&argc,&argv); //GTK初始化
/*组件初始化*/
login_window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
login_table0=gtk_table_new(4,1,FALSE);
login_table1=gtk_table_new(1,1,FALSE);
login_table2=gtk_table_new(3,2,FALSE);
login_table3=gtk_table_new(1,3,FALSE);
login_table4=gtk_table_new(1,2,FALSE);
login_ok_btn=gtk_button_new_with_label("登录");
login_cancel_btn=gtk_button_new_with_label("退出");
name_entry=gtk_entry_new();
pwd_entry=gtk_entry_new();
name_lable=gtk_label_new("用户名");
pwd_lable=gtk_label_new("密码");
login_lable=gtk_label_new("登录信息");
/*窗口主体初始化设定*/
gtk_window_set_title(GTK_WINDOW(login_window),"用户登录");
gtk_widget_set_usize(login_window,300,300);
gtk_window_set_position(GTK_WINDOW(login_window),
GTK_WIN_POS_CENTER_ALWAYS);
/*窗口标题*/
gtk_table_attach(GTK_TABLE(login_table1),login_lable,0,1,0,1,(GtkAttachOptions)(0),
(GtkAttachOptions)(0),5,5);
/*登录信息*/
gtk_table_attach(GTK_TABLE(login_table2),name_lable,0,1,0,1,(GtkAttachOptions)(0),
(GtkAttachOptions)(0),5,5);
gtk_table_attach(GTK_TABLE(login_table2),pwd_lable,0,1,1,2,(GtkAttachOptions)(0),
(GtkAttachOptions)(0),5,5);
gtk_table_attach(GTK_TABLE(login_table2),name_entry,1,2,0,1,(GtkAttachOptions)(0),
(GtkAttachOptions)(0),5,5);
gtk_table_attach(GTK_TABLE(login_table2),pwd_entry,1,2,1,2,(GtkAttachOptions)(0),
(GtkAttachOptions)(0),5,5);
/*身份选项*/
iden_radio_btn=gtk_radio_button_new_with_label(NULL,"学生");
gtk_table_attach(GTK_TABLE(login_table3),iden_radio_btn,0,1,0,1,(GtkAttachOptions)(0),
(GtkAttachOptions)(0),5,5);
iden_group=gtk_radio_button_group(GTK_RADIO_BUTTON(iden_radio_btn));
iden_radio_btn=gtk_radio_button_new_with_label(iden_group,"教师");
gtk_table_attach(GTK_TABLE(login_table3),iden_radio_btn,0,1,1,2,(GtkAttachOptions)(0),
(GtkAttachOptions)(0),5,5);
iden_group=gtk_radio_button_group(GTK_RADIO_BUTTON(iden_radio_btn));
iden_radio_btn=gtk_radio_button_new_with_label(iden_group,"管理员");
gtk_table_attach(GTK_TABLE(login_table3),iden_radio_btn,0,1,2,3,(GtkAttachOptions)(0),
(GtkAttachOptions)(0),0,0);
/*登录选项*/
gtk_table_attach(GTK_TABLE(login_table4),login_ok_btn,0,1,0,1,(GtkAttachOptions)(0),
(GtkAttachOptions)(0),5,5);
gtk_table_attach(GTK_TABLE(login_table4),login_cancel_btn,1,2,0,1,(GtkAttachOptions)(0),
(GtkAttachOptions)(0),5,5);
/*把各个表格加载进窗口*/
gtk_container_add(GTK_CONTAINER(login_window),login_table0);
gtk_table_attach(GTK_TABLE(login_table0),login_table1,0,1,0,1,(GtkAttachOptions)(0),
(GtkAttachOptions)(0),5,5);
gtk_table_attach(GTK_TABLE(login_table0),login_table2,0,1,1,2,(GtkAttachOptions)(0),
(GtkAttachOptions)(0),5,5);
gtk_table_attach(GTK_TABLE(login_table0),login_table3,0,1,2,3,(GtkAttachOptions)(0),
(GtkAttachOptions)(0),5,5);
gtk_table_attach(GTK_TABLE(login_table0),login_table4,0,1,3,4,(GtkAttachOptions)(0),
(GtkAttachOptions)(0),5,5);
gtk_widget_show_all(login_window);
gtk_main();
return 0;
}
|
1f1f87dc73102a01544f134e6c66330ef97a72e4
|
[
"Markdown",
"C"
] | 2
|
Markdown
|
liyixiaov/stu_manage
|
53de3bc75cdfbf8d57f46654432e09901b1c015e
|
c9fa80aef1f63392514f458e5d3af857821c4e8a
|
refs/heads/develop
|
<repo_name>MaciejBalas/SELogicGates<file_sep>/SELogicGates/SELogicGates/MODEBUT.H
#ifndef DefModeBut
#define DefModeBut
#include "button.h"
#include "element.h"
class CModeButton:public CButton
{
CElement*ButtonElement;
public:
void DrawButton();
void ChangeText(char*);
int ClickButton();
CModeButton(TElementType ButtonType,int X1,int Y1,int X2, int Y2);
~CModeButton();
};
#endif<file_sep>/SELogicGates/SELogicGates/AND.H
#ifndef DefAnd
#define DefAnd
#include "element.h"
class CAnd:public CElement
{
public:
void DrawElem(int Colour=0);
TOutput GetOutput(int AskElemNum,int MaxNum) ;
void ClickElement();
TElementType ElementType();
CAnd(int X,int Y,int Colour=0);
};
#endif<file_sep>/SELogicGates/SELogicGates/INBUS.CPP
#include "inbus.h"
#include "gate.h"
CInBus::CInBus(int X,int Y,char Name)
{
this->Name=Name;
JunctionNum=0;
X1=X;
X2=X+10;
Y1=Y;
Y2=451;
char Text[2];
Text[0]=Name;
Text[1]='\0';
Button[0]=new CMenuButton(Text,X1,Y1+5,X1+10,Y1+15);
Text[0]='1';
Text[1]='\0';
Button[1]=new CMenuButton(Text,X1,Y2-10,X1+10,Y2);
InNum=0;
OutNum=-1;//ilość nieograniczona
Output=high;
Visible=true;
Movable=no;
}
CInBus::~CInBus()
{
for(int i=0;i<JunctionNum;i++)
delete TabJunction[i];
delete Button[0];
delete Button[1];
}
void CInBus::DrawElem(int Colour)
{
if(Colour==0)
{
switch(Output)
{
case low:Colour=LowColour;break;
case high:Colour=HighColour;break;
case error:Output=high;Colour=HighColour;break;
}
}
if(Visible==false) Colour=BackgroundColour;
setcolor(Colour);
line(X1+5,61,X1+5,Y2-10);//linia główna
if(Visible==true)
{
char Text[2];
switch(Output)
{
case low:Text[0]='0';break;
case high:Text[0]='1';break;
}
Text[1]='\0';
Button[1]->ChangeText(Text);
Button[1]->DrawButton();
}
else
{
setfillstyle(1,FrameColour);
bar(X1,Y2-10,X2,Y2);
}
Button[0]->DrawButton();
for(int i=0;i<JunctionNum;i++) TabJunction[i]->DrawElem();
}
TOutput CInBus::GetOutput(int AskElemNum,int MaxNum)
{
if(AskElemNum==0) return Output;
for(int i=0;i<JunctionNum;i++)
TabJunction[i]->GetOutput(AskElemNum,MaxNum);
return Output;
}
void CInBus::Change()
{}
TElementType CInBus::ElementType()
{
return inbus;
}
void CInBus::ClickElement()
{
struct REGPACK reg;
reg.r_ax=0x3;
intr(0x33,®);
if(Button[0]->IsYourArea(reg.r_cx,reg.r_dx))
{
Button[0]->ClickButton();
if(Visible==true&&JunctionNum==0) Visible=false;
else Visible=true;
return;
}
if(Visible==true&&Button[1]->IsYourArea(reg.r_cx,reg.r_dx))
//aby zmienić stan szyny, szyna musi być aktywna(widzialna)
{
if(Button[1]->ClickButton())
if(Output==low) Output=high;
else Output=low;
return;
}
}
char CInBus::LinkNextElem(CElement*NextElem,int X,int Y)
{
if(NextElem->ElementType()!=wire) return 0;//błąd
if(JunctionNum>=MaxBusJunctionNum) return 0;//za duzo węzłów
int XTmp1;
int YTmp1;
for(int i=0;i<JunctionNum;i++)
{
XTmp1=TabJunction[i]->GetXCorner();
YTmp1=TabJunction[i]->GetYCorner();
if(X<XTmp1+6&&X>XTmp1-6&&Y<YTmp1+6&&Y>YTmp1-6) return 0;
//powiązanie za blisko istniejącego węzła
}
X=X1+5;
TabJunction[JunctionNum]=new CJunction(X,Y);
TabJunction[JunctionNum]->LinkPrevElem(this,0,0);
TabJunction[JunctionNum]->LinkNextElem(NextElem,X,Y);
JunctionNum++;
return 1;
}
char CInBus::LinkPrevElem(CElement*PrevElem,int X,int Y)
{
return 0;
}
char CInBus::DelNextElem(CElement*DelElem)
{
for(int i=0;i<JunctionNum;i++)
{
char Deleting=TabJunction[i]->DelNextElem(DelElem);
if(Deleting==2)
{
TabJunction[i]->DrawElem(BackgroundColour);
delete TabJunction[i];
for(int j=i;j<JunctionNum;j++) TabJunction[j]=TabJunction[j+1];
JunctionNum--;
return 1;
}
if(Deleting==1) return 1;
}
return 0;
}
char CInBus::SaveElement(CElement**TabElem,int NumOfElem,FILE*File,char Phase)
{
if(Phase==1)//pierwsza faza zachowywania
{
char Type=9;
fwrite(&Type,sizeof(char),1,File);
fwrite(&Name,sizeof(char),1,File);
fwrite(&X1,sizeof(int),1,File);
fwrite(&Y1,sizeof(int),1,File);
fwrite(&X2,sizeof(int),1,File);
fwrite(&Y2,sizeof(int),1,File);
fwrite(&Output,sizeof(char),1,File);
fwrite(&Visible,sizeof(char),1,File);
fwrite(&JunctionNum,sizeof(int),1,File);
for(int i=0;i<JunctionNum;i++)
if(!TabJunction[i]->SaveElement(TabElem,NumOfElem,File,1)) return 0;
//zachowanie węzłów w pierwszej fazie
}
else//druga faza zachowywania
{
for(int i=0;i<JunctionNum;i++)
if(!TabJunction[i]->SaveElement(TabElem,NumOfElem,File,2)) return 0;
//zachowanie węzłów w drugiej fazie
}
return 1;
}
char CInBus::LoadElement(CElement**TabElem,int NumOfElem,
FILE*File,char Phase)
{
if(Phase==1)//pierwsza faza odczytu
{
if(feof(File)) return 0;
fread(&Name,sizeof(char),1,File);
if(feof(File)) return 0;
fread(&X1,sizeof(int),1,File);
if(X1<0||X1>639) return 0;
if(feof(File)) return 0;
fread(&Y1,sizeof(int),1,File);
if(Y1<0||Y1>479) return 0;
if(feof(File)) return 0;
fread(&X2,sizeof(int),1,File);
if(X2<0||X2>639) return 0;
if(feof(File)) return 0;
fread(&Y2,sizeof(int),1,File);
if(Y2<0||Y2>479) return 0;
delete Button[0];
delete Button[1];
char Text[2];
Text[0]=Name;
Text[1]='\0';
Button[0]=new CMenuButton(Text,X1,Y1+5,X1+10,Y1+15);
Text[0]='1';
Text[1]='\0';
Button[1]=new CMenuButton(Text,X1,Y2-10,X1+10,Y2);
//po odczytaniu nowych współrzędnych przyciski trzeba stworzyć na nowo
if(feof(File)) return 0;
fread(&Output,sizeof(char),1,File);
if(Output!=0&&Output!=1) return 0;
if(feof(File)) return 0;
fread(&Visible,sizeof(char),1,File);
if(Visible!=0&&Visible!=1) return 0;
if(feof(File)) return 0;
fread(&JunctionNum,sizeof(int),1,File);
if(JunctionNum>MaxJunctionNum) return 0;
for(int i=0;i<JunctionNum;i++)
{
char Type;
if(feof(File)) return 0;
fread(&Type,sizeof(char),1,File);
if(Type!=7) return 0;//odczytywany element nie jest węzłem
TabJunction[i]=new CJunction(0,0);
if(!TabJunction[i]->LoadElement(TabElem,NumOfElem,File,1)) return 0;
//odczyt węzłów w pierwszej fazie
}
}
else//druga faza odczytu
{
for(int i=0;i<JunctionNum;i++)
if(!TabJunction[i]->LoadElement(TabElem,NumOfElem,File,2)) return 0;
//odczyt węzłów w pierwszej fazie
}
return 1;
}
<file_sep>/SELogicGates/SELogicGates/OUTPUT.H
#ifndef DefOutput
#define DefOutput
#include "element.h"
class COutput:public CElement
{
public:
void DrawElem(int Colour=0);
TOutput GetOutput(int AskElemNum,int MaxNum) ;
void ClickElement();
char LinkNextElem(CElement*NextElem,int X,int Y);
TElementType ElementType();
int IsOnBoard();
COutput(int X,int Y,int Colour=0);
};
#endif<file_sep>/SELogicGates/SELogicGates/CONSTBUS.H
#ifndef DefConstBus
#define DefConstBus
#include "element.h"
#include "junction.h"
class CConstBus:public CElement
{
int JunctionNum;
CJunction*TabJunction[MaxBusJunctionNum];
public:
void DrawElem(int Colour=0);
TOutput GetOutput(int AskElemNum,int MaxNum) ;
void ClickElement();
char LinkNextElem(CElement*NextElem,int X,int Y);
char LinkPrevElem(CElement*PrevElem,int X,int Y);
TElementType ElementType();
char DelNextElem(CElement*DelElem);
char SaveElement(CElement**TabElem,int NumOfElem,FILE*File,char Phase);
char LoadElement(CElement**TabElem,int NumOfElem,FILE*File,char Phase);
CConstBus(int X,int Y,int Type);
~CConstBus();
};
#endif<file_sep>/SELogicGates/SELogicGates/WIRE.CPP
#include "wire.h"
#include "gate.h"
CWire::CWire(int X,int Y,int Colour,char FromJunction,CElement*PrevWire)
{
X1=X;
Y1=Y;
X2=X;
Y2=Y;
JunctionNum=0;
BreakpointsNum=2;
TabBreakpoints[0][0]=X1;
TabBreakpoints[0][1]=Y1;
TabBreakpoints[1][0]=X2;
TabBreakpoints[1][1]=Y2;
InNum=1;
OutNum=1;
for(int i=0;i<InNum;i++)
TabPrevElem[i]=NULL;
for(i=0;i<OutNum;i++)
TabNextElem[i]=NULL;
Output=error;
Movable=no;
}
CWire::~CWire()
{
for(int i=0;i<JunctionNum;i++)
delete TabJunction[i];
}
void CWire::DrawElem(int Colour)
{
if(Colour==0)
{
switch(Output)
{
case low:Colour=LowColour;break;
case high:Colour=HighColour;break;
case error:Colour=ErrorColour;break;
}
setcolor(Colour);
setfillstyle(1,Colour);
for(int i=0;i<BreakpointsNum-1;i++)
{
line(TabBreakpoints[i][0],TabBreakpoints[i][1],
TabBreakpoints[i+1][0],TabBreakpoints[i+1][1]);
}
for(i=0;i<JunctionNum;i++) TabJunction[i]->DrawElem();
return;
}
setcolor(Colour);//kasowanie elementu
setfillstyle(1,Colour);
for(int j=0;j<JunctionNum;j++)
{
if(TabJunction[j]->GetXCorner()>610||TabJunction[j]->GetYCorner()>440)
TabJunction[j]->DrawElem(FrameColour);
else TabJunction[j]->DrawElem(BackgroundColour);
}//zamalowanie węzłów
for(int i=0;i<BreakpointsNum-1;i++)
{
if((TabBreakpoints[i][0]>610&&TabBreakpoints[i+1][0]>610)||
(TabBreakpoints[i][1]>440&&TabBreakpoints[i+1][1]>440))
{
if(TabBreakpoints[i+1][0]==TabBreakpoints[i][0]||
TabBreakpoints[i+1][1]==TabBreakpoints[i][1]) setcolor(FrameColour);
//cała linia jest na szarym polu
}
else//część linii może być na szarym polu
{
if(TabBreakpoints[i][0]>610&&
TabBreakpoints[i][1]==TabBreakpoints[i+1][1])
{
setcolor(FrameColour);
setfillstyle(1,FrameColour);
line(611,TabBreakpoints[i][1],TabBreakpoints[i][0],TabBreakpoints[i][1]);
setcolor(Colour);
setfillstyle(1,Colour);
line(TabBreakpoints[i+1][0],TabBreakpoints[i][1],610,TabBreakpoints[i][1]);
continue;
}//linia w poziomie, początkiem wychodzi na prawy szary pasek
if(TabBreakpoints[i+1][0]>610&&
TabBreakpoints[i][1]==TabBreakpoints[i+1][1])
{
setcolor(FrameColour);
setfillstyle(1,FrameColour);
line(611,TabBreakpoints[i][1],TabBreakpoints[i+1][0],TabBreakpoints[i][1]);
setcolor(Colour);
setfillstyle(1,Colour);
line(TabBreakpoints[i][0],TabBreakpoints[i][1],610,TabBreakpoints[i][1]);
continue;
}//linia w poziomie, końcem wychodzi na prawy szary pasek
if(TabBreakpoints[i][1]>440&&
TabBreakpoints[i][0]==TabBreakpoints[i+1][0])
{
setcolor(FrameColour);
setfillstyle(1,FrameColour);
line(TabBreakpoints[i][0],441,TabBreakpoints[i][0],TabBreakpoints[i][1]);
setcolor(Colour);
setfillstyle(1,Colour);
line(TabBreakpoints[i][0],TabBreakpoints[i+1][1],TabBreakpoints[i][0],440);
continue;
}//linia w pionie, początkiem wychodzi na dolny szary pasek
if(TabBreakpoints[i+1][1]>440&&
TabBreakpoints[i][0]==TabBreakpoints[i+1][0])
{
setcolor(FrameColour);
setfillstyle(1,FrameColour);
line(TabBreakpoints[i][0],441,TabBreakpoints[i][0],TabBreakpoints[i+1][1]);
setcolor(Colour);
setfillstyle(1,Colour);
line(TabBreakpoints[i][0],TabBreakpoints[i][1],TabBreakpoints[i][0],440);
continue;
}//linia w pionie, końcem wychodzi na dolny szary pasek
}
line(TabBreakpoints[i][0],TabBreakpoints[i][1],
TabBreakpoints[i+1][0],TabBreakpoints[i+1][1]);
setcolor(Colour);
setfillstyle(1,Colour);
}
}
TOutput CWire::GetOutput(int AskElemNum,int MaxNum)
{
if(AskElemNum==0) return Output;
//połączenie ma zawsze początek i koniec; funkcja zostanie na pewno
//wywołana z inną wartością (oszczędność czasu)
if(AskElemNum==MaxNum) return Output;
if(TabPrevElem[0]==NULL) Output=error;
else Output=TabPrevElem[0]->GetOutput(AskElemNum+1,MaxNum);
for(int i=0;i<JunctionNum;i++)
TabJunction[i]->GetOutput(AskElemNum,MaxNum);
return Output;
}
void CWire::MoveBeg(int X,int Y)
{
X1=X;
Y1=Y;
TabBreakpoints[0][0]=X;
TabBreakpoints[0][1]=Y;
}
void CWire::MoveEnd(int X,int Y)
{
if(X>613) X=613;
TabBreakpoints[BreakpointsNum-1][0]=X2=X;
TabBreakpoints[BreakpointsNum-1][1]=Y2=Y;
}
int CWire::IsOnBoard()
{
if(X1>30&&X2>30&&Y1>60&&Y2>60) return 1;
return 0;
}
int CWire::IsYourArea(int X,int Y)
{
int MinX;
int MaxX;
int MinY;
int MaxY;
for(int i=0;i<BreakpointsNum-1;i++)
{
if(TabBreakpoints[i][0]<TabBreakpoints[i+1][0])
{
MinX=TabBreakpoints[i][0];
MaxX=TabBreakpoints[i+1][0];
}
else
{
MinX=TabBreakpoints[i+1][0];
MaxX=TabBreakpoints[i][0];
}
if(TabBreakpoints[i][1]<TabBreakpoints[i+1][1])
{
MinY=TabBreakpoints[i][1];
MaxY=TabBreakpoints[i+1][1];
}
else
{
MinY=TabBreakpoints[i+1][1];
MaxY=TabBreakpoints[i][1];
}
if(X>=MinX&&X<=MaxX)
if(Y>=MinY-2&&Y<=MinY+2) return 1;
if(Y>=MinY&&Y<=MaxY)
if(X>=MinX-2&&X<=MinX+2) return 1;
}
return 0;
}
char CWire::IsElemNext(CElement*Element)
{
if(TabNextElem[0]==Element) return 1;
for(int i=0;i<JunctionNum;i++)
if(TabJunction[i]->IsElemNext(Element)) return 2;
return 0;
//funkcja zwraca 1, gdy podany element jest bezpośrednio następny;
//funkcja zwraca 2, gdy podany element wychodzi z węzła;
//funkcja zwraca 0, gdy podany element nie jest następny.
}
char CWire::Check(CElement**TabElem,int NumOfElem)
{
CElement*Wire=NULL;//wskaźnik na napotkane połączenie
for(int i=0;i<BreakpointsNum-1;i++)
{
int X=TabBreakpoints[i][0];
int Y=TabBreakpoints[i][1];
if(TabBreakpoints[i][0]==TabBreakpoints[i+1][0])//linia pionowa
if(TabBreakpoints[i][1]<TabBreakpoints[i+1][1])//linia pionowa w dół
{
X-=2;//badana lewa strona
Y-=2;
char Left=1;
do
{
if(X<130||X>610||Y<60) return 0;
for(int j=0;j<NumOfElem;j++)
{
if(this==TabElem[j]) j++;//nie bada się tego samego elementu
if(j>=NumOfElem) break;
//zabezpieczenie przed przekroczeniem tabeli
if(TabElem[j]->IsYourArea(X,Y))
{
if(TabElem[j]!=this->TabPrevElem[0]&&
TabElem[j]!=this->TabNextElem[0])
if(TabElem[j]->ElementType()!=wire&&
TabElem[j]->ElementType()!=cbus) return 0;
//znaleziony element nie jest następny ani poprzedni
//ani nie jest drutem ani szyną stałą
if(TabElem[j]==this->TabPrevElem[0]&&
this->TabPrevElem[0]->ElementType()==inbus) return 0;
//na terenie szyn wejściowych druty mogą biec tylko w poziomie
if(this->IsElemPrev(TabElem[j]))
if(X<TabBreakpoints[0][0]-2) return 0;
if(this->IsElemNext(TabElem[j]))
if(X>TabBreakpoints[BreakpointsNum-1][0]+2) return 0;
//na terenie elementów sąsiednich połączenie może biec tylko
//w ściśle określonym obszarze
if(TabElem[j]->ElementType()==wire)
{
if((Y>TabBreakpoints[i][1]-1&&Y<TabBreakpoints[i][1]+1)||
(Y>TabBreakpoints[i+1][1]-1&&Y<TabBreakpoints[i+1][1]+1))
return 0;
if(Wire==TabElem[j]) return 0;
Wire=TabElem[j];
}
}
else if(TabElem[j]==Wire) Wire=NULL;
}
Y+=5;
if(Left==1&&Y>TabBreakpoints[i+1][1])
{
X+=4;//badana jest prawa strona
Y=TabBreakpoints[i][1]-2;
Left=0;
}
}while(Y<TabBreakpoints[i+1][1]);
}
else//linia pionowa w górę
{
X-=2;//badana lewa strona
Y+=2;
char Left=1;
do
{
if(X<130||X>610||Y<60) return 0;
for(int j=0;j<NumOfElem;j++)
{
if(this==TabElem[j]) j++;//nie bada się tego samego elementu
if(j>=NumOfElem) break;
//zabezpieczenie przed przekroczeniem tabeli
if(TabElem[j]->IsYourArea(X,Y))
{
if(TabElem[j]!=this->TabPrevElem[0]&&
TabElem[j]!=this->TabNextElem[0])
if(TabElem[j]->ElementType()!=wire&&
TabElem[j]->ElementType()!=cbus)
return 0;
//znaleziony element nie jest następny ani poprzedni
if(TabElem[j]==this->TabPrevElem[0]&&
this->TabPrevElem[0]->ElementType()==inbus)
return 0;
if(this->IsElemPrev(TabElem[j]))
if(X<TabBreakpoints[0][0]-2) return 0;
if(this->IsElemNext(TabElem[j]))
if(X>TabBreakpoints[BreakpointsNum-1][0]+2) return 0;
if(TabElem[j]->ElementType()==wire)
{
if((Y>TabBreakpoints[i][1]-1&&Y<TabBreakpoints[i][1]+1)||
(Y>TabBreakpoints[i+1][1]-1&&Y<TabBreakpoints[i+1][1]+1))
return 0;
if(Wire==TabElem[j]) return 0;
Wire=TabElem[j];
}
}
else if(TabElem[j]==Wire) Wire=NULL;
}
Y-=5;
if(Left==1&&Y<TabBreakpoints[i+1][1])
{
X+=4;//badana jest prawa strona
Y=TabBreakpoints[i][1]+2;
Left=0;
}
}while(Y>TabBreakpoints[i+1][1]);
}
else//linia pozioma
if(TabBreakpoints[i][0]<TabBreakpoints[i+1][0])//linia pozioma w prawo
{
X-=2;
Y-=2;//badana górna strona
char Up=1;
do
{
if(X<30||Y>440||Y<60) return 0;
for(int j=0;j<NumOfElem;j++)
{
if(this==TabElem[j]) j++;//nie bada się tego samego elementu
if(j>=NumOfElem) break;
//zabezpieczenie przed przekroczeniem tabeli
if(TabElem[j]->IsYourArea(X,Y))
{
if(TabElem[j]!=this->TabPrevElem[0]&&
TabElem[j]!=this->TabNextElem[0])
if(TabElem[j]->ElementType()!=wire&&
TabElem[j]->ElementType()!=inbus)
return 0;
//znaleziony element nie jest następny ani poprzedni
if(TabElem[j]==this->TabPrevElem[0]&&
this->TabPrevElem[0]->ElementType()==cbus)
return 0;
if(this->IsElemPrev(TabElem[j]))
if(X<TabBreakpoints[0][0]-2) return 0;
if(this->IsElemNext(TabElem[j]))
if(X>TabBreakpoints[BreakpointsNum-1][0]+2) return 0;
if(TabElem[j]->ElementType()==wire)
{
if((X>TabBreakpoints[i][0]-1&&X<TabBreakpoints[i][0]+1)||
(X>TabBreakpoints[i+1][0]-1&&X<TabBreakpoints[i+1][0]+1))
return 0;
if(Wire==TabElem[j]) return 0;
Wire=TabElem[j];
}
}
else if(TabElem[j]==Wire) Wire=NULL;
}
X+=5;
if(Up==1&&X>TabBreakpoints[i+1][0])
{
Y+=4;//badana jest dolna strona
X=TabBreakpoints[i][0]-2;
Up=0;
}
}while(X<TabBreakpoints[i+1][0]);
}
else//linia pozioma w lewo
{
X+=2;
Y-=2;//badana górna strona
char Up=1;
do
{
if(X<30||Y>440||Y<60) return 0;
for(int j=0;j<NumOfElem;j++)
{
if(this==TabElem[j]) j++;//nie bada się tego samego elementu
if(j>=NumOfElem) break;
//zabezpieczenie przed przekroczeniem tabeli
if(TabElem[j]->IsYourArea(X,Y))
{
if(TabElem[j]->ElementType()!=wire&&
TabElem[j]->ElementType()!=inbus) return 0;
if(TabElem[j]->ElementType()==wire)
{
if((X>TabBreakpoints[i][0]-1&&X<TabBreakpoints[i][0]+1)||
(X>TabBreakpoints[i+1][0]-1&&X<TabBreakpoints[i+1][0]+1))
return 0;
if(Wire==TabElem[j]) return 0;
Wire=TabElem[j];
}
}
else if(TabElem[j]==Wire) Wire=NULL;
}
X-=5;
if(Up==1&&X<TabBreakpoints[i+1][0])
{
Y+=4;//badana jest górna strona
X=TabBreakpoints[i][0]+2;
Up=0;
}
}while(X>TabBreakpoints[i+1][0]);
}
}
for(i=1;i<BreakpointsNum-1;i++)
for(int j=0;j<NumOfElem;j++)
{
if(this==TabElem[j]) j++;//nie bada się tego samego elementu
if(j>=NumOfElem) break;
//zabezpieczenie przed przekroczeniem tabeli
if(TabElem[j]->IsYourArea(TabBreakpoints[i][0],TabBreakpoints[i][1]))
return 0;
//punkt załamania nie może leżeć na żadnym z elementów
}
for(i=0;i<BreakpointsNum-1;i++)
{
if(TabBreakpoints[i][0]!=TabBreakpoints[i+1][0]&&
TabBreakpoints[i][1]!=TabBreakpoints[i+1][1])
return 0;
if(TabBreakpoints[i][0]==TabBreakpoints[i+1][0]&&
TabBreakpoints[i][1]==TabBreakpoints[i+1][1])
return 0;
for(int j=0;j<BreakpointsNum;j++)
{
if(TabBreakpoints[j][0]==TabBreakpoints[i][0])
if((TabBreakpoints[j][1]<TabBreakpoints[i][1]&&
TabBreakpoints[j][1]>TabBreakpoints[i+1][1])||
(TabBreakpoints[j][1]>TabBreakpoints[i][1]&&
TabBreakpoints[j][1]<TabBreakpoints[i+1][1])) return 0;
if(TabBreakpoints[j][1]==TabBreakpoints[i][1])
if((TabBreakpoints[j][0]<TabBreakpoints[i][0]&&
TabBreakpoints[j][0]>TabBreakpoints[i+1][0])||
(TabBreakpoints[j][0]>TabBreakpoints[i][0]&&
TabBreakpoints[j][0]<TabBreakpoints[i+1][0])) return 0;
}
}
return 1;
}
char CWire::FormatJunctions(CElement**TabElem,int NumOfElem)
{
int PrevJunctionPos[MaxJunctionNum][2];
int NewJunctionPos[MaxJunctionNum][2];
for(int i=0;i<JunctionNum;i++)
{
PrevJunctionPos[i][0]=TabJunction[i]->GetXCorner();
PrevJunctionPos[i][1]=TabJunction[i]->GetYCorner();
}
for(i=0;i<JunctionNum;i++)
{
int TmpX=PrevJunctionPos[i][0];
int TmpY=PrevJunctionPos[i][1];
long int TabDist[2*MaxBreakpointsNum-1];
int MinIndex=0;
long int MinValue=100000;
char OK;
for(int j=0;j<BreakpointsNum-1;j++)
{
if(TabBreakpoints[j][0]==TabBreakpoints[j+1][0])//linia pionowa
TabDist[j]=
(long int)(TmpX-TabBreakpoints[j][0])*(TmpX-TabBreakpoints[j][0]);
else if(TabBreakpoints[j][1]==TabBreakpoints[j+1][1])//linia pozioma
TabDist[j]=
(long int)(TmpY-TabBreakpoints[j][1])*(TmpY-TabBreakpoints[j][1]);
}
for(j=BreakpointsNum-1;j<2*BreakpointsNum-1;j++)
TabDist[j]=(long int)(TmpX-TabBreakpoints[j-BreakpointsNum+1][0])*
(long int)(TmpX-TabBreakpoints[j-BreakpointsNum+1][0])+
(long int)(TmpY-TabBreakpoints[j-BreakpointsNum+1][1])*
(long int)(TmpY-TabBreakpoints[j-BreakpointsNum+1][1]);
char End=0;
do
{
MinValue=100000;
OK=0;
for(j=0;j<2*BreakpointsNum-1;j++)
if(TabDist[j]<MinValue)
{
MinValue=TabDist[j];
MinIndex=j;
}//znalezienie minimum
if(MinValue==100000) End=1;
TabDist[MinIndex]=100000;//wpisanie dużej wartości-odległość
//nie będzie więcej brana pod uwagę
if(MinIndex<BreakpointsNum-1)//najkrótsza jest odległość do linii
{
OK=0;
if(TabBreakpoints[MinIndex][0]==TabBreakpoints[MinIndex+1][0])
//linia pionowa
{
if(TabBreakpoints[MinIndex][1]<TabBreakpoints[MinIndex+1][1])
//linia w dół
{
if(TmpY>=TabBreakpoints[MinIndex][1]+10&&
TmpY<=TabBreakpoints[MinIndex+1][1]-10)
{
TmpX=TabBreakpoints[MinIndex][0];
OK++;
}
}
else//linia w górę
if(TmpY>=TabBreakpoints[MinIndex][1]-10&&
TmpY<=TabBreakpoints[MinIndex+1][1]+10)
{
TmpX=TabBreakpoints[MinIndex][0];
OK++;
}
}
else//linia pozioma
{
if(TabBreakpoints[MinIndex][0]<TabBreakpoints[MinIndex+1][0])
//linia w prawo
{
if(TmpX>=TabBreakpoints[MinIndex][0]+10&&
TmpX<=TabBreakpoints[MinIndex+1][0]-10)
{
TmpY=TabBreakpoints[MinIndex][1];
OK++;
putpixel(TmpX,TmpY,BLACK);
}
}
else//linia w lewo
if(TmpX>=TabBreakpoints[MinIndex][0]-10&&
TmpX<=TabBreakpoints[MinIndex+1][0]+10)
{
TmpY=TabBreakpoints[MinIndex][1];
OK++;
}
}
if(OK)
{
for(int k=0;k<i;k++)
{
if((TmpX<=NewJunctionPos[k][0]+4&&TmpX>=NewJunctionPos[k][0]-4)&&
(TmpY<=NewJunctionPos[k][1]+4&&TmpY>=NewJunctionPos[k][1]-4))
{
OK=0;
break;
}
}
if(OK)
if(!TabJunction[i]->Move(TmpX,TmpY,TabElem,NumOfElem)) OK=0;
}
}
else//najkrótsza jest odległość do punktu załamania
{
MinIndex=MinIndex-BreakpointsNum+1;
int Number=0;
char AllTested=0;//flaga zakończenia szukania
if(MinIndex==BreakpointsNum-1) MinIndex--;
do
{
OK=0;
Number+=10;
if(TabBreakpoints[MinIndex][0]==TabBreakpoints[MinIndex+1][0])
//linia pionowa
{
if(TabBreakpoints[MinIndex][1]<TabBreakpoints[MinIndex+1][1])
//linia w dół
{
if(TabBreakpoints[MinIndex][1]+Number<=
TabBreakpoints[MinIndex+1][1]-10)//jest miejsce
{
TmpX=TabBreakpoints[MinIndex][0];
TmpY=TabBreakpoints[MinIndex][1]+Number;
OK++;
}
}
else//linia w górę
{
if(TabBreakpoints[MinIndex][1]-Number>=
TabBreakpoints[MinIndex+1][1]+10)//jest miejsce
{
TmpX=TabBreakpoints[MinIndex][0];
TmpY=TabBreakpoints[MinIndex][1]-Number;
OK++;
}
}
}
else//linia pozioma
{
if(TabBreakpoints[MinIndex][0]<TabBreakpoints[MinIndex+1][0])
//linia w prawo
{
if(TabBreakpoints[MinIndex][0]+Number<=
TabBreakpoints[MinIndex+1][0]-10)//jest miejsce
{
TmpX=TabBreakpoints[MinIndex][0]+Number;
TmpY=TabBreakpoints[MinIndex][1];
OK++;
}
}
else//linia w lewo
{
if(TabBreakpoints[MinIndex][0]-Number>=
TabBreakpoints[MinIndex+1][0]+10)//jest miejsce
{
TmpX=TabBreakpoints[MinIndex][0]-Number;
TmpY=TabBreakpoints[MinIndex][1];
OK++;
}
}
}
if(OK)
{
AllTested=0;
for(int k=0;k<i;k++)
if((TmpX<=NewJunctionPos[k][0]+4&&TmpX>=NewJunctionPos[k][0]-4)&&
(TmpY<=NewJunctionPos[k][1]+4&&TmpY>=NewJunctionPos[k][1]-4))
{
OK=0;
break;
}//sprawdzenie czy węzeł nie leży na innym węźle
if(OK)
if(!TabJunction[i]->Move(TmpX,TmpY,TabElem,NumOfElem)) OK=0;
//gdy przesunięcie się nie uda, to OK=0
}
else AllTested=1;
}while(!OK&&!AllTested);
}
}while(!OK&&!End);
if(!OK)//nie udało się sformatować węzła
{
for(j=JunctionNum-1;j>=0;j--)
TabJunction[j]->Move(PrevJunctionPos[j][0],PrevJunctionPos[j][1],
TabElem,NumOfElem);//powrót węzłów
//na dawne pozycje
return 0;
}
NewJunctionPos[i][0]=TabJunction[i]->GetXCorner();
NewJunctionPos[i][1]=TabJunction[i]->GetYCorner();
}
return 1;
}
char CWire::FormatLine(int i,CElement**TabElem,int NumOfElem)
{
if(i==3)
{
TabBreakpoints[BreakpointsNum-2][0]=TabBreakpoints[BreakpointsNum-3][0];
TabBreakpoints[BreakpointsNum-2][1]=TabBreakpoints[BreakpointsNum-1][1];
if(Check(TabElem,NumOfElem))
if(FormatJunctions(TabElem,NumOfElem)) return 1;
TabBreakpoints[BreakpointsNum-2][1]=TabBreakpoints[BreakpointsNum-3][1];
TabBreakpoints[BreakpointsNum-2][0]=TabBreakpoints[BreakpointsNum-1][0];
if(Check(TabElem,NumOfElem))
if(FormatJunctions(TabElem,NumOfElem)) return 1;
return 0;
}
int Tmp1X=TabBreakpoints[BreakpointsNum-i][0];
int Tmp1Y=TabBreakpoints[BreakpointsNum-i][1];
int Tmp2X;
int Tmp2Y;
TabBreakpoints[BreakpointsNum-i+1][0]=TabBreakpoints[BreakpointsNum-i][0];
TabBreakpoints[BreakpointsNum-i+1][1]=TabBreakpoints[BreakpointsNum-i][1];
int Number=0;
do
{
Tmp2X=TabBreakpoints[BreakpointsNum-i+1][0];
//zachowanie zmienionej wartości X
TabBreakpoints[BreakpointsNum-i+1][0]=Tmp1X;
//pierwotna wartość X
TabBreakpoints[BreakpointsNum-i+1][1]+=Number;
if(FormatLine(i-1,TabElem,NumOfElem)) return 1;
TabBreakpoints[BreakpointsNum-i+1][0]=Tmp2X;
//przywrócenie zmienionej wartości X
Tmp2Y=TabBreakpoints[BreakpointsNum-i+1][1];
//zachowanie zmienionej wartości Y
TabBreakpoints[BreakpointsNum-i+1][1]=Tmp1Y;
//pierwotna wartość Y
TabBreakpoints[BreakpointsNum-i+1][0]+=Number;
if(FormatLine(i-1,TabElem,NumOfElem)) return 1;
TabBreakpoints[BreakpointsNum-i+1][1]=Tmp2Y;
//przywrócenie zmienionej wartości Y
if(Number>0) Number+=5;
else Number-=5;
Number*=-1;
}while(Number<600);
return 0;
}
char CWire::Autoformat(CElement**TabElem,int NumOfElem)
{
int TmpTabBreakpoints[MaxBreakpointsNum][2];
int TmpBreakpointsNum=BreakpointsNum;
for(int i=0;i<BreakpointsNum;i++)
{
TmpTabBreakpoints[i][0]=TabBreakpoints[i][0];
TmpTabBreakpoints[i][1]=TabBreakpoints[i][1];
}//zachowanie punktów załamania
TabBreakpoints[0][0]=X1;
TabBreakpoints[0][1]=Y1;
TabBreakpoints[1][0]=X2;
TabBreakpoints[1][1]=Y2;
BreakpointsNum=2;
//powyższe operacje mają na celu zlikwidowanie dotychczasowych punktów
//załamań
if(X1==X2||Y1==Y2)
if(Check(TabElem,NumOfElem)&&FormatJunctions(TabElem,NumOfElem)) return 1;
for(i=3;i<=MaxBreakpointsNum;i++)
{
TabBreakpoints[BreakpointsNum][0]=X2;
TabBreakpoints[BreakpointsNum][1]=Y2;
BreakpointsNum++;//zwiększenie ilości punktów załamania o 1
if(FormatLine(i,TabElem,NumOfElem)) return 1;
}
BreakpointsNum=TmpBreakpointsNum;
for(i=0;i<BreakpointsNum;i++)
{
TabBreakpoints[i][0]=TmpTabBreakpoints[i][0];
TabBreakpoints[i][1]=TmpTabBreakpoints[i][1];
}//przywrócenie poprzednich punktów załamania*/
if(!FormatJunctions(TabElem,NumOfElem)) return 0;
return 0;
}
TElementType CWire::ElementType()
{
return wire;
}
void CWire::ClickElement()
{}
char CWire::LinkNextElem(CElement*NextElem,int X,int Y)
{
if(NextElem->ElementType()!=wire)
{
if(TabNextElem[0]!=NULL) return 0;
TabNextElem[0]=NextElem;
return 1;
}//dołączenie elementu na końcu druta
//dalej - połączenie za pomocą węzła
int XTmp1;
int YTmp1;
for(int i=0;i<JunctionNum;i++)
{
XTmp1=TabJunction[i]->GetXCorner();
YTmp1=TabJunction[i]->GetYCorner();
if(X<XTmp1+6&&X>XTmp1-6&&
Y<YTmp1+6&&Y>YTmp1-6)
//powiązanie tworzy się w okolicy istniejącego węzła
{
return 0;
}
}
int MinX;
int MaxX;
int MinY;
int MaxY;
if(JunctionNum>=MaxJunctionNum) return 0;
for(i=0;i<BreakpointsNum-1;i++)
{
if(TabBreakpoints[i][0]<TabBreakpoints[i+1][0])
{
MinX=TabBreakpoints[i][0];
MaxX=TabBreakpoints[i+1][0];
}
else
{
MinX=TabBreakpoints[i+1][0];
MaxX=TabBreakpoints[i][0];
}
if(TabBreakpoints[i][1]<TabBreakpoints[i+1][1])
{
MinY=TabBreakpoints[i][1];
MaxY=TabBreakpoints[i+1][1];
}
else
{
MinY=TabBreakpoints[i+1][1];
MaxY=TabBreakpoints[i][1];
}
if(MinY==MaxY&&Y>=MinY-2&&Y<=MinY+2&&X>=MinX&&X<MaxX)
{
Y=TabBreakpoints[i][1];
break;
}
if(MinX==MaxX&&X>=MinX-2&&X<=MinX+2&&Y>=MinY&&Y<MaxY)
{
X=TabBreakpoints[i][0];
break;
}//sprawdzenie, czy węzeł nie znajduje się za blisko punktu przegiecia
}
TabJunction[JunctionNum]=new CJunction(X,Y);
TabJunction[JunctionNum]->LinkPrevElem(this,0,0);
TabJunction[JunctionNum]->LinkNextElem(NextElem,X,Y);
JunctionNum++;
return 1;
}
char CWire::LinkPrevElem(CElement*PrevElem,int X,int Y)
{
if(TabPrevElem[0]!=NULL) return 0;
TabPrevElem[0]=PrevElem;
return 1;
}
char CWire::DelNextElem(CElement*DelElem)
{
for(int i=0;i<OutNum;i++)
if(TabNextElem[i]==DelElem)
{
TabNextElem[i]=NULL;
return 1;
}
for(i=0;i<JunctionNum;i++)
{
char Deleting=TabJunction[i]->DelNextElem(DelElem);
if(Deleting==2)
{
TabJunction[i]->DrawElem(BackgroundColour);
delete TabJunction[i];
for(int j=i;j<JunctionNum;j++) TabJunction[j]=TabJunction[j+1];
JunctionNum--;
return 1;
}
if(Deleting==1) return 1;
}
return 0;
}
int CWire::DeleteConnections(CElement**TabElem,int NumOfElem,char Main)
{
int DelElemNum=1;//trzeba wliczyć także ten element
for(int i=0;i<NumOfElem;i++)
if(this==TabElem[i]) break;//znalezienie indeksu bieżącego elementu
for(int j=i;j<NumOfElem;j++)
TabElem[j]=TabElem[j+1];//wyrzucenie elementu z tabeli
NumOfElem--;//lokalne zmniejszenie wartości - nie ma skutku na zewnątrz
if(Main==1)
TabPrevElem[0]->DelNextElem(this);
//gdy funkcja została wywołana przez bramkę (element bezpośrednio
//wskazany do usunięcia przez użytkownika), to trzeba usunąć połączenie
//elementu poprzedniego z aktualnym, a gdy funkcja została wywołana przez
//węzeł, to wyżej opisane połączenie zostanie i tak zniszczone
TabNextElem[0]->DelPrevElem(this);
int PrevJunctionNum=JunctionNum;
for(i=0;i<PrevJunctionNum;i++)
{
DelElemNum+=TabJunction[i]->DeleteConnections(TabElem,NumOfElem);
delete TabJunction[i];
JunctionNum--;
}
this->DrawElem(BackgroundColour);
return DelElemNum;
}
char CWire::SaveElement(CElement**TabElem,int NumOfElem,FILE*File,char Phase)
{
if(Phase==1)//pierwsza faza zachowywania
{
char Type=8;
fwrite(&Type,sizeof(char),1,File);
fwrite(&BreakpointsNum,sizeof(int),1,File);
for(int i=0;i<BreakpointsNum;i++)
{
fwrite(&TabBreakpoints[i][0],sizeof(int),1,File);
fwrite(&TabBreakpoints[i][1],sizeof(int),1,File);
}
fwrite(&JunctionNum,sizeof(int),1,File);
for(i=0;i<JunctionNum;i++)
if(!TabJunction[i]->SaveElement(TabElem,NumOfElem,File,1)) return 0;
//zachowanie węzłów w pierwszej fazie
}
else//druga faza zachowywania
{
int PrevElemPos;
if(TabPrevElem[0]!=NULL)
{
for(int j=0;j<NumOfElem;j++)
if(TabElem[j]==TabPrevElem[0]) break;
//ustalenie indeksu poprzedniego elementu
if(j>=NumOfElem) return 0;//błąd - element nie został znaleziony
PrevElemPos=j;
}
else PrevElemPos=-1;//nie ma elementu poprzedniego
fwrite(&PrevElemPos,sizeof(int),1,File);
//zachowanie indeksu poprzedniego elementu
int NextElemPos;
if(TabNextElem[0]!=NULL)
{
for(int j=0;j<NumOfElem;j++)
if(TabElem[j]==TabNextElem[0]) break;
//ustalenie indeksu poprzedniego elementu
if(j>=NumOfElem) return 0;//błąd - element nie został znaleziony
NextElemPos=j;
}
else NextElemPos=-1;//nie ma elementu poprzedniego
fwrite(&NextElemPos,sizeof(int),1,File);
//zachowanie indeksu następnego elementu
for(int i=0;i<JunctionNum;i++)
if(!TabJunction[i]->SaveElement(TabElem,NumOfElem,File,2)) return 0;
//zachowanie węzłów w drugiej fazie
}
return 1;
}
char CWire::LoadElement(CElement**TabElem,int NumOfElem,
FILE*File,char Phase)
{
if(Phase==1)//pierwsza faza odczytu
{
if(feof(File)) return 0;
fread(&BreakpointsNum,sizeof(int),1,File);
if(BreakpointsNum>MaxBreakpointsNum) return 0;
for(int i=0;i<BreakpointsNum;i++)
{
if(feof(File)) return 0;
fread(&TabBreakpoints[i][0],sizeof(int),1,File);
if(TabBreakpoints[i][0]<0||TabBreakpoints[i][0]>639) return 0;
if(feof(File)) return 0;
fread(&TabBreakpoints[i][1],sizeof(int),1,File);
if(TabBreakpoints[i][1]<0||TabBreakpoints[i][1]>639) return 0;
}
X1=TabBreakpoints[0][0];
Y1=TabBreakpoints[0][1];
X2=TabBreakpoints[BreakpointsNum-1][0];
Y2=TabBreakpoints[BreakpointsNum-1][1];
if(feof(File)) return 0;
fread(&JunctionNum,sizeof(int),1,File);
if(JunctionNum>MaxJunctionNum) return 0;
for(i=0;i<JunctionNum;i++)
{
char Type;
if(feof(File)) return 0;
fread(&Type,sizeof(char),1,File);
if(Type!=7) return 0;//odczytywany element nie jest węzłem
TabJunction[i]=new CJunction(0,0);
if(!TabJunction[i]->LoadElement(TabElem,NumOfElem,File,1)) return 0;
//odczyt węzłów w pierwszej fazie
}
}
else//druga faza odczytu
{
int PrevElemPos;
if(feof(File)) return 0;
fread(&PrevElemPos,sizeof(int),1,File);
if(PrevElemPos>=NumOfElem) return 0;
if(PrevElemPos<0)//element nie był połączony
TabPrevElem[0]=NULL;
else TabPrevElem[0]=TabElem[PrevElemPos];
//element był połączony z elementem o odczytanym indeksie
int NextElemPos;
if(feof(File)) return 0;
fread(&NextElemPos,sizeof(int),1,File);
if(NextElemPos>=NumOfElem) return 0;
if(NextElemPos<0)//element nie był połączony
TabNextElem[0]=NULL;
else TabNextElem[0]=TabElem[NextElemPos];
//element był połączony z elementem o odczytanym indeksie
for(int i=0;i<JunctionNum;i++)
if(!TabJunction[i]->LoadElement(TabElem,NumOfElem,File,2)) return 0;
//odczyt węzłów w pierwszej fazie
}
return 1;
}
<file_sep>/SELogicGates/SELogicGates/OUTPUT.CPP
#include "output.h"
#include "gate.h"
COutput::COutput(int X,int Y,int Colour)
{
X1=X;
Y1=Y;
X2=X+25;
Y2=Y+25;
InNum=1;
OutNum=0;
TabPrevElem[0]=NULL;
Output=high;
Movable=yes;
}
void COutput::DrawElem(int Colour)
{
setcolor(FrameColour);
outtextxy(X1+17,Y1+10,"?");
outtextxy(X1+17,Y1+10,"0");
outtextxy(X1+17,Y1+10,"1");
//zmazanie napisu
if(Colour==0)
{
switch(Output)
{
case low:Colour=LowColour;break;
case high:Colour=HighColour;break;
case error:Colour=ErrorColour;break;
}
}
setcolor(Colour);
setfillstyle(1,Colour);
line(X1+1,Y1+8,X1+10,Y1+13);
line(X1+10,Y1+13,X1+1,Y1+18);
char Text[2];
switch(Output)
{
case low:Text[0]='0';break;
case high:Text[0]='1';break;
case error:Text[0]='?';break;
}
Text[1]='\0';
outtextxy(X1+17,Y1+10,Text);
}
TOutput COutput::GetOutput(int AskElemNum,int MaxNum)
{
if(TabPrevElem[0]==NULL) Output=error;
else Output=TabPrevElem[0]->GetOutput(AskElemNum+1,MaxNum);
return Output;
}
TElementType COutput::ElementType()
{
return output;
}
void COutput::ClickElement()
{}
int COutput::IsOnBoard()
{
if(X1<611||Y1<61||Y2>440) return 0;
X1=611;
X2=X1+25;//autoformatowanie
return 1;
}
char COutput::LinkNextElem(CElement*NextElem,int X,int Y)
{
return 0;
}
<file_sep>/SELogicGates/SELogicGates/JUNCTION.H
#ifndef DefJunction
#define DefJunction
#include "element.h"
class CJunction:public CElement
{
public:
char Move(int X,int Y,CElement**TabElem,int NumOfElem);
void DrawElem(int Colour=0);
TOutput GetOutput(int AskElemNum,int MaxNum) ;
void ClickElement();
char LinkNextElem(CElement*NextElem,int X,int Y);
char LinkPrevElem(CElement*PrevElem,int X,int Y);
TElementType ElementType();
CJunction(int X,int Y,int Colour=0);
char DelNextElem(CElement*DelElem);
int DeleteConnections(CElement**TabElem,int NumOfElem,char Main=1);
};
#endif<file_sep>/SELogicGates/SELogicGates/NAND.H
#ifndef DefNand
#define DefNand
#include "element.h"
class CNand:public CElement
{
public:
void DrawElem(int Colour=0);
TOutput GetOutput(int AskElemNum,int MaxNum) ;
void ClickElement();
TElementType ElementType();
CNand(int X,int Y,int Colour=0);
};
#endif<file_sep>/SELogicGates/SELogicGates/NOR.H
#ifndef DefNor
#define DefNor
#include "element.h"
class CNor:public CElement
{
public:
void DrawElem(int Colour=0);
TOutput GetOutput(int AskElemNum,int MaxNum) ;
void ClickElement();
TElementType ElementType();
CNor(int X,int Y,int Colour=0);
};
#endif<file_sep>/SELogicGates/SELogicGates/NOT.H
#ifndef DefNot
#define DefNot
#include "element.h"
class CNot:public CElement
{
public:
void DrawElem(int Colour=0);
TOutput GetOutput(int AskElemNum,int MaxNum) ;
void ClickElement();
char LinkPrevElem(CElement*PrevElem,int X,int Y);
TElementType ElementType();
CNot(int X,int Y,int Colour=0);
};
#endif<file_sep>/SELogicGates/SELogicGates/ELEMENT.H
#ifndef DefElement
#define DefElement
#include "gate.h"
class CElement
{
protected:
int X1;
int Y1;
int X2;
int Y2;
int OutNum;
int InNum;
enum TOutput{low=0,high=1,error=-1};
enum TMovable{yes,no};
TOutput Output;
TMovable Movable;
CElement*TabNextElem[MaxNextElemNum];
CElement*TabPrevElem[MaxPrevElemNum];
int IsAreaFree(CElement**TabElem,int NumOfElem);
public:
virtual void DrawElem(int Colour=0)=0;
virtual TOutput GetOutput(int AskElemNum,int MaxNum)=0;
virtual char Move(int X,int Y,CElement**TabElem,int NumOfElem);
virtual void MoveBeg(int X,int Y);
virtual void MoveEnd(int X,int Y);
virtual int IsOnBoard();
virtual int IsYourArea(int X,int Y);
char IsElemPrev(CElement*Element);
virtual char IsElemNext(CElement*Element);
int GetXCorner(char Right=0);
int GetYCorner(char Down=0);
virtual void ClickElement()=0;
virtual TElementType ElementType()=0;
virtual char LinkNextElem(CElement*NextElem,int X,int Y);
virtual char LinkPrevElem(CElement*PrevElem,int X,int Y);
virtual char DelNextElem(CElement*DelElem);
virtual char DelPrevElem(CElement*DelElem);
virtual char Autoformat(CElement**TabElem,int NumOfElem);
virtual int DeleteConnections(CElement**TabElem,int NumOfElem,char Main=1);
virtual char SaveElement(CElement**TabElem,int NumOfElem,
FILE*File,char Phase);
virtual char LoadElement(CElement**TabElem,int NumOfElem,
FILE*File,char Phase);
virtual ~CElement();
};
#endif<file_sep>/SELogicGates/SELogicGates/MODEBUT.CPP
#include "modebut.h"
#include "gate.h"
#include "and.h"
#include "or.h"
#include "not.h"
#include "nand.h"
#include "nor.h"
#include "xor.h"
#include "output.h"
#include "wire.h"
CModeButton::CModeButton(TElementType ButtonType,int X1,int Y1,int X2, int Y2)
{
this->X1=X1;
this->X2=X2;
this->Y1=Y1;
this->Y2=Y2;
DrawingColour=16;
ButtonColour=FrameColour;
Insert=false;
Active=on;
ButtonElement=NULL;
switch(ButtonType)
{
case and:ButtonElement=new CAnd(X1,Y1,DrawingColour);break;
case or:ButtonElement=new COr(X1,Y1,DrawingColour);break;
case not:ButtonElement=new CNot(X1,Y1,DrawingColour);break;
case nor:ButtonElement=new CNor(X1,Y1,DrawingColour);break;
case nand:ButtonElement=new CNand(X1,Y1,DrawingColour);break;
case xor:ButtonElement=new CXor(X1,Y1,DrawingColour);break;
case output:ButtonElement=new COutput(X1,Y1,DrawingColour);break;
case wire:ButtonElement=new CWire(X1,Y1,DrawingColour);break;
};
}
CModeButton::~CModeButton()
{
delete ButtonElement;
}
void CModeButton::DrawButton()
{
setcolor(LineColour);
line(X1,Y1,X2,Y1);
line(X2,Y1,X2,Y2);
line(X2,Y2,X1,Y2);
line(X1,Y2,X1,Y1);
setfillstyle(1,ButtonColour);
bar(X1+1,Y1+1,X2-1,Y2-1);
ButtonElement->DrawElem(DrawingColour);
}
void CModeButton::ChangeText(char*Text)
{}
int CModeButton::ClickButton()
{
if(Active==on) return 1;
return 0;
}
<file_sep>/SELogicGates/SELogicGates/SMALLWIN.CPP
#include "window.h"
#include "smallwin.h"
#include "menubut.h"
#include "modebut.h"
CSmallWindow::CSmallWindow(int X1,int Y1,int X2, int Y2,char*HeadingText,
char**ConstText,char Reading,int ButtonNum,
char*FirstButtonText,char*SecondButtonText)
{
Active=1;
this->X1=X1;
this->Y1=Y1;
this->HeadingText=HeadingText;
for(int i=0;i<MaxSmallWinLinesNum;i++)
if(ConstText[i]==NULL) break;
else this->ConstText[i]=ConstText[i];
LinesNum=i;
if(LinesNum>MaxSmallWinLinesNum) LinesNum=MaxSmallWinLinesNum;
if(X2==0) this->X2=X1+200;
else this->X2=X2;
if(Y2==0) this->Y2=Y1+LinesNum*15+80;
else this->Y2=Y2;
if(Reading) this->Y2+=20;
ReadText=NULL;
this->Reading=Reading;
this->ButtonNum=ButtonNum;
char*Text=NULL;
if(FirstButtonText==NULL)
Text=strdup("OK");
else
Text=strdup(FirstButtonText);
if(ButtonNum==2)
{
TabBut[0]=new CMenuButton(Text,this->X1+15,this->Y2-30,
(int)((this->X1+this->X2)/2-10),this->Y2-15);
delete Text;
if(SecondButtonText==NULL)
Text=strdup("Cancel");
else
Text=strdup(SecondButtonText);
TabBut[1]=new CMenuButton(Text,(int)((this->X1+this->X2)/2+10),
this->Y2-30,this->X2-15,this->Y2-15);
}
else
TabBut[0]=new CMenuButton(Text,this->X1+15,this->Y2-30,
this->X2-15,this->Y2-15);
delete Text;
}
CSmallWindow::~CSmallWindow()
{
if(ReadText!=NULL)
delete ReadText;
for(int i=0;i<ButtonNum;i++)
delete TabBut[i];
}
char CSmallWindow::Work()
{
struct REGPACK reg;
DrawSmallWin();
reg.r_ax=0x1;
intr(0x33,®);//włączenie
if(kbhit())
do
{
getch();
} while(kbhit());
do
{
if(kbhit())
Read();
reg.r_ax=0x3;
intr(0x33,®);
if(reg.r_bx&1) React(reg.r_cx,reg.r_dx);
}while(Active);
reg.r_ax=0x2;
intr(0x33,®);//wyłączenie
return Result;
}
void CSmallWindow::React(int X,int Y)
{
struct REGPACK reg;
CheckButtons(X,Y);
do
{
reg.r_ax=0x3;
intr(0x33,®);
}while(reg.r_bx&1);//blokada-nic się nie dzieje, gdy klawisz myszy
//został wciśnięty na pustym polu
}
void CSmallWindow::Read()
{
REGPACK reg;
char TmpText[15];
int Length;
if(Reading)
{
Length=strlen(ReadText);
strcpy(TmpText,ReadText);
}
else Length=0;
TmpText[Length]=getch();
if((int)TmpText[Length]==Enter)
{
if(Reading&&ReadText==NULL) return;
Result=1;
Active=0;
return;//naciśnięty przycisk OK
}
if((int)TmpText[Length]==Esc)
{
Result=0;
Active=0;
return;//naciśnięty przycisk Cancel
}
if(!Reading) return;//dalej jest obsluga pola do wprowadzania napisu
reg.r_ax=0x2;
intr(0x33,®);//schowanie kursora
setfillstyle(1,BackgroundColour);
bar(X1+50,Y2-55,X1+150,Y2-40);//pole do odczytu
TmpText[Length+1]='\x0';
if((int)TmpText[Length]==BackSpace&&Length>0)
{
TmpText[Length-1]='\x0';
Length-=2;
}//zmazanie ostatniego znaku
else
{
if(Length>=8)
{
TmpText[Length]='\x0';
Length--;
}
else
if(!(((int)TmpText[Length]>=(int)'0'&&(int)TmpText[Length]<='9')||
((int)TmpText[Length]>=(int)'A'&&(int)TmpText[Length]<='Z')||
((int)TmpText[Length]>=(int)'a'&&(int)TmpText[Length]<='z')))
{
TmpText[Length]='\x0';
Length--;
}
}
outtextxy(X1+55,Y2-50,TmpText);
reg.r_ax=0x1;
intr(0x33,®);//pokazanie kursora
Length++;
if(ReadText!=NULL) delete ReadText;
if(strlen(TmpText)==0)
{
ReadText=NULL;
return;
}
ReadText=strdup(TmpText);
}
int CSmallWindow::GetReadTextLength()
{
return strlen(ReadText)+1;
}
char CSmallWindow::GetReadText(char*ReadText)
{
if(ReadText==NULL) return 0;
strcpy(ReadText,this->ReadText);
return 1;
}
void CSmallWindow::CheckButtons(int X,int Y)
{
for(int i=0;i<ButtonNum;i++)
if(TabBut[i]->IsYourArea(X,Y))
if(TabBut[i]->ClickButton())
Action(i);
}
void CSmallWindow::DrawSmallWin()
{
setfillstyle(1,8);
setcolor(8);
line(X1,Y1,X1,Y2);
line(X1,Y2,X2,Y2);
line(X2,Y2,X2,Y1);
line(X2,Y1,X1,Y1);
setfillstyle(1,HeadingColour);
bar(X1+1,Y1+1,X2-1,Y1+20);
setcolor(HeadingTextColour);
outtextxy((int)(X1+X2)/2-(strlen(HeadingText)/2)*9,Y1+8,HeadingText);
setfillstyle(1,FrameColour);
bar(X1+1,Y1+21,X2-1,Y2-1);//szare pole
setfillstyle(1,CustomTextColour);
setcolor(CustomTextColour);
for(int i=0;i<LinesNum;i++)
{
char*Text=ConstText[i];
outtextxy(X1+15,Y1+30+i*15,Text);
}
if(Reading)
{
setfillstyle(1,BackgroundColour);
bar(X1+50,Y2-55,X1+150,Y2-40);//pole do odczytu
setcolor(LineColour);
line(X1+49,Y2-56,X1+49,Y2-39);
line(X1+49,Y2-39,X1+151,Y2-39);
line(X1+151,Y2-39,X1+151,Y2-56);
line(X1+151,Y2-56,X1+49,Y2-56);
}
for(i=0;i<ButtonNum;i++)
TabBut[i]->DrawButton();
}
void CSmallWindow::Action(int ActNum)
{
switch(ActNum)
{
case 0:if(ReadText==NULL&&Reading) return;
Result=1;Active=0;break;//naciśnięty przycisk OK
case 1:Result=0;Active=0;break;//naciśnięty przycisk Cancel
}
}
<file_sep>/SELogicGates/SELogicGates/NOT.CPP
#include "not.h"
#include "gate.h"
CNot::CNot(int X,int Y,int Colour)
{
X1=X;
Y1=Y;
X2=X+25;
Y2=Y+25;
InNum=1;
OutNum=1;
for(int i=0;i<InNum;i++)
TabPrevElem[i]=NULL;
for(i=0;i<OutNum;i++)
TabNextElem[i]=NULL;
Output=error;
Movable=yes;
}
void CNot::DrawElem(int Colour)
{
if(Colour==0)
{
switch(Output)
{
case low:Colour=LowColour;break;
case high:Colour=HighColour;break;
case error:Colour=ErrorColour;break;
}
}
setcolor(Colour);
line(X1+8,Y1+7,X1+8,Y1+22);//linia z lewej
line(X1+3,Y1+14,X1+8,Y1+14);//wejście
line(X1+8,Y1+7,X1+17,Y1+14);//linia z góry
line(X1+8,Y1+22,X1+17,Y1+14);//linia z dołu
circle(X1+19,Y1+14,2);//negacja
line(X1+21,Y1+14,X1+24,Y1+14);//wyjście
}
TOutput CNot::GetOutput(int AskElemNum,int MaxNum)
{
if(AskElemNum==MaxNum) return Output;
//rekurencja wpadła w pętlę sprzężenia zwrotnego
if(TabPrevElem[0]==NULL)//bramka jednowejściowa
{
Output=error;
return Output;
}
TOutput TmpValue=TabPrevElem[0]->GetOutput(AskElemNum+1,MaxNum);
if(TmpValue==high) Output=low;
else if(TmpValue==low) Output=high;
else Output=error;
return Output;
}
TElementType CNot::ElementType()
{
return not;
}
void CNot::ClickElement()
{}
char CNot::LinkPrevElem(CElement*PrevElem,int X,int Y)
{
if(PrevElem->ElementType()!=wire) return 0;
//bramka może być połączona tylko z drutem
X-=X1;
Y-=Y1;//zmienne X i Y określają względne położenie
if(TabPrevElem[0]!=NULL) return 0;
TabPrevElem[0]=PrevElem;
PrevElem->MoveEnd(X1+3,Y1+14);
return 1;
}
<file_sep>/SELogicGates/SELogicGates/BUTTON.H
#ifndef DefButton
#define DefButton
class CButton
{
protected:
int X1;
int Y1;
int X2;
int Y2;
int ButtonColour;
int DrawingColour;
enum TInsert{true,false};
enum TActive{off,on};
TInsert Insert;
TActive Active;
public:
virtual void DrawButton()=0;
void ChangeInsertMode(int TurnOff=0);
void ActiveMode(TActive Active);
virtual void ChangeText(char*)=0;
int IsYourArea(int X,int Y);
virtual int ClickButton()=0;
void SetActivity(TActive Active);
virtual ~CButton();
};
#endif<file_sep>/SELogicGates/SELogicGates/XOR.CPP
#include "xor.h"
#include "gate.h"
CXor::CXor(int X,int Y,int Colour)
{
X1=X;
Y1=Y;
X2=X+25;
Y2=Y+25;
InNum=2;
OutNum=1;
for(int i=0;i<InNum;i++)
TabPrevElem[i]=NULL;
for(i=0;i<OutNum;i++)
TabNextElem[i]=NULL;
Output=error;
Movable=yes;
}
void CXor::DrawElem(int Colour)
{
if(Colour==0)
{
switch(Output)
{
case low:Colour=LowColour;break;
case high:Colour=HighColour;break;
case error:Colour=ErrorColour;break;
}
}
setcolor(Colour);
arc(X1+1,Y1+14,315,54,9);
arc(X1+5,Y1+14,315,54,9);//drugi łuk z lewej
line(X1+3,Y1+12,X1+8,Y1+12);//we g.
line(X1+3,Y1+17,X1+8,Y1+17);//we d.
arc(X1+10,Y1+14,270,90,8);//łuk z prawej
line(X1+19,Y1+14,X1+24,Y1+14);//wyjście
}
TOutput CXor::GetOutput(int AskElemNum,int MaxNum)
{
if(AskElemNum==MaxNum) return Output;
//rekurencja wpadła w pętlę sprzężenia zwrotnego
if(Output==error) Output=low;//wartość wyjściowa
TOutput Value=low;
for(int i=0;i<InNum;i++)
{
if(TabPrevElem[i]==NULL)
Output=error;
else
{
TOutput TmpValue=TabPrevElem[i]->GetOutput(AskElemNum+1,MaxNum);
if(TmpValue==error)
Output=error;
else Value+=TmpValue;
if(Value>1) Value=low;
}
}
if(Output!=error) Output=Value;
return Output;
}
TElementType CXor::ElementType()
{
return xor;
}
void CXor::ClickElement()
{}
<file_sep>/SELogicGates/SELogicGates/ELEMENT.CPP
#include "element.h"
#include "gate.h"
CElement::~CElement()
{}
int CElement::IsOnBoard()
{
if(X1>150&&X2<610&&Y1>60&&Y2<440) return 1;
return 0;
}
int CElement::IsYourArea(int X,int Y)
{
if(X>=X1&&X<=X2&&Y>=Y1&&Y<=Y2) return 1;
return 0;
}
char CElement::IsElemPrev(CElement*Element)
{
for(int j=0;j<InNum;j++)
if(TabPrevElem[j]==Element) return 1;
return 0;
}
char CElement::IsElemNext(CElement*Element)
{
for(int j=0;j<OutNum;j++)
if(TabNextElem[j]==Element) return 1;
return 0;
}
int CElement::GetXCorner(char Right)
{
if(Right) return X2;
return X1;
}
int CElement::GetYCorner(char Down)
{
if(Down) return Y2;
return Y1;
}
int CElement::IsAreaFree(CElement**TabElem,int NumOfElem)
{
int ElemNum;
for(int i=0;i<=NumOfElem;i++) if(this==TabElem[i])
{
ElemNum=i;
break;
}//ustalenie numeru elementu
if(X2<0) X2=X1;
if(Y2<0) Y2=Y1;
int X=X1;
int Y=Y1;
if(TabElem[ElemNum]->ElementType()==wire) return 0;//wystąpił błąd
for(i=0;i<NumOfElem;i++)
{
if(i==ElemNum) i++;//nie bada się tego samego elementu
if(i>=NumOfElem) break;//zabezpieczenie przed przekroczeniem tabeli
do
{
if(TabElem[i]->IsYourArea(X,Y))
if(!TabElem[ElemNum]->IsElemPrev(TabElem[i])&&
!TabElem[ElemNum]->IsElemNext(TabElem[i])) return 0;
//znaleziony element nie jest następny ani poprzedni
X+=5;
}while(X<X2);
X=X2;
do
{
if(TabElem[i]->IsYourArea(X,Y))
if(!TabElem[ElemNum]->IsElemPrev(TabElem[i])&&
!TabElem[ElemNum]->IsElemNext(TabElem[i])) return 0;
//znaleziony element nie jest następny ani poprzedni
Y+=5;
}while(Y<Y2);
Y=Y2;
do
{
if(TabElem[i]->IsYourArea(X,Y))
if(!TabElem[ElemNum]->IsElemPrev(TabElem[i])&&
!TabElem[ElemNum]->IsElemNext(TabElem[i])) return 0;
//znaleziony element nie jest następny ani poprzedni
X-=5;
}while(X>X1);
X=X1;
do
{
if(TabElem[i]->IsYourArea(X,Y))
if(!TabElem[ElemNum]->IsElemPrev(TabElem[i])&&
!TabElem[ElemNum]->IsElemNext(TabElem[i])) return 0;
//znaleziony element nie jest następny ani poprzedni
Y-=5;
}while(Y>Y1);
}
return 1;
}
char CElement::Move(int X,int Y,CElement**TabElem,int NumOfElem)
{
if(Movable==no) return 0;
int X1Prev=X1;
int Y1Prev=Y1;
int X2Prev=X2;
int Y2Prev=Y2;
X2=X2-X1+X;
Y2=Y2-Y1+Y;
X1=X;
Y1=Y;
if(!(IsOnBoard()&&IsAreaFree(TabElem,NumOfElem)))
{
X2=X2Prev;
Y2=Y2Prev;
X1=X1Prev;
Y1=Y1Prev;
return 0;
}//sprawdzenie poprawności nowego położenia elementu
for(int i=0;i<InNum;i++)
if(TabPrevElem[i]!=NULL)
{
int TmpX=TabPrevElem[i]->GetXCorner(1);
int TmpY=TabPrevElem[i]->GetYCorner(1);
//potrzebne są współrzędne końca linii
if(TabPrevElem[i]->IsOnBoard())
TabPrevElem[i]->DrawElem(BackgroundColour);
//połączenie zniknie, jeżeli było narysowane
TabPrevElem[i]->MoveEnd(TmpX+X-X1Prev,TmpY+Y-Y1Prev);
if(!TabPrevElem[i]->Autoformat(TabElem,NumOfElem))
{
X2=X2Prev;
Y2=Y2Prev;
X1=X1Prev;
Y1=Y1Prev;
TabPrevElem[i]->MoveEnd(TmpX,TmpY);
for(int j=i-1;j>=0;j--)
if(TabPrevElem[j]!=NULL)
{
int TmpX=TabPrevElem[j]->GetXCorner(1);
int TmpY=TabPrevElem[j]->GetYCorner(1);
//potrzebne są współrzędne końca linii
TabPrevElem[j]->MoveEnd(TmpX-X+X1Prev,TmpY-Y+Y1Prev);
TabPrevElem[j]->Autoformat(TabElem,NumOfElem);
}//ponieważ którejś z linii nie dało się sformatować,
//trzeba przywrócić położenie wcześniej sformatowanych linii
return 0;
}
}
for(i=0;i<OutNum;i++)
if(TabNextElem[i]!=NULL)
{
int TmpX=TabNextElem[i]->GetXCorner();
int TmpY=TabNextElem[i]->GetYCorner();
if(TabNextElem[i]->IsOnBoard())
TabNextElem[i]->DrawElem(BackgroundColour);
//połączenie zniknie, jeżeli było narysowane
TabNextElem[i]->MoveBeg(TmpX+X-X1Prev,TmpY+Y-Y1Prev);
if(!TabNextElem[i]->Autoformat(TabElem,NumOfElem))
{
X2=X2Prev;
Y2=Y2Prev;
X1=X1Prev;
Y1=Y1Prev;
TabNextElem[i]->MoveBeg(TmpX,TmpY);
for(int j=i-1;j>=0;j--)
if(TabPrevElem[j]!=NULL)
{
int TmpX=TabPrevElem[j]->GetXCorner(1);
int TmpY=TabPrevElem[j]->GetYCorner(1);
//potrzebne są współrzędne końca linii
TabPrevElem[j]->MoveBeg(TmpX-X+X1Prev,TmpY-Y+Y1Prev);
TabPrevElem[j]->Autoformat(TabElem,NumOfElem);
}//ponieważ którejś z linii nie dało się sformatować,
//trzeba przywrócić położenie wcześniej sformatowanych linii
for(j=InNum-1;j>=0;j--)
if(TabPrevElem[j]!=NULL)
{
int TmpX=TabPrevElem[j]->GetXCorner(1);
int TmpY=TabPrevElem[j]->GetYCorner(1);
//potrzebne są współrzędne końca linii
TabPrevElem[j]->MoveEnd(TmpX-X+X1Prev,TmpY-Y+Y1Prev);
TabPrevElem[j]->Autoformat(TabElem,NumOfElem);
}//ponieważ którejś z linii nie dało się sformatować,
//trzeba przywrócić położenie wcześniej sformatowanych linii
return 0;
}
}
return 1;
}
void CElement::MoveBeg(int X,int Y)
{}
void CElement::MoveEnd(int X,int Y)
{}
char CElement::LinkNextElem(CElement*NextElem,int X,int Y)
{
if(NextElem->ElementType()!=wire) return 0;
//bramka może być połączona tylko z drutem
if(TabNextElem[0]!=NULL) return 0;//istnieje już element następny
TabNextElem[0]=NextElem;
NextElem->MoveBeg(X1+25,Y1+14);
return 1;
}
char CElement::LinkPrevElem(CElement*PrevElem,int X,int Y)
{
if(PrevElem->ElementType()!=wire) return 0;
//bramka może być połączona tylko z drutem
X-=X1;
Y-=Y1;//zmienne X i Y określają względne położenie
int MinY;
int MaxY;
char Key=0;
int Hight=(Y2-Y1)/InNum;
if((Y2-Y1)/InNum) Key=1;//wysokość jest liczbą nieparzystą
for(int i=0;i<InNum;i++)
{
if(Key!=0)
{
if(Key==1)
{
Hight+=1;
Key=2;
}
else
{
Hight-=1;
Key=1;
}
}
MinY=i*Hight+2;
MaxY=(i+1)*Hight+2;
if(i==InNum-1) MaxY=Y2;
if(Y>=MinY&&Y<=MaxY) break;
}
if(TabPrevElem[i]!=NULL)
for(i=0;i<InNum;i++)
if(TabPrevElem[i]==NULL) break;
if(i==InNum) return 0;
TabPrevElem[i]=PrevElem;
switch(i)
{
case 0:Y=12;break;
case 1:Y=17;break;
}
PrevElem->MoveEnd(X1+3,Y1+Y);
return 1;
}
char CElement::DelNextElem(CElement*DelElem)
{
for(int i=0;i<OutNum;i++)
if(TabNextElem[i]==DelElem)
{
TabNextElem[i]=NULL;
return 1;
}
return 0;
}
char CElement::DelPrevElem(CElement*DelElem)
{
for(int i=0;i<InNum;i++)
if(TabPrevElem[i]==DelElem)
{
TabPrevElem[i]=NULL;
return 1;
}
return 0;
}
int CElement::DeleteConnections(CElement**TabElem,int NumOfElem,char Main)
{
int DelElemNum=1;//trzeba wliczyć także ten element
//funkcja wirtualna jest zdefiniowana w tym miejscu dla bramek i wyjść,
//druty i węzły mają inne ciało funkcji
for(int i=0;i<NumOfElem;i++)
if(this==TabElem[i]) break;//znalezienie indeksu bieżącego elementu
for(int j=i;j<NumOfElem;j++)
TabElem[j]=TabElem[j+1];//wyrzucenie elementu z tabeli
NumOfElem--;//lokalne zmniejszenie wartości - nie ma skutku na zewnątrz
for(i=0;i<InNum;i++)
if(TabPrevElem[i]!=NULL)
{
CElement*Temp=TabPrevElem[i];
DelElemNum+=TabPrevElem[i]->DeleteConnections(TabElem,NumOfElem,1);
delete Temp;
}
for(i=0;i<OutNum;i++)
if(TabNextElem[i]!=NULL)
{
CElement*Temp=TabNextElem[i];
DelElemNum+=TabNextElem[i]->DeleteConnections(TabElem,NumOfElem,1);
delete Temp;
}
return DelElemNum;
}
char CElement::Autoformat(CElement**TabElem,int NumOfElem)
{
return 0;
}
char CElement::SaveElement(CElement**TabElem,int NumOfElem,
FILE*File,char Phase)
{
if(Phase==1)//pierwsza faza zachowywania
{
char Type;
switch(this->ElementType())
{
case and:Type=0;break;
case or:Type=1;break;
case not:Type=2;break;
case nand:Type=3;break;
case nor:Type=4;break;
case xor:Type=5;break;
case output:Type=6;break;
case junction:Type=7;break;
default:return 0;
}
fwrite(&Type,sizeof(char),1,File);
fwrite(&X1,sizeof(int),1,File);
fwrite(&Y1,sizeof(int),1,File);
fwrite(&X2,sizeof(int),1,File);
fwrite(&Y2,sizeof(int),1,File);
fwrite(&InNum,sizeof(int),1,File);
}
else//druga faza zachowywania
{
for(int i=0;i<InNum;i++)
{
int PrevElemPos;
if(TabPrevElem[i]!=NULL)
{
for(int j=0;j<NumOfElem;j++)
if(TabElem[j]==TabPrevElem[i]) break;
//ustalenie indeksu poprzednich elementów
if(j>=NumOfElem) return 0;//błąd - element nie został znaleziony
PrevElemPos=j;
}
else PrevElemPos=-1;//nie ma elementu poprzedniego na i-tej pozycji
fwrite(&PrevElemPos,sizeof(int),1,File);
}
for(i=0;i<OutNum;i++)
{
int NextElemPos;
if(TabNextElem[i]!=NULL)
{
for(int j=0;j<NumOfElem;j++)
if(TabElem[j]==TabNextElem[i]) break;
//ustalenie indeksu poprzednich elementów
if(j>=NumOfElem) return 0;//błąd - element nie został znaleziony
NextElemPos=j;
}
else NextElemPos=-1;//nie ma elementu poprzedniego na i-tej pozycji
fwrite(&NextElemPos,sizeof(int),1,File);
}
}
return 1;
}
char CElement::LoadElement(CElement**TabElem,int NumOfElem,
FILE*File,char Phase)
{
if(Phase==1)//pierwsza faza odczytu
{
if(feof(File)) return 0;
fread(&X1,sizeof(int),1,File);
if(X1<0||X1>639) return 0;
if(feof(File)) return 0;
fread(&Y1,sizeof(int),1,File);
if(Y1<0||Y1>479) return 0;
if(feof(File)) return 0;
fread(&X2,sizeof(int),1,File);
if(X2<0||X2>639) return 0;
if(feof(File)) return 0;
fread(&Y2,sizeof(int),1,File);
if(Y2<0||Y2>479) return 0;
if(feof(File)) return 0;
fread(&InNum,sizeof(int),1,File);
if(InNum>MaxPrevElemNum) return 0;
if(feof(File)) return 0;
}
else//druga faza odczytu
{
for(int i=0;i<InNum;i++)
{
int PrevElemPos;
if(feof(File)) return 0;
fread(&PrevElemPos,sizeof(int),1,File);
if(PrevElemPos>NumOfElem) return 0;
if(PrevElemPos<0)//element nie był połączony
TabPrevElem[i]=NULL;
else TabPrevElem[i]=TabElem[PrevElemPos];
//element był połączony z elementem o odczytanym indeksie
}
for(i=0;i<OutNum;i++)
{
int NextElemPos;
if(feof(File)) return 0;
fread(&NextElemPos,sizeof(int),1,File);
if(NextElemPos>NumOfElem) return 0;
if(NextElemPos<0)//element nie był połączony
TabNextElem[i]=NULL;
else TabNextElem[i]=TabElem[NextElemPos];
//element był połączony z elementem o odczytanym indeksie
}
}
return 1;
}
<file_sep>/SELogicGates/SELogicGates/WIRE.H
#ifndef DefWire
#define DefWire
#include "element.h"
#include "junction.h"
class CWire:public CElement
{
int JunctionNum;
CJunction*TabJunction[MaxJunctionNum];
int BreakpointsNum;
int TabBreakpoints[MaxBreakpointsNum][2];
char FormatJunctions(CElement**TabElem,int NumOfElem);
char FormatLine(int i,CElement**TabElem,int NumOfElem);
char Check(CElement**TabElem,int NumOfElem);
public:
void DrawElem(int Colour=0);
TOutput GetOutput(int AskElemNum,int MaxNum) ;
int IsYourArea(int X,int Y);
char IsElemNext(CElement*Element);
int IsOnBoard();
void ClickElement();
char LinkNextElem(CElement*NextElem,int X,int Y);
char LinkPrevElem(CElement*PrevElem,int X,int Y);
TElementType ElementType();
void MoveBeg(int X,int Y);//przesuwanie początku
void MoveEnd(int X,int Y);//przesuwanie końca
char Autoformat(CElement**TabElem,int NumOfElem);
char DelNextElem(CElement*DelElem);
int DeleteConnections(CElement**TabElem,int NumOfElem,char Main);
char SaveElement(CElement**TabElem,int NumOfElem,FILE*File,char Phase);
char LoadElement(CElement**TabElem,int NumOfElem,FILE*File,char Phase);
CWire(int X,int Y,int Colour=0,char FromJunction=0,CElement*PrevWire=NULL);
~CWire();
};
#endif<file_sep>/SELogicGates/SELogicGates/GATE.H
#ifndef DefGate
#define DefGate
#include <dos.h>
#include <string.h>
#include <conio.h>
#include <stdio.h>
#include <io.h>
#include <SYS\STAT.H>
#include <graphics.h>
#include <alloc.h>
#include <malloc.h>
#include <process.h>
#define BackSpace 8
#define Enter 13
#define Esc 27
#define MenuButNum 9
#define ButNum 16
#define HighColour 4
#define LowColour 1
#define ErrorColour 2
#define BasketColour 1
#define FrameColour 7
#define BackgroundColour 15
#define HeadingColour 1
#define HeadingTextColour 15
#define LineColour 16
#define InsertTextColour 12
#define CustomTextColour 16
#define NumberOfInBuses 6
#define NumberOfImages 8
#define MaxBreakpointsNum 4
#define MaxJunctionNum 10
#define MaxBusJunctionNum 30
#define MaxNumOfElem 100
#define MaxWinNum 99
#define MaxNextElemNum 1
#define MaxPrevElemNum 2
#define MaxSmallWinLinesNum 4
enum TElementType{and,or,not,nor,nand,xor,output,wire,junction,inbus,cbus};
void InitGraph(char *path="f:/borlandc/bgi");
int CheckMouse();
void FirstInfo();
char ConfirmQuit();
main();
#endif<file_sep>/SELogicGates/SELogicGates/NOR.CPP
#include "nor.h"
#include "gate.h"
CNor::CNor(int X,int Y,int Colour)
{
X1=X;
Y1=Y;
X2=X+25;
Y2=Y+25;
InNum=2;
OutNum=1;
for(int i=0;i<InNum;i++)
TabPrevElem[i]=NULL;
for(i=0;i<OutNum;i++)
TabNextElem[i]=NULL;
Output=error;
Movable=yes;
}
void CNor::DrawElem(int Colour)
{
if(Colour==0)
{
switch(Output)
{
case low:Colour=LowColour;break;
case high:Colour=HighColour;break;
case error:Colour=ErrorColour;break;
}
}
setcolor(Colour);
arc(X1+3,Y1+14,315,54,9);//łuk z lewej
line(X1+3,Y1+12,X1+10,Y1+12);//we g.
line(X1+3,Y1+17,X1+10,Y1+17);//we d.
arc(X1+8,Y1+14,270,90,8);//łuk z prawej
circle(X1+18,Y1+14,2);//negacja
line(X1+21,Y1+14,X1+24,Y1+14);//wyjście
}
TOutput CNor::GetOutput(int AskElemNum,int MaxNum)
{
if(AskElemNum==MaxNum) return Output;
//rekurencja wpadła w pętlę sprzężenia zwrotnego
if(Output==error) Output=low;//wartość wyjściowa
TOutput Value=low;
for(int i=0;i<InNum;i++)
{
if(TabPrevElem[i]==NULL)
Output=error;
else
{
TOutput TmpValue=TabPrevElem[i]->GetOutput(AskElemNum+1,MaxNum);
if(TmpValue==error)
Output=error;
else Value+=TmpValue;
if(Value>1) Value=1;
}
}
if(Value==low) Value=high;
else Value=low;
if(Output!=error) Output=Value;
return Output;
}
TElementType CNor::ElementType()
{
return nor;
}
void CNor::ClickElement()
{}
<file_sep>/SELogicGates/SELogicGates/WINDOW.CPP
#include "window.h"
#include "smallwin.h"
#include "constbus.h"
#include "inbus.h"
#include "menubut.h"
#include "modebut.h"
#include "gate.h"
#include "and.h"
#include "or.h"
#include "not.h"
#include "nand.h"
#include "nor.h"
#include "xor.h"
#include "output.h"
#include "wire.h"
CWindow::CWindow(int Number,char IsPrev,char IsNext,char NewPossib,char IsNew)
{
setactivepage(1);
Active=1;
Result=1;
NumOfElem=NumberOfInBuses+2;//szyny wejściowe
WinNum=Number;
Mode=move;
StandardPath=NULL;
for(int i=0;i<NumberOfInBuses+2;i++)
TabElem[i]=NULL;
TabElem[0]=new CConstBus(145,447,0);
TabElem[1]=new CConstBus(145,462,1);
TabElem[2]=new CInBus(41,45,'a');
TabElem[3]=new CInBus(56,45,'b');
TabElem[4]=new CInBus(71,45,'c');
TabElem[5]=new CInBus(86,45,'d');
TabElem[6]=new CInBus(101,45,'e');
TabElem[7]=new CInBus(116,45,'f');
for(i=0;i<ButNum;i++)
TabBut[i]=NULL;
TabBut[0]=new CMenuButton("Load",30,22,90,39);
TabBut[1]=new CMenuButton("New",100,22,160,39);
if(!NewPossib) TabBut[1]->SetActivity(0);
TabBut[2]=new CMenuButton("Prev",170,22,230,39);
if(!IsPrev) TabBut[2]->SetActivity(0);
TabBut[3]=new CMenuButton("Next",240,22,300,39);
if(!IsNext) TabBut[3]->SetActivity(0);
TabBut[4]=new CMenuButton("Save",310,22,370,39);
TabBut[5]=new CMenuButton("Save As",380,22,440,39);
TabBut[6]=new CMenuButton("Close",450,22,510,39);
TabBut[7]=new CMenuButton("Info",520,22,580,39);
TabBut[8]=new CMenuButton("Move",170,42,370,59);
//stworzenie przycisków menu
unsigned ImageSize=imagesize(2,61,28,90);//rozmiar jest stały
for(i=0;i<ButNum-MenuButNum;i++) ImageTab[i]=new [ImageSize];
TabBut[MenuButNum]=new CModeButton(and,2,61,28,90);
TabBut[MenuButNum]->DrawButton();
getimage(2,61,28,90,ImageTab[0]);
TabBut[MenuButNum+1]=new CModeButton(or,2,101,28,130);
TabBut[MenuButNum+1]->DrawButton();
getimage(2,101,28,130,ImageTab[1]);
TabBut[MenuButNum+2]=new CModeButton(not,2,141,28,170);
TabBut[MenuButNum+2]->DrawButton();
getimage(2,141,28,170,ImageTab[2]);
TabBut[MenuButNum+3]=new CModeButton(nand,2,181,28,210);
TabBut[MenuButNum+3]->DrawButton();
getimage(2,181,28,210,ImageTab[3]);
TabBut[MenuButNum+4]=new CModeButton(nor,2,221,28,250);
TabBut[MenuButNum+4]->DrawButton();
getimage(2,221,28,250,ImageTab[4]);
TabBut[MenuButNum+5]=new CModeButton(xor,2,261,28,290);
TabBut[MenuButNum+5]->DrawButton();
getimage(2,261,28,290,ImageTab[5]);
TabBut[MenuButNum+6]=new CModeButton(output,2,301,28,330);
TabBut[MenuButNum+6]->DrawButton();
getimage(2,301,28,330,ImageTab[6]);
setfillstyle(1,FrameColour);
ImageSize=imagesize(100,155,168,170);
ImageTab[NumberOfImages-1]=new [ImageSize];
bar(100,155,168,170);
outtextxy(107,160,"Linking");
getimage(100,155,168,170,ImageTab[NumberOfImages-1]);
//ikona łączenia elementów jest ostatnia w tablicy
for(i=0;i<ButNum-MenuButNum;i++)
{
putimage(0,0,ImageTab[i],4);
getimage(0,0,26,29,ImageTab[i]);
}//negacja ikon elementów
putimage(0,0,ImageTab[NumberOfImages-1],4);
getimage(0,0,68,15,ImageTab[NumberOfImages-1]);
setactivepage(0);
if(!IsNew)
{
char Path[15];
strcpy(Path,"win");
DoText(WinNum,Path);
strcat(Path,".tmp");
if(Load(Path)!=1) Error(0);
if(unlink(Path)==-1) Error(0);
for(int i=0;i<NumOfElem;i++)
TabElem[i]->GetOutput(0,NumOfElem);
}//gdy okno nie jest nowe, to zostanie odtworzony jego poprzedni stan
if(!IsPrev&&!IsNext&&IsNew) DrawWin(1);
//jest to pierwsze otwierane okno
else DrawWin(0);//narysowanie tylko elementów zmieniających się
}
CWindow::~CWindow()
{
for(int i=0;i<NumOfElem;i++)
delete TabElem[i];
for(i=0;i<=MenuButNum+6;i++)
delete TabBut[i];
if(StandardPath!=NULL)
delete StandardPath;
for(i=0;i<ButNum-MenuButNum+1;i++) delete ImageTab[i];
}
char CWindow::Work()
{
struct REGPACK reg;
reg.r_ax=0x1;
intr(0x33,®);//pokazanie kursora myszy
reg.r_ax=0xf;
reg.r_cx=0x10;
reg.r_dx=0x10;
intr(0x33,®);//ustawienie szybkości
do
{
reg.r_ax=0x3;
intr(0x33,®);
if(reg.r_bx&1) React(reg.r_cx,reg.r_dx);
}while(Active);
reg.r_ax=0x2;
intr(0x33,®);//schowanie kursora myszy
if(Result!=0)
{
char Path[15];
strcpy(Path,"win");
DoText(WinNum,Path);
strcat(Path,".tmp");
if(Save(Path)!=1) Error(0);
}
return Result;
}
void CWindow::React(int X,int Y)
{
struct REGPACK reg;
CheckElements(X,Y);
CheckButtons(X,Y);
do
{
reg.r_ax=0x3;
intr(0x33,®);
}while(reg.r_bx&1);//blokada-nic się nie dzieje, gdy klawisz myszy
//został wciśnięty na pustym polu
if(Active==0) return;
reg.r_ax=0x2;
intr(0x33,®);//schowanie kursora
for(int i=0;i<NumOfElem;i++)
TabElem[i]->GetOutput(0,NumOfElem);
for(i=0;i<NumOfElem;i++)
TabElem[i]->DrawElem();
//odświerzenie elementów
if(NumOfElem>=MaxNumOfElem)
{
TabBut[MenuButNum-1]->ChangeText("Move");
Mode=block;
for(i=MenuButNum-1;i<ButNum;i++)
TabBut[i]->SetActivity(0);
}//zablokowanie klawiszy-za duzo elementów
else if(Mode==block)
{
Mode=move;
for(i=MenuButNum-1;i<ButNum;i++)
TabBut[i]->SetActivity(1);
}//odlokowanie klawiszy - można tworzyć nowe elementy
reg.r_ax=0x1;
intr(0x33,®);//pokazanie kursora
}
void CWindow::CheckButtons(int X,int Y)
{
struct REGPACK reg;
for(int i=0;i<ButNum;i++)//sprawdzenie przycisków
if(i<MenuButNum&&TabBut[i]->IsYourArea(X,Y))//gdy jest to klawisz menu
{
if(TabBut[i]->ClickButton())
{
reg.r_ax=0x2;
intr(0x33,®);//schowanie myszy
Action(i);//wykonanie funkcji przycisku
reg.r_ax=0x1;//pokazanie myszy
intr(0x33,®);
}
break;//kolejne przyciski już nie będą sprawdzane(oszczędność czasu)
}//sprawdzenie, czy został naciśnięty przycisk
else if(i>=MenuButNum&&TabBut[i]->IsYourArea(X,Y)&&
TabBut[i]->ClickButton()) NewElement(i);
//gdy jest to klawisz elementu i reaguje
}
void CWindow::CheckElements(int X,int Y)
{
struct REGPACK reg;
for(int i=0;i<NumOfElem;i++)
if(TabElem[i]->IsYourArea(X,Y))
if((Mode==move||Mode==block)||
(i<NumberOfInBuses+2&&i>1&&(X<=150&&(Y<60||Y>440))))
//zawsze można zmienić stan szyny wejściowej
{
TElementType ButtonType=TabElem[i]->ElementType();
int ImageNum;
switch(ButtonType)
{
case and:ImageNum=0;break;
case or:ImageNum=1;break;
case not:ImageNum=2;break;
case nand:ImageNum=3;break;
case nor:ImageNum=4;break;
case xor:ImageNum=5;break;
case output:ImageNum=6;break;
case wire:return;//nic się nie dzieje
case inbus:TabElem[i]->ClickElement();return;
//akcja wykonana zostanie na poziomie wywołanej funkcji
case cbus:return;//nic się nie dzieje
}
reg.r_ax=0x2;
intr(0x33,®);//schowanie kursora
int X1=TabElem[i]->GetXCorner();
int Y1=TabElem[i]->GetYCorner();//zachowanie poprzedniej pozycji
int Colour=BackgroundColour;
if(TabElem[i]->ElementType()==output) Colour=FrameColour;
//wyjście leży na szarym pasku
TabElem[i]->DrawElem(Colour);//element "znika"
DragElement(ImageNum,i);
reg.r_ax=0x1;
intr(0x33,®);//pokazanie kursora
return;
}
else
{
int ImageNum=NumberOfImages-1;
int XMove;
int YMove;
reg.r_ax=0x3;
intr(0x33,®);//odczytanie stanu myszy
if(reg.r_cx>561) XMove=-68;
else XMove=10;
if(reg.r_dx>454) YMove=-15;
else YMove=10;
int X1=X+XMove;
int Y1=Y+YMove;
reg.r_ax=0x2;
intr(0x33,®);//schowanie kursora
putimage(X1,Y1,ImageTab[ImageNum],1);
reg.r_ax=0x1;
intr(0x33,®);//pokazanie kursora
do
{
reg.r_ax=0x3;
intr(0x33,®);//odczytanie stanu myszy
if(X1!=reg.r_cx+XMove||Y1!=reg.r_dx+YMove)
{
if(reg.r_cx>561) XMove=-68;
else XMove=10;
if(reg.r_dx>454) YMove=-15;
else YMove=10;
reg.r_ax=0x2;
intr(0x33,®);//schowanie kursora
putimage(X1,Y1,ImageTab[ImageNum],1);
//skasowanie ikony
X1=reg.r_cx+XMove;
Y1=reg.r_dx+YMove;
putimage(X1,Y1,ImageTab[ImageNum],1);
//narysowanie ikony w nowym położeniu
reg.r_ax=0x1;
intr(0x33,®);//pokazanie kursora
}
}while(reg.r_bx&1);
reg.r_ax=0x2;
intr(0x33,®);//schowanie kursora
putimage(X1,Y1,ImageTab[ImageNum],1);
//skasowanie ikony
reg.r_ax=0x1;
intr(0x33,®);//pokazanie kursora
X1-=XMove;
Y1-=YMove;//przywrócenie wartości odpowiadających położeniu kursora
for(int j=NumberOfInBuses+1;j<NumOfElem;j++)
if(TabElem[j]->IsYourArea(X1,Y1))
{
LinkElem(TabElem[i],X,Y,TabElem[j],X1,Y1);
return;
}
}
}
void CWindow::Action(int ActNum)
{
switch(ActNum)
{
case 0:Error(Load());break;//odczyt z pliku
case 1:New();break;//nowy element
case 2:Previous();break;//poprzedni element
case 3:Next();break;//następny element
case 4:Error(Save(StandardPath));break;//zachowanie sieci
case 5:Error(Save());break;//zachowanie sieci w nowym pliku
case 6:Exit();break;//koniec programu
case 7:Info();break;//wyświetlenie informacji
case 8:MoveOrLink();break;//przełączanie
}
}
char CWindow::Load(char*Path)
{
REGPACK reg;
CSmallWindow*PathWin;
char PathFlag=1;
//flaga mówiąca, czy ścieżka została podana przy wywołaniu funkcji
if(Path==NULL)
{
PathFlag=0;
char*TabText[3];
TabText[0]=strdup("Give file name:");
TabText[1]=NULL;
PathWin=new CSmallWindow(200,150,0,0,"Loading",TabText,1,2);
if(!PathWin->Work())
{
reg.r_ax=0x2;
intr(0x33,®);//schowanie kursora
setfillstyle(1,BackgroundColour);
bar(200,150,400,300);
reg.r_ax=0x1;
intr(0x33,®);//pokazanie kursora
delete PathWin;
delete TabText[0];
return 2;//użytkownik zrezygnował z opcji
}
reg.r_ax=0x2;
intr(0x33,®);//schowanie kursora
setfillstyle(1,BackgroundColour);
bar(200,150,400,300);
reg.r_ax=0x1;
intr(0x33,®);//pokazanie kursora
Path=new char[PathWin->GetReadTextLength()+4];
if(!PathWin->GetReadText(Path)) Path=NULL;
delete TabText[0];
delete PathWin;
strcat(Path,".lci");
}
if(Path==NULL) return 0;
FILE*File=NULL;
if((File=fopen(Path,"rb"))==NULL)
//otwarcie pliku do odczytu
{
delete Path;
return -1;
}
if(PathFlag==0) delete Path;
for(int i=0;i<NumOfElem;i++)
delete TabElem[i];
fread(&NumOfElem,sizeof(int),1,File);
//odczytanie ilości elementów
if(NumOfElem>MaxNumOfElem) return 0;
if(feof(File)) return 0;
for(i=0;i<NumOfElem;i++)
{
char Type;
fread(&Type,sizeof(char),1,File);
if(feof(File)) return 0;
switch(Type)
{
case 0:TabElem[i]=new CAnd(0,0);break;
case 1:TabElem[i]=new COr(0,0);break;
case 2:TabElem[i]=new CNot(0,0);break;
case 3:TabElem[i]=new CNand(0,0);break;
case 4:TabElem[i]=new CNor(0,0);break;
case 5:TabElem[i]=new CXor(0,0);break;
case 6:TabElem[i]=new COutput(0,0);break;
case 7:return 0;
//węzły są odczytywane przez druty
case 8:TabElem[i]=new CWire(0,0);break;
case 9:TabElem[i]=new CInBus(0,0,0);break;
case 10:TabElem[i]=new CConstBus(0,0,0);break;
default:return 0;
}//przydzielenie pamięci dla odczytywanego elementu
if(!TabElem[i]->LoadElement(TabElem,NumOfElem,File,1)) return 0;
//odczytanie danych elementu w pierwszej fazie
}
for(i=0;i<NumOfElem;i++)
if(!TabElem[i]->LoadElement(TabElem,NumOfElem,File,2)) return 0;
//odczytanie każdego elementu w drugiej fazie
//odpowiedzialnej za utworzenie połączeń
fclose(File);
setcolor(BackgroundColour);
setfillstyle(1,BackgroundColour);
bar(31,61,610,440);
setcolor(FrameColour);
setfillstyle(1,FrameColour);
bar(31,441,610,478);
bar(611,21,638,478);
return 1;
}
void CWindow::New()
{
Active=0;
Result=2;
}
void CWindow::Previous()
{
Active=0;
Result=-1;
}
void CWindow::Next()
{
Active=0;
Result=1;
}
char CWindow::Save(char*Path)
{
REGPACK reg;
char PathFlag=1;
//flaga mówiąca, czy ścieżka została podana przy wywołaniu funkcji
if(Path==NULL)
{
PathFlag=0;
CSmallWindow*PathWin;
char*TabText[3];
TabText[0]=strdup("Give file name:");
TabText[1]=NULL;
PathWin=new CSmallWindow(200,150,0,0,"Saving",TabText,1,2);
if(!PathWin->Work())
{
reg.r_ax=0x2;
intr(0x33,®);//schowanie kursora
setfillstyle(1,BackgroundColour);
bar(200,150,400,300);
reg.r_ax=0x1;
intr(0x33,®);//pokazanie kursora
delete PathWin;
delete TabText[0];
return 1;//użytkownik zrezygnował
}
reg.r_ax=0x2;
intr(0x33,®);//schowanie kursora
setfillstyle(1,BackgroundColour);
bar(200,150,400,300);
reg.r_ax=0x1;
intr(0x33,®);//pokazanie kursora
Path=new char[PathWin->GetReadTextLength()+4];
if(!PathWin->GetReadText(Path)) Path=NULL;
delete TabText[0];
delete PathWin;
if(Path==NULL) return 0;
strcat(Path,".lci");
if(StandardPath!=NULL) delete StandardPath;
StandardPath=strdup(Path);
}//użytkownik podaje ścieżkę dostępu
FILE*File=NULL;
if((File=fopen(Path,"wb"))==NULL)
{
creat(Path,S_IREAD|S_IWRITE);
File=fopen(Path,"wb");
}//otwarcie pliku do zapisu i odczytu
if(PathFlag==0) delete Path;
fwrite(&NumOfElem,sizeof(int),1,File);
//zachowanie ilości elementów
for(int i=0;i<NumOfElem;i++)
if(!TabElem[i]->SaveElement(TabElem,NumOfElem,File,1)) return 0;
//zachowanie każdego elementu w pierwszej fazie
for(i=0;i<NumOfElem;i++)
if(!TabElem[i]->SaveElement(TabElem,NumOfElem,File,2)) return 0;
//zachowanie każdego elementu w drugiej fazie
fclose(File);
return 1;
}
void CWindow::Exit()
{
Result=0;
Active=0;
}
void CWindow::Info()
{
char*TabText[4];
TabText[0]=new char[40];
TabText[1]=new char[40];
TabText[2]=new char[40];
TabText[3]=new char[40];
strcpy(TabText[0],"A");
for(int i=0;i<5;i++) TabText[1][i]=' ';
TabText[1][i]='\x0';
strcat(TabText[1],"B");
for(i=0;i<5;i++) TabText[2][i]=' ';
TabText[2][i]='\x0';
strcat(TabText[2],"C");
for(i=0;i<5;i++) TabText[3][i]=' ';
TabText[3][i]='\x0';
strcat(TabText[3],"D");
CSmallWindow*Window=new CSmallWindow(155,130,470,0,"Information",
TabText,0,1);
Window->Work();
delete Window;
delete TabText[0];
delete TabText[1];
delete TabText[2];
delete TabText[3];
REGPACK reg;
reg.r_ax=0x2;
intr(0x33,®);//schowanie kursora
setfillstyle(1,BackgroundColour);
bar(155,130,470,300);//zamalowanie okienka
reg.r_ax=0x1;
intr(0x33,®);//pokazanie kursora
}
void CWindow::MoveOrLink()
{
if(Mode==block) return;
if(Mode==move)
{
Mode=link;
TabBut[MenuButNum-1]->ChangeText("Link");
return;
}
Mode=move;
TabBut[MenuButNum-1]->ChangeText("Move");
}
void CWindow::NewElement(int ElemNum)
{
struct REGPACK reg;
reg.r_ax=0x2;
intr(0x33,®);//wyłączenie
reg.r_ax=0x3;
intr(0x33,®);//sprawdzenie stanu
int ImageNum;//numer bitmapy w tabeli
switch(ElemNum)
{
case MenuButNum:TabElem[NumOfElem]=new CAnd(reg.r_cx,reg.r_dx);
ImageNum=0;break;
case MenuButNum+1:TabElem[NumOfElem]=new COr(reg.r_cx,reg.r_dx);
ImageNum=1;break;
case MenuButNum+2:TabElem[NumOfElem]=new CNot(reg.r_cx,reg.r_dx);
ImageNum=2;break;
case MenuButNum+3:TabElem[NumOfElem]=new CNand(reg.r_cx,reg.r_dx);
ImageNum=3;break;
case MenuButNum+4:TabElem[NumOfElem]=new CNor(reg.r_cx,reg.r_dx);
ImageNum=4;break;
case MenuButNum+5:TabElem[NumOfElem]=new CXor(reg.r_cx,reg.r_dx);
ImageNum=5;break;
case MenuButNum+6:TabElem[NumOfElem]=new COutput(reg.r_cx,reg.r_dx);
ImageNum=6;break;
}
if(DragElement(ImageNum,NumOfElem))
NumOfElem++;
else delete TabElem[NumOfElem];
reg.r_ax=0x1;
intr(0x33,®);//pokazanie kursora
}
void CWindow::LinkElem(CElement*FirstElem,int X1,int Y1,
CElement*NextElem,int X2,int Y2)
{
if(FirstElem==NextElem) return;
CWire*Linker=new CWire(0,0);
TabElem[NumOfElem]=Linker;
if(FirstElem->LinkNextElem(Linker,X1,Y1)&&
NextElem->LinkPrevElem(Linker,X2,Y2)&&
Linker->LinkPrevElem(FirstElem,X1,Y1)&&
Linker->LinkNextElem(NextElem,X2,Y2)&&
Linker->Autoformat(TabElem,NumOfElem)) NumOfElem++;
else
{
FirstElem->DelNextElem(Linker);
NextElem->DelPrevElem(Linker);
delete Linker;
TabElem[NumOfElem]=NULL;
}
}
void CWindow::DeleteElem(int ElemNum)
{
CElement*DelElemPoint=TabElem[ElemNum];
int DelElemNum=TabElem[ElemNum]->DeleteConnections(TabElem,NumOfElem);
delete DelElemPoint;
NumOfElem-=DelElemNum;
}
char CWindow::DragElement(int ImageNum,int ElemNum)
{
struct REGPACK reg;
int X=-1;
int Y=-1;
reg.r_ax=0x3;
intr(0x33,®);//sprawdzenie stanu
int XDif=TabElem[ElemNum]->GetXCorner()-reg.r_cx;
int YDif=TabElem[ElemNum]->GetYCorner()-reg.r_dx;
reg.r_ax=0x4;
reg.r_cx=TabElem[ElemNum]->GetXCorner();
reg.r_dx=TabElem[ElemNum]->GetYCorner();
intr(0x33,®);//ustawienie kursora myszy w prawym górnym rogu
do
{
reg.r_ax=0x3;
intr(0x33,®);//sprawdzenie stanu
if(reg.r_cx>613||reg.r_dx>450)
{
if(reg.r_cx>613) reg.r_cx=613;
if(reg.r_dx>450) reg.r_dx=450;
reg.r_ax=0x4;
intr(0x33,®);//wyrównanie do brzegu
}
if(reg.r_cx!=X||reg.r_dx!=Y)
{
putimage(X,Y,ImageTab[ImageNum],1);
//zmazanie elementu
putimage(reg.r_cx,reg.r_dx,ImageTab[ImageNum],1);
//narysowanie elementu w nowym położeniu
X=reg.r_cx;
Y=reg.r_dx;
}
}while(reg.r_bx&1);
putimage(reg.r_cx,reg.r_dx,ImageTab[ImageNum],1);
if(reg.r_cx<28&®.r_dx<430&®.r_dx>370) DeleteElem(ElemNum);
else
if(!TabElem[ElemNum]->Move(reg.r_cx,reg.r_dx,TabElem,NumOfElem))
{
reg.r_ax=0x4;
reg.r_cx=reg.r_cx-XDif;
reg.r_dx=reg.r_dx-YDif;
intr(0x33,®);//ustawienie kursora myszy w pierwotnym położeniu
return 0;
}
reg.r_ax=0x4;
reg.r_cx=reg.r_cx-XDif;
reg.r_dx=reg.r_dx-YDif;
intr(0x33,®);//ustawienie kursora myszy w pierwotnym położeniu
return 1;
}
void CWindow::DoText(int Number,char*Text)
{
int i=0;
char TmpText[4];
do
{
TmpText[i]=(char)(Number%10+48);
Number/=10;
i++;
}while(Number>0);
TmpText[i]='\0';
int TextLen=strlen(Text);
for(int j=i;j>0;j--)
Text[i-j+TextLen]=TmpText[j-1];
Text[i+TextLen]='\0';
}
void CWindow::DrawWin(char Mode)
{
if(Mode==1)//rysowanie całego okna
{
setfillstyle(1,BackgroundColour);
setcolor(BackgroundColour);
line(0,0,0,479);
line(639,0,639,479);
line(0,479,639,479);
line(0,0,639,0);//rysowanie ramki
setfillstyle(1,FrameColour);
bar(1,21,638,60);//pasek na górze
bar(1,478,30,61);//pasek z lewej
DrawBasket(3,400);//kosz
}
setcolor(BackgroundColour);
setfillstyle(1,BackgroundColour);
bar(31,61,610,440);//okno główne
setcolor(FrameColour);
setfillstyle(1,FrameColour);
bar(1,478,638,441);//pasek na dole
bar(611,451,638,61);//pasek z prawej
setfillstyle(1,HeadingColour);
bar(1,1,638,20);//pasek górny
setcolor(HeadingTextColour);
char Text[12]="WINDOW ";
for(int i=7;i<10;i++)
Text[i]='\0';
DoText(WinNum,Text);
outtextxy(300,10,Text);
for(i=0;i<ButNum;i++)
TabBut[i]->DrawButton();
for(i=0;i<NumOfElem;i++)
TabElem[i]->DrawElem();
}
void CWindow::DrawBasket(int X,int Y)
{
setcolor(LineColour);
line(X,Y,X,Y+30);
line(X,Y+30,X+26,Y+30);
line(X+26,Y+30,X+26,Y);
line(X+26,Y,X,Y);//ramka
setcolor(BasketColour);
setfillstyle(1,BasketColour);
bar(X+6,Y+26,X+20,Y+28);//podstawa
line(X+6,Y+26,X+2,Y+4);
line(X+20,Y+26,X+24,Y+4);//długie linie pionowe
line(X+8,Y+10,X+9,Y+26);
line(X+13,Y+10,X+13,Y+26);
line(X+18,Y+10,X+17,Y+26);//krótsze linie pionowe
line(X+4,Y+10,X+22,Y+10);
line(X+5,Y+14,X+21,Y+14);
line(X+5,Y+18,X+21,Y+18);
line(X+6,Y+22,X+20,Y+22);//linie poprzeczne
}
void CWindow::Error(int ErrorNum)
{
if(ErrorNum>0) return;
char*TabText[3];
TabText[0]=new char[30];
CSmallWindow*Window;
if(ErrorNum==-1)
{
strcpy(TabText[0],"Opening file error!");
TabText[1]=new char[30];
strcpy(TabText[1],"File may not exist...");
TabText[2]=NULL;
Window=new CSmallWindow(170,150,430,0,"Error!",
TabText,0,1);
}
else
{
strcpy(TabText[0],"All information will be lost!");
TabText[1]=NULL;
Window=new CSmallWindow(170,150,430,0,"Critical error!",
TabText,0,1);
}
Window->Work();
REGPACK reg;
reg.r_ax=0x2;
intr(0x33,®);//schowanie kursora
setfillstyle(1,BackgroundColour);
bar(170,150,430,300);//zamalowanie okienka
reg.r_ax=0x1;
intr(0x33,®);//pokazanie kursora
delete Window;
delete TabText[0];
delete TabText[1];
if(ErrorNum==-1)
{
delete TabText[2];
return;
}
closegraph();
exit(1);
}
<file_sep>/SELogicGates/SELogicGates/SMALLWIN.H
#ifndef DefSmallWindow
#define DefSmallWindow
#include "element.h"
#include "menubut.h"
class CSmallWindow
{
char Active;
char Result;
int X1;
int Y1;
int X2;
int Y2;
int LinesNum;
int ButtonNum;
char Reading;
char*HeadingText;
char*ConstText[MaxSmallWinLinesNum];
char*ReadText;
CMenuButton*TabBut[2];
void React(int X,int Y);//reakcja na przyciśnięcie klawisza myszki
void Read();//wczytuje znaki z klawiatury
void CheckButtons(int X,int Y);//sprawdzenie przycisków przy naciśnięciu myszki
void DrawSmallWin();
void Action(int ActNum);
public:
char Work();//obsluga myszki
CSmallWindow(int X1,int Y1,int X2, int Y2,char*HeadingText,char**ConstText,
char Reading,int ButtonNum,char*FirstButtonText=NULL,
char*SecondButtonText=NULL);
int GetReadTextLength();
char GetReadText(char*ReadText);
~CSmallWindow();
};
#endif<file_sep>/SELogicGates/SELogicGates/MENUBUT.CPP
#include "menubut.h"
#include "gate.h"
CMenuButton::CMenuButton(char*Text,int X1,int Y1,int X2,int Y2)
{
DrawingColour=16;
ButtonColour=FrameColour;
Insert=false;
Active=on;
this->X1=X1;
this->X2=X2;
this->Y1=Y1;
this->Y2=Y2;
ButtonText=NULL;
ButtonText=strdup(Text);
};
CMenuButton::~CMenuButton()
{
delete ButtonText;
}
void CMenuButton::DrawButton()
{
setfillstyle(1,LineColour);
setcolor(LineColour);
line(X1,Y1,X2,Y1);
line(X2,Y1,X2,Y2);
line(X2,Y2,X1,Y2);
line(X1,Y2,X1,Y1);
setfillstyle(1,ButtonColour);
bar(X1+1,Y1+1,X2-1,Y2-1);
setfillstyle(1,DrawingColour);
setcolor(DrawingColour);
int X;
int Y;
if(X2-X1<20) X=X1+2;
else X=(int)(X1+X2)/2-(strlen(ButtonText)/2)*9;
if(Y2-Y1<15) Y=Y1+2;
else Y=(Y1+Y2)/2-3;
outtextxy(X,Y,ButtonText);
}
void CMenuButton::ChangeText(char*Text)
{
delete ButtonText;
ButtonText=NULL;
ButtonText=strdup(Text);
this->DrawButton();
}
int CMenuButton::ClickButton()
{
if(Active==off) return 0;
struct REGPACK reg;
reg.r_ax=0x2;
intr(0x33,®);//schowanie myszy
this->ChangeInsertMode();//zmiana
reg.r_ax=0x1;//pokazanie myszy
intr(0x33,®);
int ButtonArea=1;//flaga=1, gdy kursor jest na przycisku
do
{
reg.r_ax=0x3;
intr(0x33,®);//sprawdzenie
if(!ButtonArea&&this->IsYourArea(reg.r_cx,reg.r_dx))
{
reg.r_ax=0x2;
intr(0x33,®);//schowanie myszy
this->ChangeInsertMode();//wciśnięcie
reg.r_ax=0x1;//pokazanie myszy
intr(0x33,®);
ButtonArea=1;
}//kursor wszedł na pole przycisku
if(ButtonArea&&!(this->IsYourArea(reg.r_cx,reg.r_dx)))
{
reg.r_ax=0x2;
intr(0x33,®);//schowanie myszy
this->ChangeInsertMode(1);//puszczenie
reg.r_ax=0x1;//pokazanie myszy
intr(0x33,®);
ButtonArea=0;
}//kursor opuścił pole przycisku
reg.r_ax=0x3;
intr(0x33,®);
}while(reg.r_bx&1);
//pętla powtarza się, gdy klawisz myszy jest wciśnięty
if(this->IsYourArea(reg.r_cx,reg.r_dx))
//gdy klawisz został puszczony na terenie przycisku
{
reg.r_ax=0x2;
intr(0x33,®);//schowanie myszy
this->ChangeInsertMode(1);//puszczenie
reg.r_ax=0x1;//pokazanie myszy
intr(0x33,®);
return 1;//wykonać akcję przycisku
}
reg.r_ax=0x2;
intr(0x33,®);//schowanie myszy
this->ChangeInsertMode(1);//wyłączenie przycisku
reg.r_ax=0x1;//pokazanie myszy
intr(0x33,®);
return 0;//nic nie robić
}
<file_sep>/SELogicGates/SELogicGates/MENUBUT.H
#ifndef DefMenuBut
#define DefMenuBut
#include "gate.h"
#include "button.h"
class CMenuButton:public CButton
{
char*ButtonText;
public:
void DrawButton();
void ChangeText(char*Text);
int ClickButton();
CMenuButton(char*Text,int X1,int Y1,int X2,int Y2);
~CMenuButton();
};
#endif<file_sep>/SELogicGates/SELogicGates/GATE.CPP
#include "gate.h"
#include "window.h"
//Funkcje dodatkowe
void InitGraph(char *path="f:/borlandc/bgi")
{
int gdriver = DETECT, gmode, errorcode;
initgraph(&gdriver,&gmode,path);//"c:/borlandc/bgi");
errorcode=graphresult();
if(errorcode)
{
gotoxy(23,8);
printf("Graphic's error has appeared!");
gotoxy(12,10);
printf("While running this programm please write an access path");
gotoxy(27,12);
printf("to a file \"egavga.bgi\".");
gotoxy(25,20);
printf("Press any key to continue...");
getch();
}
}
int CheckMouse()
{
struct REGPACK reg;
reg.r_ax=0x0;
intr(0x33,®);
if(reg.r_ax==0)
{
printf("\n\n\t\tError!!!\n\n\tMouse not installed!!!");
return 0;
}
return 1;
}
void Control()
{
int CurrentWinNum=0;//numer aktualnie otwartego okna
int TotalWinNum=1;//ilość wszystkich otwartych okien
char NewPossib=1;//flaga mówiąca, czy może powstać nowe okno
char IsNew=1;//flaga mówiąca, czy okno jest nowe
char IsPrev;//flaga mówiąca, czy istnieje okno wcześniejsze
char IsNext;//flaga mówiąca, czy istnieje okno następne
int TabWin[MaxWinNum];//tablica flag mówiących, czy okno istnieje
for(int i=0;i<MaxWinNum;i++) TabWin[i]=0;
TabWin[0]=1;
do
{
IsPrev=0;
IsNext=0;
for(i=0;i<CurrentWinNum;i++)
if(TabWin[i]==1)
{
IsPrev=1;
break;
}
for(i=CurrentWinNum+1;i<MaxWinNum;i++)
if(TabWin[i]==1)
{
IsNext=1;
break;
}
CWindow*Window=new CWindow(CurrentWinNum+1,IsPrev,IsNext,NewPossib,IsNew);
IsNew=0;
char WinResult=Window->Work();
if(WinResult==0)//okno zostaje zamknięte
{
TabWin[CurrentWinNum]=0;
TotalWinNum--;
if(NewPossib==0) NewPossib=1;
//skasowane zostało jakieś okno, więc można utworzyć nowe okno
for(i=CurrentWinNum+1;i<MaxWinNum;i++)
if(TabWin[i]==1)
{
CurrentWinNum=i;
break;
}
if(i>=MaxWinNum)//nie zostało znalezione następne otwarte okno
for(i=CurrentWinNum-1;i>=0;i--)
if(TabWin[i]==1)
{
CurrentWinNum=i;
break;
}
if(i<0) TotalWinNum=0;//okno zamknięte było ostatnie
}
else
if(WinResult==-1)//wyświetlone ma być okno poprzednie
{
for(i=CurrentWinNum-1;i>=0;i--)
if(TabWin[i]==1) break;
CurrentWinNum=i;
if(i<0) TotalWinNum=0;//wystąpił błąd
}
else
if(WinResult==1)//wyświetlone ma być okno następne
{
for(i=CurrentWinNum+1;i<MaxWinNum;i++)
if(TabWin[i]==1) break;
CurrentWinNum=i;
if(i>=MaxWinNum) TotalWinNum=0;//wystąpił błąd
}
else
if(WinResult==2)//ma powstać nowe okno
{
for(i=0;i<MaxWinNum;i++)
if(TabWin[i]==0) break;
CurrentWinNum=i;
TabWin[CurrentWinNum]=1;
TotalWinNum++;
if(i>=MaxWinNum) TotalWinNum=0;//wystąpił błąd
if(i==MaxWinNum-1) NewPossib=0;
IsNew=1;//kolejne okno będzie nowym oknem
}
delete Window;
}while(TotalWinNum>0);
}
char ConfirmQuit()
{
char*TabText[3];
TabText[0]=new char[40];
TabText[1]=new char[40];
strcpy(TabText[0],"You have closed the last window...");
for(int i=0;i<5;i++) TabText[1][i]=' ';
TabText[1][i]='\x0';
strcat(TabText[1],"Do you really want to quit?");
TabText[2]=NULL;
CSmallWindow*Window=new CSmallWindow(155,130,470,0,"Confirm",
TabText,0,2,"Yes","No");
char Result=Window->Work();
delete Window;
delete TabText[0];
delete TabText[1];
REGPACK reg;
reg.r_ax=0x2;
intr(0x33,®);//schowanie kursora
setfillstyle(1,BackgroundColour);
bar(155,130,470,300);//zamalowanie okienka
reg.r_ax=0x1;
intr(0x33,®);//pokazanie kursora
return Result;
}
void FirstInfo()
{
setfillstyle(1,BackgroundColour);
setcolor(FrameColour);
bar(1,1,639,479);
char*TabText[2];
TabText[0]=new char[40];
for(int i=0;i<4;i++) TabText[0][i]=' ';
TabText[0][i]='\x0';
strcat(TabText[0],"LOGIC CIRCUITS 1.0");
TabText[1]=NULL;
CSmallWindow*Window=new CSmallWindow(195,130,430,0,"Information",
TabText,0,1);
Window->Work();
delete Window;
delete TabText[0];
}
main()
{
long int a=stackavail();
clrscr();
if(!CheckMouse()) return 0;
InitGraph();
FirstInfo();
do
{
Control();
}while(!ConfirmQuit());
closegraph();
long int b=stackavail();
printf("%ld\n%ld\n%ld\n",a,b,a-b);
return 0;
}<file_sep>/SELogicGates/SELogicGates/JUNCTION.CPP
#include "junction.h"
#include "gate.h"
CJunction::CJunction(int X,int Y,int Colour)
{
X1=X2=X;
Y1=Y2=Y;
InNum=1;
OutNum=1;
for(int i=0;i<InNum;i++)
TabPrevElem[i]=NULL;
for(i=0;i<OutNum;i++)
TabNextElem[i]=NULL;
Output=error;
Movable=yes;
}
void CJunction::DrawElem(int Colour)
{
if(Colour==0)
{
switch(Output)
{
case low:Colour=LowColour;break;
case high:Colour=HighColour;break;
case error:Colour=ErrorColour;break;
}
}
setcolor(Colour);
setfillstyle(1,Colour);
pieslice(X1,Y1,0,360,2);
}
TOutput CJunction::GetOutput(int AskElemNum,int MaxNum)
{
Output=TabPrevElem[0]->GetOutput(0,0);
return Output;
}
char CJunction::Move(int X,int Y,CElement**TabElem,int NumOfElem)
{
int X1Prev=X1;
int Y1Prev=Y1;
int X2Prev=X2;
int Y2Prev=Y2;
for(int i=0;i<OutNum;i++)
if(TabNextElem[i]!=NULL)
{
int TmpX=TabNextElem[i]->GetXCorner();
int TmpY=TabNextElem[i]->GetYCorner();
if(TabNextElem[i]->IsOnBoard())
TabNextElem[i]->DrawElem(BackgroundColour);
//połączenie zniknie, jeżeli było narysowane
TabNextElem[i]->MoveBeg(X,Y);
if(!TabNextElem[i]->Autoformat(TabElem,NumOfElem)) return 0;
}
X2=X2-X1+X;
Y2=Y2-Y1+Y;
X1=X;
Y1=Y;
return 1;
}
TElementType CJunction::ElementType()
{
return junction;
}
void CJunction::ClickElement()
{}
char CJunction::LinkNextElem(CElement*NextElem,int X,int Y)
{
if(NextElem->ElementType()!=wire) return 0;
//węzeł może być połączony tylko z drutem
char OK=0;
for(int i=0;i<OutNum;i++)
if(TabNextElem[i]==NULL)
{
OK=1;
break;
}
if(OK==0) return 0;//istnieją już elementy następny
TabNextElem[i]=NextElem;
NextElem->MoveBeg(X1,Y1);
return 1;
}
char CJunction::LinkPrevElem(CElement*PrevElem,int X,int Y)
{
if(TabPrevElem[0]!=NULL) return 0;
TabPrevElem[0]=PrevElem;
return 1;
}
char CJunction::DelNextElem(CElement*DelElem)
{
for(int i=0;i<OutNum;i++)
if(TabNextElem[i]==DelElem)
{
TabNextElem[i]=NULL;
for(int j=0;j<OutNum;j++)
if(TabNextElem[j]!=NULL) return 1;//element został usunięty,
//ale nie jest ostatni
return 2;//nie ma już więcej elementów następnych
}
return 0;
}
int CJunction::DeleteConnections(CElement**TabElem,int NumOfElem,char Main)
{
int DelElemNum=0;//węzeł nie jest zawarty w generalnej tabeli elementów
for(int i=0;i<OutNum;i++)
if(TabNextElem[i]!=NULL)
{
DelElemNum+=TabNextElem[i]->DeleteConnections(TabElem,NumOfElem,0);
delete TabNextElem[i];
TabNextElem[i]=NULL;
}
this->DrawElem(BackgroundColour);//zniknięcie elementu
return DelElemNum;
}
<file_sep>/SELogicGates/SELogicGates/CONSTBUS.CPP
#include "constbus.h"
#include "gate.h"
CConstBus::CConstBus(int X,int Y,int Type)
{
JunctionNum=0;
for(int i=0;i<MaxJunctionNum;i++) TabJunction[i]=NULL;
X1=X;
X2=620;
Y1=Y;
Y2=Y1+10;
InNum=0;
OutNum=-1;//ilość nieograniczona
if(Type) Output=high;
else Output=low;
Movable=yes;
}
CConstBus::~CConstBus()
{
for(int i=0;i<JunctionNum;i++)
delete TabJunction[i];
}
void CConstBus::DrawElem(int Colour)
{
if(Colour==0)
{
switch(Output)
{
case low:Colour=LowColour;break;
case high:Colour=HighColour;break;
case error:Output=high;Colour=HighColour;break;
}
}
setcolor(Colour);
line(X1,Y2-5,X2-10,Y2-5);
line(X1,Y2-4,X2-10,Y2-4);
char Text[2];
switch(Output)
{
case low:Text[0]='0';break;
case high:Text[0]='1';break;
}
Text[1]='\0';
outtextxy(X2-5,Y2-3,Text);
for(int i=0;i<JunctionNum;i++) TabJunction[i]->DrawElem(Colour);
}
TOutput CConstBus::GetOutput(int AskElemNum,int MaxNum)
{
if(AskElemNum==0) return Output;
for(int i=0;i<JunctionNum;i++)
TabJunction[i]->GetOutput(AskElemNum,MaxNum);
return Output;
}
TElementType CConstBus::ElementType()
{
return cbus;
}
void CConstBus::ClickElement()
{}
char CConstBus::LinkNextElem(CElement*NextElem,int X,int Y)
{
if(NextElem->ElementType()!=wire) return 0;//błąd
if(JunctionNum>=MaxBusJunctionNum) return 0;//za dużo węzłów
int XTmp1;
int YTmp1;
for(int i=0;i<JunctionNum;i++)
{
XTmp1=TabJunction[i]->GetXCorner();
YTmp1=TabJunction[i]->GetYCorner();
if(X<XTmp1+6&&X>XTmp1-6&&Y<YTmp1+6&&Y>YTmp1-6) return 0;
//powiązanie za blisko istniejącego węzła
}
Y=Y1+6;
TabJunction[JunctionNum]=new CJunction(X,Y);
TabJunction[JunctionNum]->LinkPrevElem(this,0,0);
TabJunction[JunctionNum]->LinkNextElem(NextElem,X,Y);
JunctionNum++;
return 1;
}
char CConstBus::LinkPrevElem(CElement*PrevElem,int X,int Y)
{
return 0;
}
char CConstBus::DelNextElem(CElement*DelElem)
{
for(int i=0;i<JunctionNum;i++)
{
char Deleting=TabJunction[i]->DelNextElem(DelElem);
if(Deleting==2)
{
TabJunction[i]->DrawElem(FrameColour);
delete TabJunction[i];
for(int j=i;j<JunctionNum;j++) TabJunction[j]=TabJunction[j+1];
JunctionNum--;
return 1;
}
if(Deleting==1) return 1;
}
return 0;
}
char CConstBus::SaveElement(CElement**TabElem,int NumOfElem,
FILE*File,char Phase)
{
if(Phase==1)//pierwsza faza zachowywania
{
char Type=10;
fwrite(&Type,sizeof(char),1,File);
fwrite(&X1,sizeof(int),1,File);
fwrite(&Y1,sizeof(int),1,File);
fwrite(&X2,sizeof(int),1,File);
fwrite(&Y2,sizeof(int),1,File);
fwrite(&Output,sizeof(char),1,File);
fwrite(&JunctionNum,sizeof(int),1,File);
for(int i=0;i<JunctionNum;i++)
if(!TabJunction[i]->SaveElement(TabElem,NumOfElem,File,1)) return 0;
//zachowanie węzłów w pierwszej fazie
}
else//druga faza zachowywania
{
for(int i=0;i<JunctionNum;i++)
if(!TabJunction[i]->SaveElement(TabElem,NumOfElem,File,2)) return 0;
//zachowanie węzłów w drugiej fazie
}
return 1;
}
char CConstBus::LoadElement(CElement**TabElem,int NumOfElem,
FILE*File,char Phase)
{
if(Phase==1)//pierwsza faza odczytu
{
if(feof(File)) return 0;
fread(&X1,sizeof(int),1,File);
if(X1<0||X1>639) return 0;
if(feof(File)) return 0;
fread(&Y1,sizeof(int),1,File);
if(Y1<0||Y1>479) return 0;
if(feof(File)) return 0;
fread(&X2,sizeof(int),1,File);
if(X2<0||X2>639) return 0;
if(feof(File)) return 0;
fread(&Y2,sizeof(int),1,File);
if(Y2<0||Y2>479) return 0;
if(feof(File)) return 0;
fread(&Output,sizeof(char),1,File);
if(Output!=0&&Output!=1) return 0;
if(feof(File)) return 0;
fread(&JunctionNum,sizeof(int),1,File);
if(JunctionNum>MaxJunctionNum) return 0;
for(int i=0;i<JunctionNum;i++)
{
char Type;
if(feof(File)) return 0;
fread(&Type,sizeof(char),1,File);
if(Type!=7) return 0;//odczytywany element nie jest węzłem
TabJunction[i]=new CJunction(0,0);
if(!TabJunction[i]->LoadElement(TabElem,NumOfElem,File,1)) return 0;
//odczyt węzłów w pierwszej fazie
}
}
else//druga faza odczytu
{
for(int i=0;i<JunctionNum;i++)
if(!TabJunction[i]->LoadElement(TabElem,NumOfElem,File,2)) return 0;
//odczyt węzłów w pierwszej fazie
}
return 1;
}
<file_sep>/SELogicGates/SELogicGates/BUTTON.CPP
#include "button.h"
#include "gate.h"
CButton::~CButton()
{}
int CButton::IsYourArea(int X,int Y)
{
if(X>X1&&X<X2&&Y>Y1&&Y<Y2) return 1;
return 0;
}
void CButton::ChangeInsertMode(int TurnOff)
{
//gdy zmienna TurnOff=1, to przycisk automatycznie jest puszczany
//jest to zabezpieczenie przy szybkim "klikaniu" myszkĄ
if(Insert==false&&TurnOff==0)
{
Insert=true;
DrawingColour=InsertTextColour;
}
else
{
Insert=false;
DrawingColour=CustomTextColour;
}
DrawButton();
}
void CButton::SetActivity(TActive Active)
{
this->Active=Active;
if(Active==on) DrawingColour=16;
else DrawingColour=8;
this->DrawButton();
}
<file_sep>/SELogicGates/SELogicGates/WINDOW.H
#ifndef DefWindow
#define DefWindow
#include "element.h"
#include "button.h"
class CWindow
{
int WinNum;
char Active;
char Result;
int NumOfElem;//ilość elementów
enum TMode{move,link,block};
TMode Mode;
CElement*TabElem[MaxNumOfElem];
CButton*TabBut[ButNum];
char*StandardPath;
void*ImageTab[NumberOfImages];
void DoText(int Number,char*Text=NULL);
void React(int X,int Y);//reakcja na przyciśnięcie klawisza myszki
void CheckButtons(int X,int Y);//sprawdzenie przycisków przy naciśnięciu myszki
void CheckElements(int X,int Y);//sprawdzenie elementów przy naciśnięciu myszki
char DragElement(int ImageNum,int ElemNum);
void DrawWin(char Mode);
void DrawBasket(int X,int Y);
void Action(int ActNum);
char Load(char*Path=NULL);
void New();
void Previous();
void Next();
char Save(char*Path=NULL);
void Exit();
void Info();
void MoveOrLink();
void NewElement(int ElemNum);
void LinkElem(CElement*FirstElem,int X1,int Y1,
CElement*NextElem,int X2,int Y2);
void DeleteElem(int ElemNum);
void Error(int ErrorNum);
public:
char Work();//praca użytkownika w oknie
CWindow(int Number,char IsPrev,char IsNext,char NewPossib,char IsNew);
~CWindow();
};
#endif<file_sep>/SELogicGates/SELogicGates/INBUS.H
#ifndef DefInBus
#define DefInBus
#include "gate.h"
#include "menubut.h"
#include "element.h"
#include "junction.h"
class CInBus:public CElement
{
CMenuButton*Button[2];
char Name;
enum {true,false}Visible;
int JunctionNum;
CJunction*TabJunction[MaxBusJunctionNum];
public:
void DrawElem(int Colour=0);
TOutput GetOutput(int AskElemNum,int MaxNum) ;
void Change();
void ClickElement();
char LinkNextElem(CElement*NextElem,int X,int Y);
char LinkPrevElem(CElement*PrevElem,int X,int Y);
TElementType ElementType();
char DelNextElem(CElement*DelElem);
char SaveElement(CElement**TabElem,int NumOfElem,FILE*File,char Phase);
char LoadElement(CElement**TabElem,int NumOfElem,FILE*File,char Phase);
CInBus(int X,int Y,char Name);
~CInBus();
};
#endif<file_sep>/SELogicGates/SELogicGates/TMP.CPP
#include <dos.h>
#include <string.h>
#include <conio.h>
#include <stdio.h>
#include <graphics.h>
#include <alloc.h>
#define MenuButNum 7
#define ButNum 14
#define HighColour 4
#define LowColour 1
#define ErrorColour 2
#define NumberOfInBuses 6
enum TElementType{and,or,not,nor,nand,xor,output,wire,junction,inbus,cbus};
/*class CWindow;
class CElement;
class CButton;
class CMenuButton;*/
//Funkcje dodatkowe
void InitGraph(char *path="f:/borlandc/bgi")
{
int gdriver = DETECT, gmode, errorcode;
initgraph(&gdriver,&gmode,path);//"c:/borlandc/bgi");
errorcode=graphresult();
if(errorcode)
{
gotoxy(23,8);
printf("Graphic's error has appeared!");
gotoxy(12,10);
printf("While running this programm please write an access path");
gotoxy(27,12);
printf("to a file \"egavga.bgi\".");
gotoxy(25,20);
printf("Press any key to continue...");
getch();
}
}
int CheckMouse()
{
struct REGPACK reg;
reg.r_ax=0x0;
intr(0x33,®);
if(reg.r_ax==0)
{
printf("\n\n\t\tError!!!\n\n\tMouse not installed!!!");
return 0;
}
return 1;
}
main()
{
clrscr();
if(!CheckMouse()) return 0;
InitGraph();
int WinNum=1;
CWindow FirstWindow(WinNum);
return 0;
}<file_sep>/SELogicGates/SELogicGates/NAND.CPP
#include "nand.h"
#include "gate.h"
CNand::CNand(int X,int Y,int Colour)
{
X1=X;
Y1=Y;
X2=X+25;
Y2=Y+25;
InNum=2;
OutNum=1;
for(int i=0;i<InNum;i++)
TabPrevElem[i]=NULL;
for(i=0;i<OutNum;i++)
TabNextElem[i]=NULL;
Output=error;
Movable=yes;
}
void CNand::DrawElem(int Colour)
{
if(Colour==0)
{
switch(Output)
{
case low:Colour=LowColour;break;
case high:Colour=HighColour;break;
case error:Colour=ErrorColour;break;
}
}
setcolor(Colour);
line(X1+8,Y1+7,X1+8,Y1+22);
line(X1+3,Y1+12,X1+8,Y1+12);
line(X1+3,Y1+17,X1+8,Y1+17);
arc(X1+8,Y1+14,270,90,8);
circle(X1+18,Y1+14,2);
line(X1+21,Y1+14,X1+24,Y1+14);
}
TOutput CNand::GetOutput(int AskElemNum,int MaxNum)
{
if(AskElemNum==MaxNum) return Output;
//rekurencja wpadła w pętlę sprzężenia zwrotnego
if(Output==error) Output=high;
TOutput Value=high;
for(int i=0;i<InNum;i++)
{
if(TabPrevElem[i]==NULL)
Output=error;
else
{
TOutput TmpValue=TabPrevElem[i]->GetOutput(AskElemNum+1,MaxNum);
if(TmpValue==error)
Output=error;
else Value*=TmpValue;
}
}
if(Value==low) Value=high;
else Value=low;
if(Output!=error) Output=Value;
return Output;
}
TElementType CNand::ElementType()
{
return nand;
}
void CNand::ClickElement()
{}
<file_sep>/SELogicGates/SELogicGates/OR.H
#ifndef DefOr
#define DefOr
#include "element.h"
class COr:public CElement
{
public:
void DrawElem(int Colour=0);
TOutput GetOutput(int AskElemNum,int MaxNum) ;
void ClickElement();
TElementType ElementType();
COr(int X,int Y,int Colour=0);
};
#endif
|
a18d294b1db542ccd43564f455ae1fd641cb0e74
|
[
"C",
"C++"
] | 34
|
C++
|
MaciejBalas/SELogicGates
|
6dc8f020c8e9d902b6ac6fec3133bc73991011f3
|
cf6dfbccbfbcec8222ddd21b34f501971fc58cf2
|
refs/heads/master
|
<repo_name>goanpixie/MEAN-Mart<file_sep>/server/controllers/users.js
var mongoose = require('mongoose')
var User = mongoose.model('User')
var Product = mongoose.model('Product')
var Order = mongoose.model('Order')
console.log("I am at the users Controller-Backend")
function UsersController() {
this.addCustomer = function(req, res) {
User.findOne({ name: req.body.name, id: req.body._id }, function(err, customer) {
if (err) {
res.json(err)
} else {
if (customer == null) {
var newCustomer = User({ name: req.body.name })
newCustomer.save(function(newerr) {
if (newerr) {
res.json(newerr)
} else {
res.json(newCustomer)
}
})
} else { res.json(customer) }
}
})
}
this.getCustomer = function(req, res) {
User.find({}).populate('_user').exec(function(err, customers) {
if (err) {
res.json(err)
} else {
res.json(customers)
}
})
}
this.removeCustomer =function(req,res) {
User.remove({_id:req.params.id}, function(err,customer) {
if(err){
res.json(err)
}
else{
res.send()
}
})
}
this.addProduct = function(req,res) {
Product.findOne({ name: req.body.name, id: req.body._id , description: req.body.description, quantity: req.body.quantity}, function(err, product) {
if (err) {
res.json(err)
} else {
if (product == null) {
var newProduct= Product({ name: req.body.name, id: req.body._id , description: req.body.description, quantity: req.body.quantity })
newProduct.save(function(newerr) {
if (newerr) {
res.json(newerr)
} else {
res.json(newProduct)
}
})
} else { res.json(product) }
}
})
}
this.getProduct = function(req, res) {
Product.find({}).populate('_product').exec(function(err, products) {
if (err) {
res.json(err)
} else {
res.json(products)
}
})
}
this.addOrder = function(req, res) {
console.log(req)
Order.findOne({ customer: req.body.customer, id: req.body._id , product: req.body.product, quantity: req.body.quantity}, function(err, order) {
if (err) {
res.json(err)
} else {
if (order == null) {
var newOrder= Order({ customer: req.body.customer, id: req.body._id , product: req.body.product, quantity: req.body.quantity})
newOrder.save(function(newerr) {
if (newerr) {
res.json(newerr)
} else {
res.json(newOrder)
}
})
} else { res.json(order) }
}
})
}
this.getOrder = function(req, res) {
Order.find({}).populate('_order').exec(function(err, orders) {
if (err) {
res.json(err)
} else {
res.json(orders)
}
})
}
}
module.exports = new UsersController();
<file_sep>/server/config/routes.js
console.log('routes')
var users = require('../controllers/users.js');
module.exports = function(app){
app.post('/add_customer', users.addCustomer)
app.get('/get_customer', users.getCustomer)
app.get('/remove_customer/:id',users.removeCustomer)
app.post('/add_product', users.addProduct)
app.get('/get_product', users.getProduct)
app.post('/add_order', users.addOrder)
app.get('/get_order', users.getOrder)
}
<file_sep>/server/models/product.js
console.log("Ia m in the model-->product.js")
var mongoose = require('mongoose');
var Schema = mongoose.Schema
var ProductSchema = new mongoose.Schema({
_customers: {type: Schema.Types.ObjectId, ref: 'Customer'},
_orders: {type: Schema.Types.ObjectId, ref: 'Orders'},
name : {
type:String,
required: [true, "Product name is required"],
trim: true,
minlength: [6," Product name must be atleast 6 letters"]
},
description: {
type:String,
required: [true, "Product description is required"],
trim: true,
minlength: [5,"Product description must be atleast 5 letters"],
maxlength: [20,"Product description must not be more than 20 letters"],
},
quantity:{
type: Number,
min: [1, 'Atleast Product quantity of 1 is needed to place an order'],
max: 20
},
}
,{timestamps:true})
var User = mongoose.model('Product', ProductSchema)
<file_sep>/client/assets/controllers/customerController.js
app.controller('customerController', ['$scope', '$location', 'userFactory', '$cookies', function($scope, $location, userFactory, $cookies) {
$scope.newCustomer = {};
$scope.errors = false;
$scope.messages = [];
$scope.addCustomer = function() {
userFactory.addCustomer($scope.newCustomer, function(data) {
$scope.messages = []
if (data.errors) {
$scope.errors = true;
for (err in data.errors) {
console.log(data.errors[err].message)
$scope.messages.push(data.errors[err].message)
}
} else {
$cookies.putObject('newCustomer', { name: data.name, _id: data._id })
$scope.getCustomer();
$scope.newCustomer = null
}
})
}
$scope.getCustomer = function() {
userFactory.getCustomer(function(data) {
$scope.customers = data
})
};
$scope.getCustomer();
$scope.removeCustomer = function(id) {
console.log("I am @front end Controller")
userFactory.removeCustomer(id, function() {
$scope.getCustomer();
})
}
}])
<file_sep>/client/assets/app.js
var app = angular.module('MEAN_Mart', ['ngRoute','ngCookies'])
app.config(function($routeProvider){
$routeProvider
.when('/home', {
templateUrl: 'partials/home.html',
controller: 'homeController'
})
.when('/addCustomer', {
templateUrl: 'partials/addCustomer.html',
controller: 'customerController'
})
.when('/addOrder', {
templateUrl: 'partials/addOrder.html',
controller: 'orderController'
})
.when('/addProduct', {
templateUrl: 'partials/addProduct.html',
controller: 'productController'
})
.otherwise({
redirectTo:'/home'
})
})<file_sep>/server/models/user.js
console.log("Ia m in the model-->user.js")
var mongoose = require('mongoose');
var Schema = mongoose.Schema
var UserSchema = new mongoose.Schema({
_products:{type: Schema.Types.ObjectId, ref :'Product'},
_orders: {type: Schema.Types.ObjectId, ref: 'Orders'},
name : {
type:String,
required: [true, "First name is required"],
trim: true,
minlength: [6," First name must be atleast 6 letters"]
}
}
,{timestamps:true})
var User = mongoose.model('User', UserSchema)<file_sep>/client/assets/controllers/orderController.js
app.controller('orderController', ['$scope', '$location', 'userFactory', '$cookies', function($scope, $location, userFactory, $cookies) {
$scope.newOrder = {};
$scope.errors = false;
$scope.messages = [];
$scope.orders = {};
$scope.products =[];
$scope.customers = [];
$scope.getCustomer = function() {
userFactory.getCustomer(function(data) {
$scope.customers = data
})
};
$scope.getCustomer();
$scope.getProduct = function() {
userFactory.getProduct(function(data) {
$scope.products = data
})
};
$scope.getProduct();
$scope.addOrder = function() {
userFactory.addOrder($scope.newOrder, function(data) {
console.log(data)
$scope.messages = []
if (data.errors) {
$scope.errors = true;
for (err in data.errors) {
console.log(data.errors[err].message)
$scope.messages.push(data.errors[err].message)
}
}
})
$scope.getOrder();
console.log($scope.products[index].quantity--);
}
$scope.getOrder = function() {
userFactory.getOrder(function(data) {
$scope.orders = data
})
};
$scope.getOrder();
}])
<file_sep>/client/assets/controllers/productController.js
app.controller('productController', ['$scope', '$location', 'userFactory', '$cookies', function($scope, $location, userFactory, $cookies) {
$scope.newProduct = {};
$scope.errors = false;
$scope.messages = [];
$scope.products = {};
if ($cookies.getObject('newCustomer')) {
$scope.newCustomer = $cookies.getObject('newCustomer')
} else {
$location.url('/')
}
$scope.addProduct = function() {
userFactory.addProduct($scope.newProduct, function(data) {
$scope.messages = []
if (data.errors) {
$scope.errors = true;
for (err in data.errors) {
console.log(data.errors[err].message)
$scope.messages.push(data.errors[err].message)
}
}
})
$scope.getProduct();
}
$scope.getProduct = function() {
userFactory.getProduct(function(data) {
$scope.products = data
})
};
$scope.getProduct();
}])
|
1fed6d2eb9c55b3a98ceba0e90d7c7a2f5ba6888
|
[
"JavaScript"
] | 8
|
JavaScript
|
goanpixie/MEAN-Mart
|
8ca00edc771989d4e41baefddeba00dbaab23c9a
|
0af3b4dff2f027a4b88f2dc58623bf4bddf396a4
|
refs/heads/master
|
<repo_name>lenkatilka/Cleaning_Data_Project<file_sep>/Codebook.md
# DATA DICTIONARY - UCI HAR Dataset Tidy Data
##### the description in the following text was inspired by features_info.txt in UCI HAR Dataset:
#####"The features selected for this database come from the accelerometer and gyroscope 3-axial raw signals tAcc.XYZ and tGyro.XYZ. These time domain signals (prefix 't' to denote time) were captured at a constant rate of 50 Hz. Then they were filtered using a median filter and a 3rd order low pass Butterworth filter with a corner frequency of 20 Hz to remove noise. Similarly, the acceleration signal was then separated into body and gravity acceleration signals (tBodyAcc.XYZ and tGravityAcc.XYZ) using another low pass Butterworth filter with a corner frequency of 0.3 Hz.
#####Subsequently, the body linear acceleration and angular velocity were derived in time to obtain Jerk signals (tBodyAccJerk.XYZ and tBodyGyroJerk.XYZ). Also the magnitude of these three-dimensional signals were calculated using the Euclidean norm (tBodyAccMag, tGravityAccMag, tBodyAccJerkMag, tBodyGyroMag, tBodyGyroJerkMag).
#####Finally a Fast Fourier Transform (FFT) was applied to some of these signals producing fBodyAcc.XYZ, fBodyAccJerk.XYZ, fBodyGyro.XYZ, fBodyAccJerkMag, fBodyGyroMag, fBodyGyroJerkMag. (Note the 'f' to indicate frequency domain signals). "
### The tidy output data uses the following "sub"-variables:
### mean... indicates mean of the measure variable, std... indicates standard deviation, meanFreq.. indicates weighted average of the frequency components to obtain a mean frequency
### X, Y, Z indicate the x-y-z axis measurements
## The tidy data output uses the following decriptive names of columns and measure variables:
## sub_id -> subject id's
#### 1 .. 30 -> 30 subjects labeled with numbers 1 though 30
## activity -> activities recorded
#### WALKING
#### WALKING_UPSTAIRS
#### WALKING_DOWNSTAIRS
#### SITTING
#### STANDING
#### LAYING
## train_id -> indicates if subject belogs to train group
#### 0 -> subject does not belong to train group (belongs to test group)
#### 1 -> subject belongs to train group
## measure -> names of different measures
#### tBodyAcc. -> body acceleration with options as below (mean/std and X/Y/Z)
##### mean...X
##### ...Y
##### ...Z
##### std...X
##### std...Y
##### std...Z
#### tGravityAcc. -> gravity acceleration with options as below (mean/std and X/Y/Z)
##### mean...X
##### ...Y
##### ...Z
##### std...X
##### std...Y
##### std...Z
#### tBodyAccJerk. -> jerk of body acceleration with options as below (mean/std and X/Y/Z)
##### mean...X
##### ...Y
##### ...Z
##### std...X
##### std...Y
##### std...Z
#### tBodyGyro. -> gyroscop acceleration with options as below (mean/std and X/Y/Z)
##### mean...X
##### ...Y
##### ...Z
##### std...X
##### std...Y
##### std...Z
#### tBodyGyroJerk. -> jerk of gyroscop with options as below (mean/std and X/Y/Z)
##### mean...X
##### ...Y
##### ...Z
##### std...X
##### std...Y
##### std...Z
#### tBodyAccMag. -> magnitude of body acceleration with options as below (mean/std)
##### mean..
##### std..
#### tGravityAccMag. -> magnitude of gravity acceleration with options as below (mean/std)
##### mean..
##### std..
#### tBodyAccJerkMag. -> magnitude of body jerk with options as below (mean/std)
##### mean..
##### std..
#### tBodyGyroMag. -> magnitude of gyro acceleration with options as below (mean/std)
##### mean..
##### std..
#### tBodyGyroJerkMag. -> magnitude of gyro jerk with options as below (mean/std)
##### mean..
##### std..
#### fBodyAcc. -> frequency of body acceleration with options as below (mean/std and X/Y/Z; meanFreq and X/Y/Z )
##### mean...X
##### ...Y
##### ...Z
##### std...X
##### ...Y
##### ...Z
##### meanFreq...X
##### ...Y
##### ...Z
#### fBodyAccJerk. -> frequency of body jerk with options as below (mean/std and X/Y/Z; meanFreq and X/Y/Z )
##### mean...X
##### ...Y
##### ...Z
##### std...X
##### ...Y
##### ...Z
##### meanFreq...X
##### ...Y
##### ...Z
#### fBodyGyro. -> frequency of gyro acceleration with options as below (mean/std and X/Y/Z; meanFreq and X/Y/Z )
##### mean...X
##### ...Y
##### ...Z
##### std...X
##### ...Y
##### ...Z
##### meanFreq...X
##### ...Y
##### ...Z
#### fBodyAccMag. -> magnitude of frequency body acceleration with options as below (mean/std/meanFreq)
##### mean..
##### std..
##### meanFreq..
#### fBodyAccJerkMag. -> magnitude of frequency body jerk with options as below (mean/std/meanFreq)
##### mean..
##### std..
##### meanFreq..
#### fBodyGyroMag. -> magnitude of gyroscop frequency acceleration with options as below (mean/std/meanFreq)
##### mean..
##### std..
##### meanFreq..
#### fBodyGyroJerkMag. -> magnitude of gyroscop frequency jerk with options as below (mean/std/meanFreq)
##### mean..
##### std..
##### meanFreq..
## mean -> mean values of all measures specifies in "measure" column
<file_sep>/run_analysis.R
run_analysis<-function()
{
## load needed libraries
library(dplyr)
library(tidyr)
## loading the train data
train_set<-read.table("./train/X_train.txt")
train_labels<-read.table("./train/y_train.txt")
train_sub<-read.table("./train/subject_train.txt")
train_id<-rep(1,each=nrow(train_set)) ## indicates if the data is train data or not
train<-cbind(train_sub,train_labels,train_sub,train_id) ## clippind train data together
print("train set loaded")
## getting rid of old variables (makes space in computing memory)
train_set<-NULL
train_labels<-NULL
train_sub<-NULL
train_id<-NULL
## loading test set
test_set<-read.table("./test/X_test.txt")
test_labels<-read.table("./test/y_test.txt")
test_sub<-read.table("./test/subject_test.txt")
train_id<-rep(0,each=nrow(test_set)) ## indicates if the data is train data or not
test<-cbind(test_sub,test_labels,test_sub,train_id) ## clippind test data together
print("test set loaded")
## getting rid of old variables (makes space in computing memory)
test_set<-NULL
test_labels<-NULL
test_sub<-NULL
train_id<-NULL
## clipping all data together
data<-rbind(train,test)
## reading feature names and assigning names() to the variables
features<-read.table("features.txt")
features<-data.frame(id_feat=features[,1],motion=features[,2])
print(dim(features))
## find all variables that indicate the mean
good_mean<-mapply(function(x) grepl("^[^_]+mean",x), features$motion)
## find all variables that indicate the standard dev
good_std<-mapply(function(x) grepl("^[^_]+dev",x), features$motion)
## apply 'OR' operator on good_std and good_mean to find which variables contain 'std' or 'mean'
good<-good_mean|good_std
print(length(good))
good<-c(TRUE,TRUE,good) ## need to add TRUE, TRUE for the 1st and 2nd column, which show label and subject idta
data<-data[good]
print("data with mean and std selected")
## replacing activity id with description name
activity<-read.table("activity_labels.txt")
train_activities<-mapply(function(x) x<-as.character(activity[x,2]), train_labels)
test_activities<-mapply(function(x) x<-as.character(activity[x,2]), test_labels)
data[,2]<-c(train_activities, test_activities)## replaces 2nd column with activity names
## naming variables with descriptive names and cleaning descriptive names
features<-features[good_mean|good_std,]
#### replace special characters in features by dots and assign to new variable
feat_names<-gsub("[[:punct:]]",".",features[,2])
#### replace ...BodyBody... 'mistake' in variables to a ...Body...
feat_names<-gsub("BodyBody","Body",feat_names)
names(data)<-c("sub_id","activity",feat_names,"train_id")
print("decriptive names added to data")
## gather data to have one column with all measures, key called "measure", and value called "value"
data<-gather(data,measure,value,3:(ncol(data)-1))
## group data so that the mean can be computed for each activity and measure
by<-group_by(data,sub_id,activity,train_id,measure)
## taking mean of the "value" column per each activity and measure
data_avg<-summarize(by,mean=mean(value))
## output the tidy average data
write.table(data_avg,file="UCI_HAR_Dataset_averages_tidy.txt",row.names=FALSE)
}<file_sep>/README.md
# Cleaning_Data_Project
-
## The code in this repository contains R script "run_analysis.R"
## The output is "UCI_HAR_Dataset_averages_tidy.txt" long narrow tidy data
## =============================================================================
## The following needs to be done PRIOR to running the script:
### - install packages "tidyr" and "dplyr"
### - set your working directory to UCI HAR Dataset
### - in R console / RStudio console type "source("run_analysis.R")"
### - submit script by typing "run_analysis()"
## =============================================================================
## =============================================================================
## The "run_analysis.R" script does the following:
### 1. loads data:
#### - loads packages "tidyr" and "dplyr" for easier manipulation and tidying data
#### - loads data for train and test sets
#### - binds together the data for train set: X_train.txt, y_train.txt, subject_train.txt
#### - binds together the data for test set: X_test.txt, y_test.txt, subject_test.txt
#### - adds a column "train_id" to train and test data to indicate 0 if data is test data and
#### 1 if data is train data
### 2. clips train and test data:
#### - binds test data BELOW train data using rbind
#### - the name of clipped data set is "data"
### 3. assigns activity names
#### - loads "activity_labels.txt" and assigns the name labels to corresponding
#### activity "id's" (numbers 1:6) in "data" dataset
### 4. assigns descriptive variable names:
#### - loads descriptive measure variable names from "features.txt"
#### - cleans descriptive measure variable names: replaces "-" and "()" by dots and
#### corrects measure variables containing "BodyBody" to "Body"
#### - select only measure variables containing "mean" and "std"
#### - creates logic vector indicating which columns in "data" correspond to measure variables
#### containing "mean" and "std"
#### - changes "data" dataset so that it contains only columns with subject id,
#### activity names and columns with descriptive measure variables containing "mean" and "std"
### 5. computes averages for all subjects, activities and measure variables:
#### - gathers data on measure (measure decriptive names in one column, measure values in
#### one column) - this step causes that data output will be in LONG NARROW TIDY FORMAT
#### - groups data by subject id, activity, train_id, and measure
#### - computes averages on measure values
#### - outputs the data into "UCI_HAR_Dataset_averages_tidy.txt"
## =============================================================================
|
820f40b89b92e1389ee6d3224196490eda800b57
|
[
"Markdown",
"R"
] | 3
|
Markdown
|
lenkatilka/Cleaning_Data_Project
|
45a0ce465f7ac04b2822f71917a0024334855cfa
|
f65b2a363e3c9abc0b86e79bc3727dd3d877b3a2
|
refs/heads/master
|
<repo_name>sahajdhingra26/Data-Structures<file_sep>/Data-Structures---Problem-Solving/infix-to-postfix-using-stack.c
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
struct Node {
char data;
struct Node* link;
};
struct Node* top = NULL;
void push(char x){
struct Node* temp;
temp =malloc(sizeof(struct Node));
temp->data = x;
temp->link =top; // if list empty temp ->next = null (because head is null). If list is not empty then temp->next = head which stores the first element of the list
top=temp;
}
void pop(){
if(top==NULL) return; // already empty
struct Node* temp=top;
temp=top;
top=temp->link;
free(temp);
return;
}
bool isOperand(char C)
{
if(C >= '0' && C <= '9') return true;
if(C >= 'a' && C <= 'z') return true;
if(C >= 'A' && C <= 'Z') return true;
return false;
}
// Function to verify whether a character is operator symbol or not.
bool isOperator(char C)
{
if(C == '+' || C == '-' || C == '*' || C == '/' || C== '$')
return true;
return false;
}
// Function to verify whether an operator is right associative or not.
int isRightAssociative(char op)
{
if(op == '$') return true;
return false;
}
// Function to get weight of an operator. An operator with higher weight will have higher precedence.
int getOperatorWeight(char op)
{
int weight = -1;
switch(op)
{
case '+':
case '-':
weight = 1;
case '*':
case '/':
weight = 2;
case '$':
weight = 3;
}
return weight;
}
// Function to perform an operation and return output.
int hasHigherPrecedence(char op1, char op2)
{
int op1Weight = GetOperatorWeight(op1);
int op2Weight = GetOperatorWeight(op2);
// If operators have equal precedence, return true if they are left associative.
// return false, if right associative.
// if operator is left-associative, left one should be given priority.
if(op1Weight == op2Weight)
{
if(IsRightAssociative(op1)) return false;
else return true;
}
return op1Weight > op2Weight ? true: false;
}
void infixToPostfix(char expression){
struct Node* temp;
char result[]="NULL";
temp =malloc(sizeof(struct Node));
int i;
for(i=0;i<sizeof(expression);i++){
if(!isOperator(expression))
result=result+expression;
else{
while(top!=NULL){
}
}
}
}
int main() {
char expression[]="NULL";
printf("Enter an expression\n");
scanf("%s",expression);
if(isBalanced(expression))
printf("Balanced\n");
else
printf("Not Balanced\n");
return 0;
}
<file_sep>/Data-Structures---Stacks/stack.c
#include <stdlib.h>
#include <stdio.h>
struct Node {
int data;
struct Node* link;
};
struct Node* top = NULL;
void push(int x){
struct Node* temp;
temp =malloc(sizeof(struct Node));
temp->data = x;
temp->link =top; // if list empty temp ->next = null (because head is null). If list is not empty then temp->next = head which stores the first element of the list
top=temp;
}
void pop(){
if(top==NULL) return; // already empty
struct Node* temp1=top;
top=temp1->link;
free(temp1);
return;
}
void printStack(){
struct Node* temp=top;
printf("Stack is :");
while(temp !=NULL){
printf(" %d",temp->data);
temp=temp->link;
}
printf("\n");
}
int main() {
int choice,element,total,i,position;
printf("Enter the operation you want to perform on stack\n1)Push\n2)Pop\n");
scanf("%d",&choice);
switch(choice)
{
case 1:
printf("\nHow many elements you want to push?\n");
scanf("%d",&total);
for (i=0;i<total;i++){
printf("\nEnter the element\n");
scanf("%d",&element);
push(element);
printStack();
}
break;
case 2:
push(3);
push(2);
push(1);
printStack();
pop();
printStack();
break;
default:
printf("Error! Please enter a valid choice");
}
return 0;
}
<file_sep>/Data-Structures---Singly-Linkedlist/linkedlist.c
#include <stdlib.h>
#include <stdio.h>
// To execute C, please define "int main()"
struct Node {
int data;
struct Node* next;
};
struct Node* head;
void insertAtBeginning(int x){
struct Node* temp;
temp =malloc(sizeof(struct Node));
temp->data = x;
temp->next =head; // if list empty temp ->next = null (because head is null). If list is not empty then temp->next = head which stores the first element of the list
head=temp;
}
void insertAtNthPosition(int x, int n){
struct Node* temp1;
int i;
temp1 =malloc(sizeof(struct Node));
temp1->data = x;
temp1->next =NULL;
if(n==1){ // if list is empty
temp1->next =head;
head=temp1;
return;
}
struct Node* temp2=head;
for (i=0;i<n-2;i++){ // traverse to n-1 node
temp2=temp2->next;
}
temp1->next=temp2->next;
temp2->next=temp1;
}
void deleteAtNthPosition(int n){
struct Node* temp1=head;
if(n==1){
head=temp1->next;
free(temp1);
return;
}
int i;
for(i=0;i<n-2;i++){
temp1=temp1->next;
}
//temp1 now points to (n-1)th Node
struct Node* temp2=temp1->next;
temp1->next =temp2->next; //(n+1)th Node
free(temp2);
}
void printLinkedList(){
struct Node* temp=head;
printf("List is :");
while(temp !=NULL){
printf(" %d",temp->data);
temp=temp->next;
}
printf("\n");
}
int main() {
int choice,element,total,i,position;
head = NULL; // empty list;
printf("Enter the operation you want to perform on linkedlist\n1)Insert at beginning\n2)Insert at nth position\n3)Delete the node at nth position\n");
scanf("%d",&choice);
switch(choice)
{
case 1:
printf("\nHow many elements you want to enter?\n");
scanf("%d",&total);
for (i=0;i<total;i++){
printf("\nEnter the element\n");
scanf("%d",&element);
insertAtBeginning(element);
printLinkedList();
}
break;
case 2:
insertAtBeginning(3);
insertAtBeginning(2);
insertAtBeginning(1);
printLinkedList();
printf("\nEnter the position?\n");
scanf("%d",&position);
printf("\nEnter the element\n");
scanf("%d",&element);
insertAtNthPosition(element,position);
printLinkedList();
break;
case 3:
insertAtBeginning(3);
insertAtBeginning(2);
insertAtBeginning(1);
printLinkedList();
printf("\nEnter the position?\n");
scanf("%d",&position);
deleteAtNthPosition(position);
printLinkedList();
break;
default:
printf("Error! Please enter a valid choice");
}
return 0;
}
<file_sep>/Data-Structures---Singly-Linkedlist/readme.txt
Linkedlist in c programing
1. Insert node at beginning
2. Insert node at nth position
3. Delete node from nth position<file_sep>/Data-Structures---Doubly-Linkedlist/linkedlist.c
#include <stdlib.h>
#include <stdio.h>
// To execute C, please define "int main()"
struct Node {
int data;
struct Node* next;
struct Node* prev;
};
struct Node* head;
struct Node* getNewNode(int x){
struct Node* temp;
temp =malloc(sizeof(struct Node));
temp->data = x;
temp->next =NULL;
temp->next =NULL;
return temp;
}
void insertAtBeginning(int x){
struct Node* temp;
temp=getNewNode(x);
if(head==NULL){ // if list is empty
head=temp;
return;
}
head->prev=temp;
temp->next=head;
head=temp;
}
void insertAtEnd(int x){
struct Node* temp1;
temp1=getNewNode(x);
struct Node* temp2=head;
while(temp2->next!=NULL){
temp2=temp2->next; // traverse to the end
}
temp2->next=temp1;
temp1->prev=temp2;
temp1->next=NULL;
}
void printReverseLinkedList(){
struct Node* temp=head;
if(temp==NULL) return; //empty list
while(temp->next!=NULL){
temp=temp->next; // traverse to the end
}
printf("Reverse :");
while(temp !=NULL){
printf(" %d",temp->data);
temp=temp->prev;
}
printf("\n");
}
void printLinkedList(){
struct Node* temp=head;
printf("Forward :");
while(temp !=NULL){
printf(" %d",temp->data);
temp=temp->next;
}
printf("\n");
}
int main() {
int choice,element,total,i,position;
head = NULL; // empty list;
printf("Enter the operation you want to perform on doubly linkedlist\n1)Insert at beginning\n2)Insert at end\n3)Reverse the linkedlist\n");
scanf("%d",&choice);
switch(choice)
{
case 1:
printf("\nHow many elements you want to enter?\n");
scanf("%d",&total);
for (i=0;i<total;i++){
printf("\nEnter the element\n");
scanf("%d",&element);
insertAtBeginning(element);
printLinkedList();
}
break;
case 2:
insertAtBeginning(3);
insertAtBeginning(2);
insertAtBeginning(1);
printLinkedList();
printf("\nHow many elements you want to enter?\n");
scanf("%d",&total);
for (i=0;i<total;i++){
printf("\nEnter the element\n");
scanf("%d",&element);
insertAtEnd(element);
printLinkedList();
}
break;
case 3:
insertAtBeginning(3);
insertAtBeginning(2);
insertAtBeginning(1);
printLinkedList();
printReverseLinkedList();
break;
default:
printf("Error! Please enter a valid choice");
}
return 0;
}
<file_sep>/Data-Structures---Problem-Solving/reverse-string-using-stack.c
#include <stdlib.h>
#include <stdio.h>
struct Node {
char data;
struct Node* link;
};
struct Node* top = NULL;
void push(char x){
struct Node* temp;
temp =malloc(sizeof(struct Node));
temp->data = x;
temp->link =top; // if list empty temp ->next = null (because head is null). If list is not empty then temp->next = head which stores the first element of the list
top=temp;
}
void pop(){
if(top==NULL) return; // already empty
struct Node* temp=top;
temp=top;
top=temp->link;
free(temp);
return;
}
void reverse(char *arr,int length){
int i;
for(i=0;i<length;i++){
push(arr[i]);
}
for(i=0;i<length;i++){
arr[i]=top->data;
pop();
}
}
int main() {
int choice,element,total,i,position;
char arr[5];
printf("Enter a string of max 5 letters\n");
scanf("%s",arr);
reverse(arr,sizeof(arr));
printf("Reverse of the string is %s",arr);
return 0;
}
<file_sep>/Data-Structures---Problem-Solving/balanced-paranthesis-using-stack.c
// Three properties to check
// 1. opening = closed
// 2. last unlcosed, first closed
// 3. all closing should be on right of opened and vice-versa
// algo
// 1. scan from left to right
// => if opening - add to list
// => if closing remove last opening symbol from list
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
struct Node {
char data;
struct Node* link;
};
struct Node* top = NULL;
void push(char x){
struct Node* temp;
temp =malloc(sizeof(struct Node));
temp->data = x;
temp->link =top; // if list empty temp ->next = null (because head is null). If list is not empty then temp->next = head which stores the first element of the list
top=temp;
}
void pop(){
if(top==NULL) return; // already empty
struct Node* temp=top;
temp=top;
top=temp->link;
free(temp);
return;
}
bool isPair(char opening,char closing)
{
if(opening == '(' && closing == ')') return true;
else if(opening == '{' && closing == '}') return true;
else if(opening == '[' && closing == ']') return true;
return false;
}
bool isBalanced(char *expression){
int i;
for(i=0;i<sizeof(expression);i++){
if(expression[i]=='(' || expression[i]=='{' || expression[i]=='[')
push(expression[i]);
else if(expression[i]==')' || expression[i]=='}' || expression[i]==']'){
if(top==NULL || !isPair(top->data,expression[i]))
return false;
else
pop();
}
}
return top==NULL ? true:false;
}
int main() {
char expression[]="NULL";
printf("Enter an expression\n");
scanf("%s",expression);
if(isBalanced(expression))
printf("Balanced\n");
else
printf("Not Balanced\n");
return 0;
}
|
09b778fb44d98e5883419ffdc04f4dcd9968e878
|
[
"C",
"Text"
] | 7
|
C
|
sahajdhingra26/Data-Structures
|
550fa6890cd87a3c102d6bd8baacdd24199200e3
|
56ec0b70fe9f70bb7617828679644ba3254039b1
|
refs/heads/master
|
<repo_name>IASAStudy/CodeForJava<file_sep>/src/ch2/ScannerEx.java
package ch2;
import java.util.*;
public class ScannerEx {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in); // 입력을 위한 Scanner객체 생성
String input = scanner.nextLine(); // 입력대기 상태 -> 입력 후 엔터키 누르면 입력한 내용이 문자열로 반환
int num = Integer.parseInt(input); // 입력받은 문자열을 숫자로 변환, 기호나 문자가 입력되면 error발생
System.out.println("�Է³��� :" + input); // input은 문자열
System.out.printf("num=%d%n", num); // num은 숫자형..
System.out.println();
}
}
<file_sep>/src/ch8/ExceptionEx4.java
package ch8;
public class ExceptionEx4 {
public static void main(String[] args) {
System.out.println(1);
System.out.println(2);
try {
System.out.println(3);
System.out.println(0/0); // ArithmeticException instance 생성
System.out.println(4);
} catch(ArithmeticException ae) { // instance of 로 검사, 즉 Exception e해도 OK!
System.out.println("Exception Message: " + ae.getMessage()); // Exception instance에 저장된 메세지
ae.printStackTrace(); // 예외발생 당시 call stack에 있었던 메서드의 정보와 예외 메세지를 화면에 출력
}
System.out.println(6);
// ****멀티 catch 블럭 | 로 추가 가능
// 단 조상-자손 관계는 X -> 불필요
}
}
<file_sep>/src/ch6/ObjLesson3.java
package ch6;
public class ObjLesson3 {
public static void main(String[] args) {
// 메서드의 선언과 구현
/*
* 반환타입 메서드이름 (타입 변수명, 타입 변수명, ...)
* {
* // 메서드 호출 시 수행할 코드
* }
*/
// 반환값이 없을 경우에는 void를 사용해야 함.
// 반환값이 있을 경우에는 무조건 return구문을 사용해야 함.
// 같은 클래스 내의 메서드끼리는 참조변수 없어도 호출 가능
// But static 메서드는 같은 클래스 내의 인스턴스 메서드 호출 불가
// return 문은 모든 메서드에 포함되어야 하지만, void의 경우알아서 return구문을 추가해주기에 문제 X
// 매개변수의 유효성 검사 필요!!
// 절대 호출하는 쪽에서 알아서 적절한 값을 넘겨주리라는 생각 X
// 0으로 나누면 제어해주지 않으면, 이를 수행하는 곳에서 프로그램이 비정상적으로 종료됨.
}
}
class Mymath {
long add(long a, long b) {
long result = a+b;
return result;
// return a+b;
}
long subtract(long a, long b) { return a-b;}
long multiply(long a, long b) { return a*b;}
double divide(double a, double b) {return a/b;}
// long 타입을 넣어도 됨, 자동형변환이 되기 때문.
}<file_sep>/src/ch6/ObjLesson8.java
package ch6;
public class ObjLesson8 {
public static void main(String[] args) {
// ch6-3
// 생성자 -> 인스턴스 초기화 메서드
// 모든 클래스에는 하나 이상의 생성자 필요
// 오해 No! : 생성자가 인스턴스를 만든 것이 아님.
// 생성자는 언제 작용?
// ppt 8쪽은 기본 생성자가 없기에 에러 발생
// p9. 역시 매개변수를 받아서 원하는 값으로 초기화한 인스턴스 생성 가능
// 모다 간결하고 직관적으로 초기화 가능
// 생성자에서 다른 생성자 호출 - this() & this
// 조건 두가지 필요
// this : 인스턴스 자신을 가리키는 참조변수
// 모든 인스턴스 메서드(쌩성자 포함)에 지역변수로 숨겨진 채로 존재
}
}
class Car {
String color;
String gearType;
int door;
Car() {
this("white", "auto", 4);
}
Car(String color) {
this(color, "auto", 4);
}
Car(String color, String gearType, int door) {
this.color = color;
this.gearType = gearType;
this.door = door;
} // this를 안쓰면 무의미해짐. 매개변수와 인스턴스변수가 구분이 안되기에.
// 매개변수를 다르게 하면 괜춘
// 역시 this로는 인스턴스변수에만 접근 가능 이유는 알지?
Car(Car c) {
color = c.color;
gearType = c.gearType;
door = c.door;
} // 이렇게 생성자를 통해 인스턴스를 복사할 수도 있다.
}
<file_sep>/src/ch5/Array1.java
package ch5;
public class Array1 {
public static void main(String[] args) {
// 배열이란?
// 같은 타입의 변수들을 하나의 묶음으로 다루는 것
int[] score = new int[5]; // 5개의 int값을 저장할 수 있는 배열 생성
// score은 배열을 다루기위한 참조변수일 뿐, 저장공간은 아니다.
// 배열의 선언
int[] age;
// or int age[];
// 단지 생성된 배열을 다루기 위한 참조변수를 위한 공간이 만들어질 뿐
age = new int[5];
// 연산자 new와 함께 배열의 타입과 길이를 지정해 주어야 함, int형 배열 값들의 디폴트는 0
/*
* 순서
* 1. 주소를 저장하는 참조변수 age와 5개 int형 데이터 저장공간 형성
* 2. 5개 int형 데이터 저장공간은 연속적으로 배치, 디폴트 값은 0
* 3. age에 대입연산자 '='에 의해 5개 int형 데이터 저장공간의 주소가 저장됨.
*/
// 배열의 인덱스는 0부터
// index범위를 넘어선 값을 대입하는 것은 컴파일러에거 걸러주지 못함. 실행시켜야 에러가 발생
}
}
<file_sep>/src/ch6/ObjLesson7.java
package ch6;
public class ObjLesson7 {
public static void main(String[] args) {
// 매개변수의 타입이나 개수가 다르면 같은 이름을 통해 메서드를 정의할 수 있다.
// 조건은 피피티에 나와 있음.
// println 메서드 역시 10개가 정의됨.
// 리턴 타입만 다른 것은 오버로딩 성립하지 않음
// 그저 이미 같은 메서드가 정의되었다는 메시지가 나타날 것
// 메서드의 매개변수 개수가 고정적이었으나, 동적으로 지정 가능
// PrintStream 클래스의 printf 메서드가 대표적인 예시
// public PrintStream printf(String format, Object... args) { }
// 가변인자가 가장 나중에 와야함, 타입...변수명 과 같은 형식으로 선언
}
}
<file_sep>/src/ch7/Interface3.java
package ch7;
public class Interface3 {
public static void main(String[] args) {
// 인터페이스의 이해
// 직접의 단점
// 클래스 A를 위해서 B도 작성이 되어 있어야 함.
// A-I-B의 관계
// 그저 그 기능을 가진 애로부터 제공받기만 하면 됨. 클래스 이름 불필요
// 7.8 잘 읽자.
// 내부 클래스는 멤버변수랑 동일하게 대우
// p.28 : 익명클래스 컴파일됐을 때 파일 명
// 익명클래스 : 굳이 여러번 쓰지 않을 애들
// 취향 차이일듯
}
}
<file_sep>/src/ch3/OperatorCo.java
package ch3;
public class OperatorCo {
public static void main(String[] args) {
int x;
int absX;
char signX;
x = 10;
absX = x>=0 ? x : -x;
signX = x>0 ? '+': ( x ==0 ? ' ': '-' );
System.out.printf("x = %c%d%n", signX,absX);
}
}
<file_sep>/src/ch5/Array2.java
package ch5;
import java.util.Arrays;
public class Array2 {
public static void main(String[] args) {
// 배열의 초기화
int[] score = new int[5];
// 이후에 각 요소마다 직접 값을 지정
// int[] score = new int[] {100,200,300,400,500}
// int[] score = {100,200,300,400,500}
//배열의 선언과 생성을 따로 하는 경우에는 new int[]를 생략할 수 없다!
// int add(int[] arr) {int배여을 매개변수로 받는 메서드}
// 이럴 때도 add()안에 new int[]생략 불가능
int zero[] = new int[0];
int[] zero1 = new int[] {};
int[] zero2 = {};
char[] hello = {'A','B'};
//전부 길이가 0일 배열 -> 후에 쓸 일이 있다!
//---------------------------------------
//배열의 출력
int[] iArr = {100,200,300,400,500};
for(int i=0; i< iArr.length;i++ ) {
System.out.print(iArr[i]+" ");
}
System.out.println();
System.out.println(Arrays.toString(iArr));
// 배열의 각 요소를 아래와 같은 형식의 문자열로 반환하는 메서드
System.out.println(hello);
// 타입@주소의 형태로 출력, @뒤의 16진수는 배열의 주소로, 실제 주소가 아닌 내부 주소
//예외적으로 char타입 배열은 각 요소가 구분자 없이 출력됨!
}
}
<file_sep>/src/ch4/IterationFor.java
package ch4;
public class IterationFor {
public static void main(String[] args) {
/*
* for(초기화;조건식;증감식) {
* 조건식이 참일 때 수행될 문장
* }
*/
//예제 : 1부터 10까지의 합
int sum =0;
for(int i=1;i<=10;i++) {
sum = sum + i;
System.out.printf("1부터 %d까지의 합 = %d%n",i, sum);
}
// 중복 for문도 당연히 가능
// 예제 : 입력받은 라인의 수를 받아 별 출력
}
}
<file_sep>/src/ch4/ImprovedFor.java
package ch4;
public class ImprovedFor {
public static void main(String[] args) {
//for문 내부에 문장이 하나뿐이라면 중괄호는 생략할 수 있다.
int[] arr = {10,20,30,40,50};
for(int tmp : arr) {
System.out.printf("%d%n", tmp);
}
//continue문 : 자신이 포함된 반복문의 끝으로 이동
for(int i=0; i<=10; i++) {
if(i%3 == 0)
continue;
System.out.println(i);
}
//break문 : 자신이 포함된 반복문 종료
}
}
<file_sep>/src/ch2/Ex2.java
package ch2;
/* Primitive type
* boolean,char,byte,short,int,long,float,double
* 총 8가지
*/
/* Reference type
* Primitive type을 제외한 나머지 타입
* 클래스의 이름
*/
public class Ex2 {
public static void main(String[] args) {
final int a = 5; //상수; 저장과 동시에 초기화해야 함.
final int b = 10;
// 원래 우리가 알던 상수가 리터럴임.
// 리터럴에는 접미사가 요구됨.
String name = "Java" + "va";
String str = name + 8.0;
System.out.println(name);
System.out.println(str);
System.out.println(7+""); // 빈 문자열을 넣어줌으로써 문자열로 변환
System.out.println(7+" ");
System.out.println(7+7+"");
System.out.println(""+7+7);
System.out.printf("nan");
System.out.printf("age %d%n", a); // 형식화된 출력방식
System.out.printf("finger= [%5d]%n",b);
System.out.printf("finger= [%-5d]%n", b);
System.out.printf("finger= [%05d]%n", b);
String url = "www.codechobo.com";
System.out.printf("[%s]%n", url); // 문자열 길이만큼 출력공간 확보
System.out.printf("[%20s]%n", url); // 최소 20글자 출력공간 확보(우측 정렬)
System.out.printf("[%-20s]%n", url); // 최소 20글자 출력공간 확보(죄측 정렬)
System.out.printf("[%.8s]%n", url); // 왼쪽에서 8글자만 출력.
}
}
<file_sep>/src/ch6/ObjLesson1.java
package ch6;
public class ObjLesson1 {
public static void main(String[] args) {
// ch6-1
// 클래스는 제품 설계도, 객체는 제품
// 객체는 다른 말로 인스턴스
// 객체는 변수(속성)꽈 기능(메서드)로 이루어져 있다.
// 2.4
// 인스턴스의 생성과 사용
Tv t; // 주소를 저장할 참조변수 선언
t = new Tv(); // 연산자 new에 의해 Tv클래스의 인스턴스 생성, 각 변수들은 자료형 별 디폴트값으로 초기화
t.channel = 7;
t.channelDown();
System.out.println(t.channel);
// String이랑 똑같죠? String class의 객체 생성과 같음
// 참조변수의 타입은 인스턴스의 타입과 동일해야 함.
// 우리가 C에서 배운 구조체는 여러 자료형들이 모인 것. 클래스는 기능이 더해진 것
Tv[] tvArr = new Tv[3];
// 객체 역시 배열로 다룰 수 있다.
// 여러 참조변수들은 하나로 묶은 참조 변수 인 것.
// 아직 초기화는 하지 않았기에 객체는 저장이 되지 않은 상태임을 명시하자!
tvArr[0] = new Tv(); // 이 과정을 해야 비로소 객체가 생성된 것임
}
}
class Tv {
String color; // 색상
boolean power; // 전원상태(on/off)
int channel; // 채널
void power() {power = !power;}
void channelUp() { ++channel; }
void channelDown() { --channel; }
}
<file_sep>/src/ch3/OperatorIntro.java
package ch3;
public class OperatorIntro {
public static void main(String[] args) {
// 대부분은 우리가 아는 상식 상의 순서
int x = 1;
System.out.println(x);
int y = x << 2 + 1; // 쉬프트는 덧셈보다 우선순위가 낮다. 따라서 x << (2+1)이 실행된다.
System.out.println(y);
boolean a = true;
boolean b = a & 1 == 0; // 논리연산자가 비교연산자보다 우선순위가 낮다. 따라서 a & (1==0)이 되는 것.
System.out.println(b);
// &&가 ||보다 우선순위가 높으므로, 괄호를 쳐주는 습관을 들이자.
x = 0;
boolean c = x < -1 || (x >3 && x<5);
System.out.println(c);
//딱히 중요한 건 별로 없음 거의 다 비슷하고, 그때그때 찾는 것이 더 편할 듯
}
}<file_sep>/src/ch7/Inheritance2.java
package ch7;
public class Inheritance2 {
public static void main(String[] args) {
// 1.4 단일상속(Single Inheritance)
// Java는 단일상속만을 허용
// Why?
// 서로 다른 클래스로부터 상속받은 멤버간의 이름이 같은 경우 구별할 수 없기에
// 클래스 간의 관계가 굉장히 복잡해짐
// 1.5 Object 클래스
// 조상이 없는 클래스는 자동으로 Object클래스 상속
// toString()과 equals(Object obj)의 메서드가 사용가능했던 이유임.
// 2.1 오버라이딩이란?
// 상속받은 메서드의 내용을 변경하는 것.
// Why? 같은 기능인데 확장되었다고 메서드의 이름이 달라지는 것은 비효율적인
// 사용자도 같은 이름으로 실행되길 기대할 것임.
// 2.2 조건
// 접근제어자와 예외이외의 선언부가 같아야 함
// 접근제어자 : public - protected - (default) - private
// 예외 개수 많을 수 없음.
// 클래스 변수나 메서드는 클래스에 묶여 있음.
// 상속된다는 것이 애초에 의미가 없음. 자손의 것이 아님.
// 2.3 오버로딩 vs 오버라이딩 -> 알죠?
}
}
<file_sep>/src/ch7/Package1.java
package ch7;
public class Package1 {
public static void main(String[] args) {
// 3.1 패키지
// 같은 이름의 클래스라도 서로 다른 패키지에 있으면 충돌 X
// 자주 사용하는 System클래스 역시 java.lang패키지에 속해있음.
// 정확히는 java패키지의 lang패키지의 System클래스
// 우리가 예전에 scanner클래스 사용할 때 java.util.*했었던거 기억
// 3.2 패키지의 선언
// 소스파일 첫 번째 문장으로 단 한번 선언
// 하나의 소스파일에 잇는 클래스나 인터페이스는 모두 같은 패키지에 속하는 것
// 패키지 선언을 안하면 unnamed패키지에 자동으로 속함
// 3.3 클래스패스 설정
// 원래는 메모장같은 곳에 써서 jdk 하위 폴더에 만들어서 cmd창에서 컴파일 및 실행
// 이러면 classpath없이도 알아서 class를 찾는다. 현재폴더에 대한 classpath는 자동생성이므로
// 그러나 새로운 패키지를 만들게 되면, 그 상위 폴더의 루트를 classpath에 저장해야 class파일을 찾을 수 있음.
// 그러면 현재폴더 경로가 자동생성이 안되므로, .도 함께 추가해줘야 함.
// path에 jdk\bin 설정한 이유는 OS가 파일의 위치를 파악하기 위함.
// 저 디렉토리안에 있는 애들은 classpath 설정 필요치 않음.
// 3.4 import문
// 사용할 클래스가 속한 패키지 지정 시 사용 -> 매번 패키지 명을 붙일 필요가 없어짐.
// ctrl+shift+o 누르면 알아서 추가
// 3.5 선언
// import 패키지면.* -> 패키지에 속한 클래스 전부 사용가능
// But 패키지안 패키지안 클래스를 쓸 수 있는 것은 아님!!!!!
// 이름이 같으면 패키지명을 붙여줘야 함!!!!!
// System이나 String클래스는 java.lang패키지에 있는 것!!
// 빈번하게 사용되는 패키지라 묵시적으로 선언되어 있음 이미
// 3.6 static import문
// 패키지 하위의 클래스의 static멤버들을 호출할 때 클래스이름까지 생략가능
}
}
<file_sep>/src/ch6/ObjLesson9.java
package ch6;
public class ObjLesson9 {
public static void main(String[] args) {
// 6.1 변수의 초기화
// 인스턴스나 클래스변수는 알아서 초기화되지만,
// 지역변수는 반드시 초기화해줘야 함!!
// 6.2 명시적 초기화 - 우리가 아는 거
// 6.3 초기화 블럭
// 조건, 반복 등 다 사용 가능
// 왜 사용하냐? 모든 생성자에서 공통으로 수행왜야 하는 코드를 넣을 때
// 객체지향의 목표는 재사용성 높이고, 중복을 제거하는 것이기에.
System.out.println("BlockTest b1 = new BlockTest();");
BlockTest b1 = new BlockTest();
System.out.println("BlockTest b2 = new BlockTest();");
BlockTest b2 = new BlockTest();
// 아마 클래스가 사용됐는지 판단을 하고 넘어가는 듯.
// 일단 생성자 전에 생성되는 것은 맞다
// 정리 : 초기화 순서
// 클래스 : 명시적 -> 초기화 블럭
// 인스턴스 : 명시적 -> 초기화 블럭 -> 생성자
// 6.4 멤버변수의 초기화 시기와 순서 -> 피피티보고 설명
}
}
class BlockTest{
static {
System.out.println("Static { }");
}
{
System.out.println("{ }");
}
public BlockTest() {
System.out.println("생성자");
}
}
<file_sep>/src/ch6/ObjLesson4.java
package ch6;
public class ObjLesson4 {
public static void main(String[] args) {
// JVM의 구조를 이해하자.
System.out.println("main메서드가 실행되었음");
firstMethod();
System.out.println("main메서드가 종료되었음");
}
static void firstMethod() {
System.out.println("firstMethod가 실행되었음");
secondMethod();
System.out.println("firstMethod가 종료되었음");
}
static void secondMethod() {
System.out.println("secondMethod가 실행되었음");
System.out.println("secondMethod가 종료되었음");
}
// 그치 static은 인스턴스 생성 없이도 메모리에 올라오니 인스턴스 메서드는 호출할 수 없지
}
<file_sep>/src/ch7/AbstractClass.java
package ch7;
public class AbstractClass {
public static void main(String[] args) {
// 6.1 추상클래스 : 미완성 메서드 포함
// 조상으로부터 상속받은 추상메서드 모두 구현해야 함.
// 강제성을 부여하기 위함.
// 6.3
// 메서드는 참조변수 타입에 영향받지 않는다는 것 상기
// 추상메서드가 아닌 구현된 메서드 실행하는 것임.
// Object[] group = new Object[4];는 될까?
}
}
/*
abstract class Unit {
int x,y;
abstract void move(int x, int y);
void stop() {};
}
class Marine extends Unit {
void move(int x,int y) { };
void stimPack() {};
}
class Tank extends Unit {
void move(int x,int y) { };
void changemode() {};
}
class Dropship extends Unit {
void move(int x,int y) { };
void load() {};
void unload() {};
}
*/
|
b12193382806c19c7821619c1e8370a411b81e3c
|
[
"Java"
] | 19
|
Java
|
IASAStudy/CodeForJava
|
8dc83ca24ef0379c9d326c4bfb78aa2efb2c8159
|
ad21f4b076f2c67d02a907e678ff0b2ca23fd41a
|
refs/heads/master
|
<repo_name>fmorriso/APM-communication<file_sep>/README.md
# APM Component Communication
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.7.1 and Angular 5.2.6.
## My GitHub
[My GitHub](https://github.com/fmorriso/APM-communication)
## Modifications
* Upgraded Angular-CLI to 1.7.1
* Upgraded Angular to 5.2.7
* Upgraded Bootstrap to 4.0.0
* Changed style from CSS to SCSS to better mesh with Bootstrap 4.x
* Override of Bootstrap 4.0 variables via _variables.scss
* Added Font Awesome to replace old Bootstrap 3.x icons no longer included with Bootstrap 4.x
* Converted all Bootstrap 3.x Panel to Card
* Converted Bootstrap 3.x navigation to Bootstrap 4.x navigation, including "hamburger stack" collapse click event.
* Put Angular routes into separate variables of type Routes.
## Developer Notes
Notes taken starting in early February 2018
### <NAME>
[Problem Solver](http://blogs.msmvps.com/deborahk/angular-component-communication-problem-solver)
[GitHub](https://github.com/DeborahK/Angular-Communication)
## Missing dependency in package.json
"angular-in-memory-web-api": "latest",
## Replace Glyphicons with Font-Awesome
[tutorial](https://medium.com/@beeman/tutorial-add-bootstrap-to-angular-cli-apps-b0a652f2eb2)
### Using Font-Awesome SCSS in Angular-CLI
[reference](https://github.com/angular/angular-cli/blob/master/docs/documentation/stories/include-font-awesome.md#using-sass)
1. Create an empty file named `_variables.scss` in src/.
1. Add the following to `_variables.scss`:
```
$fa-font-path : '../node_modules/font-awesome/fonts';
```
1. In styles.scss add the following:
```
@import 'variables';
@import '../node_modules/font-awesome/scss/font-awesome';
```
## Port in Use error and work-around (no longer needed: Angular-CLI 1.7.1 fixed it)
https://github.com/angular/angular-cli/issues/4201
```
netstat -a -o -n
taskkill /F /PID nnnnn
```
### PowerShell script reference
https://gallery.technet.microsoft.com/scriptcenter/Get-NetworkStatistics-66057d71
https://blogs.technet.microsoft.com/heyscriptingguy/2015/08/19/parsing-netstat-information-with-powershell-5/
## Bootstrap 4 references
[doc](https://getbootstrap.com/)
[blog](https://blog.getbootstrap.com/)
[Text sizing](https://getbootstrap.com/docs/4.0/utilities/sizing/)
## angular-ngrx-data - simplify use of ngRx pattern
[introduction](https://github.com/johnpapa/angular-ngrx-data/blob/master/docs/introduction.md#introduction-to-ngrx-data)
[github](https://github.com/johnpapa/angular-ngrx-data)
<file_sep>/src/app/home/menu.component.ts
import { Component, OnInit, ElementRef, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { AuthService } from '../user/auth.service';
@Component({
selector: 'pm-menu',
templateUrl: './menu.component.html',
styleUrls: ['./menu.component.scss']
})
export class MenuComponent implements OnInit {
@ViewChild('navbarToggler') navbarToggler: ElementRef;
pageTitle: string = 'Acme Product Management';
get isLoggedIn(): boolean {
return this.authService.isLoggedIn();
}
get userName(): string {
if (this.authService.currentUser) {
return this.authService.currentUser.userName;
}
return '';
}
constructor(private router: Router,
private authService: AuthService) { }
ngOnInit() {
}
logOut(): void {
this.authService.logout();
this.router.navigate(['/welcome']);
}
// collapse the "hamburger stack" if it is currently expanded.
// Should be called on the click event of each navigation anchor.
// Example:
/*
<li class="nav-item" routerLinkActive="active">
<a (click)="collapseNav()" class="nav-link" [routerLink]="['/home']">Home</a>
</li>
<li class="nav-item" routerLinkActive="active">
<a (click)="collapseNav()" class="nav-link" [routerLink]="['/about']">About</a>
</li>
*/
collapseNav() {
if (this.navBarTogglerIsVisible()) {
console.log('collapseNav in NavigationComponent clicking navbarToggler')
this.navbarToggler.nativeElement.click();
}
}
private navBarTogglerIsVisible() {
const isVisible: boolean = (this.navbarToggler.nativeElement.offsetParent !== null);
return isVisible;
}
}
<file_sep>/src/app/home/welcome.component.ts
import {Component, VERSION} from '@angular/core';
@Component({
templateUrl: './welcome.component.html',
styleUrls: ['./welcome.component.scss']
})
export class WelcomeComponent {
public pageTitle: string = 'Welcome';
public angularVersion: string = VERSION.full;
}
|
9a98f2ab00daaf20083fb375984a8696fbda3ba9
|
[
"Markdown",
"TypeScript"
] | 3
|
Markdown
|
fmorriso/APM-communication
|
cde5c43b0bd32b4bfe67f2945c76e78cf7d30d19
|
d12d9c2c95ee2d31c8ed474f0c90420d59756521
|
refs/heads/master
|
<repo_name>Spiznasm/ruby_exercises<file_sep>/bubble_sort.rb
def bubble_sort(arr)
sorted = false
iteration_length = arr.length - 1
while sorted == false
sorted = true
(0..iteration_length).each do |index|
if index == iteration_length
iteration_length -= 1
elsif arr[index] <= arr[index+1]
nil
else
item = arr[index]
arr[index]=arr[index + 1]
arr[index+1]=item
sorted = false
end
end
end
return arr
end
def bubble_sort_by(arr)
#accepts a block that defines what is a proper order.
#The block should have a negative return value if the items are in correct order.
sorted = false
iteration_length = arr.length - 1
while sorted == false
sorted = true
(0..iteration_length).each do |index|
if index == iteration_length
iteration_length -= 1
elsif yield(arr[index],arr[index+1]) < 0
nil
else
item = arr[index]
arr[index]=arr[index + 1]
arr[index+1]=item
sorted = false
end
end
end
return arr
end
<file_sep>/stock_picker.rb
def stockpicker(stocks)
if stocks.class == Array
best_pair = []
max_profit = 0
(0..(stocks.length-1)).each do |idx|
if idx < stocks.length
((idx+1)..(stocks.length-1)).each do |other_idx|
# puts "current choices #{idx} and #{other_idx}."
profit = stocks[other_idx]-stocks[idx]
# puts profit
if profit > max_profit
max_profit = profit
best_pair = [idx,other_idx]
# print max_profit,best_pair
end
end
end
end
end
return "Buy on day #{best_pair[0]+1} and sell on #{best_pair[1]+1} for a max profit of $#{max_profit}."
end
<file_sep>/recursive_functions.rb
#1,1,2,3,5,8,13,21...
#1,2,3,4,5,6,7, 8...
def fibs(n)
starter = [1,1]
if n <= 2
return starter[0..n-1]
else
(0..n-3).each do |idx|
starter.push(starter[idx]+starter[idx+1])
end
end
return starter
end
def fibs_rec(n)
return [1] if n ==1
return [1,1] if n == 2
return fibs_rec(n-1).push(fibs_rec(n-1)[n-3]+fibs_rec(n-1)[n-2])
end
=begin
merge helper function
Compares 2 inputs to see if they are sorted.
Returns true if item1 comes before item2
=end
def input_compare(item1, item2)
if item1.class == Fixnum || item2.class == Fixnum
if item1.to_s < item2.to_s
return true
else
return false
end
else
if item1.length == 0 || item1.to_s[0] < item2.to_s[0]
return true
elsif item2.length == 0 || item1.to_s[0] > item2.to_s[0]
return false
else
return input_compare(item1[1..-1],item2[1..-1])
end
end
end
=begin
merge_sort helper function
Merge two sorted lists.
Returns a new sorted list containing those elements that are in
either list1 or list2.
=end
def merge(list1, list2)
working_list1 = list1.clone
working_list2 = list2.clone
new_list = []
while working_list1 != [] and working_list2 != []
if input_compare(working_list1[0],working_list2[0]) == true
item_to_add = working_list1.shift
else
item_to_add = working_list2.shift
end
new_list.push(item_to_add)
end
if working_list1 == []
working_list2.each {|item| new_list.push(item)}
elsif working_list2 == []
working_list1.each {|item| new_list.push(item)}
end
return new_list
end
def merge_sort(list1)
if list1.length == 0
return []
elsif list1.length == 1
return list1
elsif list1.length == 2
return merge([list1[0]],[list1[1]])
else
new_list1 = merge([list1[0]],[list1[1]])
new_list2 = merge_sort(list1[2..-1])
return merge(new_list1,new_list2)
end
end
<file_sep>/enumerable_methods.rb
module Enumerable
def my_each
for i in self
yield i
end
self
end
def my_each_with_index
for i in (0...self.length)
yield self[i], i
end
self
end
def my_select
selected = []
self.my_each { |mem| selected<<mem if yield mem}
selected
end
def my_all?
if block_given?
self.length == self.my_select {|mem| yield mem}.length
else
true
end
end
def my_any?
if block_given?
self.my_select {|mem| yield mem}.length >0
else
true
end
end
def my_none?
if block_given?
self.my_select {|mem| yield mem}.length == 0
else
false
end
end
def my_count
if block_given?
self.my_select {|mem| yield mem}.length
else
self.length
end
end
def my_map &block
mapped = []
self.my_each do |mem|
mapped << block.call(mem)
end
return mapped
end
def my_inject(result = nil)
if result == nil
result = self[0]
idx = 1
else
idx = 0
end
while idx < self.length
result = yield(result,self[idx])
idx += 1
end
result
end
end
def multiply_els(arr)
arr.my_inject {|x,y| x*y }
end
<file_sep>/mastermind.rb
class Board
require 'active_support/core_ext/integer/inflections'
attr_accessor :code, :guesses
def initialize
@code = []
@guesses = 0
@game_status = "active"
@game_type = "guesser"
@markers = []
end
def start_game
self.reset
puts "Enter 1 to guess or 2 to set the code"
option = gets.to_i
if option == 1
@game_type = "guesser"
elsif option == 2
@game_type = "chooser"
else
puts "Invalid Choice"
self.start_game
end
if @game_type == "guesser"
(1..4).each do
@code.push (1 + rand(6))
end
self.guesser_game
else
self.set_code
end
end
def set_code
puts "Choose 4 numbers 1 to 6 separated by a space"
gets.split.each { |choice| @code.push(choice.to_i) }
if @code.length !=4
puts "Incorrect code length"
@code = []
self.set_code
else
self.verify_choices
end
end
def verify_choices
(0..3).each do |idx|
if @code[idx].between?(1,6)
next
else
puts "Your #{(idx + 1).ordinalize} choice of #{@code[idx]} is not valid please choose a new choice between 1 and 6"
@code[idx] = gets.to_i
self.verify_choices
end
end
end
def reset
@code = []
@guesses = 0
@markers = []
end
def get_guess(position)
guess = 0
until guess.between?(1,6)
puts "What is in the #{position.ordinalize} position? (choose between 1 and 6)"
guess = gets.to_i
end
return guess
end
def check_guess(guess)
matched = []
@markers = []
#check for exact matches
(0..3).each do |idx|
if @code[idx]==guess[idx]
matched.push(idx)
@markers.push("black")
end
end
#check for win
if matched.length == 4
self.win
#check for correct choice in wrong position
else
unmatched = @code.dup
matched.reverse.each {|idx| unmatched.delete_at(idx)}
(0..3).each do |idx|
if unmatched.include?(guess[idx])
@markers.push("white")
unmatched.delete_at(unmatched.index(guess[idx]))
end
end
end
end
def win
@game_status = "inactive"
puts "You have chosen wisely, congratulations the code was #{@code}."
end
def lose
@game_status = "inactive"
puts "You failed to correctly guess the pattern. It was #{@code}."
end
def turn
if @guesses == 12
self.lose
else
current_guess = []
(1..4).each {|pos| current_guess.push(self.get_guess(pos))}
self.check_guess(current_guess)
self.show_marker
@guesses += 1
puts "#{12 - guesses} more tries."
end
end
def show_marker
puts @markers.join(" ")
end
def guesser_game
while @game_status == "active"
self.turn
end
end
end
<file_sep>/TicTacToe.rb
#Tic Tac Toe Game
class Board
attr_accessor :game_status, :current_board, :current_move, :current_player, :empty_board
@@empty_board = [["_","_","_"],["_","_","_"],["_","_","_"]]
@@diagonals = [[0,0],[2,0],[0,2],[2,2],[1,1]]
@@diagonal_down = [[0,0],[1,1],[2,2]]
@@diagonal_up = [[2,0],[1,1],[0,2]]
def initialize
@current_board = @@empty_board
@current_move = []
@current_player = "X"
@game_status = "active"
end
def place_symbol
@current_board[@current_move[0]][@current_move[1]] = @current_player
end
def display_board
@current_board.each { |row| puts row.join(" ") }
end
def reset
@game_status = "active"
@current_board = [["_","_","_"],["_","_","_"],["_","_","_"]]
end
def get_move
puts "Which row?"
temp_row = gets.to_i
puts "Which column?"
temp_col = gets.to_i
@current_move[0] = temp_row - 1
@current_move[1] = temp_col - 1
end
def verify
if @current_board[@current_move[0]][@current_move[1]] == "_"
@current_move.each do |choice|
if choice.between?(0,2)
next
else
puts "Invalid move, choose rows and columns between 1 and 3"
self.get_move
self.verify
end
end
else
puts "That move has already been used please choose again"
self.get_move
self.verify
end
end
def switch_player
if @current_player == "X"
@current_player = "O"
else
@current_player = "X"
end
end
def start_game
self.reset
while @game_status == "active"
self.display_board
self.get_move
self.verify
self.place_symbol
if self.check_win == true
@game_status = "inactive"
self.display_board
puts "#{@current_player} wins"
end
self.switch_player
end
end
def check_win
if @current_move == []
return false
else
move_row = @current_move[0]
move_col = @current_move[1]
if (@current_board[move_row][0] == @current_board[move_row][1] && @current_board[move_row][1] == @current_board[move_row][2]) ||
(@current_board[0][move_col] == @current_board[1][move_col] && @current_board[1][move_col] == @current_board[2][move_col])
return true
elsif @@diagonal_up.include? @current_move
@current_board[2][0]==@current_board[1][1]&&@current_board[1][1]==@current_board[0][2] ? true : false
elsif @@diagonal_down.include? @current_move
@current_board[0][0]==@current_board[1][1]&&@current_board[1][1]==@current_board[2][2] ? true : false
else
return false
end
end
end
end
<file_sep>/substrings.rb
def substrings(sentence,dictionary)
results = Hash.new(0)
sentence.scan(/[A-Za-z]+/).each do |word|
if dictionary.include? word.downcase
results[word.downcase]+=1
end
end
return results
end
<file_sep>/caesar_cipher.rb
def caesar_cipher
puts "What text do you want to code?"
text = gets.chomp.to_s
puts "How far do you want to shift?"
shift = gets.chomp.to_i
#puts text
#puts shift
letters = text.split("")
letter_values = Hash.new
#p letters
('a'..'z').zip(0..25).each do |pair|
letter_values[pair[1]]=pair[0]
letter_values[pair[0]]=pair[1]
end
#puts letter_values
shifted_string=""
letters.each do |letter|
#puts letter
if letter.match(/[^a-zA-Z]/)
shifted_string << letter
elsif letter.match(/[A-Z]/)
shifted_string << letter_values[(letter_values[letter.downcase]-shift)%26].upcase
else
shifted_string << letter_values[(letter_values[letter]-shift)%26]
end
end
puts shifted_string
end
<file_sep>/test_file.rb
x = 2
print "This program is running okay if 2+2 = #{x+x}"
<file_sep>/linked_lists.rb
class LinkedList
def initialize
@list = []
end
def append(data=nil)
@list.push(Node.new(data))
if @list.length > 1
@list[-2].next_node = @list[-1]
end
end
def preapend(data=nil)
@list.unshift(Node.new(data))
if @list.length > 1
@list[0].next_node = @list[1]
end
end
def size
@list.length
end
def head
@list.length == 0 ? nil : @list[0]
end
def tail
@list.length == 0 ? nil : @list[-1]
end
def at(index)
@list[index]
end
def pop
@list.pop
@list[-1].next_node = nil
end
def contains?(value)
!(@list.all? {|node| node.value != value})
end
def find(data)
position = nil
@list.each_with_index do |node,index|
if node.value == data
position = index
end
end
return position
end
def to_s
if @list.length == 0
return "nil"
else
str = ""
@list.each {|node| str += ("("+node.value.to_s+") -> ")}
str += "nil"
return str
end
end
def insert_at(data,index)
@list.insert(index,Node.new(data,@list[index+1]))
@list[index-1].next_node = @list[index]
end
def remove_at(index)
@list[index-1].next_node = @list[index].next_node
@list.delete_at(index)
end
end
class Node
attr_accessor :value, :next_node
def initialize(value = nil,next_node = nil)
@value = value
@next_node = next_node
end
end
<file_sep>/analyzer.rb
lines = File.readlines(ARGV[0])
line_count = lines.size
text = lines.join
stopwords = %w{the a by on for of are with just but and to the my I has some in}
#basic statistics
total_characters = text.length
total_characters_nospaces = text.gsub(/\s+/,'').length
word_count = text.split.length
sentence_count = text.split(/\.|\?|!/).length
paragraph_count = text.split(/\n\n/).length
sentence_per_paragraph = sentence_count/paragraph_count
words_per_sentence = word_count/sentence_count
#array of words
words = text.scan(/\w+/)
#next two are identical but with different methods
keywords = words.select {|word| !stopwords.include?(word)}
good_words = words.reject {|word| stopwords.include?(word)}
good_percentage = ((good_words.length.to_f / words.length.to_f)*100).to_i
#variables needed to produce a summary
#array of sentences
sentences = text.gsub(/\s+/, ' ').strip.split(/\.|\?|!/)
sentences_sorted = sentences.sort_by { |sentence| sentence.length }
one_third = sentences_sorted.length / 3
#select sentences starting at 'one_third' index and pull 'one_third + 1' count
ideal_sentences = sentences_sorted.slice(one_third, one_third + 1)
#only select those that contain is or are
ideal_sentences = ideal_sentences.select { |sentence| sentence =~ /is|are/ }
#puts ideal_sentences.join(". ")
puts "#{line_count} lines."
puts "#{total_characters} characters."
puts "#{total_characters_nospaces} characters (excluding spaces)."
puts "#{word_count} words."
puts "#{sentence_count} sentences."
puts "#{paragraph_count} paragraphs."
puts "#{sentence_per_paragraph} sentences per paragraph (average)."
puts "#{words_per_sentence} words per sentence (average)."
puts "#{good_percentage}% of words are non-fluff words"
puts "Summary:\n\n" + ideal_sentences.join(". ")
puts "-- End of analysis"
|
811c6d1c5a7ec6337206177701954352425d9441
|
[
"Ruby"
] | 11
|
Ruby
|
Spiznasm/ruby_exercises
|
99633d91c3e52e3d3b68f366d7f09958158516dc
|
28fe052c344534d2bfcc69265ca580c4046891fd
|
refs/heads/master
|
<repo_name>ElijahBouchard/pygame<file_sep>/Player.py
import pygame
walkRight = [pygame.image.load('walkRight/R0.png'), pygame.image.load('walkRight/R1.png'), pygame.image.load('walkRight/R2.png'), pygame.image.load('walkRight/R3.png'), pygame.image.load('walkRight/R4.png')]
walkLeft = [pygame.image.load('walkLeft/L0.png'), pygame.image.load('walkLeft/L1.png'), pygame.image.load('walkLeft/L2.png'), pygame.image.load('walkLeft/L3.png'), pygame.image.load('walkLeft/L4.png')]
walkUp = [pygame.image.load('walkUp/U0.png'), pygame.image.load('walkUp/U1.png'), pygame.image.load('walkUp/U2.png'), pygame.image.load('walkUp/U3.png'), pygame.image.load('walkUp/U4.png')]
walkDown = [pygame.image.load('walkDown/D0.png'), pygame.image.load('walkDown/D1.png'), pygame.image.load('walkDown/D2.png'), pygame.image.load('walkDown/D3.png'), pygame.image.load('walkDown/D4.png')]
walkUpRight = [pygame.image.load('walkUpRight/UR0.png'), pygame.image.load('walkUpRight/UR1.png'), pygame.image.load('walkUpRight/UR2.png'), pygame.image.load('walkUpRight/UR3.png'), pygame.image.load('walkUpRight/UR4.png')]
walkUpLeft = [pygame.image.load('walkUpleft/UL0.png'), pygame.image.load('walkUpleft/UL1.png'), pygame.image.load('walkUpleft/UL2.png'), pygame.image.load('walkUpleft/UL3.png'), pygame.image.load('walkUpleft/UL4.png')]
walkDownRight = [pygame.image.load('walkDownRight/DR0.png'), pygame.image.load('walkDownRight/DR1.png'), pygame.image.load('walkDownRight/DR2.png'), pygame.image.load('walkDownRight/DR3.png'), pygame.image.load('walkDownRight/DR4.png')]
walkDownLeft = [pygame.image.load('walkDownLeft/DL0.png'), pygame.image.load('walkDownLeft/DL1.png'), pygame.image.load('walkDownLeft/DL2.png'), pygame.image.load('walkDownLeft/DL3.png'), pygame.image.load('walkDownLeft/DL4.png')]
char = pygame.image.load('idle/up.png')
charDown = pygame.image.load('idle/down.png')
charLeft = pygame.image.load('idle/left.png')
charRight = pygame.image.load('idle/right.png')
charUpRight = pygame.image.load('idle/upright.png')
charUpLeft = pygame.image.load('idle/upleft.png')
charDownRight = pygame.image.load('idle/downright.png')
charDownLeft = pygame.image.load('idle/downleft.png')
#Player Class
class player(object):
def __init__(self, x, y, width, height):
self.x = x
self.y = y
self.width = width
self.height = height
self.health = 100
self.vel = 10
self.hitbox = (self.x + 6, self.y + 6, 19, 19)
self.left = False
self.right = False
self.up = False
self.down = False
self.moving = False
self.walkCount = 0
def draw(self, win):
if self.walkCount + 1 >= 5:
self.walkCount = 0
if not self.moving:
if self.right:
if self.up:
win.blit(charUpRight, (self.x,self.y))
elif self.down:
win.blit(charDownRight, (self.x,self.y))
else:
win.blit(charRight, (self.x,self.y))
elif self.left:
if self.up:
win.blit(charUpLeft, (self.x,self.y))
elif self.down:
win.blit(charDownLeft, (self.x,self.y))
else:
win.blit(charLeft, (self.x,self.y))
elif self.up:
if self.right:
win.blit(charUpRight, (self.x,self.y))
elif self.left:
win.blit(charUpLeft, (self.x,self.y))
else:
win.blit(char, (self.x,self.y))
elif self.down:
if self.right:
win.blit(charDownRight, (self.x,self.y))
elif self.left:
win.blit(charDownLeft, (self.x,self.y))
else:
win.blit(charDown, (self.x,self.y))
else:
win.blit(char, (self.x,self.y))
else:
if self.right:
if self.up:
win.blit(walkUpRight[self.walkCount], (self.x,self.y))
elif self.down:
win.blit(walkDownRight[self.walkCount], (self.x,self.y))
else:
win.blit(walkRight[self.walkCount], (self.x,self.y))
self.walkCount += 1
elif self.left:
if self.up:
win.blit(walkUpLeft[self.walkCount], (self.x,self.y))
elif self.down:
win.blit(walkDownLeft[self.walkCount], (self.x,self.y))
else:
win.blit(walkLeft[self.walkCount], (self.x,self.y))
self.walkCount += 1
elif self.up:
if self.right:
win.blit(walkUpRight[self.walkCount], (self.x,self.y))
elif self.left:
win.blit(walkUpLeft[self.walkCount], (self.x,self.y))
else:
win.blit(walkUp[self.walkCount], (self.x,self.y))
self.walkCount += 1
elif self.down:
if self.right:
win.blit(walkDownRight[self.walkCount], (self.x,self.y))
elif self.left:
win.blit(walkDownLeft[self.walkCount], (self.x,self.y))
else:
win.blit(walkDown[self.walkCount], (self.x,self.y))
self.walkCount += 1
self.hitbox = (self.x + 6, self.y + 6, 19, 19)
#pygame.draw.rect(win, (255, 0, 0), self.hitbox, 2)
<file_sep>/UI.py
import pygame
ui_reload = [pygame.image.load('ui_reload/R0.png'), pygame.image.load('ui_reload/R1.png'), pygame.image.load('ui_reload/R2.png'), pygame.image.load('ui_reload/R3.png'), pygame.image.load('ui_reload/R4.png'), pygame.image.load('ui_reload/R5.png')]
ui = pygame.image.load('UI.png')
screenWidth = 500
screenHeight = 500
#UI Class
class ui(object):
def __init__(self, x, y, pos):
self.x = x
self.y = y
self.pos = 0
self.reload = False
def draw(self, win):
if(self.reload):
for x in range(6):
win.blit(ui_reload[x], (self.x,self.y))
else:
win.blit(ui_reload[self.pos], (0, screenHeight - 100))
<file_sep>/AI.py
import pygame
#Enemy Class
class enemy(object):
walkRight = [pygame.image.load('enemy/walkRight/R0.png'), pygame.image.load('enemy/walkRight/R1.png'), pygame.image.load('enemy/walkRight/R2.png'), pygame.image.load('enemy/walkRight/R3.png'), pygame.image.load('enemy/walkRight/R4.png')]
walkLeft = [pygame.image.load('enemy/walkLeft/L0.png'), pygame.image.load('enemy/walkLeft/L1.png'), pygame.image.load('enemy/walkLeft/L2.png'), pygame.image.load('enemy/walkLeft/L3.png'), pygame.image.load('enemy/walkLeft/L4.png')]
walkUp = [pygame.image.load('enemy/walkUp/U0.png'), pygame.image.load('enemy/walkUp/U1.png'), pygame.image.load('enemy/walkUp/U2.png'), pygame.image.load('enemy/walkUp/U3.png'), pygame.image.load('enemy/walkUp/U4.png')]
walkDown = [pygame.image.load('enemy/walkDown/D0.png'), pygame.image.load('enemy/walkDown/D1.png'), pygame.image.load('enemy/walkDown/D2.png'), pygame.image.load('enemy/walkDown/D3.png'), pygame.image.load('enemy/walkDown/D4.png')]
def __init__(self, x, y, width, height, length, health):
self.x = x
self.y = y
self.width = width
self.height = height
self.length = length
self.health = health
self.hitbox = (self.x + 6, self.y + 6, 28, 60)
self.initial_x = x
self.initial_y = y
self.path = [self.x - self.length, self.x + self.length]
self.walkCount = 0
self.vel = 5
def draw(self,win):
self.move()
if self.walkCount + 1 == 5:
self.walkCount = 0
if self.vel > 0:
win.blit(self.walkRight[self.walkCount], (self.x, self.y))
self.walkCount += 1
else:
win.blit(self.walkLeft[self.walkCount], (self.x, self.y))
self.walkCount += 1
self.hitbox = (self.x + 6, self.y + 6, 19, 19)
#pygame.draw.rect(win, (255, 0, 0), self.hitbox, 2)
def move(self):
if self.vel > 0:
if self.x + self.vel < self.path[1]:
self.x += self.vel
else:
self.vel = self.vel * -1
self.walkCount = 0
else:
if self.x - self.vel > self.path[0]:
self.x += self.vel
else:
self.vel = self.vel * -1
self.walkCount = 0
def hit(self):
print('hit')
pass
<file_sep>/AlphaV0.0.1.py
import pygame
import socket, asyncore
from Player import player
from Projectile import projectile
from AI import enemy
from UI import ui
pygame.init()
#SOCKET
'''class HTTPClient(asyncore.dispatcher):
def __init__(self, host, path):
asyncore.dispatcher.__init__(self)
self.create_socket()
self.connect( (host, 85) )
self.buffer = bytes('GET %s HTTP/1.0\r\nHost: %s\r\n\r\n' %
(path, host), 'ascii')
def handle_connect(self):
pass
def handle_close(self):
self.close()
def handle_read(self):
print(self.recv(8192))
def writable(self):
return (len(self.buffer) > 0)
def handle_write(self):
sent = self.send(self.buffer)
self.buffer = self.buffer[sent:]
client = HTTPClient('localhost', '/')
asyncore.loop()
print('PASS')'''
#Constants
screenWidth = 500
screenHeight = 500
#ANIMATION
bg = pygame.image.load('background.png')
clock = pygame.time.Clock()
#Creates Window
win = pygame.display.set_mode((screenWidth, screenHeight))
#Sets Caption
pygame.display.set_caption("AlphaV0.0.1")
#Inventory Class
class inventory(object):
def __init__(self, x, y):
self.x = x
self.y = y
def search():
pass
def draw(self, win):
pass
#Redraw Function
def redrawGameWindow():
win.blit(bg, (0,0))
ui.draw(win)
ai.draw(win)
player.draw(win)
for bullet in bullets:
bullet.draw(win)
pygame.display.update()
#Game Loop
player = player(100, 100, 32, 32)
ui = ui(0, screenHeight - 100, 0)
ai = enemy(250, 250, 32, 32, 100, 50)
shootLoop = 0
ammo = 0
options = 0
reload = False
bullets = []
run = True
while run:
clock.tick(15)
if ammo == 5:
reload = True
if shootLoop > 0:
shootLoop += 1
if shootLoop > 3:
shootLoop = 0
#QUIT GAME LOOP
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
#ACTIONS CONDITIONALS
keys = pygame.key.get_pressed()
mouse_buttons = pygame.mouse.get_pressed()
#SHOOTING LOOP
for bullet in bullets:
if bullet.y - bullet.radius < ai.hitbox[1] + ai.hitbox[3] and bullet.y + bullet.radius > ai.hitbox[1]:
if bullet.x + bullet.radius > ai.hitbox[0] and bullet.x - bullet.radius < ai.hitbox[0] + ai.hitbox[2]:
ai.hit()
bullets.pop(bullets.index(bullet))
#OLD MECHANISM FOR SHOOTING
if bullet.x < screenWidth and bullet.x > 0:
if bullet.facing == 2:
bullet.x += bullet.vel
elif bullet.facing == 3:
bullet.x -= bullet.vel
elif bullet.facing == 4:
bullet.x -= bullet.vel
bullet.y -= bullet.vel
elif bullet.facing == 6:
bullet.x += bullet.vel
bullet.y -= bullet.vel
else:
bullets.pop(bullets.index(bullet))
if bullet.y < screenHeight - 100 - bullet.vel and bullet.y > 0:
if bullet.facing == 0:
bullet.y -= bullet.vel
elif bullet.facing == 1:
bullet.y += bullet.vel
elif bullet.facing == 4:
bullet.x -= bullet.vel
#bullet.y -= bullet.vel
elif bullet.facing == 6:
bullet.x += bullet.vel
bullet.y -= bullet.vel
else:
bullets.pop(bullets.index(bullet))
facing = 0
if keys[pygame.K_SPACE] and shootLoop == 0 and ammo < 5:
if player.left:
if player.up:
facing = 4 #Facing Up Left
elif player.down:
facing = 5 #Facing Down Left
else:
facing = 3 #Facing Left
elif player.right:
if player.up:
facing = 6 #Facing Up Right
elif player.down:
facing = 7 #Facing Down Right
else:
facing = 2 #Facing Right
elif player.down:
if player.left:
facing = 5 #Facing Down Left
elif player.right:
facing = 7 #Facing Down Right
else:
facing = 1 #Facing Down
elif player.up:
if player.right:
facing = 6 #Facing Up Right
elif player.left:
facing = 4 #Facing Up Left
else:
facing = 0 #Facing Up
ammo += 1
shootLoop = 1
if len(bullets) < 5:
if facing == 3:
bullets.append(projectile(round(player.x - 18 + player.width //2), round(player.y + player.height //2), 2, (0,0,0), facing))
ui.pos = ammo
elif facing == 2:
bullets.append(projectile(round(player.x + 18 + player.width //2), round(player.y + player.height //2), 2, (0,0,0), facing))
ui.pos = ammo
elif facing == 1:
bullets.append(projectile(round(player.x + player.width //2), round(player.y + 18 + player.height //2), 2, (0,0,0), facing))
ui.pos = ammo
elif facing == 0:
bullets.append(projectile(round(player.x + player.width //2), round(player.y - 18 + player.height //2), 2, (0,0,0), facing))
ui.pos = ammo
elif facing == 4:
bullets.append(projectile(round(player.x - 18 + player.width //2), round(player.y - 18 + player.height //2), 2, (0,0,0), facing))
ui.pos = ammo
#RELOADING LOOP
if keys[pygame.K_r] and reload:
for x in range(5):
ammo -=1
ui.pos = ammo
reload = False
#MOVEMENT CONDITIONALS
if keys[pygame.K_w] and player.y > player.vel:
player.y -= player.vel
player.right = False
player.left = False
player.up = True
player.down = False
if keys[pygame.K_d] and player.x < screenWidth - player.width - player.vel and player.y < player.vel:
player.x += player.vel
player.right = True
player.left = False
elif keys[pygame.K_a] and player.x > player.vel and player.y > player.vel:
player.x -= player.vel
player.left = True
player.right = False
player.moving = True
elif keys[pygame.K_s] and player.y < screenHeight - 100 - player.height - player.vel:
player.y += player.vel
player.right = False
player.left = False
player.up = False
player.down = True
if keys[pygame.K_d] and player.x < screenWidth - player.width - player.vel:
player.x += player.vel
player.right = True
player.left = False
elif keys[pygame.K_a] and player.x > player.vel:
player.x -= player.vel
player.left = True
player.right = False
player.moving = True
elif keys[pygame.K_a] and player.x > player.vel:
player.x -= player.vel
player.right = False
player.left = True
player.up = False
player.down = False
if keys[pygame.K_w] and player.x > player.vel and player.y > 0:
print('pass')
player.y -= player.vel
player.up = True
player.down = False
elif keys[pygame.K_s] and player.x > player.vel:
player.y += player.vel
player.down = True
player.up = False
player.moving = True
elif keys[pygame.K_d] and player.x < screenWidth - player.width - player.vel:
player.x += player.vel
player.right = True
player.left = False
player.up = False
player.down = False
if keys[pygame.K_w] and player.y > 0 and player.x < screenWidth - player.width - player.vel:
player.y -= player.vel
player.up = True
player.down = False
elif keys[pygame.K_s] and player.x < screenWidth - player.width - player.vel:
player.y += player.vel
player.down = True
player.up = False
player.moving = True
else:
player.walkCount = 0
player.moving = False
redrawGameWindow()
pygame.quit()
|
058056d198ff7c2b9182bf8fc6ebcc5d2fbeebd2
|
[
"Python"
] | 4
|
Python
|
ElijahBouchard/pygame
|
fb7d751fab5530785ad0db94013d7d60984175cc
|
7d2ecc7298fce239d648b314e834e6b00e74e5f9
|
refs/heads/master
|
<repo_name>osd-pwr/isat.pwr.edu.pl<file_sep>/include/menu13.php
<?
function home(){
echo '<div style="text-align: center; padding: 100px"> <h4 style="color: #204a88; font-size:17pt;">35th International Conference<br>
Information Systems Architecture and Technology</h4>
<p class="style2"><em><NAME>, POLAND<br>
SEPTEMBER 21-23, 2014</em></p> <br/>
<!-- Organized by:
<p>INSTITUTE OF INFORMATICS</p>
<p>and</p>
<p>INSTITUTE OF ORGANIZATION AND MANAGEMENT<br/><br/>
<p>FACULTY OF COMPUTER SCIENCE AND MANAGEMENT<br>
<strong>WROCŁAW UNIVERSITY OF TECHNOLOGY</strong></p>
<br/><br/><br/><br/><br/><br/><br/><br/><br/></div>-->
<br/>Organized by:<br/><br/>
<table style="border: 0px dotted; min-width: 100%;">
<tr>
<td style="min-width: 15%; vertical-align: middle; text-align: right;">
<img src="images/logo_ii.png" alt="" style="max-width: 85px;">
</td>
<td style="min-width: 25%; vertical-align: middle; text-align: left;">
<h3>Institute of Informatics</h3>
</td>
<td style="vertical-align: middle; min-width: 15%; text-align: right;">
<img src="images/logo_ioz.png" alt="" style="min-width: 90px;">
</td>
<td style="min-width: 25%; vertical-align: middle; text-align: left; padding: 0 0 0 15px;">
<h3>Institute of Organization and Management</h3>
</td>
</tr>
</table>
<p style="text-align: center;"><br/><br/>
<img src="images/logo_wiz_poziom.png" alt="" style="min-width: 100px; max-width:490px;"><br/>
<!-- <h3>Faculty of Computer Science and Management</h3>-->
</p>
</div>
';
}
function conference_info(){
//<div style="text-align:justify; padding:1cm">
echo '
<div style="text-align: justify; padding: 20px 20px 0px 30px;">
<h4>CALL FOR PAPERS</h4> <br/>
<p style="font-size: 12pt; text-align: center; border: 0px dotted #000; max-width: 400px; margin-left: auto; margin-right: auto; padding: 13px 0px 13px 0px;">
<img src="images/ico_pdf.gif" alt="CFP" width="16" height="16">
<a href="files/isat_2014_call_for_papers.pdf">CALL FOR PAPERS</a>
<!--
<span style=" font-size:11px; font-weight:bold;">The printable version will be available soon</span>
--> </p><br/>
<h4>CONFERENCE PURPOSE</h4>
<p style="text-indent: 1.5cm">The purpose of the ISAT is to discuss a state-of-art of information systems concepts and applications as well as architectures and technologies supporting contemporary information systems. The aim is also to consider an impact of knowledge, information, computing and communication technologies on managing of the organization scope of functionality as well as on enterprise information systems design, implementation and maintenance processes taking into account various methodological, technological and technical aspects. It is also devoted to information systems concepts and applications supporting exchange of goods and services by using different business models and exploiting opportunities offered by Internet-based electronic business and commerce solutions.</p>
<p style="text-indent: 1.5cm">ISAT is a forum for specific disciplinary research, as well as on multi-disciplinary studies to present original contributions and to discuss different subjects of today\'s information systems planning, designing, development and implementation.</p>
<p style="text-indent: 1.5cm"> The event is addressed to the scientific community, people involved in the development of business information systems, business computer applications, and to consultants helping implement information, computer and communication technologies. It is also addressed to people involved in teaching in variety of topics related to information, management, computer and communication systems. ISAT is also devoted as a form for presentation of scientific contributions prepared by MSc. and Ph.D. students. Business, Commercial and Industry participants are welcome.</p>
<br/>
Topics for publication and presentation can include, but are not limited to the following research and development areas/fields:
<ul class="list-1-k" style="padding: 0px 10px 10px 10px;">
<li style="font-weight:bold; background:none;">ANALYSIS</li>
<li>Big Data Systems and Applications</li>
<li>Fuzzy Logic, Reasoning and Computational Intelligence</li>
<li>Knowledge Discovery and Data Mining</li>
<li>Innovation Stock Exchange Analysis</li>
<li>Risk Management</li>
<li style="font-weight:bold; background:none;">BUSINESS</li>
<li>EBusiness and ECommerce Systems</li>
<li>Industrial Informatics</li>
<li>Market Models in Information and Communication Systems</li>
<li>Cooperation Between University And Business Units</li>
<li>New Management Models</li>
<li style="font-weight:bold; background:none;">COMMUNICATION NETWORKS</li>
<li>Cloud Computing Paradigms</li>
<li>Mobile Data Communications</li>
<li>Computer Networks Architectures, Standards, Services and Applications</li>
<li>Multimedia Perspectives and Applications</li>
<li>Smart Grid Development</li>
<li>Web Content Generation, Usage and Management</li>
<li>Web Design, Processing and Optimization</li>
<li>Web Information Systems</li>
<li>Web of Things</li>
<li>Web Service Architectures</li>
<li>Web Systems Engineering</li>
<li style="font-weight:bold; background:none;">COMPUTER SYSTEMS</li>
<li>Architecture of Computer Systems Supporting Intelligent Information Systems</li>
<li>Artificial Intelligence in Modern Information Systems</li>
<li>Cyber Security</li>
<li>Computer Human Interaction</li>
<li>Distributed Computer Systems</li>
<li>High Performance Computing</li>
<li>Quality of Service in Computer Systems and Networks</li>
<li>Security of Information and Computer Systems</li>
<li>Requirements and Models of Contemporary Management Information Systems</li>
<li>Sensor and Actuator Systems</li>
<li>Service Oriented Networked Systems</li>
<li>Smart Computing</li>
<li style="font-weight:bold; background:none;">FINANCE</li>
<li>Capital Structure Management</li>
<li>Investment and Risk Modeling</li>
<li>Models of Investment Decisions Making</li>
<li>Models of Financial Decisions Making</li>
<li>Models of Liquidity Management</li>
<li>Models of Risk Management</li>
<li>Real Option in Firms Valuation Process</li>
<li style="font-weight:bold; background:none;">INNOVATIONS</li>
<li>Emerging IT Technologies</li>
<li>Education, Open Leaning and Natural Language Processing</li>
<li>Forecasting Problems in Engineering, Economy and Management Systems</li>
<li>Impact of Technologies on Availability and Functionality of Information Systems</li>
<li>Information Systems Design and Implementation Supporting Tools</li>
<li>Intelligent Information Systems Concepts, Models, Services and Applications</li>
<li>Internet of Everything</li>
<li>Multiagent Technologies and Systems</li>
<li>Technology and Innovation Transfer</li>
<li style="font-weight:bold; background:none;">MANAGEMENT</li>
<li>Corporate Finance in the Aspect of Integration with European Union</li>
<li>Groupware Support for Information and Management Systems</li>
<li>IT Models for Organization Management</li>
<li>Ontology Modeling, Evolution, Engineering and Management</li>
<li>Project Management</li>
<li>System Analysis in the Design, Control and Decision Support</li>
<li>Telecommunication and Information Management</li>
<li>Value Based Management and Uncertainty</li>
</ul>
</div>
<br/><br/>
';
}
//</div>';
function committees(){
echo '
<div style="text-align: justify; padding: 20px 0px 0px 30px">
<h4>ORGANIZING COMMITTEE:</h4>
<ul style="font-size:12px; list-style: disc; line-height: 26px; padding:0px 0px 0px 25px;">
<li><NAME> — Co-chairman</li>
<li><NAME> — Co-chairman</li>
<li><NAME> — Co-chairman</li>
<li><NAME> — Co-chairman</li>
<li>Agnieszka PARKITNA — secretary</li>
<li><NAME></li>
<li><NAME></li>
<li><NAME></li>
<li><NAME></li>
</ul>
<h5>Contact crew:</h5>
<ul style="font-size:12px; list-style: disc; line-height: 26px; padding:0px 0px 0px 25px;">
<li><NAME> (tel. + 48 697 53 22 76)</li>
<li><NAME> (tel. + 48 601 378 054)</li>
<li><NAME>ŹDŹ (tel. + 48 609 977 348)</li>
</ul>
<br/>
<h4>PROGRAM COMMITTEE:</h4>
<ul style="font-size:12px; list-style: disc; padding:0px 0px 0px 25px;">
<li><NAME> — Poland </li>
<li><NAME>— Poland </li>
<li><NAME> — Poland </li>
<li>Wojciech CELLARY — Poland </li>
<li><NAME> — Poland </li>
<!--
<li>Arne COLLEN — USA </li>
-->
<li><NAME>ŁOWICZ — Poland </li>
<li>Małgorzata DOLIŃSKA — Poland </li>
<li><NAME>A — Spain </li>
<li><NAME> — Poland </li>
<li><NAME> — Poland </li>
<li><NAME> — Poland </li>
<li><NAME> — Poland </li>
<li><NAME> — Poland </li>
<li><NAME>AR — USA </li>
<li>Jürgen JASPERNEITE — Germany </li>
<li>Henryk KAPROŃ — Poland </li>
<li>Ryszard KNOSALA — Poland </li>
<li>Zygmunt MAZUR — Poland </li>
<li><NAME> — Poland </li>
<li><NAME>ŁOWSKI — Poland</li>
<li><NAME> — Poland </li>
<li><NAME> — Poland </li>
<li><NAME>ANO — Italy </li>
<li><NAME>AWSKI — Poland </li>
<li><NAME>SKI — Poland </li>
<li><NAME> — Germany </li>
<li><NAME>KŁOSA — Poland </li>
<li><NAME> — Australia </li>
<li>Jerzy ŚWIĄTEK — Poland </li>
<li>Eugeniusz TOCZYŁOWSKI — Poland </li>
<li><NAME> — USA </li>
<li>Zofia WILIMOWSKA — Poland </li>
<li>Ber<NAME> — Germany </li>
<li><NAME> — Poland </li>
<li><NAME> — Czech Republic</li>
</ul>
<br/>
</div>
<!--
<p style="margin-left: 15px; font-size: 10pt;">*provisional list</p></br>
-->
';
}
function important_dates(){
echo
'
<div style="text-align: justify; padding: 5% 10% 10% 10%">
<h4>IMPORTANT DATES</h4>
<table style="font-size:12pt; min-width: 650px; margin-left: auto; margin-right: auto;">
<td>Registration and submission of full papers.</td>
<td><p style="text-align: right; font-weight: bold"><s>June 9</s><span style="color: red"> <b>June 29, 2014</b></span></p></td>
</tr>
<tr>
<td>Notification of paper acceptance.</td>
<td><p style="text-align: right; font-weight: bold"><s>June 15</s><span style="color: red"> <b>July 20, 2014</b></span></p></td>
</tr>
<tr>
<td>Camera ready version submission.</td>
<td><p style="text-align: right; font-weight: bold"><s>June 30</s><span style="color: red"> <b>August 4, 2014</b></span></p></td>
</tr>
<tr>
<td>Fee payment.</td>
<td><p style="text-align: right; font-weight: bold"><b>August 29, 2014</b></p></td>
</tr>
<tr>
<td>Registration of participation.</td>
<td><p style="text-align: right; font-weight: bold"><b>September 1, 2014</b></p></td>
</tr>
</table><br/>
<h4>CONFERENCE DATE</h4>
<table style="font-size:12pt; min-width: 650px; margin-left: auto; margin-right: auto;">
<tr>
<td>The conference will be held on </td>
<td style="text-align: right; font-weight: bold;"><b>September 21-23, 2014</b></td>
</tr>
</table>
</div>
';
}
function previous_conferences(){
echo '
<div style="text-align: justify; padding: 5% 10% 10% 10%">
<table style="margin-left: auto; margin-right: auto; min-width: 650px;">
<tr>
<td>
<h4 style="color: #000;">ISAT 2014</h4>
</td>
<td>
</td>
</tr>
<tr>
<td style="text-align: left">Conference web site:</td>
<td style="text-align: right"><a href="http://www.isat.pwr.edu.pl/isat2014/index.php" target="_blank">ISAT 2014 site</a>
</td>
<tr>
<td style="text-align: left;">Conference schedule and program:</td>
<td style="text-align: right;"><img src="images/ico_pdf.gif" width="16" height="16" alt=""><a href="http://www.isat.pwr.edu.pl/isat2014/files/ISAT2014_program_v3.pdf" target="_blank"> PDF version</a></td>
</tr>
</table>
<br/><p style="margin: 0px 0px 0px 32px">Electronic versions of ISAT 2014 books are available online:</p>
<!--
<p style="margin: 0px 0px 0px 40px"> Will be available soon</p>
-->
<ul class="list-1-proc" style="margin: 0px 0px 0px 35px">
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=26347" style="font-weight: bold;">Contemporary Approaches to Design and evaluation of Information Systems</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=26358" style="font-weight: bold;">Selected Aspects of Communication and Computational Systems</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=26348" style="font-weight: bold;">System Analysis Approach to the Design, Control and Decision Support</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=26349" style="font-weight: bold;">The Use of IT Technologies to Support Organizational Management in Risky Environment</a></li>
</ul>
<table style="margin-left: auto; margin-right: auto; min-width: 650px;">
<tr>
<td>
<br/><h4 style="color: #000;">ISAT 2013</h4>
</td>
<td>
</td>
</tr>
<tr>
<td style="text-align: left">Conference web site:</td>
<td style="text-align: right"><a href="http://www.isat.pwr.edu.pl/isat2013/index.php" target="_blank">ISAT 2013 site</a>
</td>
<tr>
<td style="text-align: left;">Conference schedule and program:</td>
<td style="text-align: right;"><img src="images/ico_pdf.gif" width="16" height="16" alt=""><a href="http://www.isat.pwr.edu.pl/isat2013/files/ISAT2013_program_v3.pdf" target="_blank"> PDF version</a></td>
</tr>
</table>
<br/><p style="margin: 0px 0px 0px 32px">Electronic versions of ISAT 2013 books are available online:</p>
<ul class="list-1-proc" style="margin: 0px 0px 0px 35px">
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=25303" style="font-weight: bold;">Intelligent Information Systems, Knowledge Discovery, Big Data and High Performance Computing</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=25298" style="font-weight: bold;">Network Architecture and Applications</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=25299" style="font-weight: bold;">Knowledge Based Approach to the Design, Control and Decision Support</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=25300" style="font-weight: bold;">Models of Decision Making in the Process of Management in a Risky Environment</a></li>
</ul>
<table style="margin-left: auto; margin-right: auto; min-width: 650px;">
<tr>
<td>
<br/><h4 style="color: #000;">ISAT 2012</h4>
</td>
<td>
</td>
</tr>
<tr>
<td style="text-align: left">Conference web site:</td>
<td style="text-align: right"><a href="http://www.isat.pwr.edu.pl/isat2012/index.php" target="_blank">ISAT 2012 site</a>
</td>
<tr>
<td style="text-align: left;">Conference schedule and program:</td>
<td style="text-align: right;"><img src="images/ico_pdf.gif" width="16" height="16" alt=""><a href="http://www.isat.pwr.edu.pl/isat2012/files/isat2012_program_ver5_arch.pdf" target="_blank"> PDF version</a></td>
</tr>
</table>
<br/><p style="margin: 0px 0px 0px 32px">Electronic versions of ISAT 2012 books are available online:</p>
<ul class="list-1-proc" style="margin: 0px 0px 0px 35px">
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=19601" style="font-weight: bold;">Web engineering and high-performance computing on complex environments</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=19602" style="font-weight: bold;">Networks design and analysis</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=19603" style="font-weight: bold;">System analysis approach to the design, control and decision support</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=19604" style="font-weight: bold;">The use of IT models for organization management</a></li>
</ul>
<table style="margin-left: auto; margin-right: auto; min-width: 650px;">
<tr>
<td>
<br/><h4 style="color: #000;">ISAT 2011</h4>
</td>
<td></td>
</tr>
<tr>
<td style="text-align: left">Conference web site:</td>
<td style="text-align: right"><a href="http://www.isat.pwr.edu.pl/isat2011/index.php" target="_blank">ISAT 2011 site</a></td>
<tr>
<td style="text-align: left;">Conference schedule and program:</td>
<td style="text-align: right;"><img src="images/ico_pdf.gif" width="16" height="16" alt=""><a href="http://www.isat.pwr.edu.pl/isat2011/files/ISAT2011program2b.pdf" target="_blank"> PDF version</a></td>
</tr>
</table>
<br/><p style="margin: 0px 0px 0px 32px">Electronic versions of ISAT 2011 books are available online:</p>
<ul class="list-1-proc" style="margin: 0px 0px 0px 35px">
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=15407" style="font-weight: bold;">Web information systems engineering, knowledge discovery and hybrid computing</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=15417" style="font-weight: bold;">Service oriented networked systems</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=15425" style="font-weight: bold;">System analysis approach to the design, control and decision support</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=15435" style="font-weight: bold;">Information as the intangible assets and company value source</a></li>
</ul>
<table style="margin-left: auto; margin-right: auto; min-width: 650px;">
<tr>
<td>
<br/><h4 style="color: #000;">ISAT 2010</h4>
</td>
<td></td>
</tr>
<tr>
<td style="text-align: left">Conference web site:</td>
<td style="text-align: right"><a href="http://www.isat.pwr.edu.pl/isat2010/index.php" target="_blank">ISAT 2010 site</a></td>
<tr>
<td style="text-align: left">Conference schedule and program:</td>
<td style="text-align: right; min-width: 320px"><img src="images/html.gif" width="16" height="16" alt=""><a href="http://www.isat.pwr.edu.pl/isat2010/files/ISAT2010program4.htm" target="_blank"> HTML version</a></td>
</tr>
<tr>
<td>
<h4 style="color: #000;">ISAT 2009</h4>
</td>
<td></td>
</tr>
<tr>
<td style="text-align: left">Conference web site:</td>
<td style="text-align: right"><a href="http://www.isat.pwr.edu.pl/isat2009/index.php" target="_blank">ISAT 2009 site</a></td>
<tr>
<td style="text-align: left">Conference schedule and program:</td>
<td style="text-align: right"><img src="images/html.gif" width="16" height="16" alt=""><a href="http://www.isat.pwr.edu.pl/isat2009/files/ISAT2009program3.htm" target="_blank"> HTML version</a></td>
</tr>
<tr>
<td>
<h4 style="color: #000;">ISAT 2008</h4>
</td>
<td></td>
<tr>
<td style="text-align: left">Conference web site:</td>
<td style="text-align: right"><a href="http://www.isat.pwr.edu.pl/isat2008/index.html" target="_blank">ISAT 2008 site</a></td>
</tr>
<tr>
<td style="text-align: left">Conference schedule and program:</td>
<td style="text-align: right"><img src="images/html.gif" width="16" height="16" alt=""><a href="http://www.isat.pwr.edu.pl/isat2008/files/isat2008program.html" target="_blank"> HTML version</a></td>
</tr>
<tr>
<td>
<h4 style="color: #000;">ISAT 2007</h4>
</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">Conference web site:</td>
<td style="text-align: right;"><a href="http://www.isat.pwr.edu.pl/isat2007/index.html" target="_blank">ISAT 2007 site</a></td>
</tr>
<tr>
<td style="text-align: left;">Conference schedule and program:</td>
<td style="text-align: right;"><img src="images/html.gif" width="16" height="16" alt=""><a href="http://www.edu.pwr.edu.pl/isat2007/program07.htm" target="_blank"> HTML version</a></td>
</tr>
<tr>
<td>
<h4 style="color: #000;">ISAT 2006</h4>
</td>
<td></td>
<tr>
<td style="text-align: left">Conference web site:</td>
<td style="text-align: right"><a href="http://www.isat.pwr.edu.pl/isat2006/index.html" target="_blank">ISAT 2006 site</a></td>
</tr>
</table>
</div>
';
}
function for_authors(){
echo '
<div style="text-align: justify; padding: 20px 0px 0px 30px;">
<table style="max-width: 97%;">
<!-- <table class="tekst_gl" width="98%" border="0" cellspacing="0" cellpadding="0">-->
<tr>
<td>
<!-- <td valign="top" rowspan="2">-->
<h4>CONFERENCE LANGUAGE</h4>
<p>English</p>
<h4>PUBLICATION</h4>
<p>All accepted papers will be published as <strong>book chapters in an edited volume with ISBN</strong>.<br/>
The books will be published in electronic versions and they will be also available in <a href="http://www.dbc.wroc.pl/" target="_blank">Lower Silesian Digital Library</a>.<br/>
<strong>Selected papers</strong> will be invited to be published in the following journals:
<ul class="list-1-k" style="margin: 0px 0px 0px 10px">
<li><a href="http://www.e-informatyka.pl/wiki/e-Informatica" style="font-weight: boldl;">e-Informatica Software Engineering Journal</a></li>
<li><a href="http://www.inderscience.com/jhome.php?jcode=ijiids" style="font-weight: bold;">International Journal of Intelligent Information and Database Systems (IJIIDS)</a></li>
<li><a href="http://publikacje-naukowe.home.pl/index.php?main_page=index&cPath=62_72_71" style="font-weight: bold;">MPER — Management and Production Engineering Review</a></li>
<li><a href="http://www.kaprint.pl/re/Aktualnosci" style="font-weight: bold;">Rynek Energii</a></li>
<li><a href="http://www.systems-science.pwr.edu.pl" style="font-weight: bold;">Systems Science</a></li>
</ul><br/>
The selection will be based on the reviewers\' opinions.
<h4>PAPERS</h4>
<!-- <ul style="list-style: disc; margin: 0px 0px 0px 22px;">-->
<ul class="list-1-k" style="margin: 0px 0px 0px 10px;">
<li>Submissions should describe original work not submitted or published elsewhere.</li>
<li>Submitted papers should be prepared according to the template available at this page.</li>
<li>The required paper length is <strong>10 pages</strong>.</li>
<li>Camera-ready papers should be submitted only in <strong>MS Word (.doc)</strong> file format.</li>
<li>An accepted paper should be presented by one of its authors who must register for the conference and pay the fee.</li>
</ul> <br/>
<p style="font-weight: bold;">Statements required by publishing house:</p>
<table style="min-width: 640px; max-width: 640px; text-align: center; border: 1px solid black; margin-left: auto; margin-right: auto;">
<tr>
<td style="font-weight: bold; font-style: italic; text-align: center; border: 1px solid black;">for Polish participants </td>
<td style="font-weight: bold; font-style: italic; text-align: center; border: 1px solid black;">for foreign participants</td>
</tr>
<tr>
<td style="border: 1px solid black; padding: 6px 6px 6px 6px; text-align: center; min-width: 50%; max-width: 50%;">
<ul class="list-1-k-srodek">
<li><a href="files/statement_1_pl.pdf">Licence statement </a>(pl)</li>
<li><a href="files/statement_2_pl.pdf">Originality statement</a> (pl)</li>
</ul>
</td>
<td style="border: 1px solid black; padding: 6px 6px 6px 6px; text-align: center; min-width: 50%; max-width: 50%;">
<ul class="list-1-k-srodek">
<li><a href="files/statement_en.pdf">Statement</a> (en)</li>
</ul>
</td>
</tr>
</table>
<br/>
<ul>
<li>Please complete, sign and send the copyright forms to ISAT secretariat; please note that signed copyright forms should be sent by post and electronic mail by <strong>registration of participation deadline</strong>.
<br>
<br>
<div style="text-align: right;">
<table style="text-align: justify; border: 1px solid black; margin-left: auto; margin-right: auto; min-width: 300px; max-width: 400px;">
<tr>
<td style="padding: 10px 10px 10px 10px;">ISAT Secretariat<br>
Institute of Organization and Management (I-23) <br/>
Wybrzeże Wyspiańskiego 27<br/>
50-370 Wrocław<br/>
Poland<br/>
<a style="color: #000; font-weight: normal;" href="javascript:w();" onmouseover="window.status=m();return true;" onmouseout="window.status=\'\';return true;"><script type="text/javascript">document.write(a());</script></a>
</td>
</tr>
</table>
</div>
<br>
</li>
<li>Please remember that the copyright form must be signed by <strong>ALL AUTHORS</strong> of a submitted paper.</li>
</ul>
<h4>PAPER TEMPLATE</h4>
<p>Instruction for authors of the papers submitted for publication (zipped description file [pdf] and template [doc]) may be found below. Please <strong>read these guidelines carefully</strong> before submitting a paper.</p>
<br/>
<table style="margin-left: auto; margin-right: auto; min-width: 200px; max-width: 200px; border: 1px solid black; text-align: center;">
<tr style="border: 1px solid black; background: #204A88; color: #ffffff;">
<td style="font-weight: bold; border: 1px solid black;">Paper Template</td>
</tr>
<tr>
<td>
<a href="files/ISAT2014_template.zip">Get It!</a>
</td>
</tr>
</table>
<br/>
<h4>PAPER REGISTRATION AND SUBMISSION</h4>
<p>Full papers must be registered and submitted using the conference web system <strong>by the <a href="?x=important_dates">\'Registration and submission of full papers\'</a> date</strong>. Separate, approximately <strong>150-200 words long, abstract</strong> should be entered during paper registration. All instructions given at the conference website should be taken into account.
</p>
<p style="margin-top: 1em;">The paper may be registered in advance, and full paper may be uploaded (appended) later, however by the paper submission deadline.<br/><br/>
</p>
<!--
Papers with approximately 200 words long abstracts should be registered using the conference submission and registration system before the <a href="?x=important_dates"> \'Title Registration and Abstract Submission Date\'</a>.<br/>
Full papers must be submitted using the conference submission and registration system before the <a href="?x=important_dates">\'Full Paper Submission Date\'</a>.<br/>
-->
<h4>PRESENTATION INSTRUCTIONS</h4>
<ul class="list-1" style="margin: 0px 0px 0px 10px;">
<li>The official language of the conference is English.</li>
<li>All presentation rooms will be equipped with an overhead projector and a computer (desktop or notebook) where presentations can be uploaded.</li>
<li>Computers will have Microsoft Power Point (for .ppt/.pps presentations) and Adobe Reader (for .pdf presentations) software installed.</li>
<li>Authors are kindly requested to upload their presentation(s) to a computer before the start of a session. </li>
<li>Time of presentation (including discussion) is <strong>maximum 20 minutes</strong>.</li>
</ul>
<h4>FURTHER INFORMATION</h4>
<p>For all matters related to ISAT 2014, please feel free to contact the Organizing Committee.</p>
</td>
</tr>
</table>
<br/>
</div>
';
}
function registration_and_submission(){
echo '
<div style="text-align: justify; padding: 20px 0 0 30px;">
<table style="max-width:98%;">
<tr>
<td>
<h4>REGISTRATION & SUBMISSION</h4>
<p>Registration of a paper and paper submission are available using the conference submission and registration system:</p><br/>
<p style="text-align: center; border: 1px dotted #000; max-width: 275px; margin-left: auto; margin-right: auto; padding: 10px 0px 10px 0px;"><a href="http://www.isat.pwr.edu.pl/system/" target="_blank">REGISTRATION & SUBMISSION</a></p>
<!--
<p align="center" class="style1">CLOSED</p>
-->
<h4>CREATE AN ACCOUNT</h4>
<p style="text:align: justify;">In order to submit any data, it is necessary to create a user account. This will allow to:</p>
<ul style="list-style: disc; margin: 5px 0px 0px 20px;">
<li>register a paper, submit an abstract and a full paper, check the status of submitted papers, register as participant as well as view and edit submitted personal data.</li>
</ul>
<h4>PAPER REGISTRATION (WITH ABSTRACT)</h4>
<p>Papers should be registered before the \'Title Registration and Abstract Submission date\' which is given at the <a href="?x=important_dates">important dates</a> page.<br/>
The abstract should be approximately <strong>200 words</strong> long.<br/>
In order to register a paper, it is necessary to create an account (if you have not got one yet) and log in to the conference system using the link given above.</p>
Paper submission may be done in two phases. In the paper registration phase, authors can submit registration without uploading their papers.
<h4>PAPER SUBMISSION</h4>
<p>Papers should be <strong>10 pages</strong> long.<br/>
Full papers must be submitted before the \'Full Paper Submission date\' which is given at the <a href="?x=important_dates">important dates</a> page.<br/>
<!-- In order to submit a paper it is necessary to log in using the link given above. The paper submission will be available after the acceptance of an abstract. -->
The notification of acceptance will be sent by e-mail and signaled with the status of the paper.</p>
</td>
</tr>
</table>
</div>
';
}
function conference_program(){
echo '
<div style="text-align: justify; padding: 20px 30px 0px 30px;">
<h4>CONFERENCE SCHEDULE AND PROGRAM</h4> <br/>
<h5><u>Conference program</u></h5>
<div style="text-align: center; padding: 20px; 10px; 20px; 10px;">
<h5><img src="images/ico_pdf.gif" alt="isat2014_program" width="16" height="16"><a href="files/ISAT2014_program_v3.pdf">The conference program</a> (version 3, 18.09.2014)</h5>
</div>
<ul class="list-1-k" style="margin: 0px 0px 0px 2px">
<li>Please note that the use of the swimming pool, sauna, jacuzzi, table tennis, tennis court and parking is <strong>free</strong> for conference participants.</li>
</ul>
<br>
<h5><u>Keynote session</u></h5>
<div style="text-align: left; padding: 10px; 10px; 10px; 10px;">
<p>We are very pleased to annouce a special lecture on very current topic of contemporary computer science:</p>
<div style="text-align: center">
<p><b>Prof. <NAME></b></p>
<p><b>"A critical overview on traffic modelling and performance evaluation"</b></p>
<p>Plenary session, Monday 9:30-11:30</p>
</div>
<ul class="list-1-k" style="margin: 0px 0px 0px 2px">
<li><img src="images/ico_pdf.gif" alt="pagano_abstract" width="16" height="16"><a href="files/pagano_abstract.pdf">The short abstract of the lecture (pdf, 40kB)</a></li>
<li><img src="images/ico_pdf.gif" alt="pagano_cv" width="16" height="16"><a href="files/pagano_cv.pdf">The biographical notes of prof. Pagano (pdf, 39kB)</a></li>
</ul>
<br>
</div>
<h5><u>The general schedule</u></h5>
<br>
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; text-align: center; font: 14.0px Arial; color: #f0f0ff}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; text-align: center; font: 12.0px Arial; color: #993300}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; text-align: center; font: 12.0px Arial}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; text-align: center; font: 12.0px Arial; color: #000080}
p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; text-align: center; font: 14.0px Arial; color: #000080}
p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Arial; text-align: left;}
p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Calibri}
span.s1 {font: 12.0px Times}
table.t1 {width: 773.0px; border-collapse: collapse; table-layout: fixed}
td.td1 {width: 771.0px; background-color: #4080c0; border-style: solid; border-width: 0.0px 1.0px 2.0px 0.0px; border-color: #ffff00 #ffffff #ffffff #ffff00; padding: 8.0px 1.0px 8.0px 1.0px}
td.td2 {width: 109.0px; background-color: #d0e0f0; border-style: solid; border-width: 0.0px 1.0px 2.0px 0.0px; border-color: #993300 #ffffff #ffffff #993300; padding: 1.0px 1.0px 0.0px 1.0px}
td.td3 {width: 659.0px; background-color: #d0e0f0; border-style: solid; border-width: 1.0px 1.0px 2.0px 0.0px; border-color: #ffffff #ffffff #ffffff #993300; padding: 1.0px 1.0px 0.0px 1.0px}
td.td4 {width: 109.0px; background-color: #d0e0f0; border-style: solid; border-width: 0.0px 1.0px 2.0px 0.0px; border-color: #000000 #ffffff #ffffff #000000; padding: 1.0px 1.0px 0.0px 1.0px}
td.td5 {width: 659.0px; background-color: #d0e0f0; border-style: solid; border-width: 1.0px 1.0px 2.0px 0.0px; border-color: #ffffff #ffffff #ffffff #000000; padding: 1.0px 1.0px 0.0px 1.0px}
td.td6 {width: 109.0px; background-color: #e0f0f0; border-style: solid; border-width: 0.0px 1.0px 2.0px 0.0px; border-color: #ffffff #ffffff #ffffff #ffffff; padding: 1.0px 1.0px 0.0px 1.0px}
td.td7 {width: 108.0px; background-color: #e0f0f0; border-style: solid; border-width: 0.0px 1.0px 2.0px 0.0px; border-color: #ffffff #ffffff #ffffff #ffffff; padding: 1.0px 1.0px 0.0px 1.0px}
td.td8 {width: 548.0px; background-color: #e0f0f0; border-style: solid; border-width: 1.0px 0.0px 2.0px 0.0px; border-color: #ffffff #ffffff #ffffff #ffffff; padding: 1.0px 1.0px 0.0px 1.0px}
</style>
<table width="773.0" cellspacing="0" cellpadding="0" class="t1">
<tbody>
<tr>
<td colspan="7" valign="top" class="td1">
<p class="p1"><b>SUNDAY – 21 SEPTEMBER 2014</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td2">
<p class="p2"><b>13:00 – 15:00</b></p>
</td>
<td colspan="6" valign="middle" class="td3">
<p class="p2"><b>Registration</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td4">
<p class="p3"><b>15:00 – 15:45</b></p>
</td>
<td colspan="6" valign="middle" class="td5">
<p class="p3"><b>Opening of the Conference & Welcome party</b></p>
<p class="p2">Coffee break (with sandwiches)</p>
</td>
</tr>
<tr>
<td valign="middle" class="td6">
<p class="p4"><b>16:00 – 18:00</b></p>
</td>
<td colspan="6" valign="middle" class="td8">
<p class="p5"><b>PART I</b> (sessions)</p>
</td>
</tr>
<tr>
<td valign="middle" class="td2">
<p class="p2"><b>19:00</b></p>
</td>
<td colspan="6" valign="top" class="td3">
<p class="p2"><b>Barbecue (dinner)</b></p>
</td>
</tr>
<tr>
<td colspan="7" valign="top" class="td1">
<p class="p1"><b>MONDAY – 22 SEPTEMBER 2014</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td2">
<p class="p2"><b>7:30 – 8:30</b></p>
</td>
<td colspan="6" valign="top" class="td3">
<p class="p2"><b>Breakfast (Buffet)</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td2">
<p class="p2"><b>8:30 – 9:30</b></p>
</td>
<td colspan="6" valign="top" class="td3">
<p class="p2"><b>Registration</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td6">
<p class="p4"><b>8:00 – 9:20</b></p>
</td>
<td colspan="6" valign="middle" class="td8">
<p class="p5"><b>PART II</b> (sessions)</p>
</td>
</tr>
<tr>
<td valign="middle" class="td6">
<p class="p4"><b>9:30 – 11:30</b></p>
</td>
<td colspan="6" valign="middle" class="td8">
<p class="p5"><b>Plenary session - Prof. <NAME></b> <br>
"A critical overview on traffic modelling and performance evaluation"
</p>
</td>
</tr>
<tr>
<td valign="middle" class="td2">
<p class="p2"><b>12:00 – 13:00</b></p>
</td>
<td colspan="6" valign="top" class="td3">
<p class="p2"><b>Lunch</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td4">
<p class="p3"><b>13:20</b></p>
</td>
<td colspan="6" valign="middle" class="td5">
<p class="p5"><b>Outdoor discussion session</b> (a tour to the Liczyrzepa Kowary mine)</p>
</td>
</tr>
<tr>
<td valign="middle" class="td2">
<p class="p2"><b>20:00</b></p>
</td>
<td colspan="6" valign="top" class="td3">
<p class="p2"><b>Conference Dinner</b></p>
</td>
</tr>
<tr>
<td colspan="7" valign="top" class="td1">
<p class="p1"><b>TUESDAY – 23 SEPTEMBER 2014</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td2">
<p class="p2"><b>8:00 – 9:00</b></p>
</td>
<td colspan="6" valign="top" class="td3">
<p class="p2"><b>Breakfast</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td6">
<p class="p4"><b> 8:50 – 10:30</b></p>
</td>
<td colspan="6" valign="middle" class="td8">
<p class="p5"><b>PART III</b> (sessions)</p>
</td>
</tr>
<tr>
<td valign="middle" class="td2">
<p class="p2"><b>10:30 – 10:50</b></p>
</td>
<td colspan="6" valign="top" class="td3">
<p class="p2"><b>Coffee Break</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td6">
<p class="p4"><b>10:50 – 12:30</b></p>
</td>
<td colspan="6" valign="middle" class="td8">
<p class="p5"><b>PART IV</b> (sessions)</p>
</td>
</tr>
<tr>
<td valign="middle" class="td4">
<p class="p3"><b>12:30 – 12:50</b></p>
</td>
<td colspan="6" valign="middle" class="td5">
<p class="p3"><b>Closing of the Conference</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td4">
<p class="p2"><b>13:00 – 14:00</b></p>
</td>
<td colspan="6" valign="top" class="td3">
<p class="p2"><b>Lunch</b></p>
</td>
</tr>
</tbody>
</table>
<br>
</div>
';
}
function venue(){
echo '
<div style="text-align: justify; padding: 20px 30px 0px 30px;">
<script src="http://maps.google.com/maps?file=api&v=2&key=<KEY>"
type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
var lat=50.82797233735481;
var lng=15.538875122070312;
var zoom=11;
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
GEvent.addListener(map, "moveend", function() {
map.closeInfoWindow();
var center = map.getCenter();
var zoom = map.getZoom();
//document.getElementById("message").innerHTML = \'Lat,Lng \'+ center.toString() + \', Zoom(\' + zoom.toString() + \')\';
});
map.addControl(new GLargeMapControl());
map.addControl(new GOverviewMapControl());
map.addControl(new GScaleControl());
map.addControl(new GMapTypeControl());
map.enableContinuousZoom();
map.enableDoubleClickZoom();
map.setCenter(new GLatLng(lat, lng), zoom);
map.hideControls();
GEvent.addListener(map, "mouseover", function(){map.showControls();});
GEvent.addListener(map, "mouseout", function(){map.hideControls();});
var info1 = "<center><a href=http://hotellas.www.hotelsystems.pl/ target=_blank>Hotel Las<br><img border=0 width=131 height=87 src=./images/las/las_hotel_mapa.jpg></a>";
var point1 = new GLatLng(50.835601, 15.564200);
var marker1 = new GMarker(point1);
GEvent.addListener(marker1, "click", function() {
marker1.openInfoWindowHtml(info1);
});
map.addOverlay(marker1);
marker1.openInfoWindowHtml(info1);
var info2 = "<center><b>Railway station</b><br><br><a href=http://rozklad-pkp.pl/ target=_blank>PKP on-line time-table</a>";
var point2 = new GLatLng(50.8323898754536, 15.518960952758789);
var marker2 = new GMarker(point2);
GEvent.addListener(marker2, "click", function() {
marker2.openInfoWindowHtml(info2);
});
map.addOverlay(marker2);
var info3 = "<center><b>Bus and coach station</b><br><br><a href=http://www.pks.jgora.pl/ target=_blank>Time-table<br>(station in Jelenia Góra)</a>";
var point3 = new GLatLng(50.826663603495724, 15.523681640625);
var marker3 = new GMarker(point3);
GEvent.addListener(marker3, "click", function() {
marker3.openInfoWindowHtml(info3);
});
map.addOverlay(marker3);
}
}
//]]>
</script>
<!--
<table class="tekst_gl" width="98%" border="0" cellspacing="0" cellpadding="0">
<table style="max-width: 98%">
<tr>
<td valign="top" rowspan="2">
-->
<h4>VENUE</h4>
<!--
<p>ISAT 2014 conference will be held in <a href="http://www.szklarskaporeba.pl/it/en/polozenie_i_dojazd.htm" target="_blank">Szklarska Poręba</a>. The city is located in the Polish side of the Karkonosze Mountains, at the foot of Szrenica mountain (1362 meters above sea level).</p> <br/>
-->
<p>ISAT 2014 conference will be held in the four-star <a href="http://hotellas.www.hotelsystems.pl/" target="_blank">HOTEL LAS</a> near <a href="http://www.szklarskaporeba.pl/it/en/polozenie_i_dojazd.htm" target="_blank">Szklarska Poręba</a>. The city is located in the Polish side of the Karkonosze Mountains, at the foot of Szrenica mountain (1362 meters above sea level).<br>
"Las" Hotel**** is situated in a tranquil setting and it is surrounded by a forest, not far from the international E65 route.</p>
<!--
-->
<p style="text-decoration: underline;">Hotel address and contact details:</p>
<p style="line-height:16px; ">
Hotel LAS <br>
ul. Turystyczna 8<br>
58-573 Piechowice, Poland</p>
<p><u>Phone</u>: +48 75 717 52 52</p>
<br/>
<div id="map" style="width: 800px; height: 550px;"></div>
<!--
<div id="message"></div>
-->
<p style="text-align: center;"><script>load()</script></p>
<br/>
<table style="min-width: 100%; max-width: 100%;">
<tr>
<td style="border-top: 1px dotted black; border-bottom: 1px dotted black; border-left: 1px dotted black; min-width: 35%; max-width: 35%; padding: 8px;">
<h3 style="color: #204a88; font-size:15pt;">Accommodation</h3><br/>
<!--
<h5>Details will be given soon.</h5>
-->
Four-star <a href="http://hotellas.www.hotelsystems.pl/" target="_blank">LAS Hotel:</a>
<ul class="list-1-k">
<li>Double and single rooms are available.</li>
<li>All ISAT participants may relax in the swimming pool, saunas, baths or whirlpool bathtubs.</li>
<li>Sports fans can play table tennis, beach volleyball, tennis, billiards or spend their time at the gym.</li>
<li>All presentation rooms will be equipped with an overhead projector and a computer where presentations can be uploaded.</li>
</ul>
</td>
<td style="border-bottom: 1px dotted black; border-top: 1px dotted black; border-right: 1px dotted black; min-width: 47%; max-width: 47%; padding: 8px;">
<table style="min-width: 100%;">
<tr style="border: 0px dotted black; text-align: center;">
<td> <img src="images/las/las_hotel_2.jpg" alt="" style="max-width: 240px; -moz-border-radius: 7px; border-radius: 7px;"> </td>
<td> <img src="images/las/las_sala_konf.jpg" alt="" style="max-width: 240px; -moz-border-radius: 7px; border-radius: 7px;"> </td>
</tr>
<tr>
<td style="height: 10px;"></td><td></td>
</tr>
<tr style="border: 0px dotted black; text-align: center;">
<td> <img src="images/las/las_pokoj.jpg" alt="" style="max-width: 240px; -moz-border-radius: 7px; border-radius: 7px;"> </td>
<td> <img src="images/las/las_basen.jpg" alt="" style="max-width: 240px; -moz-border-radius: 7px; border-radius: 7px;"> </td>
</tr>
</table>
</td>
</tr>
</table>
<br/>
<table style="min-width: 100%; max-width: 100%;">
<tr style="border: 1px dotted black;">
<td style="padding: 8px;">
<h3 style="color: #204a88; font-size: 15pt;">Szklarska Poręba and its surroundings</h3><br/>
<table style="min-width: 100%;">
<tr>
<td style="text-align: center; min-width: 25%; max-width: 25%;">
<h3 style="color: #204a88; text-align: left; margin-left: 15px;">The Karkonosze Mountains</h3>
</td>
<td style="text-align: center; min-width: 25%; max-width: 25%;">
<h3 style="color: #204a88; text-align: left; margin-left: 15px;">The Izery Mountains</h3><br/>
</td>
<td style="text-align: center; min-width: 25%; max-width: 25%;">
<h3 style="color: #204a88; text-align: left; margin-left: 15px;">Szrenica</h3><br/>
</td>
<td style="text-align: center; min-width: 25%; max-width: 25%;">
<h3 style="color: #204a88; text-align: left; margin-left: 15px;">Kamieńczyk Waterfall</h3><br/>
</td>
</tr>
<tr>
<td style="text-align: center; min-width: 25%; max-width: 25%;">
<img src="images/attractions/karkonosze_mountains.jpg" alt="" style="max-width: 170px; -moz-border-radius: 7px; border-radius: 7px;"><br/><br/>
<p style="text-align: justify; font-size: 10pt; margin-left: 8px; margin-right: 8px;">
It is the highest and undoubtedly the best known range of The Sudety Mountains. Owing to its very well developed tourist infrastructure (network of tourist trails, mountain hostels, ski lifts) for centuries it was the key destination for mountain hikers and skiers.
</p>
</td>
<td style="text-align: center; min-width: 25%; max-width: 25%;">
<img src="images/attractions/izery_mountains.jpg" alt="" style="max-width: 170px; -moz-border-radius: 10px; border-radius: 10px;"><br/><br/>
<p style="text-align: justify; font-size: 10pt; margin-left: 8px; margin-right: 8px;">
The Izery Mountains cover almost 1000 km<sup>2</sup>, of which about 400 km<sup>2</sup> is on the Polish side - almost half of their area. They form an extensive and wide system of crests, missives and separate peaks.
</p>
</td>
<td style="text-align: center; min-width: 25%; max-width: 25%;">
<img src="images/attractions/szrenica.jpg" alt="" style="max-width: 170px; -moz-border-radius: 7px; border-radius: 7px;">
<p style="text-align: justify; font-size: 10pt; margin-left: 8px; margin-right: 8px;"><br/>
This is the name of the mountain peak overlooking the city, as part of the Central Crest of The Karkonosze Mountains.
</p>
</td>
<td style="text-align: center; min-width: 25%; max-width: 25%;">
<img src="images/attractions/kamienczyk.jpg" alt="" style="max-width: 170px; -moz-border-radius: 10px; border-radius: 10px;">
<p style="text-align: justify; font-size: 10pt; margin-left: 8px; margin-right: 8px;"><br/>
Szklarka Waterfall is the picturesquely situated waterfall in The Karkonoski National Park Enclave covering the gorgeous main part of Szklarka creek called Wą<NAME> (Szklark<NAME>).
</p>
</td>
</tr>
<tr>
<td style="border-bottom: 1px dotted black;">
<p style="text-align: right; margin-right: 10px; vertical-align: down;">
<a href="http://www.szklarskaporeba.pl/en/about-szklarska/attractions-and-monuments/194-karkonosze.html">read more</a>
</p>
</td>
<td style="border-bottom: 1px dotted black;">
<p style="text-align: right; margin-right: 10px; vertical-align: down;">
<a href="http://www.szklarskaporeba.pl/en/about-szklarska/attractions-and-monuments/40-gory-izerskie.html">read more</a>
</p>
</td>
<td style="border-bottom: 1px dotted black;">
<p style="text-align: right; margin-right: 10px; vertical-align: down;">
<a href="http://www.szklarskaporeba.pl/en/about-szklarska/attractions-and-monuments/223-szrenica.html">read more</a>
</p>
</td>
<td style="border-bottom: 1px dotted black;">
<p style="text-align: right; margin-right: 10px; vertical-align: down;">
<a href="http://www.szklarskaporeba.pl/en/about-szklarska/attractions-and-monuments/196-wodospad-kamienczyka.html">read more</a>
</p>
</td>
</tr>
<tr>
<td style="text-align: center; min-width: 25%; max-width: 25%; padding: 10px 0px 0px 0px;">
<h3 style="color: #204a88; text-align: left; margin-left: 15px;">Alpine Coaster</h3><br/>
</td>
<td style="text-align: center; min-width: 25%; max-width: 25%; padding: 10px 0px 0px 0px;">
<h3 style="color: #204a88; text-align: left; margin-left: 15px;">Death Curve</h3><br/>
</td>
<td style="text-align: center; min-width: 25%; max-width: 25%; padding: 10px 0px 0px 0px;">
<h3 style="color: #204a88; text-align: left; margin-left: 15px;">Church of the Virgin Heart of Mary</h3>
</td>
<td style="text-align: center; min-width: 25%; max-width: 25%; padding: 10px 0px 0px 0px;">
<h3 style="color: #204a88; text-align: left; margin-left: 15px;">Glass Factory in the Woods</h3>
</td>
</tr>
<tr>
<td style="border: 0px dotted black; text-align: center; min-width: 25%; max-width: 25%; ">
<img src="images/attractions/alpine_coaster.jpg" alt="" style="max-width: 170px; -moz-border-radius: 7px; border-radius: 7px;">
<p style="text-align: justify; font-size: 10pt; margin-left: 8px; margin-right: 8px;"><br/>
The gravity slide with the highest "carousel" in Poland is a crazy downhill slide over the rooftops of Szklarska Poreba.
</p>
</td>
<td style="border: 0px dotted black; text-align: center; min-width: 25%; max-width: 25%;">
<img src="images/attractions/death_curve.jpg" alt="" style="max-width: 170px; -moz-border-radius: 10px; border-radius: 10px;">
<p style="text-align: justify; font-size: 10pt; margin-left: 8px; margin-right: 8px;"><br/>
The Death Curve takes its name from a very sharp and dangerous curve at Droga Sudecka [The Sudeten Road] between Szklarska Poręba and Świeradów Zdrój at the altitude of 775 m above sea level.
</p>
</td>
<td style="border: 0px dotted black; text-align: center; min-width: 25%; max-width: 25%;">
<img src="images/attractions/church_of_the_virgin_heart_of_mary.jpg" alt="" style="max-width: 170px; -moz-border-radius: 7px; border-radius: 7px;">
<p style="text-align: justify; font-size: 10pt; margin-left: 8px; margin-right: 8px;"><br/>
The church\'s interior is adorned with a baroque pulpit, antique chandeliers and paintings by <NAME>.
</p>
</td>
<td style="border: 0px dotted black; text-align: center; min-width: 25%; max-width: 25%;">
<img src="images/attractions/lesna_huta.jpg" alt="" style="max-width: 170px; -moz-border-radius: 10px; border-radius: 10px;">
<p style="text-align: justify; font-size: 10pt; margin-left: 8px; margin-right: 8px;"><br/>
Owing to abundant resources of quartz and wood in the forests surrounding The Karkonosze Mountains Szklarska Poręba has been known for many centuries for crystal glass manufacturing.
</p>
</td>
</tr>
<tr>
<td>
<p style="text-align: right; margin-right: 10px; vertical-align: down;">
<a href="http://www.szklarskaporeba.pl/en/about-szklarska/attractions-and-monuments/1157-alpine-coaster.html">read more</a>
</p>
</td><td>
<p style="text-align: right; margin-right: 10px; vertical-align: down;">
<a href="http://www.szklarskaporeba.pl/en/about-szklarska/attractions-and-monuments/225-zakret-smierci.html">read more</a>
</p>
</td><td>
<p style="text-align: right; margin-right: 10px; vertical-align: down;">
<a href="http://www.szklarskaporeba.pl/en/about-szklarska/attractions-and-monuments/217-kosciol-nmp.html">read more</a>
</p>
</td><td>
<p style="text-align: right; margin-right: 10px; vertical-align: down;">
<a href="http://www.szklarskaporeba.pl/en/about-szklarska/attractions-and-monuments/445-lena-huta.html">read more</a>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br/>
<!-- <p>
<h4>Additional information</h4>
<p>-->
<!-- <table width="100%" height="320" border="0" cellpadding="1" cellspacing="8"> -->
<table style="min-width: 100%; max-width: 100%;">
<tr>
<td style="border: 1px dotted black; min-width: 47%; max-width: 47%; padding: 8px;">
<h3 style="color: #204a88; font-size: 15pt;">Wrocław University of Technology</h3><br/>
<p>Useful information about our University: faculties, international cooperation, conferences
and publications:</p>
<ul class="list-1-k">
<li><a href="http://www.pwr.edu.pl" target="_blank">Official Website of Wrocław University of Technology</a></li>
</ul>
</td>
<td style="min-width: 1.5%; max-width: 1.5%;">
</td>
<td style="border: 1px dotted black; min-width: 47%; max-width: 47%; padding: 8px;">
<h3 style="color: #204a88; font-size: 15pt;">Poland</h3><br/>
<p>Some important information about our country: politics, economy, society, culture and tourism:</p>
<ul class="list-1-k">
<li><a href="http://en.poland.gov.pl/" target="_blank">Official Promotional Website of Poland</a></li>
<li><a href="http://www.poland.pl/" target="_blank">Informational Website of Poland</a></li>
<li><a href="http://en.wikipedia.org/wiki/Poland" target="_blank">From Wikipedia, The Free Encyclopedia</a></li>
</ul>
<br/>
</td>
</tr>
</table>
<br/>
<br/>
</div>
';
}
function travel(){
echo '
<div style="padding: 20px 20px 0px 30px;">
<h4>LOCATION</h4>
<!--
<h3>The information will be available soon.</h3>
<p>The conference will take place in Szklarska Poręba, Poland. The town is located in the Polish side of the Karkonosze Mountains.</p><br/>
<p>The conference will take place in the Bornit Hotel in Szklarska Poręba, Poland. The town is located in the Polish side of the Karkonosze Mountains.</p><br/>
-->
<p>The conference will take place in the Hotel Las located between Szklarska Poręba and Piechowice, in the Polish side of the Karkonosze Mountains, by the international route E65 from Jelenia Góra to the border with Czech Republik in Szklarska Poreba - Jakuszyce.<br>
The most essential distances are: Jelenia Góra 15 km, Zgorzelec/Görlitz 70 km, Wrocław 140 km, Poznań 280 km, Warszawa (Warsaw) 460 km, Prague 140 km, Dresden 200 km, Berlin 330 km.</p>
<p>The exact location of the hotel is showed on <a href="./index.php?x=venue">the map</a>. GPS = (50.835301, 15.564935).
</p>
<!--
<h3>The information will be available soon.</h3>
-->
<h4>CONNECTIONS</h4>
<p><em>Please note, all of the following information is given on the basis of official timetables provided by the transportation companies.</em></p>
<h3>From Wrocław PKS Main Station by bus:</h3>
<div>
<table border=2 cellspacing=2 cellpadding=2 width=750 style="font-family:Helvetica; text-align: center; " >
<tr style="background:#BFDFFF; text-align: center; ">
<td >
<p><span style="font-weight:bold">Wrocław</span><br>
<span style="font-size:8pt">PKS MAIN STATION</span><br>
DEPARTURE</p>
</td>
<td>
<p><span style="font-weight:bold"><NAME></span><br>
<span style="font-size:8pt">PKS MAIN STATION</span><br>
ARRIVAL</p>
</td>
<td>
<p><span style="font-weight:bold"><NAME></span><br>
<span style="font-size:8pt">PKS MAIN STATION</span><br>
DEPARTURE</p>
</td>
<td>
<p><span style="font-weight:bold">Piechowice</span><br>
<span style="color:#AA0000; font-weight:bold">Hotel Las <span style="color:#FF0000">(request stop)</span><br>
ARRIVAL</p>
</td>
<td>
<p><span style="font-weight:bold">Price</span></p>
</td>
</tr>
<tr>
<td><p>7:00</p></td>
<td><p>9:10</p></td>
<td><p>10:00</p></td>
<td><p>10:40</p></td>
<td><p>14 PLN + 5 PLN</p></td>
</tr>
<tr style="background:#F0F8FF; ">
<td><p>8:40</p></td>
<td><p>10:40</p></td>
<td><p>11:40</p></td>
<td><p>12:20</p></td>
<td><p>14 PLN+ 5 PLN</p></td>
</tr>
<tr>
<td><p>8:50</p></td>
<td><p>10:50</p></td>
<td><p>11:40</p></td>
<td><p>12:20</p></td>
<td><p>10 PLN + 5 PLN</p></td>
</tr>
<tr style="background:#F0F8FF; ">
<td><p>10:30</p></td>
<td><p>12:30</p></td>
<td><p>13:00</p></td>
<td><p>13:40</p></td>
<td><p>25 PLN + 5 PLN</p></td>
</tr>
<tr>
<td><p>11:40</p></td>
<td><p>13:40</p></td>
<td><p>14:00</p></td>
<td><p>14:40</p></td>
<td><p>25 PLN + 5 PLN</p></td>
</tr>
<tr style="background:#F0F8FF; ">
<td><p>12:15</p></td>
<td><p>14:35</p></td>
<td><p>15:20</p></td>
<td><p>16:00</p></td>
<td><p>25 PLN + 5 PLN</p></td>
</tr>
<tr>
<td><p>12:35</p></td>
<td><p>14:55</p></td>
<td><p>15:20</p></td>
<td><p>16:00</p></td>
<td><p>25 PLN + 5 PLN</p></td>
</tr>
<tr style="background:#F0F8FF; ">
<td><p>12:50</p></td>
<td><p>15:22</p></td>
<td><p>16:30</p></td>
<td><p>17:10</p></td>
<td><p>25 PLN + 5 PLN</p></td>
</tr>
<tr>
<td><p>13:20</p></td>
<td><p>15:20</p></td>
<td><p>16:30</p></td>
<td><p>17:10</p></td>
<td><p>25 PLN + 5 PLN</p></td>
</tr>
<tr style="background:#F0F8FF; ">
<td><p>14:15</p></td>
<td><p>16:15</p></td>
<td><p>17:05</p></td>
<td><p>17:45</p></td>
<td><p>25 PLN + 5 PLN</p></td>
</tr>
<tr>
<td><p>15:15</p></td>
<td><p>17:15</p></td>
<td><p>18:40</p></td>
<td><p>19:32</p></td>
<td><p>25 PLN + 5 PLN</p></td>
</tr>
<tr style="background:#F0F8FF; ">
<td><p>15:50</p></td>
<td><p>17:50</p></td>
<td><p>18:40</p></td>
<td><p>19:32</p></td>
<td><p>26 PLN+ 5 PLN</p></td>
</tr>
<tr>
<td><p>16:30</p></td>
<td><p>18:30</p></td>
<td><p>18:40</p></td>
<td><p>19:32</p></td>
<td><p>25 PLN + 5 PLN</p></td>
</tr>
<tr style="background:#F0F8FF; ">
<td><p>17:45</p></td>
<td><p>19:45</p></td>
<td><p>20:10</p></td>
<td><p>20:50</p></td>
<td><p>25 PLN +5 PLN</p></td>
</tr>
</table>
</div>
<p>Wroclaw Central Bus Station is located directly opposite Wrocław Main Railway Station (Wrocław Głowny).</p>
<ul>
<li><a href="http://www.pks.jgora.pl/pl/rozklady" target="_blank">Bus and coach timetable</a> (station Jelenia Góra; in Polish)
</li>
</ul><br/>
</div>
';
}
function conftool(){
echo'
<div style="text-align: center; padding: 123px; 10px; 20px; 10px;">
<h3>The conference submission and registration system will be available shortly.</h3>
</div>
';
}
function fee_and_payment(){
echo'
<div style="padding: 20px 20px 0px 30px;">
<h4>CONFERENCE FEE</h4>
<table style="min-width: 50%; padding: 50px; border: 1px dotted #000; margin-left: auto; margin-right: auto;">
<tr>
<td style="border: 1px dotted; padding: 10px;">Full participation </td>
<td style="border: 1px dotted; padding: 10px;"><p style="display:inline; color: #ff0000; font-weight: bold;">1000 PLN</p> <strong>(Polish Zloty)</strong></td>
<td style="border: 1px dotted; padding: 10px;"><p style="display:inline; color: #ff0000; font-weight: bold;">250 €</p></td>
</tr>
<tr>
<td style="border: 1px dotted; padding: 10px;">Limited participation<br/>
(accompanying person)</td>
<td style="border: 1px dotted; padding: 10px; vertical-align: middle;"><p style="display:inline; color: #ff0000; font-weight: bold;">600 PLN</p> <strong>(Polish Zloty)</strong></td>
<td style="border: 1px dotted; padding: 10px; vertical-align: middle;"><p style="display:inline; color: #ff0000; font-weight: bold;">150 €</p></td>
</tr>
</table>
<br/><p><strong>The conference fee (full participation) includes</strong>:</p>
<ul class="list-1-k" style="margin: 0px 0px 0px 10px">
<li>Attendance at all conference sessions</li>
<li>Full accommodation (hotel and meals) from <strong><em>September 21 (Sunday afternoon)</em></strong> till <strong><em>September 23 (Tuesday noon)</em></strong>.</li>
<li>Coffee breaks.</li>
<li>The conference banquet.</li>
<li>The publication of one contribution.</li>
<li>Conference materials (including electronic copies of edited books).</li>
</ul>
<br/><strong>Extra charges:</strong>
<ul class="list-1-k" style="margin: 0px 0px 0px 10px">
<li>Papers longer than <strong>10</strong> pages will be charged <strong>60 PLN (15€) per extra page</strong>.</li>
<li>Publication of more than one paper (of one author) will be charged as for extra pages.</li>
</ul><br/>
Please note that at least one author of a contribution must register and pay the fee.
<br/><br/> <strong>Limited participation</strong> does not include the publication of a contribution.
<h4>PAYMENT</h4>
Payments should be made by bank transfer to the following account:<br/><br/>
<strong>Polish participants:</strong>
<table style="background: #efefef; min-width: 100%; border: 0px">
<tr>
<td style="min-width: 35%">account owner:</td>
<td><strong>Politechnika Wrocławska</strong>
</td>
</tr>
<tr>
<td>bank\'s name:</td>
<td>
<strong>Bank Zachodni WBK S.A. 16 O/Wrocław</strong></td>
</tr>
<tr>
<td>account no.:</td>
<td>
<strong>37 1090 2402 0000 0006 1000 0434</strong>
</td>
</tr>
<tr><td> </td><td> </td></tr>
<tr>
<td>please include in bank transfer <strong>your name</strong>, <strong>invoice recipient</strong> (institution) and the following <strong>note</strong>: </td>
<td style="vertical-align: bottom;">
<strong>"ISAT 2014, zlec. 487847/I23"</strong>
<!--
<p style="display:inline; color: #ff0000; font-weight: bold;">will be given soon</p>
-->
</td>
</tr>
</table><br/>
<strong>Foreign participants:</strong>
<table style="background: #efefef; min-width: 100%; border: 0px">
<tr>
<td style="min-width: 35%">account owner: </td>
<td><strong>Wrocław University of Technology</strong></td>
</tr>
<tr>
<td>account no.:</td>
<td>
<strong>PL 37 1090 2402 0000 0006 1000 0434</strong>
</td>
</tr>
<tr>
<td>bank\'s name:</td>
<td>
<strong>Bank Zachodni WBK S.A. 16 O/Wroclaw</strong></td>
</tr>
<tr>
<td style="vertical-align: bottom"><div align="left">please include in bank transfer <strong>your name</strong>, <strong>invoice recipient</strong> (institution) and the following <strong>note</strong>: </div></td>
<td valign="bottom">
<strong>"ISAT 2014, zlec. 487847/I23"</strong>
<!--
<p style="display:inline; color: #ff0000; font-weight: bold;">will be given soon</p>
-->
</td>
</tr>
</table>
<br/>
<table style="background: #efefef; min-width: 100%; border: 0px">
<tr>
<td style="min-width: 35%">IBAN:</td>
<td>
<strong>PL37109024020000000610000434</strong>
</td>
</tr>
<tr>
<td>SWIFT/BIC Code:</td>
<td><strong>WBK PPL PP</strong></td>
</tr>
</table><br/>
<strong>Additional data concerning the organizer\'s institution:</strong>
<table style="background: #efefef; min-width: 100%; border: 0px">
<tr>
<td style="min-width: 35%">address: </td>
<td><p><strong>Wrocław University of Technology<br>
Wybrzeze Wyspianskiego 27<br>
50-370 Wroclaw<br>
Poland
</strong></p></td>
</tr>
<tr>
<td style="min-width: 35%">NIP / VAT ID number: </td>
<td><strong>PL 896-000-58-51 </strong></td>
</tr>
<tr>
<td style="min-width: 35%">REGON: </td>
<td><strong>00000161433000</strong></td>
</tr>
</table><br/>
</div>
';
}
?>
<file_sep>/index34.php
<?
include_once 'include/menu31.php';
if (!isset($_GET['x']))
$_GET['x']='home';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>ISAT 2015</title>
<link rel="shortcut icon" href="http://www.isat.pwr.edu.pl/system/favicon.ico" />
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" media="screen" href="css/reset.css">
<link rel="stylesheet" type="text/css" media="screen" href="css/style22.css">
<link rel="stylesheet" type="text/css" media="screen" href="css/grid_12.css">
<link rel="stylesheet" type="text/css" media="screen" href="css/slider.css">
<script src="js/jquery.easing.1.3.js"></script>
<script src="js/tms-0.4.x.js"></script>
<script>
$(document).ready(function(){
$('.slider')._TMS({
show:0,
pauseOnHover:true,
prevBu:false,
nextBu:false,
playBu:false,
duration:1000,
preset:'fade',
pagination:true,
pagNums:false,
slideshow:7000,
numStatus:true,
banners:'fromRight',
waitBannerAnimation:false,
progressBar:false
})
});
</script>
<script type="text/javascript">
function c(t){var h=t.toString(16);h=unescape('%'+h);return h;}
function a(){return 'i'+c(0x73)+'a'+'t'+c(0x40)+'p'+c(0x77)+'r'+c(0x2e)+'e'+c(0x64)+'u'+'.'+c(0x70)+'l';}
function m(){return "mailto:"+a();}function w(){window.open(m());}
</script>
<!--[if gt IE 5]>
<script type="text/javascript" src="js/html5.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="css/ie.css">
<link rel="stylesheet" type="text/css" media="screen" href="css/styleie.css">
<![endif]-->
</head>
<body>
<!--==============================header=================================-->
<header>
<div id="logo">
<img src="images/logo2015.png" alt="">
<div class="prawo">
<h2>36th International Conference</h2>
<h1>ISAT 2015</h1>
<!--
<div style="text-align: center; ">
</div>
-->
<!--
<h3>September 20-22, Wrocław 2015, Poland</h3>
-->
</div>
</div>
<div class="clear"></div>
<nav class="box-shadow" style="min-width: 100%; margin: 15px 0px 0px 0px;">
<div style="min-width: 100%;">
<ul class="menu" style="min-width: 100%;">
<li id="menu1" class="home-page<?php echo ($_GET['x']=="home"?" current":""); ?>"><a href="?x=home"><span></span><br/></a></li>
<!-- <li id="menu1" class="home-page<?php echo ($_GET['x']=="home"?" current\"":""); ?>"><a href="?x=home"><span></span><br/></a></li> -->
<li id="menu2" <?php echo ($_GET['x']=="conference_info"?"class=\"current\"":""); ?>><a href="?x=conference_info">Conference<br/>info</a></li>
<li id="menu3" <?php echo ($_GET['x']=="committees"?"class=\"current\"":""); ?>><a href="?x=committees">Committees<br/> </a></li>
<li id="menu4" <?php echo ($_GET['x']=="important_dates"?"class=\"current\"":""); ?>><a href="?x=important_dates">Important<br/>dates</a></li>
<li id="menu5" <?php echo ($_GET['x']=="for_authors"?"class=\"current\"":""); ?>><a href="?x=for_authors">For<br/>authors</a></li>
<li id="menu6" <?php echo ($_GET['x']=="registration_and_submission"?"class=\"current\"":""); ?>><a href="?x=registration_and_submission">Registration<br/>and submission</a></li>
<li id="menu7" <?php echo ($_GET['x']=="fee_and_payment"?"class=\"current\"":""); ?>><a href="?x=fee_and_payment">Fee<br/>and payment</a></li>
<li id="menu8" <?php echo ($_GET['x']=="conference_program"?"class=\"current\"":""); ?>><a href="?x=conference_program">Conference<br/>program</a></li>
<li id="menu9" <?php echo ($_GET['x']=="venue"?"class=\"current\"":""); ?>><a href="?x=venue">Venue<br/> </a></li>
<li id="menu10" <?php echo ($_GET['x']=="travel"?"class=\"current\"":""); ?>><a href="?x=travel">Travel<br/>tips<br/></a></li>
<li id="menu11" <?php echo ($_GET['x']=="previous_conferences"?"class=\"current\"":""); ?>><a href="?x=previous_conferences">Electronic<br/>editions</a></li>
</ul>
<div class="clear"></div>
</div>
</nav>
</header>
<!-- <div id="lewy" style="margin-left: 30px; width: 230px; float: left; z-index:10; margin-top:15px; background: #dbdbdb; text-align: justify; padding:10px 0px 0px 15px;">-->
<!--- 240px -->
<div id="lewy" style="margin-left: 30px; width: 240px; float: left; z-index:10; margin-top:15px; text-align: justify;">
<div id="confsystem">
<h4>Conference System</h4>
<p style="text-align: center; margin-left: auto; margin-right: auto; max-width: 180px; padding: 10px 0px 10px 0px;">
<!--
<span style="background:url(../images/nav.jpg); color:#fff; font-weight:bold; font-style:italic; padding:6px 20px 5px 20px; border-radius:5px; box-shadow:0 1px 1px #fff">Link open soon...</span>
-->
<a href="http://www.isat.pwr.edu.pl/system/" target="_blank" class="button">LOG IN</a>
</p>
</div>
<div id="hotnews">
<h4>Hot News</h4>
<br/>
<h5>23:59, 29 February 2016</h5>
<h6> The ISAT 2016 book is published and available online on SpringerLink:<br />
<a href="http://link.springer.com/book/10.1007/978-3-319-28555-9" target="_blank">Book part I</a><br/>
<a href="http://link.springer.com/book/10.1007/978-3-319-28561-0" target="_blank">Book part II</a><br/>
<a href="http://link.springer.com/book/10.1007/978-3-319-28564-1" target="_blank">Book part III</a><br/>
<a href="http://link.springer.com/book/10.1007/978-3-319-28567-2" target="_blank">Book part IV</a><br/>
Electronic versions of the books will be sent to the authors as soon as we receive them from Springer.
</h6>
<br/>
<!--
-->
</div>
<div id="contact">
<h4>Contact Details</h4>
<h5 style="margin-top:5px;">CORRESPONDENCE ADDRESS:</h5>
<h3 style="margin-top:5px;">Chair of Computer Science<br/>
Wrocław University of Technology<br/>
Wybrzeż<NAME>ńskiego 27<br/>
50-370 Wrocław<br/>
Poland</h3><br/>
<table>
<tr>
<td style="min-width:100px;"><h5>E-MAIL:</h5></td><td>
<h5><a style="color: #5E4E38;" href="javascript:w();" onmouseover="window.status=m();return true;" onmouseout="window.status='';return true;"><script type="text/javascript">document.write(a());</script></a></h5>
</tr>
<tr>
<td style="min-width:100px;"><h5>PHONE:</h5></td><td><h5>+48 71 320 23 81</h5></td>
</tr>
<tr>
<td style="min-width:100px;"><h5>FAX:</h5></td><td><h5>+48 71 321 10 18</h5></td>
</tr>
</table>
</div>
</div>
<!-- 800 px -->
<div id="prawy" style="margin-left: 10px; min-height: 710px; float: left; min-width: 75%; max-width: 75%; background: #ffffff; z-index:10; margin-top: 15px;">
<?
$zmienna=$_GET['x'];
switch($zmienna){
case 'home': home(); break;
case 'conference_info': conference_info(); break;
case 'committees': committees(); break;
case 'important_dates': important_dates(); break;
case 'for_authors': for_authors(); break;
case 'registration_and_submission': registration_and_submission(); break;
case 'fee_and_payment': fee_and_payment(); break;
case 'conference_program': conference_program(); break;
case 'venue': venue(); break;
case 'travel': travel(); break;
case 'conftool': conftool(); break;
case 'previous_conferences': previous_conferences(); break;
default:
home(); break;
}
?>
</div>
<!--- </div> -->
<!--==============================footer================================= -->
<div style="margin-left: auto; margin-right: auto; width: 100%; float: left; z-index:10; margin-top:15px; min-height: 10px; text-align: justify; background: #204a88">
</div>
<footer style="margin-left: auto; margin-right: auto; float: none;">
<p class="p4">Wrocław University of Technology © 2015</p>
</footer>
</body>
</html>
<file_sep>/include/menu30.php
<?
function home(){
echo '<div style="text-align: center; padding: 50px">
<h4 style="color: #204a88; font-size:18pt;">36th International Conference<br>
Information Systems Architecture and Technology</h4>
<p class="style2"><br/>
<strong><em>SEPTEMBER 20-22, 2015<br/>KARPACZ, POLAND</em></strong></p>
<br/><br/>
Organized by:<br/>
<table style="border: 0px dotted; min-width: 100%;">
<tr>
<td style="min-width: 40%; vertical-align: middle; text-align: right;">
<img src="images/iz-logo-2.jpg" alt="" style="max-width: 110px;">
</td>
<td style="min-width: 5%; vertical-align: middle; text-align: left;">
</td>
<td style="min-width: 50%; vertical-align: middle; text-align: left;">
<h3>Chair of Computer Science</h3>
<h3>Chair of Management Systems</h3>
</td>
</tr>
</table>
<p style="text-align: center;">
<img src="images/logo_wiz_poziom.png" alt="" style="min-width: 100px; max-width:490px;">
</p>
<br/><br/>
<table style="margin-left: auto; margin-right: auto; border: 0px; width: 100%">
<tr>
<td style="vertical-align:middle;">
<p style="margin-right:10px;">The conference proceedings will be published in Springer’s book series<br/><a href="http://www.springer.com/series/11156" target="_blank">Advances in Intelligent Systems and Computing</a>.</p>
</td>
<td style="vertical-align:middle;">
<a href="http://www.springer.com/series/11156" target="_blank"><img src="images/springer_logo.png" alt="Springer_logo" width="181" height="50"></a>
</td>
</tr>
<td> </td>
<tr>
</tr>
<tr>
<td style="vertical-align:middle;">
<p style="margin-right:10px;">The patronage of the conference<br/><a href="https://zbp.pl/eng/first" target="_blank">The Polish Bank Association</a>.</p>
</td>
<td style="vertical-align:middle;">
<span style="font-family:TimesNewRoman,Times New Roman,Times,Baskerville,Georgia,serif; font-variant: small-caps;">
The Polish Bank Association<br/>
<a href="https://zbp.pl/eng/first" target="_blank"><img src="images/ZBP_logo.png" alt="ZBP logo" width="76" height="76"></a><br/>
<NAME>
</span>
</td>
</tr>
</table>
</div>
';
}
function conference_info(){
//<div style="text-align:justify; padding:1cm">
echo '
<div style="text-align: justify; padding: 20px 20px 0px 30px;">
<h4>CALL FOR PAPERS</h4> <br/>
<p style="font-size: 12pt; text-align: center; border: 0px dotted #000; max-width: 400px; margin-left: auto; margin-right: auto; padding: 13px 0px 13px 0px;">
<img src="images/ico_pdf.gif" alt="CFP" width="16" height="16">
<a href="files/isat_2015_call_for_papers.pdf">CALL FOR PAPERS</a>
<!--
<span style="font-size:12pt; font-style:italic; text-align:center;">The printable version will be available soon...</span>
-->
</p><br/>
<h4>CONFERENCE PURPOSE</h4>
<p style="text-indent: 1.5cm">The purpose of the ISAT is to discuss a state-of-art of information systems concepts and applications as well as architectures and technologies supporting contemporary information systems. The aim is also to consider an impact of knowledge, information, computing and communication technologies on managing of the organization scope of functionality as well as on enterprise information systems design, implementation and maintenance processes taking into account various methodological, technological and technical aspects. It is also devoted to information systems concepts and applications supporting exchange of goods and services by using different business models and exploiting opportunities offered by Internet-based electronic business and commerce solutions.</p>
<p style="text-indent: 1.5cm">ISAT is a forum for specific disciplinary research, as well as on multi-disciplinary studies to present original contributions and to discuss different subjects of today\'s information systems planning, designing, development and implementation.</p>
<p style="text-indent: 1.5cm"> The event is addressed to the scientific community, people involved in variety of topics related to information, management, computer and communication systems, and people involved in the development of business information systems and business computer applications. ISAT is also devoted as a form for presentation of scientific contributions prepared by MSc. and Ph.D. students. Business, Commercial and Industry participants are welcome.</p>
<br/>
Topics for publication and presentation can include, but are not limited to the following research and development areas/fields:
<table>
<tr>
<td width="50%">
<ul class="list-1-k" style="padding: 0px 10px 10px 10px;">
<li style="font-weight:bold; background:none;">Computer science oriented</li>
<li>Artificial Intelligence Methods</li>
<li>Cloud Computing</li>
<li>Computer Network Architectures</li>
<li>Computer Systems Security</li>
<li>Distributed Computer Systems</li>
<li>E-Business Systems</li>
<li>High Performance Computing</li>
<li>Internet of Things</li>
<li>Knowledge Discovery and Data Mining</li>
<li>Mobile Systems</li>
<li>Multimedia Systems</li>
<li>Quality of Service</li>
<li>Service Oriented Systems</li>
<li>Systems Analysis and Modeling</li>
<li>Web Design, Optimization and Performance</li>
</ul>
</td>
<td>
<ul class="list-1-k" style="padding: 0px 10px 10px 10px;">
<li style="font-weight:bold; background:none;">Management science oriented</li>
<li>Financial engineering and derivatives</li>
<li>Hedge funds and alternative investments</li>
<li>Knowledge based management</li>
<li>Market behavior and efficiency</li>
<li>Merger and acquisition</li>
<li>Modeling of financial decisions</li>
<li>Modeling of investment decisions</li>
<li>Mutual funds, closed-end funds, and ETFs</li>
<li>Portfolio management and performance evaluation</li>
<li>Project management</li>
<li>Risk management</li>
<li>Risk of bankruptcy and financial distress evaluation</li>
<li>Small business finance</li>
<li>Theories and models of innovation</li>
<li>Value based management</li>
</ul>
</td>
</tr>
</table>
</div>
<br/><br/>
';
}
//</div>';
function committees(){
echo '
<div style="text-align: justify; padding: 20px 0px 0px 30px">
<table width="100%">
<tr>
<td width="40%">
<h4>PROGRAM CHAIRS:</h4>
<ul style="font-size:12px; list-style: disc; padding:0px 0px 0px 25px;">
<li><NAME></li>
<li><NAME></li>
<li><NAME></li>
<li><NAME></li>
</ul>
</td>
<td width="60%">
<h4>ORGANIZING COMMITTEE:</h4>
<ul style="font-size:12px; list-style: disc; line-height: 26px; padding:0px 0px 0px 25px;">
<li><NAME> — Co-chairman</li>
<li><NAME> — Co-chairman</li>
<li><NAME> — secretary</li>
<li><NAME></li>
<li><NAME></li>
<li>Ziemowit NOWAK</li>
<li>Agnieszka PARKITNA</li>
</ul>
</td>
</tr>
</table>
<br/>
<br/>
<h4>PROGRAM COMMITTEE:</h4>
<table width="100%">
<tr>
<td width="40%">
<ul style="font-size:12px; list-style: disc; padding:0px 0px 0px 25px;">
<li><NAME> — Poland </li>
<li>Dhiya AL-JUMEILY — UK </li>
<li><NAME> — Greece </li>
<li><NAME> — New Zeland </li>
<li>Zbigniew BANASZAK— Poland </li>
<li><NAME> — Russia </li>
<li><NAME>KI — Poland </li>
<li><NAME> — Japan </li>
<li><NAME> — France </li>
<li>Wojciech CELLARY — Poland </li>
<li><NAME> — Malaysia</li>
<li><NAME> — Poland </li>
<li><NAME> — Romania</li>
<li><NAME> — Portugal</li>
<li><NAME> — Poland </li>
<li>Zhaohong DENG — China </li>
<li>Małgorzata DOLIŃSKA — Poland </li>
<li>El-Sayed M. EL-ALFY — Saudi Arabia</li>
<li>Naoki FUKUTA — Japan </li>
<li>Piotr GAWKOWSKI — Poland</li>
<li><NAME> — Spain </li>
<li><NAME> — Poland </li>
<li><NAME> — Poland </li>
<li>Irena HEJDUK — Poland </li>
<li>Katsuhiro HONDA — Japan </li>
<li><NAME> — Poland </li>
<li><NAME> — Poland </li>
<li>Natthakan IAM-ON — Thailand </li>
<li>Biju ISSAC — UK </li>
<li>Arun IYENGAR — USA </li>
<li>Jürgen JASPERNEITE — Germany </li>
<li>Janusz KACPRZYK — Poland</li>
<li>Hen<NAME>APROŃ — Poland </li>
<li><NAME> — Greece</li>
<li><NAME> — Poland </li>
<li><NAME>ALCZUK — Poland</li>
<li><NAME> — India </li>
<li><NAME>KI — Poland </li>
<li><NAME> — Spain </li>
<li>Gang LI — Australia </li>
<li><NAME> — Chile </li>
<li><NAME> — Spain </li>
<li><NAME> — Spain </li>
</ul>
</td>
<td width="60%">
<ul style="font-size:12px; list-style: disc; padding:0px 0px 0px 25px;">
<li>Sofian MAABOUT — France </li>
<li>Zygmunt MAZUR — Poland </li>
<li>Pedro MEDEIROS — Portugal </li>
<li>Toshiro MINAMI — Japan </li>
<li>Marian MOLASY — Poland </li>
<li>Zbigniew NAHORSKI — Poland</li>
<li>Kazumi NAKAMATSU — Japan </li>
<li>Peter NIELSEN — Denmark </li>
<li>Tadashi NOMOTO — Japan </li>
<li>Cezary ORŁOWSKI — Poland</li>
<li>Michele PAGANO — Italy </li>
<li><NAME> — Greece</li>
<li><NAME> — Poland </li>
<li><NAME>K — Poland </li>
<li>Jan PLATOŠ — Czech Republic </li>
<li>Tomasz POPŁAWSKI — Poland </li>
<li>Edward RADOSINSKI — Poland </li>
<li>Dolores I. REXACHS — Spain </li>
<li><NAME> — Spain </li>
<li>Leszek RUTKOWSKI — Poland </li>
<li>Gerald SCHAEFER — UK</li>
<li>Habib SHAH — Malaysia </li>
<li>Jeng SHYANG — Taiwan </li>
<li>Anna SIKORA — Spain </li>
<li>Małgorzata STERNA — Poland </li>
<li>Janusz STOKŁOSA — Poland </li>
<li>Remo SUPPI — Spain </li>
<li>Edward SZCZERBICKI — Australia </li>
<li>Jerzy ŚWIĄTEK — Poland </li>
<li>Eugeniusz TOCZYŁOWSKI — Poland </li>
<li>Elpida TZAFESTAS — Greece </li>
<li><NAME> — Spain </li>
<li>Bay VO — Vietnam </li>
<li>Hongzhi WANG — China </li>
<li><NAME>ANG — Taiwan </li>
<li>Jan WEREWKA — Poland </li>
<li>Thomas WIELICKI — USA </li>
<li>Zofia WILIMOWSKA — Poland </li>
<li>Bernd WOLFINGER — Germany </li>
<li>Józef WOŹNIAK — Poland </li>
<li>Roman WYRZYKOWSKI — Poland </li>
<li>Jaroslav ZENDULKA — Czech Republic </li>
<li>Bernard ŽENKO — Slovenia </li>
</ul>
</td>
</tr>
</table>
</div>
';
}
function important_dates(){
echo
'
<div style="text-align: justify; padding: 5% 10% 10% 10%">
<h4>IMPORTANT DATES</h4>
<table style="font-size:12pt; min-width: 650px; margin-left: auto; margin-right: auto;">
<tr>
<td>Registration and submission of full papers.</td>
<td><p style="text-align: right; font-weight: bold"><s>June 7</s><span style="color: red"> <b>June 15, 2015</b></span></p></td>
</tr>
<tr>
<td>Notification of paper acceptance.</td>
<td><p style="text-align: right; font-weight: bold"><s>June 30, July 6</s><span style="color: red"> <b>July 13, 2015</b></span></p></td>
</tr>
<tr>
<td>Camera ready version submission.</td>
<td><p style="text-align: right; font-weight: bold"><s>July 19</s> <b>July 31, 2015</b></p></td>
</tr>
<tr>
<td>Fee payment.</td>
<td><p style="text-align: right; font-weight: bold"><b>August 8, 2015</b></p></td>
</tr>
<tr>
<td>Registration of participation.</td>
<td><p style="text-align: right; font-weight: bold"><b>August 8, 2015</b></p></td>
</tr>
</table>
<br/>
<h4>CONFERENCE DATE</h4>
<table style="font-size:12pt; min-width: 650px; margin-left: auto; margin-right: auto;">
<tr>
<td>The conference will be held on </td>
<td style="text-align: right; font-weight: bold;"><b>September 20-22, 2015</b></td>
</tr>
</table>
</div>
';
}
function previous_conferences(){
echo '
<div style="text-align: justify; padding: 5% 10% 10% 10%">
<table style="margin-left: auto; margin-right: auto; min-width: 650px;">
<tr>
<td>
<h4 style="color: #000;">ISAT 2014</h4>
</td>
<td>
</td>
</tr>
<tr>
<td style="text-align: left">Conference web site:</td>
<td style="text-align: right"><a href="http://www.isat.pwr.edu.pl/isat2014/index.php" target="_blank">ISAT 2014 site</a>
</td>
<tr>
<td style="text-align: left;">Conference schedule and program:</td>
<td style="text-align: right;"><img src="images/ico_pdf.gif" width="16" height="16" alt=""><a href="http://www.isat.pwr.edu.pl/isat2014/files/ISAT2014_program_v3.pdf" target="_blank"> PDF version</a></td>
</tr>
</table>
<br/><p style="margin: 0px 0px 0px 32px">Electronic versions of ISAT 2014 books are available online:</p>
<ul class="list-1-proc" style="margin: 0px 0px 0px 35px">
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=26347" style="font-weight: bold;">Contemporary Approaches to Design and evaluation of Information Systems</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=26358" style="font-weight: bold;">Selected Aspects of Communication and Computational Systems</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=26348" style="font-weight: bold;">System Analysis Approach to the Design, Control and Decision Support</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=26349" style="font-weight: bold;">The Use of IT Technologies to Support Organizational Management in Risky Environment</a></li>
</ul>
<table style="margin-left: auto; margin-right: auto; min-width: 650px;">
<tr>
<td>
<br/><h4 style="color: #000;">ISAT 2013</h4>
</td>
<td>
</td>
</tr>
<tr>
<td style="text-align: left">Conference web site:</td>
<td style="text-align: right"><a href="http://www.isat.pwr.edu.pl/isat2013/index.php" target="_blank">ISAT 2013 site</a>
</td>
<tr>
<td style="text-align: left;">Conference schedule and program:</td>
<td style="text-align: right;"><img src="images/ico_pdf.gif" width="16" height="16" alt=""><a href="http://www.isat.pwr.edu.pl/isat2013/files/ISAT2013_program_v3.pdf" target="_blank"> PDF version</a></td>
</tr>
</table>
<br/><p style="margin: 0px 0px 0px 32px">Electronic versions of ISAT 2013 books are available online:</p>
<ul class="list-1-proc" style="margin: 0px 0px 0px 35px">
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=25303" style="font-weight: bold;">Intelligent Information Systems, Knowledge Discovery, Big Data and High Performance Computing</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=25298" style="font-weight: bold;">Network Architecture and Applications</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=25299" style="font-weight: bold;">Knowledge Based Approach to the Design, Control and Decision Support</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=25300" style="font-weight: bold;">Models of Decision Making in the Process of Management in a Risky Environment</a></li>
</ul>
<table style="margin-left: auto; margin-right: auto; min-width: 650px;">
<tr>
<td>
<br/><h4 style="color: #000;">ISAT 2012</h4>
</td>
<td>
</td>
</tr>
<tr>
<td style="text-align: left">Conference web site:</td>
<td style="text-align: right"><a href="http://www.isat.pwr.edu.pl/isat2012/index.php" target="_blank">ISAT 2012 site</a>
</td>
<tr>
<td style="text-align: left;">Conference schedule and program:</td>
<td style="text-align: right;"><img src="images/ico_pdf.gif" width="16" height="16" alt=""><a href="http://www.isat.pwr.edu.pl/isat2012/files/isat2012_program_ver5_arch.pdf" target="_blank"> PDF version</a></td>
</tr>
</table>
<br/><p style="margin: 0px 0px 0px 32px">Electronic versions of ISAT 2012 books are available online:</p>
<ul class="list-1-proc" style="margin: 0px 0px 0px 35px">
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=19601" style="font-weight: bold;">Web engineering and high-performance computing on complex environments</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=19602" style="font-weight: bold;">Networks design and analysis</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=19603" style="font-weight: bold;">System analysis approach to the design, control and decision support</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=19604" style="font-weight: bold;">The use of IT models for organization management</a></li>
</ul>
<table style="margin-left: auto; margin-right: auto; min-width: 650px;">
<tr>
<td>
<br/><h4 style="color: #000;">ISAT 2011</h4>
</td>
<td></td>
</tr>
<tr>
<td style="text-align: left">Conference web site:</td>
<td style="text-align: right"><a href="http://www.isat.pwr.edu.pl/isat2011/index.php" target="_blank">ISAT 2011 site</a></td>
<tr>
<td style="text-align: left;">Conference schedule and program:</td>
<td style="text-align: right;"><img src="images/ico_pdf.gif" width="16" height="16" alt=""><a href="http://www.isat.pwr.edu.pl/isat2011/files/ISAT2011program2b.pdf" target="_blank"> PDF version</a></td>
</tr>
</table>
<br/><p style="margin: 0px 0px 0px 32px">Electronic versions of ISAT 2011 books are available online:</p>
<ul class="list-1-proc" style="margin: 0px 0px 0px 35px">
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=15407" style="font-weight: bold;">Web information systems engineering, knowledge discovery and hybrid computing</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=15417" style="font-weight: bold;">Service oriented networked systems</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=15425" style="font-weight: bold;">System analysis approach to the design, control and decision support</a></li>
<li><a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=15435" style="font-weight: bold;">Information as the intangible assets and company value source</a></li>
</ul>
<table style="margin-left: auto; margin-right: auto; min-width: 650px;">
<tr>
<td>
<br/><h4 style="color: #000;">ISAT 2010</h4>
</td>
<td></td>
</tr>
<tr>
<td style="text-align: left">Conference web site:</td>
<td style="text-align: right"><a href="http://www.isat.pwr.edu.pl/isat2010/index.php" target="_blank">ISAT 2010 site</a></td>
<tr>
<td style="text-align: left">Conference schedule and program:</td>
<td style="text-align: right; min-width: 320px"><img src="images/html.gif" width="16" height="16" alt=""><a href="http://www.isat.pwr.edu.pl/isat2010/files/ISAT2010program4.htm" target="_blank"> HTML version</a></td>
</tr>
<tr>
<td>
<h4 style="color: #000;">ISAT 2009</h4>
</td>
<td></td>
</tr>
<tr>
<td style="text-align: left">Conference web site:</td>
<td style="text-align: right"><a href="http://www.isat.pwr.edu.pl/isat2009/index.php" target="_blank">ISAT 2009 site</a></td>
<tr>
<td style="text-align: left">Conference schedule and program:</td>
<td style="text-align: right"><img src="images/html.gif" width="16" height="16" alt=""><a href="http://www.isat.pwr.edu.pl/isat2009/files/ISAT2009program3.htm" target="_blank"> HTML version</a></td>
</tr>
<tr>
<td>
<h4 style="color: #000;">ISAT 2008</h4>
</td>
<td></td>
<tr>
<td style="text-align: left">Conference web site:</td>
<td style="text-align: right"><a href="http://www.isat.pwr.edu.pl/isat2008/index.html" target="_blank">ISAT 2008 site</a></td>
</tr>
<tr>
<td style="text-align: left">Conference schedule and program:</td>
<td style="text-align: right"><img src="images/html.gif" width="16" height="16" alt=""><a href="http://www.isat.pwr.edu.pl/isat2008/files/isat2008program.html" target="_blank"> HTML version</a></td>
</tr>
<tr>
<td>
<h4 style="color: #000;">ISAT 2007</h4>
</td>
<td></td>
</tr>
<tr>
<td style="text-align: left;">Conference web site:</td>
<td style="text-align: right;"><a href="http://www.isat.pwr.edu.pl/isat2007/index.html" target="_blank">ISAT 2007 site</a></td>
</tr>
<tr>
<td style="text-align: left;">Conference schedule and program:</td>
<td style="text-align: right;"><img src="images/html.gif" width="16" height="16" alt=""><a href="http://www.edu.pwr.edu.pl/isat2007/program07.htm" target="_blank"> HTML version</a></td>
</tr>
<tr>
<td>
<h4 style="color: #000;">ISAT 2006</h4>
</td>
<td></td>
<tr>
<td style="text-align: left">Conference web site:</td>
<td style="text-align: right"><a href="http://www.isat.pwr.edu.pl/isat2006/index.html" target="_blank">ISAT 2006 site</a></td>
</tr>
</table>
</div>
';
}
function for_authors(){
echo '
<div style="text-align: justify; padding: 20px 0px 0px 30px;">
<table style="max-width: 97%;">
<!-- <table class="tekst_gl" width="98%" border="0" cellspacing="0" cellpadding="0">-->
<tr>
<td>
<!-- <td valign="top" rowspan="2">-->
<h4>CONFERENCE LANGUAGE</h4>
<p>English</p>
<h4>PUBLICATION</h4>
<table style="margin-left: auto; margin-right: auto; border: 0px; width: 100%">
<tr>
<td style="vertical-align:middle; ">
<a href="http://www.springer.com/series/11156" target="_blank"><img src="images/springer_logo.png" alt="Springer_logo" width="181" height="50"></a>
</td>
<td>
<p style="margin-left:10px;">The papers, accepted in a peer review process, will appear in the proceedings volume to be published in Springer’s <strong>"Advances in Intelligent Systems and Computing"</strong> book series
(<a href="http://www.springer.com/series/11156" target="_blank">Springer series web page</a>), submitted for indexing by the <strong>Thomson Reuters Conference Proceedings Citation Index (Web of Science)</strong> and <strong>Elsevier’s EI Compendex, DBLP, SCOPUS, Google Scholar</strong>, and <strong>Springerlink</strong>.
</td>
</tr>
</table>
<h4>PAPERS</h4>
<ul class="list-1-k" style="margin: 0px 0px 0px 10px;">
<li>Submissions should describe original work not submitted or published elsewhere.</li>
<li>Submitted papers should be prepared according to the template available at this page.</li>
<li>The required paper length is <strong>10 pages</strong>.</li>
<li>Papers should be submitted <span style="font-weight: bold; color:#cc0000; ">both</span> in <strong>MS Word (.docx)</strong> and <strong>pdf</strong> (made from original source .docx) file format.</li>
<li>An accepted paper should be presented by one of its authors who must register for the conference and pay the fee. <br/>
Accepted but not shown papers will be excluded from the indexation.</li>
</ul> <br/>
<h4>PAPER TEMPLATE AND INSTRUCTIONS</h4>
<p>Paper template (with instruction for using template - zipped) and authors guidelines for the preparation of contribution may be found below. Please <strong>read these guidelines carefully</strong> before submitting a paper.</p>
<p>Office Word 2007-2013 documents are <strong>preferred</strong>.</p>
<br/>
<table style="margin-left: auto; margin-right: auto; border: 0px; text-align: center; width: 100%">
<tr>
<td>
<table style="margin-left: auto; margin-right: auto; min-width: 250px; max-width: 250px; border: 1px solid black; text-align: center;">
<tr style="border: 1px solid black; background: #204A88; color: #ffffff;">
<td style="font-weight: bold; border: 1px solid black;">Paper Template (<span style="color:yellow">Word 2007+</span>)</br><span style="font-weight: normal;">(and instructions for using template)</span></td>
</tr>
<tr>
<td>
<a href="files/splnproc1110.zip" style="color: #cc0000;">Get It!</a>
<!--
Will be given...
<a href="files/ISAT2015_template.zip">Get It!</a>
-->
</td>
</tr>
<tr>
<td style="font-weight: lighter; border: 1px solid black;">
<a href="ftp://ftp.springer.de/pub/tex/latex/llncs/word/splnproc1110.zip"><span style="font-weight: normal; font-size:smaller;">Source link</span></a>
</td>
</tr>
</table>
</td>
<!--
<td>
<table style="margin-left: auto; margin-right: auto; min-width: 230px; max-width: 230px; border: 1px solid black; text-align: center;">
<tr style="border: 1px solid black; background: #204A88; color: #ffffff;">
<td style="font-weight: bold; border: 1px solid black;">Paper Template (<span style="color:yellow">Word 2003</span>)</br><span style="font-weight: normal;">(and instructions for using template)</span></td>
</tr>
<tr>
<td>
<a href="files/svlnproc1104.zip" style="color: #cc0000;">Get It!</a>
</td>
</tr>
<tr>
<td style="font-weight: lighter; border: 1px solid black;">
<a href="http://static.springer.com/sgw/documents/1124637/application/zip/CSProceedings_AuthorTools_Word_2003.zip"><span style="font-weight: normal; font-size:smaller;">Source link</span></a>
</td>
</tr>
</table>
</td>
-->
<td>
<table style="margin-left: auto; margin-right: auto; min-width: 250px; max-width: 250px; border: 1px solid black; text-align: center;">
<tr style="border: 1px solid black; background: #204A88; color: #ffffff;">
<td style="font-weight: bold; border: 1px solid black;">Guidelines for the preparation of contribution</td>
</tr>
<tr>
<td>
<a href="files/Guidelines_for_the_Preparation_of_Contribution.pdf" style="color: #cc0000;">Get It!</a>
<!--
Will be given...
<a href="files/ISAT2015_template.zip">Get It!</a>
-->
</td>
</tr>
<tr>
<td style="font-weight: lighter; border: 1px solid black;">
<a href="http://static.springer.com/sgw/documents/1121537/application/pdf/SPLNPROC+Author+Instructions_Feb2015.pdf"><span style="font-weight: normal; font-size:smaller;">Source link</span></a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br/>
<h4>Statement required by publishing house</h4>
<ul class="list-1-k" style="margin: 0px 0px 0px 10px;">
<li>Each contribution must be accompanied by a Springer copyright form, a so-called "Consent to Publish" form.</br>
Modified forms are not acceptable.</li>
<li>One author may sign on behalf of all of the authors of a particular paper. In this case, the author signs for and accepts responsibility for releasing the material on behalf of any and all co-authors.</li>
</ul>
<br/>
<table style="margin-left: auto; margin-right: auto; min-width: 300px; max-width: 300px; border: 1px solid black; text-align: center;">
<tr style="border: 1px solid black; background: #204A88; color: #ffffff;">
<td style="font-weight: bold; border: 1px solid black;">Copyright (Consent to Publish) Form</td>
</tr>
<tr>
<td>
<!--
Will be available
-->
<a href="files/Consent_to_Publish-your_name.pdf">ISAT template - <span style="color:#cc0000;">Get It!</span></a>
</td>
</tr>
<tr>
<td style="font-weight: lighter; border: 1px solid black;">
<a href="files/Consent_to_Publish-example.pdf"><span style="font-weight: normal; font-size:smaller;">Signed example</span></a>
<br />
<a href="http://www.springer.com/cda/content/document/cda_downloaddocument/Consent+to+Publish.pdf?SGWID=0-0-45-1416002-p174537411"><span style="font-weight: normal; font-size:smaller;">Original template</span></a> (blank)
</td>
</tr>
</table>
<ul class="list-1-k" style="margin: 0px 0px 0px 10px;">
<li></li>
<li>Please complete, sign and send the copyright forms to ISAT secretariat.</li>
<li style="color:#aa0000; ">Please note:
<ul>
<li>The signed copyright form should be sent by electronic mail or by post, by <strong>registration of participation deadline</strong>.</li>
<li>The best way is to complete ISAT template form and to <strong>sign the document electronically</strong> and <strong>send this electronic copy by e-mail</strong>.</li>
</ul>
<!--
<ul>
<li>For the time being, it is only template of the Copyright Form. <strong>The partly filled form will be available by the end of review phase.</strong>.</li>
<li>The signed copyright form should be sent by electronic mail or by post, by <strong>registration of participation deadline</strong>.</li>
</ul>
-->
</li>
</ul>
<br/>
<div style="text-align: right;">
<table style="text-align: justify; border: 1px solid black; margin-left: auto; margin-right: auto; min-width: 300px; max-width: 400px;">
<tr>
<td style="padding: 10px 10px 10px 10px;">ISAT Secretariat<br>
Chair of Computer Science (W-8 / K-3) <br/>
Wybrzeże Wyspiańskiego 27<br/>
50-370 Wrocław<br/>
Poland<br/>
</td>
</tr>
</table>
</div>
<br/>
<h4>PAPER REGISTRATION AND SUBMISSION</h4>
<ul class="list-1" style="margin: 0px 0px 0px 10px;">
<li>Full papers must be registered and submitted using the conference web system<strong>, by the <a href="?x=important_dates">\'Registration and submission of full papers\'</a> date</strong>.</li>
<li>Separate, approximately <strong>150-200 words long, abstract</strong> should be entered during paper registration (NOT separate file - just fill proper window). All instructions given at the conference website should be taken into account.</li>
<li>The <strong>paper may be registered in advance</strong>, and <strong>full paper may be uploaded (appended) later</strong>, however by the paper submission deadline.</li>
</ul>
<!--
Papers with approximately 200 words long abstracts should be registered using the conference submission and registration system before the <a href="?x=important_dates"> \'Title Registration and Abstract Submission Date\'</a>.<br/>
Full papers must be submitted using the conference submission and registration system before the <a href="?x=important_dates">\'Full Paper Submission Date\'</a>.<br/>
-->
<br/>
<h4>PRESENTATION INSTRUCTIONS</h4>
<ul class="list-1" style="margin: 0px 0px 0px 10px;">
<li>The official language of the conference is English.</li>
<li>All presentation rooms will be equipped with an overhead projector and a computer (desktop or notebook) where presentations can be uploaded.</li>
<li>Computers will have Microsoft Power Point (for .ppt/.pps presentations) and Adobe Reader (for .pdf presentations) software installed.</li>
<li>Authors are kindly requested to upload their presentation(s) to a computer before the start of a session. </li>
<li>Time of presentation (including discussion) is <strong>maximum 20 minutes</strong>.</li>
</ul>
<h4>FURTHER INFORMATION</h4>
<p>For all matters related to ISAT 2015, please feel free to contact the Organizing Committee.</p>
</td>
</tr>
</table>
<br/>
</div>
';
}
function registration_and_submission(){
echo '
<div style="text-align: justify; padding: 20px 0 0 30px;">
<table style="max-width:98%;">
<tr>
<td>
<h4>REGISTRATION & SUBMISSION</h4>
<p>Registration of a paper and paper submission are available using the conference submission and registration system:</p><br/>
<!--
<p style="text-align: center; border: 1px dotted #000; max-width: 275px; margin-left: auto; margin-right: auto; padding: 10px 0px 10px 0px; font-style:italic">Link will be available soon...</p>
<p align="center" class="style1">CLOSED</p>
-->
<p style="text-align: center; border: 1px dotted #000; max-width: 275px; margin-left: auto; margin-right: auto; padding: 10px 0px 10px 0px;"><a href="http://www.isat.pwr.edu.pl/system/" target="_blank">REGISTRATION & SUBMISSION</a></p>
<h4>CREATE AN ACCOUNT</h4>
<ul style="list-style: disc; margin: 5px 0px 0px 20px;">
<li>In order to submit any data, it is necessary to <strong>create a user account</strong>.<br/>
If the account has been created earlier (eg. for the previous conference), you don\'t have to create the new one.</li>
<li>This will allows to: register a paper, submit an abstract and a full paper, check the status of submitted papers, register as participant as well as view and edit submitted personal data.</li>
</ul>
<h4>PAPER REGISTRATION (WITH ABSTRACT)</h4>
<ul style="list-style: disc; margin: 5px 0px 0px 20px;">
<li>Paper submission may be done in <strong>two phases</strong>. In the <strong>paper registration phase</strong>, authors can submit registration <strong>without uploading</strong> their papers.</li>
<li>The abstract should be approximately <strong>150-200 words</strong> long.</li>
<li>In order to register a paper, it is necessary to create an account (if you have not got one yet) and log in to the conference system using the link given above.</li>
<li>Papers should be registered <strong>before</strong> the \'Paper Registration and Submission\' date which is given at the <a href="?x=important_dates">important dates</a> page.</li>
</ul>
<h4>PAPER SUBMISSION</h4>
<ul style="list-style: disc; margin: 5px 0px 0px 20px;">
<li>Papers should be <strong>10 pages</strong> long.</li>
<li>Papers should be uploaded <strong>before</strong> the \'Paper Registration and Submission\' date which is given at the <a href="?x=important_dates">important dates</a> page.</li>
</ul>
<!-- In order to submit a paper it is necessary to log in using the link given above. The paper submission will be available after the acceptance of an abstract. -->
<br/>
<p>The notification of acceptance will be sent by e-mail and signaled with the status of the paper in the conference system.</p>
</td>
</tr>
</table>
</div>
';
}
function conference_program(){
echo '
<div style="text-align: justify; padding: 20px 30px 0px 30px;">
<h4>CONFERENCE SCHEDULE AND PROGRAM</h4> <br/>
<h5><u>Conference program</u></h5>
<div style="text-align: center; padding: 10px; 10px; 10px; 10px;">
<span style="font-size:12pt; font-style:italic; text-align:center;">The detailed program will be available later</span>
<!--
<p style="font-size: 12pt; text-align: center; border: 0px dotted #000; max-width: 400px; margin-left: auto; margin-right: auto; padding: 13px 0px 13px 0px;">
<h5><img src="images/ico_pdf.gif" alt="isat2015_program" width="16" height="16"><a href="files/ISAT2015_program_v3.pdf">The conference program</a> (version 3, 18.09.2015)</h5>
-->
</div>
<br>
<!--
<h5><u>Keynote session</u></h5>
<div style="text-align: left; padding: 10px; 10px; 10px; 10px;">
<p>We are very pleased to annouce a special lecture on very current topic of contemporary computer science:</p>
<div style="text-align: center">
<p><b>Prof. <NAME></b></p>
<p><b>"A critical overview on traffic modelling and performance evaluation"</b></p>
<p>Plenary session, Monday 9:30-11:30</p>
</div>
<ul class="list-1-k" style="margin: 0px 0px 0px 2px">
<li><img src="images/ico_pdf.gif" alt="pagano_abstract" width="16" height="16"><a href="files/pagano_abstract.pdf">The short abstract of the lecture (pdf, 40kB)</a></li>
<li><img src="images/ico_pdf.gif" alt="pagano_cv" width="16" height="16"><a href="files/pagano_cv.pdf">The biographical notes of prof. Pagano (pdf, 39kB)</a></li>
</ul>
<br>
</div>
-->
<h5><u>The general schedule*</u></h5>
<p>* provisional</p>
<!--
<div style="text-align: center; padding: 20px; 10px; 20px; 10px;">
<span style="font-size:12pt; font-style:italic; text-align:center;">Will be given later...</span>
</div>
-->
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; text-align: center; font: 14.0px Arial; color: #f0f0ff}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; text-align: center; font: 12.0px Arial; color: #993300}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; text-align: center; font: 12.0px Arial}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; text-align: center; font: 12.0px Arial; color: #000080}
p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; text-align: center; font: 14.0px Arial; color: #000080}
p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Arial; text-align: left;}
p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Calibri}
span.s1 {font: 12.0px Times}
table.t1 {width: 773.0px; border-collapse: collapse; table-layout: fixed}
td.td1 {width: 771.0px; background-color: #4080c0; border-style: solid; border-width: 0.0px 1.0px 2.0px 0.0px; border-color: #ffff00 #ffffff #ffffff #ffff00; padding: 8.0px 1.0px 8.0px 1.0px}
td.td2 {width: 109.0px; background-color: #d0e0f0; border-style: solid; border-width: 0.0px 1.0px 2.0px 0.0px; border-color: #993300 #ffffff #ffffff #993300; padding: 1.0px 1.0px 0.0px 1.0px}
td.td3 {width: 659.0px; background-color: #d0e0f0; border-style: solid; border-width: 1.0px 1.0px 2.0px 0.0px; border-color: #ffffff #ffffff #ffffff #993300; padding: 1.0px 1.0px 0.0px 1.0px}
td.td4 {width: 109.0px; background-color: #d0e0f0; border-style: solid; border-width: 0.0px 1.0px 2.0px 0.0px; border-color: #000000 #ffffff #ffffff #000000; padding: 1.0px 1.0px 0.0px 1.0px}
td.td5 {width: 659.0px; background-color: #d0e0f0; border-style: solid; border-width: 1.0px 1.0px 2.0px 0.0px; border-color: #ffffff #ffffff #ffffff #000000; padding: 1.0px 1.0px 0.0px 1.0px}
td.td6 {width: 109.0px; background-color: #e0f0f0; border-style: solid; border-width: 0.0px 1.0px 2.0px 0.0px; border-color: #ffffff #ffffff #ffffff #ffffff; padding: 1.0px 1.0px 0.0px 1.0px}
td.td7 {width: 108.0px; background-color: #e0f0f0; border-style: solid; border-width: 0.0px 1.0px 2.0px 0.0px; border-color: #ffffff #ffffff #ffffff #ffffff; padding: 1.0px 1.0px 0.0px 1.0px}
td.td8 {width: 548.0px; background-color: #e0f0f0; border-style: solid; border-width: 1.0px 0.0px 2.0px 0.0px; border-color: #ffffff #ffffff #ffffff #ffffff; padding: 1.0px 1.0px 0.0px 1.0px}
</style>
<table width="773.0" cellspacing="0" cellpadding="0" class="t1">
<tbody>
<tr>
<td colspan="7" valign="top" class="td1">
<p class="p1"><b>SUNDAY – 20 SEPTEMBER 2015</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td2">
<p class="p2"><b>13:00 – 15:00</b></p>
</td>
<td colspan="6" valign="middle" class="td3">
<p class="p2"><b>Registration</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td4">
<p class="p3"><b>15:00 – 15:50</b></p>
</td>
<td colspan="6" valign="middle" class="td5">
<p class="p3"><b>Opening of the Conference & Welcome party</b></p>
<p class="p2">(coffee, tea, snack, etc.)</p>
</td>
</tr>
<tr>
<td valign="middle" class="td6">
<p class="p4"><b>16:00 – 18:00</b></p>
</td>
<td colspan="6" valign="middle" class="td8">
<p class="p5"><b>PART I</b> (sessions)</p>
</td>
</tr>
<tr>
<td valign="middle" class="td2">
<p class="p2"><b>18:00 - 19:00</b></p>
</td>
<td colspan="6" valign="top" class="td3">
<p class="p2"><b>Dinner</b></p>
</td>
</tr>
<tr>
<td colspan="7" valign="top" class="td1">
<p class="p1"><b>MONDAY – 21 SEPTEMBER 2015</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td2">
<p class="p2"><b>7:30 – 8:30</b></p>
</td>
<td colspan="6" valign="top" class="td3">
<p class="p2"><b>Breakfast (Buffet)</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td2">
<p class="p2"><b>8:30 – 9:30</b></p>
</td>
<td colspan="6" valign="top" class="td3">
<p class="p2"><b>Registration</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td6">
<p class="p4"><b>8:00 – 9:20</b></p>
</td>
<td colspan="6" valign="middle" class="td8">
<p class="p5"><b>PART II</b> (sessions)</p>
</td>
</tr>
<tr>
<td valign="middle" class="td6">
<p class="p4"><b>9:30 – 11:30</b></p>
</td>
<td colspan="6" valign="middle" class="td8">
<p class="p5"><b>Plenary session</b>
</p>
</td>
</tr>
<tr>
<td valign="middle" class="td2">
<p class="p2"><b>12:00 – 13:00</b></p>
</td>
<td colspan="6" valign="top" class="td3">
<p class="p2"><b>Lunch</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td4">
<p class="p3"><b>13:20</b></p>
</td>
<td colspan="6" valign="middle" class="td5">
<p class="p5"><b>Outdoor discussion session</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td2">
<p class="p2"><b>20:00</b></p>
</td>
<td colspan="6" valign="top" class="td3">
<p class="p2"><b>Conference Dinner</b></p>
</td>
</tr>
<tr>
<td colspan="7" valign="top" class="td1">
<p class="p1"><b>TUESDAY – 22 SEPTEMBER 2015</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td2">
<p class="p2"><b>8:00 – 9:00</b></p>
</td>
<td colspan="6" valign="top" class="td3">
<p class="p2"><b>Breakfast</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td6">
<p class="p4"><b> 8:50 – 10:30</b></p>
</td>
<td colspan="6" valign="middle" class="td8">
<p class="p5"><b>PART III</b> (sessions)</p>
</td>
</tr>
<tr>
<td valign="middle" class="td2">
<p class="p2"><b>10:30 – 10:50</b></p>
</td>
<td colspan="6" valign="top" class="td3">
<p class="p2"><b>Coffee Break</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td6">
<p class="p4"><b>10:50 – 12:30</b></p>
</td>
<td colspan="6" valign="middle" class="td8">
<p class="p5"><b>PART IV</b> (sessions)</p>
</td>
</tr>
<tr>
<td valign="middle" class="td4">
<p class="p3"><b>12:30 – 12:50</b></p>
</td>
<td colspan="6" valign="middle" class="td5">
<p class="p3"><b>Closing of the Conference</b></p>
</td>
</tr>
<tr>
<td valign="middle" class="td4">
<p class="p2"><b>13:00 – 14:00</b></p>
</td>
<td colspan="6" valign="top" class="td3">
<p class="p2"><b>Lunch</b></p>
</td>
</tr>
</tbody>
</table>
<br>
</div>
';
}
function venue(){
echo '
<div style="text-align: justify; padding: 20px 30px 0px 30px;">
<script src="http://maps.google.com/maps?file=api&v=2&key=<KEY>"
type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
var lat=50.767256;
var lng=15.762248;
var zoom=8;
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
GEvent.addListener(map, "moveend", function() {
map.closeInfoWindow();
var center = map.getCenter();
var zoom = map.getZoom();
//document.getElementById("message").innerHTML = \'Lat,Lng \'+ center.toString() + \', Zoom(\' + zoom.toString() + \')\';
});
map.addControl(new GLargeMapControl());
map.addControl(new GOverviewMapControl());
map.addControl(new GScaleControl());
map.addControl(new GMapTypeControl());
map.enableContinuousZoom();
map.enableDoubleClickZoom();
map.setCenter(new GLatLng(lat, lng), zoom);
map.hideControls();
GEvent.addListener(map, "mouseover", function(){map.showControls();});
GEvent.addListener(map, "mouseout", function(){map.hideControls();});
var info1 = "<center><a href=http://www.hotelartus.pl/en/ target=_blank>Hotel Artus<br><img border=0 width=150 height=100 src=./images/artus/hotelartus_mapa.jpg></a>";
var point1 = new GLatLng(50.766968, 15.762175);
var marker1 = new GMarker(point1);
GEvent.addListener(marker1, "click", function() {
marker1.openInfoWindowHtml(info1);
});
map.addOverlay(marker1);
marker1.openInfoWindowHtml(info1);
}
}
//]]>
</script>
<!--
<table class="tekst_gl" width="98%" border="0" cellspacing="0" cellpadding="0">
<table style="max-width: 98%">
<tr>
<td valign="top" rowspan="2">
-->
<h4>VENUE</h4>
<!--
<p>ISAT 2015 conference will be held in <a href="http://www.szklarskaporeba.pl/it/en/polozenie_i_dojazd.htm" target="_blank">Karpacza</a>. The city is located in the Polish side of the Karkonosze Mountains, at the foot of Szrenica mountain (1362 meters above sea level).</p> <br/>
-->
<p>ISAT 2015 conference will be held in the <a href="http://www.hotelartus.pl/en/" target="_blank">HOTEL ARTUS</a> in Karpacz - a spa town and ski resort located in the Polish side of the Karkonosze Mountains (near Sniezka mountain - 1602 meters above sea level), in Lower Silesian Voivodeship, south-western Poland.<br></p>
<p style="text-decoration: underline;">Hotel address and contact details:</p>
<p style="line-height:16px; ">
Hotel ARTUS <br>
<NAME> 9<br>
58-540 Karpacz, Poland</p>
<p><u>Phone</u> (reception): +48 75 761 63 46, +48 75 712 20 61, mobile: +48 664 34 40 28</p>
<p><u>GPS</u> = (50.766968, 15.762175)</p>
<!--
<div id="map" style="width: 800px; height: 500px;"></div>
-->
<p style="text-align: center;"><script>load()</script></p>
<br/>
<table style="min-width: 100%; max-width: 100%;">
<tr>
<td style="border-top: 1px dotted black; border-bottom: 1px dotted black; border-left: 1px dotted black; min-width: 35%; max-width: 35%; padding: 8px;">
<h3 style="color: #204a88; font-size:15pt;">Accommodation</h3><br/>
<!--
<p style="margin: 0px 20px; font-size:12pt; font-style:italic; text-align:center;">Will be available later...</p>
-->
<a href="http://www.hotelartus.pl/en/" target="_blank">Artus Hotel:</a>
<ul class="list-1-k">
<li>Double and single rooms are available.</li>
<li>All presentation rooms will be equipped with an overhead projector and a computer where presentations can be uploaded.</li>
<li>All ISAT participants may relax in the swimming pool, saunas (steam, dry and infrared), fitness room, and jacuzzi.</li>
</ul>
</td>
<td style="border-bottom: 1px dotted black; border-top: 1px dotted black; border-right: 1px dotted black; min-width: 47%; max-width: 47%; padding: 8px;">
<table style="min-width: 100%;">
<tr style="border: 0px dotted black; text-align: center;">
<td> <img src="images/artus/hotelartus01.jpg" alt="" style="max-width: 240px; -moz-border-radius: 7px; border-radius: 7px;"> </td>
<td> <img src="images/artus/hotelartus02.jpg" alt="" style="max-width: 240px; -moz-border-radius: 7px; border-radius: 7px;"> </td>
</tr>
<tr>
<td style="height: 10px;"></td><td></td>
</tr>
<tr style="border: 0px dotted black; text-align: center;">
<td> <img src="images/artus/hotelartus03.jpg" alt="" style="max-width: 240px; -moz-border-radius: 7px; border-radius: 7px;"> </td>
<td> <img src="images/artus/hotelartus04.jpg" alt="" style="max-width: 240px; -moz-border-radius: 7px; border-radius: 7px;"> </td>
</tr>
</table>
</td>
</tr>
</table>
<!--
<br/>
<table style="min-width: 100%; max-width: 100%;">
<tr style="border: 1px dotted black;">
<td style="padding: 8px;">
<h3 style="color: #204a88; font-size: 15pt;">Karpacz and its surroundings</h3><br/>
<p style="margin: 0px 20px; font-size:12pt; font-style:italic; text-align:center;">Extra info will be available later...</p>
<table style="min-width: 100%;">
<tr>
<td style="text-align: center; min-width: 25%; max-width: 25%;">
<h3 style="color: #204a88; text-align: left; margin-left: 15px;">The Karkonosze Mountains</h3>
</td>
<td style="text-align: center; min-width: 25%; max-width: 25%;">
<h3 style="color: #204a88; text-align: left; margin-left: 15px;">The Izery Mountains</h3><br/>
</td>
<td style="text-align: center; min-width: 25%; max-width: 25%;">
<h3 style="color: #204a88; text-align: left; margin-left: 15px;">Szrenica</h3><br/>
</td>
<td style="text-align: center; min-width: 25%; max-width: 25%;">
<h3 style="color: #204a88; text-align: left; margin-left: 15px;">Kamieńczyk Waterfall</h3><br/>
</td>
</tr>
<tr>
<td style="text-align: center; min-width: 25%; max-width: 25%;">
<img src="images/attractions/karkonosze_mountains.jpg" alt="" style="max-width: 170px; -moz-border-radius: 7px; border-radius: 7px;"><br/><br/>
<p style="text-align: justify; font-size: 10pt; margin-left: 8px; margin-right: 8px;">
It is the highest and undoubtedly the best known range of The Sudety Mountains. Owing to its very well developed tourist infrastructure (network of tourist trails, mountain hostels, ski lifts) for centuries it was the key destination for mountain hikers and skiers.
</p>
</td>
<td style="text-align: center; min-width: 25%; max-width: 25%;">
<img src="images/attractions/izery_mountains.jpg" alt="" style="max-width: 170px; -moz-border-radius: 10px; border-radius: 10px;"><br/><br/>
<p style="text-align: justify; font-size: 10pt; margin-left: 8px; margin-right: 8px;">
The Izery Mountains cover almost 1000 km<sup>2</sup>, of which about 400 km<sup>2</sup> is on the Polish side - almost half of their area. They form an extensive and wide system of crests, missives and separate peaks.
</p>
</td>
<td style="text-align: center; min-width: 25%; max-width: 25%;">
<img src="images/attractions/szrenica.jpg" alt="" style="max-width: 170px; -moz-border-radius: 7px; border-radius: 7px;">
<p style="text-align: justify; font-size: 10pt; margin-left: 8px; margin-right: 8px;"><br/>
This is the name of the mountain peak overlooking the city, as part of the Central Crest of The Karkonosze Mountains.
</p>
</td>
<td style="text-align: center; min-width: 25%; max-width: 25%;">
<img src="images/attractions/kamienczyk.jpg" alt="" style="max-width: 170px; -moz-border-radius: 10px; border-radius: 10px;">
<p style="text-align: justify; font-size: 10pt; margin-left: 8px; margin-right: 8px;"><br/>
Szklarka Waterfall is the picturesquely situated waterfall in The Karkonoski National Park Enclave covering the gorgeous main part of Szklarka creek called Wąwóz Szklarki (Szklarka Gorge).
</p>
</td>
</tr>
<tr>
<td style="border-bottom: 1px dotted black;">
<p style="text-align: right; margin-right: 10px; vertical-align: down;">
<a href="http://www.szklarskaporeba.pl/en/about-szklarska/attractions-and-monuments/194-karkonosze.html">read more</a>
</p>
</td>
<td style="border-bottom: 1px dotted black;">
<p style="text-align: right; margin-right: 10px; vertical-align: down;">
<a href="http://www.szklarskaporeba.pl/en/about-szklarska/attractions-and-monuments/40-gory-izerskie.html">read more</a>
</p>
</td>
<td style="border-bottom: 1px dotted black;">
<p style="text-align: right; margin-right: 10px; vertical-align: down;">
<a href="http://www.szklarskaporeba.pl/en/about-szklarska/attractions-and-monuments/223-szrenica.html">read more</a>
</p>
</td>
<td style="border-bottom: 1px dotted black;">
<p style="text-align: right; margin-right: 10px; vertical-align: down;">
<a href="http://www.szklarskaporeba.pl/en/about-szklarska/attractions-and-monuments/196-wodospad-kamienczyka.html">read more</a>
</p>
</td>
</tr>
<tr>
<td style="text-align: center; min-width: 25%; max-width: 25%; padding: 10px 0px 0px 0px;">
<h3 style="color: #204a88; text-align: left; margin-left: 15px;">Alpine Coaster</h3><br/>
</td>
<td style="text-align: center; min-width: 25%; max-width: 25%; padding: 10px 0px 0px 0px;">
<h3 style="color: #204a88; text-align: left; margin-left: 15px;">Death Curve</h3><br/>
</td>
<td style="text-align: center; min-width: 25%; max-width: 25%; padding: 10px 0px 0px 0px;">
<h3 style="color: #204a88; text-align: left; margin-left: 15px;">Church of the Virgin Heart of Mary</h3>
</td>
<td style="text-align: center; min-width: 25%; max-width: 25%; padding: 10px 0px 0px 0px;">
<h3 style="color: #204a88; text-align: left; margin-left: 15px;">Glass Factory in the Woods</h3>
</td>
</tr>
<tr>
<td style="border: 0px dotted black; text-align: center; min-width: 25%; max-width: 25%; ">
<img src="images/attractions/alpine_coaster.jpg" alt="" style="max-width: 170px; -moz-border-radius: 7px; border-radius: 7px;">
<p style="text-align: justify; font-size: 10pt; margin-left: 8px; margin-right: 8px;"><br/>
The gravity slide with the highest "carousel" in Poland is a crazy downhill slide over the rooftops of Szklarska Poreba.
</p>
</td>
<td style="border: 0px dotted black; text-align: center; min-width: 25%; max-width: 25%;">
<img src="images/attractions/death_curve.jpg" alt="" style="max-width: 170px; -moz-border-radius: 10px; border-radius: 10px;">
<p style="text-align: justify; font-size: 10pt; margin-left: 8px; margin-right: 8px;"><br/>
The Death Curve takes its name from a very sharp and dangerous curve at Droga Sudecka [The Sudeten Road] between Szklarska Poręba and Świeradów Zdrój at the altitude of 775 m above sea level.
</p>
</td>
<td style="border: 0px dotted black; text-align: center; min-width: 25%; max-width: 25%;">
<img src="images/attractions/church_of_the_virgin_heart_of_mary.jpg" alt="" style="max-width: 170px; -moz-border-radius: 7px; border-radius: 7px;">
<p style="text-align: justify; font-size: 10pt; margin-left: 8px; margin-right: 8px;"><br/>
The church\'s interior is adorned with a baroque pulpit, antique chandeliers and paintings by <NAME>.
</p>
</td>
<td style="border: 0px dotted black; text-align: center; min-width: 25%; max-width: 25%;">
<img src="images/attractions/lesna_huta.jpg" alt="" style="max-width: 170px; -moz-border-radius: 10px; border-radius: 10px;">
<p style="text-align: justify; font-size: 10pt; margin-left: 8px; margin-right: 8px;"><br/>
Owing to abundant resources of quartz and wood in the forests surrounding The Karkonosze Mountains Szklarska Poręba has been known for many centuries for crystal glass manufacturing.
</p>
</td>
</tr>
<tr>
<td>
<p style="text-align: right; margin-right: 10px; vertical-align: down;">
<a href="http://www.szklarskaporeba.pl/en/about-szklarska/attractions-and-monuments/1157-alpine-coaster.html">read more</a>
</p>
</td><td>
<p style="text-align: right; margin-right: 10px; vertical-align: down;">
<a href="http://www.szklarskaporeba.pl/en/about-szklarska/attractions-and-monuments/225-zakret-smierci.html">read more</a>
</p>
</td><td>
<p style="text-align: right; margin-right: 10px; vertical-align: down;">
<a href="http://www.szklarskaporeba.pl/en/about-szklarska/attractions-and-monuments/217-kosciol-nmp.html">read more</a>
</p>
</td><td>
<p style="text-align: right; margin-right: 10px; vertical-align: down;">
<a href="http://www.szklarskaporeba.pl/en/about-szklarska/attractions-and-monuments/445-lena-huta.html">read more</a>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
-->
<br/>
<p>
<h4>Additional information</h4>
</p>
<table style="min-width: 100%; max-width: 100%;">
<tr>
<td style="border: 1px dotted black; min-width: 47%; max-width: 47%; padding: 8px;">
<h3 style="color: #204a88; font-size: 15pt;">Wrocław University of Technology</h3><br/>
<p>Useful information about our University: faculties, international cooperation, conferences and publications:</p>
<ul class="list-1-k">
<li><a href="http://www.pwr.edu.pl" target="_blank">Official Website of Wrocław University of Technology</a></li>
</ul>
</td>
<td style="min-width: 1.5%; max-width: 1.5%;"></td>
<td style="border: 1px dotted black; min-width: 47%; max-width: 47%; padding: 8px;">
<h3 style="color: #204a88; font-size: 15pt;">Poland</h3><br/>
<p>Some important information about our country: politics, economy, society, culture and tourism:</p>
<ul class="list-1-k">
<li><a href="http://en.poland.gov.pl/" target="_blank">Official Promotional Website of Poland</a></li>
<li><a href="http://www.poland.pl/" target="_blank">Informational Website of Poland</a></li>
<li><a href="http://en.wikipedia.org/wiki/Poland" target="_blank">From Wikipedia, The Free Encyclopedia</a></li>
</ul>
<br/>
</td>
</tr>
</table>
<br/>
</div>
';
}
function travel(){
echo '
<div style="padding: 20px 20px 0px 30px;">
<!--
<p style="margin: 80px 80px; font-size:12pt; font-style:italic; text-align:center;">Will be available later...</p>
-->
<h4>LOCATION</h4>
<p>The conference will take place in the Hotel Artus in Karpacz - a spa town and ski resort located in the Polish side of the Karkonosze Mountains in Lower Silesian Voivodeship, south-western Poland.</p>
<p style="font-style:italic;">The exact location of the hotel is showed on the map.</p>
<hr>
<p><strong>GPS = (50.766968, 15.762175)</strong>.</p>
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d646005.5090806455!2d15.761950999999996!3d50.767064!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x9601ae0a1ec2c899!2sHotel+Artus+Prestige+Spa!5e0!3m2!1sen!2s!4v1433434978593"
width="800" height="500" frameborder="1" style="border:1">
</iframe>
<hr>
<p>The sample car travel distances are:<br/>
- Wrocław 125 km,<br/>
- Prague 175 km,<br/>
- Dresden 198 km,<br/>
- Berlin 332 km,<br/>
- Warszawa (Warsaw) 477 km,<br/>
- Harrachov/Jakuszyce 40 km (Polish-Czech border),<br/>
- Zgorzelec/Görlitz 70 km (Polish-German border).
</p>
<h4>CONNECTIONS</h4>
<!--
<p style="margin: 20px 20px; font-size:12pt; font-style:italic; text-align:center;">Detailed information will be given here...</p>
-->
<!-- Connections - poczatek -->
<!--
<p><em>Please note, all of the following information is given on the basis of official timetables provided by the transportation companies on Jully 2015.</em></p>
-->
<ul class="list-1-k">
<li>Karpacz is located in Lower Silesian voivodeship (province) which main (largest) city is Wroclaw. You will usually travel to Karpacz by Wroclaw.<br><br>
<em>Note for timetable/planner reading: Wroclaw in polish is written Wrocław (line trough "l").</em>
</li>
<br>
<h3>1. Travel to Wrocław</h3>
<ul class="list-1-k">
<li>By car - its obvious - you can use your car navigation :)</li>
<li>By plane - the route map of connections of Wrocław Copernicus Airport (WRO) is here:<br>
<a href="http://airport.wroclaw.pl/en/passager/route-map/" target="_blank">http://airport.wroclaw.pl/en/passager/route-map/</a><br><br>
<!--
Note:<br>
Beware of taxi prices from airport. It is safer to order a taxi by phone. We suggest you ask the price first.
-->
</li>
<li>By train - PKP (Polskie Koleje Państwowe, english: Polish State Railways) timetable is here:<br>
<a href="http://rozklad-pkp.pl/en" target="_blank">http://rozklad-pkp.pl/en</a><br><br>
Note:<br>
You can plan the direct travel by train to Jelenia Góra (a city near Karpacz) and there take the bus to Karpacz (see info below).<br>
However, the railway station and bus station are located far from each other in Jelenia Góra.
</li>
</ul>
<br>
<h3>2. Travel from Wrocław airport to Karpacz <span style="color: red;">by car</span></h3>
<ul class="list-1-k">
<li>You can rent a car at the airport. Information is here:<br>
<a href="http://airport.wroclaw.pl/en/passager/getting-here/car-rental/" target="_blank">http://airport.wroclaw.pl/en/passager/getting-here/car-rental/</a>.
</li>
<li> General directions:<br>
- motorway bypass A8 to Bielany Wrocławskie<br>
- motorway A4 to Kostomłoty<br>
- national road 5 to Bolków<br>
- national road 3 to Jelenia Góra<br>
- local road to Karpacz
</li>
</ul>
<br>
<h3>3. Travel from Wrocław to Karpacz <span style="color: red;">by bus</span></h3>
<ul class="list-1-k">
<li>From the airport you can get to the bus station (precisely Dworcowa street - right next to the railway station):<br>
- by bus No. 406: <a href="http://komunikacja.iwroclaw.pl/Timetables_line_406_Wroclaw" target="_blank">http://komunikacja.iwroclaw.pl/Timetables_line_406_Wroclaw</a><br>
- by Taxi: <a href="http://airport.wroclaw.pl/en/passager/getting-here/by-taxi/" target="_blank">http://airport.wroclaw.pl/en/passager/getting-here/by-taxi/</a><br>
<br>
<strong>Note</strong>: Wrocław Central Bus Station is located directly behind Wrocław Main Railway Station (Wrocław Główny).<br>
The bus station is under reconstruction now, Temporary (polish: Tymczasowy) Bus Station is next to the permanent one.
</li>
<li>There are only few direct buses from Wrocław to Karpacz.<br>
Most of connections are with change in Jelenia Góra (a city near Karpacz).
</li>
<li>Selected planners for bus connections:<br>
<ul>
<li>
<a href="http://en.e-podroznik.pl/" target="_blank">Journey Planner</a> - enter start ("wrocław dworzec") and destination ("karpacz bachus") and choose proper start and destination points (see hints below)<br>
</li>
<li>
<a href="http://polbus.pl/tablica-odjazdow" target="_blank">Polbus timetable - Wrocław bus station</a> (choose image link Wrocław)<br>
</li>
<li>
<a href="http://www.pks.jgora.pl/pl/rozklady" target="_blank">Bus and coach timetable - station Jelenia Góra</a> (in Polish)
</li>
</ul>
</li>
<li>Hints for planners:<br>
- start point in Wrocław: choose WROCŁAW D.A.UL.JOANNITÓW 13 (it is bus station in Wrocław),<br>
- change point in Jelenia Góra: choose JELENIA GÓRA D.A.Ul.OBR.POKOJU (it is central bus station in Jelenia Góra),<br>
- in Karpacz you should get off at the stop <strong>Karpacz Bachus</strong> (the stop near Parkowa street - the closest stop to the Hotel Artus).
</li>
</ul>
<br>
<h3>4. In Karpacz</h3>
<p>By taxi or by foot (apr. 20 min. walk)</p>
<p>The route from K<NAME>us to Hotel Artus:</p>
<img src="images/Karpacz-Bachus-Artus.png" width="656" height="675">
<div style="text-align: center;>
<img src="images/Karpacz-Bachus-Artus.png" width="656" height="675">
</div>
<!--
<div>
<table border=2 cellspacing=2 cellpadding=2 width=750 style="font-family:Helvetica; text-align: center; " >
<tr style="background:#BFDFFF; text-align: center; ">
<td >
<p><span style="font-weight:bold">Wrocław</span><br>
<span style="font-size:8pt">PKS MAIN STATION</span><br>
DEPARTURE</p>
</td>
<td>
<p><span style="font-weight:bold">Jelenia Góra</span><br>
<span style="font-size:8pt">PKS MAIN STATION</span><br>
ARRIVAL</p>
</td>
<td>
<p><span style="font-weight:bold">Jelenia Góra</span><br>
<span style="font-size:8pt">PKS MAIN STATION</span><br>
DEPARTURE</p>
</td>
<td>
<p><span style="font-weight:bold">Piechowice</span><br>
<span style="color:#AA0000; font-weight:bold">Hotel Las <span style="color:#FF0000">(request stop)</span><br>
ARRIVAL</p>
</td>
<td>
<p><span style="font-weight:bold">Price</span></p>
</td>
</tr>
<tr>
<td><p>7:00</p></td>
<td><p>9:10</p></td>
<td><p>10:00</p></td>
<td><p>10:40</p></td>
<td><p>14 PLN + 5 PLN</p></td>
</tr>
<tr style="background:#F0F8FF; ">
<td><p>8:40</p></td>
<td><p>10:40</p></td>
<td><p>11:40</p></td>
<td><p>12:20</p></td>
<td><p>14 PLN+ 5 PLN</p></td>
</tr>
<tr>
<td><p>8:50</p></td>
<td><p>10:50</p></td>
<td><p>11:40</p></td>
<td><p>12:20</p></td>
<td><p>10 PLN + 5 PLN</p></td>
</tr>
<tr style="background:#F0F8FF; ">
<td><p>10:30</p></td>
<td><p>12:30</p></td>
<td><p>13:00</p></td>
<td><p>13:40</p></td>
<td><p>25 PLN + 5 PLN</p></td>
</tr>
<tr>
<td><p>11:40</p></td>
<td><p>13:40</p></td>
<td><p>14:00</p></td>
<td><p>14:40</p></td>
<td><p>25 PLN + 5 PLN</p></td>
</tr>
<tr style="background:#F0F8FF; ">
<td><p>12:15</p></td>
<td><p>14:35</p></td>
<td><p>15:20</p></td>
<td><p>16:00</p></td>
<td><p>25 PLN + 5 PLN</p></td>
</tr>
<tr>
<td><p>12:35</p></td>
<td><p>14:55</p></td>
<td><p>15:20</p></td>
<td><p>16:00</p></td>
<td><p>25 PLN + 5 PLN</p></td>
</tr>
<tr style="background:#F0F8FF; ">
<td><p>12:50</p></td>
<td><p>15:22</p></td>
<td><p>16:30</p></td>
<td><p>17:10</p></td>
<td><p>25 PLN + 5 PLN</p></td>
</tr>
<tr>
<td><p>13:20</p></td>
<td><p>15:20</p></td>
<td><p>16:30</p></td>
<td><p>17:10</p></td>
<td><p>25 PLN + 5 PLN</p></td>
</tr>
<tr style="background:#F0F8FF; ">
<td><p>14:15</p></td>
<td><p>16:15</p></td>
<td><p>17:05</p></td>
<td><p>17:45</p></td>
<td><p>25 PLN + 5 PLN</p></td>
</tr>
<tr>
<td><p>15:15</p></td>
<td><p>17:15</p></td>
<td><p>18:40</p></td>
<td><p>19:32</p></td>
<td><p>25 PLN + 5 PLN</p></td>
</tr>
<tr style="background:#F0F8FF; ">
<td><p>15:50</p></td>
<td><p>17:50</p></td>
<td><p>18:40</p></td>
<td><p>19:32</p></td>
<td><p>26 PLN+ 5 PLN</p></td>
</tr>
<tr>
<td><p>16:30</p></td>
<td><p>18:30</p></td>
<td><p>18:40</p></td>
<td><p>19:32</p></td>
<td><p>25 PLN + 5 PLN</p></td>
</tr>
<tr style="background:#F0F8FF; ">
<td><p>17:45</p></td>
<td><p>19:45</p></td>
<td><p>20:10</p></td>
<td><p>20:50</p></td>
<td><p>25 PLN +5 PLN</p></td>
</tr>
</table>
</div>
<p>Wroclaw Central Bus Station is located directly opposite Wrocław Main Railway Station (Wrocław Głowny).</p>
<ul>
<li><a href="http://www.pks.jgora.pl/pl/rozklady" target="_blank">Bus and coach timetable</a> (station Jelenia Góra; in Polish)
</li>
</ul><br/>
-->
<!-- Connections - koniec -->
</div>
';
}
function conftool(){
echo'
<div style="text-align: center; padding: 123px; 10px; 20px; 10px;">
<h3>The conference submission and registration system will be available shortly.</h3>
</div>
';
}
function fee_and_payment(){
echo'
<div style="padding: 20px 20px 0px 30px;">
<h4>CONFERENCE FEE</h4>
<!--
<p style="margin: 80px 80px;">
<span style="font-size:12pt; font-style:italic; text-align:center;">Details will be available later...</span>
</p>
-->
<br />
<p>The following options are available (hints to count your fee):</p>
<br />
<h5>1. Full participation</h5>
<br />
<p style="color:#cc0000; font-weight:bold; ">Please note that at least one author of a contribution must register and pay the full participation fee.</p>
<br />
<table style="min-width: 50%; padding: 50px; border: 1px dotted #000; margin-left: auto; margin-right: auto;">
<tr>
<td style="border: 1px dotted; padding: 10px;">Full participation </td>
<td style="border: 1px dotted; padding: 10px;"><p style="display:inline; color: #ff0000; font-weight: bold;">1050 PLN</p> <strong>(Polish Zloty)</strong></td>
<td style="border: 1px dotted; padding: 10px;"><p style="display:inline; color: #ff0000; font-weight: bold;">250 €</p></td>
</tr>
</table>
<br />
<p><u>The full participation fee includes</u>:</p>
<ul class="list-1-k" style="margin: 0px 0px 0px 10px">
<li>Attendance at all conference sessions</li>
<li>Full accommodation (hotel and meals) from <strong><em>September 20 (Sunday afternoon)</em></strong> till <strong><em>September 22 (Tuesday noon)</em></strong>.</li>
<li>Coffee breaks.</li>
<li>The conference banquet.</li>
<li>The publication of one contribution.</li>
<li>Conference materials (including electronic copies of edited books).</li>
</ul>
<br />
<h5>2. Limited participation:</h5>
<br />
<table style="min-width: 50%; padding: 50px; border: 1px dotted #000; margin-left: auto; margin-right: auto;">
<tr>
<td style="border: 1px dotted; padding: 10px;">Limited participation<br/>
(accompanying person)</td>
<td style="border: 1px dotted; padding: 10px; vertical-align: middle;"><p style="display:inline; color: #ff0000; font-weight: bold;">640 PLN</p> <strong>(Polish Zloty)</strong></td>
<td style="border: 1px dotted; padding: 10px; vertical-align: middle;"><p style="display:inline; color: #ff0000; font-weight: bold;">150 €</p></td>
</tr>
</table>
<br />
<p>The accompanying person (e.g. the co-author of the paper who wants participate the conference) may pay limited participation fee.</li>
<ul class="list-1-k" style="margin: 0px 0px 0px 10px">
<li>Limited participation does not include the publication of a contribution.</li>
</ul>
<!--
<li>Please note that the use of the swimming pool, sauna, jacuzzi, table tennis, tennis court and parking is <strong>free</strong> for conference participants.</li>
-->
<br />
<h5>3. Additional options / Extra charges</h5>
<ul class="list-1-k" style="margin: 0px 0px 0px 10px">
<li>Papers longer than <strong>10</strong> pages will be charged <strong>60 PLN (15€) per extra page</strong>.</li>
<li><span style="line-height: 1.5;">Publication of <strong>additional papers of one author</strong> will be <strong>charged as for extra pages</strong><br />
- i.e. one participant presenting two papers will pay full participation fee plus the fee for publication of additional pages of second paper,<br />
- if papers are longer then 10 pages additional fee will be <strong>the total number of pages above 10, multiplied by 60 PLN (15€)</strong>.
</span>
</li>
</ul>
<br/>
<h4>PAYMENT</h4>
<!--
<p style="margin: 80px 80px;">
<span style="font-size:12pt; font-style:italic; text-align:center;">Details will be available later...</span>
</p>
-->
Payments should be made by bank transfer to the following account:<br/><br/>
<strong><u>Polish participants</u>:</strong>
<table style="background: #efefef; min-width: 100%; border: 0px">
<tr>
<td style="min-width: 35%">account owner:</td>
<td><strong>Politechnika Wrocławska</br>
Wydział Informatyki i Zarządzania</strong>
</td>
</tr>
<tr>
<td>bank\'s name:</td>
<td>
<strong>Bank Zachodni WBK S.A. 16 O/Wrocław</strong></td>
</tr>
<tr>
<td>account no.:</td>
<td>
<strong>37 1090 2402 0000 0006 1000 0434</strong>
</td>
</tr>
<tr><td> </td><td> </td></tr>
<tr>
<td>please <strong>include in bank transfer <span style="color:red;">your name, invoice recipient</span> (institution) and the following <span style="color:red;">note</span></strong>: </td>
<td style="vertical-align: bottom;">
<strong>"ISAT 2015, zlec. W08/488222"</strong>
</td>
</tr>
</table><br/>
<strong><u>Foreign participants</u>:</strong>
<table style="background: #efefef; min-width: 100%; border: 0px">
<tr>
<td style="min-width: 35%">account owner: </td>
<td><strong>Wrocław University of Technology</br>
Faculty of Computer Science and Management</strong></td>
</tr>
<tr>
<td>account no.:</td>
<td>
<strong>PL 37 1090 2402 0000 0006 1000 0434</strong>
</td>
</tr>
<tr>
<td>bank\'s name:</td>
<td>
<strong>Bank Zachodni WBK S.A. 16 O/Wroclaw</strong></td>
</tr>
<tr>
<td>please <strong>include in bank transfer <span style="color:red;">your name, invoice recipient</span> (institution) and the following <span style="color:red;">note</span></strong>: </td>
<td valign="bottom">
<strong>"ISAT 2015, W08/488222"</strong>
</td>
</tr>
</table>
<br/>
<table style="background: #efefef; min-width: 100%; border: 0px">
<tr>
<td style="min-width: 35%">IBAN:</td>
<td>
<strong>PL37109024020000000610000434</strong>
</td>
</tr>
<tr>
<td>SWIFT/BIC Code:</td>
<td><strong>WBK PPL PP</strong></td>
</tr>
</table><br/>
<strong><u>Additional data concerning the organizer\'s institution</u>:</strong>
<table style="background: #efefef; min-width: 100%; border: 0px">
<tr>
<td style="min-width: 35%">address: </td>
<td><p><strong>Wrocław University of Technology<br>
Wybrzeze Wyspianskiego 27<br>
50-370 Wroclaw<br>
Poland
</strong></p></td>
</tr>
<tr>
<td style="min-width: 35%">NIP / VAT ID number: </td>
<td><strong>PL 896-000-58-51 </strong></td>
</tr>
<tr>
<td style="min-width: 35%">REGON: </td>
<td><strong>00000161433000</strong></td>
</tr>
</table><br/>
</div>
';
}
?>
|
72ac6af467b04a68a38075a524a043f2cb39bc9a
|
[
"PHP"
] | 3
|
PHP
|
osd-pwr/isat.pwr.edu.pl
|
565054b853e7dd40715a38e73b457b562b514fcb
|
268dca159eed11ec7fdfe195836f1e8f559071e9
|
refs/heads/master
|
<file_sep>from room import Room
from player import Player
from os import system, name
# Declare all the rooms
room = {
'outside': Room("Outside Cave Entrance",
"North of you, the cave mount beckons"),
'foyer': Room("Foyer", """Dim light filters in from the south. Dusty
passages run north and east."""),
'overlook': Room("Grand Overlook", """A steep cliff appears before you, falling
into the darkness. Ahead to the north, a light flickers in
the distance, but there is no way across the chasm."""),
'narrow': Room("Narrow Passage", """The narrow passage bends here from west
to north. The smell of gold permeates the air."""),
'treasure': Room("Treasure Chamber", """You've found the long-lost treasure
chamber! Sadly, it has already been completely emptied by
earlier adventurers. The only exit is to the south."""),
}
# Link rooms together
room['outside'].n_to = room['foyer']
room['foyer'].s_to = room['outside']
room['foyer'].n_to = room['overlook']
room['foyer'].e_to = room['narrow']
room['overlook'].s_to = room['foyer']
room['narrow'].w_to = room['foyer']
room['narrow'].n_to = room['treasure']
room['treasure'].s_to = room['narrow']
def clear_screen():
_ = system('cls' if name == 'nt' else 'clear')
#
# Main
#
def adventure_game():
clear_screen()
print(f'\nWelcome!')
player = Player(input(f'\nWhat is your name?'), room['outside'])
print(f'\nWelcome {player.name}!\n')
print(f'You are currently at the {player.current_room.name}\n')
cmd = ''
while cmd != 'q':
# Dict for movement
room_movement = {
'n': player.current_room.n_to,
's': player.current_room.s_to,
'e': player.current_room.e_to,
'w': player.current_room.w_to
}
cmd = input('\nWhat would you like to do?'
'\nType n, s, e or w to move and q to quit\n')
if cmd in room_movement.keys():
clear_screen()
if room_movement[cmd]:
player.move(room_movement[cmd])
player.current_room.room_description()
else:
print(f'\nYou can not go there!')
elif cmd != 'q':
clear_screen()
print(f'\nThat is not a valid command!')
clear_screen()
print('Bye bye!')
# Make a new player object that is currently in the 'outside' room.
# Write a loop that:
#
# * Prints the current room name
# * Prints the current description (the textwrap module might be useful here).
# * Waits for user input and decides what to do.
#
# If the user enters a cardinal direction, attempt to move to the room there.
# Print an error message if the movement isn't allowed.
#
# If the user enters "q", quit the game.
if __name__ == '__main__':
adventure_game()
<file_sep># Implement a class to hold room information. This should have name and
# description attributes.
class Room:
def __init__(self, name, description):
self.name = name
self.description = description
self.n_to = None
self.s_to = None
self.e_to = None
self.w_to = None
def room_description(self):
print(f'\nYou are in the ' + self.name
+ f"\n{'*'*30}\n" + self.description)
|
81e25e13629d4dabbe4daf3212a3d8bea74c0be3
|
[
"Python"
] | 2
|
Python
|
AuFeld/Intro-Python-II
|
3a31e5991a218ca59264867df41fca7706405908
|
394ee6a332865cb851ee5e6d65b493479f1e1873
|
refs/heads/master
|
<repo_name>e-dzia/pea_1<file_sep>/CMakeLists.txt
cmake_minimum_required(VERSION 3.8)
project(pea_1)
set(CMAKE_CXX_STANDARD 11)
set(SOURCE_FILES
CMakeLists.txt
Graph.cpp
Graph.h
GraphMatrix.cpp
GraphMatrix.h
main.cpp
Timer.cpp
Timer.h
TravellingSalesmanProblem.cpp
TravellingSalesmanProblem.h)
add_executable(pea_1 ${SOURCE_FILES})<file_sep>/TravellingSalesmanProblem.h
//
// Created by Edzia on 2017-05-21.
//
#ifndef SDIZO_3_TRAVELLINGSALESMANPROBLEM_H
#define SDIZO_3_TRAVELLINGSALESMANPROBLEM_H
#include "GraphMatrix.h"
#include <fstream>
#include <vector>
#include "Timer.h"
class TravellingSalesmanProblem{
private:
GraphMatrix gm;
int numberOfCities;
long long int npow2;
int **subproblems, **path;
std::vector<int> arrayOfResults;
int dp_func(int start, long long int visited);
void dp_getPath(int start, int visited);
public:
TravellingSalesmanProblem();
std::string bruteForce();
std::string greedyAlgorithm();
std::string localSearch();
std::string dynamicProgramming();
void loadFromFile(std::string filename);
void generateRandom(int size);
bool allVisited(bool pBoolean[]);
void permute(int *permutation, int left, int right, int &min, int *result);
void swap(int *pInt, int *pInt1);
int countPath(int *permutation);
double testTime(int algorithmType);
void saveToFile(std::string filename);
void menu();
};
#endif //SDIZO_3_TRAVELLINGSALESMANPROBLEM_H
<file_sep>/TravellingSalesmanProblem.cpp
//
// Created by Edzia on 2017-05-21.
//
#include "TravellingSalesmanProblem.h"
#include <sstream>
#include <chrono>
#include <cmath>
std::string TravellingSalesmanProblem::bruteForce() {
int *permutation = new int[numberOfCities];
for (int i = 0; i < numberOfCities; i++){
permutation[i] = i;
}
int *result = new int[numberOfCities];
int min = INT32_MAX;
permute(permutation, 1, numberOfCities - 1, min, result);
std::stringstream ss;
ss << "Przeglad zupelny.\nWynik: " << std::endl;
for (int i = 0; i < numberOfCities; i++){
ss << result[i] << " ";
}
ss << ": " << min << std::endl;
return ss.str();
}
std::string TravellingSalesmanProblem::greedyAlgorithm() {
bool visited[numberOfCities];
int path[numberOfCities];
int length = 0;
for (int i = 0; i < numberOfCities; i++){
visited[i] = false;
path[i] = -1;
}
int start = 0;
int i = start;
while(!allVisited(visited)){
visited[i] = true;
int min = INT32_MAX;
int position = -1;
for (int j = 0; j < numberOfCities; j++){
if (!visited[j] && gm.getEdgeLength(i,j) != -1 && gm.getEdgeLength(i,j) < min){
min = gm.getEdgeLength(i,j);
position = j;
}
}
if (min != INT32_MAX)
length += min;
else {
length += gm.getEdgeLength(i,start);
}
path[i] = position;
i = position;
}
std::stringstream ss;
ss << "Algorytm zachlanny.\nWynik: " << std::endl;
int j = start;
ss << j << " ";
while (path[j] != -1) {
ss << path[j] << " ";
j = path[j];
}
ss << ": " << length << std::endl;
return ss.str();
}
std::string TravellingSalesmanProblem::localSearch() {
bool visited[numberOfCities];
int path[numberOfCities];
int length = 0;
for (int i = 0; i < numberOfCities; i++){
visited[i] = false;
path[i] = -1;
}
int start = 0;
int i = start;
while(!allVisited(visited)){
visited[i] = true;
int min = INT32_MAX;
int position = -1;
for (int j = 0; j < numberOfCities; j++){
if (!visited[j] && gm.getEdgeLength(i,j) != -1 && gm.getEdgeLength(i,j) < min){
min = gm.getEdgeLength(i,j);
position = j;
}
}
if (min != INT32_MAX)
length += min;
else {
length += gm.getEdgeLength(i,start);
}
path[i] = position;
i = position;
}
int *permutation = new int[numberOfCities];
int * result_permutation = new int[numberOfCities];
int j = start;
permutation[0] = start;
result_permutation[0] = start;
std::string result = "";
for (int i = 0; i < numberOfCities-1; i++){
permutation[i+1] = path[j];
result_permutation[i+1] = path[j];
j = path[j];
int temp = permutation[i];
}
for (int i = 1; i < numberOfCities-1; i++){
swap(permutation+i,permutation+i+1);
int tmp = countPath(permutation);
if (tmp < length){
length = tmp;
for (int i = 0; i < numberOfCities; i++){
result_permutation[i] = permutation[i];
}
}
else{
swap(permutation+i,permutation+i+1);
}
}
std::stringstream ss;
ss << "Algorytm przeszukiwania lokalnego.\nWynik: " << std::endl;
for (int i = 0; i < numberOfCities; i++){
ss << result_permutation[i] << " ";
}
//ss << result << " ";
ss << ": " << length << std::endl;
return ss.str();
}
std::string TravellingSalesmanProblem::dynamicProgramming() {
npow2 = 1 << (numberOfCities-1); //2^(numberOfCities-1)
subproblems = new int*[numberOfCities]; //tabela dwuwymiarowa
path = new int*[numberOfCities]; //tabela dwuwymiarowa
for (int i = 0; i < numberOfCities; i++) {
subproblems[i] = new int[npow2];
path[i] = new int[npow2];
for (int j = 0; j < npow2; j++) {
subproblems[i][j] = -1;
path[i][j] = -1;
}
}
for (int i = 1; i < numberOfCities; i++) {
subproblems[i][0] = gm.getEdgeLength(i,0);
} //pierwsza kolumna - dane wejściowe, reszta -1
int result = dp_func(0, npow2 - 1); //uruchom dp_func start = 0, set = npow2 - 1
/*std::cout<<"\nsubproblems:";
for(int i=0;i < npow2;i++)
{
std::cout<<"\n";
for(int j=0;j < numberOfCities;j++)
std::cout<<"\t"<<subproblems[j][i];
}
std::cout<<"\n\n";*/
arrayOfResults.push_back(0);
dp_getPath(0, npow2 - 1);
std::stringstream ss;
ss << "Algorytm programowania dynamicznego.\nWynik: " << std::endl;
for (auto &&item : arrayOfResults) {
ss << item << " ";
}
ss << " : " << result << std::endl;
for (int i = 0; i < numberOfCities; i++) {
delete[] subproblems[i];
delete[] path[i];
}
delete[] subproblems;
delete[] path;
return ss.str();
}
int TravellingSalesmanProblem::dp_func(int start, long long int visited) {
long long int masked, mask;
int result = -1, temp;
if (subproblems[start][visited] != -1) {
return subproblems[start][visited];
} else {
for (int i = 0; i < numberOfCities-1; i++) {
mask = npow2 - 1 - (1 << i);
masked = visited & mask; //maska binarna AND
if (masked != visited) {
temp = gm.getEdgeLength(start,i+1) + dp_func(i+1, masked); //droga od start do i + dp_func(i,masked)
if (result == -1 || result > temp) {
result = temp;
path[start][visited] = i+1;
}
}
}
subproblems[start][visited] = result;
return result;
}
}
void TravellingSalesmanProblem::dp_getPath(int start, int visited) { //tu tylko znajduje trasę
if (path[start][visited] == -1) {
return;
}
int i = path[start][visited];
int mask = npow2 - 1 - (1 << (i-1));
int masked = visited & mask;
arrayOfResults.push_back(i);
dp_getPath(i, masked);
}
void TravellingSalesmanProblem::permute(int *permutation, int left, int right, int &min, int *result) {
if (left == right){
int length = countPath(permutation);
if (length < min){
min = length;
for (int i = 0; i < numberOfCities; i++){
result[i] = permutation[i];
}
}
}
else
{
for (int i = left; i <= right; i++)
{
swap((permutation+left), (permutation+i));
permute(permutation, left + 1, right, min, result);
swap((permutation+left), (permutation+i)); //powrót do poprzedniego
}
}
}
void TravellingSalesmanProblem::swap(int *pInt, int *pInt1) {
int tmp = *pInt;
*pInt = *pInt1;
*pInt1 = tmp;
}
int TravellingSalesmanProblem::countPath(int *permutation) {
int length = 0;
int end;
/* for (int i = 0; i < numberOfCities; i++){
std:: cout << permutation[i];
}
std::cout << std::endl;*/
for (int i = 1; i < numberOfCities; i++){
length += gm.getEdgeLength(permutation[i-1],permutation[i]);
end = i;
}
length += gm.getEdgeLength(permutation[end],permutation[0]);
return length;
}
void TravellingSalesmanProblem::saveToFile(std::string filename) {
std::ofstream fout;
fout.open(filename.c_str());
fout << numberOfCities << std::endl;
for (int i = 0; i < numberOfCities; i++){
for (int j = 0; j < numberOfCities; j++){
int length = gm.getEdgeLength(i,j);
fout << length << " ";
}
fout << std::endl;
}
}
void TravellingSalesmanProblem::loadFromFile(std::string filename) {
std::ifstream fin;
fin.open(filename.c_str());
fin >> numberOfCities;
gm.createMatrix(numberOfCities);
for (int i = 0; i < numberOfCities; i++){
for (int j = 0; j < numberOfCities; j++){
int length;
fin >> length;
if (length == -1) length = 0;
gm.setEdge(i,j,length);
}
}
}
void TravellingSalesmanProblem::generateRandom(int size) {
numberOfCities = size;
gm.createRandom(numberOfCities,100);
//gm.makeBothWaysEqual();
}
bool TravellingSalesmanProblem::allVisited(bool *visited) {
for (int i = 0; i < numberOfCities; i++){
if (!visited[i]) return false;
}
return true;
}
void TravellingSalesmanProblem::menu() {
std::cout << "MENU - Problem komiwojazera\n"
"1. Wczytaj z pliku.\n"
"2. Generuj losowo.\n"
"3. Przeglad zupelny.\n"
"4. Algorytm zachlanny.\n"
"5. Przeszukiwanie lokalne.\n"
"6. Programowanie dynamiczne.\n"
"7. Wyjdz.\n"
"Prosze wpisac odpowiednia liczbe.\n";
int chosen;
std::string file_name;
std::cin >> chosen;
switch(chosen){
case 1:
std::cout << "Prosze podac nazwe pliku.\n";
std::cin >> file_name;
this->loadFromFile(file_name);
break;
case 2:
std::cout << "Prosze podac liczbe miast.\n";
int v;
std::cin >> v;
this->generateRandom(v);
break;
case 3:
std::cout << "\n########################################\n" << this->bruteForce();
break;
case 4:
std::cout << "\n########################################\n" << this->greedyAlgorithm();
break;
case 5:
std::cout << "\n########################################\n" << this->localSearch();
break;
case 6:
std::cout << "\n########################################\n" << this->dynamicProgramming();
break;
case 7:
return;
default:
std::cout << "Prosze podac poprawna liczbe.\n";
std::cin.clear();
std::cin.sync();
break;
}
this->menu();
}
double TravellingSalesmanProblem::testTime(int algorithmType) {
/*algorithmType:
* 0 - bruteforce
* 1 - zachłanny
* 2 - przeszukiwanie lokalne
* 3 - programowanie dynamiczne
* */
Timer *timer = new Timer;
//std::chrono::nanoseconds time_start;
//std::chrono::nanoseconds time_end;
//double time_duration;
//this->loadFromFile("data_salesman.txt");
switch (algorithmType){
case 0:
timer->start();
this->bruteForce();
timer->stop();
break;
case 1:
timer->start();
this->greedyAlgorithm();
timer->stop();
break;
case 2:
timer->start();
this->localSearch();
timer->stop();
break;
case 3:
timer->start();
this->dynamicProgramming();
timer->stop();
break;
}
//return (time_end - time_start) / std::chrono::nanoseconds(1);
return timer->get();
}
TravellingSalesmanProblem::TravellingSalesmanProblem() {
subproblems = NULL;
path = NULL;
}
<file_sep>/main.cpp
#include <iostream>
#include <ctime>
#include "TravellingSalesmanProblem.h"
void test();
void test2();
void test_both();
int main() {
srand(time(NULL));
TravellingSalesmanProblem * tsp = new TravellingSalesmanProblem;
//tsp->loadFromFile("dane.txt");
tsp->menu();
//tsp->generateRandom(4);
//tsp->saveToFile("data_salesman.txt");
//std::cout << tsp->testTime(3);
//tsp->loadFromFile("dane.txt");
//std::cout << tsp->localSearch();
delete tsp;
//test();
//test_both();
return 0;
}
void test2(){
TravellingSalesmanProblem *tsp = new TravellingSalesmanProblem();
std::ofstream fout;
fout.open("results_test.txt");
//int size[] = {8, 10, 12, 14, 16, 18, 20, 22};
for (int i = 8; i < 50; i++){ //rozmiar
//for (int j = 0; j < 100; j++){
tsp->generateRandom(i);
fout << i << " " << tsp->testTime(3)<< std::endl;
// }
}
fout.close();
delete tsp;
}
void test(){
TravellingSalesmanProblem *tsp = new TravellingSalesmanProblem();
std::ofstream fout;
fout.open("results_dponly.txt");
int size[] = {8, 10, 12, 14, 16, 18, 20, 22};
for (int i = 0; i < 8; i++){ //rozmiar
for (int j = 0; j < 100; j++){
tsp->generateRandom(size[i]);
fout << size[i] << " " << tsp->testTime(3)<< std::endl;
}
}
fout.close();
delete tsp;
}
void test_both(){
TravellingSalesmanProblem *tsp = new TravellingSalesmanProblem();
std::ofstream fout;
fout.open("results_both.txt");
int size[] = {8,9,10,11,12};
for (int i = 0; i < 5; i++){ //rozmiar
for (int j = 0; j < 100; j++){
tsp->generateRandom(size[i]);
fout << size[i] << " " << tsp->testTime(0) << " " << tsp->testTime(3)<< std::endl;
}
}
fout.close();
delete tsp;
}<file_sep>/README.md
#Dynamic Programming for TSP problem
Program written for my Effective algorithms design class.
|
fa5a22cd33396c7a65678e34713cce4d1e3c98fe
|
[
"Markdown",
"CMake",
"C++"
] | 5
|
CMake
|
e-dzia/pea_1
|
035d3d7b66632d8231ed9dd2c48bb0fcbed90612
|
485a41d2cd0669ca35b1702196625d1b45dacb91
|
refs/heads/master
|
<repo_name>marekboro/Library-w11d2HW<file_sep>/src/main/java/Library.java
import java.util.ArrayList;
import java.util.HashMap;
public class Library {
// Attributes
private ArrayList<Book> bookCollection;
private int capacity;
private HashMap<String, Integer> genreDB;
//constructor
public Library(int capacity) {
this.bookCollection = new ArrayList<>();
this.capacity = capacity;
this.genreDB = new HashMap<String, Integer>();
}
//methods
public int getCapacity() {
return this.capacity;
}
public ArrayList<Book> getCollection() {
return this.bookCollection;
}
public boolean canAdd() {
return getBookCount() < this.capacity;
}
public void addBookToCollection(Book book) {
if (canAdd()) {
this.bookCollection.add(book);
}
}
public int getBookCount() {
return this.bookCollection.size();
}
public void removeBook(Book book) {
this.bookCollection.remove(book);
// INTELIJ suggests that this check is redundant! :
// if (this.bookCollection.contains(book)){
// this.bookCollection.remove(book);
// }
}
public void populateGenreDB() {
for (Book book : this.bookCollection) {
if (genreDB.get(book.getGenre()) == null) {
this.genreDB.put(book.getGenre(), 1);}
else {
int value = genreDB.get(book.getGenre());
this.genreDB.remove(book.getGenre());
this.genreDB.put(book.getGenre(), value + 1);
}
}
}
public int getHashMapSize(){
return genreDB.size();
}
public HashMap<String, Integer> getGenreDB() {
return genreDB;
}
}
|
62a605299357c343d302e27ab51f808cc703bfca
|
[
"Java"
] | 1
|
Java
|
marekboro/Library-w11d2HW
|
59ad9563ae22bf6304776761de497479a988099c
|
55d33c5e768d86d19fde99966fbc73dbdae2be20
|
refs/heads/master
|
<file_sep>json.extract! aluno, :id, :nome, :matricula, :curso, :emailpessoal, :emaillasalle, :created_at, :updated_at
json.url aluno_url(aluno, format: :json)
<file_sep>class CreateAlunos < ActiveRecord::Migration[5.1]
def change
create_table :alunos do |t|
t.string :nome
t.decimal :matricula
t.string :curso
t.string :emailpessoal
t.string :emaillasalle
t.timestamps
end
end
end
|
7535b9d67d8aa09bb044503f8629a9ed0684efb6
|
[
"Ruby"
] | 2
|
Ruby
|
Izalena/simple-crud-project
|
7b8c054327eabaface773132e2473d674a8d9330
|
ddcc5d4c6818c72be3267fd4218e68d293e8e819
|
refs/heads/master
|
<repo_name>SaveTheRbtz/ripple20<file_sep>/README.md
```
$ go build
$ sudo setcap cap_net_raw,cap_net_admin,cap_dac_override+eip ./ripple20
$ ./ripple20 -delay 16ms 172.16.0.0/12 2>&1 | tee scan_results.txt
```
```
Usage of ./ripple20:
-delay duration
delay between probes (default 8ms)
-ignore-mss
ignore mss (useful for MSS-overriding NATs)
-port int
source port (default: random)
```
<file_sep>/main.go
// Copyright 2012 Google, Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file in the root of the source
// tree.
// synscan-based scanner
//
// Since this is just an example program, it aims for simplicity over
// performance. It doesn't handle sending packets very quickly, it scans IPs
// serially instead of in parallel, and uses gopacket.Packet instead of
// gopacket.DecodingLayerParser for packet processing. We also make use of very
// simple timeout logic with time.Since.
//
// Making it blazingly fast is left as an exercise to the reader.
package main
import (
"bytes"
"encoding/binary"
"errors"
"flag"
"fmt"
"log"
insecureRand "math/rand"
"net"
"os"
"sync"
"time"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"
"github.com/google/gopacket/pcap"
"github.com/google/gopacket/routing"
)
var defaultMSS = []byte("\x00\x45")
var flagIgnoreMSS = flag.Bool("ignore-mss", false, "ignore mss (useful for MSS-overriding NATs)")
var flagSrcPort = flag.Int("port", 0, "source port (default: random)")
var flagDelay = flag.Duration("delay", 8*time.Millisecond, "delay between probes")
var portsToScan = []layers.TCPPort{443, 80, 21, 23, 22, 25, 123, 465, 587, 161, 53, 554, 9100, 7627, 5060}
// scanner handles scanning a single IP address.
type scanner struct {
// iface is the interface to send packets on.
iface *net.Interface
// destination, gateway (if applicable), and source IP addresses to use.
dst, gw, src net.IP
handle *pcap.Handle
// opts and buf allow us to easily serialize packets in the send()
// method.
opts gopacket.SerializeOptions
buf gopacket.SerializeBuffer
}
// newScanner creates a new scanner for a given destination IP address, using
// router to determine how to route packets to that IP.
func newScanner(ip net.IP, router routing.Router) (*scanner, error) {
s := &scanner{
dst: ip,
opts: gopacket.SerializeOptions{
FixLengths: true,
ComputeChecksums: true,
},
buf: gopacket.NewSerializeBuffer(),
}
// Figure out the route to the IP.
iface, gw, src, err := router.Route(ip)
if err != nil {
return nil, err
}
//log.Printf("scanning ip %v with interface %v, gateway %v, src %v", ip, iface.Name, gw, src)
s.gw, s.src, s.iface = gw, src, iface
// Open the handle for reading/writing.
// Note we could very easily add some BPF filtering here to greatly
// decrease the number of packets we have to look at when getting back
// scan results.
handle, err := pcap.OpenLive(iface.Name, 4096, false, pcap.BlockForever)
if err != nil {
return nil, err
}
err = handle.SetBPFFilter(fmt.Sprintf("arp or ip src host %s", ip))
if err != nil {
return nil, err
}
s.handle = handle
return s, nil
}
// close cleans up the handle.
func (s *scanner) close() {
s.handle.Close()
}
// getHwAddr is a hacky but effective way to get the destination hardware
// address for our packets. It does an ARP request for our gateway (if there is
// one) or destination IP (if no gateway is necessary), then waits for an ARP
// reply. This is pretty slow right now, since it blocks on the ARP
// request/reply.
func (s *scanner) getHwAddr() (net.HardwareAddr, error) {
start := time.Now()
arpDst := s.dst
if s.gw != nil {
arpDst = s.gw
}
// Prepare the layers to send for an ARP request.
eth := layers.Ethernet{
SrcMAC: s.iface.HardwareAddr,
DstMAC: net.HardwareAddr{0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
EthernetType: layers.EthernetTypeARP,
}
arp := layers.ARP{
AddrType: layers.LinkTypeEthernet,
Protocol: layers.EthernetTypeIPv4,
HwAddressSize: 6,
ProtAddressSize: 4,
Operation: layers.ARPRequest,
SourceHwAddress: []byte(s.iface.HardwareAddr),
SourceProtAddress: []byte(s.src),
DstHwAddress: []byte{0, 0, 0, 0, 0, 0},
DstProtAddress: []byte(arpDst),
}
// Send a single ARP request packet (we never retry a send, since this
// is just an example ;)
if err := s.send(ð, &arp); err != nil {
return nil, err
}
// Wait 3 seconds for an ARP reply.
for {
if time.Since(start) > time.Second*3 {
return nil, errors.New("timeout getting ARP reply")
}
data, _, err := s.handle.ReadPacketData()
if err == pcap.NextErrorTimeoutExpired {
continue
} else if err != nil {
return nil, err
}
packet := gopacket.NewPacket(data, layers.LayerTypeEthernet, gopacket.NoCopy)
if arpLayer := packet.Layer(layers.LayerTypeARP); arpLayer != nil {
arp := arpLayer.(*layers.ARP)
if net.IP(arp.SourceProtAddress).Equal(arpDst) {
return arp.SourceHwAddress, nil
}
}
}
}
// scan scans the dst IP address of this scanner.
func (s *scanner) scan() (bool, error) {
hwAddr, err := s.getHwAddr()
if err != nil {
return false, err
}
// Construct all the network layers we need.
eth := layers.Ethernet{
SrcMAC: s.iface.HardwareAddr,
DstMAC: hwAddr,
EthernetType: layers.EthernetTypeIPv4,
}
ip4 := layers.IPv4{
SrcIP: s.src,
DstIP: s.dst,
Version: 4,
TTL: 64,
Protocol: layers.IPProtocolTCP,
}
srcPort := *flagSrcPort
if srcPort == 0 {
srcPort = 10000 + insecureRand.Intn(50000)
}
sendTCP := layers.TCP{
SrcPort: layers.TCPPort(srcPort),
DstPort: 0,
SYN: true,
Window: 123,
Options: []layers.TCPOption{
{layers.TCPOptionKindMSS, 4, defaultMSS},
{layers.TCPOptionKindSACKPermitted, 2, nil},
{layers.TCPOptionKindNop, 1, nil},
{layers.TCPOptionKindNop, 1, nil},
{layers.TCPOptionKindTimestamps, 10, make([]byte, 8)},
{layers.TCPOptionKindNop, 1, nil},
{layers.TCPOptionKindNop, 1, nil},
{layers.TCPOptionKindWindowScale, 3, []byte{1}},
{layers.TCPOptionKindNop, 1, nil},
},
}
if err := sendTCP.SetNetworkLayerForChecksum(&ip4); err != nil {
return false, fmt.Errorf("failed to setup checksums: %w", err)
}
doneCh := make(chan struct{}, 1)
defer close(doneCh)
go func() {
for _, port := range portsToScan {
select {
case <-doneCh:
return
default:
}
sendTCP.DstPort = port
if err := s.send(ð, &ip4, &sendTCP); err != nil {
log.Printf("error sending to port %v: %v", sendTCP.DstPort, err)
}
}
}()
// XXX remove?
ipFlow := gopacket.NewFlow(layers.EndpointIPv4, s.dst, s.src)
start := time.Now()
for {
if time.Since(start) > 1*time.Second {
return false, nil
}
data, _, err := s.handle.ReadPacketData()
if err == pcap.NextErrorTimeoutExpired {
continue
} else if err != nil {
log.Printf("error reading packet: %v", err)
continue
}
// Parse the packet. We'd use DecodingLayerParser here if we
// wanted to be really fast.
packet := gopacket.NewPacket(data, layers.LayerTypeEthernet, gopacket.Default)
matched, reason, err := match(ipFlow, packet)
if err != nil {
//XXX debug
//log.Printf("matcher failed: %w", err)
continue
}
if matched {
return true, fmt.Errorf("matched: %s", reason)
}
}
}
func match(ipFlow gopacket.Flow, packet gopacket.Packet) (bool, string, error) {
netLayer := packet.NetworkLayer()
if netLayer == nil {
return false, "", fmt.Errorf("no-netlayer: %+v", packet.LinkLayer().LayerContents())
}
if netLayer.NetworkFlow() != ipFlow {
return false, "", fmt.Errorf("unknown flow: %+v", netLayer.NetworkFlow())
}
tcpLayer := packet.Layer(layers.LayerTypeTCP)
if tcpLayer == nil {
return false, "", fmt.Errorf("no TCP layer: %+v", netLayer.LayerContents())
}
recvTCP, ok := tcpLayer.(*layers.TCP)
if !ok {
return false, "", fmt.Errorf("not TCP: %+v", netLayer.LayerContents())
}
if !(recvTCP.SYN && recvTCP.ACK) {
return false, "", fmt.Errorf("wrong TCP flags")
}
var matchedWS, matchedMSS, matchedTS bool
matchedMSS = *flagIgnoreMSS
for _, opt := range recvTCP.Options {
switch opt.OptionType {
case layers.TCPOptionKindWindowScale:
if bytes.Compare(opt.OptionData, []byte{0}) == 0 {
matchedWS = true
}
case layers.TCPOptionKindMSS:
if bytes.Compare(opt.OptionData, defaultMSS) == 0 {
matchedMSS = true
}
case layers.TCPOptionKindTimestamps:
matchedTS = true
}
}
if matchedWS && matchedMSS && matchedTS {
return true, fmt.Sprintf("TRECK: port %v open", recvTCP.SrcPort), nil
}
return false, fmt.Sprintf("open port %v open", recvTCP.SrcPort), nil
}
// send sends the given layers as a single packet on the network.
func (s *scanner) send(l ...gopacket.SerializableLayer) error {
if err := gopacket.SerializeLayers(s.buf, s.opts, l...); err != nil {
return err
}
return s.handle.WritePacketData(s.buf.Bytes())
}
func main() {
flag.Parse()
nArgs := len(flag.Args())
if nArgs == 0 {
flag.Usage()
os.Exit(64)
}
ips := make([]net.IP, 0)
for _, arg := range flag.Args() {
_, ipnet, err := net.ParseCIDR(arg)
if err != nil {
panic(fmt.Errorf("non-cidr target: %q", arg))
}
ips = append(ips, expandSubnet(ipnet)...)
}
insecureRand.Shuffle(len(ips), func(i, j int) { ips[i], ips[j] = ips[j], ips[i] })
log.Printf("Scanning %d IPs from %d subnets", len(ips), nArgs)
router, err := routing.New()
if err != nil {
log.Fatal("routing error:", err)
}
limiter := time.NewTicker(*flagDelay)
defer limiter.Stop()
wg := sync.WaitGroup{}
for _, ip := range ips {
ip := ip
<-limiter.C
wg.Add(1)
go func() {
defer wg.Done()
s, err := newScanner(ip, router)
if err != nil {
log.Printf("unable to create scanner for %v: %v", ip, err)
return
}
defer s.close()
if matched, err := s.scan(); err != nil {
if matched {
log.Printf("treck stack found: %s: %s", ip, err)
} else {
log.Printf("unable to scan %v: %v", ip, err)
}
} else {
log.Printf("non treck stack: %s", ip)
}
}()
}
wg.Wait()
}
func expandSubnet(n *net.IPNet) (out []net.IP) {
num := binary.BigEndian.Uint32(n.IP)
mask := binary.BigEndian.Uint32(n.Mask)
num &= mask
for {
var buf [4]byte
binary.BigEndian.PutUint32(buf[:], num)
out = append(out, buf[:])
if mask == 0xffffffff {
return
}
mask++
num++
}
}
|
e202c263f44a964bce5471cf4208fb2d6649ec91
|
[
"Markdown",
"Go"
] | 2
|
Markdown
|
SaveTheRbtz/ripple20
|
f1098c702943c7b9d0808273077e18a67d047886
|
1a1675480a360b20f5813e540e8fbe25a6c945a9
|
refs/heads/master
|
<file_sep>import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import os
import cv2
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
import keras
from keras import backend as K
from keras.layers import Conv2D, MaxPool2D, Activation, Flatten, merge, Lambda, RepeatVector, TimeDistributed, Dense, Dropout, BatchNormalization, Input, Permute, Reshape
from keras.preprocessing.image import ImageDataGenerator
from keras.models import Sequential, Model
from keras import regularizers
print(os.listdir("asl-alphabet"))
train_dir = 'asl-alphabet/asl_alphabet_train/asl_alphabet_train'
test_dir = 'asl-alphabet/asl_alphabet_test/asl_alphabet_test'
def load_unique():
size_img = 64,64
images_for_plot = []
labels_for_plot = []
for folder in os.listdir(train_dir):
for file in os.listdir(train_dir + '/' + folder):
filepath = train_dir + '/' + folder + '/' + file
image = cv2.imread(filepath)
final_img = cv2.resize(image, size_img)
final_img = cv2.cvtColor(final_img, cv2.COLOR_BGR2RGB)
images_for_plot.append(final_img)
labels_for_plot.append(folder)
break
return images_for_plot, labels_for_plot
images_for_plot, labels_for_plot = load_unique()
print("unique_labels = ", labels_for_plot)
labels_dict = {'A':0,'B':1,'C':2,'D':3,'E':4,'F':5,'G':6,'H':7,'I':8,'J':9,'K':10,'L':11,'M':12,
'N':13,'O':14,'P':15,'Q':16,'R':17,'S':18,'T':19,'U':20,'V':21,'W':22,'X':23,'Y':24,
'Z':25,'space':26,'del':27,'nothing':28}
def load_data():
images = []
labels = []
size = 64,64
print("LOADING DATA FROM : ",end = "")
for folder in os.listdir(train_dir):
print(folder, end = ' | ')
for image in os.listdir(train_dir + "/" + folder):
temp_img = cv2.imread(train_dir + '/' + folder + '/' + image)
temp_img = cv2.resize(temp_img, size)
images.append(temp_img)
if folder == 'A':
labels.append(labels_dict['A'])
elif folder == 'B':
labels.append(labels_dict['B'])
elif folder == 'C':
labels.append(labels_dict['C'])
elif folder == 'D':
labels.append(labels_dict['D'])
elif folder == 'E':
labels.append(labels_dict['E'])
elif folder == 'F':
labels.append(labels_dict['F'])
elif folder == 'G':
labels.append(labels_dict['G'])
elif folder == 'H':
labels.append(labels_dict['H'])
elif folder == 'I':
labels.append(labels_dict['I'])
elif folder == 'J':
labels.append(labels_dict['J'])
elif folder == 'K':
labels.append(labels_dict['K'])
elif folder == 'L':
labels.append(labels_dict['L'])
elif folder == 'M':
labels.append(labels_dict['M'])
elif folder == 'N':
labels.append(labels_dict['N'])
elif folder == 'O':
labels.append(labels_dict['O'])
elif folder == 'P':
labels.append(labels_dict['P'])
elif folder == 'Q':
labels.append(labels_dict['Q'])
elif folder == 'R':
labels.append(labels_dict['R'])
elif folder == 'S':
labels.append(labels_dict['S'])
elif folder == 'T':
labels.append(labels_dict['T'])
elif folder == 'U':
labels.append(labels_dict['U'])
elif folder == 'V':
labels.append(labels_dict['V'])
elif folder == 'W':
labels.append(labels_dict['W'])
elif folder == 'X':
labels.append(labels_dict['X'])
elif folder == 'Y':
labels.append(labels_dict['Y'])
elif folder == 'Z':
labels.append(labels_dict['Z'])
elif folder == 'space':
labels.append(labels_dict['space'])
elif folder == 'del':
labels.append(labels_dict['del'])
elif folder == 'nothing':
labels.append(labels_dict['nothing'])
images = np.array(images)
images = images.astype('float32')/255.0
labels = keras.utils.to_categorical(labels) #one-hot encoding
X_train, X_test, Y_train, Y_test = train_test_split(images, labels, test_size = 0.1)
print()
print('Loaded', len(X_train),'images for training,','Train data shape =',X_train.shape)
print('Loaded', len(X_test),'images for testing','Test data shape =',X_test.shape)
return X_train, X_test, Y_train, Y_test
X_train, X_test, Y_train, Y_test = load_data()
## Model for CNN
def build_model():
model = Sequential()
model.add(Conv2D(64, kernel_size = 3, padding = 'same', activation = 'relu', input_shape = (64,64,3)))
model.add(Conv2D(32, kernel_size = 3, padding = 'same', strides = 2, activation = 'relu'))
model.add(Dropout(0.5))
model.add(Conv2D(32, kernel_size = 3, padding = 'same', activation = 'relu'))
model.add(Conv2D(64, kernel_size = 3, padding = 'same', strides = 2, activation = 'relu'))
model.add(Dropout(0.5))
model.add(Conv2D(128, kernel_size = 3, padding = 'same', activation = 'relu'))
model.add(Conv2D(256, kernel_size = 3, padding = 'same', strides = 2 , activation = 'relu'))
model.add(MaxPool2D(3))
model.add(BatchNormalization())
model.add(Flatten())
model.add(Dropout(0.5))
model.add(Dense(512, activation = 'relu'))
model.add(Dense(29, activation = 'softmax'))
model.compile(optimizer = 'adam', loss = keras.losses.categorical_crossentropy, metrics = ["accuracy"])
print("MODEL CREATED")
model.summary()
return model
##Model for Attention Mechanism
def build_model_1():
inputs = Input(shape=(64, 64, 3))
conv1 = Conv2D(32, 3, activation='relu', padding = 'same')(inputs)
pool1 = MaxPool2D()(conv1)
conv2 = Conv2D(64, 3, activation='relu', padding = 'same')(pool1)
pool2 = MaxPool2D()(conv2)
conv3 = Conv2D(128, 3, activation='relu', padding = 'same')(pool2)
pool3 = MaxPool2D()(conv3)
### Attentinon Mechanism (class-agnostic attention, class-specific attention)
### class-agnostic attention
x = Permute([3, 1, 2])(pool3)
x = TimeDistributed(Flatten())(x)
x = Permute([2, 1])(x)
att = Dense(1, activation='tanh')(x)
att=Flatten()(att)
att=Activation('softmax')(att)
att=RepeatVector(29)(att)
att=Permute([2,1])(att)
### class-specific attention
attention_class=Dense(29, activation='softmax')(x)
multiply = keras.layers.Multiply()([att, attention_class])
prediction = Lambda(lambda xin: K.sum(xin, axis=1))(multiply)
# attention_model=Model(inputs=inputs, outputs=representation)
model = Model(inputs=inputs, outputs=prediction)
model.compile(optimizer = 'adam', loss = keras.losses.categorical_crossentropy, metrics = ["accuracy"])
print("MODEL CREATED")
model.summary()
return model
def fit_model():
history = model.fit(X_train, Y_train, batch_size = 64, epochs = 5, validation_split = 0.1)
return history
model = build_model_1()
model_history = fit_model()
# visualize the training and validation loss
hist = model_history
epochs = range(1, len(hist.history['loss']) + 1)
plt.subplots(figsize=(15,6))
plt.subplot(121)
# "bo" is for "blue dot"
plt.plot(epochs, hist.history['loss'], 'bo-')
# b+ is for "blue crosses"
plt.plot(epochs, hist.history['val_loss'], 'ro--')
plt.xlabel('Epochs')
plt.ylabel('Loss')
plt.subplot(122)
plt.plot(epochs, hist.history['acc'], 'bo-')
plt.plot(epochs, hist.history['val_acc'], 'ro--')
plt.xlabel('Epochs')
plt.ylabel('Accuracy')
plt.show()
if model_history:
print('Final Accuracy: {:.2f}%'.format(model_history.history['acc'][4] * 100))
print('Validation Set Accuracy: {:.2f}%'.format(model_history.history['val_acc'][4] * 100))
|
a67ec682c4eb1fa78848e989470c05edecdedb3a
|
[
"Python"
] | 1
|
Python
|
imran-suny/Machine-Learning
|
cdb59eaaab6a74a0b42536d27cc48710d0ae552d
|
a7558926a9ef089b381aa66d37f4725200994053
|
refs/heads/master
|
<repo_name>happilysheep/shiro-demo<file_sep>/src/main/java/com/example/demo/DemoApplication.java
package com.example.demo;
import com.alibaba.fastjson.JSON;
import com.example.demo.util.Test1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;
@EnableScheduling
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
ConfigurableApplicationContext run = new SpringApplication(DemoApplication.class).run(args);
Object test = run.getBean("test1");
System.out.println("args = [" + JSON.toJSONString(test) + "]");
//System.out.println("*******************ConfigurableApplicationContext run = [" + JSON.toJSONString(run) + "]");
}
}
|
b9f54f209bd96b6575eafb8b2a46b3eb028dfc3a
|
[
"Java"
] | 1
|
Java
|
happilysheep/shiro-demo
|
cc77bb094a3c6e5842f28ac3b219ade821ee9aff
|
6ba44c430e4122296cbb3f7490f10e0bbdbca263
|
refs/heads/master
|
<file_sep>// requirejs configuration
requirejs.config({
paths: {
'text': 'lib/text/text'
}
});
// main
require([
'text!templates/scriptservice-syntax.json',
'text!templates/messageformat-sample.json',
'text!templates/javascript-snippet.json'
], function(serviceSyntax, messageFormatSyntax, snippet) {
'use strict';
// To Do Modification
function convert2MsgFormat(messageSample) {
var msg = JSON.parse(messageSample);
var convertMsg = {
"!name": "messageCode",
}
for (var i in msg.meta.childList) {
var data = msg.meta.childList[i];
convertMsg['$' + data.nickname + '$'] = {
"!type": data.type || '',
"!doc": data.desc || ''
}
}
return convertMsg;
}
// Below CodeMirror
function passAndHint(cm) {
setTimeout(function() {
cm.execCommand('autocomplete');
}, 100);
return CodeMirror.Pass;
}
function myHint(cm) {
return CodeMirror.showHint(cm, CodeMirror.ternHint, {
async: true
});
}
CodeMirror.commands.autocomplete = function(cm) {
CodeMirror.showHint(cm, myHint);
}
var editor = CodeMirror.fromTextArea(document.querySelector('#code'), {
mode: 'javascript',
theme: "monokai",
styleActiveLine: true,
lineNumbers: true,
lineWrapping: true,
autoCloseBrackets: true,
matchBrackets: true,
indentUnit: 4,
extraKeys: {
"'.'": passAndHint,
"Ctrl-Space": "autocomplete",
"Ctrl-I": function(cm) {
CodeMirror.tern.getServer(cm).showType(cm);
}
},
gutters: ["CodeMirror-linenumbers"]
});
CodeMirror.tern.addDef(JSON.parse(serviceSyntax));
CodeMirror.tern.addDef(convert2MsgFormat(messageFormatSyntax));
CodeMirror.templatesHint.addTemplates(JSON.parse(snippet));
});
<file_sep># assist-sample
|
e90aa95a10362309bf5e6a5bd056768075714ade
|
[
"JavaScript",
"Markdown"
] | 2
|
JavaScript
|
yoonhyung/assist-sample
|
87397f02a6cbd4bc0885dbb3140a402cf55e3817
|
443fa59fe581795c0dadf08ea53570d554c38ac7
|
refs/heads/master
|
<file_sep>--创建早餐店管理系统
--员工类型表
CREATE TABLE staff_type
(
id INT(10) PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(32) UNIQUE NOT NULL,
isdelete INT(1) DEFAULT 1 NOT NULL
);
--员工表
CREATE TABLE staff_info
(
id INT(10) PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(32) NOT NULL,
username VARCHAR(32) UNIQUE NOT NULL,
password VARCHAR(32) NOT NULL,
type_id INT(10) NOT NULL,
isdelete INT(1) DEFAULT 1 NOT NULL,
CONSTRAINT fk_staff_type_id FOREIGN KEY (type_id)
REFERENCES staff_type (id)
);
--食品类型
CREATE TABLE food_type
(
id INT(10) PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(32) UNIQUE NOT NULL,
isdelete INT(1) DEFAULT 1 NOT NULL
);
--食品
CREATE TABLE food
(
id INT(10) PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(32) UNIQUE NOT NULL,
price FLOAT NOT NULL,
type_id INT(10) NOT NULL,
isdelete INT(1) DEFAULT 1 NOT NULL,
CONSTRAINT fk_food_type_id FOREIGN KEY (type_id)
REFERENCES food_type (id)
);
--订单主表
-- #mysql 5.65以上支持DATETIME 字段 以下请使用TIMESTAMP
CREATE TABLE order_main
(
id INT(10) PRIMARY KEY AUTO_INCREMENT,
staff_id INT(10) NOT NULL,
create_DATE DATETIME DEFAULT now() NOT NULL,
isdelete INT(1) DEFAULT 1 NOT NULL,
CONSTRAINT fk_staff_info_id FOREIGN KEY (staff_id)
REFERENCES staff_info (id)
);
--订单详细表
CREATE TABLE order_list
(
id INT(10) PRIMARY KEY AUTO_INCREMENT,
order_id INT(10) NOT NULL,
food_id INT(10) NOT NULL,
food_number INT(10) NOT NULL,
isdelete INT(1) DEFAULT 1 NOT NULL,
CONSTRAINT fk_order_main_id FOREIGN KEY (order_id)
REFERENCES order_main (id),
CONSTRAINT fk_food_id FOREIGN KEY (food_id)
REFERENCES food (id)
);
--添加数据
--用户类型
INSERT INTO staff_type (name) VALUES ('管理员');
INSERT INTO staff_type (name) VALUES ('店长');
INSERT INTO staff_type (name) VALUES ('店员');
INSERT INTO staff_type (name) VALUES ('顾客');
--用户
INSERT INTO staff_info (name, username, password, type_id)
VALUES
('牛逼闪闪的管理员', 'admin', '<PASSWORD>',
1);
--食品类型
INSERT INTO food_type (name)
VALUES ('包子');
INSERT INTO food_type (name)
VALUES ('馒头');
INSERT INTO food_type (name)
VALUES ('饺子');
INSERT INTO food_type (name)
VALUES ('面条');
INSERT INTO food_type (name)
VALUES ('米饭');
INSERT INTO food_type (name)
VALUES ('饮料');
INSERT INTO food_type (name)
VALUES ('酒');
INSERT INTO food_type (name)
VALUES ('茶');
--食品
INSERT INTO food (name, price, type_id)
VALUES ('猪肉包子', 2, 1);
INSERT INTO food (name, price, type_id)
VALUES ('鸡肉包子', 2, 1);
INSERT INTO food (name, price, type_id)
VALUES ('白面馒头', 1, 2);
INSERT INTO food (name, price, type_id)
VALUES ('荞麦馒头', 2, 2);
INSERT INTO food (name, price, type_id)
VALUES ('猪肉白菜水饺', 9, 3);
INSERT INTO food (name, price, type_id)
VALUES ('红油抄手', 6, 3);
INSERT INTO food (name, price, type_id)
VALUES ('麻油拌面', 5, 4);
INSERT INTO food (name, price, type_id)
VALUES ('雪菜肉丝面', 8, 4);
<file_sep>package top.haha233.dao.impl;
import top.haha233.dao.FoodDao;
import top.haha233.dao.util.MySqlJDBC;
import top.haha233.entity.Food;
import top.haha233.entity.FoodType;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
public class FoodDaoImpl implements FoodDao {
@Override
public ArrayList<Food> queryAll() {
//todo
return null;
}
@Override
public ArrayList<Food> queryByType(FoodType foodType) {
//todo
String sql = "SELECT\n" +
" id,\n" +
" name,\n" +
" price,\n" +
" type_id,\n" +
" isdelete\n" +
"FROM food WHERE isdelete=1 AND type_id = ?";
ArrayList p = new ArrayList();
p.add(foodType.getId());
Object o = MySqlJDBC.execute(sql,p,2);
if (o==null){
return null;
}
ResultSet rs = (ResultSet) o;
ArrayList<Food> foods = new ArrayList<>();
try {
while (rs.next()) {
Food f = new Food();
f.setId(rs.getInt(1));
f.setName(rs.getString(2));
f.setPrice(rs.getFloat(3));
f.setFoodType(new FoodType(rs.getInt(4)));
f.setIsdelete(rs.getInt(5));
foods.add(f);
}
} catch (SQLException e) {
e.printStackTrace();
}finally {
MySqlJDBC.clossConnection();
}
return foods;
}
@Override
public Boolean update(Food food) {
//todo
return null;
}
@Override
public Boolean delete(Food food) {
//todo
return null;
}
@Override
public Boolean save(Food food) {
//todo
return null;
}
}
<file_sep>package top.haha233.dao;
import top.haha233.entity.StaffType;
import java.util.ArrayList;
public interface StaffTypeDao
{
StaffType queryById();
ArrayList<StaffType> queryAll();
}
<file_sep>package top.haha233.dao.impl;
import top.haha233.dao.FoodTypeDao;
import top.haha233.dao.util.MySqlJDBC;
import top.haha233.entity.FoodType;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
/**
* @author ICE_DOG
*/
public class FoodTypeDaoImpl implements FoodTypeDao {
@Override
public ArrayList<FoodType> queryAll() {
//language=MySQL
String sql = "SELECT\n" +
" id,\n" +
" name,\n" +
" isdelete\n" +
"FROM food_type WHERE isdelete =1";
Object o = MySqlJDBC.execute(sql,2);
if (o==null){
MySqlJDBC.clossConnection();
return null;
}
ArrayList<FoodType> foodTypes = new ArrayList<>();
ResultSet rs = (ResultSet) o;
try {
while (rs.next()){
FoodType f= new FoodType();
f.setId(rs.getInt(1));
f.setName(rs.getString(2));
f.setIsdelete(rs.getInt(3));
foodTypes.add(f);
}
} catch (SQLException e) {
e.printStackTrace();
}
MySqlJDBC.clossConnection();
return foodTypes;
}
@Override
public FoodType queryById(Integer id) {
//todo
return null;
}
@Override
public Boolean save(FoodType foodType) {
//todo
return null;
}
}
<file_sep>--添加数据库
CREATE DATABASE IF NOT EXISTS breakfast DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
-- 创建用户
GRANT USAGE
ON *.* TO 'breakfast'@'localhost' IDENTIFIED BY 'stu123456' WITH GRANT OPTION;
--添加权限
GRANT ALL ON breakfast.* TO 'breakfast'@'%' IDENTIFIED BY 'stu123456';
--刷新权限
FLUSH PRIVILEGES;
<file_sep>package top.haha233.entity;
public class Food {
private int id;
private String name;
private float price;
private FoodType foodType;
private int isdelete;
public Food() {
}
public Food(int id, String name, float price, FoodType foodType, int isdelete) {
this.id = id;
this.name = name;
this.price = price;
this.foodType = foodType;
this.isdelete = isdelete;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public float getPrice() {
return price;
}
public void setPrice(float price) {
this.price = price;
}
public FoodType getFoodType() {
return foodType;
}
public void setFoodType(FoodType foodType) {
this.foodType = foodType;
}
public int getIsdelete() {
return isdelete;
}
public void setIsdelete(int isdelete) {
this.isdelete = isdelete;
}
}
<file_sep>package top.haha233.entity;
import java.sql.Date;
public class OrderMain {
private int id;
private StaffInfo staffInfo;
private Date createDate;
private int isdelete;
public OrderMain() {
}
public OrderMain(int id, StaffInfo staffInfo, Date createDate, int isdelete) {
this.id = id;
this.staffInfo = staffInfo;
this.createDate = createDate;
this.isdelete = isdelete;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public StaffInfo getStaffInfo() {
return staffInfo;
}
public void setStaffInfo(StaffInfo staffInfo) {
this.staffInfo = staffInfo;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public int getIsdelete() {
return isdelete;
}
public void setIsdelete(int isdelete) {
this.isdelete = isdelete;
}
}
|
deda7a7ab4c6b46c37ada4f947362aee91e2dd73
|
[
"Java",
"SQL"
] | 7
|
SQL
|
zzxtz007/BreakfastManageSystem
|
5f096e2df08ec0de14d9fccebd75b90db3de6735
|
9ec0a6e033c5f9c31791090939350ff14670c7e6
|
refs/heads/master
|
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;
namespace PartTimeJob.Models
{
public class WithQualificationJob
{
public int Id { get; set; }
[ForeignKey("Employer")]
[DisplayName("Your Name")]
public int EmployerId { get; set; }
[Required(ErrorMessage = "Please Enter Job Name")]
[DisplayName("Job Name")]
[RegularExpression(@"^[A-Z]+[a-zA-Z""'\s-]*$")]
[StringLength(50, ErrorMessage = "Job Name cannot be longer than 50 characters.")]
public string JobName { get; set; }
[Required(ErrorMessage = "Please Select Job Catergory")]
[StringLength(50, ErrorMessage = "Job Cateegory cannot be longer than 50 characters.")]
[DisplayName("Job Category")]
//[RegularExpression(@"^[A-Z]+[a-zA-Z""'\s-]*$")]
public string JobCategory { get; set; }
[Required(ErrorMessage = "Please Enter Job Description")]
[DisplayName("Add Job Description")]
public string JobDescription { get; set; }
[Required(ErrorMessage = "Please Enter Number of Employee do You Want")]
[DataType(DataType.Custom)]
[DisplayName("Number Of Employee")]
public int NumOfEmployee { get; set; }
[Required(ErrorMessage = "Please Enter Payment for This Job")]
[DataType(DataType.Custom)]
[DisplayName("Payment (LRK)")]
//[MaxLength(12)]
//[MinLength(1)]
[RegularExpression("[^0-9]", ErrorMessage = "Payment must be numeric")]
public decimal Payment { get; set; }
[Required(ErrorMessage = "Please Enter Date Format yyyy-MM-dd")]
[DisplayName("Date")]
[DataType(DataType.DateTime, ErrorMessage = "Date non valid.")]
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
public DateTime Date { get; set; }
[Required(ErrorMessage = "Please Enter Phone Number")]
[DisplayName("Phone Number")]
[DataType(DataType.PhoneNumber)]
[StringLength(10, ErrorMessage = "Phone Number cannot be longer than 10 characters.")]
[RegularExpression(@"\d{1,10}", ErrorMessage = "Phone Number cannot be longer than 10 characters.")]
public string PhoneNumber { get; set; }
[Required(ErrorMessage = "Please Enter Location")]
[DisplayName("Location")]
[DataType(DataType.Upload)]
public string Location { get; set; }
public virtual Employer Employer { get; set; }
}
}<file_sep>namespace PartTimeJob.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class UpdateDatabase : DbMigration
{
public override void Up()
{
DropForeignKey("dbo.AspNetUsers", "Employee_Id", "dbo.Employees");
DropForeignKey("dbo.AspNetUsers", "Employer_Id", "dbo.Employers");
DropIndex("dbo.AspNetUsers", new[] { "Employee_Id" });
DropIndex("dbo.AspNetUsers", new[] { "Employer_Id" });
AddColumn("dbo.Employees", "ApplicationUserId", c => c.String(maxLength: 128));
AddColumn("dbo.Employers", "ApplicationUserId", c => c.String(maxLength: 128));
CreateIndex("dbo.Employees", "ApplicationUserId");
CreateIndex("dbo.Employers", "ApplicationUserId");
AddForeignKey("dbo.Employers", "ApplicationUserId", "dbo.AspNetUsers", "Id");
AddForeignKey("dbo.Employees", "ApplicationUserId", "dbo.AspNetUsers", "Id");
DropColumn("dbo.AspNetUsers", "Employee_Id");
DropColumn("dbo.AspNetUsers", "Employer_Id");
}
public override void Down()
{
AddColumn("dbo.AspNetUsers", "Employer_Id", c => c.Int());
AddColumn("dbo.AspNetUsers", "Employee_Id", c => c.Int());
DropForeignKey("dbo.Employees", "ApplicationUserId", "dbo.AspNetUsers");
DropForeignKey("dbo.Employers", "ApplicationUserId", "dbo.AspNetUsers");
DropIndex("dbo.Employers", new[] { "ApplicationUserId" });
DropIndex("dbo.Employees", new[] { "ApplicationUserId" });
DropColumn("dbo.Employers", "ApplicationUserId");
DropColumn("dbo.Employees", "ApplicationUserId");
CreateIndex("dbo.AspNetUsers", "Employer_Id");
CreateIndex("dbo.AspNetUsers", "Employee_Id");
AddForeignKey("dbo.AspNetUsers", "Employer_Id", "dbo.Employers", "Id");
AddForeignKey("dbo.AspNetUsers", "Employee_Id", "dbo.Employees", "Id");
}
}
}
<file_sep>using Microsoft.AspNet.Identity.EntityFramework;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;
namespace PartTimeJob.Models
{
public class Employer
{
public int Id { get; set; }
[Required(ErrorMessage = "Please Enter Company Name")]
[DisplayName("Company Name")]
//[RegularExpression(@"^[a-zA-Z'.\s]{1,40}$", ErrorMessage = "Special Characters not allowed")]
[StringLength(30, ErrorMessage = "Company Name cannot be longer than 30 characters.")]
public string CompanyName { get; set; }
[Required(ErrorMessage = "Please Enter First Name")]
[DisplayName("First Name")]
[RegularExpression(@"^[A-Z]+[a-zA-Z""'\s-]*$", ErrorMessage = "Please Enter First Character Capital and others are simple Character ")]
[StringLength(30, ErrorMessage = "First Name cannot be longer than 30 characters.")]
public string FirstName { get; set; }
[Required(ErrorMessage = "Please Enter Last Name")]
[DisplayName("Last Name")]
[RegularExpression(@"^[A-Z]+[a-zA-Z""'\s-]*$", ErrorMessage = "Please Enter First Character Capital and others are simple Character ")]
[StringLength(30, ErrorMessage = "Last Name cannot be longer than 30 characters.")]
public string LastName { get; set; }
[Required(ErrorMessage = "Please Enter Your Position")]
[DisplayName("Position")]
[RegularExpression(@"^[A-Z]+[a-zA-Z""'\s-]*$", ErrorMessage = "Please Enter First Character Capital and others are simple Character ")]
[StringLength(50, ErrorMessage = "Position cannot be longer than 50 characters.")]
public string Position { get; set; }
[Required(ErrorMessage = "Please Enter Company Location")]
[DisplayName("Location")]
//[RegularExpression(@"^[A-Z]+[a-zA-Z""'\s-]*$")]
[StringLength(100, ErrorMessage = "Location cannot be longer than 100 characters.")]
[DataType(DataType.Text)]
public string Location { get; set; }
[Required(ErrorMessage = "Please Enter Your Country")]
[DisplayName("Your Country")]
[RegularExpression(@"^[A-Z]+[a-zA-Z""'\s-]*$", ErrorMessage = "Please Enter First Character Capital and others are simple Character ")]
[StringLength(30, ErrorMessage = "Country Name cannot be longer than 30 characters.")]
public string Country { get; set; }
public virtual ICollection<WithOutQualificationJob> WithOutQualificationJob { get; set; }
public virtual ICollection<WithQualificationJob> WithQualificationJob { get; set; }
public virtual ApplicationUser user { get; set; }
[DisplayName("Your Account ID")]
public string ApplicationUserId { get; set; }
}
}<file_sep>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace PartTimeJob.Controllers
{
public class EmployeeHomePageController : Controller
{
// GET: EmployeeHomePage
public ActionResult Home()
{
return View();
}
}
}<file_sep>using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Mvc;
using PartTimeJob.Models;
using Microsoft.AspNet.Identity;
namespace PartTimeJob.Controllers
{
public class EnrollmentWithOutQualificationJobController : Controller
{
private ApplicationDbContext db = new ApplicationDbContext();
// GET: EnrollmentWithOutQualificationJob
public ActionResult Index()
{
var userId = User.Identity.GetUserId();
var enrollmentWithOutQualificationJob = db.EnrollmentWithOutQualificationJob.Include(e => e.Employee).Include(e => e.WithOutQualificationJob).Where(e => e.Employee.ApplicationUserId==userId);
return View(enrollmentWithOutQualificationJob.ToList());
}
// GET: EnrollmentWithOutQualificationJob/Details/5
public ActionResult Details(int? id)
{
if (id == null)
{
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
}
EnrollmentWithOutQualificationJob enrollmentWithOutQualificationJob = db.EnrollmentWithOutQualificationJob.Find(id);
if (enrollmentWithOutQualificationJob == null)
{
return HttpNotFound();
}
return View(enrollmentWithOutQualificationJob);
}
// GET: EnrollmentWithOutQualificationJob/Create
public ActionResult Create(int? id)
{
var currentUserId = User.Identity.GetUserId();
var currentEmployee = db.Employees.Where(c => c.ApplicationUserId == currentUserId);
var currentJobId = db.WithOutQualificationJobs.Where(c => c.Id == id);
ViewBag.EmployeeId = new SelectList(currentEmployee, "Id", "FirstName");
ViewBag.WithOutQualificationJobId = new SelectList(currentJobId, "Id", "JobName");
//ViewBag.EmployeeId = new SelectList(db.Employees, "Id", "FirstName");
//ViewBag.WithOutQualificationJobId = new SelectList(db.WithOutQualificationJobs, "Id", "JobName");
return View();
}
// POST: EnrollmentWithOutQualificationJob/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create([Bind(Include = "Id,Date,EmployeeId,WithOutQualificationJobId")] EnrollmentWithOutQualificationJob enrollmentWithOutQualificationJob)
{
if (ModelState.IsValid)
{
db.EnrollmentWithOutQualificationJob.Add(enrollmentWithOutQualificationJob);
db.SaveChanges();
return RedirectToAction("Index");
}
ViewBag.EmployeeId = new SelectList(db.Employees, "Id", "FirstName", enrollmentWithOutQualificationJob.EmployeeId);
ViewBag.WithOutQualificationJobId = new SelectList(db.WithOutQualificationJobs, "Id", "JobName", enrollmentWithOutQualificationJob.WithOutQualificationJobId);
return View(enrollmentWithOutQualificationJob);
}
// GET: EnrollmentWithOutQualificationJob/Edit/5
public ActionResult Edit(int? id)
{
if (id == null)
{
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
}
EnrollmentWithOutQualificationJob enrollmentWithOutQualificationJob = db.EnrollmentWithOutQualificationJob.Find(id);
if (enrollmentWithOutQualificationJob == null)
{
return HttpNotFound();
}
var currentJobId = db.WithOutQualificationJobs.Where(c => c.Id == id);
ViewBag.EmployeeId = new SelectList(db.Employees, "Id", "FirstName", enrollmentWithOutQualificationJob.EmployeeId);
ViewBag.WithOutQualificationJobId = new SelectList(db.WithOutQualificationJobs, "Id", "JobName", enrollmentWithOutQualificationJob.WithOutQualificationJobId);
//ViewBag.WithOutQualificationJobId = new SelectList(currentJobId, "Id", "JobName", enrollmentWithOutQualificationJob.WithOutQualificationJobId);
return View(enrollmentWithOutQualificationJob);
}
// POST: EnrollmentWithOutQualificationJob/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Edit([Bind(Include = "Id,Date,EmployeeId,WithOutQualificationJobId")] EnrollmentWithOutQualificationJob enrollmentWithOutQualificationJob)
{
if (ModelState.IsValid)
{
db.Entry(enrollmentWithOutQualificationJob).State = EntityState.Modified;
db.SaveChanges();
return RedirectToAction("Index");
}
ViewBag.EmployeeId = new SelectList(db.Employees, "Id", "FirstName", enrollmentWithOutQualificationJob.EmployeeId);
ViewBag.WithOutQualificationJobId = new SelectList(db.WithOutQualificationJobs, "Id", "JobName", enrollmentWithOutQualificationJob.WithOutQualificationJobId);
return View(enrollmentWithOutQualificationJob);
}
// GET: EnrollmentWithOutQualificationJob/Delete/5
public ActionResult Delete(int? id)
{
if (id == null)
{
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
}
EnrollmentWithOutQualificationJob enrollmentWithOutQualificationJob = db.EnrollmentWithOutQualificationJob.Find(id);
if (enrollmentWithOutQualificationJob == null)
{
return HttpNotFound();
}
return View(enrollmentWithOutQualificationJob);
}
// POST: EnrollmentWithOutQualificationJob/Delete/5
[HttpPost, ActionName("Delete")]
[ValidateAntiForgeryToken]
public ActionResult DeleteConfirmed(int id)
{
EnrollmentWithOutQualificationJob enrollmentWithOutQualificationJob = db.EnrollmentWithOutQualificationJob.Find(id);
db.EnrollmentWithOutQualificationJob.Remove(enrollmentWithOutQualificationJob);
db.SaveChanges();
return RedirectToAction("Index");
}
protected override void Dispose(bool disposing)
{
if (disposing)
{
db.Dispose();
}
base.Dispose(disposing);
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;
namespace PartTimeJob.Models
{
public class EnrollmentWithOutQualificationJob
{
public int Id { get; set; }
[ForeignKey("Employee")]
[DisplayName("Your Name")]
public int EmployeeId { get; set; }
[ForeignKey("WithOutQualificationJob")]
[DisplayName("Job Name")]
public int WithOutQualificationJobId { get; set; }
[Required(ErrorMessage = "Please Enter Enrollment Date")]
[DisplayName("Enrollment Date")]
[DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
public DateTime Date { get; set; }
public virtual Employee Employee { get; set; }
public virtual WithOutQualificationJob WithOutQualificationJob { get; set; }
}
}<file_sep>using Microsoft.AspNet.Identity.EntityFramework;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;
namespace PartTimeJob.Models
{
public enum Gender {
Male,Female
}
public class Employee
{
public int Id { get; set; }
[Required(ErrorMessage = "Please Enter First Name")]
[DisplayName("First Name")]
[RegularExpression(@"^[A-Z]+[a-zA-Z""'\s-]*$",ErrorMessage ="Please Enter First Character Capital and others are simple Character ")]
[StringLength(30, ErrorMessage = "First Name cannot be longer than 30 characters.")]
public string FirstName { get; set; }
[Required(ErrorMessage = "Please Enter Last Name")]
[DisplayName("Last Name")]
[RegularExpression(@"^[A-Z]+[a-zA-Z""'\s-]*$", ErrorMessage = "Please Enter First Character Capital and others are simple Character ")]
[StringLength(30, ErrorMessage = "Last Name cannot be longer than 30 characters.")]
public string LastName { get; set; }
[Required(ErrorMessage = "Please Enter Birthday")]
[DisplayName("Birthday")]
[DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
public DateTime BirthDay { get; set; }
[Required(ErrorMessage = "Please Enter Phone Number")]
[DisplayName("Phone Number")]
[DataType(DataType.PhoneNumber)]
public string PhoneNumber { get; set; }
[Required(ErrorMessage ="Please Select Gender")]
[DisplayFormat(NullDisplayText = "No Gender")]
public Gender? Gender { get; set; }
[DisplayName("Add Your Qualifications")]
[DataType(DataType.MultilineText)]
public string Qualification { get; set; }
public virtual ICollection<WithOutQualificationJob> WithOutQualificationJob { get; set; }
public virtual ICollection<WithQualificationJob> WithQualificationJob { get; set; }
public virtual ICollection<Payment> Payment { get; set; }
public virtual ICollection<YourTrip> YourTrip { get; set; }
public virtual ApplicationUser user { get; set; }
public virtual ICollection<EnrollmentWithOutQualificationJob> EnrollmentWithOutQualificationJob { get; set; }
[DisplayName("Your Account ID")]
public string ApplicationUserId { get; set; }
}
}<file_sep>namespace PartTimeJob.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class UpdateForeignKeyEmployeeBetweenWithoutQual : DbMigration
{
public override void Up()
{
DropForeignKey("dbo.EnrollmentWithOutQualificationJobs", "WithOutQualificationJob_Id", "dbo.WithOutQualificationJobs");
DropIndex("dbo.EnrollmentWithOutQualificationJobs", new[] { "WithOutQualificationJob_Id" });
RenameColumn(table: "dbo.EnrollmentWithOutQualificationJobs", name: "WithOutQualificationJob_Id", newName: "WithOutQualificationJobId");
AlterColumn("dbo.EnrollmentWithOutQualificationJobs", "WithOutQualificationJobId", c => c.Int(nullable: false));
CreateIndex("dbo.EnrollmentWithOutQualificationJobs", "WithOutQualificationJobId");
AddForeignKey("dbo.EnrollmentWithOutQualificationJobs", "WithOutQualificationJobId", "dbo.WithOutQualificationJobs", "Id", cascadeDelete: true);
DropColumn("dbo.EnrollmentWithOutQualificationJobs", "WithOutQualificatioJobId");
}
public override void Down()
{
AddColumn("dbo.EnrollmentWithOutQualificationJobs", "WithOutQualificatioJobId", c => c.Int(nullable: false));
DropForeignKey("dbo.EnrollmentWithOutQualificationJobs", "WithOutQualificationJobId", "dbo.WithOutQualificationJobs");
DropIndex("dbo.EnrollmentWithOutQualificationJobs", new[] { "WithOutQualificationJobId" });
AlterColumn("dbo.EnrollmentWithOutQualificationJobs", "WithOutQualificationJobId", c => c.Int());
RenameColumn(table: "dbo.EnrollmentWithOutQualificationJobs", name: "WithOutQualificationJobId", newName: "WithOutQualificationJob_Id");
CreateIndex("dbo.EnrollmentWithOutQualificationJobs", "WithOutQualificationJob_Id");
AddForeignKey("dbo.EnrollmentWithOutQualificationJobs", "WithOutQualificationJob_Id", "dbo.WithOutQualificationJobs", "Id");
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;
namespace PartTimeJob.Models
{
public enum JobCategory
{
[Display(Name = "Educational")]
Educational,
[Display(Name = "Computing and Softwate")]
Computing,
[Display(Name = "Hotel Industry")]
Hotel,
[Display(Name = "Banking & Insurance")]
Banking,
[Display(Name = "Bussiness and Accounting")]
Bussines,
[Display(Name = "Cooking & Recipes")]
Cooking,
[Display(Name = "Event Management")]
Managment,
[Display(Name = "Security & Body Guards")]
Security,
[Display(Name = "Translator")]
Translator,
[Display(Name = "Other")]
Other
}
public enum Status {
Uncomplete, Complete
}
public class WithOutQualificationJob
{
public int Id { get; set; }
[ForeignKey("Employer")]
public int EmployerId { get; set; }
[Required(ErrorMessage ="Please Enter Job Name")]
[DisplayName("Job Name")]
[RegularExpression(@"^[A-Z]+[a-zA-Z""'\s-]*$")]
[StringLength(50, ErrorMessage = "Job Name cannot be longer than 50 characters.")]
public string JobName { get; set; }
[Required(ErrorMessage = "Please Enter Job Catergory")]
//[StringLength(50, ErrorMessage = "Job Cateegory cannot be longer than 50 characters.")]
[DisplayName("Job Category")]
//[RegularExpression(@"^[A-Z]+[a-zA-Z""'\s-]*$")]
public JobCategory? JobCategory { get; set; }
[Required(ErrorMessage = "Please Enter Job Description")]
[DisplayName("Job Description")]
public string JobDescription { get; set; }
[Required(ErrorMessage = "Please Enter Number of Employee do You Want")]
[DataType(DataType.Text)]
[DisplayName("Number Of Employees")]
public int NumOfEmployee { get; set; }
[Required(ErrorMessage = "Please Enter Payment for This Job")]
[DataType(DataType.Text)]
[DisplayName("Payment (LRK)")]
//[MaxLength(12)]
//[MinLength(1)]
//[RegularExpression("[^0-9]", ErrorMessage = "Payment must be numeric")]
public decimal Payment { get; set; }
[Required(ErrorMessage = "Please Enter Date Format yyyy-MM-dd")]
[DisplayName("Deadline")]
[DataType(DataType.Date, ErrorMessage = "Date non valid.")]
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
public DateTime Date { get; set; }
[Required(ErrorMessage = "Please Enter Phone Number")]
[DisplayName("Phone Number")]
[DataType(DataType.PhoneNumber)]
[StringLength(10, ErrorMessage = "Phone Number cannot be longer than 10 characters.")]
[RegularExpression(@"\d{1,10}", ErrorMessage = "Phone Number cannot be longer than 10 characters.")]
public string PhoneNumber { get; set; }
[Required(ErrorMessage = "Please Enter Location")]
[DisplayName("Location")]
[DataType(DataType.Upload)]
public string Location { get; set; }
[Required(ErrorMessage = "Please Enter Status")]
[DisplayName("Status")]
[DisplayFormat(NullDisplayText = "No Status")]
public Status? Status { get; set; }
public virtual Employer Employer { get; set; }
public virtual ICollection<YourTrip> YourTrip { get; set; }
public virtual ICollection<EnrollmentWithOutQualificationJob> EnrollmentWithOutQualificationJob { get; set; }
}
}<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;
namespace PartTimeJob.Models
{
public class Payment
{
public int Id { get; set; }
[ForeignKey("Employee")]
[DisplayName("Your Name")]
public int EmployeeId { get; set; }
[ForeignKey("WithOutQualificationJob")]
[DisplayName("Your Selected Job Name")]
public int WithOutQualificationJobId { get; set; }
[DataType(DataType.Custom)]
[Required(ErrorMessage = "Please Enter Salary")]
//[StringLength(10, ErrorMessage = "Salary cannot be longer than 10 characters.")]
[DisplayName("Salary")]
//[MaxLength(12)]
//[MinLength(1)]
[RegularExpression("[^0-9]", ErrorMessage = "Salary must be numeric")]
public decimal Salary { get; set; }
[Required(ErrorMessage = "Please Enter Job Catergory")]
[DisplayName("Payment Date")]
[DataType(DataType.DateTime)]
public DateTime PaymentDate { get; set; }
public virtual WithOutQualificationJob WithOutQualificationJob { get; set; }
public virtual Employee Employee { get; set; }
}
}<file_sep>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace PartTimeJob.Controllers
{
public class EmployerHomePageController : Controller
{
// GET: EmployerHomePage
public ActionResult Home()
{
return View();
}
// GET: EmployerHomePage/CreateJob
public ActionResult CreateJob()
{
return View();
}
}
}<file_sep>namespace PartTimeJob.Models
{
public class UserType
{
}
}
|
ce7256c40b3f3262b482d399d1a7778f0f716035
|
[
"C#"
] | 12
|
C#
|
Nandathilaka/PartTimeJob_WebApp
|
590f24725d508b0366a6c051854265da1d1f3dd8
|
bbcb1f7ff60fd4ff24c1c4dbf592535e7ef16517
|
refs/heads/master
|
<repo_name>20minute/learningAIwithExemples<file_sep>/tp1/readme.txt
<NAME> (ZHEL09059603)
<NAME> (LEOA25089709)
we have finished questions 3.1-3.4.
<file_sep>/tp1/code_source_devoir_1/Buckland_Chapter2-State Machines/WestWorldWithMessaging/Steve.h
#ifndef STEVE_H
#define STEVE_H
//------------------------------------------------------------------------
//
// Name: Miner.h
//
// Desc: A class defining a goldminer.
//
// Author: <NAME> 2002 (<EMAIL>)
//
//------------------------------------------------------------------------
#include <string>
#include <cassert>
#include <iostream>
#include "BaseGameEntity.h"
#include "Locations.h"
#include "misc/ConsoleUtils.h"
#include "SteveOwnedStates.h"
#include "fsm/StateMachine.h"
template <class entity_type> class State;
struct Telegram;
class Steve : public BaseGameEntity
{
private:
//an instance of the state machine class
StateMachine<Steve>* m_pStateMachine;
location_type m_Location;
bool m_isDrunk;
public:
Steve(int id) :m_Location(saloon),
m_isDrunk(false),
BaseGameEntity(id)
{
//set up state machine
m_pStateMachine = new StateMachine<Steve>(this);
m_pStateMachine->SetCurrentState(Drinking::Instance());
}
~Steve() { delete m_pStateMachine; }
//this must be implemented
void Update();
//so must this
virtual bool HandleMessage(const Telegram& msg);
StateMachine<Steve>* GetFSM()const { return m_pStateMachine; }
//-------------------------------------------------------------accessors
location_type Location()const { return m_Location; }
void ChangeLocation(location_type loc) { m_Location = loc; }
bool Drunk()const { return m_isDrunk; }
void SetDrunk(bool val) { m_isDrunk = val; }
};
#endif
<file_sep>/tp2/code_source_devoir_2/Buckland_Chapter3-Steering Behaviors/AgentChaser.cpp
#include "AgentChaser.h"
#include "SteeringBehaviors.h"
AgentChaser::AgentChaser(GameWorld * world,
Vector2D position, double rotation,
Vector2D velocity,
double mass,
double max_force,
double max_speed,
double max_turn_rate,
double scale,
VehicleType type,
Vehicle* currentLeader) : Vehicle(world,
position,
rotation,
velocity,
mass,
max_force,
max_speed,
max_turn_rate,
scale)
{
Vehicle::SetVehicleType(type);
if (Vehicle::Type() == VehicleType::chaser) {
previousLeader = currentLeader;
Vehicle::Steering()->OffsetPursuitOn(previousLeader, Vector2D(0, 0.0001));
Vehicle::Steering()->SeparationOn();
}
}
AgentChaser::AgentChaser(GameWorld * world,
Vector2D position, double rotation,
Vector2D velocity,
double mass,
double max_force,
double max_speed,
double max_turn_rate,
double scale,
VehicleType type,
Vehicle* currentLeader,
int chaserNumber) : Vehicle(world,
position,
rotation,
velocity,
mass,
max_force,
max_speed,
max_turn_rate,
scale)
{
Vehicle::SetVehicleType(type);
if (Vehicle::Type() == VehicleType::chaserHumain) {
switch (chaserNumber)
{
case 0: //EST
Vehicle::Steering()->OffsetPursuitOn(currentLeader, Vector2D(15, 20));
break;
case 1: //NORD
Vehicle::Steering()->OffsetPursuitOn(currentLeader, Vector2D(40, 0));
break;
case 2: //SUD
Vehicle::Steering()->OffsetPursuitOn(currentLeader, Vector2D(-10, 0));
break;
case 3: //OUEST
Vehicle::Steering()->OffsetPursuitOn(currentLeader, Vector2D(15, -20));
break;
default:
break;
}
Vehicle::Steering()->SeparationOn();
}
}
AgentChaser::~AgentChaser()
{
}
void AgentChaser::Update(double time_elapsed)
{
Vehicle::Update(time_elapsed);
}<file_sep>/tp1/code_source_devoir_1/Buckland_Chapter2-State Machines/WestWorldWithMessaging/SteveOwnedStates.h
#ifndef STEVE_OWNED_STATES_H
#define STEVE_OWNED_STATES_H
//------------------------------------------------------------------------
//
// Name: SteveOwnedStates.h
//
// Desc: All the states that can be assigned to the Steve class.
// Note that a global state has not been implemented.
//
// Author: <NAME>
//
//------------------------------------------------------------------------
#include "fsm/State.h"
class Steve;
struct Telegram;
//------------------------------------------------------------------------
//
// this is implemented as the first state for Steve. Steve has 1/10 chance
// change state to Drunk
//------------------------------------------------------------------------
class Drinking : public State<Steve>
{
private:
Drinking() {}
//copy ctor and assignment should be private
Drinking(const Drinking&);
Drinking& operator=(const Drinking&);
public:
//this is a singleton
static Drinking* Instance();
virtual void Enter(Steve* steve);
virtual void Execute(Steve* steve);
virtual void Exit(Steve* steve);
virtual bool OnMessage(Steve* agent, const Telegram& msg);
};
//------------------------------------------------------------------------
//
// this is implemented as a state. Steve gets drunk from drinking state,
// when he received a message from Bob, he goes to fight state.
//
//------------------------------------------------------------------------
class Drunk : public State<Steve>
{
private:
Drunk() {}
//copy ctor and assignment should be private
Drunk(const Drunk&);
Drunk& operator=(const Drunk&);
public:
//this is a singleton
static Drunk* Instance();
virtual void Enter(Steve* steve);
virtual void Execute(Steve* steve);
virtual void Exit(Steve* steve);
virtual bool OnMessage(Steve* agent, const Telegram& msg);
};
//------------------------------------------------------------------------
//
// this is implemented as a state. Steve gets into fight state.
// when fight ends, Steve changes to drinking state
//
//
//------------------------------------------------------------------------
class Fighting : public State<Steve>
{
private:
Fighting() {}
//copy ctor and assignment should be private
Fighting(const Fighting&);
Fighting& operator=(const Fighting&);
public:
//this is a singleton
static Fighting* Instance();
virtual void Enter(Steve* steve);
virtual void Execute(Steve* steve);
virtual void Exit(Steve* steve);
virtual bool OnMessage(Steve* agent, const Telegram& msg);
};
#endif
<file_sep>/tp2/code_source_devoir_2/Buckland_Chapter3-Steering Behaviors/AgentLeader.h
#ifndef AgentLeader_H
#define AgentLeader_H
//------------------------------------------------------------------------
//
// Name: AgentLeader.h
//
// Desc: This is an agent leader, other agent poursur will follow it
//
// Author: <NAME>
//
//------------------------------------------------------------------------
#include "Vehicle.h"
class AgentLeader : public Vehicle {
private:
bool m_isManControl;
Vector2D m_direction;
float m_moveRight;
float m_moveUp;
public:
AgentLeader(GameWorld* world,
Vector2D position,
double rotation,
Vector2D velocity,
double mass,
double max_force,
double max_speed,
double max_turn_rate,
double scale,
VehicleType type,
bool manControl);
~AgentLeader();
void Update(double time_elapsed);
bool ManControl()const { return m_isManControl; }
void ToggleManControl() { m_isManControl = !m_isManControl; }
void SetDirection(Vector2D direction) { m_direction += direction; m_direction.Normalize(); }
Vector2D Direction()const { return m_direction; }
};
#endif<file_sep>/tp2/readme.txt
<NAME> (ZHEL09059603)
<NAME> (LEOA25089709)
We have finished question 1 - 5
When you launch the game, the 2 leaders are wandering, but you can control one of them (the green one) by clicking "Manually control on/off" in the "Control" section.
You can control it with the WASD keys.
To show different roles, you need to click "Show color" in the "Info" section.
To make the chaser follow their respective leader, you have to activate "Weighted Sum" in the "Calculate Method" section.
As you can see the red leader has the chasers following it in line and the green leader has its chasers forming a round around it.<file_sep>/tp2/code_source_devoir_2/Buckland_Chapter3-Steering Behaviors/AgentChaser.h
#ifndef AgentChaser_H
#define AgentChaser_H
//------------------------------------------------------------------------
//
// Name: AgentChaser_H.h
//
// Desc: This is an agent chaser, which chases the agent leader
//
// Author: <NAME>
//
//------------------------------------------------------------------------
#include "Vehicle.h"
class AgentChaser : public Vehicle {
private:
Vehicle* previousLeader;
public:
AgentChaser(GameWorld* world,
Vector2D position,
double rotation,
Vector2D velocity,
double mass,
double max_force,
double max_speed,
double max_turn_rate,
double scale,
VehicleType type,
Vehicle* currentLeader);
AgentChaser(GameWorld* world,
Vector2D position,
double rotation,
Vector2D velocity,
double mass,
double max_force,
double max_speed,
double max_turn_rate,
double scale,
VehicleType type,
Vehicle* currentLeader,
int chaserNumber);
~AgentChaser();
void Update(double time_elapsed);
};
#endif<file_sep>/tp2/code_source_devoir_2/Buckland_Chapter3-Steering Behaviors/AgentLeader.cpp
#include "AgentLeader.h"
#include "SteeringBehaviors.h"
AgentLeader::AgentLeader(GameWorld * world,
Vector2D position,
double rotation, Vector2D velocity,
double mass, double max_force,
double max_speed,
double max_turn_rate,
double scale,
VehicleType type,
bool manControl) : Vehicle(world,
position,
rotation,
velocity,
mass,
max_force,
max_speed,
max_turn_rate,
scale)
{
m_isManControl = manControl;
Vehicle::SetVehicleType(type);
Vehicle::SetScale(Vector2D(10, 10));
Vehicle::Steering()->WanderOn();
Vehicle::SetMaxSpeed(70);
}
AgentLeader::~AgentLeader()
{
}
void AgentLeader::Update(double time_elapsed)
{
Vehicle::Update(time_elapsed);
}
<file_sep>/tp1/code_source_devoir_1/Buckland_Chapter2-State Machines/WestWorldWithMessaging/SteveOwnedStates.cpp
#include "SteveOwnedStates.h"
#include "fsm/State.h"
#include "Steve.h"
#include "Locations.h"
#include "messaging/Telegram.h"
#include "MessageDispatcher.h"
#include "MessageTypes.h"
#include "Time/CrudeTimer.h"
#include "EntityNames.h"
#include <iostream>
using std::cout;
#ifdef TEXTOUTPUT
#include <fstream>
#include "SteveOwnedStates.h"
#include "MinerOwnedStates.h"
extern std::ofstream os;
#define cout os
#endif
//-------------------------------------------------------------------------Drinking
Drinking * Drinking::Instance()
{
static Drinking instance;
return &instance;
}
void Drinking::Enter(Steve * steve)
{
cout << "\n" << GetNameOfEntity(steve->ID()) << ": " << "'This beer is so good !'";
}
void Drinking::Execute(Steve * steve)
{
cout << "\n" << GetNameOfEntity(steve->ID()) << ": " << "execute drinking!!";
if ((rand()) / (RAND_MAX + 1.0) < 0.1) {
steve->GetFSM()->ChangeState(Drunk::Instance());
}
}
void Drinking::Exit(Steve * steve)
{
cout << "\n" << GetNameOfEntity(steve->ID()) << ": " << "exit drinking!";
}
bool Drinking::OnMessage(Steve * agent, const Telegram & msg)
{
return false;
}
//-------------------------------------------------------------------------Drunk
Drunk* Drunk::Instance()
{
static Drunk instance;
return &instance;
}
void Drunk::Enter(Steve* steve)
{
cout << "\n" << GetNameOfEntity(steve->ID()) << ": " << "I am drunk maybe!";
}
void Drunk::Execute(Steve* steve)
{
cout << "\n" << GetNameOfEntity(steve->ID()) << ": " << "'Bob, you are full of shit!'";
//Defy Steve
Dispatch->DispatchMessage(SEND_MSG_IMMEDIATELY, //time delay
steve->ID(), //ID of sender
ent_Miner_Bob, //ID of recipient
Msg_Defy, //the message
NO_ADDITIONAL_INFO);
}
void Drunk::Exit(Steve* steve)
{
cout << "\n" << GetNameOfEntity(steve->ID()) << ": " << "Leaving drunk state";
}
bool Drunk::OnMessage(Steve* steve, const Telegram& msg)
{
//send msg to global message handler
switch (msg.Msg)
{
case Msg_BeHit:
{
SetTextColor(FOREGROUND_BLUE | FOREGROUND_INTENSITY);
cout << "\nMessage received by " << GetNameOfEntity(steve->ID()) <<
" it is so hurt: ";
steve->GetFSM()->ChangeState(Fighting::Instance());
}
return true;
}//end switch
return false;
}
Fighting * Fighting::Instance()
{
static Fighting instance;
return &instance;
}
void Fighting::Enter(Steve * steve)
{
cout << "\n" << GetNameOfEntity(steve->ID()) << ": " << "'Okay Bob, let's fight you and me !'";
}
void Fighting::Execute(Steve * steve)
{
cout << "\n" << GetNameOfEntity(steve->ID()) << ": " << "Steve and Bob are fighting !";
steve->GetFSM()->ChangeState(Drinking::Instance());
}
void Fighting::Exit(Steve * steve)
{
cout << "\n" << GetNameOfEntity(steve->ID()) << ": " << "Fight stops!";
}
bool Fighting::OnMessage(Steve * agent, const Telegram & msg)
{
return false;
}
|
a15032ec8e48c0dae2674b1ba12d90efd9c820cd
|
[
"Text",
"C++"
] | 9
|
Text
|
20minute/learningAIwithExemples
|
5ccfef4d8897df98d1ea14d022d72a12512732a5
|
0fd4000a11b2b7a1ac50d96cf7749df9812b0124
|
refs/heads/master
|
<repo_name>sowbaghya2102/starperformer<file_sep>/subprogram.java
package pageobject;
import java.io.IOException;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.openqa.selenium.Alert;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.How;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.ui.Select;
import org.testng.Assert;
public class subprogram {
private WebDriver driver=null;
@FindBy(how=How.XPATH,using=".//*[@id=\'navbar-collapse-1\']/ul/li[4]/a")
WebElement program_link;
@FindBy(how=How.XPATH,using=".//*[@id=\'project-section\']/div/div[1]/h2")
WebElement program_h2;
@FindBy(how=How.XPATH,using="//*[@id=\'project-section\']/div/div[2]/ul/li[1]")
WebElement program_all;
@FindBy(how=How.NAME,using="java")
WebElement pro1_java1_box;
@FindBy(how=How.XPATH,using="./html/body/div[5]/h2")
WebElement pro1_java1_h2;
@FindBy(how=How.XPATH,using="./html/body/div[5]/p")
WebElement pro1_java1_p;
@FindBy(how=How.XPATH,using="/html/body/div[5]/div[7]/div/button")
WebElement pro1_java1_confirm;
@FindBy(how=How.NAME,using="javareg")
WebElement pro1_java1_register;
@FindBy(how=How.XPATH,using=".//*[@id=\'MixItUp3E08C6\']/div[1]/div/div/div/div/div/h4")
WebElement java_h4;
//*[@id="MixItUpF99ADA"]/div[1]/div/div/div/div/div/h4
//*[@id="MixItUp3E08C6"]/div[2]/div/div/div/div/div/h4
@FindBy(how=How.NAME,using="net")
WebElement pro1_net1_box;
@FindBy(how=How.NAME,using="netreg")
WebElement pro1_net1_register;
@FindBy(how=How.XPATH,using=".//*[@id=\'MixItUp3E08C6\']/div[2]/div/div/div/div/div/h4")
WebElement net_h4;
@FindBy(how=How.NAME,using="android")
WebElement pro1_android1_box;
@FindBy(how=How.NAME,using="androidreg")
WebElement pro1_android1_register;
@FindBy(how=How.XPATH,using=".//*[@id=\'MixItUp3E08C6\']/div[3]/div/div/div/div/div/h4")
WebElement android_h4;
@FindBy(how=How.NAME,using="website")
WebElement pro1_website_box;
@FindBy(how=How.NAME,using="websitereg")
WebElement pro1_website_reg;
@FindBy(how=How.XPATH,using=".//*[@id=\'MixItUp3E08C6\']/div[4]/div/div/div/div/div/h4")
WebElement website_h4;
@FindBy(how=How.NAME,using="python")
WebElement pro1_python_box;
@FindBy(how=How.NAME,using="pythonreg")
WebElement pro1_python_reg;
@FindBy(how=How.XPATH,using="//*[@id=\'MixItUp3E08C6\']/div[5]/div/div/div/div/div/h4")
WebElement python_h4;
@FindBy(how=How.NAME,using="auto")
WebElement pro1_auto_box;
@FindBy(how=How.NAME,using="autoreg")
WebElement pro1_auto_reg;
@FindBy(how=How.XPATH,using="//*[@id=\'MixItUp3E08C6\']/div[6]/div/div/div/div/div/h4")
WebElement auto_h4;
@FindBy(how=How.NAME,using="perform")
WebElement pro1_perform_box;
@FindBy(how=How.NAME,using="performreg")
WebElement pro1_perform_reg;
@FindBy(how=How.XPATH,using="//*[@id=\'MixItUp3E08C6\']/div[7]/div/div/div/div/div/h4")
WebElement perform_h4;
@FindBy(how=How.NAME,using="cloud")
WebElement pro1_cloud_box;
@FindBy(how=How.NAME,using="cloudreg")
WebElement pro1_cloud_reg;
@FindBy(how=How.XPATH,using="//*[@id=\'MixItUp3E08C6\']/div[8]/div/div/div/div/div/h4")
WebElement cloud_h4;
@FindBy(how=How.XPATH,using=".//*[@id=\'project-section\']/div/div[2]/ul/li[2]")
WebElement app_link;
@FindBy(how=How.XPATH,using=".//*[@id=\'project-section\']/div/div[2]/ul/li[3]")
WebElement testing_link;
@FindBy(how=How.XPATH,using=".//*[@id=\'project-section\']/div/div[2]/ul/li[4]")
WebElement cloud_link;
@FindBy(how=How.XPATH,using=".//*[@id=\'project-section\']/div/div[2]/ul/li[5]")
WebElement website_link;
@FindBy(how=How.XPATH,using=".//*[@id=\'project-section\']/div/div[2]/ul/li[6]")
WebElement db_lnik;
@FindBy(how=How.XPATH,using=".//*[@id=\'project-section\']/div/div[2]/ul/li[7]")
WebElement mobile_link;
XSSFWorkbook workbook1;
XSSFSheet sheet1;
@FindBy(how=How.XPATH,using=".//*[@id=\'modform\']/center/div/div[1]/div[2]/div/div/input")
WebElement pro1_java1_reg1_name;
@FindBy(how=How.XPATH,using=".//*[@id=\'modform\']/center/div/div[2]/div[2]/div/div/input")
WebElement pro1_java1_reg1_email;
@FindBy(how=How.XPATH,using=".//*[@id=\'modform\']/center/div/div[3]/div[2]/div/div/input")
WebElement pro1_java1_reg1_phone;
@FindBy(how=How.XPATH,using=".//*[@id=\'modform\']/center/div/div[4]/div[2]/select")
WebElement pro1_java1_reg1_communication;
@FindBy(how=How.XPATH,using=".//*[@id=\'modform\']/center/div/div[5]/div[2]/div/div/input")
WebElement pro1_java1_reg1_qualification;
@FindBy(how=How.XPATH,using=".//*[@id=\'modform\']/center/div/div[6]/div[2]/div/div/input")
WebElement pro1_java1_reg1_clg;
@FindBy(how=How.XPATH,using=".//*[@id=\'modform\']/div[2]/button[1]")
WebElement pro1_java1_reg1_submit;
//public String java_h4_text;
public subprogram(WebDriver driver) {
this.driver = driver;
PageFactory.initElements(driver, this);
}
public void getdatafromexcel(int i) throws IOException, InterruptedException
{
workbook1=new XSSFWorkbook("C:\\Users\\admin\\Desktop\\starsperformer.xlsx");
sheet1 = workbook1.getSheet("sheet2");
//for(int i=1;i<=sheet1.getLastRowNum();i++)
{
String name_data = sheet1.getRow(i).getCell(0).getStringCellValue();
String pro1_email_data=sheet1.getRow(i).getCell(1).getStringCellValue();
String pro1_phone_data=sheet1.getRow(i).getCell(2).getStringCellValue();
String pro1_qualification_data =sheet1.getRow(i).getCell(3).getStringCellValue();
String pro1_college_data=sheet1.getRow(i).getCell(4).getStringCellValue();
if(i==1)
{
register_java(name_data, pro1_email_data,pro1_phone_data, pro1_qualification_data,pro1_college_data);
}
else if(i==2) {
register_net(name_data, pro1_email_data,pro1_phone_data, pro1_qualification_data,pro1_college_data);
}
else if(i==3) {
register_android(name_data, pro1_email_data,pro1_phone_data, pro1_qualification_data,pro1_college_data);
}
else if(i==4) {
register_website(name_data, pro1_email_data, pro1_phone_data, pro1_qualification_data, pro1_college_data);
}
else if(i==5) {
register_python(name_data, pro1_email_data, pro1_phone_data, pro1_qualification_data, pro1_college_data);
}
else if(i==6) {
register_auto(name_data, pro1_email_data, pro1_phone_data, pro1_qualification_data, pro1_college_data);
}
else if(i==7) {
register_perform(name_data, pro1_email_data, pro1_phone_data, pro1_qualification_data, pro1_college_data);
}
else if(i==8) {
register_cloud(name_data, pro1_email_data, pro1_phone_data, pro1_qualification_data, pro1_college_data);
}
}
}
public void register_java(String name_data, String pro1_email_data, String pro1_phone_data, String pro1_qualification_data,String pro1_college_data) throws IOException, InterruptedException
{
pro1_java1_reg1_name.sendKeys(name_data);
Thread.sleep(2000);
System.out.println("name "+ " " + name_data);
pro1_java1_reg1_email.sendKeys(pro1_email_data);
Thread.sleep(2000);
System.out.println("Email "+ " " + pro1_email_data);
pro1_java1_reg1_phone.sendKeys(pro1_phone_data);
Thread.sleep(2000);
pro1_java1_reg1_communication.click();
Select drop_communication =new Select(pro1_java1_reg1_communication);
drop_communication.selectByIndex(3);
pro1_java1_reg1_qualification.sendKeys(pro1_qualification_data);
Thread.sleep(2000);
System.out.println("Qualification"+ " " + pro1_qualification_data);
pro1_java1_reg1_clg.sendKeys(pro1_college_data);
Thread.sleep(2000);
pro1_java1_reg1_submit.click();
Thread.sleep(2000);
Alert pro1_alert = driver.switchTo().alert();
pro1_alert.accept();
}
public void register_net(String name_data, String pro1_email_data, String pro1_phone_data, String pro1_qualification_data,String pro1_college_data) throws IOException, InterruptedException {
pro1_java1_reg1_name.sendKeys(name_data);
Thread.sleep(2000);
System.out.println("name "+ " " + name_data);
pro1_java1_reg1_email.sendKeys(pro1_email_data);
Thread.sleep(2000);
System.out.println("Email "+ " " + pro1_email_data);
pro1_java1_reg1_phone.sendKeys(pro1_phone_data);
Thread.sleep(2000);
pro1_java1_reg1_communication.click();
Select drop_communication =new Select(pro1_java1_reg1_communication);
drop_communication.selectByIndex(2);
pro1_java1_reg1_qualification.sendKeys(pro1_qualification_data);
Thread.sleep(2000);
System.out.println("Qualification"+ " " + pro1_qualification_data);
pro1_java1_reg1_clg.sendKeys(pro1_college_data);
Thread.sleep(2000);
pro1_java1_reg1_submit.click();
Thread.sleep(2000);
Alert pro1_alert = driver.switchTo().alert();
pro1_alert.accept();
}
public void register_android(String name_data, String pro1_email_data, String pro1_phone_data, String pro1_qualification_data,String pro1_college_data) throws IOException, InterruptedException {
name_data = sheet1.getRow(3).getCell(0).getStringCellValue();
pro1_java1_reg1_name.sendKeys(name_data);
Thread.sleep(2000);
System.out.println("name "+ " " + name_data);
pro1_java1_reg1_email.sendKeys(pro1_email_data);
Thread.sleep(2000);
System.out.println("Email "+ " " + pro1_email_data);
pro1_java1_reg1_phone.sendKeys(pro1_phone_data);
Thread.sleep(2000);
pro1_java1_reg1_communication.click();
Select drop_communication =new Select(pro1_java1_reg1_communication);
drop_communication.selectByIndex(1);
pro1_java1_reg1_qualification.sendKeys(pro1_qualification_data);
Thread.sleep(2000);
System.out.println("Qualification"+ " " + pro1_qualification_data);
pro1_java1_reg1_clg.sendKeys(pro1_college_data);
Thread.sleep(2000);
pro1_java1_reg1_submit.click();
Thread.sleep(2000);
Alert pro1_alert = driver.switchTo().alert();
pro1_alert.accept();
}
public void register_website(String name_data, String pro1_email_data, String pro1_phone_data, String pro1_qualification_data,String pro1_college_data) throws IOException, InterruptedException {
workbook1=new XSSFWorkbook("C:\\Users\\admin\\Desktop\\starsperformer.xlsx");
sheet1 = workbook1.getSheet("sheet2");
Thread.sleep(2000);
pro1_java1_reg1_name.sendKeys(name_data);
Thread.sleep(2000);
System.out.println("name "+ " " + name_data);
pro1_java1_reg1_email.sendKeys(pro1_email_data);
Thread.sleep(2000);
System.out.println("Email "+ " " + pro1_email_data);
pro1_java1_reg1_phone.sendKeys(pro1_phone_data);
Thread.sleep(2000);
pro1_java1_reg1_communication.click();
Select drop_communication =new Select(pro1_java1_reg1_communication);
drop_communication.selectByIndex(1);
pro1_java1_reg1_qualification.sendKeys(pro1_qualification_data);
Thread.sleep(2000);
System.out.println("Qualification"+ " " + pro1_qualification_data);
pro1_java1_reg1_clg.sendKeys(pro1_college_data);
Thread.sleep(2000);
pro1_java1_reg1_submit.click();
Thread.sleep(2000);
Alert pro1_alert = driver.switchTo().alert();
pro1_alert.accept();
}
public void register_python(String name_data, String pro1_email_data, String pro1_phone_data, String pro1_qualification_data,String pro1_college_data) throws IOException, InterruptedException {
pro1_java1_reg1_name.sendKeys(name_data);
Thread.sleep(2000);
System.out.println("name "+ " " + name_data);
pro1_java1_reg1_email.sendKeys(pro1_email_data);
Thread.sleep(2000);
System.out.println("Email "+ " " + pro1_email_data);
pro1_java1_reg1_phone.sendKeys(pro1_phone_data);
Thread.sleep(2000);
pro1_java1_reg1_communication.click();
Select drop_communication =new Select(pro1_java1_reg1_communication);
drop_communication.selectByIndex(1);
pro1_java1_reg1_qualification.sendKeys(pro1_qualification_data);
Thread.sleep(2000);
System.out.println("Qualification"+ " " + pro1_qualification_data);
pro1_java1_reg1_clg.sendKeys(pro1_college_data);
Thread.sleep(2000);
pro1_java1_reg1_submit.click();
Thread.sleep(2000);
Alert pro1_alert = driver.switchTo().alert();
pro1_alert.accept();
}
public void register_auto(String name_data, String pro1_email_data, String pro1_phone_data, String pro1_qualification_data,String pro1_college_data) throws IOException, InterruptedException {
pro1_java1_reg1_name.sendKeys(name_data);
Thread.sleep(2000);
System.out.println("name "+ " " + name_data);
pro1_java1_reg1_email.sendKeys(pro1_email_data);
Thread.sleep(2000);
System.out.println("Email "+ " " + pro1_email_data);
pro1_java1_reg1_phone.sendKeys(pro1_phone_data);
Thread.sleep(2000);
pro1_java1_reg1_communication.click();
Select drop_communication =new Select(pro1_java1_reg1_communication);
drop_communication.selectByIndex(1);
pro1_java1_reg1_qualification.sendKeys(pro1_qualification_data);
Thread.sleep(2000);
System.out.println("Qualification"+ " " + pro1_qualification_data);
pro1_java1_reg1_clg.sendKeys(pro1_college_data);
Thread.sleep(2000);
pro1_java1_reg1_submit.click();
Thread.sleep(2000);
Alert pro1_alert = driver.switchTo().alert();
pro1_alert.accept();
}
public void register_perform(String name_data, String pro1_email_data, String pro1_phone_data, String pro1_qualification_data,String pro1_college_data) throws IOException, InterruptedException {
pro1_java1_reg1_name.sendKeys(name_data);
Thread.sleep(2000);
System.out.println("name "+ " " + name_data);
pro1_java1_reg1_email.sendKeys(pro1_email_data);
Thread.sleep(2000);
System.out.println("Email "+ " " + pro1_email_data);
pro1_java1_reg1_phone.sendKeys(pro1_phone_data);
Thread.sleep(2000);
pro1_java1_reg1_communication.click();
Select drop_communication =new Select(pro1_java1_reg1_communication);
drop_communication.selectByIndex(1);
pro1_java1_reg1_qualification.sendKeys(pro1_qualification_data);
Thread.sleep(2000);
System.out.println("Qualification"+ " " + pro1_qualification_data);
pro1_java1_reg1_clg.sendKeys(pro1_college_data);
Thread.sleep(2000);
pro1_java1_reg1_submit.click();
Thread.sleep(2000);
Alert pro1_alert = driver.switchTo().alert();
pro1_alert.accept();
}
public void register_cloud(String name_data, String pro1_email_data, String pro1_phone_data, String pro1_qualification_data,String pro1_college_data) throws IOException, InterruptedException {
pro1_java1_reg1_name.sendKeys(name_data);
Thread.sleep(2000);
System.out.println("name "+ " " + name_data);
pro1_java1_reg1_email.sendKeys(pro1_email_data);
Thread.sleep(2000);
System.out.println("Email "+ " " + pro1_email_data);
pro1_java1_reg1_phone.sendKeys(pro1_phone_data);
Thread.sleep(2000);
pro1_java1_reg1_communication.click();
Select drop_communication =new Select(pro1_java1_reg1_communication);
drop_communication.selectByIndex(2);
pro1_java1_reg1_qualification.sendKeys(pro1_qualification_data);
Thread.sleep(2000);
System.out.println("Qualification"+ " " + pro1_qualification_data);
pro1_java1_reg1_clg.sendKeys(pro1_college_data);
Thread.sleep(2000);
pro1_java1_reg1_submit.click();
Thread.sleep(2000);
Alert pro1_alert = driver.switchTo().alert();
pro1_alert.accept();
}
public void subfunction() throws InterruptedException, IOException {
//test =extend.createTest("Program page");
program_link.click();
String program_h2_text=program_h2.getText();
System.out.println(program_h2_text);
Assert.assertEquals("OUR IPCoE PROGRAMS", program_h2_text);
System.out.println("Program header was correct");
Thread.sleep(2000);
program_all.click();
Thread.sleep(2000);
java();
net();
android();
website();
python();
auto();
perform();
cloud();
System.out.println("In program all functions are working in successfuly");
app_link.click();
Thread.sleep(2000);
java();
net();
android();
website();
System.out.println("In program app development functions are working in successfuly");
testing_link.click();
Thread.sleep(2000);
auto();
perform();
System.out.println("In program automation testing functions are working in successfuly");
cloud_link.click();
Thread.sleep(2000);
cloud();
System.out.println("In program cloud computing functions are working in successfuly");
website_link.click();
Thread.sleep(2000);
website();
System.out.println("In program webdesign&Website functions are working in successfuly");
db_lnik.click();
Thread.sleep(2000);
python();
System.out.println("In program python functions are working in successfuly");
mobile_link.click();
Thread.sleep(2000);
android();
System.out.println("In program mobile functions are working in successfuly");
}
public void java() throws InterruptedException, IOException
{
Actions act_java1 = new Actions(driver);
act_java1.moveToElement(pro1_java1_box).build().perform();
Thread.sleep(2000);
pro1_java1_box.click();
Thread.sleep(1000);
boxcontent();
Actions act_register = new Actions(driver);
act_register.moveToElement(pro1_java1_box).build().perform();
Thread.sleep(2000);
pro1_java1_register.click();
Thread.sleep(2000);
getdatafromexcel(1);
}
//all .net
public void net() throws InterruptedException, IOException {
Actions act_net1 = new Actions(driver);
act_net1.moveToElement(pro1_net1_box).build().perform();
Thread.sleep(2000);
pro1_net1_box.click();
Thread.sleep(1000);
boxcontent();
Actions net1_act = new Actions(driver);
net1_act.moveToElement(pro1_net1_box).build().perform();
pro1_net1_register.click();
Thread.sleep(1000);
getdatafromexcel(2);
}
public void android() throws InterruptedException, IOException {
//all android
androidbaction();
Thread.sleep(1000);
pro1_android1_box.click();
Thread.sleep(1000);
boxcontent();
androidbaction();
pro1_android1_register.click();
Thread.sleep(1000);
getdatafromexcel(3);
}
//all website
public void website() throws InterruptedException, IOException {
websiteaction();
Thread.sleep(1000);
pro1_website_box.click();
Thread.sleep(1000);
boxcontent();
websiteaction();
pro1_website_reg.click();
Thread.sleep(1000);
getdatafromexcel(4);
}
//all python
public void python() throws InterruptedException, IOException {
pythonaction();
Thread.sleep(1000);
pro1_python_box.click();
Thread.sleep(1000);
boxcontent();
pythonaction();
pro1_python_reg.click();
Thread.sleep(1000);
getdatafromexcel(5);
}
//all auto
public void auto() throws InterruptedException, IOException {
autoaction();
Thread.sleep(1000);
pro1_auto_box.click();
Thread.sleep(1000);
boxcontent();
autoaction();
Thread.sleep(1000);
pro1_auto_reg.click();
Thread.sleep(1000);
getdatafromexcel(6);
}
//all perform
public void perform() throws InterruptedException, IOException {
performaction();
Thread.sleep(1000);
pro1_perform_box.click();
Thread.sleep(1000);
boxcontent();
performaction();
pro1_perform_reg.click();
Thread.sleep(1000);
getdatafromexcel(7);
}
//all cloud cloudreg
public void cloud() throws InterruptedException, IOException {
cloudaction();
Thread.sleep(1000);
pro1_cloud_box.click();
Thread.sleep(2000);
boxcontent();
cloudaction();
pro1_cloud_reg.click();
Thread.sleep(1000);
getdatafromexcel(8);
}
public void androidbaction() {
Actions act_android =new Actions(driver);
act_android.moveToElement(pro1_android1_box).build().perform();
}
public void websiteaction() {
Actions act_website=new Actions(driver);
act_website.moveToElement(pro1_website_box).build().perform();
}
public void pythonaction() {
Actions act_python = new Actions(driver);
act_python.moveToElement(pro1_python_box).build().perform();
}
public void autoaction() {
Actions act_auto = new Actions(driver);
act_auto.moveToElement(pro1_auto_box);
}
public void performaction() {
Actions act_perform=new Actions(driver);
act_perform.moveToElement(pro1_perform_box).build().perform();
}
public void cloudaction() {
Actions act_cloud = new Actions(driver);
act_cloud.moveToElement(pro1_cloud_box).build().perform();
}
public void boxcontent() throws InterruptedException {
String pro1_java1_text=pro1_java1_h2.getText();
System.out.println(pro1_java1_text);
Thread.sleep(1000);
String pro1_java1_text_p=pro1_java1_p.getText();
System.out.println(pro1_java1_text_p);
Thread.sleep(1000);
pro1_java1_confirm.click();
}
}
<file_sep>/base.java
package pageobject;
import java.io.IOException;
import org.testng.annotations.Test;
public class base extends main {
@Test(priority=1)
public void teast1() throws InterruptedException {
performermethod headerlg=new performermethod(driver);
headerlg.headerlogo();
}
@Test(priority=2)
public void test2() throws InterruptedException
{
performermethod homepg= new performermethod(driver);
homepg.homepage();
}
@Test(priority=3)
public void test3() throws InterruptedException {
performermethod aboutpg=new performermethod(driver);
aboutpg.aboutpage();
}
@Test(priority=4)
public void test4() throws InterruptedException {
performermethod servicepg= new performermethod(driver);
servicepg.servicepage();
}
@Test(priority=5)
public void test5() throws Exception {
performermethod programpg= new performermethod(driver);
programpg.programpage();
}
@Test(priority=6)
public void test6() {
performermethod clientpg=new performermethod(driver);
clientpg.clientpage();
}
@Test(priority=7)
public void test7() throws InterruptedException {
performermethod durationpg=new performermethod(driver);
durationpg.pro_durationpage();
}
@Test(priority=8)
public void test8() throws InterruptedException {
performermethod blogpg=new performermethod(driver);
blogpg.blogpage();
}
@Test(priority=9)
public void test9() throws InterruptedException, IOException {
performermethod contactpg=new performermethod(driver);
contactpg.contactpage();
}
@Test(priority=10)
public void test10() throws InterruptedException {
performermethod logohp=new performermethod(driver);
logohp.footer();
}
}
<file_sep>/README.md
# starperformer
Automation testing for starperformer website using selenium java.and also reporting the statement in httml.
|
4563e6ee31aa54f38548cf0d348951fdab3fd935
|
[
"Markdown",
"Java"
] | 3
|
Java
|
sowbaghya2102/starperformer
|
85f2e1be9dcf0db2298a6c0fd402a69e62de1731
|
a36c9cb4b633e4515d0f4d8e2bd8ec47c95419d5
|
refs/heads/master
|
<file_sep>class CatRentalRequest < ApplicationRecord
validates :cat_id, :start_date, :end_date, :status, presence: true
validates :status, inclusion: {in: %w(PENDING APPROVED DENIED)}
def overlapping_requests
CatRentalRequest
.find_by(id: self.cat_id)
.where("start_date > #{self.end_date} OR end_date < #{self.start_date}")
end
def overlapping_approved_requests
overlapping_requests.where(status: 'APPROVED')
end
def does_not_overlap_approved_request
overlapping_approved_requests.exists?
end
belongs_to :cat,
class_name: :Cat
end
<file_sep># == Schema Information
#
# Table name: cats
#
# id :integer not null, primary key
# birth_date :date not null
# color :string not null
# name :string not null
# sex :string(1) not null
# description :string not null
# created_at :datetime not null
# updated_at :datetime not null
#
class Cat < ApplicationRecord
COLORS = ['black', 'white', 'orange', 'brown']
validates :birth_date, :color, :name, :sex, :description, presence: true
validates :color, inclusion: { in: COLORS }
validates :sex, inclusion: { in: %w(M F) }
def age
current_time = Time.now
# current_month = current_time.month
current_time.year - birth_date.year
end
has_many :rental_requests, dependent: :destroy
class_name: :CatRentalRequest
end
<file_sep>class CatRentalRequestsController < ApplicationController
def new
@crr = CatRentalRequest.new
render :new
end
def create
@crr = CatRentalRequest.new(crr_params)
@crr.save!
redirect_to cat_rental_requests_url
end
def crr_params
params.require(:crr).permit(:cat_id, :start_date, :end_date, :status)
end
end
|
43db567a0202c7dae54f829d07c7f0d1327322f4
|
[
"Ruby"
] | 3
|
Ruby
|
ahmadaladdasi/W4D2
|
149bf5cd72426bd6c16dbcb946a906feb4e98835
|
27823d60979331e11b853114a7404364666cf0ea
|
refs/heads/master
|
<file_sep>//setting angle to degrees
angleMode = "degrees";
//function to set up ship
var Ship = function() {
//setting starting position, velocity, acceleration and angle
this.position = new PVector(width/2, height/2);
this.velocity = new PVector(0,0);
this.acceleration = new PVector(0, 0);
this.angle = 0;
};
//function to update ship position
Ship.prototype.update = function () {
//calculating tan of angle
var y = tan(this.angle);
//if up arrow is pressed
if (keyIsPressed && keyCode === UP) {
//if angle is between 0 and 90 or 270 and 360
if ((this.angle >= 0 && this.angle < 90) || (this.angle > 270 && this.angle <= 360)) {
//adding to acceleration
this.acceleration.add(0.1, y / 10);
}
//if angle is 90
else if (this.angle === 90)
{
//adding to acceleration
this.acceleration.add(0, 0.1);
}
//if angle is between 90 and 270
else if (this.angle > 90 && this.angle < 270) {
//adding to acceleration
this.acceleration.sub(0.1, y / 10);
}
//if angle is 270
else if (this.angle === 270)
{
//adding to acceleration
this.acceleration.add(0, -0.1);
}
}
//if down arrow is pressed
else if (keyIsPressed && keyCode === DOWN) {
//if angle is between 0 and 90 or 270 and 360
if ((this.angle >= 0 && this.angle < 90) || (this.angle > 270 && this.angle <= 360)) {
//decelerating the ship
this.acceleration.sub(0.1, y / 10);
//stops ship from going backwards
if (this.velocity.x < 0) {
this.velocity.set(0, 0);
}
}
//if angle is 90
else if (this.angle === 90)
{
//decelerating the ship
this.acceleration.add(0, -0.1);
//stops ship from going backwards
if (this.velocity.y < 0) {
this.velocity.set(0, 0);
}
}
else if (this.angle > 90 && this.angle < 270) {
//decelerating the ship
this.acceleration.add(0.1, y / 10);
//stops ship from going backwards
if (this.velocity.x > 0) {
this.velocity.set(0, 0);
}
}
else if (this.angle === 270)
{
//decelerating the ship
this.acceleration.add(0, 0.1);
//stops ship from going backwards
if (this.velocity.y > 0) {
this.velocity.set(0, 0);
}
}
}
//adding acceleration to velocity
this.velocity.add(this.acceleration);
//setting a limit to velocity
this.velocity.limit(this.topspeed);
//adding velocity to position
this.position.add(this.velocity);
//reseting acceleration
this.acceleration.mult(0);
//constraining velocity
this.velocity.x = constrain(this.velocity.x, -5, 5);
this.velocity.y = constrain(this.velocity.y, -5, 5);
};
//function to turn left
Ship.prototype.turnLeft = function() {
pushMatrix();
//rotating velocity and acceleration
this.velocity.rotate(-3);
this.acceleration.rotate(-3);
//changing angle
this.angle -= 3;
popMatrix();
//if angle is less than 0, reset at 360
if (this.angle < 0) {
this.angle += 360;
}
};
//function to turn right
Ship.prototype.turnRight = function() {
pushMatrix();
//rotating velocity and acceleration
this.velocity.rotate(3);
this.acceleration.rotate(3);
//changing angle
this.angle += 3;
popMatrix();
//if angle is less than 0, reset at 360
if (this.angle > 360) {
this.angle -= 360;
}
};
//displaying ship
Ship.prototype.display = function () {
//setting stroke
strokeWeight(2);
pushMatrix();
rectMode(CENTER);
translate(this.position.x, this.position.y);
//rotating ship with angle
rotate(this.angle);
//drawing thrusters
fill(79, 79, 79);
rect(-25, -10, 10, 15);
rect(-25, 10, 10, 15);
rect(50, 10, 10, 15);
rect(50, -10, 10, 15);
//drawing flames
fill(255, 192, 31);
//if up is pressed, both back flames appear
if (keyIsPressed && keyCode === UP) {
triangle(-30, -17, -30, -2, -50, -8.5);
triangle(-30, 3, -30, 18, -50, 10.5);
}
//if left is pressed, bottom back flame appears
else if (keyIsPressed && keyCode === LEFT) {
triangle(-30, 3, -30, 18, -50, 10.5);
}
//if right is pressed, top back flame appears
else if (keyIsPressed && keyCode === RIGHT) {
triangle(-30, -17, -30, -2, -50, -8.5);
}
//if down is pressed, both front flames appear
else if (keyIsPressed && keyCode === DOWN) {
triangle(77, -12, 55, -2, 55, -17);
triangle(77, 15, 55, 3, 55, 17.5);
}
//drawing body of ship
fill(77, 82, 112);
triangle(-20, -30, -20, 30, 100, 0);
//drawing window
//fill(79, 79, 79);
//rect(21, 0, 11, 26);
popMatrix();
};
//checks if ship goes over edges
Ship.prototype.checkEdges = function () {
//if ship goes over to the right, resets at left
if (this.position.x > width) {
this.position.x = 0;
}
//if ship goes over to the left, resets at right
else if (this.position.x < 0) {
this.position.x = width;
}
//if ship goes over the bottom, resets at top
if (this.position.y > height) {
this.position.y = 0;
}
//if ship goes over the top, resets at bottom
else if (this.position.y < 0) {
this.position.y = height;
}
};
//new ship instance
var ship = new Ship();
//calls left and right turn functions when left and right are pressed
var keyPressed = function() {
if (keyIsPressed && keyCode === LEFT) {
ship.turnLeft();
} else if (keyIsPressed && keyCode === RIGHT) {
ship.turnRight();
}
};
//animating ship
draw = function() {
background(20, 20, 20);
ship.update();
ship.checkEdges();
ship.display();
keyPressed();
};
<file_sep>var displayArray = function(array, j, qX, qY) {
textFont(createFont("monospace"), 12);
fill(0, 0, 0);
for (var i = 0; i < array.length; i++){
text(array[i], 10 + i * 27 + qX, 10 + j * 29 + qY, 58, 84);
}
};
//function to show movement of numbers after every change
var displaySwap = function(i, minIndex, qX, qY){
//displaying line from old position to new postion
line(minIndex * 27 + 15 + qX, i * 29 +22 + qY, i * 27+15 + qX, i * 29 + 34 + qY);
};
//function to swap array values
var swap = function(array, firstIndex, secondIndex) {
var temp = array[firstIndex];
array[firstIndex] = array[secondIndex];
array[secondIndex] = temp;
};
//function to find lowest value
var indexOfMinimum = function(array, startIndex) {
//setting min value and index to spot that is being checked
var minValue = array[startIndex];
var minIndex = startIndex;
//goes through array starting from spot being checked
for(var i = minIndex + 1; i < array.length; i++) {
//if value is found with lower value, min index and value is set to new index and value
if(array[i] < minValue) {
minIndex = i;
minValue = array[i];
}
}
//returning minIndex
return minIndex;
};
//function to sort array
var selectionSort = function(array, i, qX, qY) {
//inputs values needed for function that displays swap
if (i < array.length - 1){
displaySwap(i, indexOfMinimum(array, i), qX, qY);
}
//inputs values needed for function that performs swap
swap(array, i, indexOfMinimum(array, i));
};
var array = [22, 11, 99, 88, 9, 7, 42];
var revArray = [99, 88, 42, 22, 11, 9, 7];
var sameArray = [22, 11, 11, 88, 22, 7, 11];
var oneArray = [7, 99, 9, 11, 22, 42, 88];
//sorting arrays
for (var j = 0; j < array.length; j++){
//displaying randomly assorted array in q1
displayArray(array, j, 0, 0);
//sorting randomly assorted array
selectionSort(array, j, 0, 0);
//displaying array with values that are the same in q3
displayArray(sameArray, j, 0, 200);
//sorting array with values that are the same
selectionSort(sameArray, j, 0, 200);
//displaying array with only one value off in q4
displayArray(oneArray, j, 200, 200);
//sorting array with only one value off
selectionSort(oneArray, j, 200, 200);
//displaying array with reversed order in q2
displayArray(revArray, j, 200, 0);
//sorting array with reversed order
selectionSort(revArray, j, 200, 0);
}
//dividing quadrants
line(0, 200, 400, 200);
line(200, 0, 200, 400);
<file_sep>background(219, 255, 255);
// sun
fill(255, 255, 61);
ellipse(378, 25, 100, 100);
// bricks
for (var j = 345; j > 144; j -= 20) {
for (var i = 60; i < 321; i += 20) {
rect(60, j, 20, 10);
rect(i, j, 20, 10);
fill(random(150, 210), 73, 20);
}
}
for (var j = 335; j > 149; j -= 20) {
fill(random(150, 210), 73, 20);
rect(60, j, 20, 10);
rect(320, j, 20, 10);
for (var i = 70; i < 321; i += 20) {
rect(i, j, 20, 10);
}
}
//roof
fill(108, 124, 204);
triangle(200, 28, 350, 150, 50, 150);
// door
fill(120, 80, 19);
rect(180, 281, 40, 77);
// door nob
fill(209, 199, 19);
ellipse(188, 319, 7, 10);
// path
fill(122, 122, 122);
rect(177, 355, 45, 47);
// windows
for (i = 79; i < 340; i += 165) {
fill(65, 196, 219);
stroke(247, 244, 244);
strokeWeight(5);
rect(i, 206, 75, 75);
line(i+1, 244, i+73, 244);
line(i+36.5, 210, i+36.5, 280);
}
// grass and shrubs
for (i = -3; i < 405; i += 224) {
image(getImage("cute/GrassBlock"), i, 328, 182, 94);
image(getImage("cute/TreeShort"), i+39, 255);
}
<file_sep>/* Program to display slightly
transperent paint splaters which
eventually create a paint pallet
of red*/
// Generates a random numbers in the object generator
var generator = new Random(1);
var standardDeviation = 100;
var mean = 200;
draw = function() {
// Sets values to the next proterty of the object
var numX = generator.nextGaussian();
var numY = generator.nextGaussian();
// Calculates the positions
var x = standardDeviation * numX + mean;
var y = standardDeviation * numY + mean;
noStroke();
// Fills the ellipse with a red depending on the value of the remainder of x divided by 2550
fill(x%2550, 0, 0, 75);
ellipse(x, y, 36, 36);
};
<file_sep>fill(0, 0, 0);
ellipse(200, 200, 375, 375);
var answer = floor(random(1, 5));
if (answer === 1) {
fill(18, 214, 0);
triangle(200, 104, 280, 280, 120, 280);
fill(255, 255, 255);
text("IT IS", 186, 200);
text("CERTAIN", 174, 229);
}
else if (answer === 2) {
fill(255, 38, 0);
triangle(200, 104, 280, 280, 120, 280);
fill(255, 255, 255);
text("DON'T ", 181, 200);
text("COUNT ON IT", 159, 229);
}
else if (answer === 3) {
fill(223, 230, 18);
triangle(200, 104, 280, 280, 120, 280);
fill(255, 255, 255);
text("BETTER NOT", 162, 200);
text("TELL YOU NOW", 154, 229);
}
else if (answer === 4) {
fill(18, 214, 0);
triangle(200, 104, 280, 280, 120, 280);
fill(255, 255, 255);
text("SIGNS", 181, 200);
text("POINTS TO YES", 155, 229);
<file_sep>var bodyX = 200;
var bodyY = 220;
var bodyW = 129;
var bodyH = bodyW/2;
var eyeX1 = bodyX - 16;
var eyeX2 = bodyX + 16;
draw = function() {
background(207, 254, 255);
fill(240, 209, 36);
ellipse(bodyX, bodyY, bodyW, 106); // body
ellipse(bodyX, bodyY-70, bodyH, 47); // face
// eyes
fill(255, 255, 255);
ellipse(bodyX - 16, bodyY - 74, 30, 20);
ellipse(bodyX + 16, bodyY - 74, 30, 20);
fill(199, 24, 24);
ellipse(eyeX1, bodyY - 74, 16, 16);
ellipse(eyeX2, bodyY - 74, 16, 16);
fill(0, 0, 0);
ellipse(eyeX1, bodyY - 74, 10, 10);
ellipse(eyeX2, bodyY - 74, 10, 10);
// eye movement
eyeX1 += 0.75;
eyeX2 += 0.75;
if(eyeX1 > bodyX - 10) {
eyeX1 -= 14;
}
if(eyeX2 > bodyX + 22) {
eyeX2 -= 14;
}
// beak
stroke(255, 0, 0);
fill(255, 51, 0);
bezier(bodyX + 3, bodyY - 57, bodyX + 52, bodyY - 67, bodyX - 190, bodyY - 72, bodyX - 150, bodyY - 20);
// left leg
line(bodyX - 36, bodyY + 44, bodyX - 37, bodyY + 86);
line(bodyX - 57, bodyY + 101, bodyX - 37, bodyY + 86);
line(bodyX - 20, bodyY + 101, bodyX - 37, bodyY + 86);
line(bodyX - 40, bodyY + 101, bodyX - 37, bodyY + 86);
// right leg
line(bodyX + 28, bodyY + 47, bodyX + 27, bodyY + 86);
line(bodyX + 7, bodyY + 104, bodyX + 27, bodyY + 86);
line(bodyX + 44, bodyY + 104, bodyX + 27, bodyY + 86);
line(bodyX + 24, bodyY + 104, bodyX + 27, bodyY + 86);
};
<file_sep>/* Program that makes colorful raindrops
fall down the screen forever and allows
user to make more raindrops by clicking
thier mouse*/
// Arrays that contain the positions and colors of each rain drop
var xPositions = [random(400), random(400), random(400)];
var yPositions = [random(400), random(400), random(400)];
var colors = [color(random(255), random(255), random(255)), color(random(255), random(255), random(255)), color(random(255), random(255), random(255))];
// Function that draws the raindrops on the screen
draw = function() {
background(204, 247, 255);
// Loop that creates the raindrops and thier movement
for (var i = 0; i < xPositions.length; i++) {
noStroke();
fill(colors[i]);
ellipse(xPositions[i], yPositions[i], 10, 10);
yPositions[i] += 5;
// Conditional statement to send the raindrops back to the top of the screen once they've reached the bottom
if (yPositions[i] > 400) {
yPositions[i] = 0;
}
}
// Funtion that allows the user to click on the canvas and create a raindrop where they click
mouseClicked = function() {
xPositions.push(mouseX);
yPositions.push(mouseY);
colors.push(color(random(0, 255), random(0, 255), random(0, 255)));
};
};
<file_sep>var move = 400;
draw = function() {
background(3, 255, 238);
fill(185, 35, 235);
textSize(100);
text("ROBOTS", move, 95);
text("ROBOTS", move + 792, 95);
image(getImage("avatars/robot_male_1"), move, 89, 200, 200);
image(getImage("avatars/robot_female_2"), move + 600, 89, 200, 200);
image(getImage("avatars/robot_male_3"), move + 1150, 89, 200, 200);
fill(255, 0, 0);
textSize(74);
text("SO REAL YOU'D THINK THEY'RE FAKE!", move, 357);
// moving across screen
move -= 2;
if (move < -1379) {
move = 400;
}
};
<file_sep>/*To create a mountain range using perlin noise*/
var sky = function () {
// Sky
for (var i = 0; i < 100; i++){
fill(255, i*1.7 + 30, i/30, 255);
noStroke();
rect(0, i*2, 400, 2);
}
for (var i = 0; i < 100; i++){
noStroke();
fill(255 - i*1.4, 30 - i, i*1.4, i*2);
rect(i*4, 0, 4, 200);
}
// Clouds
var cloudHeight = 175;
var colorX = 0; // Starting colour for x
for (var i = 0; i < 200; i++){
var colorY = 0; // Starting colour for y
for (var j = 0; j < cloudHeight/3; j++) {
noStroke();
var column = map(noise(colorX, colorY), 0, 1, 0, 260);
fill(255, 220, 240, column - 100);
rect(i*3, j*3, 3, 3);
colorY += 0.2;
}
colorX += -0.08;
}
};
// Mountain
var drawRange = function(length, shape, yPos, red) {
var incAmount = 0.01;
for (var t = 0; t < incAmount*width; t += incAmount) {
var n = noise(t*shape + yPos);
var y = map(n, 0, 1, 0, height/2);
stroke(255, y, red);
rect(t*length, yPos - y, 1, y + 30);
}
};
// Birds
var x1 = random (-25, 0);
var x2 = random (-25, 0);
var y1 = random(100, 300);
var y2 = random(100, 300);
draw = function() {
sky();
drawRange(127, 1.23, 255, 84);
drawRange(196, 1.94, 320, 119);
drawRange(200, 1.89, 372, 183);
drawRange(198, 2.64, 421, 236);
// Birds
var speed1 = random(5);
var speed2 = random(5);
strokeWeight(2.5);
stroke(0, 0, 0);
point(x1, y1);
point(x2, y2);
x1 += speed1;
x2 += speed2;
y1 += random(-3, 3);
y2 += random(-3, 3);
if (x1 > 450) {
x1 = random(-25, 0);
}
else if (x2 > 450) {
x2 = random(-25, 0);
}
};
<file_sep>/* Program to display an array of
objects on the screen*/
var t;
var book = [
{
title: "Beyond Good and Evil / On the Genealogy of Morals",
author: "By <NAME>",
stars: 4,
color: color(random(255), random(255), random(255))
},
{
title: "Meditations on First Philosophy",
author: "By <NAME>",
stars: 4,
color: color(random(255), random(255), random(255))
},
{
title: "Tao Te Ching",
author: "By Laozi",
stars: 3,
color: color(random(255), random(255), random(255))
},
{
title: "The Itty-Bitty Kitty Rescue (Paw Party)",
author: "By <NAME>",
stars: 5,
color: color(random(255), random(255), random(255))
}
];
for (var e = 0; e < 2; e++) {
// draw shelf
fill(173, 117, 33);
rect(0, 142 + e * 140, width, 10);
// draw books
if (e === 0) {
for (var j = 0; j < book.length; j++) {
fill(book[j].color);
rect(10 + j * 98, 25 + e * 140, 90, 117);
fill(255, 255, 255);
text(book[j].title, 15 + j * 98, 29 + e * 140, 70, 100);
text(book[j].author, 15 + j * 98, 102 + e * 140, 70, 100);
for (var i = 0; i < book[j].stars; i++) {
image(getImage("cute/Star"), 13 + i * 16 + 97 * j, 116 + e * 140, 20, 30);
}
}
}
else if (e === 1) {
for (var q = book.length - 1; q >= 0; q--) {
if (q === 0) {
t = 3;
}
else if (q === 1) {
t = 2;
}
else if (q === 2) {
t = 1;
}
else if (q === 3) {
t = 0;
}
fill(book[q].color);
rect(10 + t * 98, 25 + e * 140, 90, 117);
fill(255, 255, 255);
text(book[q].title, 15 + t * 98, 29 + e * 140, 70, 100);
text(book[q].author, 15 + t * 98, 102 + e * 140, 70, 100);
for (var i = 0; i < book[q].stars; i++) {
image(getImage("cute/Star"), 13 + i * 16 + 97 * t, 116 + e * 140, 20, 30);
}
}
}
}
<file_sep># Khan-Academy-Code<file_sep><!DOCTYPE html>
<html>
<!--I learnt how to create tables, add interanl links to jump around the page and external links to navigate to other websites -->
<head>
<!--Images not included because they may give a false expectation to the final product-->
<title>Project: Recipe book</title>
<meta charset="utf-8">
<style>
body {
background:url("https://upload.wikimedia.org/wikipedia/commons/0/0f/Wiki_background.jpg"); /*Changes background to specified image*/
color:#E936A7; /*Hexadecimal for the color frostbite */
}
h1 {
color:rgb(196, 24, 196);
}
#chocolate_chip_cookies {
color:rgb(128, 84, 9);
}
#brownies {
color:rgb(89, 70, 14);
}
#cinnamon_buns {
color:rgb(209, 176, 12);
}
</style>
</head>
<body>
<h1>Zach's Recipe Book</h1>
<h2>Contents:</h2>
<ol>
<li><a href="#chocolate_chip_cookies">Recipe #1: Chocolate Chip Cookies</a></li>
<li><a href="#brownies">Recipe #2: Brownies</a></li>
<li><a href="#cinnamon_buns">Recipe #3: Cinnamon buns</a></li>
</ol>
<h2 id="chocolate_chip_cookies">Recipe #1: Chocolate Chip Cookies</h2>
<ul>
<li>Time: 18 min</li>
<li>Serves: 24</li>
</ul>
<table>
<thead>
<tr>
<th>Ingredients</th>
<th>Quantity</th>
</tr>
</thead>
<tbody>
<tr>
<td>Butter</td>
<td>1/2 cup (113 g)</td>
</tr>
<tr>
<td>Granulated sugar</td>
<td>1/2 cup (99 g)</td>
</tr>
<tr>
<td>Brown sugar packed</td>
<td>1/4 cup (54 g)</td>
</tr>
<tr>
<td>Vanilla extract</td>
<td>2 teaspoons</td>
</tr>
<tr>
<td>Large egg</td>
<td>1</td>
</tr>
<tr>
<td>All-purpose flour</td>
<td>1 3/4 cups (210 g)</td>
</tr>
<tr>
<td>Baking soda</td>
<td>1/2 teaspoon</td>
</tr>
<tr>
<td>Kosher salt</td>
<td>1/2 teaspoon</td>
</tr>
<tr>
<td>Semisweet chocolate chips</td>
<td>1 cup (170 g)</td>
</tr>
</tbody>
</table>
<p><strong>Step 1:</strong> Preheat the oven to 350 F.<br>
<strong>Step 2:</strong> Microwave the butter for about 40 seconds. Butter should be completely melted but shouldn't be hot.<br>
<strong>Step 3:</strong> In a large bowl, mix butter with the sugars until well-combined.<br>
<strong>Step 4:</strong> Stir in vanilla and egg until incorporated.<br>
<strong>Step 5:</strong> Add the flour, baking soda, and salt. Mix until just combined. Dough should be soft and a little sticky but not overly sticky.<br>
<strong>Step 6:</strong> Stir in chocolate chips.<br>
<strong>Step 7:</strong> Scoop out 1.5 tablespoons of dough (medium cookie scoop) and place on baking sheet.<br>
<strong>Step 8:</strong> Bake for 7-10 minutes, or until cookies are set. They will be puffy and still look a little underbaked in the middle.
</p>
<p><em>Source: <a href="https://www.ihearteating.com/easiest-chocolate-chip-cookie-recipe/">https://www.ihearteating.com/easiest-chocolate-chip-cookie-recipe/</a></em></p>
<h2 id="brownies">Recipe #2: Brownies</h2>
<ul>
<li>Time: 1h</li>
<li>Serves: 16</li>
</ul>
<table>
<thead>
<tr>
<th>Ingredients</th>
<th>Quantity</th>
</tr>
</thead>
<tbody>
<tr>
<td>Butter</td>
<td>1/2 cup</td>
</tr>
<tr>
<td>White sugar</td>
<td>1 cup</td>
</tr>
<tr>
<td>Eggs</td>
<td>2</td>
</tr>
<tr>
<td>Vanilla extract</td>
<td>1 teaspoon</td>
</tr>
<tr>
<td>Unsweetened cocoa powder</td>
<td>1/3 cup</td>
</tr>
<tr>
<td>All-purpose flour</td>
<td>1/2 cup</td>
</tr>
<tr>
<td>Salt</td>
<td>1/4 teaspoon</td>
</tr>
<tr>
<td>Baking powder</td>
<td>1/4 teaspoon</td>
</tr>
</tbody>
</table>
<p><strong>Step 1:</strong> Preheat oven to 350 degrees F (175 degrees C). Grease and flour an 8-inch square pan.<br>
<strong>Step 2:</strong> In a large saucepan, melt 1/2 cup butter. Remove from heat, and stir in sugar, eggs, and 1 teaspoon vanilla. Beat in 1/3 cup cocoa, 1/2 cup flour, salt, and baking powder. Spread batter into prepared pan.<br>
<strong>Step 3:</strong> Bake in preheated oven for 25 to 30 minutes. Do not overcook.
</p>
<p><em>Source: <a href="https://www.allrecipes.com/recipe/10549/best-brownies/">https://www.allrecipes.com/recipe/10549/best-brownies/</a></em></p>
<h2 id="cinnamon_buns">Recipe #3</h2>
<ul>
<li>Time: 3h</li>
<li>Serves: 15</li>
</ul>
<table>
<thead>
<tr>
<th>Ingredients</th>
<th>Quantity</th>
</tr>
</thead>
<tbody>
<tr>
<td>White sugar</td>
<td>1 teaspoon</td>
</tr>
<tr>
<td>Active dry yeast</td>
<td>1 (.25 ounce) package</td>
</tr>
<tr>
<td>Warm water</td>
<td>1/2 cup (110 degrees F/45 degrees C)</td>
</tr>
<tr>
<td>Milk</td>
<td>1/2 cup</td>
</tr>
<tr>
<td>White sugar</td>
<td>1/4 cup</td>
</tr>
<tr>
<td>Butter</td>
<td>1/4 cup</td>
</tr>
<tr>
<td>Salt</td>
<td>1 teaspoon</td>
</tr>
<tr>
<td>Beaten eggs</td>
<td>2</td>
</tr>
<tr>
<td>All-purpose flour</td>
<td>4 cups</td>
</tr>
<tr>
<td>Butter</td>
<td>3/4 cup</td>
</tr>
<tr>
<td>Brown sugar</td>
<td>3/4 cup</td>
</tr>
<tr>
<td>Chopped pecans, divided</td>
<td>1 cup</td>
</tr>
<tr>
<td>Brown sugar</td>
<td>3/4 cup</td>
</tr>
<tr>
<td>Ground cinnamon</td>
<td>1 tablespoon</td>
</tr>
<tr>
<td>Melted butter</td>
<td>1/4 cup</td>
</tr>
</tbody>
</table>
<p><strong>Step 1:</strong> In a small bowl, dissolve 1 teaspoon sugar and yeast in warm water. Let stand until creamy, about 10 minutes. Warm the milk in a small saucepan until it bubbles, then remove from heat. Mix in 1/4 cup sugar, 1/4 cup butter and salt; stir until melted. Let cool until lukewarm.<br>
<strong>Step 2:</strong> In a large bowl, combine the yeast mixture, milk mixture, eggs and 1 1/2 cup flour; stir well to combine. Stir in the remaining flour, 1/2 cup at a time, beating well after each addition. When the dough has pulled together, turn it out onto a lightly floured surface and knead until smooth and elastic, about 8 minutes.<br>
<strong>Step 3:</strong> Lightly oil a large bowl, place the dough in the bowl and turn to coat with oil. Cover with a damp cloth and let rise in a warm place until doubled in volume, about 1 hour.<br>
<strong>Step 4:</strong> While dough is rising, melt 3/4 cup butter in a small saucepan over medium heat. Stir in 3/4 cup brown sugar, whisking until smooth. Pour into greased 9x13 inch baking pan. Sprinkle bottom of pan with 1/2 cup pecans; set aside. Melt remaining butter; set aside. Combine remaining 3/4 cup brown sugar, 1/2 cup pecans, and cinnamon; set aside.<br>
<strong>Step 5:</strong> Turn dough out onto a lightly floured surface, roll into an 18x14 inch rectangle. Brush with 2 tablespoons melted butter, leaving 1/2 inch border uncovered; sprinkle with brown sugar cinnamon mixture. Starting at long side, tightly roll up, pinching seam to seal. Brush with remaining 2 tablespoons butter. With serrated knife, cut into 15 pieces; place cut side down, in prepared pan. Cover and let rise for 1 hour or until doubled in volume. Meanwhile, preheat oven to 375 degrees F (190 degrees C).<br>
<strong>Step 6:</strong> Bake in preheated oven for 25 to 30 minutes, until golden brown. Let cool in pan for 3 minutes, then invert onto serving platter. Scrape remaining filling from the pan onto the rolls.
</p>
<p><em>Source: <a href="https://www.allrecipes.com/recipe/21461/ooey-gooey-cinnamon-buns/">https://www.allrecipes.com/recipe/21461/ooey-gooey-cinnamon-buns/</a></em></p>
</body>
</html>
|
5ed05609aed3c4837dbe6190cc952b430313cea4
|
[
"JavaScript",
"HTML",
"Markdown"
] | 12
|
JavaScript
|
ZachFaria/Khan-Academy-Code
|
d94139c1be562af048fb81920446d235bd9680f1
|
4e9824794312f7682f0ae187120836974082e7b5
|
refs/heads/master
|
<repo_name>ZPLEDGE/Java-OCP<file_sep>/src/Practice_08_3/Goal.java
package Practice_08_3;
public class Goal {
public Team teamScored;
public Player playerScored;
public double timeScored;
}
<file_sep>/src/Practice_07_4/League.java
package Practice_07_4;
public class League {
public static void main(String[] args) {
//Six Players
Player MaxDupont = new Player();
MaxDupont.name = "<NAME>";
Player AlexLipov = new Player();
AlexLipov.name = "<NAME>";
Player MarcLecroix = new Player();
MarcLecroix.name = "<NAME>";
Player NickGaspard = new Player();
NickGaspard.name = "<NAME>";
Player DiegoMarco = new Player();
DiegoMarco.name = "<NAME>";
Player PhillipeTerzo = new Player();
PhillipeTerzo.name = "<NAME>";
//Two Teams
Team teamNewOrlean = new Team();
teamNewOrlean.name = "New Orlean";
teamNewOrlean.playersArray = new Player[3];
teamNewOrlean.playersArray[0] = MaxDupont;
teamNewOrlean.playersArray[1] = AlexLipov;
teamNewOrlean.playersArray[2] = MarcLecroix;
Team teamMontreal = new Team();
teamMontreal.name = "Team United";
teamMontreal.playersArray = new Player[3];
teamMontreal.playersArray[0] = NickGaspard;
teamMontreal.playersArray[1] = DiegoMarco;
teamMontreal.playersArray[2] = PhillipeTerzo;
//Game
Game lastGame = new Game();
lastGame.teamAway = teamMontreal;
lastGame.teamHome = teamNewOrlean;
lastGame.goalScored = new Goal[3];
/* Printing */
System.out.println(teamNewOrlean.name);
for (Player player : teamNewOrlean.playersArray) {
System.out.println(player.name);
}
System.out.println(teamMontreal.name);
for (Player player : teamMontreal.playersArray) {
System.out.println(player.name);
}
System.out.println();
String partOfLastName = "ard";
System.out.println("Searching player with part name: " + partOfLastName);
Team teamFound = null;
for (Player player : teamNewOrlean.playersArray) {
if (player.name.contains(partOfLastName)) {
System.out.println("Found player in team: " + teamNewOrlean.name + ", full name is: " + player.name);
teamFound = teamNewOrlean;
}
}
for (Player player : teamMontreal.playersArray) {
if (player.name.contains(partOfLastName)) {
System.out.println("Found player in team: " + teamMontreal.name + ", full name is: " + player.name);
teamFound = teamMontreal;
}
}
System.out.println();
if (teamNewOrlean != null) {
System.out.println("Corresponding Full Team List:");
for (Player player : teamFound.playersArray) {
System.out.println(player.name);
}
}
}
}
<file_sep>/src/Practice_07_3.java
public class Practice_07_3 {
public static void main(String[] args) {
long myBallanceIn2027 = 2_547_277_000L;
float profitRatio = 0.772F;
char value = 'r';
System.out.println("Long Value: " + myBallanceIn2027);
int secondVal = (int)myBallanceIn2027;
System.out.println("Int Value: " + secondVal);
}
}
<file_sep>/src/Practice_08_3/League.java
package Practice_08_3;
public class League {
static Team []teamArray;
static public Game []gameArray;
public static Team[] createTeams(){
//First Team
Player MaxDupont = new Player();
MaxDupont.name = "<NAME>";
Player AlexLipov = new Player();
AlexLipov.name = "<NAME>";
Player MarcLecroix = new Player();
MarcLecroix.name = "<NAME>";
Team teamNewOrlean = new Team();
teamNewOrlean.name = "New Orlean";
teamNewOrlean.playersArray = new Player[3];
teamNewOrlean.playersArray[0] = MaxDupont;
teamNewOrlean.playersArray[1] = AlexLipov;
teamNewOrlean.playersArray[2] = MarcLecroix;
//Second Team
Player NickGaspard = new Player();
NickGaspard.name = "<NAME>";
Player DiegoMarco = new Player();
DiegoMarco.name = "<NAME>";
Player PhillipeTerzo = new Player();
PhillipeTerzo.name = "<NAME>";
Team teamMontreal = new Team();
teamMontreal.name = "Team Montreal";
teamMontreal.playersArray = new Player[3];
teamMontreal.playersArray[0] = NickGaspard;
teamMontreal.playersArray[1] = DiegoMarco;
teamMontreal.playersArray[2] = PhillipeTerzo;
teamArray = new Team[2];
teamArray[0] = teamNewOrlean;
teamArray[1] = teamMontreal;
return teamArray;
}
public static Game[] createGames(Team[] teams){
gameArray = new Game[1];
gameArray[0] = new Game();
gameArray[0].teamAway = teams[0];
gameArray[0].teamHome = teams[1];
return gameArray;
}
public static void main(String[] args) {
createTeams();
createGames(teamArray);
gameArray[0].playGame(5);
gameArray[0].printStatistics();
/* Printing */
/* System.out.println(teamNewOrlean.name);
for (Player player : teamNewOrlean.playersArray) {
System.out.println(player.name);
}
System.out.println(teamMontreal.name);
for (Player player : teamMontreal.playersArray) {
System.out.println(player.name);
}
System.out.println();
String partOfLastName = "ard";
System.out.println("Searching player with part name: " + partOfLastName);
Team teamFound = null;
for (Player player : teamNewOrlean.playersArray) {
if (player.name.contains(partOfLastName)) {
System.out.println("Found player in team: " + teamNewOrlean.name + ", full name is: " + player.name);
teamFound = teamNewOrlean;
}
}
for (Player player : teamMontreal.playersArray) {
if (player.name.contains(partOfLastName)) {
System.out.println("Found player in team: " + teamMontreal.name + ", full name is: " + player.name);
teamFound = teamMontreal;
}
}
System.out.println();
if (teamNewOrlean != null) {
System.out.println("Corresponding Full Team List:");
for (Player player : teamFound.playersArray) {
System.out.println(player.name);
}
}*/
}
}
<file_sep>/src/Practice_04_1.java
public class Practice_04_1 {
public static void main(String[] args) {
String custName = "<NAME>", itemDesc = " Land Rover Freelander";
String message;
message = custName + " wants to buy " + itemDesc;
System.out.println(message);
message = custName.concat(" wants to buy ").concat(itemDesc);
System.out.println(message);
}
}
<file_sep>/src/Practice_08_2/Item.java
package Practice_08_2;
public class Item {
String desc;
int quantity;
double price;
char colorCode = 'N';
public void setItemFields(String descToSet, int quantityToSet, double pricetoSet){
desc = descToSet;
quantity = quantityToSet;
price = pricetoSet;
}
public int setItemFields(String descToSet, int quantityToSet, double pricetoSet, char colorCodeToSet){
if (colorCodeToSet == ' ')
return -1;
else{
colorCode = colorCodeToSet;
setItemFields(descToSet, quantityToSet, pricetoSet);
return 1;
}
}
public void displayItem(){
System.out.println("Item: " + desc + ", Qty: " + quantity + ", Price: " + price + ", ColorCode: " + colorCode);
}
}
<file_sep>/src/Practice_05_3.java
public class Practice_05_3 {
public static void main(String[] args) {
double price = 20_000, tax = 6;
int quantity = 1;
double total;
String custName = "<NAME>";
String []itemDesc = {"Home", "Car", "Bike", "Yacht"};
String message;
message = custName + " wants to buy " + itemDesc.length + " items.";
System.out.println(message);
message = "Items Purchased: ";
for (String item: itemDesc){
message += item + ", ";
}
System.out.println(message.substring(0, message.length() - 2) + ".");
}
}
<file_sep>/src/Practice_06_1_and_Practice_06_2/ShoppingCart.java
package Practice_06_1_and_Practice_06_2;
public class ShoppingCart {
public static void main(String[] args) {
Item instance_1 = new Item();
instance_1.desc = "Juice";
Item instance_2 = new Item();
instance_2.desc = "Meat";
String message = "Items are: ";
message += instance_1.desc + ", " + instance_2.desc;
System.out.println(message);
}
}<file_sep>/src/Practice_07_4/Game.java
package Practice_07_4;
public class Game {
public Team teamHome;
public Team teamAway;
public Goal []goalScored;
}
|
5e1bc66248ed04d53cc5489faefca82e5620a660
|
[
"Java"
] | 9
|
Java
|
ZPLEDGE/Java-OCP
|
c1259dbfb9fa36c9beb2bc88a165a362954de0f4
|
e1147397ce162aa97a3fe1a8b5f0801220c616b0
|
refs/heads/master
|
<repo_name>MrcSnm/love.js<file_sep>/readme.md
Love.js
============
This is [LÖVE](https://love2d.org/) ported to the web using [Emscripten](https://kripken.github.io/emscripten-site/).
It differs from [Motor](https://github.com/rnlf/motor) or [Punchdrunk](https://github.com/TannerRogalsky/punchdrunk) in that it is not a reimplementation but a direct port of the existing LÖVE v0.10.0 code with very few code modifications. As such, it should be at feature parity, as long as the browser it's running in supports a given feature.
## Examples
Here are some live games:
- [Mari0](http://tannerrogalsky.com/mari0/)
- [Friendshape](http://tannerrogalsky.com/friendshape)
- [Mr. Rescue](http://tannerrogalsky.com/mrrescue/)
## Dependencies
- Python 2.7
Python 2.7 will allow you to package your game into a format that Emscripten can read. It will also let you run a simple web server for testing. Python 3.5 is not supported at this time.
## Usage
### Get the code.
1. Clone the repository. `git clone https://github.com/TannerRogalsky/love.js.git`
2. Clone the submodules: `git submodule update --init --recursive`
### Package your game
1. Navigate into the `debug` folder.
2. Package your game.
- `python ../emscripten/tools/file_packager.py game.data --preload [path-to-game]@/ --js-output=game.js`
- This should output two files: `game.data` and `game.js` into the `debug` folder.
- Make sure you include the '@/' after the path to your game source. This will tell the file packager to place your game at the root of Emscripten's file system.
- Make sure your [path-to-game] does not contain any non ascii characters
### Test it
1. Run a web server.
- `python -m SimpleHTTPServer 8000` will work.
2. Open `localhost:8000` in the browser of your choice.
### Release it
1. If everything looks good, nagivate to the `release` folder. Package and test your game for release.
2. The `release-compatibility` folder can now be copied to a webserver. A simple static webserver should suffice.
#### Linux Shell Compile
1. Change [path-to-game]@/ to where it is located, it is defaulted on the debug folder
2. The release files is defaulted on release-compatibility, it generates a zip file from the game.data, game.js, love.js, consolewrapper.js and theme for fast server uploading
3. It will automatically starts a simple server in `localhost:8000`
#### Calling JS Functions from .lua files
1. Full documentation and original project about calling JS Functions inside lua on **[Love.js-Api-Player](https://github.com/MrcSnm/Love.js-Api-Player)**
2. It is able to **send** requests and **retrieve** data from the requests
#### Release Types
`release-compatibility` is recommended if the performance it yields is adequate. The difference between `compatibility` and `performance` is that `performance` is compiled with exception catching disabled and memory growth disabled. This means that you will not be able to rely on catching exceptions from C++ in your code and you may need to set `TOTAL_MEMORY` on the `Module` object to indicate how much memory your game will require.
## Issues
Some things, like threads, don't have browser support yet. Please check the project issues for known problems.
## Contributing
Please consider submitting a test. Any functionality that isn't covered in `spec/tests` would be very useful.
The build process for this project is still a very manual process and is not ready to be shared. Feel free to keep an eye on the `emscripten` branch of [my LÖVE fork](https://bitbucket.org/TannerRogalsky/love) if you're really curious.
<file_sep>/js.lua
__requestQueue = {}
_requestCount = 0
_Request =
{
command = "",
currentTime = 0,
timeOut = 2,
id = '0'
}
local os = love.system.getOS()
local __defaultErrorFunction = nil
local isDebugActive = false
JS = {}
function JS.callJS(funcToCall)
if(os == "Web") then
print("callJavascriptFunction " .. funcToCall)
end
end
--You can pass a set of commands here and, it is a syntactic sugar for executing many commands inside callJS, as it only calls a function
--If you pass arguments to the func beyond the string, it will perform automatically string.format
--Return statement is possible inside this structure
--This will return a string containing a function to be called by JS.callJS
local _unpack
if(_VERSION == "Lua 5.1" or _VERSION == "LuaJIT") then
_unpack = unpack
else
_unpack = table.unpack
end
function JS.stringFunc(str, ...)
str = "(function(){"..str.."})()"
if(#arg > 0) then
str = str:format(_unpack(arg))
end
str = str:gsub("[\n\t]", "")
return str
end
--The call will store in the webDB the return value from the function passed
--it timeouts
local function retrieveJS(funcToCall, id)
--Used for retrieveData function
JS.callJS("FS.writeFile('"..love.filesystem.getSaveDirectory().."/__temp"..id.."', "..funcToCall..");")
end
--Call JS.newRequest instead
function _Request:new(isPromise, command, onDataLoaded, onError, timeout, id)
local obj = {}
setmetatable(obj, self)
obj.command = command
obj.onError = onError or __defaultErrorFunction
if not isPromise then
retrieveJS(command, id)
else
JS.callJS(command)
end
obj.onDataLoaded = onDataLoaded
obj.timeOut = (timeout == nil) and obj.timeOut or timeout
obj.id = id
function obj:getData()
--Try to read from webdb
return love.filesystem.read("__temp"..self.id)
end
function obj:purgeData()
--Data must be purged for not allowing old data to be retrieved
love.filesystem.remove("__temp"..self.id)
end
function obj:update(dt)
self.timeOut = self.timeOut - dt
local retData = self:getData()
if((retData ~= nil and retData ~= "nil") or self.timeOut <= 0) then
if(retData ~= nil and retData:match("ERROR") == nil) then
if isDebugActive then
print("Data has been retrieved "..retData)
end
self.onDataLoaded(retData)
else
self.onError(self.id, retData)
end
self:purgeData()
return false
else
return true
end
end
return obj
end
--Place this function on love.update and set it to return if it returns false (This API is synchronous)
function JS.retrieveData(dt)
local isRetrieving = #__requestQueue ~= 0
local deadRequests = {}
for i = 1, #__requestQueue do
local isUpdating =__requestQueue[i]:update(dt)
if not isUpdating then
table.insert(deadRequests, i)
end
end
for i = 1, #deadRequests do
if(isDebugActive) then
print("Request died: "..deadRequests[i])
end
table.remove(__requestQueue, deadRequests[i])
end
return isRetrieving
end
--May only be used for functions that don't return a promise
function JS.newRequest(funcToCall, onDataLoaded, onError, timeout, optionalId)
if(os ~= "Web") then
return
end
table.insert(__requestQueue, _Request:new(false, funcToCall, onDataLoaded, onError, timeout or 5, optionalId or _requestCount))
end
--This function can be handled manually (in JS code)
--How to: add the function call when your events resolve: FS.writeFile("Put love.filesystem.getSaveDirectory here", "Pass a string here (NUMBER DONT WORK"))
--Or it can be handled by Lua, it auto sets your data if you write the following command:
-- _$_(yourStringOrFunctionHere)
function JS.newPromiseRequest(funcToCall, onDataLoaded, onError, timeout, optionalId)
if(os ~= "Web") then
return
end
optionalId = optionalId or _requestCount
funcToCall = funcToCall:gsub("_$_%(", "FS.writeFile('"..love.filesystem.getSaveDirectory().."/__temp"..optionalId.."', ")
table.insert(__requestQueue, _Request:new(true, funcToCall, onDataLoaded, onError, timeout or 5, optionalId))
end
--It receives the ID from ther request
--Don't try printing the request.command, as it will execute the javascript command
function JS.setDefaultErrorFunction(func)
__defaultErrorFunction = func
end
JS.setDefaultErrorFunction(function(id, error)
if( isDebugActive ) then
local msg = "Data could not be loaded for id:'"..id.."'"
if(error)then
msg = msg.."\nError: "..error
end
print(msg)
end
end)<file_sep>/spec/main.lua
local test_files = love.filesystem.getDirectoryItems('tests')
local tests = {}
for i,test_file in ipairs(test_files) do
local base = test_file:match('([%w_]+)%.lua')
if base then
tests[base] = require('tests/' .. base)
test_files[i] = base
end
end
local selected_test_file_index = 1
local width = love.graphics.getWidth()
local font = love.graphics.getFont()
local font_height = font:getHeight()
local dy = font_height * 3
local widest_text_width = 0
local horizontal_padding = 2
for _,test_file in ipairs(test_files) do
local text_width = font:getWidth(test_file)
if text_width > widest_text_width then
widest_text_width = text_width
end
end
widest_text_width = widest_text_width + horizontal_padding * 2
local function draw_test_list()
for i,test_file in ipairs(test_files) do
local y = (i - 1) * dy + font_height / 2
love.graphics.setColor(255, 255, 255)
love.graphics.print(test_file, horizontal_padding, y)
if i == selected_test_file_index then
love.graphics.setColor(255, 0, 255)
else
love.graphics.setColor(255, 255, 0)
end
love.graphics.rectangle('line', 0, y - font_height, widest_text_width, dy)
end
love.graphics.setColor(255, 255, 255)
love.graphics.line(widest_text_width, 0, widest_text_width, love.graphics.getHeight())
end
function love.load(args)
test_canvas = love.graphics.newCanvas(love.graphics.getWidth() - widest_text_width, love.graphics.getHeight())
current_test = tests[test_files[selected_test_file_index]]()
end
function love.update(dt)
if current_test and current_test.update then
current_test:update(dt)
end
end
function love.draw()
draw_test_list()
if current_test and current_test.draw then
love.graphics.setCanvas(test_canvas)
love.graphics.clear()
current_test:draw(test_canvas)
love.graphics.setCanvas()
love.graphics.draw(test_canvas, widest_text_width, 0)
end
end
function love.keypressed(key, scancode, isrepeat)
if current_test and current_test.keypressed then
current_test:keypressed(key, scancode, isrepeat)
end
end
function love.mousemoved(x, y, dx, dy)
if current_test and current_test.mousemoved then
current_test:mousemoved(x, y, dx, dy)
end
end
function love.mousepressed(x, y, button, istouch)
if x < widest_text_width then
local i = math.ceil(y / dy)
if i <= #test_files then
selected_test_file_index = i
current_test = tests[test_files[selected_test_file_index]]()
end
elseif current_test and current_test.mousepressed then
current_test:mousepressed(x, y, button, istouch)
end
end
function love.mousereleased(x, y, button, istouch)
if current_test and current_test.mousereleased then
current_test:mousereleased(x, y, button, istouch)
end
end
<file_sep>/spec/tests/relative_audio.lua
local RelativeAudio = {}
RelativeAudio.__index = RelativeAudio
function create()
local x, y, z = 0, 0, 0;
local snd;
local relative;
snd = love.audio.newSource('audio/cjump_mono.wav', 'static')
snd:setLooping(true);
snd:play();
-- By default the sound is not relative.
relative = snd:isRelative();
local test = {
x = x,
y = y,
z = z,
snd = snd,
relative = relative
}
setmetatable(test, RelativeAudio)
return test
end
function RelativeAudio:keypressed(key)
-- Move the listener via WASD.
if key == 'a' then
self.x = self.x - 1;
elseif key == 'd' then
self.x = self.x + 1;
elseif key == 'w' then
self.y = self.y - 1;
elseif key == 's' then
self.y = self.y + 1;
end
love.audio.setPosition(self.x, self.y, self.z);
-- Toggle between a relative and absolute source.
if key == 'r' then
self.relative = not self.snd:isRelative();
self.snd:setRelative(self.relative);
end
end
function RelativeAudio:draw()
love.graphics.print('Relative: ' .. tostring(self.snd:isRelative()), 20, 20);
local px, py, pz = love.audio.getPosition()
love.graphics.print('Listener Position: (x = ' .. px .. ', y = ' .. py .. ', z = ' .. pz .. ')', 20, 40);
local vx, vy, vz = love.audio.getVelocity()
love.graphics.print('Listener Velocity: (x = ' .. vx .. ', y = ' .. vy .. ', z = ' .. vz .. ')', 20, 60);
local fx, fy, fz, ux, uy, uz = love.audio.getOrientation()
love.graphics.print('Listener Forward Vector: (x = ' .. fx .. ', y = ' .. fy .. ', z = ' .. fz .. ')', 20, 80);
love.graphics.print('Listener Up Vector: (x = ' .. ux .. ', y = ' .. uy .. ', z = ' .. uz .. ')', 20, 100);
end
return create
<file_sep>/compile.sh
python emscripten/tools/file_packager.py release-compatibility/game.data --preload ./debug/[path-to-game]@/ --js-output=release-compatibility/game.js
cd release-compatibility
rm add.zip
zip -r add.zip . -x "release-compatibility/index.html"
sleep 2s
python -m SimpleHTTPServer 8000
|
0d9e88d2b4c2b9253592f4d98126013d27384dfb
|
[
"Markdown",
"Shell",
"Lua"
] | 5
|
Markdown
|
MrcSnm/love.js
|
c2f2225befdb9446d3fc735cc9c8e5564af76815
|
8d654b6433a5910cb7b2aeab457f6803e8438c54
|
refs/heads/master
|
<file_sep>src = ../../Sources/ormlite-core-4.48-sources.jar<file_sep>package com.hg.android.widget;
import java.io.File;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.Uri;
import android.provider.MediaStore;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.Toast;
import com.hg.android.app.LocalPictureBrowser;
import com.hg.android.utils.HGUtils;
public class ImagesGridEditView extends ImagesGridView {
static int GlobleCount = 0;
private final int RequestCode_Major = 0xf000 + (GlobleCount++) % 0xff0;
private final int RequestCode_TakePhoto = RequestCode_Major + 1;
private final int RequestCode_PickPhoto = RequestCode_Major + 2;
private final String TAG = "ImagesGridEditView" + RequestCode_Major;
BroadcastReceiver receiver;
private Uri takePickureUri;
private int maxCount = 9; //默认九张
public ImagesGridEditView(Context context) {
super(context);
}
public ImagesGridEditView(Context context, AttributeSet attrs) {
super(context, attrs);
}
@SuppressLint("NewApi")
public ImagesGridEditView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
if (receiver == null) {
receiver = new BroadcastReceiver() {
@Override
public void onReceive(Context arg0, Intent intent) {
if (intent.getAction().equals(LocalPictureBrowser.BroadcastAction_Delete)) {
if (TAG.equals(intent.getStringExtra(LocalPictureBrowser.ImtentKey_TAG))) {
int index = intent.getIntExtra(LocalPictureBrowser.ImtentKey_Index, -1);
removeImageAtIndex(index);
}
}
}
};
IntentFilter filter = new IntentFilter(LocalPictureBrowser.BroadcastAction_Delete);
getContext().registerReceiver(receiver, filter);
}
}
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
if (receiver != null) {
getContext().unregisterReceiver(receiver);
receiver = null;
}
}
@Override
protected void clickOnPicture(int index) {
Intent intent = new Intent(getContext(), LocalPictureBrowser.class);
intent.putExtra(LocalPictureBrowser.ImtentKey_Urls, imageUrls.toArray(new String[0]));
intent.putExtra(LocalPictureBrowser.ImtentKey_Index, index);
intent.putExtra(LocalPictureBrowser.ImtentKey_TAG, TAG);
getContext().startActivity(intent);
}
@Override
protected void initSubviews(Context context) {
super.initSubviews(context);
}
public int getMaxCount() {
return maxCount;
}
public void setMaxCount(int maxCount) {
this.maxCount = maxCount;
}
@Override
protected String calcShowFile(String file) {
//必须是本地地址
if (!file.startsWith("file:")) {
file = "file://" + file;
}
return file;
}
@Override
protected int getAdapterCount() {
int imageCount = imagesCount();
if (imageCount >= getMaxCount()) {
return imageCount;
}
return imageCount + 1;
}
@Override
void onAddPicture() {
if (imagesCount() >= maxCount) {
Toast.makeText(getContext(), "最多只能添加" + maxCount + "张图片", Toast.LENGTH_SHORT).show();
return;
}
CharSequence[] items = new CharSequence[] { "从相册选取", "拍照" };
new AlertDialog.Builder(getContext()).setTitle("选取照片").setItems(items, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface arg0, int witch) {
arg0.dismiss();
if (witch == 0) {
onActionPickPicture();
} else {
onActionTakePicture();
}
}
}).show();
}
private void onActionPickPicture() {
try {
Intent i = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
((Activity) getContext()).startActivityForResult(i, RequestCode_PickPhoto);
}
catch (Exception e) {
e.printStackTrace();
Toast.makeText(getContext(), "无法打开图库,请确认安装了图库浏览程序", Toast.LENGTH_LONG).show();
}
}
private void onActionTakePicture() {
try {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
File out = new File(getContext().getExternalCacheDir(), System.currentTimeMillis() + ".jpg");
takePickureUri = Uri.fromFile(out);
intent.putExtra(MediaStore.EXTRA_OUTPUT, takePickureUri);
((Activity) getContext()).startActivityForResult(intent, RequestCode_TakePhoto);
}
catch (Exception e) {
e.printStackTrace();
Toast.makeText(getContext(), "无法打开相机", Toast.LENGTH_LONG).show();
}
}
public boolean handleForRequestCode(int requestCode) {
return (RequestCode_TakePhoto == requestCode || requestCode == RequestCode_PickPhoto);
}
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if ((requestCode == RequestCode_TakePhoto) && (resultCode == Activity.RESULT_OK)) {
if (takePickureUri != null) {
Log.i(TAG, "拍照的照片路径 " + takePickureUri.getPath());
String picturePath = takePickureUri.getPath();
addImage(picturePath);
}
takePickureUri = null;
}
if ((requestCode == RequestCode_PickPhoto) && (resultCode == Activity.RESULT_OK)) {
if (data != null) {
String picturePath = HGUtils.parseFilePath(getContext(), data.getData());
if (!TextUtils.isEmpty(picturePath)) {
addImage(picturePath);
} else {
Toast.makeText(getContext(), "无法读取照片", Toast.LENGTH_LONG).show();
}
}
}
}
}
<file_sep>src = ../../Sources/gson-2.2.4-sources.jar<file_sep>package com.hg.android.ormlite.extra;
import java.util.HashMap;
import java.util.Map;
import android.database.ContentObservable;
import android.database.ContentObserver;
public class OrmLiteNotificationCenter {
private static OrmLiteNotificationCenter sInstance;
private final Map<Class<?>, ContentObservable> observables = new HashMap<Class<?>, ContentObservable>();
public static OrmLiteNotificationCenter sharedInstance() {
if (sInstance == null) {
sInstance = new OrmLiteNotificationCenter();
}
return sInstance;
}
public void registerContentObserver(Class<?> clazz, ContentObserver observer) {
synchronized (observables) {
ContentObservable observable = observables.get(clazz);
if (observable == null) {
observable = new ContentObservable();
observables.put(clazz, observable);
}
observable.registerObserver(observer);
}
}
public void unregisterContentObserver(Class<?> clazz, ContentObserver observer) {
synchronized (observables) {
ContentObservable observable = observables.get(clazz);
if (observable != null) {
observable.unregisterObserver(observer);
}
}
}
public void notifyChange(Class<?> clazz) {
synchronized (observables) {
ContentObservable observable = observables.get(clazz);
if (observable != null) {
observable.dispatchChange(false);
}
}
}
}
<file_sep>src = ../../Sources/photoView-sources.jar<file_sep>package com.hg.android.app;
import java.util.ArrayList;
import java.util.List;
import uk.co.senab.photoview.PhotoView;
import uk.co.senab.photoview.PhotoViewAttacher.OnViewTapListener;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v4.view.ViewPager.OnPageChangeListener;
import android.support.v7.app.ActionBarActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.ThreeParty.R;
import com.nostra13.universalimageloader.core.ImageLoader;
public class WebPictureBrowser extends ActionBarActivity {
public static final String IntentKey_Urls = "ImtentKey_Urls";
public static final String IntentKey_Index = "ImtentKey_Index";
public static final String IntentKey_Remark = "IntentKey_Remark";
public static final String TAG = "WebPictureBrowser";
private List<String> mImageUrls = new ArrayList<String>();
private int mImageIndex = -1;
private ViewPager mViewPager;
private TextView mTextView;
private MyAdapter adapter;
private OnPageChangeListener changeListener;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.hg_activity_webpicturebrowser);
mViewPager = (ViewPager) findViewById(R.id.viewPager);
mTextView = (TextView) findViewById(R.id.textView);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().hide();
Intent intent = getIntent();
if (intent != null) {
List<String> urls = (List<String>) intent.getSerializableExtra(IntentKey_Urls);
if (urls != null) {
for (String url : urls) {
mImageUrls.add(url);
}
}
if (mImageIndex == -1) {
mImageIndex = intent.getIntExtra(IntentKey_Index, 0);
}
mTextView.setText(intent.getStringExtra(IntentKey_Remark));
}
mImageIndex = mImageIndex < 0 ? 0 : mImageIndex;
mViewPager.setAdapter(adapter = new MyAdapter());
changeListener = new OnPageChangeListener() {
@Override
public void onPageSelected(int position) {
mImageIndex = position;
setTitle((position + 1) + "/" + mViewPager.getAdapter().getCount());
}
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {}
@Override
public void onPageScrollStateChanged(int state) {}
};
mViewPager.setOnPageChangeListener(changeListener);
mViewPager.setCurrentItem(mImageIndex);
changeListener.onPageSelected(mImageIndex);
}
@Override
protected void onDestroy() {
super.onDestroy();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
onBackPressed();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
private class MyAdapter extends PagerAdapter {
@Override
public int getCount() {
return mImageUrls == null ? 0 : mImageUrls.size();
}
@Override
public Object instantiateItem(ViewGroup container, final int position) {
final View view = View.inflate(WebPictureBrowser.this, R.layout.hg_photo_view, null);
PhotoView photoView = ((PhotoView) view.findViewById(R.id.photoView));
photoView.setOnViewTapListener(new OnViewTapListener() {
@Override
public void onViewTap(View view, float x, float y) {
if (getSupportActionBar().isShowing()) {
getSupportActionBar().hide();
} else {
getSupportActionBar().show();
}
}
});
container.addView(view);
view.setTag(Integer.valueOf(position));
ImageLoader.getInstance().displayImage(mImageUrls.get(position), photoView);
return view;
}
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
View view = (View) object;
PhotoView photoView = (PhotoView) view.findViewById(R.id.photoView);
if (photoView != null) {
photoView.setImageBitmap(null);
container.removeView(view);
if (((Integer) view.getTag()).intValue() != position) {
Log.e(TAG, "view.getTag() " + view.getTag() + " is not equal to position " + position);
}
}
}
@Override
public boolean isViewFromObject(View view, Object object) {
return view == object;
}
}
}
<file_sep>package com.hg.android.widget;
import java.util.List;
import android.annotation.SuppressLint;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.ImageView.ScaleType;
public class ImagesGridViewSpecialOne extends ImagesGridView {
int realNumColumns = 0;
public ImagesGridViewSpecialOne(Context context) {
super(context);
}
public ImagesGridViewSpecialOne(Context context, AttributeSet attrs) {
super(context, attrs);
}
@SuppressLint("NewApi")
public ImagesGridViewSpecialOne(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
protected void initSubviews(Context context) {
super.initSubviews(context);
}
@Override
public void setNumColumns(int numColumns) {
if (numColumns == -1) {
super.setNumColumns(1);
} else {
realNumColumns = numColumns;
super.setNumColumns(numColumns);
}
}
@Override
public ScaleType getScaleType() {
if (imagesCount() == 1) {
return ScaleType.CENTER_INSIDE;
} else {
return super.getScaleType();
}
}
@Override
public void setImageUrls(List<String> imageUrls) {
super.setImageUrls(imageUrls);
if (imagesCount() == 1) {
setNumColumns(-1);
} else {
setNumColumns(Math.max(3, realNumColumns));
}
}
}
<file_sep>package com.hg.android.ormlite.extra;
import java.sql.SQLException;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.LoaderManager;
import android.support.v4.app.LoaderManager.LoaderCallbacks;
import android.support.v4.content.Loader;
import com.hg.android.ormlite.extra.OrmLiteIteratorLoader.QuerySource;
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper;
import com.j256.ormlite.dao.CloseableIterator;
import com.j256.ormlite.stmt.QueryBuilder;
public abstract class OrmLiteIteratorAdapterExt<T> extends OrmLiteIteratorAdapter<T> {
public static int LoaderID = 65432176;
LoaderManager loaderManager;
public OrmLiteIteratorAdapterExt(Context context) {
super(context);
}
public void load(LoaderManager loaderManager, final Class<? extends OrmLiteSqliteOpenHelper> openHelperClass,
final Class<T> entityClass) {
this.loaderManager = loaderManager;
final QuerySource<T> querySource = new QuerySource<T>() {
@Override
public void query(QueryBuilder<T, ?> queryBuilder) throws Exception {
buildQueryBuilder(queryBuilder);
}
};
LoaderCallbacks<?> callbacks = new LoaderCallbacks<CloseableIterator<T>>() {
@Override
public Loader<CloseableIterator<T>> onCreateLoader(int id, Bundle args) {
return new OrmLiteIteratorLoader<T>(mContext, openHelperClass, querySource, entityClass);
}
@Override
public void onLoadFinished(Loader<CloseableIterator<T>> loader, CloseableIterator<T> data) {
changeIterator(data);
}
@Override
public void onLoaderReset(Loader<CloseableIterator<T>> loader) {
changeIterator(null);
}
};
loaderManager.initLoader(LoaderID, null, callbacks);
}
public void unload() {
changeIterator(null);
loaderManager.destroyLoader(LoaderID);
}
public abstract void buildQueryBuilder(QueryBuilder<T, ?> queryBuilder) throws SQLException;
}
<file_sep>src = ../../Sources/ormlite-android-4.48-sources.jar<file_sep>package com.hg.android.app;
import java.util.List;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import cn.trinea.android.view.autoscrollviewpager.AutoScrollViewPager;
import com.ThreeParty.R;
import com.viewpagerindicator.CirclePageIndicator;
/**
* ImagePagerFragment
*/
public class ImagePagerFragment extends Fragment {
private Context context;
private AutoScrollViewPager viewPager;
private CirclePageIndicator indicator;
private List<String> imageUrls;
public static Drawable ImagePlaceholder;
public static Drawable ImageFail;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
context = getActivity().getApplicationContext();
View v = inflater.inflate(R.layout.hg_fragment_autoimagepager, container, false);
viewPager = (AutoScrollViewPager) v.findViewById(R.id.viewPager);
indicator = (CirclePageIndicator) v.findViewById(R.id.indicator);
viewPager.setInterval(2000);
viewPager.setSlideBorderMode(AutoScrollViewPager.SLIDE_BORDER_MODE_TO_PARENT);
if (imageUrls != null) {
setImageUrls(imageUrls);
}
return v;
}
@Override
public void onActivityCreated(Bundle savedInstanceState)
{
super.onActivityCreated(savedInstanceState);
}
@Override
public void onStart() {
super.onStart();
}
@Override
public void onStop() {
super.onStop();
}
public List<String> getImageUrls() {
return imageUrls;
}
public void setImageUrls(List<String> imageUrls) {
this.imageUrls = imageUrls;
if (viewPager == null) {
return;
}
viewPager.setAdapter(new ImagePagerAdapter(context, imageUrls, ImagePlaceholder, ImageFail));
indicator.setViewPager(viewPager);
if (imageUrls != null && imageUrls.size() > 0) {
viewPager.startAutoScroll();
}
}
}
<file_sep>package com.hg.android.app;
import java.util.ArrayList;
import java.util.List;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.three.widget.RecyclingPagerAdapter;
public class ImagePagerAdapter extends RecyclingPagerAdapter {
private final Context context;
private final List<String> list;
private boolean isInfiniteLoop;
private final DisplayImageOptions options;
private OnImageClickListener imageClickListener;
public ImagePagerAdapter(Context context, List<String> list, Drawable placeholder, Drawable fail) {
this.context = context;
this.list = list == null ? new ArrayList<String>() : list;
isInfiniteLoop = false;
options = new DisplayImageOptions.Builder().showImageOnLoading(placeholder).showImageForEmptyUri(placeholder)
.showImageOnFail(fail).cacheInMemory(true).cacheOnDisk(true).considerExifParams(true)
.bitmapConfig(Bitmap.Config.RGB_565).build();
}
@Override
public int getCount() {
// TODO Auto-generated method stub
return isInfiniteLoop ? Integer.MAX_VALUE : list.size();
}
private int getPosition(int position) {
return isInfiniteLoop ? position % (list.size()) : position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
ImageView imageView = new ImageView(context);
imageView.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
imageView.setScaleType(ScaleType.FIT_XY);
convertView = imageView;
imageView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
if (imageClickListener != null) {
imageClickListener.onClick((Integer) arg0.getTag());
}
}
});
}
convertView.setTag(position);
ImageLoader.getInstance().displayImage(list.get(getPosition(position)), (ImageView) convertView, options);
return convertView;
}
/**
* @return the isInfiniteLoop
*/
public boolean isInfiniteLoop() {
return isInfiniteLoop;
}
/**
* @param isInfiniteLoop
* the isInfiniteLoop to set
*/
public ImagePagerAdapter setInfiniteLoop(boolean isInfiniteLoop) {
this.isInfiniteLoop = isInfiniteLoop;
return this;
}
public void setOnImageClickListener(OnImageClickListener imageClickListener) {
this.imageClickListener = imageClickListener;
}
public interface OnImageClickListener {
public void onClick(int position);
}
}
<file_sep>package com.hg.android.app;
import java.util.ArrayList;
import java.util.List;
import uk.co.senab.photoview.PhotoView;
import uk.co.senab.photoview.PhotoViewAttacher.OnViewTapListener;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v4.view.ViewPager.OnPageChangeListener;
import android.support.v7.app.ActionBarActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import com.ThreeParty.R;
import com.nostra13.universalimageloader.core.ImageLoader;
public class LocalPictureBrowser extends ActionBarActivity {
public static final String BroadcastAction_Delete = "LocalPictureBrowser.BroadcastAction_Delete";
public static final String ImtentKey_Urls = "ImtentKey_Urls";
public static final String ImtentKey_Index = "ImtentKey_Index";
public static final String ImtentKey_TAG = "ImtentKey_TAG";
public static final String TAG = "LocalPictureBrowser";
private List<String> mImageUrls = new ArrayList<String>();
private int mImageIndex = -1;
private String tag;
private ViewPager mViewPager;
private MyAdapter adapter;
private OnPageChangeListener changeListener;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mViewPager = new HackyViewPager(this);
mViewPager.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
setContentView(mViewPager);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
// getSupportActionBar().hide();
Intent intent = getIntent();
if (intent != null) {
tag = intent.getStringExtra(ImtentKey_TAG);
String[] urls = intent.getStringArrayExtra(ImtentKey_Urls);
for (String url : urls) {
if (!url.startsWith("file:")) {
mImageUrls.add("file://" + url);
} else {
mImageUrls.add(url);
}
}
if (mImageIndex == -1) {
mImageIndex = intent.getIntExtra(ImtentKey_Index, 0);
}
}
mImageIndex = mImageIndex < 0 ? 0 : mImageIndex;
mViewPager.setAdapter(adapter = new MyAdapter());
changeListener = new OnPageChangeListener() {
@Override
public void onPageSelected(int position) {
mImageIndex = position;
setTitle((position + 1) + "/" + mViewPager.getAdapter().getCount());
}
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {}
@Override
public void onPageScrollStateChanged(int state) {}
};
mViewPager.setOnPageChangeListener(changeListener);
mViewPager.setCurrentItem(mImageIndex);
changeListener.onPageSelected(mImageIndex);
}
@Override
protected void onDestroy() {
super.onDestroy();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.hg_localpicturebrowser, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
onBackPressed();
} else if (item.getItemId() == R.id.hg_action_trash) {
mImageUrls.remove(mImageIndex);
mViewPager.setAdapter(adapter = new MyAdapter());
Intent intent = new Intent(BroadcastAction_Delete);
intent.putExtra(ImtentKey_Index, mImageIndex);
if (tag != null) {
intent.putExtra(ImtentKey_TAG, tag);
}
sendBroadcast(intent);
if (mImageIndex >= mImageUrls.size()) {
mImageIndex = mImageUrls.size() - 1;
}
if (mImageIndex < 0) {
finish();
}
changeListener.onPageSelected(mImageIndex);
return true;
}
return super.onOptionsItemSelected(item);
}
private class MyAdapter extends PagerAdapter {
@Override
public int getCount() {
return mImageUrls == null ? 0 : mImageUrls.size();
}
@Override
public Object instantiateItem(ViewGroup container, final int position) {
final View view = View.inflate(LocalPictureBrowser.this, R.layout.hg_photo_view, null);
PhotoView photoView = ((PhotoView) view.findViewById(R.id.photoView));
photoView.setOnViewTapListener(new OnViewTapListener() {
@Override
public void onViewTap(View view, float x, float y) {
// if (getSupportActionBar().isShowing()) {
// getSupportActionBar().hide();
// } else {
// getSupportActionBar().show();
// }
}
});
container.addView(view);
view.setTag(Integer.valueOf(position));
ImageLoader.getInstance().displayImage(mImageUrls.get(position), photoView);
return view;
}
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
View view = (View) object;
PhotoView photoView = (PhotoView) view.findViewById(R.id.photoView);
if (photoView != null) {
photoView.setImageBitmap(null);
container.removeView(view);
if (((Integer) view.getTag()).intValue() != position) {
Log.e(TAG, "view.getTag() " + view.getTag() + " is not equal to position " + position);
}
}
}
@Override
public boolean isViewFromObject(View view, Object object) {
return view == object;
}
}
}
<file_sep>package com.hg.android.entitycache;
import com.j256.ormlite.field.DatabaseField;
@SuppressWarnings("serial")
public abstract class CacheEntityWithSpecifiedId<BeanType> extends BaseCacheEntity<BeanType> {
@DatabaseField(id = true, columnName = "ID")
public String ID;
@Override
public void setBean(BeanType bean) {
super.setBean(bean);
setID(generateID(bean));
}
protected abstract String generateID(BeanType bean);
public String getID() {
return ID;
}
public void setID(String ID) {
this.ID = ID;
}
}
<file_sep>package com.hg.android.utils;
import android.support.v4.util.LruCache;
import android.util.Log;
/**
* Basic LRU Memory cache.
*
* @author <NAME>
*
*/
public class BitmapLruImageCache extends LruCache<String, SafeBitmap> {
private final String TAG = this.getClass().getSimpleName();
public BitmapLruImageCache(int maxSize) {
super(maxSize);
}
@Override
protected int sizeOf(String key, SafeBitmap value) {
return value.get().getRowBytes() * value.get().getHeight();
}
public void safePut(String url, SafeBitmap bitmap) {
Log.v(TAG, "Added item to Mem Cache");
bitmap.retain();
put(url, bitmap);
}
@Override
protected void entryRemoved(boolean evicted, String key, SafeBitmap oldValue, SafeBitmap newValue) {
super.entryRemoved(evicted, key, oldValue, newValue);
if (oldValue != null) {
oldValue.release();
}
}
}
|
a1cdca14f3a6bd9eed44ba134ac91c9354170346
|
[
"Java",
"INI"
] | 14
|
INI
|
wangzhongli/commen
|
a25aeec24982963df0844071a54408eb3feb80b1
|
60e93969596da1a42bbf93974c9cbd9059bcf852
|
refs/heads/master
|
<repo_name>andriy5/MVC_PiePHP<file_sep>/src/Controller/AppController.php
<?php
class AppController extends Controller{
public function indexAction() {
echo "** indexAction appelé via AppController **\n";
}
}
<file_sep>/src/routes.php
<?php
// Routage parametrique
Router::connect("user/{id}", ["controller" => "user", "action" => "show"]);
Router::connect("test/test", ["controller" => "user", "action" => "index"]);
Router::connect("user/wesh", ["controller" => "user", "action" => "add"]);
Router::connect("user/wesh/", ["controller" => "user", "action" => "add"]);
Router::connect ('', ['controller' => 'app', 'action' => 'index']);
Router::connect ('register', ['controller' => 'user', 'action' => 'add']);
Router::connect ('register/', ['controller' => 'user', 'action' => 'add']);
<file_sep>/Core/Request.php
<?php
namespace Core;
class Request
{
public function clean(){
foreach ($_POST as $key => $value) {
// $newvalue = trim($value);
$newvalue = htmlspecialchars(stripslashes(trim($value)));
$_POST[$key] = $newvalue;
}
foreach ($_GET as $key => $value) {
// $newvalue = trim($value);
$newvalue = htmlspecialchars(stripslashes(trim($value)));
$_GET[$key] = $newvalue;
}
}
public function getQueryParams(){
echo "✔ getQueryParams()\n";
// var_dump($_REQUEST);
return $_REQUEST;
}
}<file_sep>/src/View/index.php
<!DOCTYPE html>
<html lang ="en">
<head>
<meta charset ="UTF-8" />
<meta name = "viewport" content="width = device-width, user-scalable=no, initial-scale =1.0, maximum-scale =1.0, minimum-scale=1.0" />
<meta http-equiv ="X-UA-Compatible" content ="ie=edge" />
<title>Pie PHP Layout</title>
</head>
<body>
<?=$view ?>
</body>
</html><file_sep>/src/Model/ArticleModel.php
<?php
class ArticleModel extends Entity
{
public $relations = [
"has many" => [["table" => "comments", "key" => "article_id"]],
"has one" => [["table_ref" => "users" , "table" => "articles", "key" => "user_id"]],
"many to many" => [["name" => "tags", "table" => "articles_tags", "key1" => "article_id", "key2" => "tag_id"]]
];
// public $relations = null;
}<file_sep>/Core/Router.php
<?php
class Router
{
private static $routes;
public static function connect($url, $route)
{
// echo "function connect du Router appelé\n";
self::$routes[$url] = $route;
}
public static function get($url)
{
// echo "function get du Router appelé\n";
return array_key_exists($url, self::$routes) ? self::$routes[$url] : null;
}
public static function getRoute($url)
{
return self::$routes[$url];
}
public static function check($url) {
foreach (self::$routes as $key => $value) {
$route = explode('/', $key);
// var_dump($route);
foreach ($route as $skey => $svalue) {
// echo $svalue.PHP_EOL;
if ($svalue == "{id}") {
// echo "⭐ ". $skey. PHP_EOL;
$i = $skey;
$explode = explode('/', $url);
// var_dump($explode);
// echo "URL -> $url".PHP_EOL;
// echo $explode[$i].PHP_EOL;
return ["check" => true, "value_from" => $explode[$i], "value_to" => $svalue , "position" => $i];
}
}
}
}
}
<file_sep>/Core/ORM.php
<?php
// namespace Core;
// use Database;
Class ORM
{
// public function __construct()
// {
// // require_once("Database.php");
// }
public static function create ($table, $fields) {
// Retourne un id
$db = new Database();
$sth = $db->connect();
$array = [];
$champs = "(id, ";
$values = "(NULL, ";
// echo "field :";
// var_dump($fields);
foreach ($fields as $key => $value) {
if ($key == "password") {
$key = "pass";
}
$champs .= $key . ", ";
array_push($array, $value);
// echo $key . "\n";
}
$champs = substr($champs, 0, -2);
$champs .= ")";
// echo $champs . "\n";
for ($i=1; $i<=count($fields); $i++) {
if ($i < count($fields)) {
$values .= "?, ";
}
else {
$values .= "?)";
}
}
// echo $values;
// var_dump($array);
$q = $sth->prepare("INSERT INTO $table $champs VALUES $values;");
$q->execute($array);
$j = $sth->prepare("SELECT max(id) as result from $table;");
// $j->execute($arraybis);
$j->execute();
$results = $j->fetch();
// echo $results[0];
return $results["result"];
}
public static function read ($table, $id=null, $search="id", $position=null) {
// Retourne un tab. assoc. de l' enregistrement
// echo "🚨🚨 Lancement ORM::Read($table - $id - $search - $position)". PHP_EOL;
$db = new Database();
$sth = $db->connect();
$array = [$id];
$q = $sth->prepare("SELECT * FROM $table where $search = ?");
$q->execute($array);
if ($position == null) {
$results = $q->fetch(PDO::FETCH_ASSOC);
// echo "⭐ results if:";
// var_dump($results);
return $results;
}
elseif ($position == "all") {
$results = $q->fetchAll(PDO::FETCH_ASSOC);
// echo "⭐ results for all:";
// var_dump($results);
return $results;
}
else {
$results = $q->fetchAll(PDO::FETCH_ASSOC);
// echo "⭐ results else:";
// var_dump($results);
return $results[$position];
}
}
public static function update ($table, $id, $fields) {
// Retourne un boolean
$db = new Database();
$sth = $db->connect();
$check_array = [];
foreach ($fields as $key => $value) {
if ($key == "password") {
$key = "pass";
}
$j = $sth->prepare("UPDATE $table SET $key = ? WHERE id = ?;");
array_push($check_array, $j->execute(array($value, $id)));
}
foreach ($check_array as $val) {
if ($val == false){
return false;
}
}
return true;
}
public static function delete ($table, $id=null) {
// Retourne un boolean
$db = new Database();
$sth = $db->connect();
$array = [$id];
$q = $sth->prepare("DELETE FROM $table WHERE id = ?;");
return $q->execute($array);
}
public static function find ($table, $params = array ('WHERE' => '1', 'ORDER BY' => 'id ASC', 'LIMIT' => '')) {
// Retourne un tableau d'enregistrements
$db = new Database();
$sth = $db->connect();
if ($params["ORDER BY"] == null){
$params["ORDER BY"] = "id ASC";
}
if ($params["LIMIT"] == ""){
$array = [$params["WHERE"], $params["ORDER BY"]];
$q = $sth->prepare("SELECT * from $table WHERE id = ? ORDER BY ?");
$q->execute($array);
$results = $q->fetchAll(PDO::FETCH_ASSOC);
return $results;
}
else {
$array = [$params["WHERE"], $params["ORDER BY"], $params["LIMIT"]];
$q = $sth->prepare("SELECT * from $table WHERE id = ? ORDER BY ? LIMIT ?");
$q->execute($array);
$results = $q->fetchAll(PDO::FETCH_ASSOC);
return $results;
}
}
}
<file_sep>/Core/Core.php
<?php
namespace Core;
use Router;
class Core
{
public function __construct()
{
require_once("src/routes.php");
}
public function run()
{
// echo "✔ " . __CLASS__ . " [OK]" . PHP_EOL;
// echo $_SERVER["REDIRECT_URL"] . PHP_EOL;
// var_dump(Router::$routes);
$path = explode("/", $_SERVER["REDIRECT_URL"]);
array_shift($path);
array_shift($path);
$path = implode("/", $path);
// //STATIQUE
if (($route = Router::get($path)) != null) {
// echo "RENTRE DANS LE STATIQUE\n";
$get = Router::getRoute($path);
print_r($get);
$controller = ucfirst($get["controller"]) . "Controller";
$action = $get["action"] . "Action";
$newcontroller = new $controller();
$newcontroller->$action();
} else {
// echo "RENTRE DANS LA DYNAMIQUE\n";
$check = Router::check($path);
// var_dump($check);
if ($check["check"] == true && is_numeric($check["value_from"])) {
$path = str_replace($check["value_from"], $check["value_to"], $path);
// echo $path. PHP_EOL;
$get = Router::getRoute($path);
// print_r($get);
$controller = ucfirst($get["controller"]) . "Controller";
$action = $get["action"] . "Action";
$newcontroller = new $controller();
$newcontroller->$action($check["value_from"]);
}
else {
$arr = explode('/', $_SERVER["REDIRECT_URL"]);
// var_dump($arr);
if (!empty($arr[2])) {
$controller = ucfirst($arr[2]) . "Controller";
} else {
// echo "controller empty bro\n";
$controller = "AppController";
}
if (!empty($arr[3])) {
$action = $arr[3] . "Action";
} else {
// echo "action empty bro\n";
$action = "indexAction";
}
// echo $controller . "->" . $action . PHP_EOL;
if (class_exists($controller)) {
$newcontroller = new $controller();
if (method_exists($newcontroller, $action)) {
$newcontroller->$action();
// $view = "login";
// $newcontroller->render($view);
} else {
echo "404";
}
} else {
echo "404";
}
}
}
}
}
<file_sep>/src/Controller/UserController.php
<?php
// use Core\ORM;
class UserController extends Controller
{
public function addAction()
{
$this->render("register");
}
public function indexAction()
{
$this->render("index");
}
public function registerAction()
{
echo "✔ Rentre dans le registerAction\n";
// Instance UserModel
// $obj = new UserModel($_POST["email"], $_POST["password"]);
// Récup. la requête POST
// $postemail = $_POST["email"];
// $postpassword = $_POST["password"];
// $obj->email = $_POST["email"];
// $obj->password = $_POST["password"];
// Mettre a jour les attr. du model
// $obj->email = $postemail;
// $obj->password = $<PASSWORD>;
// Appellez méthode save()
// $obj->save();
// ORM::create('users', array("email" => $_POST["email"], "pass" => $_POST["password"]));
// ORM::create('articles', array ('titre' => "un super titre", 'content' => 'et voici une super article de blog', 'author' => 'Rodrigue'));
// ORM::read('users', 65);
// ORM::update('users', 65, ["email" => "Balkany4", "password" => "bg4"]);
// ORM::update('users', 65, ["email" => "Balkany4", "password" => "bg4"]);
// ORM::delete('users', 64);
// ORM::find('users', ["WHERE" => 65]);
// $obj->read(65);
// $obj->update(48, "testupdate", "mdp");
// $obj->delete(47);
// $obj->read_all();
// var_dump($_REQUEST);
$params = $this->request->getQueryParams();
// $params = ["id" => 108];
$user = new UserModel($params);
if (!$user->id) {
$user->save();
self::$_render = "Votre compte a ete cree. 👏" . PHP_EOL;
}
echo self::$_render;
}
public function detailsAction ()
{
$user = new UserModel(["id" => 6]);
echo PHP_EOL.PHP_EOL."🏆 RESULT (detailsAction):";
// var_dump($user);
var_dump($user->articles[0]);
// var_dump($user->comments);
}
public function showAction($id) {
echo "ID de l'utilisateur a afficher : $id" . PHP_EOL;
}
}
<file_sep>/src/Model/TagModel.php
<?php
class TagModel extends Entity
{
// public $relations = [
// "has many" => [["table" => "articles", "key" => "user_id"]],
// "has one" => [],
// "many to many" => []
// ];
public $relations = null;
}<file_sep>/Core/Database.php
<?php
class Database
{
private $dsn = 'mysql:host=localhost;dbname=PiePHP';
private $username = 'root';
private $password = '';
function connect() {
try {
$db = new PDO($this->dsn, $this->username);
$db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
// print_r("✔ Connection PDO established: You're good man !\n");
return $db;
} catch (PDOException $e) {
die( 'Query failed: ' . $e->getMessage() );
}
}
}
<file_sep>/index.php
<pre>
<?php
define('BASE_URI', __DIR__ . DIRECTORY_SEPARATOR);
require_once(implode(DIRECTORY_SEPARATOR, ['Core', 'autoload.php']));
$app = new Core\Core();
$app->run();
// echo BASE_URI . "<br>";<file_sep>/Core/autoload.php
<?php
spl_autoload_register(function ($class) {
// echo PHP_EOL . PHP_EOL . "autoload ==>" . $class . PHP_EOL;
// $path = str_replace('\\', '/', ("Core/$class.php"));
// if (!file_exists($path)){
// $path = str_replace('\\', '/', ("src/Controller/$class.php"));
// // echo $path . PHP_EOL;
// if (!file_exists($path)){
// $path = str_replace('\\', '/', ("$class.php"));
// if (file_exists($path)){
// echo $path . PHP_EOL;
// include $path;
// }
// }
// else {
// echo $path . PHP_EOL;
// include $path;
// }
// }
// else {
// echo $path . PHP_EOL;
// include $path;
// }
/* AVEC UN TABLEAU */
$array = [
"Core/",
"src/Controller/",
"",
"src/",
"src/Model/"
];
for ($i=0; $i < count($array); $i++){
$path = str_replace('\\', '/', ("{$array[$i]}{$class}.php"));
if (file_exists($path)){
// echo $path . PHP_EOL;
include $path;
}
}
});
<file_sep>/Core/Controller.php
<?php
use Core\Request;
class Controller
{
public static $_render;
public function __construct(){
// require_once("Request.php");
$this->request = new Request();
$this->request->clean();
}
protected function render($view, $scope = []) {
extract($scope);
$f = implode (DIRECTORY_SEPARATOR, [dirname ( __DIR__ ), 'src', 'View', str_replace ('Controller' , '', basename (get_class($this))), $view ]) . '.php';
// echo $f;
if (file_exists ($f)) {
ob_start ();
include ($f);
$view = ob_get_clean ();
ob_start ();
include (implode ( DIRECTORY_SEPARATOR, [dirname ( __DIR__ ), 'src', 'View', 'index']) . '.php');
self::$_render = ob_get_clean();
echo self::$_render;
}
}
}
<file_sep>/Core/Entity.php
<?php
class Entity
{
public function __construct($params=null, $condition=null, $position=null) {
// echo "🚨🚨 Lancement Construct". PHP_EOL;
// Check si "id" daans $params, si oui return un array avec toutes les infos de cette id
if (array_key_exists("id", $params)) {
$table = get_class($this);
$table = str_replace("Model", "s", $table);
$table = strtolower($table);
// echo '✔ Key id exists on $params' . PHP_EOL;
if ($condition == null){
$params = ORM::read($table, $params["id"]);
}
else {
$params = ORM::read($table, $params["id"], $condition, $position);
}
// var_dump($params);
} else {
// echo '✖ Key id doesn\'t exists on $params' . PHP_EOL;
}
// echo "🛎 $table".PHP_EOL;
// Cree les attributs si $params a bien recup un tableau precedement
if ($params != false) {
foreach ($params as $key => $value) {
$this->$key = $value;
}
}
// echo "condition: $condition" . PHP_EOL;
// Relation entres les modeles
if ($this->relations) {
$relations = $this->relations;
// echo "relation:";
// var_dump($relations["has many"]);
foreach ($relations as $rkey => $rvalue) {
if ($rkey == "has many"){
foreach ($relations["has many"] as $hasmany_arrays) {
// echo " foreach\n";
// var_dump($hasmany_arrays);
// Definis mes var. values + column
$value = $hasmany_arrays["table"];
$column = $hasmany_arrays['key'];
// Donne la var count (pour ensuite creer chaque model)
// $result = ORM::read($value, $params["id"], $column, "all");
// echo "⭐ result:";
// var_dump($result);
$count = count(ORM::read($value, $params["id"], $column, "all"));
// echo "📌 count = $count" .PHP_EOL;
// Definis $model
$model = ucfirst($value);
$model = substr($model, 0, -1);
$model .= "Model";
// echo '$model = ' . $model . PHP_EOL;
// echo '$column = ' . $column . PHP_EOL . "--".PHP_EOL;
// Creer chaque model
if ($count > 0) {
for ($i=0; $i < $count; $i++) {
// echo PHP_EOL . "---- FIN du construct ----".PHP_EOL.PHP_EOL.PHP_EOL;
$this->$value[$i] = new $model(["id" => $this->id], $column, $i);
}
}
}
}
// elseif ($rkey == "has one") {
// foreach ($relations["has one"] as $hasone_arrays) {
// // echo " foreach\n";
// // var_dump($hasone_arrays);
// // Definis mes var. values + column
// $name = $hasone_arrays["table_ref"];
// $value = $hasone_arrays["table"];
// $column = $hasone_arrays['key'];
// // Donne la var count (pour ensuite creer chaque model)
// echo PHP_EOL.'$value = ' . $value . PHP_EOL;
// echo '$params[id] = ' . $params["id"] . PHP_EOL;
// echo '$column = ' . $column . PHP_EOL;
// $count = ORM::read($value, $params["id"], $column, null);
// var_dump($count);
// // Definis $model
// $model = ucfirst($name);
// $model = substr($model, 0, -1);
// $model .= "Model";
// echo '$model = ' . $model . PHP_EOL;
// echo '$this->id = ' .$this->id.PHP_EOL;
// // echo '$column = ' . $column . PHP_EOL . "--".PHP_EOL;
// // Creer chaque model
// // $this->$name = new $model(["id" => $this->id]);
// $this->$name = "test";
// }
// }
elseif ($rkey == "many to many") {
// echo "many to many\n";
foreach ($relations["many to many"] as $hasmany_arrays) {
// echo " foreach\n";
var_dump($hasmany_arrays);
// $this->$name = new $model(["id" => $this->id]);
}
}
}
// foreach ($relations["has many"] as $hasmany_arrays) {
// // echo " foreach\n";
// // var_dump($hasmany_arrays);
// // Definis mes var. values + column
// $value = $hasmany_arrays["table"];
// $column = $hasmany_arrays['key'];
// // Donne la var count (pour ensuite creer chaque model)
// // $result = ORM::read($value, $params["id"], $column, "all");
// // echo "⭐ result:";
// // var_dump($result);
// $count = count(ORM::read($value, $params["id"], $column, "all"));
// // echo "📌 count = $count" .PHP_EOL;
// // Definis $model
// $model = ucfirst($value);
// $model = substr($model, 0, -1);
// $model .= "Model";
// // echo '$model = ' . $model . PHP_EOL;
// // echo '$column = ' . $column . PHP_EOL . "--".PHP_EOL;
// // Creer chaque model
// if ($count > 0) {
// for ($i=0; $i < $count; $i++) {
// // echo PHP_EOL . "---- FIN du construct ----".PHP_EOL.PHP_EOL.PHP_EOL;
// $this->$value[$i] = new $model(["id" => $this->id], $column, $i);
// }
// }
// }
}
// echo '$value = ' . $value . PHP_EOL;
// echo '$i = ' . $i . PHP_EOL;
}
public function save() {
$table = get_class($this);
$table = str_replace("Model", "s", $table);
$table = strtolower($table);
// echo $table . PHP_EOL;
$arr = (array)$this;
// var_dump($arr);
$query = ORM::create($table, $arr);
if ($query == true){
echo "✔ Save with success 👍";
}
}
//create (créé une nouvelle entrée en base avec les champs passés en paramètres et retourne son id)
public function create($array =[null, null]) {
// $db = new Database();
// $sth = $db->connect();
// // Ajoute un enregistrement en BDD avec les attributs du model
// // $db->connect();
// // $array = [$this->email, $this->password];
// $q = $sth->prepare("INSERT INTO `users` (`id`, `email`, `pass`) VALUES (NULL, ?, ?);");
// $q->execute($array);
// $j = $sth->prepare("SELECT max(id) from users;");
// $j->execute();
// $results = $j->fetch(PDO::FETCH_NUM);
// return $results;
$table = get_class($this);
$table = str_replace("Model", "s", $table);
$table = strtolower($table);
// echo $table . PHP_EOL;
$arr = (array)$this;
// var_dump($arr);
$query = ORM::create($table, $arr);
if ($query == true){
echo "✔ Create with success 👍";
}
}
// read (récupère une entrée en base suivant l’id de l’user)
public function read($id) {
// $db = new Database();
// $sth = $db->connect();
// // Ajoute un enregistrement en BDD avec les attributs du model
// // $db->connect();
// $j = $sth->prepare("SELECT * from users where id = ?;");
// $j->execute(array($id));
// // $results = $j->fetchAll(PDO::FETCH_NUM);
// // var_dump($results);
$table = get_class($this);
$table = str_replace("Model", "s", $table);
$table = strtolower($table);
// echo $table . PHP_EOL;
$query = ORM::read($table, $id);
if ($query == true){
echo "✔ Read with success 👍";
}
}
//update (met à jour les champs d’une entrée en base suivant l’id de l’user)
public function update($id, $email, $password) {
// $db = new Database();
// $sth = $db->connect();
// $j = $sth->prepare("UPDATE users SET email = ?, pass = ? WHERE id = ?;");
// $j->execute(array($email, $password, $id));
$table = get_class($this);
$table = str_replace("Model", "s", $table);
$table = strtolower($table);
// echo $table . PHP_EOL;
$arr = (array)$this;
// var_dump($arr);
$fields = ["email" => $email, "pass" => $password];
$query = ORM::update($table, $id, $fields);
if ($query == true){
echo "✔ Update with success 👍";
}
}
// delete (supprime une entrée en base suivant l’id de l’user)
public function delete($id) {
// $db = new Database();
// $sth = $db->connect();
// $j = $sth->prepare("DELETE FROM users WHERE id= ?;");
// $j->execute(array($id));
$table = get_class($this);
$table = str_replace("Model", "s", $table);
$table = strtolower($table);
// echo $table . PHP_EOL;
$query = ORM::delete($table, $id);
if ($query == true){
echo "✔ Delete with success 👍";
}
}
// read_all (récupère toutes les entrées de la table user)
public function read_all() {
$db = new Database();
$sth = $db->connect();
$j = $sth->prepare("SELECT * from users");
$j->execute();
$results = $j->fetchAll(PDO::FETCH_NUM);
var_dump($results);
}
}
|
045bab49e7f7149f76fd27f9838616eb77dfd37c
|
[
"PHP"
] | 15
|
PHP
|
andriy5/MVC_PiePHP
|
6d3d2f744741525166dad92b156a6635ac32c04f
|
5d0ac3854a7eafd532354678886d9c0beb006bf9
|
refs/heads/master
|
<file_sep>import firebase from 'firebase/app';
import 'firebase/firestore';
import 'firebase/auth';
var firebaseConfig = {
apiKey: "<KEY>",
authDomain: "tennis-app-36b3c.firebaseapp.com",
databaseURL: "https://tennis-app-36b3c.firebaseio.com",
projectId: "tennis-app-36b3c",
storageBucket: "",
messagingSenderId: "618706206867",
appId: "1:618706206867:web:1b050cc06bdfe949"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
firebase.firestore().settings({});
export default firebase;<file_sep>import React from 'react';
import { connect } from 'react-redux';
import { firestoreConnect } from 'react-redux-firebase';
import { compose } from 'redux';
import { Redirect, NavLink } from 'react-router-dom';
import moment from 'moment';
const PostDetails = (props) => {
const { post, auth, profile } = props;
console.log('PostDetails props', props);
if (!auth.uid) return <Redirect to='/signin' />
if (post) {
return (
<div className="container section post-details">
<div className="card z-depth-0">
<span>
<NavLink to='/'>
<i className="material-icons small back-arrow">keyboard_backspace</i>
</NavLink>
</span>
<div className="card-content break-word">
<span className="card-title">{post.title}</span>
<p>{post.content}</p>
</div>
<div className="card-action grey lighten-4 grey-text">
<div>{post.authorFirstName} {post.authorLastName} - {profile.ntrpLevel} NTRP - Phone: {profile.phoneNumber} - Email: {profile.email}</div>
<div>{moment(post.createdAt.toDate()).calendar()}</div>
</div>
</div>
</div>
)
} else {
return (
<div className="container center">
<p>Loading project...</p>
</div>
)
}
}
const mapStateToProps = (state, ownProps) => {
const id = ownProps.match.params.id;
const posts = state.firestore.data.posts;
const post = posts ? posts[id] : null;
return {
post: post,
auth: state.firebase.auth,
profile: state.firebase.profile
}
}
export default compose(
connect(mapStateToProps),
firestoreConnect([
{ collection: 'posts' }
])
)(PostDetails)
|
3154af56d7540e76357cdb9a6f9faa24bf982a50
|
[
"JavaScript"
] | 2
|
JavaScript
|
DaCastle/tennis-app
|
ee9d1110d6ac46d653a26f482105e84b5aa4ddcd
|
07e7b93d61b5f35165b213dcde335a45f4d78837
|
refs/heads/master
|
<repo_name>spooon1993/kahoot-project<file_sep>/server/db.js
const mongoose = require('mongoose');
const connectDB = () => {
return mongoose.connect('mongodb://admin:<EMAIL>:49079/kahoot');
};
mongoose.connection.on('error', (e) => {
console.log('CHECK YOUR DATABASE!');
console.log(e);
});
mongoose.connection.once('open', () => {
console.log('DB IS STARTED!');
});
module.exports = connectDB;
<file_sep>/client/src/components/Timer/Timer.js
import React, {Component} from "react";
import { PropTypes } from "prop-types";
import './Timer.css';
import styled from 'styled-components';
const LineBox = styled.div`
display: ${props => props.visible ? 'block' : 'none'}
transition: 1500ms;
width: ${props => props.width}%;
height: 10px;
background-color: #ff9dbf;
`;
export default class Timer extends Component {
static defaultProps = {
seconds: 50,
paused: false,
reverse: true,
setPoused: () => {},
setStop: () => {},
};
state = {
seconds: 50,
paused: false,
reverse: true,
initialTime: this.initialTime
};
setPoused = () =>{
this.state.paused = !this.state.paused;
if (this.state.paused === false) {
this.startTimer()
} else {clearInterval(this.interval)}
};
setStop = () => {
this.setState(() => {
let seconds = 0;
return {seconds};
});
clearInterval(this.interval);
console.log(this.state.seconds);
};
startTimer = () => {
this.interval = setInterval (() => {
this.setState(() => {
let seconds = this.state.seconds;
this.state.reverse ? seconds-- : seconds++;
if ( this.state.seconds === 0){
this.setStop();
}
return {seconds};
})
}, 1000);
};
componentDidMount(){
this.startTimer();
// console.log(this.interval);
this.initialTime = this.state.seconds;
};
componentWillUnmount(){
clearInterval(this.interval)
};
render(){
let seconds = this.state.seconds;
return (
<div>
<div className="timerBox" style={{fontSize: "64px"}}>
{/*<p style={{fontSize: "20px", marginRight: "40px"}}>Time left</p>*/}
{/*<span className="minutes">{*/}
{/*(seconds/60 < 10) ? "0" + Math.floor(seconds/60) : Math.floor(seconds/60)*/}
{/*}</span>*/}
{/*:*/}
<span className="seconds">{
(seconds%60 < 10) ? "0" + (seconds%60) : (seconds%60)
}</span>
{/*<div onClick={this.setPoused} className="timerPause" />*/}
{/*<div onClick={this.setStop} className="timerStop" />*/}
</div>
<LineBox width={ (this.state.seconds/this.initialTime)*100 } visible={this.state.reverse}/>
</div>
)
}
}<file_sep>/server/models/games.js
const mongoose = require('mongoose');
const gamesSchema = mongoose.Schema({
id: {
type: String,
},
description: {
type: String,
},
games: [],
// questions: [{
// questionText: {},
// answers: [{type: Object}]
// }]
// questions: [{
// question_id: {
// type: String
// },
// question: [{
// type: String
// }],
// time: Number,
// answers: [{
// answer: String,
// correct: Boolean
// }]
// }]
});
module.exports = mongoose.model('Games', gamesSchema);
<file_sep>/client/src/components/PendingRoom/UserList.js
import React, {Component} from 'react';
const UserList = (props) => {
return (
<li className=''>{props.state.}</li>
)
};
export default Post;<file_sep>/client/src/components/Common/index.js
import React, {Component} from 'react';
import ResultPage from '../resultPage';
import TestingPage from '../users_testing_page';
import PedingRoom from '../PendingRoom';
import socket from 'socket.io-client';
import {connect} from 'react-redux';
class Common extends Component {
state = {
compVisible: "w1"
};
componentWillMount(){
const {nickName} = this.props;
window.socket = socket({
path: "/room/",
query: {
name: nickName,
roomID: this.props.roomID
}
});
}
componentWillUnmount(){
// disconnect socket
}
render(){
return(
<div>{
this.state.compVisible==="w1"? <PedingRoom/> : ""
}
{
this.state.compVisible==="w2"? <TestingPage/> : ""
}
{
this.state.compVisible==="w3"? <ResultPage/> : ""
}
</div>
)
}
}
const mapStateToProps = (state) => {
return {
nickName: state.currentUser.nickName,
roomID: state.currentUser.roomID
}
};
export default connect(mapStateToProps, null)(Common);
// export default Common;<file_sep>/client/src/components/store/currentUser.js
const initialState = {
nickName: '',
};
export default (state = initialState, action) => {
switch (action.type) {
case 'USER_CHANGE_NAME': {
return {...state, nickName: action.nickName}
}
case 'ADD_NEW_ROOMID': {
return {...state, roomID: action.roomID}
}
default : {
return state
}
}
}
<file_sep>/server/app.js
const cors = require('cors');
const bodyParser = require('body-parser');
const express = require('express');
const http = require('http');
const socket = require('socket.io');
const connectDB = require('./db');
const usersRoute = require('./routes/users');
const authRoute = require('./routes/auth');
const gameRoute = require('./routes/games');
const gameRoom = require('./routes/rooms');
const room = require('./controllers/room.socket');
const { PORT = 9999 } = process.env;
const app = express();
const server = http.Server(app);
const io = socket(server, {
path: '/room/',
});
app.use(cors());
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
io.on('connection', (client) => {
room.connect(client);
room.answer(client);
});
// let online = 0;
const users = [];
io.on('connection', (client) => {
const { name } = client.handshake.query;
users.push(name);
console.log('User connected');
console.log(users);
console.log(name);
io.emit('new-user-connected', users);
client.on('disconnect', () => {
const index = users.indexOf(name);
if (index < 0) {
return;
}
users.splice(index, 1);
io.emit('user-disconnected', users);
});
});
app.use((request, response, next) => {
console.log(`---> ${request.method} -- ${request.url}`);
next();
});
app.use('/users/', usersRoute);
app.use('/auth/', authRoute);
app.use('/games/', gameRoute);
app.use('/rooms/', gameRoom);
app.use(express.static('./client/build'));
app.use((err, req, res, next) => {
res.json({
status: err.status || 400,
message: err.message,
});
});
const serverStart = async () => {
try {
await connectDB();
await server.listen(PORT, () => {
console.log(`Server is started on port №${PORT}`);
});
} catch (e) {
console.log('Something went wrong', e);
}
};
serverStart();
<file_sep>/server/controllers/createToken.js
const jwt = require("jsonwebtoken");
const KEY = "secret";
const createToken = (req, res, next) => {
jwt.sign({
// info: req.info.token
}, KEY, {
expiresIn: 180
}, (err, token) => {
req.data = Object.assign(req.data, {token,
status: 200
});
next()
})
}
module.exports = createToken;
<file_sep>/client/src/test.js
import React, { Component } from 'react';
import styled from 'styled-components';
import {Button, Input, CustomLink} from "./components/UI"
import AdminCreateGame from './components/admin_create_game';
import UserTestingPage from './components/users_testing_page';
const tst = () => {
return(
<div>
{/*<Button theme={'light'}>TTTTTT</Button>*/}
{/*<Input type='text'/>*/}
{/*<CustomLink href='test link'>dasda</CustomLink>*/}
<AdminCreateGame/>
<UserTestingPage/>
</div>
)
}
export default tst;
<file_sep>/client/src/components/User_Start_Page/UserStartPage.js
import React, {Component} from 'react';
import PropTypes from "prop-types";
import styled from 'styled-components';
import {Button, Input} from '../UI/index';
import {connect} from 'react-redux';
class UserStartPage extends Component {
state = {
rendError: false,
pinCode: ''
};
changeInput(field, e) {
this.setState({
[field]: e.target.value
});
};
checkPin = () => {
fetch('https://kahoot-bootcamp4.herokuapp.com/rooms/check/', {
method: 'POST',
body: JSON.stringify({pinCode: this.state.pinCode}),
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
}
})
.then((res)=>res.json())
.then((data)=>{
console.log(data);
if(data.status === 200) {
console.log("OK");
this.props.addPin(data.data.token);
this.props.addId(data.data.roomID);
this.props.history.push('/name')
}
else {
// this.setState({
// rendError: true
// });
alert("ОШИБКА В ")
}
})
.catch((e)=>{this.setState({rendError: true})});
};
render() {
return (
<div className="root">
<div>{this.state.rendError ? "ОШИБКА" : ""}</div>
<Input type="text"
className="login__name"
placeholder="ENTER_PINCODE"
value={this.state.pinCode}
onChange={this.changeInput.bind(this, 'pinCode')}
/>
<br/>
<Button width={10} height={30} onClick={this.checkPin}>Enter</Button>
</div>
)
}
}
// const mapStateToProps = (state) => {
// return {
// pinCode: state.users.pinCode
// }
// };
const dispatchToProps = (dispatch) => {
return {
addPin: ({pinCode}) => {
dispatch({
type: "ADD_NEW_PINCODE",
pinCode
});
},
addId: (roomID) => {
dispatch({
type: "ADD_NEW_ROOMID",
roomID
});
},
}
};
export default connect(null, dispatchToProps)(UserStartPage);<file_sep>/client/src/components/User_Name/UserName.js
import React, {Component} from 'react';
import styled from 'styled-components';
import {Button, Input} from '../UI/index';
import {connect} from 'react-redux';
const DivName = styled.div`
background-color: #e7e8ea;
height: 100vh;
display: flex;
`
const Name = styled.div`
margin: auto;
`;
class UserName extends Component {
state = {
nickName: this.props.nickName
};
changeInput(field, e){
this.setState({
[field]: e.target.value
})
};
addNick = () => {
this.props.addNickName({
nickName: this.state.nickName
});
this.props.addCurrentName({
nickName: this.state.nickName
});
this.props.history.push('/common')
};
render() {
const {nickName} = this.state;
console.log(nickName);
return (
<DivName>
<Name>
<Input type="text"
className="login__name"
placeholder="nickName"
value={this.state.nickName}
onChange={this.changeInput.bind(this, 'nickName')}
/>
<br/>
<Button height={30} onClick={this.addNick}>Enter</Button>
</Name>
</DivName>
)
}
}
const dispatchToProps = (dispatch) => {
return {
addNickName: ({nickName}) => {
dispatch({
type: "ADD_NEW_NICK_NAME",
nickName
});
},
addCurrentName: ({nickName}) => {
dispatch({
type: "USER_CHANGE_NAME",
nickName
});
}
}
};
export default connect(null, dispatchToProps)(UserName);<file_sep>/client/src/components/Dashbord/List.js
import React, {Component} from 'react';
const List = (props) => {
return (
<li className=''>{props.state.}</li>
)
};
export default List;<file_sep>/client/src/components/startPage/index.js
import {Component} from 'react';
import React from 'react';
import styled from 'styled-components';
import {Button} from '../UI/index';
// wraper
const Div = styled.div`
display: flex;
width: 100%;
height: 100vh;
background-color: #808080;
flex-direction: row;
align-items: center;
justify-content: space-around;
`;
class StartPage extends Component{
render(){
return(
<Div>
<Button
color = {'#fff'}
width = {'60'}
>USER</Button>
<Button
color = {'#fff'}
width = {'60'}
>TEACHER</Button>
</Div>
)
}
}
export default StartPage;
<file_sep>/server/controllers/users.js
const Users = require('../models/users');
const controller = {
create(req, res, next) {
Users.create({
login: req.body.login,
password: <PASSWORD>,
email: req.body.email,
avatar: req.body.avatar,
isAdmin: req.body.isAdmin,
})
.then((user) => {
req.data = user._doc;
next();
})
.catch((e) => {
const err = new Error(e.message);
next(err);
});
},
readAll(req, res, next) {
Users.find({}).exec()
.then((users) => {
req.data = users;
next();
})
.catch((e) => {
next(e);
});
},
readOne(req, res, next) {
Users.findById(req.params.id)
.then((user) => {
req.data = user;
next();
})
.catch((e) => {
next(e);
});
},
update(req, res, next) {
Users.findByIdAndUpdate(req.params.id, {
login: req.body.login,
password: <PASSWORD>,
email: req.body.email,
avatar: req.body.avatar,
isAdmin: req.body.isAdmin,
})
.then((user) => {
req.data = user;
next();
})
.catch((e) => {
next(e);
});
},
delete(req, res, next) {
Users.findByIdAndRemove(req.params.id)
.then((user) => {
req.data = user;
next();
})
.catch((e) => {
next(e);
});
},
};
module.exports = controller;
<file_sep>/client/src/components/UI/index.js
//import React, {Component} from 'react';
import styled from 'styled-components';
//import {excludeProp} from "../../utils";
// import {withRouter} from "react-router-dom";
const Button = styled.button`
background-color: ${props => props.theme === 'light' ? '#fff' : '#000'};
color: ${props => props.color ? props.color : '#5ab962'};
height: ${props => props.height ? props.height : 50}px;
width: ${props => props.width ? props.width : 100}%;
max-width: 250px;
text-transform: uppercase;
font-family: inherit;
font-weight: bold;
letter-spacing: 0.14em;
font-size: 1.14em;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
background-color: #fff;
-moz-box-shadow: 0 2px 2px rgba(0,0,0,.05), inset 0 -2px 0 rgba(0,0,0,.08);
-webkit-box-shadow: 0 2px 2px rgba(0,0,0,.05), inset 0 -2px 0 rgba(0,0,0,.08);
box-shadow: 0 2px 2px rgba(0,0,0,.05), inset 0 -2px 0 rgba(0,0,0,.08);
border: 1px solid #c4c4c4;
color: #777;
`;
const Input = styled.input`
background-color: rgba(255,255,255,0.74);
letter-spacing: 0.04em;
height: ${props => props.height ? props.height : 100}%;
//width: 100%;
width: 225px;
margin: 20px 0;
padding: 10px;
&:focus{
outline: none;
}
&::placeholder{
color: #333;
opacity: 0.7;
}
`;
const CustomLink = styled.a`
color: #ff0808;
font-size: 11px;
font-weight: bold;
`;
export {Button, Input, CustomLink}<file_sep>/server/models/rooms.js
const mongoose = require('mongoose');
const roomsSchema = mongoose.Schema({
id: String,
gameID: { type: String },
players: [],
});
module.exports = mongoose.model('Rooms', roomsSchema);
<file_sep>/client/src/components/resultPage/index.js
import React, { Component } from 'react';
import styled from 'styled-components';
const Wraper = styled.div`
background-color: #e7e8ea;
width: 100%;
height: 100vh;
display: flex;
font-size: 30px;
display: flex;
flex-direction: column;
//flex-wrap: wrap;
`;
const Ul = styled.ul`
list-style: none;
flex-direction: column;
margin: auto;
`;
const Li = styled.li`
:first-child {
background: url(http://i.imgur.com/XC7Sd03.png) rgba(25, 255, 255, 0.2) center no-repeat/cover;
background-blend-mode: multiply;
color: #fff;
}
display: flex;
align-self: center;
`;
const P = styled.li`
margin: 30px 100px;
`
const Div = styled.div`
display: flex;
margin:0 auto;
padding-top: 80px;
`
const Div2 = styled.div`
margin: auto;
`
const H1 = styled.p`
margin-left: 321px;
`
const H2 = styled.p`
margin-left: 208px;
`
class ResultPage extends Component {
state =[
{
name: 'USER1',
score:1036
},{
name: 'USER2',
score:1202
},{
name: 'USER3',
score:2036
},{
name: 'USER4',
score:202
},{
name: 'USER5',
score:10
},{
name: 'USER6',
score:1302
},{
name: 'USER7',
score:2022
},{
name: 'USER8',
score:402
}
];
render (){
return (
<Wraper>
<Div>
<H1>NAME</H1><H2>SCORE</H2></Div>
<Div2>
<Ul>
{this.state.sort((a,b)=>{
return b.score - a.score;
}).map((item,e)=>{
let a = e;
a++;
return <Li><P>№{a}</P> <P>{this.state[e].name}</P>
<P>{this.state[e].score}</P>
</Li>})}
</Ul>
</Div2>
</Wraper>
)
}
}
export default ResultPage;
<file_sep>/client/src/components/PendingRoom/index.js
import React, {Component} from "react";
import styled from 'styled-components';
import {connect} from 'react-redux';
//
// <ul>
// {this.state.userList.map((userList, index) => {
// return <li>{this.state.userList[index]}</li>
// })}
// </ul>
//
const Container = styled.div`
font-style: italic;
font-size: 26px;
`
const Ul = styled.div`
list-style: none;
display: flex;
flex-wrap: wrap;
padding: 50px 0;
`
const Div = styled.div`
background-color: #e7e8ea;
height: 100vh;
`;
const Li = styled.div`
flex-basis: 30%;
margin-top: 40px;
:nth-child(-n+3) {
margin-top: 0;
}
`
const H1 = styled.div`
font-size: 36px;
padding: 50px 0;
display: flex;
flex-direction: row;
justify-content: space-around;
width: 100%;
`
const Btn = styled.div`
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
`
const P = styled.div`
font-size: 26px;
font-style: italic;
opacity: .7;
`
class PedingRoom extends Component{
state = {
currentUser: this.props.nickName,
userList: ['Jim', 'Bim', 'Sim', 'Kim', 'Vim', 'Lim', 'Fim', 'Rim', 'Pim', 'Him']
};
componentWillMount(){
window.socket.on("new-user-connected", (users) => {
this.setState({
userList: users
})
});
window.socket.on("user-disconnected", (users) => {
this.setState({
userList: users
})
})
}
componentWillUnmount(){
window.socket.off("new-user-connected");
window.socket.off("user-disconnected");
}
render(){
return(
<Div>
<H1>{this.state.currentUser}</H1>
<P>Waiting for other students!!!</P>
<Container>
<Ul>
{this.state.userList.map((users, index) => {
return <Li>{users.toUpperCase()}</Li>
})}
</Ul>
</Container>
</Div>
)
}
}
const mapStateToProps = (state) => {
return {
nickName: state.currentUser.nickName
}
};
export default connect(mapStateToProps, null)(PedingRoom);
<file_sep>/client/src/components/adminChoiseTest/AdminChoiseTest.js
import React, {Component} from 'react';
import styled from 'styled-components';
import {Button} from "../UI";
import { Link } from 'react-router-dom';
const Wraper = styled.div`
padding-top: 100px;
display:block;
width: 100%;
height: 100vh;
background-color: #e7e8ea;
`;
const Li = styled.li`
margin-bottom: 20px;
display: flex;
justify-content: space-around;
`;
const Ul = styled.ul`
margin-top: 100px;
list-style: none;
`;
const P = styled.p`
font-size: 25px;
line-height: 0px;
font-weight: 600;
color: #7e2aa7;
width: 397.2px;
`;
const Div = styled.div`
margin-left: 180px;
`
class AdminChoiseTest extends Component{
constructor(props){
super(props);
this.state ={
tests: [
{
description: 'тема для регуляркам',
games: [
{ question:"Вопрос 1",
answers:[
{var:"v1",correct: true},
{var:"v2",correct: false},
{var:"v3",correct: false} ,
{var:"v4",correct: false}]
}
]
},
{
description: 'тема переменной',
games: [
{ question:"Вопрос 1",
answers:[
{var:"v1",correct: true},
{var:"v2",correct: false},
{var:"v3",correct: false} ,
{var:"v4",correct: false}]
}
]
},
{
description: 'тема для инкапсуляция',
games: [
{ question:"Вопрос 1",
answers:[
{var:"v1",correct: true},
{var:"v2",correct: false},
{var:"v3",correct: false} ,
{var:"v4",correct: false}]
}
]
},
{
description: 'HTML5',
games: [
{ question:"Вопрос 1",
answers:[
{var:"v1",correct: true},
{var:"v2",correct: false},
{var:"v3",correct: false} ,
{var:"v4",correct: false}]
}
]
},
{
description: 'Css3',
games: [
{ question:"Вопрос 1",
answers:[
{var:"v1",correct: true},
{var:"v2",correct: false},
{var:"v3",correct: false} ,
{var:"v4",correct: false}]
}
]
},
{
description: 'Git',
games: [
{ question:"Вопрос 1",
answers:[
{var:"v1",correct: true},
{var:"v2",correct: false},
{var:"v3",correct: false} ,
{var:"v4",correct: false}]
}
]
},
]};}
callData = () => {
fetch('https://kahoot-bootcamp4.herokuapp.com/games/')
.then((res) => res.json())
.then((data) => {
console.log(data.data);
this.setState({
tests: data.data
})
})
}
componentWillMount(){
this.callData()
}
render(){
return(
<Wraper>
<Div> <Link to='/create'><Button>Create Test</Button></Link></Div>
<Ul>
{this.state.tests.map((key,i)=>{
return (<Li id={key._id}>
<P>{this.state.tests[i].description}</P>
<Button >Редактировать</Button>
<Button >Start</Button>
</Li>)
})}
</Ul>
</Wraper>
)
}
}
export default AdminChoiseTest;<file_sep>/server/routes/users.js
const { Router } = require('express');
const prepareBody = require('../controllers/prepareBody');
const controller = require('../controllers/users');
const router = Router();
router.get('/', controller.readAll, prepareBody, (req, res) => {
res.json(req.responseData);
});
router.get('/:id/', controller.readOne, prepareBody, (req, res) => {
res.json(req.responseData);
});
router.post('/', controller.create, prepareBody, (req, res) => {
res.json(req.responseData);
});
router.put('/:id/', controller.update, prepareBody, (req, res) => {
res.json(req.responseData);
});
router.delete('/:id/', controller.delete, prepareBody, (req, res) => {
res.json(req.responseData);
});
module.exports = router;
<file_sep>/client/src/components/admin_login/Login.js
import React, {Component} from 'react';
import styled from 'styled-components';
import {Button, Input} from '../UI/index';
const Div = styled.div`
background-color: #e7e8ea;
height: 100vh;
display: flex;
`
const Box = styled.div`
margin: auto;
width: 250px;
`;
const sexses = `Вы зарегились`;
const notsexses = `Ошибка регистрации`;
class AdminLogin extends Component {
state ={
login: '',
password: '',
email: '',
renderIf: false
};
onChange =(field, e) => {
this.setState({
[field]: e.target.value
})
};
loginFunc = () => {
fetch('http://localhost:9999/auth', {
method: 'POST',
body: JSON.stringify(this.state),
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
}
})
.then((res) => res.json())
.then((token) => {
localStorage.setItem("token", token.token);
})
.catch((e) => {
console.log(e);
})
};
loginReg = () => {
fetch('http://localhost:9999/users', {
method: 'POST',
body: JSON.stringify(this.state),
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
}
})
.then((res) => res.json())
.then((token) => {
localStorage.setItem("token", token.token);
this.setState({
renderIf : token.status
});
if(token.status !== 200) {
this.setState({
err: token.message
})
}
})
.catch((e) => {
console.log(e);
})
};
ifRender = () => {
if (this.state.renderIf === 200) {return sexses}
else {return this.state.renderIf === 400 ? this.state.err : ''}
};
render () {
return (
<Div>
<Box>
<div>{this.ifRender()}</div>
<Button onClick={this.loginReg}>Reg</Button>
<Input height={10}
placeholder="Email"
type='text'
value={this.state.email}
onChange={this.onChange.bind(this, 'email')} /><br/>
<Input height={10}
placeholder="Login"
type='text'
value={this.state.login}
onChange={this.onChange.bind(this, 'login')} /><br/>
<Input height={10}
placeholder="Password"
type='password'
value={this.state.password}
onChange={this.onChange.bind(this, 'password')} /><br/>
<Button onClick={this.loginFunc}>Login</Button>
</Box>
</Div>
)
}
}
export default AdminLogin
|
3df6a84b5707c5f1b1e8c0c70449d8949c45a69b
|
[
"JavaScript"
] | 21
|
JavaScript
|
spooon1993/kahoot-project
|
a4a1cb0c5479803e1407e752a045a1dc086b46b9
|
7e9e97706550d5321ccbcb52fb228be8d8e82374
|
refs/heads/master
|
<repo_name>duckhee/first_stm32f103_make<file_sep>/Menu/src/main_menu.c
#define MAIN_MENU_LOCAL
#include "main_menu.h"
#define MAX_ARGS 30
typedef bool;
#define true 1
#define false 0
RCC_ClocksTypeDef rcc_clocks;
uint8_t ch;
void System_Information()
{
printf("SYSCLK_Frequency = %d\r\n",rcc_clocks.SYSCLK_Frequency );
printf("HCLK_Frequency = %d\r\n",rcc_clocks.HCLK_Frequency );
printf("PCLK1_Frequency = %d\r\n",rcc_clocks.PCLK1_Frequency );
printf("PCLK2_Frequency = %d\r\n",rcc_clocks.PCLK2_Frequency );
printf("ADCCLK_Frequency = %d\r\n",rcc_clocks.ADCCLK_Frequency );
}
void USB_Test_Start (void)
{
USB_Interrupts_Config();
Set_USBClock();
USB_Init();
}
void default_menu()
{
while(1){
printf("\r\n---------------------\r\n");
#ifdef BOARD_DEF_MANGO_M32
printf("Mango M32 test start...\n");
#elif BOARD_DEF_MANGO_Z1
printf("Mango Z1 test start...\n");
#endif
printf("Press menu key\r\n");
printf("---------------------\r\n");
printf("0> System Information\r\n");
printf("---------------------\r\n");
printf("1> LED Test\r\n");
printf("2> KEY Test\r\n");
#ifdef BOARD_DEF_MANGO_M32
printf("3> 7-Segment Test\r\n");
#elif BOARD_DEF_MANGO_Z1
printf("3> ZigBee Test\r\n");
#endif
printf("4> USB HID Test\r\n");
printf("5> \r\n");
printf("---------------------\r\n");
printf("x> quit\r\n\r\n");
ch = USART_GetCharacter(USART1);
printf(" is selected\r\n\r\n");
switch((char)ch)
{
case '0':
System_Information();
break;
case '1':
LED_Test();
break;
case '2':
KEY_Test();
break;
case '3':
#ifdef BOARD_DEF_MANGO_M32
Seven_Segment_Test();
#elif BOARD_DEF_MANGO_Z1
ZigBee_Test();
#endif
break;
case '4':
g_TestProcessState = TRUE;
/* USB initialization */
USB_Test_Start();
Delay(500);
USB_Cable_Config(ENABLE);
break;
case '5':
break;
}
if('x' == (char)ch)
{
break;
}
}
}
typedef enum
{
VAR_LONG = 32,
VAR_SHORT = 16,
VAR_CHAR = 8
} VAR_TYPE;
#define NULL ((void *)0)
char cmd[128]; //one word
int cmd_size;
// 구조체 선언
struct _CMD_TBL{
// 예약된 명령어
char *cmd;
// 함수 포인터, 이중포인터는 포인터 배열을 가리킨다.
bool (*run)(struct _CMD_TBL *cptr, int argc, char **argv);
// 해당되는 명령어의 사용법
char *usage;
// 해당되는 명령어의 도움말, 더 자세한 사용법
char *help;
char *help_more;
};
//초기화
#define CMD_TBL_TEST {"test", do_test, 0, 0, 0}
#define CMD_TBL_END {0, 0, 0, 0, 0}
//함수 프로토 타입 선언
void display_prompt(char *prompt);
bool do_print_help(int argc, char **argv);
int get_command(char *cmd, int len, int timeout);
int get_args(char *s, char **argv);
bool do_test(struct _CMD_TBL *cptr, int argc, char **argv);
//구조체를 배열로 할당(구조체 배열)
struct _CMD_TBL cmd_tbl[] =
{
CMD_TBL_TEST,
//추가 시작
//end는 0으로 되어있고 command에서 cptr이 0이면, for문은 빠져나오게 되어 있다.
//end 밑에 추가하면 동작이 안된다.
//추가 끝
CMD_TBL_END
};
//함수 프로토 타입 선언
void display_prompt(char *prompt);
bool do_print_help(int argc, char **argv);
int get_command(char *cmd, int len, int timeout);
int get_args(char *s, char **argv);
MAIN_MENU_DEF void Sys_Info(void);
RCC_ClocksTypeDef rcc_clocks;
MAIN_MENU_DEF void Sys_Info(void)
{
printf("SYSCLK_Frequency = %d\r\n",rcc_clocks.SYSCLK_Frequency );
printf("HCLK_Frequency = %d\r\n",rcc_clocks.HCLK_Frequency );
printf("PCLK1_Frequency = %d\r\n",rcc_clocks.PCLK1_Frequency );
printf("PCLK2_Frequency = %d\r\n",rcc_clocks.PCLK2_Frequency );
printf("ADCCLK_Frequency = %d\r\n",rcc_clocks.ADCCLK_Frequency );
}
void display_prompt(char *prompt)
{
if(prompt == NULL)
{
printf(">>> ");
}
else
{
printf("%s\r\n", prompt);
}
}
int get_command(char *cmd, int len, int timeout)
{
char key;
int i, rd_cnt, rd_max;
rd_max = len - 1;
for(rd_cnt = 0, i = 0; rd_cnt < rd_max; )
{
key = USART_GetCharacter(USART1);
if((key == '\n') || (key == '\r'))
{
cmd[i++] = '\0';
printf("\r\n");
return rd_cnt;
}
else if(key == '\b')
{
if(i > 0)
{
i--;
rd_cnt--;
printf("\b \b");
}
}
else if(key == '\0')
{
cmd[cmd_size] = '\0';
printf("\r\n");
return cmd_size;
}
else
{
cmd[i++] = key;
rd_cnt++;
printf("%c", key);
}
}
}
int get_args(char *s, char **argv)
{
int args = 0;
if(!s || *s == '\0')
{
return 0;
}
while(args < MAX_ARGS)
{
while((*s == ' ') || (*s == '\t'))
{
s++;
}
if(*s == '\0')
{
argv[args] = 0;
return args;
}
argv[args++] = s;
while(*s && (*s != ' ') && (*s != '\t'))
{
s++;
}
if(*s == '\0')
{
argv[args] = 0;
return args;
}
*s++ ='\0';
}
return args;
}
bool do_print_help(int argc, char **argv)
{
struct _CMD_TBL *cptr;
if(argc == 1)
{
printf("\nThe following command are supported : \n");
printf("Help : Help for commands. \n");
for(cptr = cmd_tbl; cptr->cmd; cptr++)
{
if(cptr->help_more)
{
printf(cptr->help_more);
}
}
printf("\n\n");
}
else
{
printf("\n\t Unknow command : %s\n", argv[0]);
}
return true;
}
bool do_test(struct _CMD_TBL *cptr, int argc, char **argv)
{
printf("\nThis is test\n");
return true;
}
<file_sep>/Src/Hw_driver/Makefile.inc
###########################################################
# GCC template makefile
###########################################################
HW_DRIVER_SRCS =
HW_DRIVER_SRCS += key.c
HW_DRIVER_SRCS += led.c
HW_DRIVER_SRCS += seven_segment.c
HW_DRIVER_SRCS += zigbee_test.c
SRCS += $(HW_DRIVER_SRCS)<file_sep>/Menu/inc/key_menu.h
#ifndef __KEY_MENU_H__
#define __KEY_MENU_H__
#include "menu.h"
#ifdef KEY_MENU_LOCAL
#define KEY_MENU_DEF
#else
#define KEY_MENU_DEF extern
#endif
KEY_MENU_DEF int Command_Key_Main(int argc, char **argv);
KEY_MENU_DEF int Command_Key_Main_Menu(void);
#endif<file_sep>/FreeRTOS/Makefile.inc
###########################################################
# GCC template makefile
###########################################################
FREE_RTOS_SRCS =
FREE_RTOS_SRCS += croutine.c
FREE_RTOS_SRCS += list.c
FREE_RTOS_SRCS += queue.c
FREE_RTOS_SRCS += tasks.c
SRCS += $(FREE_RTOS_SRCS)<file_sep>/Menu/inc/seg_menu.h
#ifndef __SEG_MENU_H__
#define __SEG_MENU_H__
#include "menu.h"
#ifdef SEG_MENU_LOCAL
#define SEG_DEF
#else
#define SEG_DEF extern
#endif
SEG_DEF int Command_Seg_Main(int argc, char argv);
SEG_DEF int Command_Seg_Main_Menu(void);
#endif<file_sep>/STM32_USB-FS-Device_Driver/src/Makefile.inc
###########################################################
# GCC template makefile
###########################################################
STM32F10X_USB_SRC = usb_core.c
STM32F10X_USB_SRC += usb_init.c
STM32F10X_USB_SRC += usb_int.c
STM32F10X_USB_SRC += usb_mem.c
STM32F10X_USB_SRC += usb_regs.c
SRCS += $(STM32F10X_USB_SRC)<file_sep>/Menu/src/seg_menu.c
#define SEG_MENU_LOCAL
#include "seg_menu.h"
static unsigned short flag;
SEG_DEF int Command_Seg_Main(int argc, char argv);
SEG_DEF int Command_Seg_Main_Menu(void);
SEG_DEF int Command_Seg_Main(int argc, char argv)
{
int key;
return 0;
}
SEG_DEF int Command_Seg_Main_Menu(void)
{
int key;
printf("\r\n\r\n");
printf("-------------------------------------------------\r\n");
printf(" SEG MAIN MENU\r\n");
printf("-------------------------------------------------\r\n");
printf(" 1. SEG On \r\n");
printf(" 2. SEG Off \r\n");
printf(" 3. Yellow On \r\n");
printf(" 4. Yellow Off \r\n");
printf(" 5. Blue On \r\n");
printf(" 6. Blue Off \r\n");
printf(" 7. Led Test \r\n");
printf(" 8. System_Information \r\n");
printf(" 9. Test \r\n");
printf(" 0. Test \r\n");
printf("-------------------------------------------------\r\n");
printf(" q. LED Menu QUIT\r\n");
printf("-------------------------------------------------\r\n");
printf("\r\n\r\n");
printf("SELECT THE COMMAND NUMBER : ");
key=USART_GetCharacter(USART1);
return key;
}<file_sep>/Menu/src/Makefile.inc
########################################################################################
# GCC template makefile
########################################################################################
MENU_SRCS = led_menu.c
MENU_SRCS += key_menu.c
MENU_SRCS += seg_menu.c
MENU_SRCS += main_menu.c
SRCS += $(MENU_SRCS)
<file_sep>/Menu/inc/led_menu.h
#ifndef __LED_MENU_H__
#define __LED_MENU_H__
#include "menu.h"
#ifdef LED_MENU_LOCAL
#define LED_MENU_DEF
#else
#define LED_MENU_DEF extern
#endif
LED_MENU_DEF int Command_Led_Main(int argc, char **argv);
LED_MENU_DEF int Command_Led_Main_Menu(void);
#endif<file_sep>/Menu/src/led_menu.c
#define LED_MENU_LOCAL
#include "led_menu.h"
static unsigned short flag;
LED_MENU_DEF int Command_Led_Main(int argc, char **argv);
LED_MENU_DEF int Command_Led_Main_Menu(void);
LED_MENU_DEF int Command_Led_Main(int argc, char **argv)
{
int key;
return 0;
}
LED_MENU_DEF int Command_Led_Main_Menu(void)
{
int key;
printf("\r\n\r\n");
printf("-------------------------------------------------\r\n");
printf(" LED MAIN MENU\r\n");
printf("-------------------------------------------------\r\n");
printf(" 1. Red On \r\n");
printf(" 2. Red Off \r\n");
printf(" 3. Yellow On \r\n");
printf(" 4. Yellow Off \r\n");
printf(" 5. Blue On \r\n");
printf(" 6. Blue Off \r\n");
printf(" 7. Led Test \r\n");
printf(" 8. System_Information \r\n");
printf(" 9. Test \r\n");
printf(" 0. Test \r\n");
printf("-------------------------------------------------\r\n");
printf(" q. LED Menu QUIT\r\n");
printf("-------------------------------------------------\r\n");
printf("\r\n\r\n");
printf("SELECT THE COMMAND NUMBER : ");
key=USART_GetCharacter(USART1);
return key;
}<file_sep>/Menu/inc/menu.h
#ifndef __MENU_H__
#define __MENU_H__
#include "hw_config.h"
#include "main_menu.h"
#include "led_menu.h"
#include "key_menu.h"
#include "seg_menu.h"
#endif<file_sep>/Menu/inc/main_menu.h
#ifndef __MAIN_MENU_H__
#define __MAIN_MENU_H__
#include "menu.h"
#ifdef MAIN_MENU_LOCAL
#define MAIN_MENU_DEF
#else
#define MAIN_MENU_DEF extern
#endif
MAIN_MENU_DEF void default_menu();
MAIN_MENU_DEF void USB_Test_Start (void);
MAIN_MENU_DEF void Sys_Info(void);
MAIN_MENU_DEF int Command_Main(int argc, char **argv);
MAIN_MENU_DEF int Command_Main_Menu(void);
#endif<file_sep>/CMSIS/Core/CM3/Makefile.inc
###########################################################
# GCC template makefile
###########################################################
STM32F10X_ASRCS = startup_stm32f10x_md.s
CM3_SRCS =
CM3_SRCS += core_cm3.c
CM3_SRCS += system_stm32f10x.c
ASRCS += $(STM32F10X_ASRCS)
SRCS += $(CM3_SRCS)<file_sep>/Menu/src/key_menu.c
#define KEY_MENU_LOCAL
#include "key_menu.h"
static unsigned short flag;
KEY_MENU_DEF int Command_Key_Main(int argc, char **argv);
KEY_MENU_DEF int Command_Key_Main_Menu(void);
KEY_MENU_DEF int Command_Key_Main(int argc, char **argv)
{
int key;
return 0;
}
KEY_MENU_DEF int Command_Key_Main_Menu(void)
{
int key;
printf("\r\n\r\n");
printf("-------------------------------------------------\r\n");
printf(" KEY MAIN MENU\n");
printf("-------------------------------------------------\r\n");
printf(" 1. Key Test \r\n");
printf(" 2. Led Test \r\n");
printf(" 3. System_Information \r\n");
printf(" 4. Test \r\n");
printf(" 5. Test \r\n");
printf(" 6. Test \r\n");
printf(" 7. Test \r\n");
printf(" 8. Test \r\n");
printf(" 9. Test \r\n");
printf(" 0. Test \r\n");
printf("-------------------------------------------------\r\n");
printf(" q. KEY Menu QUIT\r\n");
printf("-------------------------------------------------\r\n");
printf("\r\n\r\n");
printf("SELECT THE COMMAND NUMBER : ");
key=USART_GetCharacter(USART1);
return key;
}<file_sep>/Src/Makefile.inc
########################################################################################
# GCC template makefile
########################################################################################
SRC_SOURCES =
SRC_SOURCES += main.c
SRC_SOURCES += debug.c
SRC_SOURCES += hw_config.c
SRC_SOURCES += stm32f10x_it.c
SRC_SOURCES += syscalls.c
SRCS += $(SRC_SOURCES)<file_sep>/Src/main.c
/*
* (C) COPYRIGHT 2009 CRZ
*
* File Name : main.c
* Author : POOH
* Version : V1.0
* Date : 08/12/2009
*/
/* includes */
//#include "hw_config.h"
#include "main_menu.h"
/* global variables */
RCC_ClocksTypeDef rcc_clocks;
bool g_TestProcessState = FALSE;
/* functions */
/*
* Name : main
* Input : None
* Output : None
* Return : None
*/
int main(void)
{
/* System Clocks Configuration */
RCC_Configuration();
RCC_GetClocksFreq(&rcc_clocks);
/* NVIC configuration */
NVIC_Configuration();
/* Configure the GPIO ports */
GPIO_Configuration();
/* EXTI configuration */
EXTI_Configuration();
/* UART initialization */
USART1_Init();
/* Setup SysTick Timer for 1 msec interrupts */
if (SysTick_Config(rcc_clocks.SYSCLK_Frequency / 1000))
{
/* Capture error */
while (1);
}
USB_Cable_Config(DISABLE);
Delay(500);
LED_Off_All();
while(1)
{
default_menu();
}
Delay(1000);
return 0;
}
<file_sep>/STM32F10x_StdPeriph_Driver/src/Makefile.inc
###########################################################
# GCC template makefile
###########################################################
STM32F10X_DRV_ASRCS =
STM32F10X_DRV_SRCS = misc.c
STM32F10X_DRV_SRCS += stm32f10x_adc.c
STM32F10X_DRV_SRCS += stm32f10x_bkp.c
STM32F10X_DRV_SRCS += stm32f10x_can.c
STM32F10X_DRV_SRCS += stm32f10x_crc.c
STM32F10X_DRV_SRCS += stm32f10x_dac.c
STM32F10X_DRV_SRCS += stm32f10x_dbgmcu.c
STM32F10X_DRV_SRCS += stm32f10x_dma.c
STM32F10X_DRV_SRCS += stm32f10x_exti.c
STM32F10X_DRV_SRCS += stm32f10x_flash.c
STM32F10X_DRV_SRCS += stm32f10x_fsmc.c
STM32F10X_DRV_SRCS += stm32f10x_gpio.c
STM32F10X_DRV_SRCS += stm32f10x_i2c.c
STM32F10X_DRV_SRCS += stm32f10x_iwdg.c
STM32F10X_DRV_SRCS += stm32f10x_pwr.c
STM32F10X_DRV_SRCS += stm32f10x_rcc.c
STM32F10X_DRV_SRCS += stm32f10x_rtc.c
STM32F10X_DRV_SRCS += stm32f10x_sdio.c
STM32F10X_DRV_SRCS += stm32f10x_spi.c
STM32F10X_DRV_SRCS += stm32f10x_tim.c
STM32F10X_DRV_SRCS += stm32f10x_usart.c
STM32F10X_DRV_SRCS += stm32f10x_wwdg.c
ASRCS += $(STM32F10X_DRV_ASRCS)
SRCS += $(STM32F10X_DRV_SRCS)
<file_sep>/Src/usb/Makefile.inc
###########################################################
# GCC template makefile
###########################################################
HW_USB_SRCS = usb_desc.c
HW_USB_SRCS += usb_endp.c
HW_USB_SRCS += usb_istr.c
HW_USB_SRCS += usb_prop.c
HW_USB_SRCS += usb_pwr.c
SRCS += $(HW_USB_SRCS)
|
9531b03ea6ffc5717fb0ae3e13d483c6b452a475
|
[
"C",
"Makefile"
] | 18
|
C
|
duckhee/first_stm32f103_make
|
2698497bfe9dd221b5e812b8ba961f0a1cbc3e4d
|
866c3a0cb493f1bea148f4128b43eb5859a92b92
|
refs/heads/master
|
<file_sep><?php
header('Content-Type: text/plain');
if($_GET != NULL) {
$output = json_encode($_GET);
echo $output;
}
if($_POST != NULL) {
$output = json_encode($_POST);
echo $output;
}
?><file_sep><?php
session_start();
session_destroy();
?>
<!DOCTYPE html>
<html>
<head>
<title>Assignment 4 login.php</title>
<h2>Please enter a username to continue.</h2>
</head>
<body>
<form action="content1.php" method="post">
Username:
<br><input type="text" name="username">
<input type="submit" name="submit" value="Log On">
</form>
</body>
</html>
<file_sep><?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
session_start();
if(isset($_SESSION['loggedOn'])) {
echo "Welcome to content2.php " . $_SESSION['username'] . "!";
echo "<p>I think you came here looking for more content. There isn't much here, but if you haven't heard yet, The New England Patriots won the Super Bowl!! Go PATS!";
echo "<p>Click <a href=content1.php><strong>here</strong></a> to return to content1.php.";
echo "<P>Or, click <a href=login.php><strong>here</strong></a> to log out.";
}
else {
$filePath = explode('/', $_SERVER['PHP_SELF'], -1);
$filePath = implode('/', $filePath);
$redirect = "http://" . $_SERVER['HTTP_HOST'] . $filePath;
header("Location: {$redirect}/login.php", true);
}
?><file_sep><?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
session_start();
if(isset($_POST['username'])) {
if(ctype_space($_POST['username']) || $_POST['username'] == null) {
echo "You must enter a username to continue.
<br>Click <a href=login.php><strong>here</strong></a> to return to the login screen.";
$_SESSION['loggedOn'] = false;
}
else {
if(!isset($_SESSION['username'])) {
$_SESSION['username'] = $_POST['username'];
$_SESSION['visits'] = 0;
$_SESSION['loggedOn'] = true;
}
}
}
if(isset($_SESSION['username'])) {
if(isset($_POST['username'])) {
if ($_SESSION['username'] != $_POST['username']) {
$_SESSION['username'] = $_POST['username'];
$_SESSION['visits'] = 0;
$_SESSION['loggedOn'] = true;
}
}
$_SESSION['visits']++;
echo "Hello, " . $_SESSION['username'] . ", you have visited this page " . $_SESSION['visits'] . " time(s) before.";
echo "<p>Click <a href=content2.php><strong>here</strong></a> for more content.";
echo "<p>Or, Click <a href=login.php><strong>here</strong></a> to logout.";
}
if (!isset($_SESSION['loggedOn'])) {
$filePath = explode('/', $_SERVER['PHP_SELF'], -1);
$filePath = implode('/', $filePath);
$redirect = "http://" . $_SERVER['HTTP_HOST'] . $filePath;
header("Location: {$redirect}/login.php", true);
}
?><file_sep><?php
error_reporting(E_ALL);
ini_set('display_errors', 'On');
?>
<!DOCTYPE html>
<html>
<head>
<title>Assignment 4 multtable.php</title>
<head>
<body>
<?php
$min_multiplicand = $_GET['min-multiplicand'];
$max_multiplicand = $_GET['max-multiplicand'];
$min_multiplier = $_GET['min-multiplier'];
$max_multiplier = $_GET['max-multiplier'];
//echo "{$min_multiplicand}";
//echo "<br>{$max_multiplicand}";
//echo "<br>{$min_multiplier}";
//echo "<br>{$max_multiplier}";
if (minMcandErrChk($min_multiplicand, $max_multiplicand) >= 0 && maxMcandErrChk($max_multiplicand) >= 0
&& minMplierErrChk($min_multiplier, $max_multiplier) >= 0 && maxMplierErrChk($max_multiplier) >= 0) {
//echo "<br>ALL VARIABLES PASSED";
$tall = ($max_multiplicand - $min_multiplicand + 2); //rows
$wide = ($max_multiplier - $min_multiplier + 2); //columns
$yMin = $min_multiplicand;
$yMax = $max_multiplicand;
$xMin = $min_multiplier;
$xMax = $max_multiplier;
echo "<table border = 1>";
echo "<tr><th></th>";
for ($x = $xMin; $x <= $xMax; $x++) {
echo "<th>".$x."</th>";
}
echo "</tr>\n";
for ($y = $yMin; $y <= $yMax; $y++) {
echo "<tr><th>".$y."</th>";
for($z = $xMin; $z <= $xMax; $z++) {
echo "<td>" .$y * $z. "</td>";
}
echo "</tr>";
}
echo "</table>";
}
/*
//******error checking for min_multiplicand
if($min_multiplicand == null) {
echo "<p><b>Mininum multiplicand</b> is <b>missing</b>, please enter a minimum multiplicand.";
}
elseif(!is_numeric($min_multiplicand)) {
echo "<p><b>Minimum multiplicand</b> must be an <b>integer</b>.";
}
elseif($min_multiplicand <= 0) {
echo "<p><b>Minimum multiplicand</b> must be <b>greater</b> than 0.";
}
elseif($min_multiplicand > $max_multiplicand) {
echo "<p><b>Mininum mutliplicand</b> is <b>greater</b> than the maximum multiplicand, please enter a multiplicand value that is <b>less than or equal</b> to the maximum.";
}
//******error checking for max_multiplicand
if($max_multiplicand == null) {
echo "<p><b>Maximum multiplicand</b> is <b>missing</b>, please enter a minimum multiplicand.";
}
elseif(!is_numeric($max_multiplicand)) {
echo "<p><b>Maximum multiplicand</b> must be an <b>integer</b>.";
}
elseif($max_multiplicand <= 0) {
echo "<p><b>Maximum multiplicand</b> must be <b>greater</b> than 0.";
}
//******error checking for min_multiplier
if($min_multiplier == null) {
echo "<p><b>Minimum multiplier</b> is <b>missing</b>, please enter a minimum multiplicand.";
}
elseif(!is_numeric($min_multiplier)) {
echo "<p><b>Minimum multiplier</b> must be an <b>integer</b>.";
}
elseif($min_multiplier <= 0) {
echo "<p><b>Minimum multiplier</b> must be <b>greater</b> than 0.";
}
elseif($min_multiplier > $max_multiplier) {
echo "<p><b>Mininum mutliplier</b> is <b>greater</b> than the maximum multiplier, please enter a multiplier value that is <b>less than or equal</b> to the maximum.";
}
//******error checking for max_multiplier
if($max_multiplier == null) {
echo "<p><b>Maximum multiplier</b> is <b>missing</b>, please enter a minimum multiplicand.";
}
elseif(!is_numeric($max_multiplier)) {
echo "<p><b>Maximum multiplier</b> must be an <b>integer</b>.";
}
elseif($max_multiplier <= 0) {
echo "<p><b>Maximum multiplier</b> must be <b>greater</b> than 0.";
}
*/
function minMcandErrChk($min_multiplicand, $max_multiplicand) {
if($min_multiplicand == null) {
echo "<p><b>Mininum multiplicand</b> is <b>missing</b>, please enter a minimum multiplicand.";
}
elseif(!is_numeric($min_multiplicand)) {
echo "<p><b>Minimum multiplicand</b> must be an <b>integer</b>.";
}
elseif($min_multiplicand > $max_multiplicand) {
echo "<p><b>Function: Mininum mutliplicand</b> is <b>greater</b> than the maximum multiplicand, please enter a multiplicand value that is <b>less than or equal</b> to the maximum.";
}
else {
//echo "<br>MIN MULTIPLICAND PASSED";
return $min_multiplicand;
}
}
function maxMcandErrChk($max_multiplicand) {
if($max_multiplicand == null) {
echo "<p><b>Maximum multiplicand</b> is <b>missing</b>, please enter a minimum multiplicand.";
}
elseif(!is_numeric($max_multiplicand)) {
echo "<p><b>Maximum multiplicand</b> must be an <b>integer</b>.";
}
else {
//echo "<br>MAX MULTIPLICAND PASSED";
return $max_multiplicand;
}
}
function minMplierErrChk($min_multiplier, $max_multiplier) {
if($min_multiplier == null) {
echo "<p><b>Minimum multiplier</b> is <b>missing</b>, please enter a minimum multiplicand.";
}
elseif(!is_numeric($min_multiplier)) {
echo "<p><b>Minimum multiplier</b> must be an <b>integer</b>.";
}
elseif($min_multiplier > $max_multiplier) {
echo "<p><b>Mininum mutliplier</b> is <b>greater</b> than the maximum multiplier, please enter a multiplier value that is <b>less than or equal</b> to the maximum.";
}
else {
//echo "<br>MIN MULTIPLIER PASSED";
return $min_multiplier;
}
}
function maxMplierErrChk($max_multiplier) {
if($max_multiplier == null) {
echo "<p><b>Maximum multiplier</b> is <b>missing</b>, please enter a minimum multiplicand.";
}
elseif(!is_numeric($max_multiplier)) {
echo "<p><b>Maximum multiplier</b> must be an <b>integer</b>.";
}
else {
//echo "<br>MAX MULTIPLIER PASSED";
return $max_multiplier;
}
}
?>
</body>
</html>
|
1eaed7172ad21a5a7d2ff3240fd37cac89a79c9e
|
[
"PHP"
] | 5
|
PHP
|
loraymond/cs290-assignment4_part1
|
2e5d27f25bb34ae5e5da570138719a94d904b025
|
df7fee8d2a36d44b825d3b09f8435951557221c4
|
refs/heads/master
|
<file_sep>//
// ViewController.swift
// G68L4
//
// Created by <NAME> on 1/31/19.
// Copyright © 2019 RockSoft. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
sortArray()
translit()
dzArray()
//
}
func myName() {
let myName = "AleksandrStepanov"
print("В моем имени \(myName) содержится \(myName.count) символов")
let index1 = myName.index(myName.startIndex, offsetBy: 9)
let beginning1 = myName[..<index1]
print(beginning1)
let index2 = myName.index(myName.startIndex, offsetBy: 9)
let beginning2 = myName[index2...myName.index(before: myName.endIndex)]
print(beginning2)
print("\(beginning1) \(beginning2)")
}
func mySecondName() {
let mySecName = "Вячеславович"
if mySecName.hasSuffix("ич") {
print("My \(mySecName) = 'ич' ")
}
}
func calculator(number: String) {
var number = number
if number.count == 7 {
number.insert(contentsOf: ",", at: number.index(after: number.startIndex))
number.insert(contentsOf: ",", at: number.index(number.startIndex, offsetBy: 5))
print(number)
}
else if number.count == 5 {
number.insert(contentsOf: ",", at: number.index(number.startIndex, offsetBy: 2))
print(number)
}
}
func reversString(text: String) -> String {
var reversText = ""
for i in text {
reversText.insert(i, at: reversText.startIndex)
}
return reversText
}
func sortArray() {
let Number: Set = [9, 1, 2, 5, 1, 7]
let sortNumber = Number.intersection(Number).sorted()
print(sortNumber)
}
func translit() {
let mutableString = NSMutableString(string: "Морда")
CFStringTransform(mutableString, nil, kCFStringTransformToLatin, false)
print(mutableString)
}
func dzArray() {
var array = [Int].init()
for _ in 0..<20 {
array.append(Int.random(in: 0...10))
}
print(array)
}
func sortedDa() {
let results = ["lada", "sedan", "baklazhan"]
}
}
|
741c346befffa2bededf3ff2febcce83383808b3
|
[
"Swift"
] | 1
|
Swift
|
blezin2205/G68L4
|
3419b7622a9dca9c19954e8d1cb5a08f6aed33de
|
2ede9fda4251f07f635bc6d6537346cf8afc0c79
|
refs/heads/main
|
<file_sep>import os
from flask import Flask, flash, jsonify, render_template, request, send_from_directory
from flask_uploads import IMAGES, UploadSet, configure_uploads
import cv2
import numpy as np
from PIL import Image
import io
app = Flask(__name__)
photos = UploadSet("photos", IMAGES)
app.config["UPLOADED_PHOTOS_DEST"] = "static/img"
app.config["SECRET_KEY"] = os.urandom(24)
configure_uploads(app, photos)
@app.route("/", methods=['GET', 'POST'])
def upload():
if request.method == 'POST' and 'photo' in request.files:
image = request.files['photo']
# photos.save(image)
img = Image.open(image)
numpy_image = np.array(img)
opencv_image = cv2.cvtColor(numpy_image, cv2.COLOR_RGB2BGR)
pencilDraw(opencv_image)
flash("Photo saved successfully.")
return render_template('upload.html', uploaded_image='draw.png')
return render_template('upload.html')
@app.route('/uploads/<filename>')
def send_uploaded_file(filename=''):
return send_from_directory(app.config["UPLOADED_PHOTOS_DEST"], filename)
@ app.route("/files", methods=['GET'])
def list_files():
files = []
arquivos = []
for filename in os.listdir('static/img/'):
path = os.path.join('static/img/'+filename)
if os.path.isfile(path):
files.append(filename)
arquivos.append(filename)
return render_template('download.html', arquivos=arquivos)
@ app.route("/files/<path:path>")
def get_file(path):
return send_from_directory('static/img/', path, as_attachment=True)
def pencilDraw(img):
img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
img_gray_inv = 255 - img_gray
img_blur = cv2.GaussianBlur(img_gray_inv, (21, 21), 0, 0)
img_blend = cv2.divide(img_gray, 255 - img_blur, scale=256)
cv2.imwrite('static/img/draw.png', img_blend)
if __name__ == '__main__':
app.run()
<file_sep><!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>Flask-Reuploaded Example</title>
</head>
<body>
{% for arquivo in arquivos %}
<div>
{{ arquivo }}
<a href="files/{{ arquivo }}"> Baixar </a>
</div>
{% endfor %}
</body>
</html>
|
27b9d92b32f491c17dbf2d9e61c8a62c1638ed1e
|
[
"Python",
"HTML"
] | 2
|
Python
|
bernardo300/FlaskUploadImg
|
cb38d4490b05103c4918f87927f84dc175e14876
|
b4ed5ecbf1afac583c871b0b30ee11235914332e
|
refs/heads/master
|
<file_sep>////////////////////////////////////////////////////////////
// <NAME>
// [CSE 002]
// Homework 04 - Program #2: Days in Month Calculator
// September 23, 2014
// import scanner
import java.util.Scanner ;
// add class
public class Month {
// add main method
public static void main(String [] args) {
// declare instance of scanner object
Scanner myScanner ;
// call scanner constructor
myScanner = new Scanner(System.in) ;
// declare the days in each month
int janDays = 31 ;
int febDays = 28 ;
int febDaysLeap = 29 ;
int marDays = 31 ;
int aprDays = 30 ;
int mayDays = 31 ;
int junDays = 30 ;
int julDays = 31 ;
int augDays = 31 ;
int sepDays = 30 ;
int octDays = 31 ;
int novDays = 30 ;
int decDays = 31 ;
// call for user input
System.out.print("Enter an int giving the number of the month (1-12): ") ;
int Month ;
// check that it is an int
if (myScanner.hasNextInt ()) {
Month = myScanner.nextInt () ;
} // close if statement
else {
System.out.println("You did not enter an int.") ;
return ;
} // close else statement
// check that the number is between 1-12
if (Month < 1 || Month > 12) {
System.out.println("You did not enter an int between 1-12.") ;
} // close if statement
// if statements for each month
if (Month == 1) {
System.out.println("The month has " + janDays + " days.") ;
} //close if statement
if (Month == 2) {
System.out.print("Enter an int giving the year: ") ;
int Year ;
if (myScanner.hasNextInt()) {
Year = myScanner.nextInt () ;
} // close if statement
else {
System.out.println("You did not enter an int.") ;
return ;
} // close else statement
if (Year < 0) {
System.out.println("You did not enter a positive int.") ;
} // close if statement
if ((Year % 4) ==0) {
System.out.println("The month has " + febDaysLeap + " days.") ;
} // close if statement
else {
System.out.println("The month has " + febDays + " days.") ;
} // close else statement
} //close if statement
if (Month == 3) {
System.out.println("The month has " + marDays + " days.") ;
} //close if statement
if (Month == 4) {
System.out.println("The month has " + aprDays + " days.") ;
} //close if statement
if (Month == 5) {
System.out.println("The month has " + mayDays + " days.") ;
} //close if statement
if (Month == 6) {
System.out.println("The month has " + junDays + " days.") ;
} //close if statement
if (Month == 7) {
System.out.println("The month has " + julDays + " days.") ;
} //close if statement
if (Month == 8) {
System.out.println("The month has " + augDays + " days.") ;
} //close if statement
if (Month == 9) {
System.out.println("The month has " + sepDays + " days.") ;
} //close if statement
if (Month == 10) {
System.out.println("The month has " + octDays + " days.") ;
} //close if statement
if (Month == 11) {
System.out.println("The month has " + novDays + " days.") ;
} //close if statement
if (Month == 12) {
System.out.println("The month has " + decDays + " days.") ;
} //close if statement
} // end main method
} // end class <file_sep>///////////////////////////////////////////////////////////////////////////////////
// <NAME>
// [CSE 002] - Homework 07
// October 21, 2014
// Force the user to enter an integer between 1 and 9
// print out three number stacks, one using while loops, one using for loops
// and one using do-while loops
// number stacks print 1 - 222 (two times) --- 33333 (three times) ----- 4444444
// (4 times) etc until the number the user enters is reached
// import the scanner
import java.util.Scanner ;
// add class
public class NumberStack {
// add main method
public static void main(String [] args) {
// create scanner object
Scanner scan = new Scanner (System.in);
// declare the needed variables
int number = 0 ; // stores the number that the user enters
int spaces = 0; // controls the loop and determines the number of spaces needed
int x = 0 ; // controls the number of rows for the for loop
int y = 0 ; // controls the number of numbers printed in the for loop
int z = 0 ; // controls the spaces before numbers for the for loop
int y1 = 0 ; // controls the number of numbers of dashes in the for loop
int z1 = 0 ; // controls the spaces before dashes for the for loop
// runs the program until the right number is entered
while (number < 1 || number > 9) {
// prompt the user to enter an integer between 1 - 9
System.out.print("Please enter an integer from 1 - 9: ") ;
// test that the number is an int
if (scan.hasNextInt ()) {
number = scan.nextInt () ;
} // end if
else {
System.out.println ("You did not enter an int.") ;
return ;
} // end else
// test that the number is in the range
if (number < 1 || number > 9 ) {
System.out.println ("You did not enter an integer in the range.") ;
} // end if
} // end loop
// declare variable for the number of spaces
spaces = number ;
// print stack using for loop
System.out.println ("Using the For loop method : ") ;
// determine to number of rows in the stack that will be printed
for (x = 1 ; x <= number ; x++) {
// loop to print out the spaces before the numbers
for (z = spaces ; z >= 0 ; z--) {
System.out.print( " " ) ;
}// end for loop
// loop to print the numbers
for (y = 0 ; y < x * 2 - 1 ; y++) {
System.out.print (x) ;
}// end for loop
// moves to the next line
System.out.print ("\n") ;
// loop to print out the spaces before the dashes
for (z1 = spaces ; z1 >= 0 ; z1--) {
System.out.print( " " ) ;
}// end for loop
// loop to print the dashes
for (y1 = 0 ; y1 < x * 2 - 1 ; y1++) {
System.out.print ("-") ;
}// end for loop
// moves to the next line
System.out.print ("\n") ;
spaces-- ;
} // end for loop
// variables for the while loop
int spacesW = 0 ; // controls the number of spaces
int xW = 1 ; // controls the number of rows for the for loop
int yW = 0 ; // controls the number of numbers printed in the for loop
int zW = 0 ; // controls the spaces before numbers for the for loop
int y1W = 0 ; // controls the number of numbers of dashes in the for loop
int z1W = 0 ; // controls the spaces before dashes for the for loop
// print stack using the while loop
System.out.println ("Using the while loop method:") ;
spacesW = number ;
// contols the number of stacks
while (xW <= number) {
// print the number of spaces before a number
zW = spacesW ;
while (zW >= 0) {
System.out.print(" ") ;
zW-- ;
} // end while loop
// print out the numbers
yW = 0 ;
while (yW < xW * 2 - 1) {
System.out.print(xW) ;
yW++ ;
} // end while loop
System.out.println() ;
// spaces for the dashes
z1W = spacesW ;
while (z1W >= 0) {
System.out.print(" ") ;
z1W-- ;
} // end while loop
// print the dashes
y1W = 0 ;
while (y1W < xW * 2 - 1) {
System.out.print ("-") ;
y1W++ ;
} // end while loop
System.out.print("\n") ;
xW++ ;
spacesW--;
} // end while loop
// print stack using Do While Loops
System.out.println("Using the do while loop method.") ;
// variables for the while loop
int spacesDW = 0 ; // controls the number of spaces
int xDW = 1 ; // controls the number of rows for the for loop
int yDW = 0 ; // controls the number of numbers printed in the for loop
int zDW = 0 ; // controls the spaces before numbers for the for loop
int y1DW = 0 ; // controls the number of numbers of dashes in the for loop
int z1DW = 0 ; // controls the spaces before dashes for the for loop
spacesDW = number ;
// Controls the number of stacks
do {
// print spaces for numbers
zDW = spacesDW ;
do {
System.out.print (" ") ;
zDW-- ;
} while (zDW >= 0) ;
// print numbers
yDW = 0 ;
do {
System.out.print(xDW) ;
yDW++ ;
} while (yDW < xDW * 2 - 1) ;
System.out.println() ;
// print spaces for the dashes
z1DW = spacesDW ;
do {
System.out.print(" ") ;
z1DW-- ;
} while (z1DW >= 0) ;
// print the dashes
y1DW = 0 ;
do {
System.out.print("-") ;
y1DW++ ;
} while (y1DW < xDW * 2 - 1) ;
System.out.println () ;
xDW++ ;
spacesDW-- ;
} while (xDW <= number) ;
} // end main method
} // end class<file_sep>//////////////////////////////////////////////////////////////////////////////
// <NAME>
// [CSE002] Lab 09
// Methods.java
// October 24, 2014
/* Program uses three methods: getInt() larger() and ascending() in a code
that the user calls */
// import the scanner
import java.util.Scanner ;
// add class
public class Methods {
// add main method
public static void main(String [] args) {
// construct the scanner
Scanner scan = new Scanner (System.in) ;
// declare variables
int a , b , c ;
// prompt for entry
System.out.println("Enter 3 ints when prompted.") ;
// prompt the user for to enter the ints using the getInt Method
a = getInt(scan) ;
b = getInt(scan) ;
c = getInt(scan) ;
// checks which is the larger a or b
System.out.println("The larger of "+a+" and "+b+" is "+larger(a,b));
// checks what is the larger of a and b
System.out.println("The larger of "+a+", "+b+", and "+c+
" is "+larger(a,larger(b,c)));
// checks if the number is in ascending order
System.out.println("It is "+ascending(a,b,c)+" that "+a+", "+b+
", and "+c+" are in ascending order");
} // end main method
// getInt Method, prompts the user the enter an int and records it using the Scanner
public static int getInt(Scanner scan) {
System.out.print("Please enter an int: ") ;
int x ;
while (!scan.hasNextInt()) {
System.out.print("You did not enter an int, try again: ") ;
scan.next() ;
} // end while loop
return x = scan.nextInt() ;
} // end getInt() Method
// method to check the larger
public static int larger (int x, int y) {
if (x < y) { return y; }
if (y < x) { return x; }
return x ;
}// end the larger method
// method to check if the user entered ints are in ascending order
public static boolean ascending (int x, int y, int z){
if (x <= y && y <= x) {
return true ;
} // end if
else {
return false ;
} // end else
} // end ascending method
} // end class<file_sep>////////////////////////////////////////////////
// <NAME>
// [CSE 002]
// September 26, 2014
// Lab 05 - Random Games
// Import the Scanner
import java.util.Scanner ;
// add class
public class RandomGames {
// add main method
public static void main(String [] args) {
// declare instance of new scanner object
Scanner myScanner ;
// call new scanner constructor
myScanner = new Scanner(System.in) ;
// prompt for user input on the game
System.out.print ("Enter R or r for Roulette, C or c for craps, P or p for pick a card: ");
// collect user input
String userInput = myScanner.next () ;
// check that user input is R, r, C, c, P or p
if (userInput.equals ("R") || userInput.equals ("r")) {
int rouletteNumber = (int) (Math.random () * 37) ;
switch (rouletteNumber) {
case 37: System.out.println("Roulette: 00") ; break ;
default: System.out.println("Roulette: " + rouletteNumber); break ;
} // end switch statement
} // end if statement
else if (userInput.length () != 1) {
System.out.println ("A single Character is expected.") ;
return;
} // end else if statement
else if (userInput.equals ("C") || userInput.equals ("c")) {
System.out.println ("Craps option is yet to be impletmented.") ;
return;
} // end else if statement
else if (userInput.equals ("P") || userInput.equals ("p")) {
System.out.println ("Pick a card option is yet to be impletmented.") ;
return;
} // end else if statement
else {
System.out.println (userInput + " is not one of 'R', 'r', 'C', 'c', 'P', or 'p'") ;
} // end else statement
} // end main method
} // end class<file_sep>///////////////////////////////////////////////////////////////////////
// <NAME>
// [CSE 002]
// September 30, 2014
// User enters order into program with the choices of
// a burger, a soda or fries.
// The program then prompts the user for the details of each order.
// import scanner
import java.util.Scanner ;
// add class
public class BurgerKing {
// add main method
public static void main(String [] args) {
// declare instance of new scanner object
Scanner myScanner ;
// call scanner constructor
myScanner = new Scanner (System.in) ;
// prompt user for input
System.out.println("Enter a letter to indicate a choice of:") ;
System.out.println(" Burger (B or b)") ;
System.out.println(" Soda (S or s)") ;
System.out.print(" Fries (F or f): ") ;
// collect user input
String userInput = myScanner.next() ;
// check that only on character is entered
if (userInput.length () != 1) {
System.out.println ("A single character is expected") ;
return;
} // end if statement
// cast input as a char so that it may be used in a switch statement
char userInputC = userInput.charAt(0) ;
// switch to prompt results
switch (userInputC) {
// burger case one --> all other cases follow this design
case 'B': // prompt the user for input
System.out.println ("Enter A or a for 'all the fixins'") ;
System.out.println (" C or c for cheese") ;
System.out.print (" N or n for none of the above ") ;
// capture the user input
String burgerChoice = myScanner.next() ;
// test that it is on character
if (burgerChoice.length () != 1) {
System.out.println ("A single character is expected") ;
return;
} // end if statement
// cast as a char
char burgerChoiceC = burgerChoice.charAt (0) ;
// switch for burger choices
switch (burgerChoiceC) {
// make a caser for each of the possible results the user could have choosen
case 'A': System.out.println ("You ordered a burger with 'all the fixins'") ; break ;
case 'a': System.out.println ("You ordered a burger with 'all the fixins'") ; break ;
case 'C': System.out.println ("You ordered a burger with cheese") ; break ;
case 'c': System.out.println ("You ordered a burger with cheese") ; break ;
case 'N': System.out.println ("You ordered a plain burger") ; break ;
case 'n': System.out.println ("You ordered a plain burger") ; break ;
// make the default case tell the user that he / she did not enter the proper character
default : System.out.println("You did not enter 'A', 'a', 'C', 'c', 'N' or 'n'") ; break ;
} // end switch statement
break ; // end of case 'B'
// burger case number two
case 'b': System.out.println ("Enter A or a for 'all the fixins'") ;
System.out.println (" C or c for cheese") ;
System.out.print (" N or n for none of the above ") ;
String burgerChoiceb = myScanner.next() ;
// test that it is on character
if (burgerChoiceb.length () != 1) {
System.out.println ("A single character is expected") ;
return;
} // end if statement
// cast as a char
char burgerChoicebC = burgerChoiceb.charAt (0) ;
// switch for burger choices
switch (burgerChoicebC) {
case 'A': System.out.println ("You ordered a burger with 'all the fixins'") ; break ;
case 'a': System.out.println ("You ordered a burger with 'all the fixins'") ; break ;
case 'C': System.out.println ("You ordered a burger with cheese") ; break ;
case 'c': System.out.println ("You ordered a burger with cheese") ; break ;
case 'N': System.out.println ("You ordered a plain burger") ; break ;
case 'n': System.out.println ("You ordered a plain burger") ; break ;
default : System.out.println("You did not enter 'A', 'a', 'C', 'c', 'N' or 'n'") ; break ;
} // end switch statement
break ; // end of case 'b'
// soda case
case 'S': System.out.println ("Do you want Pepsi (P or p)") ;
System.out.print (" Coke (C or c), Sprite (S or s), or Mountain Dew (M or m): ") ;
String sodaChoice = myScanner.next() ;
// test that it is on character
if (sodaChoice.length () != 1) {
System.out.println ("A single character is expected") ;
return;
} // end if statement
// cast as a char
char sodaChoiceC = sodaChoice.charAt (0) ;
// switch for Soda choices
switch (sodaChoiceC) {
case 'P': System.out.println ("You ordered a Pepsi") ; break ;
case 'p': System.out.println ("You ordered a Pepsi") ; break ;
case 'C': System.out.println ("You ordered a Coke") ; break ;
case 'c': System.out.println ("You ordered a Coke") ; break ;
case 'S': System.out.println ("You ordered a Sprite") ; break ;
case 's': System.out.println ("You ordered a Sprite") ; break ;
case 'M': System.out.println ("You ordered a Mountain Dew") ; break ;
case 'm': System.out.println ("You ordered a Mountain Dew") ; break ;
default : System.out.println("You did not enter 'P', 'p', 'C', 'c', 'S' 's', 'M' or 'm'") ; break ;
} // end of switch statement
break ; // end of case 'S'
// soda case two
case 's': System.out.println ("Do you want Pepsi (P or p)") ;
System.out.print (" Coke (C or c), Sprite (S or s), or Mountain Dew (M or m): ") ;
String sodaChoices = myScanner.next() ;
// test that it is on character
if (sodaChoices.length () != 1) {
System.out.println ("A single character is expected") ;
return;
} // end if statement
// cast as a char
char sodaChoicesC = sodaChoices.charAt (0) ;
// switch for Soda choices
switch (sodaChoicesC) {
case 'P': System.out.println ("You ordered a Pepsi") ; break ;
case 'p': System.out.println ("You ordered a Pepsi") ; break ;
case 'C': System.out.println ("You ordered a Coke") ; break ;
case 'c': System.out.println ("You ordered a Coke") ; break ;
case 'S': System.out.println ("You ordered a Sprite") ; break ;
case 's': System.out.println ("You ordered a Sprite") ; break ;
case 'M': System.out.println ("You ordered a Mountain Dew") ; break ;
case 'm': System.out.println ("You ordered a Mountain Dew") ; break ;
default : System.out.println("You did not enter 'P', 'p', 'C', 'c', 'S', 's', 'M' or 'm'") ; break ;
} // end of switch statement
break ; // end of case 's'
// french fries case one
case 'F': System.out.print ("Do you want large or small order of fries (L, l, S or s): ") ;
String friesChoice = myScanner.next() ;
// test that it is on character
if (friesChoice.length () != 1) {
System.out.println ("A single character is expected") ;
return;
} // end if statement
// cast as a char
char friesChoiceC = friesChoice.charAt (0) ;
// switch for Soda choices
switch (friesChoiceC) {
case 'L': System.out.println ("You ordered a large fries") ; break ;
case 'l': System.out.println ("You ordered a large fries") ; break ;
case 'S': System.out.println ("You ordered a small fries") ; break ;
case 's': System.out.println ("You ordered a small fries") ; break ;
default : System.out.println("You did not enter 'L', 'l', 'S' or 's'") ; break ;
} // end of switch statement
break ; // end of case 'F'
// french fries case two
case 'f': System.out.print ("Do you want large or small order of fries (L, l, S or s): ") ;
String friesChoicef = myScanner.next() ;
// test that it is on character
if (friesChoicef.length () != 1) {
System.out.println ("A single character is expected") ;
return;
} // end if statement
// cast as a char
char friesChoicefC = friesChoicef.charAt (0) ;
// switch for Soda choices
switch (friesChoicefC) {
case 'L': System.out.println ("You ordered a large fries") ; break ;
case 'l': System.out.println ("You ordered a large fries") ; break ;
case 'S': System.out.println ("You ordered a small fries") ; break ;
case 's': System.out.println ("You ordered a small fries") ; break ;
default : System.out.println("You did not enter 'L', 'l', 'S' or 's'") ; break ;
} // end of switch statement
break ; // end of case 'f'
// default case of the initial switch tells the user that they did not enter one of the correct character choices
default: System.out.println ("You did not enter one of 'B', 'b', 'S', 's', 'F', 'f'") ; break;
} // end switch statement
} // end main method
} // end class
<file_sep>/////////////////////////////////////////////////////////////////////////////////
// <NAME>
// [CSE 002] Lab 07
// November 10, 2013
// Series of nested while loops and use of the break statement
// Prints out a number "*"'s based on user input
// import the scanner
import java.util.Scanner ;
// add class
public class LoopTheLoop {
// add main method
public static void main (String [] args) {
// create scanner
Scanner myScanner = new Scanner (System.in) ;
// declare variables
int nStars ;
int nStars2 ;
String playAgain ;
while (true) {
// prompt the user for input
System.out.print("Plese enter an int in the range (1-15): ") ;
nStars = myScanner.nextInt () ;
/* set second nStar variable equal to the first
(ensures it does not change the original during the following nested loops) */
nStars2 = nStars ;
// next loop prints out the total number of stars
while (nStars2 > 1) {
System.out.print("*") ;
nStars2-- ;
} // end loop
// prints first star of sequence
System.out.println ("*") ;
int A = 0;
while (A < nStars ) {
int B = A ;
// prints the cascading starts, increasing to the number that the user choose
while (B > 0) {
System.out.print("*") ;
B-- ;
} // end loop
System.out.println("*") ;
A++ ;
} // end loop
// prompt the user if they want to play again
System.out.print ("Enter 'y' of 'Y' to go again: ") ;
playAgain = myScanner.next() ;
// tests response and reruns the loop if the user chooses yes
if (playAgain.equals ("y")) {
} // end switch
else if (playAgain.equals ("Y")) {
}// end else if
else {
break ; // end the loop if the user chooses any other letter but y or Y
} // end else
} // end loop
} // end main method
} // end class
<file_sep>//////////////////////////////////
// <NAME>
// [CSE2]
// September 12, 2014
// lab 03 - bigMac.java
// Program computes the cost of buying a Big Mac by utilizing the scanner
//Import Scanner
import java.util.Scanner ;
// Add class
public class BigMac {
// Add Main Method
public static void main (String [] args ) {
// Declare an instance of the scanner object
Scanner myScanner ;
// Call scanner constructor
myScanner = new Scanner (System.in) ;
// Prompt the user for the number of the tickets
System.out.print("Enter the number of Big Macs (an integer > 0): ") ;
// Accept user input
int nBigMacs = myScanner.nextInt () ;
// Prompt the user for the cost of a Big Mac, sales tax and accept user input
System.out.print ("Enter the cost per Big Mac as" + " a double (in the form xx.xx): ") ;
double bigMac$ = myScanner.nextDouble () ;
System.out.print ("Enter the percent tax as a whole number (xx): ") ;
double taxRate = myScanner.nextDouble () ;
// Converts the whole number the user enters into a proportion
taxRate = taxRate / 100 ;
//Print Output
double cost$ ;
// Storing digits
int dollars,
dimes,
pennies ;
cost$ = nBigMacs * bigMac$ * (1 + taxRate) ;
// Dollar amount
dollars = (int) cost$ ;
// Dimes Amount
dimes = (int) (cost$ * 10) % 10 ;
// Pennies Amount
pennies = (int) (cost$ * 100) % 100 ;
System.out.println ("The total cost of " + nBigMacs + " Big Macs, at $" + bigMac$ + " per Big Mac, with a sales tax of " + (int) (taxRate * 100) + "%, is $" + dollars + "." + dimes + pennies) ;
} // End of Main Method
} // End of class <file_sep>////////////////////////////////////////////////////////
// <NAME>
// [CSE 002]
// September 30, 2014
// Three Booleans each with the value of true or false (randomly assigned) and || or && also randomly assigned
// import scanner
import java.util.Scanner ;
// add class
public class BoolaBoola {
// add main method
public static void main (String [] args) {
// declare new instance of scanner
Scanner myScanner ;
// call new scanner constructor
myScanner = new Scanner (System.in) ;
// choose six random numbers - these will be used to determine random true and false and random && and ||
int rand1 = (int) (Math.random () * 10) ;
int rand2 = (int) (Math.random () * 10) ;
int rand3 = (int) (Math.random () * 10) ;
// multiplying by 3 makes that random range (0, 3)
int rand4 = (int) (Math.random () * 3) ;
int rand5 = (int) (Math.random () * 3) ;
int rand6 = (int) (Math.random () * 3) ;
// delare booleans for the random true / false
boolean tfone ;
boolean tftwo ;
boolean tfthree ;
// randomly assign the 3 booleans
if (rand1 > 4) {
tfone = true ;
} // end if
else {
tfone = false ;
} // end else
if (rand2 < 4) {
tftwo = true ;
} // end if
else {
tftwo = false ;
} // end else
if (rand3 > 4) {
tfthree = true ;
} // end if
else {
tfthree = false ;
} // end else
// prompt for first question create the random booleans - four possibilities && ||, || &&, && &&, ||, ||
switch (rand4) {
case 0: // declare the necessary variable for the case zero (&& then ||)
boolean cZero = tfone && tftwo || tfthree ;
boolean answerTwo ;
boolean answerThree = false ;
// create loop to continue to prompt the use util he / she answers the question correctly
while (answerThree != true) {
// prompt for user input
System.out.print ("Does " + tfone + " && " + tftwo + " || " + tfthree + " have the value of true (t/T) or false (f/F)? ");
// cast input as a char
char answer = myScanner.next().charAt(0) ;
// start nested switch statement to analyze user input
switch (answer) {
// first two cases represent an answer of true (T or t)
case 't': // convert user answer into a boolean in this case it has to be tru
answerTwo = true ;
// test if the answer is correct, if it is print 'correct'
answerThree = (cZero == answerTwo) ;
if (answerThree == true){
System.out.println("Correct") ;
} // end if
// if answer is wrong prompt the user, this starts the loop over continuously until the correct answer is entered
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'T': answerTwo = true ;
answerThree = (cZero == answerTwo) ;
if (answerThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
// Second two cases represent an answer of False (F or f)
case 'F': answerTwo = false ;
answerThree = (cZero == answerTwo) ;
if (answerThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'f': answerTwo = false ;
answerThree = (cZero == answerTwo) ;
if (answerThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
// making the default case a wrong answer catches any input that it not T, t, F or f and starts the loop over until the correct answer is entered
default: System.out.println("Wrong; Guess again!"); break;
} // end answer switch
} // end loop
break ;
// second case, which is stated by the random variable 1, is || followed by &&
case 1: boolean cOne = tfone || tftwo && tfthree ;
boolean cOneaTwo ;
boolean cOneaThree = false ;
while (cOneaThree != true) {
System.out.print ("Does " + tfone + " || " + tftwo + " && " + tfthree + " have the value of true (t/T) or false (f/F)? ");
char answer = myScanner.next().charAt(0) ;
switch (answer) {
case 't': cOneaTwo = true ;
cOneaThree = (cOne == cOneaTwo) ;
if (cOneaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'T': cOneaTwo = true ;
cOneaThree = (cOne == cOneaTwo) ;
if (cOneaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'F': cOneaTwo = false ;
cOneaThree = (cOne == cOneaTwo) ;
if (cOneaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'f': cOneaTwo = false ;
cOneaThree = (cOne == cOneaTwo) ;
if (cOneaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
default: System.out.println("Wrong; Guess again!"); break;
} // end answer switch
} // end loop
break ;
case 2: boolean cTwo = tfone || tftwo && tfthree ;
boolean cTwoaTwo ;
boolean cTwoaThree = false ;
while (cTwoaThree != true) {
System.out.print ("Does " + tfone + " && " + tftwo + " && " + tfthree + " have the value of true (t/T) or false (f/F)? ");
char answer = myScanner.next().charAt(0) ;
switch (answer) {
case 't': cTwoaTwo = true ;
cTwoaThree = (cTwo == cTwoaTwo) ;
if (cTwoaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'T': cTwoaTwo = true ;
cTwoaThree = (cTwo == cTwoaTwo) ;
if (cTwoaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'F': cTwoaTwo = false ;
cTwoaThree = (cTwo == cTwoaTwo) ;
if (cTwoaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'f': cTwoaTwo = false ;
cTwoaThree = (cTwo == cTwoaTwo) ;
if (cTwoaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
default: System.out.println("Wrong; Guess again!"); break;
} // end answer switch
} // end loop
break ;
case 3: boolean cThree = tfone || tftwo && tfthree ;
boolean cThreeaTwo ;
boolean cThreeaThree = false ;
while (cThreeaThree != true) {
System.out.print ("Does " + tfone + " && " + tftwo + " && " + tfthree + " have the value of true (t/T) or false (f/F)? ");
char answer = myScanner.next().charAt(0) ;
switch (answer) {
case 't': cThreeaTwo = true ;
cThreeaThree = (cThree == cThreeaTwo) ;
if (cThreeaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'T': cThreeaTwo = true ;
cThreeaThree = (cThree == cThreeaTwo) ;
if (cThreeaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'F': cThreeaTwo = false ;
cThreeaThree = (cThree == cThreeaTwo) ;
if (cThreeaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'f': cThreeaTwo = false ;
cThreeaThree = (cThree == cThreeaTwo) ;
if (cThreeaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
default: System.out.println("Wrong; Guess again!"); break;
} // end answer switch
} // end loop
break ;
} //end switch
// prompt for second question
switch (rand5) {
case 0: boolean cZero = tfone && tftwo || tfthree ;
boolean answerTwo ;
boolean answerThree = false ;
while (answerThree != true) {
System.out.print ("Does " + tfone + " && " + tftwo + " || " + tfthree + " have the value of true (t/T) or false (f/F)? ");
char answer = myScanner.next().charAt(0) ;
switch (answer) {
case 't': answerTwo = true ;
answerThree = (cZero == answerTwo) ;
if (answerThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'T': answerTwo = true ;
answerThree = (cZero == answerTwo) ;
if (answerThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'F': answerTwo = false ;
answerThree = (cZero == answerTwo) ;
if (answerThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'f': answerTwo = false ;
answerThree = (cZero == answerTwo) ;
if (answerThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
default: System.out.println("Wrong; Guess again!"); break;
} // end answer switch
} // end loop
break ;
case 1: boolean cOne = tfone || tftwo && tfthree ;
boolean cOneaTwo ;
boolean cOneaThree = false ;
while (cOneaThree != true) {
System.out.print ("Does " + tfone + " || " + tftwo + " && " + tfthree + " have the value of true (t/T) or false (f/F)? ");
char answer = myScanner.next().charAt(0) ;
switch (answer) {
case 't': cOneaTwo = true ;
cOneaThree = (cOne == cOneaTwo) ;
if (cOneaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'T': cOneaTwo = true ;
cOneaThree = (cOne == cOneaTwo) ;
if (cOneaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'F': cOneaTwo = false ;
cOneaThree = (cOne == cOneaTwo) ;
if (cOneaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'f': cOneaTwo = false ;
cOneaThree = (cOne == cOneaTwo) ;
if (cOneaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
default: System.out.println("Wrong; Guess again!"); break;
} // end answer switch
} // end loop
break ;
case 2: boolean cTwo = tfone || tftwo && tfthree ;
boolean cTwoaTwo ;
boolean cTwoaThree = false ;
while (cTwoaThree != true) {
System.out.print ("Does " + tfone + " && " + tftwo + " && " + tfthree + " have the value of true (t/T) or false (f/F)? ");
char answer = myScanner.next().charAt(0) ;
switch (answer) {
case 't': cTwoaTwo = true ;
cTwoaThree = (cTwo == cTwoaTwo) ;
if (cTwoaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'T': cTwoaTwo = true ;
cTwoaThree = (cTwo == cTwoaTwo) ;
if (cTwoaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'F': cTwoaTwo = false ;
cTwoaThree = (cTwo == cTwoaTwo) ;
if (cTwoaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'f': cTwoaTwo = false ;
cTwoaThree = (cTwo == cTwoaTwo) ;
if (cTwoaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
default: System.out.println("Wrong; Guess again!"); break;
} // end answer switch
} // end loop
break ;
case 3: boolean cThree = tfone || tftwo && tfthree ;
boolean cThreeaTwo ;
boolean cThreeaThree = false ;
while (cThreeaThree != true) {
System.out.print ("Does " + tfone + " && " + tftwo + " && " + tfthree + " have the value of true (t/T) or false (f/F)? ");
char answer = myScanner.next().charAt(0) ;
switch (answer) {
case 't': cThreeaTwo = true ;
cThreeaThree = (cThree == cThreeaTwo) ;
if (cThreeaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'T': cThreeaTwo = true ;
cThreeaThree = (cThree == cThreeaTwo) ;
if (cThreeaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'F': cThreeaTwo = false ;
cThreeaThree = (cThree == cThreeaTwo) ;
if (cThreeaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'f': cThreeaTwo = false ;
cThreeaThree = (cThree == cThreeaTwo) ;
if (cThreeaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
default: System.out.println("Wrong; Guess again!"); break;
} // end answer switch
} // end loop
break ;
} //end switch
// prompt for third question
switch (rand6) {
case 0: boolean cZero = tfone && tftwo || tfthree ;
boolean answerTwo ;
boolean answerThree = false ;
while (answerThree != true) {
System.out.print ("Does " + tfone + " && " + tftwo + " || " + tfthree + " have the value of true (t/T) or false (f/F)? ");
char answer = myScanner.next().charAt(0) ;
switch (answer) {
case 't': answerTwo = true ;
answerThree = (cZero == answerTwo) ;
if (answerThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'T': answerTwo = true ;
answerThree = (cZero == answerTwo) ;
if (answerThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'F': answerTwo = false ;
answerThree = (cZero == answerTwo) ;
if (answerThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'f': answerTwo = false ;
answerThree = (cZero == answerTwo) ;
if (answerThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
default: System.out.println("Wrong; Guess again!"); break;
} // end answer switch
} // end loop
break ;
case 1: boolean cOne = tfone || tftwo && tfthree ;
boolean cOneaTwo ;
boolean cOneaThree = false ;
while (cOneaThree != true) {
System.out.print ("Does " + tfone + " || " + tftwo + " && " + tfthree + " have the value of true (t/T) or false (f/F)? ");
char answer = myScanner.next().charAt(0) ;
switch (answer) {
case 't': cOneaTwo = true ;
cOneaThree = (cOne == cOneaTwo) ;
if (cOneaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'T': cOneaTwo = true ;
cOneaThree = (cOne == cOneaTwo) ;
if (cOneaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'F': cOneaTwo = false ;
cOneaThree = (cOne == cOneaTwo) ;
if (cOneaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'f': cOneaTwo = false ;
cOneaThree = (cOne == cOneaTwo) ;
if (cOneaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
default: System.out.println("Wrong; Guess again!"); break;
} // end answer switch
} // end loop
break ;
case 2: boolean cTwo = tfone || tftwo && tfthree ;
boolean cTwoaTwo ;
boolean cTwoaThree = false ;
while (cTwoaThree != true) {
System.out.print ("Does " + tfone + " && " + tftwo + " && " + tfthree + " have the value of true (t/T) or false (f/F)? ");
char answer = myScanner.next().charAt(0) ;
switch (answer) {
case 't': cTwoaTwo = true ;
cTwoaThree = (cTwo == cTwoaTwo) ;
if (cTwoaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'T': cTwoaTwo = true ;
cTwoaThree = (cTwo == cTwoaTwo) ;
if (cTwoaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'F': cTwoaTwo = false ;
cTwoaThree = (cTwo == cTwoaTwo) ;
if (cTwoaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'f': cTwoaTwo = false ;
cTwoaThree = (cTwo == cTwoaTwo) ;
if (cTwoaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
default: System.out.println("Wrong; Guess again!"); break;
} // end answer switch
} // end loop
break ;
case 3: boolean cThree = tfone || tftwo && tfthree ;
boolean cThreeaTwo ;
boolean cThreeaThree = false ;
while (cThreeaThree != true) {
System.out.print ("Does " + tfone + " && " + tftwo + " && " + tfthree + " have the value of true (t/T) or false (f/F)? ");
char answer = myScanner.next().charAt(0) ;
switch (answer) {
case 't': cThreeaTwo = true ;
cThreeaThree = (cThree == cThreeaTwo) ;
if (cThreeaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'T': cThreeaTwo = true ;
cThreeaThree = (cThree == cThreeaTwo) ;
if (cThreeaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'F': cThreeaTwo = false ;
cThreeaThree = (cThree == cThreeaTwo) ;
if (cThreeaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
case 'f': cThreeaTwo = false ;
cThreeaThree = (cThree == cThreeaTwo) ;
if (cThreeaThree == true){
System.out.println("Correct") ;
} // end if
else {
System.out.println("Wrong; Guess again!");
} // end else
break ;
default: System.out.println("Wrong; Guess again!"); break;
} // end answer switch
} // end loop
break ;
} //end switch
} // end main method
} // end class<file_sep>////////////////////////////////////////////////////////////
// <NAME>
// [CSE 002]
// Homework 04 - Program #4: Time Conversion with Padded Zeros
// September 23, 2014
// import scanner
import java.util.Scanner ;
// add class
public class TimePadding {
// add main method
public static void main(String [] args) {
// declare instance of scanner object
Scanner myScanner ;
// call scanner constructor
myScanner = new Scanner(System.in) ;
// prompt user for input
System.out.print ("Enter the time in seconds: ") ;
int time ;
// check that the input is an int
if (myScanner.hasNextInt ()) {
time = myScanner.nextInt () ;
} // end if statement
else {
System.out.println ("You did not enter an int.") ;
return ;
} // end else statement
// check that the input is positive
if (time < 0) {
System.out.println ("You did not enter a positive int.") ;
} // end if statemnt
// strip hours
int timeHours = (int) ((time / 60 / 60) - (time % (60 / 60))) ;
// strip minutes
int timeMinutes = (int) ((time - (timeHours * 60 * 60)) / 60) ;
// strip seconds
int timeSeconds = (int) (time - ((timeHours * 60 * 60) + (timeMinutes * 60))) ;
// pad the times
if (timeSeconds < 10 && timeMinutes < 10) {
System.out.println ("The time is: " + timeHours + ":" + 0 + timeMinutes + ":" + 0 + timeSeconds) ;
} // end if statement
else if (timeSeconds < 0 && timeMinutes > 0) {
System.out.println ("The time is: " + timeHours + ":" + timeMinutes + ":" + 0 + timeSeconds) ;
} // end else if statement
else if (timeSeconds > 0 && timeMinutes < 0) {
System.out.println ("The time is: " + timeHours + ":" + 0 + timeMinutes + ":" + timeSeconds) ;
} // end else if statement
else {
System.out.println ("The time is: " + timeHours + ":" + timeMinutes + ":" + timeSeconds) ;
} // end else statement
} // end main method
} // end class<file_sep>/////////////////////////////////
// <NAME>
// [CSE 002]
// September 19, 2014
// lab 04 - Big Mac Again
// Import Scanner
import java.util.Scanner ;
// Add class
public class BigMacAgain {
// main method required for every Java program
public static void main(String [] args) {
// declare instance of the scanner object
Scanner myScanner ;
// call scanner constructer
myScanner = new Scanner(System.in) ;
// declare the price of a big mac and the price of fries
double priceBigMac = 2.22 ;
double priceFries = 2.15 ;
// prompt user for the number of big macs in the form of an int
System.out.print("Enter the number of Big Macs: ") ;
int nBigMacs ;
// check user input if it is an int (f)
if (myScanner.hasNextInt()) {
nBigMacs = myScanner.nextInt () ;
} // close if
else {
System.out.println("You did not enter an int") ;
return ; //leaves the program, i.e. the program terminates
} //close else statement
// check to make sure the number entered is greater than zero (g)
if (nBigMacs > 0) {
// total price of Big Mac and formatting
double bigMacOrder$ = nBigMacs * priceBigMac ;
int bigMacOrderForm = (int) (bigMacOrder$ * 100) ;
System.out.println ("You ordered " + nBigMacs + " Big Macs for a cost of " +
nBigMacs + " x $" + priceBigMac + " = $" + (bigMacOrderForm / 100.0)) ;
} // close if statement
else {
System.out.println ("You did not enter an int > zero") ;
return ;
} // close else statement
// total price of Big Mac and formatting
double bigMacOrder$ = nBigMacs * priceBigMac ;
int bigMacOrderForm = (int) (bigMacOrder$ * 100) ;
System.out.print ("Do you want an order of fries (Y/y/N/n)? ") ;
String answer = myScanner.next() ;
if ((answer.equals("Y")) || (answer.equals ("y"))) {
System.out.println("You ordered fries at a cost of $" + priceFries) ;
System.out.println("The total cost of the meal is $" + ((bigMacOrderForm / 100.0) + priceFries)) ;
} // end of if
else if ((answer.equals("N")) || (answer.equals("n"))) {
System.out.println ("The total cost of the meal is $" + (bigMacOrderForm / 100.0)) ;
} // end of else if statement
else {
System.out.println("You did not enter one of 'Y', 'y', 'N', 'n'.") ;
return ;
} // end of else statement
} // end of main method
} // end of class <file_sep>////////////////////////
// <NAME>
// CSE 02 Homework 02
// September 9, 2014
public class Arithmetic {
public static void main (String [] args){
//Number of socks
int nSocks = 3 ;
//Cost per pair of socks
double sockCost$ = 2.58 ;
//Number of drinking glasses
int nGlasses = 6 ;
//Cost per glass
double glassesCost$ = 2.29 ;
//Number of boxes of envelops
int nEnvelopes = 1 ;
//Cost per box of envelopes
double envelopesCost$ = 3.25 ;
//Tax rate
double taxPercent = .06 ;
//Pre-tax total cost of all itmes
double totalSockCost$ = (nSocks * sockCost$) ;
double totalGlassesCost$ = (nGlasses * glassesCost$) ;
double totalEnvelopesCost$ = (nEnvelopes * envelopesCost$) ;
//Formated pre-tax total cost of all items
int totalSockCostForm = (int) (totalSockCost$ * 100) ;
int totalGlassesCostForm = (int) (totalGlassesCost$ * 100) ;
int totalEnvelopesCostForm = (int) (totalEnvelopesCost$ * 100) ;
//Taxes per item
double singleSockTax$ = (sockCost$ * taxPercent) ;
double singleGlassTax$ = (glassesCost$ * taxPercent) ;
double singleEnvelopeTax$ = (envelopesCost$ * taxPercent) ;
//Formatted taxes per item
int singleSockTaxForm = (int) (singleSockTax$ * 100) ;
int singleGlassTaxForm = (int) (singleGlassTax$ * 100) ;
int singleEnvelopeTaxForm = (int) (singleEnvelopeTax$ * 100) ;
//Taxes on all items
double sockTax$ = (totalSockCost$ * taxPercent) ;
double glassesTax$ = (totalGlassesCost$ * taxPercent) ;
double envelopesTax$ = (totalEnvelopesCost$ * taxPercent) ;
//Formatted taxes on all items
int sockTaxForm = (int) (sockTax$ * 100) ;
int glassesTaxForm = (int) (glassesTax$ * 100) ;
int envelopesTaxForm = (int) (envelopesTax$ * 100) ;
//After-tax cost of all items
double socksAfterTax$ = (totalSockCost$ + sockTax$) ;
double glassesAfterTax$ = (totalGlassesCost$ + glassesTax$) ;
double envelopesAfterTax$ = (totalEnvelopesCost$ + envelopesTax$) ;
//Formatted after-tax cost of all items
int socksAfterTaxForm = (int) (socksAfterTax$ * 100) ;
int glassesAfterTaxForm = (int) (glassesAfterTax$ * 100) ;
int envelopesAfterTaxForm = (int) (envelopesAfterTax$ * 100) ;
//Print out of results --> (1) item being purchases (2) how many of that items are being purchsed (3) the cost per item
//(4) the sales tax for that item (5) the pre-tax cost of the purchase (6) the total sales tax (7) the after-tax total cost
//Socks
System.out.println ("Item: " + "Socks") ;
System.out.println ("Units Purchsed: " + nSocks) ;
System.out.println ("Unit Cost: " + "$" + sockCost$) ;
System.out.println ("Sales Tax: " + "$" + singleSockTaxForm / 100.0) ;
System.out.println ("Gross Cost: " + "$" + totalSockCostForm / 100.0) ;
System.out.println ("Total Tax: " + "$" + sockTaxForm / 100.0) ;
System.out.println ("Net Cost: " + "$" + socksAfterTaxForm / 100.0) ;
System.out.println ("_________________________________") ;
System.out.println (" ") ;
//Glasses
System.out.println ("Item: " + "Glasses") ;
System.out.println ("Units Purchsed: " + nGlasses) ;
System.out.println ("Unit Cost: " + "$" + glassesCost$) ;
System.out.println ("Sales Tax: " + "$" + singleGlassTaxForm / 100.0) ;
System.out.println ("Gross Cost: " + "$" + totalGlassesCostForm / 100.0) ;
System.out.println ("Total Tax: " + "$" + glassesTaxForm / 100.0) ;
System.out.println ("Net Cost: " + "$" + glassesAfterTaxForm / 100.0) ;
System.out.println ("_________________________________") ;
System.out.println (" ") ;
//Envelopes
System.out.println ("Item: " + "Envelopes") ;
System.out.println ("Units Purchsed: " + nEnvelopes) ;
System.out.println ("Unit Cost: " + "$" + envelopesCost$) ;
System.out.println ("Sales Tax: " + "$" + singleEnvelopeTaxForm / 100.0) ;
System.out.println ("Gross Cost: " + "$" + totalEnvelopesCostForm / 100.0) ;
System.out.println ("Total Tax: " + "$" + envelopesTaxForm / 100.0) ;
System.out.println ("Net Cost: " + "$" + envelopesAfterTaxForm / 100.0) ;
System.out.println ("_________________________________") ;
System.out.println (" ") ;
} //end of main method
} //end of class<file_sep>/////////////////////////////////////////////////////////////////////////////////////
// <NAME>
// [CSE 002] - Homework 6
// Program randomly generates a number that lies on a roulette wheel, then it randomly
// Chooses one of those numbers 100 times
// The program then runs a simulation 10,000 times (i.e. a monte carlo simulation)
// add class
public class Roulette {
// add main method
public static void main (String [] args) {
// declare needed variable
int spin ; //result of the spin on a roulette wheel
int choice ; // players random choice
int money = 1 ; // amount of money the player has
int counter1 = 0 ; // stores the number of spins (100 spins)
int counter2 = 0 ; // stores the number of times the stategy is run (1,000 times)
int looseEverything = 0 ; // stores number of times you lost everything
int profit = 0 ; // stores the number of sessions where you profit
int totalProfit = 0 ; // stores the total profit
// run the strategy 1,000 times
while (counter2 < 1000) {
// resets money and counter1 to zero
money = 0 ;
counter1 = 0 ;
// runs 100 spins for the strategy
while (counter1 < 100) {
/* make a randomly generated number between 1 and 37
37 is equivalent to double zero
this is the result of a fair spin on a roulette wheel */
spin = (int) (Math.random () * 38) ;
// players choice of number
choice = (int) (Math.random () * 38) ;
// test if player wins
if (spin == choice) {
money += 35 ;
} // end if
else {
--money ;
} // end else
++counter1 ;
} // end loop
// check how many times you lost all 100 spins
if (money == -100) {
++looseEverything ;
} // end if statement
if (money > 0) {
++profit ;
} // end if statement
// records money to total profit
totalProfit += money ;
// add one to the counter for the loop
counter2++ ;
} // end loop
System.out.println ("Total profit is: $" + totalProfit) ;
System.out.println ("Your number never came up: " + looseEverything + " times") ;
System.out.println ("You where profitable in " + profit + " strategies out of " + counter2) ;
} // end main method
} // end class
|
2f1162fecfd1e1b4012e20949ce9733ef6a38593
|
[
"Java"
] | 12
|
Java
|
apiccione/CSE2
|
31edaf6af2c13af7ae852008d2ed304a10341499
|
7f8da14575c91f060cbcd7e458273a1347e2821f
|
refs/heads/master
|
<file_sep><?php namespace App\Services;
use Event;
use App\Random;
use Exception;
use Tymon\JWTAuth\Facades\JWTAuth;
/**
* Class AuthService
* @package Hoopla\Services
*/
class AuthService
{
/**
* @param $data
* @return array
*/
public function login($data)
{
$credentials = [
'email' => strtolower(array_get($data, 'email')),
'password' => array_get($data, 'password')
];
if (!$token = $this->returnToken($credentials)) {
$response = Event::fire('tymon.jwt.user_not_found', 'user_not_found', true);
}
return [JWTAuth::authenticate($token), $token];
}
/**
* @param $token
* @return bool
* @throws Exception
*/
public function logout($token)
{
if (!$token) {
throw new Exception('THERE WAS AN ERROR LOGGING THIS USER OUT', 500);
}
$token = str_replace("Bearer ", "", $token);
JWTAuth::invalidate($token);
return true;
}
/**
* @param $credentials
* @return mixed
*/
public function returnToken($credentials)
{
$claims = ['jti' => md5($credentials['email'] . time() . Random::quick())];
return JWTAuth::attempt($credentials, $claims);
}
}
<file_sep><?php namespace App\Repositories;
use App\Services\AuthService;
use App\User;
use Auth;
use Exception;
use Illuminate\Support\Facades\Hash;
class AuthRepository extends BaseRepository
{
protected $authService;
public function __construct(AuthService $authService){
$this->authService = $authService;
}
public function model()
{
return 'App\User';
}
public function getUser(){
return Auth::user();
}
public function register($email, $password)
{
$email = strtolower($email);
$user = User::where('email', $email)->count();
if ($user) {
throw new Exception('USER ALREADY EXISTS', 400);
}
$user = User::create([
'email' => $email,
'password' => <PASSWORD>($<PASSWORD>)
]);
if (!isset($user)) {
throw new Exception('ERROR SAVING USER', 400);
}
return $user;
}
public function registerUser($request){
$user = $this->register(
$request->email,
$request->password
);
return $user;
}
}
<file_sep><?php namespace App\Transformers;
use League\Fractal;
use League\Fractal\TransformerAbstract;
class BaseTransformer extends TransformerAbstract{
protected $defaultIncludes = [];
public function __construct($defaultIncludes = [])
{
$this->defaultIncludes = $defaultIncludes;
}
}
<file_sep>var app = angular.module('time-app', ['ngRoute']);
//Routes
app.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/front-page.html',
controller: 'frontPageController'
})
.when('/login', {
templateUrl: 'views/login.html',
controller: 'loginController'
});
}])
.controller('frontPageController', function ($scope, $http) {
})
.controller('loginController', function ($scope, remoteService) {
$scope.formSubmit = function () {
if (!$scope.loginForm.$invalid) {
remoteService.loginUser($scope.user.email, $scope.user.password)
.then(function(resp){
console.log(resp);
})
.catch(function(){
alert("There was an error logging you in.");
});
}
}
})
.factory('remoteService', function ($http) {
var output = {};
var url = "http://time.dev/api";
output.loginUser = function(email, password){
return $http.get(url+"/auth/login?email="+email+"&password="+password)
};
return output;
});
<file_sep><?php namespace App\Repositories;
use App\Contracts\RepositoryInterface;
use Exception;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Support\Str;
use Jenssegers\Mongodb\Collection;
abstract class BaseRepository implements RepositoryInterface
{
private $app;
protected $model;
public function __construct()
{
$this->app = app();
$this->makeModel();
}
abstract function model();
public function makeModel()
{
$model = $this->app->make($this->model());
if (!$model instanceof Model) {
throw new Exception("Class {$this->model()} must be an instance of Illuminate\\Database\\Eloquent\\Model");
}
return $this->model = $model;
}
/**
* Return all records for a model.
*
* @param array $columns
*
* @return mixed
*/
public function getAll($columns = ['*'], $options = [])
{
return $this->model->get($columns);
}
public function getByMany(array $attribute_values, $columns = ['*'])
{
$instance = $this->model;
foreach ($attribute_values as $attribute => $value) {
$instance = $instance->where($attribute, $value);
}
return $instance->get();
}
/**
* Create a new entity.
*
* @param array $data
*
* @return mixed
*/
public function createObject(array $data)
{
return $this->model->create($data);
}
/**
* Find an entity and update it.
*
* @param array $data
* @param $id
* @param string $attribute
*
* @return mixed
*/
public function updateById(array $data, $id, $attribute = "id")
{
$instance = $this->findById($id);
$instance->update($data);
return $instance;
}
/**
* Delete an entity.
*
* @param $id
*
* @return mixed
*/
public function deleteById($id)
{
return $this->model->destroy($id);
}
/**
* Find an entity or throw an error.
*
* @param $id
* @param array $columns
*
* @return mixed
* @throws Exception
*/
public function findById($id, $columns = ['*'])
{
try {
$instance = $this->model->findOrFail($id);
if ($instance instanceof Collection) {
$instance = $instance->first();
}
return $instance;
} catch (ModelNotFoundException $e) {
throw new Exception(strtoupper($this->modelName()) . ' NOT FOUND');
}
}
public function findBySlug($slug)
{
try{
return $this->model->where('slug', '=', $slug)->firstOrFail(['*']);
}catch(ModelNotFoundException $e){
return false;
}
}
/**
* Find an entity by attribute or throw an error.
*
* @param $attribute
* @param $value
* @param array $columns
*
* @return mixed
* @throws Exception
*/
public
function findBy(
$attribute,
$value,
$columns = ['*']
) {
try {
return $this->model->where($attribute, '=', $value)->firstOrFail($columns);
} catch (ModelNotFoundException $e) {
throw new Exception(strtoupper($this->modelName()) . ' NOT FOUND');
}
}
/**
* Loop through our attributes and values to create a query.
*
* @param array $attribute_values
* @param array $columns
*
* @return mixed
* @throws Exception
*/
public
function findByMany(
array $attribute_values,
$columns = ['*']
) {
try {
$instance = $this->model;
foreach ($attribute_values as $attribute => $value) {
$instance = $instance->where($attribute, $value);
}
return $instance->firstOrFail();
} catch (ModelNotFoundException $e) {
throw new Exception(strtoupper($this->modelName()) . ' NOT FOUND');
}
}
/**
* Return just the name of the model.
*
* @return mixed
*/
protected
function modelName()
{
return last(explode('\\', $this->model()));
}
protected
function convertKeysToSnakeCase(
array $dirty = []
) {
$clean = [];
foreach ($dirty as $key => $value) {
$clean[Str::snake($key)] = $value;
}
return $clean;
}
}
<file_sep><?php namespace App\Http\Controllers;
use App\Repositories\AuthRepository;
use App\Services\AuthService;
use App\Transformers\UserTransformer;
use Illuminate\Http\Request;
use Sorskod\Larasponse\Larasponse;
class AuthController extends Controller
{
private $repo;
protected $response;
protected $authService;
public function __construct(
AuthRepository $repo,
Larasponse $response,
AuthService $authService
) {
$this->repo = $repo;
$this->response = $response;
$this->authService = $authService;
}
public function authenticate(Request $request)
{
list($user, $token) = $this->authService->login([
'email' => strtolower($request->get('email')),
'password' => $<PASSWORD>('<PASSWORD>')
]);
return $this->jsonResponse(
$this->response->item(
$user,
new UserTransformer())
, 201, [
'Authorization' => 'Bearer ' . $token
]);
}
public function logout(Request $request){
return $this->jsonResponse(['success' => $this->authService->logout($request->headers->get('Authorization'))]);
}
public function loggedUser(){
return $this->jsonResponse(
$this->response->item(
$this->repo->getUser(),
new UserTransformer()
)
);
}
public function register(Request $request){
return $this->jsonResponse(
$this->response->item(
$this->repo->registerUser($request),
new UserTransformer()
)
);
}
}
<file_sep><?php namespace App\Transformers;
use App\User;
class UserTransformer extends BaseTransformer
{
public function transform(User $page)
{
return [
'id' => $page->id,
'name' => $page->name,
'email' => $page->email,
'updatedAt' => $page->updated_at->toIso8601String(),
'createdAt' => $page->created_at->toIso8601String()
];
}
}
<file_sep><?php
Route::any('/', function () {
return view('app');
});
Route::group([
'prefix' => 'api'
], function () {
/*
* AUTHENTICATION FUNCTIONS
*/
Route::group([
'prefix' => 'auth'
], function () {
Route::any('login', 'AuthController@authenticate');
Route::any('logout', 'AuthController@logout');
});
// Admin Functions
Route::group([
'prefix' => 'admin',
// 'middleware' => ['jwt.auth']
], function () {
Route::group([
'prefix' => 'auth'
], function () {
Route::any('user', 'AuthController@loggedUser');
Route::any('create', 'AuthController@register');
});
});
});
<file_sep><?php namespace App;
class Random
{
public static function quick($length = 8, $pool = '23456789abcdefghijkmnpqrstuvwxyzABCDEFGHIJKMNPQRSTUVWXYZ')
{
return substr(str_shuffle(str_repeat($pool, $length)), 0, $length);
}
}
<file_sep><?php namespace App;
use Jenssegers\Mongodb\Model as Eloquent;
class BaseModel extends Eloquent
{
protected $fillable = [];
public static function boot()
{
parent::boot();
$called_class = get_called_class();
$ignored = [
'BaseModel',
'Device',
'Moderation',
'News',
'UserSession'
];
if (in_array($called_class, $ignored)) {
return;
}
$callback = function () {
};
self::saved($callback);
self::deleted($callback);
}
public function valueToBoolean($value)
{
return filter_var($value, FILTER_VALIDATE_BOOLEAN);
}
public function attributesToArray()
{
$model_data = parent::attributesToArray();
if (isset($model_data['_id'])) {
$model_data['id'] = $this->_id;
}
return $model_data;
}
public function returnFillable()
{
return self::$fillable;
}
}
<file_sep><?php namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesCommands;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Response;
abstract class Controller extends BaseController
{
use DispatchesCommands, ValidatesRequests;
protected $request_exclusions = ['tokenServerSession', 'headers', 'token'];
protected function jsonResponse($response_data, $status = 200, $headers = [])
{
return Response::json($response_data, $status, $headers);
}
}
<file_sep><?php namespace App;
use Illuminate\Auth\Authenticatable;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
class User extends BaseModel implements AuthenticatableContract, CanResetPasswordContract
{
use Authenticatable, CanResetPassword;
protected $collection = 'users';
protected $fillable = ['name', 'email', 'password'];
protected $hidden = ['password'];
public function pages()
{
return $this->hasMany('App\Page');
}
public function getAuthIdentifier()
{
return $this->getKey();
}
public function getAuthPassword()
{
return $this->password;
}
public function getRememberToken()
{
return $this->remember_token;
}
public function setRememberToken($value)
{
$this->remember_token = $value;
}
}
<file_sep><?php namespace App\Contracts;
/**
* Interface RepositoryInterface
* @package Hoopla\Repositories\Contracts
*/
interface RepositoryInterface
{
/**
* @param array $columns
* @return mixed
*/
public function getAll($columns = ['*'], $options = []);
/**
* @param array $data
* @return mixed
*/
public function createObject(array $data);
/**
* @param array $data
* @param $id
* @return mixed
*/
public function updateById(array $data, $id);
/**
* @param $id
* @return mixed
*/
public function deleteById($id);
/**
* @param $id
* @param array $columns
* @return mixed
*/
public function findById($id, $columns = ['*']);
/**
* @param $field
* @param $value
* @param array $columns
* @return mixed
*/
public function findBy($field, $value, $columns = ['*']);
/**
* @param array $attribute_values
* @param array $columns
* @return mixed
*/
public function findByMany(array $attribute_values, $columns = ['*']);
public function findBySlug($slug);
}
|
2b38167641d3cf6ba7579c22faf99d0036b8cbd2
|
[
"JavaScript",
"PHP"
] | 13
|
PHP
|
ajoelp/Laravel-Api-Mongo
|
800701f74b044a54adcdb38bb1c22ce5deaaa8a8
|
3a3152589a043fd70e361e0fddca17aba8e4ae8a
|
refs/heads/master
|
<file_sep>package main
import "fmt"
func main() {
var c, pyhon, java bool
var i int
fmt.Println(i, c, pyhon, java)
}
<file_sep>// +build ignore
// +debug ignore
package main
import (
"fmt"
"math"
)
func add(x int, y int) int {
return x + y
}
func pi() float32 {
return (math.Pi)
}
func main() {
fmt.Printf("%d\n", add(3, 4))
fmt.Printf("%f", pi())
}
<file_sep>package main
import (
"fmt"
"net/http"
"github.com/gin-gonic/gin"
)
func main() {
fmt.Println(http.StatusOK)
r := gin.Default()
r.LoadHTMLGlob("template/*.html")
r.GET("/hello", func(c *gin.Context) {
c.HTML(http.StatusOK, "hello.html", gin.H{})
})
r.Run()
fmt.Println("Hello")
}
|
99a74ee86d4e0fd6debff74a864c2dff66cbe558
|
[
"Go"
] | 3
|
Go
|
tomkake/Go_project
|
049005f86c575ad212a93c8bde4f4d3e8c65a693
|
b2ccb6667cbb99ad465911450623d3887ee7f732
|
refs/heads/master
|
<file_sep>angular
.module("mudyo.gumul", [])
.directive("gumul", function($filter, $http) {
return {
restrict: "C",
scope: true,
link: function($scope, $element) {
var
// mixes default settings and custom settings
def = $.extend({
url: null,
http: "post",
fix: 0,
height: "100%",
cellHeight: 30,
selected: {
index: -1,
bind: null
},
startedIndex: 0,
endedIndex: 0,
page: {
index: 1,
rowPerPage: 20
},
finished: false
}, $element.data()),
// create HTML structure
html = $("<div class='mudyo-gumul'>"
+ "<div class='mudyo-gumul-t'><div><table><colgroup/><thead/></table></div></div>"
+ "<div class='mudyo-gumul-h'><div><table></table></div></div>"
+ "<div class='mudyo-gumul-l'><div><table><colgroup/></table></div></div>"
+ "<div class='mudyo-gumul-m'><div/></div>"
+ "</div>"),
// generate selector in HTML structure
elem = {
nest: $element.parent(),
top: $(">.mudyo-gumul-t", html),
left: $(">.mudyo-gumul-l", html),
head: $(">.mudyo-gumul-h", html),
main: $(">.mudyo-gumul-m", html),
table: {
top: $(">.mudyo-gumul-t table", html),
left: $(">.mudyo-gumul-l table", html),
head: $(">.mudyo-gumul-h table", html),
main: $element.after(html)
},
shell: {
top: $(">.mudyo-gumul-t>div", html),
left: $(">.mudyo-gumul-l>div", html),
head: $(">.mudyo-gumul-h>div", html),
main: $(">.mudyo-gumul-m>div", html).append($element)
},
shape: {}
},
// calculate column size
getColumnSize = function () {
var size = 0
$(">th,>td", elem.table.main.find("tr").eq(0)).each(function (i, c) {
size += c.getAttribute("colSpan") || 1
})
return size
}(),
// calculate setting witch is table width
getWidth = function ($table) {
var width = 0
$table.find("col").each(function (i, col) {
width += parseInt(col.getAttribute("width"))
})
return width
},
getValue = function(data, name, type, format) {
if(!data || !name) {
return ""
}
if (type) {
if (format) {
return $filter(type)(data[name], format)
}
return $filter(type)(data[name])
}
return data[name]
},
initPosition = function () {
elem.table.head.append($element.find("thead"));
elem.shape.main = $element.find("tbody").clone(true);
if (def.url) {
$element.find("tbody").remove();
}
if (def.fix) {
var length,
$tbody,
$tr = $("<tr/>");
elem.shape.left = elem.shape.main.clone(true);
elem.shape.left.find("tr").each(function (i, tr) {
length = 0;
$("th,td", tr).each(function (j, thd) {
length += parseInt(thd.getAttribute("colSpan") || 1);
if (length > def.fix) {
$(thd).remove()
}
})
});
elem.shape.main.find("tr").each(function (i, tr) {
length = 0;
$("th,td", tr).each(function (j, thd) {
length += parseInt(thd.getAttribute("colSpan") || 1);
if (length <= def.fix) {
$(thd).remove()
}
else {
return false
}
})
});
elem.table.head.find("tr").each(function (i, tr) {
elem.table.top.find("thead").append(
$tr.clone().append(
$("th,td", tr).slice(0, def.fix)
)
)
});
elem.table.main.find("tbody").each(function (i, tbody) {
$tbody = $("<tbody/>");
$("tr", tbody).each(function (j, tr) {
$tbody.append(
$tr.clone().append(
$("th,td", tr).slice(0, def.fix)
)
)
});
elem.table.left.append($tbody)
});
elem.pillar = $("<a class='mudyo-gumul-pillar'/>");
html.append(elem.pillar)
}
},
initColgroup = function () {
var i,
colgroup = $(">colgroup", elem.table.main),
col = colgroup.find(">col")
if (!colgroup.length) {
colgroup = $("<colgroup/>")
elem.table.main.append(colgroup)
}
if (getColumnSize !== col.length) {
for (i = col.length; i < getColumnSize; i++) {
colgroup.append("<col width=100/>")
}
col = $(">col", colgroup)
}
elem.table.head.append(colgroup.clone(true))
if (def.fix) {
elem.table.top.find(">colgroup").append(elem.table.head.find("col").slice(0, def.fix))
elem.table.left.find(">colgroup").append(col.slice(0, def.fix))
}
for (i = 0; i < getColumnSize; i++) {
var handler = $("<a class='mudyo-gumul-resize-handler'/>")
.data({
bind: col.eq(i),
index: i
})
.on("mousedown", function (e) {
var $this = $(this).addClass("handling")
$this.data({
handling: true,
startX: e.clientX,
offsetLeft: parseInt($this.css("left"))
})
elem.resizeTarget = $this
})
html.append(handler)
}
html.on("mousemove", function (e) {
if (elem.resizeTarget) {
elem.resizeTarget.css({
left: elem.resizeTarget.data("offsetLeft")
+ e.clientX
- elem.resizeTarget.data("startX")
})
e.preventDefault()
}
})
.on("mouseup", function (e) {
if (!elem.resizeTarget) return
var index = elem.resizeTarget.data("index"),
aboveTable = index < def.fix ? elem.table.top : elem.table.head,
belowTable = index < def.fix ? elem.table.left : elem.table.main,
$col = $("col", aboveTable).eq(index - def.fix),
calcWidth = parseInt($col.attr("width"))
+ (e.clientX - elem.resizeTarget.data("startX"))
if (calcWidth < 15) {
calcWidth = 15
}
$col.attr("width", calcWidth)
$("col", belowTable).eq(index - def.fix).attr("width", calcWidth)
elem.resizeTarget.removeClass("handling")
elem.resizeTarget = null
initSize()
initResizable()
})
elem.sizeHandler = html.find(".mudyo-gumul-resize-handler")
},
initSize = function () {
/*if(def.height === "100%") {
elem.shell.main.css("padding-bottom", 5)
}*/
html.height(def.height)
if (!def.fix) {
elem.table.head.width(getWidth(elem.table.top))
elem.table.main.width(elem.table.head.width())
elem.head.width(html.width())
elem.main.width(html.width())
.height(html.height() - elem.head.height())
}
else {
var width = [
getWidth(elem.table.top),
getWidth(elem.table.head)
];
def.mainHeight = html.height() - elem.head.height();
elem.table.top.width(width[0])
elem.table.left.width(width[0])
elem.table.head.width(width[1])
elem.table.main.width(width[1])
elem.top.width(width[0])
elem.left.width(width[0])
elem.head.width(html.width() - width[0])
elem.main.width(html.width() - width[0])
elem.left.height(def.mainHeight)
elem.main.height(def.mainHeight)
elem.pillar.css("left", width[0])
}
},
initControlEvent = function () {
elem.shape.main.add(elem.shape.left).on("click", function(){
def.selected.index = parseInt(this.getAttribute("data-index"));
elem.table.main.add(elem.table.left)
.find("tbody.selected").removeClass("selected");
elem.table.main.add(elem.table.left)
.find("tbody[data-index=" + def.selected.index + "]")
.addClass("selected");
})
.find("[data-bind]").on("dblclick", function(){
var $this = $(this),
bind = $this.attr("data-bind"),
textarea = $("<textarea class='editor'/>");
$this.addClass("editing").html(textarea)
.find(".editor").val($scope.data[def.selected.index][bind]);
textarea
.blur(function(){
//this.parentNode.innerHTML = this.value;
//if(this.parentNode)
// this.parentNode.removeChild(this);
})
.keypress(function(e){
if (e.keyCode === 13) {
if (!e.altKey) {
this.blur();
return false;
}
else {
this.value += "\n";
setTimeout(function(t){
return function() {
t.style.height = (function (v, i, j) {
do { i = (i + 1)||1 } while(j > -1)
while ((j = v.indexOf("\n", j||0)) >= 0) ;
console.log(v);
return i||2
})(t.value) + "em"
}
}(this), 300)
}
}
})
.select();
})
},
initScrollEvent = function () {
if (!def.fix) {
elem.main.on("scroll", function (e) {
elem.head.css("margin-left", this.scrollLeft * -1);
elem.sizeHandler.css("margin-left", this.scrollLeft * -1);
});
elem.head.on("wheel", function (e) {
elem.main.scrollTop(elem.main.scrollTop() + e.originalEvent.deltaY);
//e.preventDefault()
});
}
else {
elem.main.on("scroll", function (e) {
elem.shell.head.css("left", this.scrollLeft * -1);
elem.shell.left.css("top" , this.scrollTop * -1);
elem.sizeHandler.slice(def.fix).css("margin-left", this.scrollLeft * -1);
});
elem.head.add(elem.top).add(elem.left).on("wheel", function (e) {
elem.main.scrollTop(elem.main.scrollTop() + e.originalEvent.deltaY);
elem.main.scrollLeft(elem.main.scrollLeft() + e.originalEvent.deltaX);
//e.preventDefault()
});
}
if (def.url) {
elem.main.on("scroll", function (e) {
render(this.scrollTop);
});
}
},
initResizable = function () {
var left = 0
elem.sizeHandler.each(function (i, handler) {
var $handler = $(handler),
col = $handler.data("bind")
$handler.css("left", left += parseInt(col.attr("width")))
})
},
render = function(scrollTop, force) {
var startIndex = parseInt(scrollTop / def.cellHeight),
endIndex = startIndex + Math.ceil((def.mainHeight + def.cellHeight) / def.cellHeight),
i;
if (endIndex > $scope.data.length) {
endIndex = $scope.data.length
}
if(force || startIndex !== def.startedIndex) {
if (startIndex < def.startedIndex) {
for (i = def.startedIndex - 1; i >= startIndex; i--) {
createRow(i, $scope.data[i], true)
}
removeRow(endIndex - startIndex, $scope.data.length);
}
else {
for (i = def.endedIndex; i < endIndex; i++) {
createRow(i, $scope.data[i])
}
removeRow(0, startIndex - def.startedIndex);
}
elem.shell.main.css("margin-top", def.cellHeight * startIndex);
if (def.fix) {
elem.shell.left.css("margin-top", def.cellHeight * startIndex);
}
def.startedIndex = startIndex;
def.endedIndex = endIndex;
if(!def.loading && (def.endedIndex === $scope.data.length)) {
$scope.load();
}
if(def.finished) {
html.addClass("mudyo-gumul-finished");
}
}
},
createRow = function(index, data, insertBefore) {
var shape = [
elem.shape.main.clone(true)
];
shape[0].attr("data-index", index)
.find("[data-bind]").each(function(i, td) {
td.innerHTML = getValue(data,
td.getAttribute("data-bind"),
td.getAttribute("data-type"),
td.getAttribute("data-format")) || "";
});
if (insertBefore) {
elem.table.main.find("tbody:eq(0)").before(shape[0]);
}
else {
elem.table.main.append(shape[0]);
}
if (def.fix) {
shape[1] = elem.shape.left.clone(true);
shape[1].attr("data-index", index)
.find("[data-bind]").each(function(i, td) {
td.innerHTML = getValue(data,
td.getAttribute("data-bind"),
td.getAttribute("data-type"),
td.getAttribute("data-format")) || "";
});
if (insertBefore) {
elem.table.left.find("tbody:eq(0)").before(shape[1]);
}
else {
elem.table.left.append(shape[1]);
}
}
if (index === def.selected.index) {
shape[0].add(shape[1]).addClass("selected");
}
},
removeRow = function(start, end) {
elem.table.main.find("tbody").slice(start, end).remove();
if (def.fix) {
elem.table.left.find("tbody").slice(start, end).remove();
}
}
;
$scope.def = def;
$scope.elem = elem;
$scope.data = [];
$scope.load = function () {
var fn = function (data) {
$scope.data = $scope.data.concat(data);
setTimeout(function() {
def.loading = false;
def.page.index += 1;
def.finished = def.page.rowPerPage > data.length;
render(elem.main.scrollTop(), true);
// FIXME delete after test
if(def.page.index > 3) {
def.finished = true;
}
html.removeClass("mudyo-gumul-loading");
}, 300)
};
if (def.url && !def.finished && !def.loading) {
def.loading = true;
html.addClass("mudyo-gumul-loading");
$http[def.http](def.url)
.success(fn)
.error(function(data, status, headers){
def.loading = false;
html.attr("data-error-code", status)
//.attr("data-error-text", statusText)
.addClass("mudyo-gumul-error")
.removeClass("mudyo-gumul-loading");
})
}
};
initPosition();
initColgroup();
initSize();
initResizable();
initControlEvent();
initScrollEvent();
$scope.load();
}
}
});
<file_sep>var gulp = require('gulp'),
sass = require('gulp-sass')
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
minifycss = require('gulp-clean-css'),
minifyhtml = require('gulp-minify-html'),
browserSync = require('browser-sync').create();
gulp.task('serve', function () {
browserSync.init({
server: 'src'
});
gulp.watch("src/**/*.html").on('change', browserSync.reload);
gulp.watch("src/js/**/*.js", ['js-watch']);
gulp.watch('src/css/sass/**/*.scss', ['sass']);
});
gulp.task('js', function () {
return gulp.src('src/js/**/*.js')
.pipe(browserify())
.pipe(uglify())
.pipe(gulp.dest('dist/js'));
});
gulp.task('js-watch', /*['js'],*/ function (done) {
browserSync.reload();
done();
});
gulp.task('sass', function () {
return gulp.src('src/css/sass/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('src/css'));
});
//HTML 파일을 minify
gulp.task('minifyhtml', function () {
return gulp.src('src/**/*.html') //src 폴더 아래의 모든 html 파일을
.pipe(minifyhtml()) //minify 해서
.pipe(gulp.dest('dist')) //dist 폴더에 저장
.pipe(browserSync.reload({stream:true})); //browserSync 로 브라우저에 반영
});
//자바스크립트 파일을 minify
gulp.task('uglify', function () {
return gulp.src('src/**/*.js') //src 폴더 아래의 모든 js 파일을
.pipe(concat('all.js')) //병합하고
.pipe(uglify()) //minify 해서
.pipe(gulp.dest('dist/js')) //dist 폴더에 저장
.pipe(browserSync.reload({stream:true})); //browserSync 로 브라우저에 반영
});
//CSS 파일을 minify
gulp.task('minifycss', function () {
return gulp.src('src/**/*.css') //src 폴더 아래의 모든 css 파일을
.pipe(concat('all.css')) //병합하고
.pipe(minifycss()) //minify 해서
.pipe(gulp.dest('dist/css')) //dist 폴더에 저장
.pipe(browserSync.reload({stream:true})); //browserSync 로 브라우저에 반영
});
//gulp를 실행하면 default 로 minifycss task를 실행
gulp.task('default', ['serve', 'sass']);
|
8dc0fd6e48cd4a048487a457ebdd3f428ece8ada
|
[
"JavaScript"
] | 2
|
JavaScript
|
zkyz/mudyo-gumul
|
b4d15e6e90af62f5b4e4a74f1abf511a3365b99d
|
4a0bc695a40499ac187ddbff01fb0f86274fce6c
|
refs/heads/master
|
<repo_name>jeevan437/Login-Application<file_sep>/user_app/urls.py
from django.contrib.auth import views as auth_views
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^login/', auth_views.login),
url(r'^logout/', auth_views.logout, {'next_page': '/login/'}),
url(r'^register/', views.registration),
url(r'^$', views.home),
url(r'book/', views.list_book),
]
<file_sep>/user_app/admin.py
from django.contrib import admin
from .models import DjUser, Book
# Register your models here.
class DjUserAdmin(admin.ModelAdmin):
pass
admin.site.register(DjUser, DjUserAdmin)
admin.site.register(Book)<file_sep>/user_app/models.py
from django.db import models
from django.contrib.auth.models import AbstractUser
# Create your models here.
DEPARTMENTS = (("MBA", "Management"),
("MCA", "PG"),
("BTech","Bachelors"),
("MTech", "Masters"))
BRANCHES = (("ECE", "Electronics"),
("EEE", "Electrical"),
("CSE", "Computers"),
("CSIT", "Information Tech"),
("Civil", "Civil Engg"),
)
GENDER = (("M", "Male"),
("F", "Female"))
class DjUser(AbstractUser):
#user = models.OneToOneField(User)
department = models.CharField(max_length=20, choices=DEPARTMENTS, default="BTech")
branch = models.CharField(max_length=20, choices=BRANCHES, default="CSE")
gender = models.CharField(max_length=10, choices=GENDER)
rollno = models.CharField(max_length=20)
doj = models.DateField(null=True, blank=True)
dob = models.DateField(null=True, blank=True)
phone_num = models.CharField(max_length=15)
address = models.TextField(max_length=255, blank=True)
class Book(models.Model):
book_user = models.ForeignKey(DjUser, on_delete=models.CASCADE)
name = models.CharField(max_length=20)
author = models.CharField(max_length=20)
edition = models.CharField(max_length=5)
publisher = models.CharField(max_length=20)
issue_date = models.DateField()
def __str__(self):
return self.name<file_sep>/user_app/views.py
from django.shortcuts import render
from .forms import SignUpForm
from django.contrib.auth import authenticate, login
from django.http import HttpResponseRedirect, HttpResponse
from .models import DjUser, Book
from django.views.generic import ListView
from django.views.generic.edit import CreateView, UpdateView, DeleteView
# Create your views here.
def registration(request):
if request.method == 'POST':
form = SignUpForm(request.POST)
if form.is_valid():
data = form.cleaned_data
user_name = data['username']
email = data['email']
password = data['password']
if not DjUser.objects.filter(username=user_name).exists() and \
not DjUser.objects.filter(email=email).exists():
DjUser.objects.create_user(user_name, email, password)
user = authenticate(username=user_name, password=<PASSWORD>)
login(request, user)
form.save()
return HttpResponseRedirect('/')
else:
return form.ValidationError("Invalid form")
else:
form = SignUpForm()
return render(request, 'register.html', {'form': form})
def home(request):
return render(request, 'home.html')
def list_book(request):
d = DjUser.objects.get(username=request.user.username)
data = Book.objects.filter(book_user=d).distinct()
return render(request, 'book_list.html', {'book_data': data})
class BookView(ListView):
''' class based view which uses generic listview'''
model = Book
template_name = 'book_list.html'
context_object_name = 'book_data'
def get_queryset(self):
d = DjUser.objects.get(username=self.request.user.username)
data = Book.objects.filter(book_user=d).distinct()
return data
class BookUpdate(UpdateView):
model = Book
fields = ['name', 'pages']
# success_url = reverse_lazy('book_list')
class BookDelete(DeleteView):
model = Book
# success_url = reverse_lazy('book_list')
<file_sep>/user_app/forms.py
from django import forms
from .models import DjUser
class SignUpForm(forms.ModelForm):
username = forms.CharField(max_length=30, required=True, label="UserName")
email = forms.EmailField(max_length=255, required=True, label="Email")
first_name = forms.CharField(max_length=30, required=True, label='FirstName')
last_name = forms.CharField(max_length=30, required=True, label='LastName')
password = forms.CharField(max_length=30, required=True, label='Password', widget=forms.PasswordInput())
class Meta:
model = DjUser
fields = ('department', 'branch', 'gender', 'rollno', 'doj', 'dob', 'phone_num', 'address')
|
7d26abd5c24487eb55d7ae2f7dba493b9b755874
|
[
"Python"
] | 5
|
Python
|
jeevan437/Login-Application
|
770f1c247e2532adca7b0c8a7c061eaaa2997322
|
565304f9025902df6944514a4e3711be67e16add
|
refs/heads/master
|
<file_sep>import React from 'react';
import Header from './header';
import Body from './body';
import PropTypes from 'prop-types';
class App extends React.Component {
constructor(props) {
super(props);
}
componentDidMount() {
console.log('did mount');
}
render() {
console.log('app', this.props);
return (
<div>
<Header />
<Body />
</div>
);
}
}
App.propTypes = {
masterTicketList: PropTypes.object
};
export default App;
<file_sep>import React from 'react';
import PropTypes from 'prop-types';
import Moment from 'moment';
import { connect } from 'react-redux';
import { v4 } from 'uuid';
function NewCommentForm(props) {
let _text = null;
function handleCommentCreation(event) {
event.preventDefault();
const { dispatch } = props;
const action = {
type: 'ADD_COMMENT',
id: v4(),
text: _text.value,
timeOpen: new Moment()
};
dispatch(action);
_text.value = '';
}
return (
<div>
<form onSubmit={handleCommentCreation}>
<input
type='text'
id='names'
placeholder='Comment'
ref={(input) => {_text = input;}}/>
</form>
</div>
);
}
NewCommentForm.propTypes = {
dispatch: PropTypes.func
};
export default connect()(NewCommentForm);
<file_sep>import React from 'react';
import styled from 'styled-components';
const Wrapper = styled.section`
width: 100%;
position: relative;
border: 1px solid black;
background-color: tomato;
`;
function Comments (props) {
return (
<Wrapper>
<h3> {props.text} </h3>
</Wrapper>
)
}
export default Comments
<file_sep>const newsReducer = (state = {}, action) => {
let newState;
switch(action.type) {
case 'ADD_COMMENT':
newState = Object.assign({}, state, {
[action.id]: {
text: action.text,
timeOpen: action.timeOpen,
id: action.id
}
});
console.log('newsReducer', newState);
return newState;
default:
return state;
}
};
export default newsReducer;
<file_sep>import React from 'react';
import NewCommentForm from './NewCommentForm';
import Comments from './Comments';
import { connect } from 'react-redux';
const wrapper = {
display: 'grid',
gridGap: '2px',
gridTemplateColumns: '30% 70%',
justifyContent: 'space-between',
};
const newForm = {
gridColumn: '1',
gridRow: '1',
margin: '20px',
border: '1px solid black'
};
const comments = {
gridColumn: '2',
gridRow: '1',
color: ' slategrey',
margin: '20px',
};
class Body extends React.Component {
constructor(props) {
super(props)
console.log('super', props)
// this.props.masterCommentList = {"1":{"text":"value", "id":"1"}}
}
componentDidUpdate() {
console.log('swhoop', this.props.masterCommentList)
}
render() {
const comments = this.props.masterCommentList ? <div style={comments}>
{Object.keys(this.props.masterCommentList).map((commentId) =>{
return <Comments text={this.props.masterCommentList[commentId].text}
key={this.props.masterCommentList[commentId].id}
/>
})}
</div> : <p>no comments</p>
console.log('body render', this.props)
return (
<div style={wrapper}>
<div style={newForm}><NewCommentForm /></div>
{comments}
</div>
);
}
}
const mapStateToProps = state => {
masterCommentList: state
}
export default connect(mapStateToProps)(Body);
|
8c42f8e3dcfebc958d0cee6abfdd6c63487414e6
|
[
"JavaScript"
] | 5
|
JavaScript
|
devsweeting/HackerNews
|
b59c799eb8ee9a9afa916f02449e34d5516daee8
|
f5f69c7f507f02c676daf3f9a0710f9b15799cfd
|
refs/heads/master
|
<repo_name>jenyaivanova521/WeddingApp<file_sep>/nativescript-app/app/shared/services/task.service.ts
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Store } from '@ngrx/store';
import { Observable } from 'rxjs/Observable';
import { API_URL } from '~/shared/configs';
import { State, Task, TaskDetails } from '../../root-store';
@Injectable()
export class TaskService {
private apiUrl: string = `${API_URL}/weddings`;
constructor(
private store: Store<State>,
private http: HttpClient
) { }
public getTasks({ weddingId }): Observable<any> {
return this.http.get(`${this.apiUrl}/${weddingId}/tasks`);
}
public getTask({ weddingId, taskId }): Observable<any> {
return this.http.get<TaskDetails>(`${this.apiUrl}/${weddingId}/tasks/${taskId}`);
}
public setTaskStatus({ weddingId, taskId, status }): Observable<any> {
return this.http.patch(`${this.apiUrl}/${weddingId}/tasks/${taskId}`, {
status
});
}
public addTask({ weddingId, task }): Observable<any> {
return this.http.post(`${this.apiUrl}/${weddingId}/tasks`, {
name: task.name,
assignedMemberId: task.assignedMemberId,
dueDate: task.dueDate
});
}
public deleteTask({ weddingId, taskId }): Observable<any> {
return this.http.delete(`${this.apiUrl}/${weddingId}/tasks/${taskId}`);
}
public editTask({ weddingId, task }): Observable<any> {
return this.http.patch(`${this.apiUrl}/${weddingId}/tasks/${task.id}`, {
name: task.name,
dueDate: task.dueDate,
assignedMemberId: task.assignedMemberId
});
}
public getTaskStats({ weddingId }): Observable<any> {
return this.http.get<Task[]>(`${this.apiUrl}/${weddingId}/tasks/stats`);
}
}
<file_sep>/nativescript-app/app/root-store/auth-store/state.ts
import { AuthInfo } from './models';
export interface State {
isAuthenticated: boolean;
authInfo: AuthInfo | null;
}
export const initialState: State = {
isAuthenticated: false,
authInfo: null
};
<file_sep>/nativescript-app/app/shared/components/create-profile/couple/partner/create-couple-partner.component.ts
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { Partner, WeddingRoleEnum } from '~/root-store/wedding-store/models';
@Component({
moduleId: module.id,
selector: 'create-couple-partner',
templateUrl: 'create-couple-partner.component.html',
styleUrls: ['../../create-profile-base.component.scss']
})
export class CreateCouplePartnerComponent {
@Input() partnerNumber: number;
@Output() nextStepEvent: EventEmitter<any> = new EventEmitter();
@Output() previousStepEvent: EventEmitter<any> = new EventEmitter();
private values: Partner = {
avatar: '',
firstName: '',
lastName: '',
role: WeddingRoleEnum.Bride,
birthDate: '',
description: ''
};
public roles = [
'Groom',
'Bride'
];
constructor(
) {
console.log("---create-couple-partner---")
}
public nextStep(): void {
this.values.role = <WeddingRoleEnum>this.values.role.toLowerCase();
this.nextStepEvent.next(this.values);
}
public previousStep(): void {
this.previousStepEvent.next();
}
public setValue(valueName: string, element: any, useParam?: string): void {
this.values[valueName] = useParam ? element[useParam] : element;
// console.log(this.values);
}
}
<file_sep>/nativescript-app/app/modules/auth/components/account-settings/account-settings.component.ts
import { Component, ChangeDetectorRef } from '@angular/core';
import { Store } from '@ngrx/store';
import { screen } from 'tns-core-modules/platform';
import { State, AuthSelectors, AuthActions } from '~/root-store';
import { CDN_URL, WEB_URL } from '../../../../shared/configs/app.config';
import { AuthInfo } from '~/root-store/auth-store/models';
import { ISubscription } from 'rxjs/Subscription';
import { DomSanitizer } from '@angular/platform-browser';
import { AuthService } from '~/shared/services';
import * as Toast from 'nativescript-toast';
import { Router } from '@angular/router';
import { LoadingIndicator } from 'nativescript-loading-indicator';
var FileSystem = require("file-system");
import * as bghttp from 'nativescript-background-http';
import { API_URL, Config } from '~/shared/configs';
@Component({
moduleId: module.id,
selector: 'account-settings', //9.4
templateUrl: 'account-settings.component.html',
styleUrls: ['./account-settings.component.scss']
})
export class AccountsettingsComponent {
public activeTab: string = 'account';
public scrollHeight: number;
private indicator: LoadingIndicator;
selectedPicture:string;
avatar: any;
account: any;
url: string;
cdnUrl: string;
webUrl: string;
formData: FormData;
formDataAvatar: string;
subAccount: ISubscription;
subAccountForm: ISubscription;
submitted: any;
errors: any;
public prependAvatarUrl: string;
public changePasswordForm: any = {
password: '',
password_new: '',
password_new_repeat: ''
};
public deleteAccountPassword = '';
constructor(
private store: Store<State>,
public sanitizer: DomSanitizer,
private authService: AuthService,
private changeDetector: ChangeDetectorRef,
private router: Router
) {
console.log("---account-setting---")
const screenHeight = screen.mainScreen.heightDIPs;
this.scrollHeight = screenHeight - 140;
this.indicator = new LoadingIndicator();
}
public setActiveTab(tab: string): void {
this.activeTab = tab;
}
photoSelected(event){
console.log(event);
this.selectedPicture = event;
this.formDataAvatar = event;
this.submitAvatar();
}
ngOnInit() {
Config.previousUrl = "account-settings";
this.submitted = {
avatar: false,
account: false,
changePass: null
};
this.errors = {
avatar: null,
account: null,
changePass: null
};
this.cdnUrl = CDN_URL;
this.webUrl = WEB_URL;
// this.authService.getAccountInfo().toPromise().then(response => {
// console.log("get Authinfo: ", response.result);
// return response.result;
// });
this.subAccount = this.store.select(
AuthSelectors.selectAuthInfo
).subscribe((state: AuthInfo) => {
console.log("auth info");
console.log(state.account);
this.account = state.account;
this.prependAvatarUrl = `account/${this.account.id}/avatars/`;
if(this.account.avatar) {
this.selectedPicture = CDN_URL + '/' + (this.prependAvatarUrl ? this.prependAvatarUrl : '') + this.account.avatar.replace(/(\.[\w\d_-]+)$/i, '_sq$1');
console.log(this.selectedPicture);
}
});
this.formData = new FormData();
this.formDataAvatar = "";
}
public fileChange(filepath): void {
console.log("file change: ",filepath);
this.formDataAvatar = filepath;
if(filepath && filepath.length > 0) {
this.submitAvatar();
}
// let file = FileSystem.File.fromPath(filepath);
// if (file != null) {
// // const file: File = fileList[0];
// this.url = (window.URL) ? window.URL.createObjectURL(file) : (window as any).webkitURL.createObjectURL(file);
// // this.formData.delete('avatar');
// // this.formData.append('avatar', file, file.name);
// this.submitAvatar();
// }
}
public submitAvatar(): void {
if (this.formDataAvatar && this.formDataAvatar.length > 0) {
this.submitted.avatar = true;
this.indicator.show({
message: 'Loading...'
});
let session = bghttp.session('post');
let params = [];
const param = {
name: "avatar",
fileName: `${this.formDataAvatar}`,
mimeType: 'image/jpeg',
};
params.push(param);
const url = API_URL + '/account';
let request = {
url: url,
method: 'PATCH',
headers: {
'Content-Type': 'application/form-data',
'Authorization': 'Bearer ' + this.authService.getToken(),
},
description:"Account Avatar Upload"
};
let task: bghttp.Task;
console.log(params);
task = session.multipartUpload(params, request);
task.on('responded', (response) => this.onCompleteUpload(response));
task.on('error', this.onUploadError)
}
}
// this.authService.setAccountAvatar(this.formData).subscribe(
// () => {
// this.store.dispatch(new AuthActions.GetAuthInfo());
// this.submitted.avatar = false;
// this.indicator.hide();
// // this._flashMessagesService.show('Account photo updated', { cssClass: 'alert-success', timeout: 3000 });
// Toast.makeText("Account photo updated", "long").show();
// this.changeDetector.markForCheck();
// }, (err) => {
// this.errors.avatar = err.error;
// this.submitted.avatar = false;
// this.indicator.hide();
// this.changeDetector.markForCheck();
// }
// );
// if (this.submitted.avatar && !this.errors.avatar) {
// // this.fileInput.nativeElement.value = '';
// }
// }
public onCompleteUpload(response): void {
// TODO redirect to app and get weddings
console.log("avatar updated")
Toast.makeText("Your profile picture updated", "long").show();
this.formDataAvatar = "";
this.indicator.hide();
// this.changeDetector.markForCheck();
}
public onUploadError(error): void {
console.log(error);
Toast.makeText("Your profile picture upload failed", "long").show();
this.indicator.hide();
// this.changeDetector.markForCheck();
}
public submitAccountInfo(): void {
this.submitted.account = true;
this.indicator.show({
message: 'Loading...'
});
this.authService.updateAccount(this.account).subscribe(
() => {
this.store.dispatch(new AuthActions.GetAuthInfo());
this.submitted.account = false;
this.indicator.hide();
Toast.makeText("Account updated", "long").show();
// this.changeDetector.markForCheck();
}, (err) => {
this.errors.account = err.error;
this.submitted.account = false;
this.indicator.hide();
// this.changeDetector.markForCheck();
}
);
}
public submitChangePassword(): void {
this.indicator.show({
message: 'Loading...'
});
this.submitted.changePass = true;
this.authService.changePassword(this.changePasswordForm).subscribe(
() => {
this.submitted.changePass = false;
this.indicator.hide();
this.changePasswordForm.password = '';
this.changePasswordForm.password_new = '';
this.changePasswordForm.password_new_repeat = '';
// this._flashMessagesService.show('', {cssClass: 'alert-success', timeout: 3000});
Toast.makeText("Password changed", "long").show();
},
(err) => {
this.errors.changePass = err.error;
this.submitted.changePass = false;
this.indicator.hide();
}
);
}
public submitDeleteAccount(): void {
this.authService.deleteAccount({password: this.deleteAccountPassword}).subscribe(
() => {
// this._flashMessagesService.show('Account deleted', {cssClass: 'alert-success', timeout: 3000});
this.authService.clearToken();
this.router.navigate(['settings', 'account']);
}
);
}
}
<file_sep>/nativescript-app/app/root-store/message-store/selectors.ts
import {
createFeatureSelector,
createSelector,
MemoizedSelector
} from '@ngrx/store';
import { State } from './state';
export const selectMessageState: MemoizedSelector<object, State> = createFeatureSelector<State>('message');
const getConversations = (state: State): any => state.conversations;
const getUnreadMessagesCount = (state: State): any => state.unreadMessagesCount;
const getActiveConversationId = (state: State): any => state.activeConversationId;
const getInfiniteScroll = (state: State): any => state.infiniteScroll;
export const selectConversations: MemoizedSelector<object, any[] | null> = createSelector(selectMessageState, getConversations);
export const selectUnreadMessagesCount: MemoizedSelector<object, number> = createSelector(selectMessageState, getUnreadMessagesCount);
export const selectActiveConversationId: MemoizedSelector<object, string> = createSelector(selectMessageState, getActiveConversationId);
export const selectInfiniteScroll: MemoizedSelector<object, object> = createSelector(selectMessageState, getInfiniteScroll);
export const selectConversation = (vendorId: string) => {
return createSelector(
selectMessageState,
(state: State) => {
return state.conversations.filter(conversation => {
if(conversation.vendor.id == vendorId) {
return conversation;
}
});
}
);
}
<file_sep>/nativescript-app/app/shared/services/member.service.ts
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { Store } from '@ngrx/store';
import { API_URL } from '../configs/app.config';
import { State } from '~/root-store';
import { Member } from '~/root-store/wedding-store/models';
@Injectable()
export class MemberService {
private apiUrl: string = API_URL + '/weddings';
constructor(
private store: Store<State>,
private http: HttpClient
) { }
getMembers({ weddingId, isActive }: { weddingId: string, isActive?: boolean }): Observable<any> {
console.log("get members");
return this.http.get<Member[]>(this.apiUrl + '/' + weddingId + '/members' + (isActive ? '?isActive=true' : ''));
}
addMember({ weddingId, member }): Observable<any> {
return this.http.post(this.apiUrl + '/' + weddingId + '/members', {
email: member.email,
role: member.role
});
}
changeMemberRole({ weddingId, memberId, role }): Observable<any> {
return this.http.patch(this.apiUrl + '/' + weddingId + '/members/' + memberId, {
role: role
});
}
deleteMember({ weddingId, memberId }): Observable<any> {
return this.http.delete(this.apiUrl + '/' + weddingId + '/members/' + memberId);
}
public getInvitations(): Observable<any> {
return this.http.get(`${API_URL}/members/invitations`);
}
public acceptInvite({ weddingId, memberId, invitationId }): Observable<any> {
return this.http.post(`${this.apiUrl}/${weddingId}/members/${memberId}/invitations/${invitationId}`, { isActive: true });
}
public rejectInvite({ invitationId }): Observable<any> {
return this.http.delete(`${API_URL}/members/invitations/${invitationId}`);
}
}
<file_sep>/nativescript-app/app/shared/services/http-get.services.ts
import { Injectable } from "@angular/core";
import { Http, Headers, Response, URLSearchParams } from "@angular/http";
import { Observable } from "rxjs/Observable";
import "rxjs/add/operator/catch";
import "rxjs/add/operator/map";
import { API_URL } from '~/shared/configs';
@Injectable()
export class MyHttpGetService {
constructor(private http: Http) {}
private apiUrl: string = API_URL + '/weddings';
getWeddingID() {
// Kinvey-specific syntax to sort the groceries by last modified time. Don’t worry about the details here.
let params = new URLSearchParams();
// params.append("sort", "{\"_kmd.lmt\": 1}");
return this.http.get(`${this.apiUrl}`, {
headers: this.getCommonHeaders(),
params: params
})
.map(res => res.json())
.map(data => {
return data;
})
.catch(this.handleErrors);
}
getCommonHeaders() {
let headers = new Headers();
headers.append("Content-Type", "application/json");
// headers.append("Authorization", "Kinvey " + Config.token);
return headers;
}
handleErrors(error: Response) {
console.log("http-get.services handle errors: ");
console.log(JSON.stringify(error.json()));
return Observable.throw(error);
}
}<file_sep>/nativescript-app/app/shared/modals/datepicker/datepicker.modal.ts
import { Component } from '@angular/core';
import { Moment } from 'moment';
import { ModalDialogParams } from 'nativescript-angular/directives/dialogs';
import * as moment from 'moment';
import { DATE_FORMAT } from '~/shared/configs';
@Component({
selector: 'datepicker-modal',
templateUrl: 'datepicker.modal.html',
})
export class DatepickerModal {
private date: Moment = moment();
private time: Moment = moment();
private useHours: boolean;
public showHours: boolean = false;
constructor(
private params: ModalDialogParams
) {
this.useHours = this.params.context.useHours;
}
public onDateChanged(event): void {
this.date = moment(event.value);
}
public onTimeChanged(event): void {
this.time = moment(event.value);
}
public close(): void {
let date = this.date.format(DATE_FORMAT);
if (this.useHours) {
if (this.showHours) {
const hour = this.time.hour();
const minutes = this.time.minutes();
date = date + ' ' + hour + ':' + minutes;
} else {
this.showHours = true;
return;
}
}
this.params.closeCallback(date);
}
}<file_sep>/spa/src/app/modules/settings/components/wedding/wedding-events/index.ts
export * from './wedding-events.component';
<file_sep>/spa/src/app/modules/vendor-form/vendor-form.component.ts
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import { ISubscription } from 'rxjs/Subscription';
import * as objectToFormData from 'object-to-formdata';
import { ActivatedRoute } from '@angular/router';
import { Router } from '@angular/router';
import { VendorService } from '../../root-store/services/vendor.service';
import { ProfileService } from '../../root-store/services/profile.service';
import {
RootStoreState,
ProfileSelectors,
CommonModels
} from '../../root-store';
@Component({
selector: 'vendor-form-module',
templateUrl: './vendor-form.component.html',
styleUrls: ['./vendor-form.component.sass']
})
export class VendorFormComponent implements OnInit, OnDestroy {
activeProfile: CommonModels.Profile;
subActiveProfile: ISubscription;
activeStep: number = 1;
vendor: any;
basicInfoFormData: FormData;
submitted: boolean;
error: any;
steps: string[];
mode: string;
constructor(
private store: Store<RootStoreState.State>,
private router: Router,
private route: ActivatedRoute,
private vendorService: VendorService,
private profileService: ProfileService
) { }
async ngOnInit() {
this.steps = ['Vendor info', 'Photos', 'Products', 'Payment'];
this.mode = 'create';
this.basicInfoFormData = new FormData();
this.vendor = {
name: null,
avatar: null,
description: null,
category: {
id: null
},
rate: null,
address: null,
lat: null,
lng: null,
contacts: {
phone: {
type: 'phone',
value: null,
isPublic: false
},
email: {
type: 'email',
value: null,
isPublic: false
}
}
};
this.subActiveProfile = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(async activeProfile => {
this.activeProfile = activeProfile;
if (activeProfile && activeProfile.type == 'vendor') {
if (!activeProfile.isActive) {
if (this.activeStep == 1) {
this.activeStep = 4;
}
} else {
this.mode = 'edit';
var index = this.steps.indexOf('Payment');
if (index !== -1) this.steps.splice(index, 1);
}
await this.vendorService.getVendor({ vendorId: this.activeProfile.id }).toPromise().then(response => {
for (var key in this.vendor) {
if (response.result[key] && key !== 'contacts') {
this.vendor[key] = response.result[key];
}
}
if (response.result.contacts.length) {
for (let i = 0; i < response.result.contacts.length; i++) {
let contact = response.result.contacts[i];
this.vendor.contacts[contact.type] = contact;
}
}
});
}
});
}
ngOnDestroy() {
this.subActiveProfile.unsubscribe();
}
async submitBasicInfo() {
let filesFormData = new FormData();
filesFormData.set('avatar', this.basicInfoFormData.get('avatar')); // Hack
let vendorToSave = Object.assign({}, this.vendor);
vendorToSave.contacts = Object.values(vendorToSave.contacts);
let formData = objectToFormData(
vendorToSave,
{ indices: true },
filesFormData
);
this.submitted = true;
let serviceMethod;
if (this.activeProfile && this.activeProfile.type == 'vendor') {
serviceMethod = this.vendorService.updateVendor({ formData, vendorId: this.activeProfile.id }).toPromise();
} else {
serviceMethod = this.vendorService.createVendor(formData).toPromise();
}
await serviceMethod.then(async response => {
await this.profileService.initProfiles(response ? response.result : undefined);
this.activeStep = 2;
this.submitted = false;
this.error = null;
this.basicInfoFormData.delete('avatar');
}).catch(error => {
this.submitted = false;
this.error = error;
});
}
nextStep(step) {
this.activeStep = step + 1;
}
prevStep(step) {
this.activeStep = step - 1;
}
setStep(step) {
this.activeStep = step;
}
}
<file_sep>/nativescript-app/app/root-store/profile-store/effects.ts
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { catchError, exhaustMap, map, mapTo, withLatestFrom, concatMapTo, tap } from 'rxjs/operators';
import { Store } from '@ngrx/store';
import {
ProfileActionTypes,
SetActiveProfile,
SetActiveProfileSuccess,
SetActiveProfileFailure,
} from './actions';
import { State } from '~/root-store/profile-store/state';
@Injectable()
export class ProfileEffects {
constructor(
private actions$: Actions,
private store: Store<State>,
private router: Router
) { }
@Effect({ dispatch: false })
setActiveProfile$ = this.actions$.pipe(
ofType<SetActiveProfile>(ProfileActionTypes.SET_ACTIVE_PROFILE),
tap(action => {
if(action.payload.profile) {
localStorage.setItem(action.payload.accountId + '-activeProfileId', action.payload.profile.id);
}
})
);
}
<file_sep>/spa/src/app/modules/wedding/wedding.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { FormsModule } from '@angular/forms';
import { SharedModule } from '../../shared/shared.module';
import { WeddingInformationComponent } from './components/information';
import { WeddingComponent } from './wedding.component';
import { WeddingTimelineComponent } from './components/timeline/timeline.component';
import { WeddingPhotosComponent } from './components/photos/photos.component';
import { PostFormComponent } from '../social-feed/components/post-form/post-form.component';
import { routing } from './wedding.routing';
import { LayoutModule } from '../../core/layout/layout.module';
import { SocialFeedModule } from '../social-feed/social-feed.module';
import { MomentModule } from 'angular2-moment';
import { AvatarModule } from '../../shared/avatar/avatar.module';
import { MatIconModule } from '@angular/material';
import { TextareaAutosizeModule } from 'ngx-textarea-autosize';
import { NgxGalleryModule } from 'ngx-gallery';
import { InfiniteScrollModule } from 'angular2-infinite-scroll';
import { BrowserModule } from '@angular/platform-browser';
import { InViewportModule } from 'ng-in-viewport';
import { NgxPageScrollModule } from 'ngx-page-scroll';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { LightboxModule } from 'ngx-lightbox';
@NgModule({
imports: [
CommonModule,
RouterModule,
FormsModule,
routing,
LayoutModule,
MomentModule,
AvatarModule,
MatIconModule,
TextareaAutosizeModule,
NgxGalleryModule,
InfiniteScrollModule,
BrowserModule,
InViewportModule,
NgbModule,
SocialFeedModule,
LightboxModule,
SharedModule,
NgxPageScrollModule
],
declarations: [
WeddingComponent,
WeddingInformationComponent,
WeddingTimelineComponent,
WeddingPhotosComponent
],
exports: [
WeddingComponent
],
entryComponents: [
PostFormComponent
]
})
export class WeddingModule { }
<file_sep>/nativescript-app/app/shared/components/star-rating/index.ts
export * from './star-rating.component';<file_sep>/nativescript-app/app/modules/wedding/components/guest/index.ts
export * from './guest.component';<file_sep>/spa/src/app/root-store/services/task.service.ts
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Store } from '@ngrx/store';
import { Observable } from 'rxjs/Observable';
import { environment } from '../../../environments/environment';
import { Task, TaskDetails } from '../task-store/models';
import { State } from '../root-store.state';
@Injectable()
export class TaskService {
private apiUrl: string = environment.apiUrl + '/weddings';
constructor(
private store: Store<State>,
private http: HttpClient
) { }
getTasks({ weddingId, options }): Observable<any> {
let params = '';
Object.keys(options).map((key, i) => {
let value = options[key];
if(value) {
params += `${params.length == 0 ? '/?' : '&'}${key}=${value}`;
}
});
return this.http.get<Task[]>(this.apiUrl + '/' + weddingId + '/tasks' + params);
}
getTask({ weddingId, taskId }): Observable<any> {
return this.http.get<TaskDetails>(this.apiUrl + '/' + weddingId + '/tasks/' + taskId);
}
addTask({ weddingId, task }): Observable<any> {
return this.http.post(this.apiUrl + '/' + weddingId + '/tasks', {
name: task.name,
assignedMemberId: task.assignedMemberId,
dueDate: task.dueDate
});
}
deleteTask({ weddingId, taskId }): Observable<any> {
return this.http.delete(this.apiUrl + '/' + weddingId + '/tasks/' + taskId);
}
changeTaskStatus({ weddingId, taskId, status }): Observable<any> {
return this.http.patch(this.apiUrl + '/' + weddingId + '/tasks/' + taskId, {
status: status
});
}
editTask({ weddingId, task }): Observable<any> {
return this.http.patch(this.apiUrl + '/' + weddingId + '/tasks/' + task.id, {
name: task.name,
dueDate: task.dueDate,
assignedMemberId: task.assignedMemberId
});
}
getTaskStats({ weddingId }): Observable<any> {
return this.http.get<Task[]>(this.apiUrl + '/' + weddingId + '/tasks/stats');
}
}
<file_sep>/website/src/controllers/AuthController.ts
import express = require('express');
const { validationResult } = require('express-validator/check');
import RequestService from 'services/RequestService';
import { IConfig } from 'config';
import * as path from 'path';
export default class AuthController {
config: IConfig;
requestService: RequestService;
constructor({ config, requestService }: { config: IConfig, requestService: RequestService }) {
this.config = config;
this.requestService = requestService;
}
async index(req: express.Request, res: express.Response, next: express.NextFunction) {
try {
let weddings = await this.requestService.make({
method: 'get',
url: 'weddings?limit=4&random=1'
});
res.render('index', {
flash: req['flash'](),
weddings: weddings
});
} catch (error) {
next(error);
}
}
getLogin(req: express.Request, res: express.Response, next: express.NextFunction) {
try {
if (req['user']) {
res.redirect(this.config.spaUrl);
} else {
if (req.query && req.query.redirect) {
res.cookie('redirect', (req.query.app ? this.config.spaUrl : '') + req.query.redirect, {
httpOnly: true,
domain: this.config.cookieDomain
});
}
res.render('auth/login', {
flash: req['flash'](),
form: {
email: req.query.email
}
});
}
} catch (error) {
next(error);
}
}
async postLogin(req: express.Request, res: express.Response, next: express.NextFunction) {
const errors = validationResult(req);
if (errors.isEmpty()) {
let credentials = {
email: req.body.email,
password: <PASSWORD>
}
try {
let response = await this.requestService.make({
method: 'post',
url: 'auth/authenticate'
}, credentials);
res.cookie('jwt', response.token, {
maxAge: 24 * 60 * 60 * 1000,
httpOnly: false,
domain: this.config.cookieDomain
});
let redirect = req.cookies.redirect;
if (redirect) {
res.clearCookie('redirect');
return res.redirect(redirect);
} else {
return res.redirect(this.config.spaUrl);
}
} catch (error) {
req['flash']('danger', JSON.parse(error.error).title);
}
} else {
req['flash']('danger', 'VALIDATION_ERROR'); // TODO: fix this
}
res.redirect('/login');
}
async getLogout(req: express.Request, res: express.Response, next: express.NextFunction) {
try {
let jwt = req.cookies.jwt;
await this.requestService.make({
method: 'post',
url: 'auth/logout',
jwt: jwt
});
res.clearCookie('jwt');
} catch (error) {
}
res.redirect('/login');
}
getSignup(req: express.Request, res: express.Response, next: express.NextFunction) {
try {
if (req['user']) {
return res.redirect('/');
}
res.render('auth/signup', {
flash: req['flash'](),
form: {
email: req.query.email
}
});
} catch (error) {
next(error);
}
}
async postSignup(req: express.Request, res: express.Response, next: express.NextFunction) {
let errors = validationResult(req);
if (errors.isEmpty()) {
let account = {
email: req.body.email,
first_name: req.body.first_name,
last_name: req.body.last_name,
password: <PASSWORD>,
password_repeat: req.body.<PASSWORD>_<PASSWORD>,
account_type_id: req.body.account_type_id
};
try {
await this.requestService.make({
method: 'post',
url: 'auth/register'
}, account);
req['flash']('success', 'ACCOUNT_REGISTERED');
return res.redirect('/login');
} catch (error) {
req['flash']('danger', JSON.parse(error.error).title);
}
} else {
req['flash']('danger', 'VALIDATION_ERROR'); // TODO: fix this
}
res.render('auth/signup', {
flash: req['flash'](),
form: req.body
});
}
async getActivate(req: express.Request, res: express.Response, next: express.NextFunction) {
try {
if (req.query && req.query.redirect) {
res.cookie('redirect', (req.query.app ? this.config.spaUrl : '') + req.query.redirect, {
httpOnly: true,
domain: this.config.cookieDomain
});
}
await this.requestService.make({
method: 'post',
url: 'auth/activate'
}, {
hash: req.params.hash
});
req['flash']('success', 'ACCOUNT_ACTIVATED');
} catch (error) {
req['flash']('danger', JSON.parse(error.error).title);
}
res.redirect('/login');
}
getRemindPassword(req: express.Request, res: express.Response, next: express.NextFunction) {
try {
res.render('auth/remindPassword', {
flash: req['flash']()
});
} catch (error) {
next(error);
}
}
async postRemindPassword(req: express.Request, res: express.Response, next: express.NextFunction) {
let errors = validationResult(req);
if (errors.isEmpty()) {
try {
await this.requestService.make({
method: 'post',
url: 'auth/password/remind'
}, {
email: req.body.email
});
} catch (error) {
// security reason
}
req['flash']('success', 'PASSWORD_REMINDER_SENT');
if (req['user']) {
return res.redirect('/');
}
return res.redirect('/login');
} else {
req['flash']('danger', 'VALIDATION_ERROR'); // TODO: fix this
}
res.render('auth/remindPassword', {
flash: req['flash']()
});
}
getResetPassword(req: express.Request, res: express.Response, next: express.NextFunction) {
try {
res.render('auth/resetPassword', {
flash: req['flash']()
});
} catch (error) {
next(error);
}
}
async postResetPassword(req: express.Request, res: express.Response, next: express.NextFunction) {
let errors = validationResult(req);
if (errors.isEmpty()) {
try {
await this.requestService.make({
method: 'post',
url: 'auth/password/set'
}, {
hash: req.params.hash,
password: <PASSWORD>,
password_repeat: req.body.password_repeat
});
req['flash']('success', 'PASSWORD_CHANGED');
if (req['user']) {
return res.redirect('/');
}
return res.redirect('/login');
} catch (error) {
req['flash']('danger', JSON.parse(error.error).title);
}
} else {
req['flash']('danger', 'VALIDATION_ERROR'); // TODO: fix this
}
res.redirect('/reset/' + req.params.hash);
}
async getForgetMe(req: express.Request, res: express.Response, next: express.NextFunction) {
try {
res.render('auth/forget', {
flash: req['flash']()
});
} catch (error) {
throw error;
}
}
async postForgetMe(req: express.Request, res: express.Response, next: express.NextFunction) {
let errors = validationResult(req);
if (errors.isEmpty()) {
try {
let jwt = req.cookies.jwt;
await this.requestService.make({
method: 'post',
url: 'auth/forget',
jwt: jwt
}, {
password: <PASSWORD>
});
req['flash']('success', 'ACCOUNT_DELETED');
return res.redirect('/login');
} catch (error) {
req['flash']('danger', JSON.parse(error.error).title);
}
} else {
req['flash']('danger', 'VALIDATION_ERROR'); // TODO: fix this
}
res.render('auth/forget', {
flash: req['flash']()
});
}
async getChangePassword(req: express.Request, res: express.Response, next: express.NextFunction) {
try {
res.render('auth/changePassword', {
flash: req['flash']()
});
} catch (error) {
throw error;
}
}
async postChangePassword(req: express.Request, res: express.Response, next: express.NextFunction) {
let errors = validationResult(req);
if (errors.isEmpty()) {
try {
let jwt = req.cookies.jwt;
await this.requestService.make({
method: 'post',
url: 'auth/password/change',
jwt: jwt
}, {
password: <PASSWORD>,
password_new: req.body.password_new,
password_new_repeat: req.body.password_new_repeat
});
req['flash']('success', 'PASSWORD_CHANGED');
return res.redirect('/');
} catch (error) {
req['flash']('danger', JSON.parse(error.error).title);
}
} else {
req['flash']('danger', 'VALIDATION_ERROR'); // TODO: fix this
}
res.render('auth/changePassword', {
flash: req['flash']()
});
}
async getAcceptInvitationWithHash(req, res, next) {
try {
let authInfo = req.user;
let memberInvitation = await this.requestService.make({
method: 'get',
url: 'members/invitations/' + req.params.invitationId + '?hash=' + req.params.tokenHash
});
if (!memberInvitation) {
req['flash']('danger', 'INVALID_INVITATION_LINK');
}
if (authInfo) {
return res.redirect('/accept-invitation/' + req.params.invitationId);
} else {
res.cookie('redirect', '/accept-invitation/' + req.params.invitationId, {
httpOnly: true,
domain: this.config.cookieDomain
});
}
if (!memberInvitation.member.accountId) {
return res.redirect('/signup?email=' + encodeURIComponent(memberInvitation.member.email));
} else {
return res.redirect('/login?email=' + encodeURIComponent(memberInvitation.member.email));
}
} catch (error) {
req['flash']('danger', JSON.parse(error.error).title);
}
}
async getAcceptInvitation(req, res, next) {
try {
let jwt = req.cookies.jwt;
let authInfo = req.user;
let memberInvitation = await this.requestService.make({
method: 'get',
url: 'members/invitations/' + req.params.invitationId,
jwt: jwt
});
if (!memberInvitation) {
req['flash']('danger', 'INVALID_INVITATION_LINK');
}
if (authInfo.email != memberInvitation.member.email) {
req['flash']('danger', 'INVALID_ACCOUNT');
} else {
await this.requestService.make({
method: 'post',
url: 'weddings/' + memberInvitation.wedding.id + '/members/' + memberInvitation.member.id + '/invitations/' + req.params.invitationId,
jwt: jwt
});
return res.redirect('/login');
}
} catch (error) {
req['flash']('danger', JSON.parse(error.error).title);
}
res.render('auth/acceptInvitation', {
flash: req['flash']()
});
}
};
<file_sep>/nativescript-app/app/shared/components/create-profile/vendor/photos/create-vendor-photos.component.ts
import { Component, EventEmitter, Output, OnInit } from '@angular/core';
import { ModalService, AuthService } from '~/shared/services';
import { UploadModal } from '~/shared/modals';
import { ISubscription } from 'rxjs/Subscription';
import { VendorService } from '~/shared/services/vendor.service';
import { ProfileSelectors, RootStoreState } from '~/root-store';
import { Store } from '@ngrx/store';
import { LoadingIndicator } from 'nativescript-loading-indicator';
import * as Toast from 'nativescript-toast';
import * as bghttp from 'nativescript-background-http';
import { API_URL } from '~/shared/configs';
@Component({
moduleId: module.id,
selector: 'create-vendor-photos',
templateUrl: 'create-vendor-photos.component.html',
styleUrls: ['../../create-profile-base.component.scss', './create-vendor-photos.component.scss']
})
export class CreateVendorPhotosComponent implements OnInit {
@Output() nextStepEvent: EventEmitter<any> = new EventEmitter();
@Output() previousStepEvent: EventEmitter<any> = new EventEmitter();
@Output() photoSelected: EventEmitter<any> = new EventEmitter();
subActiveProfile: ISubscription;
activeProfile;
uploadedImages;
photos= [];
shownPhotosLength = 6;
indicator;
constructor(
private modalService: ModalService,
private vendorService: VendorService,
private store: Store<RootStoreState.State>,
private authService: AuthService,
) {
}
ngOnInit() {
this.subActiveProfile = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(async activeProfile => {
this.activeProfile = activeProfile;
});
this.uploadedImages = this.vendorService.getVendorPhotos({ vendorId: this.activeProfile.id }).toPromise()
.then(response => {
console.log("vendor photos: ", response);
this.photos = response.result;
return response.result;
});
this.indicator = new LoadingIndicator();
}
public values: any = {
uploadphoto:'',
};
public nextStep(): void {
this.nextStepEvent.next();
this.submitPhoto();
}
public previousStep(): void {
this.previousStepEvent.next();
}
public setValue(valueName: string, element: any, useParam?: string): void {
this.values[valueName] = useParam ? element[useParam] : element;
}
public getPicture(): void {
this.modalService.showModal(UploadModal, {}).then(
(url: string) => {
// this.photoSelected.next(url);
this.photos.push(url);
}
)
}
addPhoto(event){
console.log(event);
}
public submitPhoto(): void {
this.indicator.show({
message: 'Loading...'
});
let session = bghttp.session('post');
let params = [];
for( var i = 0; i < this.photos.length; i++ ) {
const param = {
name: "photos[]",
fileName: `${this.photos[i]}`,
mimeType: 'image/jpeg',
};
params.push(param);
}
const url = API_URL + '/vendors/' + this.activeProfile.id + '/photos';
let request = {
url: url,
method: 'PATCH',
headers: {
'Content-Type': 'application/form-data',
'Authorization': 'Bearer ' + this.authService.getToken(),
},
description:"Vendor Photo Upload"
};
let task: bghttp.Task;
console.log(params);
task = session.multipartUpload(params, request);
task.on('responded', (response) => this.onCompleteUpload(response));
task.on('error',(error) => this.onUploadError(error))
}
public onCompleteUpload(response): void {
// TODO redirect to app and get weddings
console.log("avatar updated")
Toast.makeText("Your profile picture updated", "long").show();
this.indicator.hide();
// this.changeDetector.markForCheck();
}
public onUploadError(error): void {
console.log(error);
Toast.makeText("Your profile picture upload failed", "long").show();
this.indicator.hide();
// this.changeDetector.markForCheck();
}
}
<file_sep>/spa/src/app/modules/social-feed/social-feed.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { FormsModule } from '@angular/forms';
import { SharedModule } from '../../shared/shared.module';
import { SocialFeedComponent } from './social-feed.component';
import { PostComponent } from './components/post/post.component';
import { PostFormComponent } from './components/post-form/post-form.component';
import { CommentComponent } from './components/comment/comment.component';
import { CommentFormComponent } from './components/comment-form/comment-form.component';
import { routing } from './social-feed.routing';
import { LayoutModule } from '../../core/layout/layout.module';
import { MomentModule } from 'angular2-moment';
import { AvatarModule } from '../../shared/avatar/avatar.module';
import { MatIconModule } from '@angular/material';
import { TextareaAutosizeModule } from 'ngx-textarea-autosize';
import { NgxGalleryModule } from 'ngx-gallery';
import { InfiniteScrollModule } from 'angular2-infinite-scroll';
import { BrowserModule } from '@angular/platform-browser';
import { InViewportModule } from 'ng-in-viewport';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
@NgModule({
imports: [
CommonModule,
RouterModule,
FormsModule,
routing,
LayoutModule,
MomentModule,
AvatarModule,
MatIconModule,
TextareaAutosizeModule,
NgxGalleryModule,
InfiniteScrollModule,
BrowserModule,
InViewportModule,
NgbModule,
SharedModule
],
declarations: [
SocialFeedComponent,
PostComponent,
PostFormComponent,
CommentComponent,
CommentFormComponent
],
exports: [
SocialFeedComponent,
PostComponent,
PostFormComponent,
CommentComponent,
CommentFormComponent
]
})
export class SocialFeedModule { }
<file_sep>/website/src/services/RequestService.ts
import { IConfig } from 'config';
import * as request from 'request-promise';
export default class RequestService {
config: IConfig;
constructor({
config
}) {
this.config = config;
}
async make(options, body = null) {
let requestOptions = {
method: options.method,
url: options.fullUrl ? options.url : this.config.apiUrl + options.url,
headers: options.headers,
form: body
};
if(options.jwt) {
requestOptions.headers = {
'Authorization': 'Bearer ' + options.jwt
}
}
try {
let response = await request(requestOptions);
return response ? JSON.parse(response).result : false;
} catch(error) {
throw error;
}
}
}
<file_sep>/spa/src/app/root-store/auth-store/module.ts
import { NgModule } from '@angular/core';
import { EffectsModule } from '@ngrx/effects';
import { AuthEffects } from './effects';
import { AuthInfoResolver } from './resolvers';
import { AuthService } from '../services/auth.service';
import { StoreModule } from '@ngrx/store';
import { reducer } from './reducers';
@NgModule({
imports: [
StoreModule.forFeature('auth', reducer),
EffectsModule.forFeature([AuthEffects])
],
declarations: [
],
providers: [
AuthService,
AuthEffects,
AuthInfoResolver
]
})
export class AuthStoreModule { }
<file_sep>/nativescript-app/app/root-store/member-store/module.ts
import { NgModule } from '@angular/core';
import { EffectsModule } from '@ngrx/effects';
import { MemberEffects } from './effects';
import { reducer } from './reducers';
import { StoreModule } from '@ngrx/store';
import { MemberService } from '~/shared/services/member.service';
@NgModule({
imports: [
StoreModule.forFeature('member', reducer),
EffectsModule.forFeature([MemberEffects]),
],
declarations: [
],
providers: [
MemberService,
MemberEffects
]
})
export class MemberStoreModule { }
<file_sep>/nativescript-app/app/shared/services/wedding.service.ts
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { Store } from '@ngrx/store';
// import { Observable } from 'rxjs/add/operator/map'
// import { Observable } from 'rxjs/Rx';
import "rxjs/add/operator/catch";
import "rxjs/add/operator/map";
import "rxjs/add/operator/do";
import { State } from '~/root-store';
import { Wedding } from '~/root-store/wedding-store/models';
import { selectActiveWedding } from '~/root-store/wedding-store/selectors';
import { API_URL, Config } from '~/shared/configs';
@Injectable()
export class WeddingService {
private activeWedding: any;
private apiUrl: string = API_URL + '/weddings';
constructor(
private store: Store<State>,
private http: HttpClient
) {
console.log("wedding service");
this.store.select(
selectActiveWedding
).subscribe(activeWedding => {
console.log(activeWedding);
this.activeWedding = activeWedding;
});
}
public getWeddings(): Observable<any> {
console.log("get weddings");
return this.http.get<Wedding[]>(`${this.apiUrl}?isMember=true`);
}
public getWedding({ weddingId }): Observable<any> {
return this.http.get<Wedding>(`${this.apiUrl}/${weddingId}`);
}
public getWeddingMembers(): Observable<any> {
return this.http.get<Wedding[]>(`${this.apiUrl}/${this.activeWedding.id}/members?isActive=true`);
}
public getWeddingPartners({weddingId}): Observable<any> {
return this.http.get<Wedding[]>(`${this.apiUrl}/${weddingId}/partners`);
}
public getWeddingEvents({weddingId}): Observable<any> {
return this.http.get<Wedding[]>(`${this.apiUrl}/${weddingId}/events`);
}
public createWedding(params: Wedding): Observable<any> {
return this.http.post(this.apiUrl, params);
}
public changeWeddingName({ name }): Observable<any> {
return this.http.patch(`${this.apiUrl}/${this.activeWedding.id}`, { name });
}
}
<file_sep>/website/src/routes/ProfileRoutes.ts
import { Router } from "express";
import { makeClassInvoker } from 'awilix-express';
import ProfileController from 'controllers/ProfileController';
import authenticate from 'middlewares/authenticate';
import { check } from 'express-validator/check';
export default class ProfileRoutes {
router: Router;
controller: Function;
config: any;
constructor({ config, requestService }) {
this.router = Router();
this.controller = makeClassInvoker(ProfileController);
this.config = config;
}
getRoutes() {
this.router.get('/:profileId', this.controller('getNewsFeed'));
this.router.get('/:profileId/informations', this.controller('getInformations'));
this.router.get('/:profileId/photos', this.controller('getPhotos'));
this.router.get('/:profileId/guest-list', this.controller('getGuestList'));
return this.router;
}
}
<file_sep>/nativescript-app/app/shared/modals/location/location.modal.ts
import { HttpClient } from '@angular/common/http';
import { ChangeDetectorRef, Component, ElementRef, ViewChild } from '@angular/core';
import { ModalDialogParams } from 'nativescript-angular/directives/dialogs';
import { DialogsService } from '~/shared/services';
import { DialogType } from '~/shared/types/enum';
@Component({
selector: 'location-modal',
templateUrl: 'location.modal.html',
styleUrls: ['./location.modal.scss']
})
export class LocationModal {
@ViewChild('searchInput') searchInputRef: ElementRef;
public searchQuery: string;
public selectedLocation: string = '';
public locations: Array<any>;
private googleAPIUrl: String = 'https://maps.googleapis.com/maps/api/place';
private autocompleteUrl: string = `${this.googleAPIUrl}/autocomplete/json?inputtype=textquery`;
private placeDetailsUrl: string = `${this.googleAPIUrl}/details/json?`;
private GOOGLE_API_KEY: string = '<KEY>';
private loadedDetails: boolean = false;
constructor(
private params: ModalDialogParams,
private http: HttpClient,
private changeDetector: ChangeDetectorRef,
private dialogService: DialogsService,
) {
}
public setQuery(event: any): void {
this.searchQuery = event.value;
}
public search(): void {
const url = this.autocompleteUrl + `&key=${this.GOOGLE_API_KEY}&input=${this.searchQuery}&fields=name,formatted_address`;
this.http.get(url).subscribe((response: any) => {
this.searchInputRef.nativeElement.dismissSoftInput();
this.locations = response.predictions;
this.selectLocation(this.locations[0]);
this.changeDetector.markForCheck();
})
}
public selectLocation(location): void {
this.selectedLocation = location;
this.loadedDetails = false;
const url = this.placeDetailsUrl + `key=${this.GOOGLE_API_KEY}&placeid=${location.place_id}&fields=name,formatted_address,geometry`;
// TODO show loader
this.http.get(url).subscribe((response: any) => {
// TODO hide loader
this.selectedLocation = response.result;
this.loadedDetails = true;
this.changeDetector.markForCheck();
})
}
public close(): void {
this.params.closeCallback(this.selectedLocation);
}
}<file_sep>/spa/src/app/modules/messages-manager/components/conversation/conversation.component.ts
import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
import { ISubscription } from 'rxjs/Subscription';
import { Router, ActivatedRoute } from '@angular/router';
import { SioService } from '../../../../root-store/services/sio.service';
import { MessageService } from '../../../../root-store/services/message.service';
import { Store } from '@ngrx/store';
import {
RootStoreState,
ProfileActions,
ProfileSelectors,
AuthSelectors,
MessageActions,
MessageSelectors
} from '../../../../root-store';
@Component({
selector: 'app-messages-conversation',
templateUrl: './conversation.component.html',
styleUrls: ['./conversation.component.sass']
})
export class MessagesConversationComponent implements OnInit, OnDestroy {
@ViewChild('textarea') textarea: any;
@ViewChild('messagesContainer') messagesContainer: any;
activeProfile: any;
activeProfileSub: ISubscription;
routeSubscription: ISubscription;
authInfoSub: ISubscription;
sioSubscription: ISubscription;
messages: object[] = [];
loading: boolean = false;
page: number = 0;
infiniteScrollDisabled: boolean = false;
activeConversationIdSubscription: ISubscription;
activeConversationId: string;
conversationDetails: any;
authInfo: any;
messageFormData: {
text: string;
}
constructor(
private route: ActivatedRoute,
private router: Router,
private store: Store<RootStoreState.State>,
private messageService: MessageService,
private sioService: SioService
) { }
async ngOnInit() {
this.activeProfileSub = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
this.activeProfile = activeProfile;
});
this.messageFormData = {
text: null
};
this.routeSubscription = this.route.params.subscribe(async (params) => {
this.store.dispatch(new MessageActions.SetActiveConversationId({
activeConversationId: params.conversationId
}));
this.messageService.markAsRead(params.conversationId).toPromise();
});
this.activeConversationIdSubscription = this.store.select(
MessageSelectors.selectActiveConversationId
).subscribe(async activeConversationId => {
this.activeConversationId = activeConversationId;
this.messageService.getConversation(this.activeConversationId)
.toPromise().then(response => {
this.conversationDetails = response.result;
})
this.getMessages(true);
});
this.sioSubscription = this.sioService.getMessages().subscribe((message: any) => {
if (message.conversationId == this.activeConversationId) {
message.asVendor = message.asVendor == 'false' ? false : true;
this.messages.push(message);
this.messageService.markAsRead(this.activeConversationId).toPromise();
}
});
this.authInfoSub = this.store.select(
AuthSelectors.selectAuthInfo
).subscribe(authInfo => {
this.authInfo = authInfo;
});
}
ngOnDestroy() {
this.routeSubscription.unsubscribe();
this.authInfoSub.unsubscribe();
this.activeProfileSub.unsubscribe();
this.sioSubscription.unsubscribe();
this.activeConversationIdSubscription.unsubscribe();
this.store.dispatch(new MessageActions.SetActiveConversationId({
activeConversationId: null
}));
}
scrollToBottom() {
try {
this.messagesContainer.nativeElement.scrollTop = this.messagesContainer.nativeElement.scrollHeight;
} catch(err) { }
}
async getMessages(init = false) {
if(init) {
this.page = 1;
this.infiniteScrollDisabled = false;
this.messages = [];
} else {
this.page++;
}
await this.messageService.getMessages({
conversationId: this.activeConversationId, page: this.page
}).toPromise().then(response => {
this.loading = false;
this.messages = response.result.concat(this.messages);
if(response.result.length < 20) {
this.infiniteScrollDisabled = true;
}
}).catch(error => {
this.loading = false;
});
}
async submitMessage() {
let asVendor = this.authInfo.account.id == this.conversationDetails.vendor.accountId ? true : false;
let createdAt = new Date();
await this.messageService.sendMessage({
weddingId: this.conversationDetails.wedding.id,
vendorId: this.conversationDetails.vendor.id,
text: this.messageFormData.text,
asVendor: asVendor
}).toPromise().then(response => {
this.textarea.nativeElement.style.height = 50 + 'px';
this.messageFormData.text = null;
this.scrollToBottom();
}).catch(error => {
this.textarea.nativeElement.style.height = 50 + 'px';
})
}
}
<file_sep>/spa/src/app/modules/wedding-form/wedding-form.component.ts
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import { ISubscription } from 'rxjs/Subscription';
import * as objectToFormData from 'object-to-formdata';
import { ActivatedRoute } from '@angular/router';
import { Router } from '@angular/router';
import { WeddingService } from '../../root-store/services/wedding.service';
import { ProfileService } from '../../root-store/services/profile.service';
import {
RootStoreState,
CommonModels
} from '../../root-store';
@Component({
selector: 'wedding-form-module',
templateUrl: './wedding-form.component.html',
styleUrls: ['./wedding-form.component.sass']
})
export class WeddingFormComponent implements OnInit {
activeProfile: CommonModels.Profile;
activeStep: number;
wedding: any;
formData: FormData;
submitted: boolean;
error: any;
constructor(
private store: Store<RootStoreState.State>,
private router: Router,
private route: ActivatedRoute,
private weddingService: WeddingService,
private profileService: ProfileService
) { }
ngOnInit() {
this.activeStep = 1;
this.activeProfile = this.route.snapshot.data.activeProfile;
if(this.activeProfile && this.activeProfile.type == 'wedding') {
this.router.navigate(['']);
}
this.submitted = false;
this.wedding = {
description: null,
privacySetting: null,
events: [{
type: 'ceremony',
date: null
}, {
type: 'reception',
date: null
}],
partners: [{
firstName: null,
lastName: null,
role: null
}, {
firstName: null,
lastName: null,
role: null
}]
};
this.formData = new FormData();
}
onSubmit(step) {
let filesFormData = new FormData();
filesFormData.set('avatar', this.formData.get('avatar')); // Hack
filesFormData.set('partners[0][avatar]', this.formData.get('partners[0][avatar]')); // Hack
filesFormData.set('partners[1][avatar]', this.formData.get('partners[1][avatar]')); // Hack
this.wedding.events.forEach((event, i) => {
this.wedding.events[i].date = event.date ? event.date.format() : null;
});
let formData = objectToFormData(
this.wedding,
{ indices: true },
filesFormData
);
this.submitted = true;
this.weddingService.createWedding({ formData }).toPromise().then(async response => {
this.submitted = false;
this.error = null;
await this.profileService.initProfiles();
this.router.navigate(['']);
}).catch(error => {
this.submitted = false;
this.error = error;
});
}
nextStep(step) {
this.activeStep = step + 1;
}
prevStep(step) {
this.activeStep = step - 1;
}
}
<file_sep>/nativescript-app/app/modules/wedding/components/couple-timeline/index.ts
export * from './couple-timeline.component';<file_sep>/website/src/middlewares/authenticate.ts
import { Router } from "express";
const router = Router();
router.use(function(req, res, next) {
if (req['user']) {
next();
} else {
if (req.xhr) {
res.status(401).end();
} else {
return res.redirect('/login' + '?redirect=' + req.url);
}
}
});
export default router;
<file_sep>/nativescript-app/app/shared/components/top-bar/top-bar.component.ts
import { Component, EventEmitter, Output, OnInit } from '@angular/core';
import { NavigationEnd } from '@angular/router';
import { RouterExtensions } from 'nativescript-angular';
import { Store } from '@ngrx/store';
import { RootStoreState, MessageSelectors } from '~/root-store';
import { NotificationService } from '~/shared/services/notification.service';
import { Config } from '~/shared/configs';
@Component({
selector: 'top-bar',
templateUrl: 'top-bar.component.html',
styleUrls: ['./top-bar.component.scss']
})
export class TopBarComponent implements OnInit{
@Output() toggleMenuEvent: EventEmitter<any> = new EventEmitter();
private conversationsShown: boolean = false;
private notificationsShown: boolean = false;
private previousUrl: string ='';
unreadMessagesCount = 0;
notificationsCount: number = 0;
constructor(
private store: Store<RootStoreState.State>,
private routerExt: RouterExtensions,
private notificationService: NotificationService
) {
// this.routerExt.router.events.subscribe((s) => {
// // TODO add conversation to the if after its done
// if (s instanceof NavigationEnd && (s.url !== '/conversations' && s.url !== '/notifications')) {
// this.previousUrl = s.url;
// }
// })
}
ngOnInit() {
this.getMessageNumber();
this.getNotificationNumber();
setInterval(() => {
this.getMessageNumber();
this.getNotificationNumber();
}, 10000);
}
getMessageNumber(){
this.store.select(
MessageSelectors.selectUnreadMessagesCount
).subscribe(massageCount => {
// console.log("unreadMessageCount: ");
// console.log(massageCount)
this.unreadMessagesCount = massageCount;
});
}
getNotificationNumber(){
this.notificationService.countUnreadNotifications()
.toPromise().then(response => {
// console.log("notification count:");
// console.log(response.result);
this.notificationsCount = response.result
});
}
public toggleMenu(): void {
this.toggleMenuEvent.next();
}
public toggleConversations(): void {
if (this.conversationsShown) {
this.routerExt.navigate(['/app', Config.previousUrl]);
} else {
this.notificationsShown = false;
this.routerExt.navigate(['/app', 'conversations']);
}
this.conversationsShown = !this.conversationsShown;
}
public toggleNotifications(): void {
if (this.notificationsShown) {
this.routerExt.navigate(['/app', Config.previousUrl]);
} else {
this.conversationsShown = false;
this.routerExt.navigate(['/app', 'notifications']);
}
this.notificationsShown = !this.notificationsShown;
}
}
<file_sep>/spa/src/app/modules/vendor-form/components/products/products.component.ts
import { Component, OnInit, OnDestroy, Output, Input, ViewChild, EventEmitter, TemplateRef } from '@angular/core';
import { ISubscription } from 'rxjs/Subscription';
import { Store } from '@ngrx/store';
import * as objectToFormData from 'object-to-formdata';
import { FlashMessagesService } from 'angular2-flash-messages';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { DomSanitizer } from '@angular/platform-browser';
import { ActivatedRoute } from '@angular/router';
import { VendorService } from '../../../../root-store/services/vendor.service';
import { ConfirmDialogComponent } from "../../../../shared/confirm-dialog/confirm-dialog.component";
import { environment } from '../../../../../environments/environment';
import {
RootStoreState,
ProfileSelectors,
CommonModels
} from '../../../../root-store';
@Component({
selector: 'vendor-form-products',
templateUrl: './products.component.html',
styleUrls: ['./products.component.sass']
})
export class VendorFormProductsComponent implements OnInit, OnDestroy {
@ViewChild("vendorProductModal") private modalContent: TemplateRef<any>;
@Input() mode: string;
@Output() setStep = new EventEmitter<number>();
productPhotoUrl: string;
productFormData: FormData;
isImageValid: boolean = true;
modalOptions: any;
modalRef: NgbModalRef;
activeModal: NgbActiveModal;
subActiveProfile: ISubscription;
activeProfile: any;
products: object[] = [];
vendorProductUnits: object[] = [];
currencies: object[] = [];
product: any;
submitted: boolean = false;
error: any;
constructor(
private store: Store<RootStoreState.State>,
public sanitizer: DomSanitizer,
private modalService: NgbModal,
private vendorService: VendorService,
private route: ActivatedRoute,
private flashMessagesService: FlashMessagesService
) { }
private async getProducts() {
this.products = await this.vendorService.getVendorProducts({ vendorId: this.activeProfile.id }).toPromise().then(response => {
return response.result;
});
}
async ngOnInit() {
this.productFormData = new FormData();
this.activeProfile = this.route.snapshot.data.activeProfile;
this.activeProfile = this.route.snapshot.data.activeProfile;
this.subActiveProfile = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(async activeProfile => {
this.activeProfile = activeProfile;
});
await this.getProducts();
this.vendorProductUnits = await this.vendorService.getVendorProductUnits().toPromise().then(response => {
return response.result;
});
this.currencies = await this.vendorService.getCurrencies().toPromise().then(response => {
return response.result;
});
}
ngOnDestroy() {
this.subActiveProfile.unsubscribe();
}
async openVendorProductModal(options) {
let initProduct = {
id: null,
name: null,
description: null,
price: null,
currency: {
id: null,
name: null
},
unit: {
id: null,
name: null
}
}
this.product = { ...initProduct };
if (options.vendorProductId) {
await this.vendorService.getVendorProduct({
vendorId: this.activeProfile.id,
vendorProductId: options.vendorProductId
}).toPromise().then(response => {
Object.keys(this.product).forEach(key => {
if(response.result[key]) {
this.product[key] = response.result[key];
}
})
if (response.result.avatar) {
this.productPhotoUrl = environment.cdnUrl + '/vendor/' + this.activeProfile.id + '/avatars/' + response.result.avatar.replace(/(\.[\w\d_-]+)$/i, '_sq$1')
}
});
}
this.modalOptions = options;
this.modalRef = this.modalService.open(this.modalContent, { size: 'lg' });
this.modalRef.result.then((result) => {
}, (reason) => {
});
}
async submitVendorProductForm() {
this.submitted = true;
let filesFormData = new FormData();
filesFormData.set('avatar', this.productFormData.get('avatar')); // Hack
let productToSave = Object.assign({}, this.product);
let formData = objectToFormData(
productToSave,
{ indices: true },
filesFormData
);
let serviceMethod;
if (this.product.id) {
serviceMethod = this.vendorService.updateVendorProduct({ formData, vendorId: this.activeProfile.id, vendorProductId: this.product.id }).toPromise();
} else {
serviceMethod = this.vendorService.addVendorProduct({
formData,
vendorId: this.activeProfile.id
}).toPromise();
}
await serviceMethod.then(response => {
this.getProducts();
this.submitted = false;
this.flashMessagesService.show(`Product ${this.product.id ? 'updated' : 'added'} successfully`, { cssClass: 'alert-success', timeout: 3000 });
this.modalRef.close();
}).catch(error => {
this.submitted = false;
this.error = error.error;
});
}
openDeleteVendorProductModal(vendorProduct) {
let modal = this.modalService.open(ConfirmDialogComponent, { backdrop: 'static' });
modal.componentInstance['data'] = {
title: 'Are you sure?',
text: 'Delete product',
confirm: async () => {
await this.vendorService.deleteVendorProduct({
vendorId: vendorProduct.vendorId,
vendorProductId: vendorProduct.id
}).toPromise().then(response => {
this.getProducts();
this.flashMessagesService.show('Product deleted successfully', { cssClass: 'alert-success', timeout: 3000 });
}).catch(error => {});
}
};
}
}
<file_sep>/spa/src/app/modules/wedding/components/information/wedding-information.component.ts
import { Component, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
import { ISubscription } from 'rxjs/Subscription';
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
import { WeddingService } from '../../../../root-store/services/wedding.service';
import { CommonModels } from '../../../../root-store';
@Component({
selector: 'app-wedding-information',
templateUrl: './wedding-information.component.html',
styleUrls: ['./wedding-information.component.sass']
})
export class WeddingInformationComponent implements OnInit, OnDestroy {
private routeSubscription: ISubscription;
private routeEventsSubscription: ISubscription;
public weddingId: string;
public wedding: CommonModels.Wedding;
public partners: Array<any>;
public events: Array<any>;
constructor(
private route: ActivatedRoute,
private weddingService: WeddingService,
private changeDetector: ChangeDetectorRef,
private router: Router
) {
}
async ngOnInit() {
this.routeSubscription = this.route.parent.params.subscribe(async (params) => {
await this.getWeddingDetails(params.weddingId);
});
this.routeEventsSubscription = this.router.events.subscribe((e: any) => {
if (e instanceof NavigationEnd) {
this.getWeddingDetails(this.wedding.id);
}
});
}
private async getWeddingDetails(weddingId) {
await this.weddingService.getWedding({
weddingId: weddingId
}).toPromise().then(response => {
this.wedding = response.result;
this.weddingService.getWeddingPartners({weddingId}).subscribe(
(res) => {
this.partners = res.result;
this.changeDetector.markForCheck();
}
);
this.weddingService.getWeddingEvents({weddingId}).subscribe(
(res) => {
this.events = res.result;
this.changeDetector.markForCheck();
}
);
});
}
ngOnDestroy() {
this.routeSubscription.unsubscribe();
this.routeEventsSubscription.unsubscribe();
}
}
<file_sep>/spa/src/app/modules/settings/components/members/members.component.ts
import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
import { FlashMessagesService } from 'angular2-flash-messages';
import { ActivatedRoute } from '@angular/router';
import { Observable } from 'rxjs/Observable';
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
import { ISubscription } from 'rxjs/Subscription';
import { ConfirmDialogComponent } from "../../../../shared/confirm-dialog/confirm-dialog.component";
import { Store } from '@ngrx/store';
import { MemberService } from '../../../../root-store/services/member.service';
import {
RootStoreState,
MemberModels,
MemberActions,
MemberSelectors,
AuthModels,
CommonModels
} from '../../../../root-store';
@Component({
selector: 'app-settings-members',
templateUrl: './members.component.html',
styleUrls: ['./members.component.sass']
})
export class SettingsMembersComponent implements OnInit {
@ViewChild('modalContent') private modalContent: TemplateRef<any>;
submitted: boolean;
error: any;
members: Observable<MemberModels.Member[]>
member: Pick<MemberModels.Member, 'id' | 'weddingId' | 'role'>;
authInfo: AuthModels.AuthInfo;
modalRef: NgbModalRef;
activeProfile: CommonModels.Profile;
constructor(
private modalService: NgbModal,
private memberService: MemberService,
private flashMessagesService: FlashMessagesService,
private route: ActivatedRoute,
private store: Store<RootStoreState.State>,
) {}
async ngOnInit() {
this.authInfo = this.route.parent.snapshot.data.authInfo;
this.activeProfile = this.route.parent.snapshot.data.activeProfile;
if (this.activeProfile && this.activeProfile.type == 'wedding') {
await this.memberService.getMembers({
weddingId: this.activeProfile.id
}).toPromise().then(response => {
this.store.dispatch(new MemberActions.SetMembers({
members: response.result
}));
});
this.members = this.store.select(
MemberSelectors.selectMembers
);
}
}
openChangeMemberRoleModal(member) {
this.error = null;
this.member = Object.assign({}, member);
this.modalRef = this.modalService.open(this.modalContent);
this.modalRef.result.then((result) => {
}, (reason) => {
});
}
openDeleteMemberModal(member) {
let modal = this.modalService.open(ConfirmDialogComponent, { backdrop: 'static' });
modal.componentInstance['data'] = {
title: 'Are you sure?',
text: 'Delete member',
confirm: async () => {
await this.memberService.deleteMember({
weddingId: member.weddingId,
memberId: member.id
}).toPromise().then(response => {
this.store.dispatch(new MemberActions.DeleteMember({
memberId: member.id
}));
this.flashMessagesService.show('Member deleted successfully', { cssClass: 'alert-success', timeout: 3000 });
}).catch(error => {});
}
};
}
async changeMemberRole() {
this.submitted = true;
await this.memberService.changeMemberRole({
weddingId: this.member.weddingId,
memberId: this.member.id,
role: this.member.role
}).toPromise().then(response => {
this.store.dispatch(new MemberActions.ChangeMemberRole({
memberId: this.member.id,
role: this.member.role
}));
this.submitted = false;
this.flashMessagesService.show('Member role changed successfully', { cssClass: 'alert-success', timeout: 3000 });
this.modalRef.close();
}).catch(error => {
this.submitted = false;
this.error = error;
});
}
}
<file_sep>/spa/src/environments/environment.dev.ts
export const environment = {
production: true,
apiUrl: 'https://api.dev-c01.muulabs.pl/v1',
webUrl: 'https://dev-c01.muulabs.pl',
cdnUrl: 'https://storage.googleapis.com/wedding-app-dev',
sioUrl: 'https://sio.dev-c01.muulabs.pl',
imageMinWidth: 200,
imageMinHeight: 200,
vendorProfilePrice: 129
};
<file_sep>/nativescript-app/app/modules/social-feed/social-feed.component.ts
import {
Component,
OnInit,
OnDestroy,
ChangeDetectorRef, ViewChild
} from '@angular/core';
import { ISubscription } from 'rxjs/Subscription';
import { ActivatedRoute } from '@angular/router';
import { Store } from '@ngrx/store';
import * as applicationSettings from 'tns-core-modules/application-settings';
import { screen } from 'tns-core-modules/platform';
import * as _ from 'lodash';
import { Wedding } from '~/root-store/wedding-store/models';
import { selectActiveWedding } from '~/root-store/wedding-store/selectors';
import { TOP_BAR_HEIGHT } from '~/shared/configs';
import { PostService } from '~/shared/services/post.service';
import { State, CommonModels, ProfileSelectors } from '~/root-store';
import { Post } from '~/shared/types/models/social-feed';
import { WeddingService } from '../../shared/services/wedding.service';
import { MyHttpGetService } from '~/shared/services/http-get.services';
import { Config } from '../../shared/configs/app.config';
import { VendorService } from '~/shared/services/vendor.service';
import { LoadingIndicator } from 'nativescript-loading-indicator';
import { RouterExtensions } from 'nativescript-angular';
// import { Page } from 'tns-core-modules/ui/page/page';
// var view = require("ui/core/view");
@Component({
selector: 'app-social-feed',
templateUrl: 'social-feed.component.html',
providers: [MyHttpGetService],
})
export class SocialFeedComponent implements OnInit, OnDestroy {
@ViewChild('itemsContainer') itemsContainer;
public screenHeight: number;
public height: number;
private indicator: LoadingIndicator;
activeProfile: CommonModels.Profile;
subActiveProfile: ISubscription;
private activeWedding: Wedding;
private subActiveWedding: ISubscription;
posts: CommonModels.Post[];
public postForm: any;
public page: number;
public infiniteScrollDisabled: boolean;
public followed: boolean;
public showForm: boolean;
private loadingNewPosts: boolean = false;
// scrollView;
profilingTest: any;
recommendedVendors: any;
constructor(
private route: ActivatedRoute,
private routerExtensions: RouterExtensions,
private store: Store<State>,
private postService: PostService,
private myService: MyHttpGetService,
private changeDetector: ChangeDetectorRef,
private vendorService: VendorService,
// private _page: Page
) {
console.log("---Soicial Feed---");
this.screenHeight = screen.mainScreen.heightDIPs - TOP_BAR_HEIGHT - 80; // Topbar height
this.indicator = new LoadingIndicator();
}
ngOnInit() {
console.log("---Soicial Feed ngOnInit---");
Config.previousUrl = "social-feed";
this.showForm = true;
this.posts = [];
this.page = 1;
this.subActiveProfile = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
if (activeProfile) {
this.activeProfile = activeProfile;
Config.activeProfile = activeProfile;
this.followed = (localStorage.getItem(this.activeProfile + '-socialFeedShowFollowed') == 'true' ? true : false) || false;
}
if (this.activeProfile && this.activeProfile.type == 'wedding' && (['public', 'registered'].indexOf(this.activeProfile.privacySetting) > -1
|| (['followers', 'private'].indexOf(this.activeProfile.privacySetting) > -1 && this.followed))) {
this.showForm = true;
} else {
this.showForm = false;
}
});
this.getPosts({
init: true
});
// this.scrollView = view.getViewById(this.page,"scrollView");
}
ngOnDestroy() {
// this.subActiveWedding.unsubscribe();
}
public appendPost(post) {
console.log("append Post");
this.posts.unshift(post);
}
public showFollowed(value) {
this.followed = value;
applicationSettings.setBoolean(this.activeWedding + '-socialFeedShowFollowed', value);
this.getPosts({
init: true
});
}
// autoScroll(postID){
// console.log("Auto Scroll");
// Config.notificationData = null;
// for( var i = 0; i < this.posts.length; i++) {
// if ( this.posts[i].id == postID ) {
// this.posts.splice(i+1,this.posts.length-i-1);
// }
// }
// var offset = this.scrollView.scrollableHeight; // get the current scroll height
// this.scrollView.scrollToVerticalOffset(offset, false);
// }
private getPosts({ init }) {
console.log("get posts");
if (init) {
this.posts = [];
this.page = 1;
this.infiniteScrollDisabled = false;
/*
if (this.activeProfile && this.activeProfile.type == 'wedding' && (['public', 'registered'].indexOf(this.activeProfile.privacySetting) > -1
|| (['followers', 'private'].indexOf(this.activeProfile.privacySetting) > -1 && this.followed))) {
this.showForm = true;
} else {
this.showForm = false;
}*/
}
this.indicator.show({
message: 'Loading...'
});
this.postService.getAllPosts({
page: this.page,
followed: this.followed
}).toPromise().then(response => {
console.log(response.result.length);
for( var i = 0; i < response.result.length; i++ ) {
this.posts.push(response.result[i]);
}
if (init) {
setTimeout(() => {
this.indicator.hide();
}, 1000);
}
else {
this.indicator.hide();
}
// if( Config.notificationData != null ) {
// this.autoScroll(Config.notificationData.postId);
// }
// return this.posts;
});
// this.posts = Object.assign(this.posts, request);
}
public onScroll(event) {
// console.log("scroll event", event);
if (!this.loadingNewPosts && !this.infiniteScrollDisabled) {
let currentPage = this.page;
if (event.scrollY > event.object.height - 150) {
this.page++;
}
if (currentPage != this.page) {
this.loadingNewPosts = true;
this.getPosts({
init: false
});
}
}
}
public removePost(deletePost: Post): void {
for( var i = 0; i < this.posts.length; i++) {
if(this.posts[i].id==deletePost.id) {
this.posts.splice(i, 1);
}
}
// this.posts = Object.keys(this.posts)
// .filter((key) => {
// const val = this.posts[key];
// return val.id !== deletePost.id;
// })
// .reduce((obj, key) => {
// obj[key] = this.posts[key];
// return obj;
// }, {});
this.changeDetector.markForCheck();
}
}
<file_sep>/spa/src/app/root-store/message-store/state.ts
export interface State {
conversations: any[];
unreadMessagesCount: number;
activeConversationId: string | null;
infiniteScroll: {
page: number,
disabled: boolean
};
}
export const initialState: State = {
conversations: [],
unreadMessagesCount: 0,
activeConversationId: null,
infiniteScroll: {
page: 1,
disabled: false
}
};
<file_sep>/spa/src/app/root-store/auth-store/index.ts
import * as AuthActions from './actions';
import * as AuthState from './state';
import * as AuthSelectors from './selectors';
import * as AuthModels from './models';
import * as AuthResolvers from './resolvers';
export {
AuthStoreModule
} from './module';
export {
AuthActions,
AuthState,
AuthSelectors,
AuthModels,
AuthResolvers
};
<file_sep>/spa/src/app/modules/social-feed/social-feed.component.ts
import { Component, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
import { ISubscription } from 'rxjs/Subscription';
import { ActivatedRoute } from '@angular/router';
import { Store } from '@ngrx/store';
import { Post } from '../../root-store/common-models';
import { PostService } from '../../root-store/services/post.service';
import { VendorService } from '../../root-store/services/vendor.service';
import {
RootStoreState,
ProfileSelectors,
CommonModels
} from '../../root-store';
@Component({
selector: 'app-social-feed',
templateUrl: './social-feed.component.html',
styleUrls: ['./social-feed.component.sass']
})
export class SocialFeedComponent implements OnInit, OnDestroy {
objectValues: any;
activeProfile: CommonModels.Profile;
subActiveProfile: ISubscription;
posts: CommonModels.Post[] | {};
postForm: any;
page: number;
infiniteScrollDisabled: boolean;
followed: boolean;
showForm: boolean;
profilingTest: any;
recommendedVendors: any;
constructor(
private route: ActivatedRoute,
private store: Store<RootStoreState.State>,
private postService: PostService,
private changeDetector: ChangeDetectorRef,
private vendorService: VendorService
) {
}
async ngOnInit() {
this.showForm = true;
this.posts = {};
this.objectValues = Object.values;
this.page = 1;
this.subActiveProfile = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
if (activeProfile) {
this.activeProfile = activeProfile;
this.followed = (localStorage.getItem(this.activeProfile + '-socialFeedShowFollowed') == 'true' ? true : false) || false;
}
this.getPosts({
init: true
});
});
this.profilingTest = localStorage.getItem('profilingTest') ? JSON.parse(localStorage.getItem('profilingTest')) : false;
this.vendorService.getVendors({
categoryId: this.profilingTest.categoryId,
lat: this.profilingTest.lat,
lng: this.profilingTest.lng,
page: 1,
limit: 3,
random: true
}).toPromise().then(response => {
this.recommendedVendors = response.result;
});
}
ngOnDestroy() {
this.subActiveProfile.unsubscribe();
}
appendPost(post) {
this.posts = Object.assign(post, this.posts);
}
showFollowed(value) {
this.followed = value;
localStorage.setItem(this.activeProfile + '-socialFeedShowFollowed', value);
this.getPosts({
init: true
});
}
async getPosts({ init }) {
if (init) {
this.posts = {};
this.page = 1;
this.infiniteScrollDisabled = false;
if (this.activeProfile && this.activeProfile.type == 'wedding' && (['public', 'registered'].indexOf(this.activeProfile.privacySetting) > -1
|| (['followers', 'private'].indexOf(this.activeProfile.privacySetting) > -1 && this.followed))) {
this.showForm = true;
} else {
this.showForm = false;
}
}
let request = await this.postService.getAllPosts({
page: this.page,
followed: this.followed
}).toPromise().then(response => {
let posts = [];
response.result.forEach(post => {
posts[post.id] = post;
});
if (response.result.length == 0) {
this.infiniteScrollDisabled = true;
}
return posts;
});
this.posts = Object.assign(this.posts, request);
}
onScroll(direction) {
let currentPage = this.page;
if (direction == 'down') {
this.page++;
} else if (this.page > 1) {
this.page--;
}
if (currentPage != this.page) {
this.getPosts({
init: false
});
}
}
public removePost(deletePost: Post): void {
this.posts = Object.keys(this.posts)
.filter((key) => {
const val = this.posts[key];
return val.id !== deletePost.id;
})
.reduce((obj, key) => {
obj[key] = this.posts[key];
return obj;
}, {});
this.changeDetector.markForCheck();
}
}
<file_sep>/spa/src/app/modules/social-feed/components/comment/comment.component.ts
import {
Component,
OnInit,
Input,
EventEmitter,
Output
} from '@angular/core';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { FlashMessagesService } from 'angular2-flash-messages';
import { AuthModels } from '../../../../root-store';
import { PostService } from '../../../../root-store/services/post.service';
import { ConfirmDialogComponent } from '../../../../shared/confirm-dialog/confirm-dialog.component';
@Component({
selector: 'comment',
templateUrl: './comment.component.html',
styleUrls: ['./comment.component.sass']
})
export class CommentComponent implements OnInit {
@Input() comment: any;
@Input() authInfo: AuthModels.AuthInfo;
@Input() postId: string;
@Input() weddingId: string;
@Input() asWedding: boolean;
@Output() commentDeleted: EventEmitter<any> = new EventEmitter();
@Output() commentEditToggled: EventEmitter<boolean> = new EventEmitter();
public editActive = false;
constructor(
private postService: PostService,
private _flashMessagesService: FlashMessagesService,
private modalService: NgbModal,
) {
}
ngOnInit() {
}
public toggleEdit(): void {
this.editActive = !this.editActive;
this.commentEditToggled.next(this.editActive);
}
public deleteComment(): void {
const modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'});
modal.componentInstance['data'] = {
title: 'Delete comment',
text: 'Are you sure?',
confirm: this.sendDeleteReq.bind(this)
};
}
public onCommentEditSuccess(editedText: string): void {
this.comment.text = editedText;
}
private sendDeleteReq(): void {
this.postService.deleteComment({weddingId: this.weddingId, postId: this.postId, commentId: this.comment.id}).subscribe(
() => {
this.commentDeleted.next(this.comment);
this._flashMessagesService.show('Comment deleted', {cssClass: 'alert-success', timeout: 3000});
},
() => {
this._flashMessagesService.show('Comment delete failed', {cssClass: 'alert-danger', timeout: 3000});
}
);
}
}
<file_sep>/website/src/config/environments/test.ts
module.exports = {
web: {},
salt: 'C961641355CA6B7FD6CE1891C1056CA4'
};
<file_sep>/nativescript-app/app/shared/components/radio-buttons/radio-buttons.component.ts
import {
Component,
EventEmitter,
Input,
OnInit,
Output,
} from '@angular/core';
import * as _ from 'lodash';
@Component({
moduleId: module.id,
selector: 'radio-buttons',
templateUrl: 'radio-buttons.component.html',
styleUrls: ['./radio-buttons.component.scss']
})
export class RadioButtonsComponent implements OnInit {
@Input() options: Array<String>;
@Input() selected: Number = 0;
@Output() valueChanged: EventEmitter<any> = new EventEmitter();
public radioOptions: Array<any>;
private active: any;
constructor() {
}
ngOnInit(): void {
this.radioOptions = _.map(this.options, (val: string, i: number) => {
const selected = i === this.selected;
return {
selected: selected,
label: val
}
});
}
public setActive(changedOption: any): void {
this.radioOptions = _.map(this.radioOptions, (option) => {
if (changedOption.label === option.label) {
this.active = option;
}
return {
selected: changedOption.label === option.label,
label: option.label
}
});
this.valueChanged.next(this.active);
}
}
<file_sep>/spa/src/app/root-store/root-store.module.ts
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { EffectsModule } from '@ngrx/effects';
import { StoreModule } from '@ngrx/store';
import { AuthStoreModule } from './auth-store';
import { MemberStoreModule } from './member-store';
import { TaskStoreModule } from './task-store';
import { ProfileStoreModule } from './profile-store';
import { MessageStoreModule } from './message-store';
@NgModule({
imports: [
CommonModule,
AuthStoreModule,
MemberStoreModule,
TaskStoreModule,
ProfileStoreModule,
MessageStoreModule,
StoreModule.forRoot({}),
EffectsModule.forRoot([])
],
declarations: []
})
export class RootStoreModule { }
<file_sep>/nativescript-app/app/modules/shared.module.ts
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import {
AvatarComponent,
CheckboxComponent,
ConversationsComponent,
DateInputComponent,
LocationInputComponent,
NotificationsComponent,
SelectInputComponent,
UploadPhotoComponent,
MenuComponent,
} from '~/shared/components';
import { RadioButtonsComponent } from '~/shared/components/radio-buttons';
import { DatepickerModal, ListSelectModal, LocationModal, UploadModal } from '~/shared/modals';
import { DateWithHoursPipe, FullDatePipe } from '~/shared/pipes';
import { TimeAgoPipe } from '~/shared/pipes/time-ago.pipe';
import { StarRatingComponent } from '../shared/components/star-rating/star-rating.component';
@NgModule({
imports: [
CommonModule,
],
entryComponents: [
DatepickerModal,
ListSelectModal,
LocationModal,
UploadModal,
],
declarations: [
AvatarComponent,
CheckboxComponent,
ConversationsComponent,
DateInputComponent,
DatepickerModal,
DateWithHoursPipe,
FullDatePipe,
TimeAgoPipe,
NotificationsComponent,
ListSelectModal,
LocationModal,
LocationInputComponent,
UploadModal,
UploadPhotoComponent,
SelectInputComponent,
RadioButtonsComponent,
StarRatingComponent,
],
exports: [
AvatarComponent,
CheckboxComponent,
DateInputComponent,
DatepickerModal,
DateWithHoursPipe,
FullDatePipe,
TimeAgoPipe,
ListSelectModal,
LocationModal,
LocationInputComponent,
UploadModal,
UploadPhotoComponent,
SelectInputComponent,
RadioButtonsComponent,
StarRatingComponent,
]
})
export class SharedModule { }<file_sep>/nativescript-app/app/shared/services/guest.service.ts
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { API_URL } from '~/shared/configs';
@Injectable()
export class GuestService {
private apiUrl: string = API_URL;
constructor(
private http: HttpClient
) {
}
getGuests({ weddingId, options }): Observable<any> {
let params = '';
Object.keys(options).map((key, i) => {
let value = options[key];
if(value) {
params += `${params.length == 0 ? '/?' : '&'}${key}=${value}`;
}
});
return this.http.get<any[]>(`${this.apiUrl}/weddings/${weddingId}/guests${params}`);
}
getGuest({ guestId, weddingId }): Observable<any> {
return this.http.get<any[]>(`${this.apiUrl}/weddings/${weddingId}/guests/${guestId}`);
}
addGuest({ guest, weddingId }): Observable<any> {
return this.http.post(`${this.apiUrl}/weddings/${weddingId}/guests`, guest);
}
editGuest({ guest, guestId, weddingId }): Observable<any> {
return this.http.patch(`${this.apiUrl}/weddings/${weddingId}/guests/${guestId}`, guest);
}
deleteGuest({ guestId, weddingId }): Observable<any> {
return this.http.delete(`${this.apiUrl}/weddings/${weddingId}/guests/${guestId}`);
}
getStats(weddingId): Observable<any> {
return this.http.get<any[]>(`${this.apiUrl}/weddings/${weddingId}/guests/stats`);
}
}
<file_sep>/nativescript-app/app/modules/auth/components/index.ts
export * from './login';
export * from './register';
export * from './welcome';
export * from './set-password';
export * from './remind-password';
export * from './account-settings';<file_sep>/nativescript-app/app/shared/components/create-profile/vendor/products/create-vendor-products.component.ts
import { Component, EventEmitter, Output } from '@angular/core';
import { AddProductModal } from '~/shared/components';
import { ModalService } from '~/shared/services';
@Component({
moduleId: module.id,
selector: 'create-vendor-products',
templateUrl: 'create-vendor-products.component.html',
styleUrls: ['../../create-profile-base.component.scss', './create-vendor-products.component.scss']
})
export class CreateVendorProductsComponent {
@Output() previousStepEvent: EventEmitter<any> = new EventEmitter();
@Output() nextStepEvent: EventEmitter<any> = new EventEmitter();
public products: Array<any> = [
{
photo: '',
name: 'Product name',
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
price: '$80'
},
{
photo: '',
name: 'Product name',
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
price: '$120',
}
];
constructor(
private modalService: ModalService
) {
}
public previousStep(): void {
this.previousStepEvent.next();
}
public nextStep(): void {
this.nextStepEvent.next();
}
public openCreateModal(): void {
this.modalService.showModal(AddProductModal, {}).then(
(product: any) => {
this.addProduct(product);
}
);
}
public addProduct(product: any): void {
// TODO
}
}
<file_sep>/nativescript-app/app/root-store/wedding-store/effects.ts
import { Injectable } from '@angular/core';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { Store } from '@ngrx/store';
import { of } from 'rxjs/observable/of';
import { catchError, exhaustMap, map, withLatestFrom, concatMap, concatMapTo } from 'rxjs/operators';
import * as applicationSettings from 'application-settings';
import { State } from '~/root-store';
import { GetTasks } from '~/root-store/task-store/actions';
import { PrivacySettingEnum, WeddingRoleEnum } from '~/root-store/wedding-store/models';
import { DialogsService, TaskService, WeddingService } from '~/shared/services';
import { DialogType } from '~/shared/types/enum';
import {
WeddingActionTypes,
GetWeddings,
GetWeddingsSuccess,
SetActiveWedding,
SetActiveWeddingSuccess,
SetActiveWeddingFailure,
CreateWedding,
CreateWeddingSuccess,
CreateWeddingFailure,
GetWeddingMembers,
GetWeddingMembersSuccess,
UpdateWedding,
UpdateWeddingSuccess,
UpdateWeddingFailure,
} from './actions';
@Injectable()
export class WeddingEffects {
constructor(
private actions$: Actions,
private weddingService: WeddingService,
private taskService: TaskService,
private store: Store<State>,
private dialogsService: DialogsService,
) { }
@Effect()
getWeddings$ = this.actions$.pipe(
ofType<GetWeddings>(WeddingActionTypes.GET_WEDDINGS),
exhaustMap(() =>
this.weddingService
.getWeddings()
.pipe(
map(
response => new GetWeddingsSuccess({
weddings: response.result
})
)
)
)
);
@Effect()
getWeddingsSuccess$ = this.actions$.pipe(
ofType<GetWeddingsSuccess>(WeddingActionTypes.GET_WEDDINGS_SUCCESS),
map((action) => {
const weddings = action.payload.weddings;
let activeWeddingId = applicationSettings.getString('activeWeddingId');
if (!activeWeddingId && weddings[0]) {
activeWeddingId = weddings[0].id;
applicationSettings.setString('activeWeddingId', activeWeddingId);
}
return new SetActiveWedding();
})
);
@Effect()
setActiveWedding$ = this.actions$.pipe(
ofType<SetActiveWedding>(WeddingActionTypes.SET_ACTIVE_WEDDING),
withLatestFrom(this.store),
map(([action, store]) => {
const accountId = store.auth.authInfo.account.id;
let activeWeddingId = action.payload ? action.payload.id : null;
const localActiveWeddingId = applicationSettings.getString(`${accountId}-activeWeddingId`);
let activeWedding = null;
const weddings = store.wedding.weddings;
if (!activeWeddingId && localActiveWeddingId) {
activeWeddingId = localActiveWeddingId;
} else if (!activeWeddingId && weddings[0]) {
activeWeddingId = weddings[0].id;
}
if (activeWeddingId) {
applicationSettings.setString(`${accountId}-activeWeddingId`, activeWeddingId);
}
if (activeWeddingId && weddings) {
for (let i = 0; i < weddings.length; i++) {
let wedding = weddings[i];
if (wedding.id == activeWeddingId) {
activeWedding = wedding;
break;
}
}
}
if (!activeWedding) {
applicationSettings.remove(`${accountId}-activeWeddingId`);
}
if (activeWedding) {
return new SetActiveWeddingSuccess({
wedding: activeWedding
});
} else {
return new SetActiveWeddingFailure();
}
})
);
@Effect()
setActiveWeddingSuccess$ = this.actions$.pipe(
ofType<SetActiveWeddingSuccess>(WeddingActionTypes.SET_ACTIVE_WEDDING_SUCCESS),
map(action => action.payload),
concatMap(payload => [
new GetWeddingMembers(),
new GetTasks({weddingId: payload.wedding.id})
])
);
@Effect()
getWeddingMembers$ = this.actions$.pipe(
ofType<GetWeddingMembers>(WeddingActionTypes.GET_WEDDING_MEMBERS),
exhaustMap(action =>
this.weddingService
.getWeddingMembers()
.pipe(
map((response: any) => new GetWeddingMembersSuccess({
weddingMembers: response.result
}))
)
)
);
@Effect()
createWedding$ = this.actions$.pipe(
ofType<CreateWedding>(WeddingActionTypes.CREATE_WEDDING),
exhaustMap(action =>
this.weddingService
.createWedding(action.payload)
.pipe(
concatMapTo([
new GetWeddings(),
new CreateWeddingSuccess()
]),
catchError(error => of(new CreateWeddingFailure(error)))
)
)
);
@Effect()
updateWedding$ = this.actions$.pipe(
ofType<UpdateWedding>(WeddingActionTypes.UPDATE_WEDDING),
exhaustMap(action => {
let wedding = action.payload.wedding;
return this.weddingService
.changeWeddingName({
name: wedding.name
})
.pipe(
map(response => {
this.dialogsService.showDialog(
{
type: DialogType.Success,
message: 'Wedding updated successfully'
}
);
return new UpdateWeddingSuccess({
wedding: wedding
})
}),
catchError(error => {
this.dialogsService.showDialog({
type: DialogType.Alert,
message: error.error.title
});
return of(new UpdateWeddingFailure({ error: error.error }));
})
)
})
);
}
<file_sep>/spa/src/app/modules/wedding/wedding.component.ts
import { Component, OnInit, OnDestroy } from '@angular/core';
import { ISubscription } from "rxjs/Subscription";
import { ActivatedRoute } from '@angular/router';
import { Observable } from "rxjs/Observable";
import { Store } from '@ngrx/store';
import { WeddingService } from '../../root-store/services/wedding.service';
import {
RootStoreState,
CommonModels
} from '../../root-store';
@Component({
selector: 'app-wedding',
templateUrl: './wedding.component.html',
styleUrls: ['./wedding.component.sass']
})
export class WeddingComponent implements OnInit, OnDestroy {
wedding: CommonModels.WeddingDetails
routeSubscription: ISubscription;
constructor(
private route: ActivatedRoute,
private store: Store<RootStoreState.State>,
private weddingService: WeddingService
) { }
async ngOnInit() {
this.routeSubscription = this.route.params.subscribe(async (params) => {
await this.getWeddingDetails(params.weddingId);
});
}
private async getWeddingDetails(weddingId) {
await this.weddingService.getWedding({
weddingId: weddingId
}).toPromise().then(response => {
this.wedding = response.result
});
}
async ngOnDestroy() {
this.routeSubscription.unsubscribe();
}
async follow(weddingId) {
await this.weddingService.follow({
weddingId: weddingId
}).toPromise().then(response => {
this.getWeddingDetails(this.wedding.id);
});
}
async unfollow(weddingId) {
await this.weddingService.unfollow({
weddingId: weddingId
}).toPromise().then(response => {
this.getWeddingDetails(this.wedding.id);
});
}
}
<file_sep>/nativescript-app/app/shared/components/create-profile/couple/create-couple.component.ts
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
import * as bghttp from 'nativescript-background-http';
import { screen } from 'tns-core-modules/platform';
import * as _ from 'lodash';
import { PrivacySettingEnum, Wedding } from '~/root-store/wedding-store/models';
import { API_URL, TOP_BAR_HEIGHT } from '~/shared/configs';
import { AuthService, DialogsService, WeddingService } from '~/shared/services';
import { DialogType } from '~/shared/types/enum';
import { RouterExtensions } from 'nativescript-angular/router';
import { Store } from '@ngrx/store';
import { RootStoreState, CommonModels } from '~/root-store';
import { ProfileService } from '~/shared/services/profile.service';
import { LoadingIndicator } from 'nativescript-loading-indicator';
@Component({
moduleId: module.id,
selector: 'create-couple',
templateUrl: 'create-couple.component.html',
styleUrls: ['../create-profile-base.component.scss'],
})
export class CreateCoupleComponent implements OnInit {
wedding: any;
formData: FormData;
submitted: boolean;
error: any;
public screenHeight;
public height;
private indicator: LoadingIndicator;
public activeStep: number = 0;
public steps: Array<any> = [
{
name: 'Profile info',
done: false,
},
{
name: 'Partner 1',
done: false,
},
{
name: 'Partner 2',
done: false,
},
{
name: 'Privacy settings',
done: false,
}
];
private fields: Wedding = {
description: '',
privacySetting: PrivacySettingEnum.Public,
avatar: '',
partners: []
};
constructor(
private changeDetector: ChangeDetectorRef,
private authService: AuthService,
private dialogService: DialogsService,
private routerExtensions: RouterExtensions,
private store: Store<RootStoreState.State>,
private weddingService: WeddingService,
private profileService: ProfileService
) {
console.log("---create-couple---")
this.screenHeight = screen.mainScreen.heightDIPs - TOP_BAR_HEIGHT;
this.height = this.screenHeight - 230;
this.indicator = new LoadingIndicator();
}
ngOnInit() {
this.activeStep = 0;
this.submitted = false;
this.wedding = {
description: null,
privacySetting: null,
events: [{
type: 'ceremony',
date: null
}, {
type: 'reception',
date: null
}],
partners: [{
firstName: null,
lastName: null,
role: null
}, {
firstName: null,
lastName: null,
role: null
}]
};
}
public nextStep(values: any): void {
if (this.activeStep === 0) {
this.fields = Object.assign({}, this.fields, values);
} else if (this.activeStep === 1 || this.activeStep === 2) {
this.fields.partners.push(values);
} else {
this.fields.privacySetting = values;
this.uploadForm(); //recreate in wedding service
}
if (this.activeStep !== 3) {
this.activeStep++;
}
this.changeDetector.markForCheck();
}
private uploadForm(): void {
console.log("creating profile");
this.indicator.show({
message: 'Creating Couple Profile...'
});
let session = bghttp.session('create-profile');
let params = [];
// TODO move this to service and make function for converting objects to formData
_.forEach(this.fields, (value, key) => {
// console.log(value, key);
if (key === 'avatar' && value) {
const param = {
name: key,
fileName: `${value}`,
mimeType: 'image/jpeg'
};
params.push(param);
} else if (key === 'events' || key === 'partners') {
_.forEach(value, (item, iterator) => {
_.forEach(item, (itemValue, itemKey) => {
if (itemValue) {
let param;
const paramName = `${key}[${iterator}][${itemKey}]`;
if (itemKey !== 'avatar') {
param = {
value: itemValue,
name: paramName
};
} else {
param = {
name: paramName,
filename: `${itemValue}`,
mimeType: 'image/jpeg',
};
}
params.push(param);
}
})
});
} else {
if (value) {
let param = {
value: `${value}`,
name: key
};
params.push(param);
}
}
});
const url = API_URL + '/weddings';
let request = {
url: url,
method: 'POST',
headers: {
'Authorization': 'Bearer ' + this.authService.getToken(),
},
description: 'Create Couple Account'
};
let task: bghttp.Task;
for(var i = 0; i < params.length; i++){
console.log(params[i]);
}
console.log("mmmmmmmmmmmmmmmm");
task = session.multipartUpload(params, request); //TODO: needed to replace with new module
task.on('complete', (response)=> this.onCompleteUpload(response));
task.on('error', (error)=> this.onUploadError(error))
}
public previousStep(): void {
this.activeStep--;
this.changeDetector.markForCheck();
}
public onCompleteUpload(response): void {
console.log(response);
this.indicator.hide();
// TODO redirect to app and get weddings
this.dialogService.showDialog({
type: DialogType.Success,
message: 'Wedding created'
})
this.profileService.initProfiles().then(()=>{
this.routerExtensions.navigate(['/app', 'social-feed']);
});
}
public onUploadError(error): void {
console.log("upload error: ", error);
this.indicator.hide();
this.dialogService.showDialog({
type: DialogType.Alert,
message: 'Wedding creation failed'
})
}
}
<file_sep>/nativescript-app/app/shared/components/create-profile/couple/partner/index.ts
export * from './create-couple-partner.component';<file_sep>/website/src/controllers/ProfileController.ts
import express = require('express');
import RequestService from 'services/RequestService';
import { IConfig } from 'config';
import * as path from 'path';
export default class ProfileController {
config: IConfig;
requestService: RequestService;
constructor({ config, requestService }: { config: IConfig, requestService: RequestService }) {
this.config = config;
this.requestService = requestService;
}
private async getProfile(req) {
try {
let jwt = req.cookies.jwt;
let profile = await this.requestService.make({
method: 'get',
url: 'weddings/' + req.params.profileId,
jwt: jwt
});
let onlyRegistered = (profile.privacySetting == 'registered' && !profile.description) ? true : false;
let onlyFollowers = profile.privacySetting == 'followers' ? true : false;
return { profile, onlyRegistered, onlyFollowers }
} catch (error) {
throw error;
}
}
async getNewsFeed(req, res, next) {
try {
let { profile, onlyRegistered, onlyFollowers } = await this.getProfile(req);
let jwt = req.cookies.jwt;
let posts = await this.requestService.make({
method: 'get',
url: 'weddings/' + req.params.profileId + '/posts',
jwt: jwt
});
res.render('profile/index', {
profile: profile,
posts: posts,
onlyRegistered: onlyRegistered,
onlyFollowers: onlyFollowers,
restricted: (onlyFollowers || onlyRegistered) ? true : false,
templateName: 'profile/subpages/newsFeed'
});
} catch (error) {
next(error);
}
}
async getInformations(req, res, next) {
try {
let jwt = req.cookies.jwt;
let { profile, onlyRegistered, onlyFollowers } = await this.getProfile(req);
let partners = await this.requestService.make({
method: 'get',
url: 'weddings/' + req.params.profileId + '/partners',
jwt: jwt
});
let events = await this.requestService.make({
method: 'get',
url: 'weddings/' + req.params.profileId + '/events',
jwt: jwt
});
res.render('profile/index', {
profile: profile,
partners: partners,
events: events,
onlyRegistered: onlyRegistered,
onlyFollowers: onlyFollowers,
restricted: (onlyFollowers || onlyRegistered) ? true : false,
templateName: 'profile/subpages/informations'
});
} catch (error) {
next(error);
}
}
async getPhotos(req, res, next) {
try {
let jwt = req.cookies.jwt;
let { profile, onlyRegistered, onlyFollowers } = await this.getProfile(req);
res.render('profile/index', {
profile: profile,
onlyRegistered: onlyRegistered,
onlyFollowers: onlyFollowers,
restricted: (onlyFollowers || onlyRegistered) ? true : false,
templateName: 'profile/subpages/photos'
});
} catch (error) {
next(error);
}
}
async getGuestList(req, res, next) {
try {
let jwt = req.cookies.jwt;
let { profile, onlyRegistered, onlyFollowers } = await this.getProfile(req);
res.render('profile/index', {
profile: profile,
onlyRegistered: onlyRegistered,
onlyFollowers: onlyFollowers,
restricted: (onlyFollowers || onlyRegistered) ? true : false,
templateName: 'profile/subpages/guestList'
});
} catch (error) {
next(error);
}
}
};
<file_sep>/nativescript-app/app/root-store/task-store/selectors.ts
import {
createFeatureSelector,
createSelector,
MemoizedSelector
} from '@ngrx/store';
import { Task } from './models';
import { State } from './state';
const getTasks = (state: State): any => state.tasks;
const getTaskStats = (state: State): any => state.stats;
const getUITaskForm = (state: State): any => state.ui.taskForm;
const getUITaskDetails = (state: State): any => state.ui.taskDetails;
export const selectMemberState: MemoizedSelector<object, State> = createFeatureSelector<State>('task');
export const selectTasks: MemoizedSelector<object, Task[] | null> = createSelector(selectMemberState, getTasks);
export const selectTaskStats: MemoizedSelector<object, Task[] | null> = createSelector(selectMemberState, getTaskStats);
export const selectUITaskForm: MemoizedSelector<object, any> = createSelector(selectMemberState, getUITaskForm);
export const selectUITaskDetails: MemoizedSelector<object, any> = createSelector(selectMemberState, getUITaskDetails);
export const selectTaskDetails = (taskId: string) => {
return createSelector(
selectMemberState,
(state: State) => state.taskDetails[taskId]
);
};
<file_sep>/spa/src/app/modules/settings/components/wedding/wedding-events/wedding-events.component.ts
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { WeddingService } from '../../../../../root-store/services/wedding.service';
import { WeddingEditBase } from '../wedding-edit.base';
@Component({
selector: 'app-settings-wedding-events',
templateUrl: './wedding-events.component.html',
styleUrls: ['./wedding-events.component.sass']
})
export class SettingsWeddingEventsComponent extends WeddingEditBase implements OnInit {
public minDate: Date;
public loading = true;
public events: Array<any>;
public form: Array<any> = [
{
type: null
},
{
type: null
},
];
public addEvent = [false, false];
constructor(
private weddingService: WeddingService,
private changeDetector: ChangeDetectorRef,
) {
super();
}
ngOnInit(): void {
this.getEvents();
}
private getEvents(): void {
this.weddingService.getWeddingEvents({weddingId: this.wedding.id}).subscribe(
(res: any) => {
this.loading = false;
const result = res.result;
this.events = result;
this.form = result.map((event: any) => {
return {
address: event.address,
date: event.date,
placeName: event.placeName,
type: event.type,
};
});
if (!result.length || result.length < 2) {
if (result.length === 1) {
this.form[1] = {
type: null
};
this.events[1] = this.form[1];
this.addEvent = [false, true];
} else {
this.events = [{type: null}, {type: null}];
this.form = this.events;
this.addEvent = [true, true];
}
}
this.changeDetector.markForCheck();
}
);
}
public handleAddressChange(address: any, i: number): void {
const event = this.form[i];
event.placeName = address.name;
event.website = address.website;
event.lat = address.geometry.location.lat();
event.lng = address.geometry.location.lng();
event.address = address.formatted_address;
}
public submit(i: number): void {
if (this.addEvent[i]) {
const event = this.form[i];
this.weddingService.addEvent({weddingId: this.wedding.id, event}).subscribe(
() => {
this.getEvents();
this.addEvent[i] = false;
this.editActive[i] = false;
this.changeDetector.markForCheck();
},
(e) => {
// TODO handle err
}
);
} else {
const event = this.events[i];
const editedEvent = this.form[i];
this.weddingService.editEvent({weddingId: this.wedding.id, eventId: event.id, eventEdited: editedEvent}).subscribe(
() => {
this.getEvents();
this.editActive[i] = false;
this.changeDetector.markForCheck();
}, (e) => {
// TODO handle err
}
);
}
}
public showCreateEvent(): void {
if (this.editActive[0]) {
this.editActive[1] = true;
} else {
this.editActive[0] = true;
}
this.changeDetector.markForCheck();
}
}
<file_sep>/spa/src/app/modules/inspirations/components/add-inspiration-modal/add-inspiration-modal.component.ts
import { Component, OnInit, OnDestroy, EventEmitter } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
import { ISubscription } from 'rxjs/Subscription';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { Router, ActivatedRoute } from '@angular/router';
import * as objectToFormData from 'object-to-formdata';
import { Store } from '@ngrx/store';
import { distinctUntilChanged, debounceTime, switchMap, tap, catchError, map } from 'rxjs/operators'
import { Subject, Observable, of, concat } from 'rxjs';
import { InspirationService } from '../../../../root-store/services/inspiration.service';
import { environment } from '../../../../../environments/environment';
import {
RootStoreState,
ProfileSelectors,
CommonModels
} from '../../../../root-store';
@Component({
selector: 'app-add-inspiration-modal',
templateUrl: './add-inspiration-modal.component.html',
styleUrls: ['./add-inspiration-modal.component.sass']
})
export class AddInspirationModalComponent implements OnInit, OnDestroy {
onSubmitEvent: EventEmitter<any> = new EventEmitter();
activeProfile: CommonModels.Profile;
subscriptionActiveProfile: ISubscription;
routeSubscription: ISubscription;
formData: FormData;
imageUrl: string;
dropzoneClass: string;
defaultTags: object[];
tags: Observable<any>;
tagsLoading = false;
tagsInput = new Subject<string>();
selectedTags: any[] = [];
imageFile: any;
inspiration: {
description: string;
tags: string;
authorWeddingId: string;
}
submitted: boolean;
error: any;
constructor(
public activeModal: NgbActiveModal,
private store: Store<RootStoreState.State>,
private route: ActivatedRoute,
private inspirationService: InspirationService,
public sanitizer: DomSanitizer,
) { }
async ngOnInit() {
this.submitted = false;
this.inspiration = {
description: '',
tags: '',
authorWeddingId: ''
}
this.subscriptionActiveProfile = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
this.activeProfile = activeProfile;
this.inspiration.authorWeddingId = activeProfile.id;
});
this.formData = new FormData();
this.loadTags();
}
ngOnDestroy() {
this.subscriptionActiveProfile.unsubscribe();
}
cancel() {
this.activeModal.close();
}
async onSubmit() {
this.submitted = true;
this.inspiration.tags = this.selectedTags.join(',');
let formData = objectToFormData(
this.inspiration,
this.formData
);
await this.inspirationService.addInspiration(formData)
.toPromise().then(async response => {
await this.inspirationService.getInspiration({
inspirationId: response.result,
pinnedToWeddingId: this.activeProfile.id
}).toPromise().then(response => {
this.activeModal.close();
this.submitted = false;
this.onSubmitEvent.emit(response.result);
});
}).catch(error => {
this.error = error;
this.submitted = false;
});
}
imageInputChange(event) {
let fileList: FileList = event.dataTransfer ? event.dataTransfer.files : event.target.files;
if (fileList.length > 0) {
let file = fileList[0];
this.imageUrl = (window.URL) ? window.URL.createObjectURL(file) : (window as any).webkitURL.createObjectURL(file);
this.formData.append('image', file, file.name);
}
}
deleteImage() {
this.imageUrl = '';
this.formData.delete('image');
}
async loadTags() {
this.tags = concat(
of([]),
this.tagsInput.pipe(
debounceTime(200),
distinctUntilChanged(),
tap(() => this.tagsLoading = true),
switchMap(term => this.inspirationService.getTags(term).pipe(
map(response => {
return response.result
}),
catchError(() => of([])),
tap(() => this.tagsLoading = false)
))
)
);
}
}
<file_sep>/spa/src/app/root-store/auth-store/reducers.ts
import { Actions, AuthActionTypes } from './actions';
import { initialState } from './state';
export function reducer(state = initialState, action: Actions) {
switch (action.type) {
case AuthActionTypes.GET_AUTH_INFO_SUCCESS:
return {
...state,
isAuthenticated: true,
authInfo: {
...action.payload
}
};
default:
return state;
}
}
<file_sep>/website/src/controllers/GuestController.ts
import express = require('express');
import RequestService from 'services/RequestService';
import { IConfig } from 'config';
import * as path from 'path';
export default class GuestController {
config: IConfig;
requestService: RequestService;
constructor({ config, requestService }: { config: IConfig, requestService: RequestService }) {
this.config = config;
this.requestService = requestService;
}
async getGuestInvitation(req, res, next) {
try {
let jwt = req.cookies.jwt;
let guestInvitation = await this.requestService.make({
method: 'get',
url: 'guests/invitations/' + req.params.token,
jwt: jwt
});
let showButtons = <any>{};
if(guestInvitation) {
showButtons = {
ceremony: {
reject: [2,3].indexOf(guestInvitation.ceremonyGuestStatus.id) > -1 ? true : false,
confirm: [2,4].indexOf(guestInvitation.ceremonyGuestStatus.id) > -1 ? true : false
},
reception: {
reject: [2,3].indexOf(guestInvitation.receptionGuestStatus.id) > -1 ? true : false,
confirm: [2,4].indexOf(guestInvitation.receptionGuestStatus.id) > -1 ? true : false
}
}
}
res.render('guest/invitation', {
guestInvitation: guestInvitation ? guestInvitation : null,
partners: guestInvitation ? guestInvitation.wedding.partners : null,
showButtons: showButtons
});
} catch (error) {
next(error);
}
}
async postGuestInvitation(req, res, next) {
try {
let jwt = req.cookies.jwt;
let receptionInvitation = req.body.reception_invitation;
let ceremonyInvitation = req.body.ceremony_invitation;
await this.requestService.make({
method: 'patch',
url: 'guests/invitations/' + req.params.token,
jwt: jwt
}, {
ceremonyStatusId: ceremonyInvitation ? (ceremonyInvitation == 'confirm' ? 3 : 4) : undefined,
receptionStatusId: receptionInvitation ? (receptionInvitation == 'confirm' ? 3 : 4) : undefined
});
return res.redirect('/guest-invitation/' + req.params.token);
} catch (error) {
next(error);
}
}
};
<file_sep>/nativescript-app/app/modules/social-feed/social-feed.routing.ts
import { Routes } from '@angular/router';
import { SocialFeedComponent } from './social-feed.component';
import { AuthGuard } from '~/shared/guards/auth.guard';
export const socialFeedRouting: Routes = [
{
path: 'social-feed',
component: SocialFeedComponent,
// canActivate: [AuthGuard], //TODO uncomment this after testing
}
];
<file_sep>/nativescript-app/app/shared/components/location-input/location-input.component.ts
import {
ChangeDetectorRef,
Component,
EventEmitter,
Output,
Input
} from '@angular/core';
import { LocationModal } from '~/shared/modals';
import { ModalService } from '~/shared/services';
@Component({
selector: 'location-input',
templateUrl: 'location-input.component.html',
})
export class LocationInputComponent {
@Input() location: string;
@Output() locationChanged: EventEmitter<any> = new EventEmitter();
@Output() text:EventEmitter<any> = new EventEmitter();
constructor(
private modalService: ModalService,
private changeDetector: ChangeDetectorRef
) {
}
public openLocationModal(): void {
this.modalService.showModal(LocationModal, {fullscreen: true }).then((
(value: any) => {
this.location = value.formatted_address;
this.locationChanged.next(value);
this.text.next(this.location);
this.changeDetector.markForCheck();
}
));
}
}<file_sep>/website/src/config/environments/development.ts
import * as path from 'path';
const logPath = path.join(__dirname, '../../../logs/development.log');
module.exports = {
web: {
port: 3001
},
salt: '04C99518AFCD95D517B337A5C14DBE21',
apiUrl: 'https://api.dev-c01.muulabs.pl/v1/',
spaUrl: 'https://app.dev-c01.muulabs.pl',
cdnUrl: 'https://storage.googleapis.com/wedding-app-dev',
logging: {
appenders: {
console: { type: 'console' },
file: {
type: 'file',
filename: logPath
}
},
categories: {
default: { appenders: ['console'], level: 'info' },
file: { appenders: ['file'], level: 'info' }
}
},
cookieDomain: 'dev-c01.muulabs.pl',
redis: {
host: "127.0.0.1",
port: 6379
},
auth: {
facebook: {
clientID: 1473371242769200,
clientSecret: '88834982adea7abc8e091980169235c0',
callbackURL: 'https://dev-c01.muulabs.pl/login/facebook/callback'
},
google: {
clientID: '547095225389-p0me9f4ujeu8ivtie54cv5fgfpmiqa9k.apps.googleusercontent.com',
clientSecret: '<KEY>',
callbackURL: 'https://dev-c01.muulabs.pl/login/google/callback'
}
}
};
<file_sep>/nativescript-app/app/modules/wedding/components/couple-informations/index.ts
export * from './couple-informations.component';<file_sep>/nativescript-app/app/shared/modals/list-select/list-select.modal.ts
import { ChangeDetectorRef, Component } from '@angular/core';
import { ModalDialogParams } from 'nativescript-angular/directives/dialogs';
import * as _ from 'lodash';
@Component({
selector: 'list-select-modal',
templateUrl: 'list-select.modal.html',
})
export class ListSelectModal {
public items: Array<any>;
public propertyToShow: string;
private selectedItem: any;
constructor(
private params: ModalDialogParams,
private changeDetector: ChangeDetectorRef,
) {
this.propertyToShow = this.params.context.propertyToShow;
const items = this.params.context.items;
if (this.propertyToShow) {
this.items = _.map(items, (item: any) => {
return item[this.propertyToShow];
});
} else {
this.items = items;
}
this.changeDetector.markForCheck();
}
public selectedIndexChanged(event: any): void {
if (this.propertyToShow) {
this.selectedItem = this.params.context.items[event.value];
} else {
this.selectedItem = this.items[event.value];
}
}
public close(): void {
this.params.closeCallback(this.selectedItem);
}
}<file_sep>/nativescript-app/app/modules/social-feed/components/post/index.ts
export * from './post.component';<file_sep>/spa/src/app/modules/marketplace/components/profiling-test/profiling-test.component.ts
import { Component, OnInit, EventEmitter } from '@angular/core';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ISubscription } from 'rxjs/Subscription';
import { ActivatedRoute } from '@angular/router';
@Component({
selector: 'app-profiling-test',
templateUrl: './profiling-test.component.html',
styleUrls: ['./profiling-test.component.sass']
})
export class ProfilingTestComponent implements OnInit {
categoryFilterQuestions: object[];
onSubmitEvent: EventEmitter<any> = new EventEmitter();
model: any;
filters: {
categoryId: number[],
lat: number,
lng: number,
rad: number
}
constructor(
public activeModal: NgbActiveModal,
private route: ActivatedRoute
) { }
async ngOnInit() {
this.model = {};
this.filters = {
categoryId: [],
lat: null,
lng: null,
rad: 10000
};
this.categoryFilterQuestions = [{
text: 'Have you chosen a Reception Venue?',
categoryId: [4]
}, {
text: 'Have you chosen Music?',
categoryId: [5, 6]
}, {
text: 'Have you chosen a Catering Provider?',
categoryId: [3]
}, {
text: 'Do you have an Outfit?',
categoryId: [7, 20]
}, {
text: 'Do you have Wedding Rings?',
categoryId: [13]
}, {
text: 'Do you have a Photographer?',
categoryId: [16]
}, {
text: 'Do you have an Invitations?',
categoryId: [12]
}];
}
cancel() {
this.activeModal.close();
}
skip() {
this.activeModal.close();
localStorage.setItem('skipProfilingTest', JSON.stringify(true));
}
addCategoryId(ids) {
for(let i = 0; i < ids.length; i++) {
this.filters.categoryId.push(ids[i]);
}
}
removeCategoryId(ids) {
for(let i = 0; i < ids.length; i++) {
let index = this.filters.categoryId.indexOf(ids[i]);
if(index > -1) {
this.filters.categoryId.splice(index, 1);
}
};
}
setCoordinates(event) {
this.filters.lat = event.geometry.location.lat();
this.filters.lng = event.geometry.location.lng();
}
onSubmit() {
this.onSubmitEvent.emit(this.filters);
localStorage.setItem('profilingTest', JSON.stringify(this.filters));
this.activeModal.close();
}
}
<file_sep>/nativescript-app/app/root-store/root-store.state.ts
import { AuthState } from './auth-store';
import { TaskState } from './task-store';
import { WeddingState } from './wedding-store';
import { MemberState } from '~/root-store/member-store';
import { ProfileState } from '~/root-store/profile-store';
import { MessageState } from '~/root-store/message-store';
export interface State {
auth: AuthState.State;
task: TaskState.State;
wedding: WeddingState.State;
member: MemberState.State;
profile: ProfileState.State;
message: MessageState.State;
}
<file_sep>/spa/src/app/root-store/services/inspiration.service.ts
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { environment } from '../../../environments/environment';
@Injectable()
export class InspirationService {
private apiUrl: string = environment.apiUrl;
constructor(
private http: HttpClient
) {
}
getTags(term = ''): Observable<any> {
return this.http.get<any[]>(`${this.apiUrl}/tags?term=${term}`);
}
getInspirations({ page, tags, pinnedToWeddingId, onlyPinned = false, authorWeddingId }): Observable<any> {
return this.http.get<any[]>(`${this.apiUrl}/inspirations?page=${page}&tags=${tags}&pinnedToWeddingId=${pinnedToWeddingId}${onlyPinned ? '&onlyPinned=true' : ''}${authorWeddingId ? '&authorWeddingId=' + authorWeddingId : ''}`);
}
getInspiration({ inspirationId, pinnedToWeddingId }): Observable<any> {
return this.http.get<any[]>(`${this.apiUrl}/inspirations/${inspirationId}?pinnedToWeddingId=${pinnedToWeddingId}`);
}
addInspiration(inspiration): Observable<any> {
return this.http.post(`${this.apiUrl}/inspirations`, inspiration);
}
deleteInspiration(inspirationId): Observable<any> {
return this.http.delete(`${this.apiUrl}/inspirations/${inspirationId}`);
}
pinInspiration({ inspirationId, weddingId }): Observable<any> {
return this.http.post(`${this.apiUrl}/inspirations/${inspirationId}/pin`, {
weddingId
});
}
unpinInspiration({ inspirationId, weddingId }): Observable<any> {
let options = {
headers: new HttpHeaders({
'Content-Type': 'application/json',
}),
body: {
weddingId
}
};
return this.http.delete(`${this.apiUrl}/inspirations/${inspirationId}/pin`, options);
}
}
<file_sep>/nativescript-app/app/modules/marketplace/marketplace.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {
MarketplaceComponent,
MarketplaceListComponent,
FiltersComponent,
DetailComponent,
} from '~/modules/marketplace/components';
import { WritereviewModal } from '~/modules/marketplace/modals';
import { SharedModule } from '../shared.module';
@NgModule({
declarations: [
MarketplaceListComponent,
MarketplaceComponent,
FiltersComponent,
DetailComponent,
WritereviewModal,
],
entryComponents: [
WritereviewModal,
],
imports: [
CommonModule,
SharedModule,
],
exports: [
]
})
export class MarketplaceModule { }<file_sep>/website/src/helpers/hbsHelpers.ts
const Handlebars = require('handlebars');
const moment = require('moment');
let hbsHelpers = () => {
return {
avatar: (dir, filename, size, suffix) => {
let src;
if(['sq', 'sm', 'md', 'lg'].indexOf(suffix) == -1) {
suffix = 'sq';
}
if (filename) {
src = dir + filename.replace(/(\.[\w\d_-]+)$/i, '_'+ suffix +'$1');
} else {
src = '/static/avatar-placeholder.png';
}
return '<img class="avatar" src="' + src + '" width="' + size + '">';
},
isSelected: (option, value) => {
if (option == value) {
return 'selected';
}
},
isChecked: (id, options) => {
if (options) {
for (let i = 0; i < options.length; i++) {
if (options[i].id == id) {
return 'checked';
}
}
}
},
partial: name => {
return name;
},
link: (cssClass, current, href, name, recursive) => {
let activeClass = '';
href = href.replace('//', '/'); // ugly fix
if (current == href || recursive && current != href && current.substr(0, href.length) == href && href != '/') {
activeClass = 'active';
};
return '<a class="' + cssClass + ' ' + activeClass + '" href="' + href + '">' + name + '</a>';
},
age: birthdate => {
let age = moment().diff(birthdate, 'years');
return isNaN(age) ? '' : age;
},
lowerCase: string => {
return string.toLowerCase();
},
ifEquals: (val1, val2, opts) => {
if (val1 == val2) {
return opts.fn(this);
}
return opts.inverse(this);
},
math: (lvalue, operator, rvalue, options) => {
lvalue = parseFloat(lvalue);
rvalue = parseFloat(rvalue);
return {
"+": lvalue + rvalue,
"-": lvalue - rvalue,
"*": lvalue * rvalue,
"/": lvalue / rvalue,
"%": lvalue % rvalue
}[operator];
},
compare: (lvalue, operator, rvalue, options) => {
var operators = {
'==': function(l, r) {
return l == r;
},
'===': function(l, r) {
return l === r;
},
'!=': function(l, r) {
return l != r;
},
'<': function(l, r) {
return l < r;
},
'>': function(l, r) {
return l > r;
},
'<=': function(l, r) {
return l <= r;
},
'>=': function(l, r) {
return l >= r;
},
'typeof': function(l, r) {
return typeof l == r;
}
}
if (!operators[operator])
throw new Error("Handlerbars Helper 'compare' doesn't know the operator " + operator);
var result = operators[operator](lvalue, rvalue);
if (result) {
return options.fn(this);
} else {
return options.inverse(this);
}
},
concat: function() {
let arg = Array.prototype.slice.call(arguments, 0);
arg.pop();
return arg.join('');
},
dateFormat: function(date, format, locale) {
if (typeof format !== 'string') {
format = 'lll';
}
if (typeof locale !== 'string') {
locale = 'en';
}
moment.locale(locale);
return moment(date).utc().format(format);
}
};
}
export {
hbsHelpers
}
<file_sep>/spa/src/app/root-store/task-store/module.ts
import { NgModule } from '@angular/core';
import { EffectsModule } from '@ngrx/effects';
import { TaskEffects } from './effects';
import { NgbModule, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { TaskService } from '../services/task.service';
import { reducer } from './reducers';
import { StoreModule } from '@ngrx/store';
import { ConfirmDialogModule } from "../../shared/confirm-dialog/confirm-dialog.module";
import { TruncatePipe } from "../../shared/pipes/truncate";
@NgModule({
imports: [
StoreModule.forFeature('task', reducer),
EffectsModule.forFeature([TaskEffects]),
NgbModule.forRoot(),
ConfirmDialogModule
],
declarations: [
TruncatePipe
],
providers: [
TaskService,
TaskEffects
]
})
export class TaskStoreModule { }
<file_sep>/spa/src/app/shared/shared.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { MatIconModule } from '@angular/material';
import { MomentModule } from 'angular2-moment';
import { OWL_DATE_TIME_FORMATS, OwlDateTimeModule } from 'ng-pick-datetime';
import { OwlMomentDateTimeModule } from 'ng-pick-datetime-moment';
import { NgDatepickerModule } from 'ng2-datepicker';
import { GooglePlaceModule } from 'ngx-google-places-autocomplete';
import { CdnImageComponent } from './cdnImage/cdnImage.component';
import { ImageInputModule } from './image-input/image-input.module';
import { UploaderComponent } from './uploader/uploader.component';
import { FormProgressComponent } from './form-progress/form-progress.component';
import { RegisterFormModelDirective } from './directives/registerFormModel.directive';
import { RatingComponent } from './rating/rating.component';
import { TranslateModule } from '@ngx-translate/core';
export const MY_MOMENT_FORMATS = {
parseInput: 'll h:mm',
fullPickerInput: 'll h:mm',
datePickerInput: 'll',
timePickerInput: 'LT',
monthYearLabel: 'MMM YYYY',
dateA11yLabel: 'LL',
monthYearA11yLabel: 'MMMM YYYY',
};
@NgModule({
imports: [
MatIconModule,
CommonModule,
NgDatepickerModule,
MomentModule,
GooglePlaceModule,
OwlDateTimeModule,
OwlMomentDateTimeModule,
ImageInputModule,
TranslateModule
],
declarations: [
FormProgressComponent,
CdnImageComponent,
UploaderComponent,
RegisterFormModelDirective,
RatingComponent
],
providers: [
{ provide: OWL_DATE_TIME_FORMATS, useValue: MY_MOMENT_FORMATS },
],
exports: [
FormProgressComponent,
CdnImageComponent,
UploaderComponent,
FormsModule,
NgDatepickerModule,
MomentModule,
GooglePlaceModule,
OwlDateTimeModule,
OwlMomentDateTimeModule,
ImageInputModule,
RegisterFormModelDirective,
RatingComponent,
TranslateModule
]
})
export class SharedModule { }
<file_sep>/nativescript-app/app/root-store/task-store/module.ts
import { NgModule } from '@angular/core';
import { EffectsModule } from '@ngrx/effects';
import { StoreModule } from '@ngrx/store';
import { TaskEffects } from './effects';
import { TaskService } from '~/shared/services';
import { reducer } from './reducers';
@NgModule({
imports: [
StoreModule.forFeature('task', reducer),
EffectsModule.forFeature([TaskEffects]),
],
providers: [
TaskEffects
]
})
export class TaskStoreModule { }
<file_sep>/spa/src/app/modules/settings/components/wedding/wedding-partners/wedding-partners.component.ts
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
import { Store } from '@ngrx/store';
import * as objectToFormData from 'object-to-formdata';
import { RootStoreState, CommonModels } from '../../../../../root-store';
import { WeddingService } from '../../../../../root-store/services/wedding.service';
import { ProfileService } from '../../../../../root-store/services/profile.service';
import { WeddingEditBase } from '../wedding-edit.base';
@Component({
selector: 'app-settings-wedding-partners',
templateUrl: './wedding-partners.component.html',
})
export class SettingsWeddingPartnersComponent extends WeddingEditBase implements OnInit {
public loading = true;
public WeddingRoleEnum = CommonModels.WeddingRoleEnum;
public avatarUrlPrepend: string;
public formData: FormData = new FormData();
public avatarUrls: Array<string> = [];
public isImageValid: Array<boolean> = [false, false];
public partners: Array<any>;
public form: Array<any> = [
{
role: null
},
{
role: null
}
];
constructor(
private weddingService: WeddingService,
private changeDetector: ChangeDetectorRef,
public sanitizer: DomSanitizer,
private store: Store<RootStoreState.State>,
private profileService: ProfileService
) {
super();
}
ngOnInit(): void {
this.avatarUrlPrepend = `wedding/${this.wedding.id}/avatars/`;
this.getWeddingPartners();
}
private getWeddingPartners(): void {
this.weddingService.getWeddingPartners({weddingId: this.wedding.id}).subscribe(
(res: any) => {
this.loading = false;
this.partners = res.result;
this.form = res.result.map((partner: any, i: number) => {
return {
firstName: partner.firstName,
lastName: partner.lastName,
role: partner.role,
};
});
this.changeDetector.markForCheck();
}
);
}
public handleInput(value: any, input: string, index: number): void {
this.form[index][input] = value;
}
public submit(i: number): void {
const partner = this.partners[i];
const editedPartner = this.form[i];
const filesFormData = new FormData();
filesFormData.set('avatar', this.formData.get(`partners[${i}][avatar]`)); // Hack
const formData = objectToFormData(
editedPartner,
{indices: true},
filesFormData
);
this.weddingService.editPartner({weddingId: this.wedding.id, partnerId: partner.id, partnerEdited: formData}).subscribe(
() => {
this.editActive[i] = false;
this.getWeddingPartners();
this.profileService.initProfiles();
this.changeDetector.markForCheck();
}, (e) => {
// TODO handle err
}
);
}
}
<file_sep>/nativescript-app/app/root-store/wedding-store/selectors.ts
import {
createFeatureSelector,
createSelector,
MemoizedSelector
} from '@ngrx/store';
import { Wedding, Member } from './models';
import { State } from './state';
const getWeddings = (state: State): any => state.weddings;
const getActiveWedding = (state: State): any => state.activeWedding;
const getActiveWeddingMembers = (state: State): any => state.activeWeddingMembers;
const getWeddingForm = (state: State): any => state.ui.weddingForm;
const getMemberForm = (state: State): any => state.ui.memberForm;
const getMemberRoleForm = (state: State): any => state.ui.memberRoleForm;
export const selectWeddingState: MemoizedSelector<object, State> = createFeatureSelector<State>('wedding');
export const selectWeddings: MemoizedSelector<object, Wedding[]> = createSelector(selectWeddingState, getWeddings);
export const selectActiveWedding: MemoizedSelector<object, Wedding | null> = createSelector(selectWeddingState, getActiveWedding);
export const selectActiveWeddingMembers: MemoizedSelector<object, Member[] | null> = createSelector(selectWeddingState, getActiveWeddingMembers);
export const hasWedding: MemoizedSelector<object, any> = createSelector(selectWeddingState, (state) => {
return state.weddings && state.weddings.length > 0;
});
export const selectWeddingForm: MemoizedSelector<object, any> = createSelector(selectWeddingState, getWeddingForm);
export const selectMemberForm: MemoizedSelector<object, any> = createSelector(selectWeddingState, getMemberForm);
export const selectMemberRoleForm: MemoizedSelector<object, any> = createSelector(selectWeddingState, getMemberRoleForm);<file_sep>/spa/src/app/root-store/auth-store/models.ts
export interface AuthInfo {
account: {
id: string;
email: string;
isActive: boolean;
firstName: string;
lastName: string;
avatar: string;
activatedAt: string;
createdAt: string;
updatedAt: string;
deletedAt: string | null;
};
}
<file_sep>/nativescript-app/app/shared/services/auth.service.ts
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Store } from '@ngrx/store';
import { RouterExtensions } from 'nativescript-angular';
import { Observable } from 'rxjs/Observable';
import * as applicationSettings from 'application-settings';
import { State } from '~/root-store';
import { AuthActionTypes } from '~/root-store/auth-store/actions';
import { API_URL, Config } from '~/shared/configs';
import { DialogsService } from '~/shared/services/dialogs.service';
import { DialogType } from '~/shared/types/enum';
@Injectable()
export class AuthService {
private token: string
private apiUrlAccount: string = API_URL + '/account';
private apiUrl: string = API_URL + '/auth';
constructor(
private http: HttpClient,
private store: Store<State>,
private dialogsService: DialogsService,
private routerExt: RouterExtensions
) {
console.log("---authService---")
this.token = applicationSettings.getString('jwt', '');
console.log(this.token)
if (this.token) {
setTimeout(() => {
this.store.dispatch({type: AuthActionTypes.LOGIN});
});
}
}
getToken(): string {
return this.token;
}
public clearToken(): void {
applicationSettings.remove('jwt');
}
register(params: any) {
console.log("---auth-register---")
return new Promise((resolve, reject) => {
this.http.post(`${API_URL}/auth/register`,
params
).subscribe(
(response: any) => {
/*
this.dialogsService.showDialog({
type: DialogType.Info,
message: 'Registered, please activate your email'
});
this.routerExt.navigate(['']);
*/
console.log(response)
resolve()
}, error => {
console.log(error)
reject()
}
)
})
}
public registerSocial(params: any): Observable<any> {
return this.http.post(API_URL+'/auth/register/social', params);
}
login(email: string, password: string) {
return new Promise((resolve, reject) => {
this.http.post(`${API_URL}/auth/authenticate`,
{email, password}
).subscribe(
(response: any) => {
this.token = response.result.token;
Config.token = response.result.token;
applicationSettings.setString('jwt', this.token);
this.store.dispatch({type: AuthActionTypes.LOGIN});
resolve()
}, error => {
// console.log(error);
reject(error);
}
)
})
}
public loginSocial(foreign_id: string, token: string, provider: string): Observable<any> {
return this.http.post(`${API_URL}/auth/authenticate/social`,
{foreign_id, token, provider}
);
}
public activateAccount(hash: string): Observable<any> {
return this.http.post(`${API_URL}/auth/activate`, {hash});
}
public sendRemindPassword(email: string): void {
this.http.post(`${API_URL}/auth/password/remind`, {email})
.subscribe(
() => {
this.dialogsService.showDialog({
type: DialogType.Info,
message: 'Email sent, should be there in 5 minutes'
})
}
)
;
}
public setPassword(hash: string, password: string, password_repeat: string): Observable<any> {
return this.http.post(`${API_URL}/auth/password/set`,
{hash, password, password_repeat}
);
}
public logout(): Observable<any> {
return this.http.post(`${API_URL}/auth/logout`, {});
}
public changePassword({password_new, password_new_repeat, password}): Observable<any> {
return this.http.post(`${this.apiUrl}/password/change`, {password_new, password_new_repeat, password});
}
// ------------ END Register/login requests END ----------- //
public getAccountInfo(): Observable<any> {
return this.http.get(`${API_URL}/auth/authenticate`);
}
public deleteAccount({password}): Observable<any> {
return this.http.post(`${this.apiUrl}/forget`, {password});
}
public updateAccount(account: any): Observable<any> {
return this.http.patch(this.apiUrlAccount, account);
}
public setAccountAvatar(formData): Observable<any> {
const headers = new HttpHeaders();
headers.append('Content-Type', 'application/form-data');
return this.http.patch(this.apiUrlAccount, formData, {
headers
});
}
}<file_sep>/spa/src/app/core/layout/components/notifications-indicator/notifications-indicator.component.ts
import { Component, OnInit, OnDestroy } from '@angular/core';
import { ISubscription } from 'rxjs/Subscription';
import { Observable } from "rxjs/Observable";
import { Store } from '@ngrx/store';
import { Router } from "@angular/router";
import { environment } from '../../../../../environments/environment';
import { SioService } from '../../../../root-store/services/sio.service';
import { NotificationService } from '../../../../root-store/services/notification.service';
import {
RootStoreState,
ProfileActions,
ProfileSelectors
} from '../../../../root-store';
@Component({
selector: 'notifications-indicator',
templateUrl: './notifications-indicator.component.html',
styleUrls: ['./notifications-indicator.component.sass']
})
export class NotificationsIndicatorComponent implements OnInit, OnDestroy {
activeProfile: any;
activeProfileSub: ISubscription;
sioSubscription: any;
notificationsCount: number;
notifications: object[] = [];
loading: boolean = false;
page: number = 0;
infiniteScrollDisabled: boolean = false;
constructor(
private router: Router,
private store: Store<RootStoreState.State>,
private sioService: SioService,
private notificationService: NotificationService
) { }
async ngOnInit() {
this.activeProfileSub = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
this.activeProfile = activeProfile;
this.sioSubscription = this.sioService.getNotifications().subscribe(notification => {
let sound = new Audio(environment.cdnUrl + '/sounds/notification.mp3');
this.notificationsCount++;
sound.play();
});
});
await this.notificationService.countUnreadNotifications()
.toPromise().then(response => {
this.notificationsCount = response.result
});
}
ngOnDestroy() {
this.activeProfileSub.unsubscribe();
if (this.sioSubscription) {
this.sioSubscription.unsubscribe();
}
}
async getNotifications() {
this.page++;
await this.notificationService.getNotifications(this.page)
.toPromise().then(response => {
this.loading = false;
if (response.result.length == 0) {
this.infiniteScrollDisabled = true;
} else {
this.notifications = this.notifications.concat(response.result);
}
}).catch(error => {
this.loading = false;
});
}
async toggleDropdown(opening) {
if (opening) {
this.loading = true;
this.page = 0;
this.infiniteScrollDisabled = false;
this.notifications = [];
await this.getNotifications();
await this.notificationService.markAsRead()
.toPromise().then(response => {
this.notificationsCount = 0;
})
}
}
getRouterLink(notification) {
let link;
switch (notification.type) {
case 'comment_created':
case 'like_created':
link = ['/', 'wedding', notification.additionalData.weddingId, 'post', notification.additionalData.postId];
break;
case 'invitation_received':
link = ['/settings/invitations'];
break;
case 'vendor_review_created':
link = ['/', 'vendor', notification.additionalData.vendorId, 'review', notification.entityId];
break;
case 'guest_status_changed':
link = ['/', 'guest-list'];
break;
}
return link;
}
}
<file_sep>/spa/src/app/root-store/services/notification.service.ts
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { Store } from '@ngrx/store';
import { environment } from '../../../environments/environment';
@Injectable()
export class NotificationService {
private apiUrl: string = environment.apiUrl;
constructor(
private http: HttpClient
) {}
countUnreadNotifications(): Observable<any> {
return this.http.get<any[]>(this.apiUrl + '/notifications/count');
}
getNotifications(page): Observable<any> {
return this.http.get<any[]>(this.apiUrl + '/notifications?page=' + page);
}
markAsRead(): Observable<any> {
return this.http.patch<any[]>(this.apiUrl + '/notifications', {});
}
}
<file_sep>/spa/src/app/modules/messages-manager/messages-manager.routing.ts
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { MessagesManagerComponent } from './messages-manager.component';
import { MessagesConversationComponent } from './components/conversation/conversation.component';
import { AuthGuard } from '../../shared/guards/auth.guard';
import { ProfileResolvers } from '../../root-store';
const routes: Routes = [
{
path: 'messages', component: MessagesManagerComponent, canActivate: [AuthGuard], resolve: {
activeProfile: ProfileResolvers.ActiveProfileResolver
},
children: [
{
path: ':conversationId', component: MessagesConversationComponent
}
]
}
];
export const routing: ModuleWithProviders = RouterModule.forChild(routes);
<file_sep>/spa/src/app/modules/settings/components/wedding/index.ts
export * from './wedding-events';
export * from './wedding-info';
export * from './wedding-partners';
export * from './settings-wedding.component';
<file_sep>/nativescript-app/app/modules/tasks/components/task/task.component.ts
import { Component, Input } from '@angular/core';
import { Store } from '@ngrx/store';
import { screen } from 'tns-core-modules/platform';
import { CreateTaskModal } from '~/modules/tasks/modals';
import { State, Task } from '~/root-store';
import { DeleteTask, EditTask, SetTaskStatus } from '~/root-store/task-store/actions';
import { ModalService } from '~/shared/services';
import { TaskStatusEnum } from '~/shared/types/enum';
@Component({
moduleId: module.id,
selector: 'task',
templateUrl: 'task.component.html',
styleUrls: ['../list/tasks-list.component.scss']
})
export class TaskComponent {
@Input() activeWeddingId: string;
@Input() task: Task;
public showActions: boolean = false;
private containerWidth: number;
constructor(
private modalService: ModalService,
private store: Store<State>,
) {
this.containerWidth = screen.mainScreen.widthDIPs;
console.log("---task---")
}
public toggleActions(): void {
this.showActions = !this.showActions;
}
public openEditModal(task: Task): void {
this.modalService.showModal(CreateTaskModal, {
context: {
task: task,
weddingId: this.activeWeddingId,
modalType: 'edit'
}
}).then(
(res: Task) => {
this.store.dispatch(new EditTask(
{
weddingId: this.activeWeddingId,
task: res
}
))
}
)
}
public deleteTask(task: Task): void {
this.store.dispatch(new DeleteTask({weddingId: this.activeWeddingId, taskId: task.id}));
}
public updateTaskStatus(task: Task, update: boolean): void {
const status = update ? TaskStatusEnum.Done : TaskStatusEnum.Todo;
this.store.dispatch(new SetTaskStatus({taskId: task.id, weddingId: this.activeWeddingId, status}));
}
}
<file_sep>/nativescript-app/app/modules/wedding/modals/index.ts
export * from './add-guest';
export * from './delete-edit';<file_sep>/nativescript-app/app/modules/tasks/tasks.routing.ts
import { TasksListComponent } from '~/modules/tasks/components';
export const tasksRouting = [
{
path: 'tasks-list',
component: TasksListComponent,
}
];<file_sep>/spa/src/app/modules/settings/settings.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { MatIconModule } from '@angular/material';
import { SharedModule } from '../../shared/shared.module';
import { SettingsWeddingInvitationsComponent } from './components/invitations';
import {
SettingsWeddingEventsComponent,
SettingsWeddingComponent,
SettingsWeddingInfoComponent,
SettingsWeddingPartnersComponent
} from './components/wedding';
import { SettingsVendorComponent } from './components/vendor/vendor.component';
import { SettingsComponent } from './settings.component';
import { SettingsAccountComponent } from './components/account/account.component';
import { SettingsMembersComponent } from './components/members/members.component';
import { AvatarModule } from '../../shared/avatar/avatar.module';
import { routing } from './settings.routing';
import { LayoutModule } from '../../core/layout/layout.module';
@NgModule({
imports: [
CommonModule,
FormsModule,
RouterModule,
NgbModule.forRoot(),
routing,
LayoutModule,
MatIconModule,
AvatarModule,
SharedModule,
],
declarations: [
SettingsComponent,
SettingsWeddingEventsComponent,
SettingsWeddingComponent,
SettingsWeddingInfoComponent,
SettingsWeddingPartnersComponent,
SettingsWeddingInvitationsComponent,
SettingsMembersComponent,
SettingsAccountComponent,
SettingsVendorComponent
],
exports: [
SettingsComponent
]
})
export class SettingsModule {
}
<file_sep>/nativescript-app/app/root-store/member-store/models.ts
import { WeddingRoleEnum } from "~/root-store/wedding-store/models";
export interface Member {
id: string,
email: string,
role: string,
isActive: boolean,
weddingId: string,
account: {
id: string,
email: string,
firstName: string,
lastName: string
},
invitation: {
id: string,
isAccepted: boolean,
createdAt: string | null,
deletedAd: string | null
}
}
export interface Invitation {
id: string;
invitedAt: string;
wedding: {
id: string
name: string
};
member: {
id: string,
role: WeddingRoleEnum
};
}
<file_sep>/nativescript-app/app/root-store/task-store/actions.ts
import { Action } from '@ngrx/store';
import { TaskStatusEnum } from '~/shared/types/enum';
import { Task, TaskDetails } from './models';
export enum TaskActionTypes {
NO_EFFECT = '[TASK] ---',
GET_TASKS = '[TASK] Get tasks',
GET_TASKS_SUCCESS = '[TASK] Get tasks success',
GET_TASKS_FAILURE = '[TASK] Get tasks failure',
ADD_TASK = '[TASK] Add task',
ADD_TASK_CANCEL = '[TASK] Add task cancel',
ADD_TASK_SUCCESS = '[TASK] Add task success',
ADD_TASK_FAILURE = '[TASK] Add task failure',
GET_TASK_DETAILS = '[TASK] Get task details',
GET_TASK_DETAILS_SUCCESS = '[TASK] Get task details success',
GET_TASK_DETAILS_FAILURE = '[TASK] Get task details failure',
TOGGLE_TASK_DETAILS = '[TASK] Toggle task details',
DELETE_TASK_CONFIRM = '[TASK] Confirm delete task',
DELETE_TASK = '[TASK] Delete task',
DELETE_TASK_SUCCESS = '[TASK] Delete task success',
DELETE_TASK_FAILURE = '[TASK] Delete task failure',
CHANGE_TASK_STATUS = '[TASK] Change status',
CHANGE_TASK_STATUS_SUCCESS = '[TASK] Change status success',
CHANGE_TASK_STATUS_FAILURE = '[TASK] Change status failure',
EDIT_TASK = '[TASK] Edit task',
EDIT_TASK_CANCEL = '[TASK] Edit task cancel',
EDIT_TASK_SUCCESS = '[TASK] Edit task success',
EDIT_TASK_FAILURE = '[TASK] Edit task failure',
GET_TASK_STATS = '[TASK] Get task stats',
GET_TASK_STATS_SUCCESS = '[TASK] Get task stats success',
GET_TASK_STATS_FAILURE = '[TASK] Get task stats failure',
SET_TASK_STATUS = '[TASK] Set task status',
SET_TASK_STATUS_SUCCESS = '[TASK] Set task status success'
}
export class NoEffect implements Action {
readonly type = TaskActionTypes.NO_EFFECT;
}
export class GetTasks implements Action {
readonly type = TaskActionTypes.GET_TASKS;
constructor(public payload: {
weddingId: string,
assignedMemberId?: string
}) { }
}
export class GetTasksSuccess implements Action {
readonly type = TaskActionTypes.GET_TASKS_SUCCESS;
constructor(public payload: {
tasks: Task[]
}) { }
}
export class GetTasksFailure implements Action {
readonly type = TaskActionTypes.GET_TASKS_FAILURE;
constructor(public payload: {
error: any
}) { }
}
export class AddTask implements Action {
readonly type = TaskActionTypes.ADD_TASK;
constructor(public payload: {
weddingId: string,
task: any
}) { }
}
export class AddTaskCancel implements Action {
readonly type = TaskActionTypes.ADD_TASK_CANCEL;
}
export class AddTaskSuccess implements Action {
readonly type = TaskActionTypes.ADD_TASK_SUCCESS;
constructor(public payload: {
weddingId: string,
task: Task
}) { }
}
export class AddTaskFailure implements Action {
readonly type = TaskActionTypes.ADD_TASK_FAILURE;
constructor(public payload: {
error: any
}) { }
}
export class GetTaskDetails implements Action {
readonly type = TaskActionTypes.GET_TASK_DETAILS;
constructor(public payload: {
weddingId: string,
taskId: string
}) { }
}
export class GetTaskDetailsSuccess implements Action {
readonly type = TaskActionTypes.GET_TASK_DETAILS_SUCCESS;
constructor(public payload: {
task: TaskDetails
}) { }
}
export class GetTaskDetailsFailure implements Action {
readonly type = TaskActionTypes.GET_TASK_DETAILS_FAILURE;
constructor(public payload: {
error: any
}) { }
}
export class ToggleTaskDetails implements Action {
readonly type = TaskActionTypes.TOGGLE_TASK_DETAILS;
constructor(public payload: {
weddingId: string,
taskId: string
}) { }
}
export class DeleteTask implements Action {
readonly type = TaskActionTypes.DELETE_TASK;
constructor(public payload: {
weddingId: string,
taskId: string
}) { }
}
export class DeleteTaskConfirm implements Action {
readonly type = TaskActionTypes.DELETE_TASK_CONFIRM;
constructor(public payload: {
cancel?: Action,
confirm: Action,
text: string,
title: string
}) { }
}
export class DeleteTaskSuccess implements Action {
readonly type = TaskActionTypes.DELETE_TASK_SUCCESS;
constructor(public payload: {
weddingId: string,
taskId: string
}) { }
}
export class DeleteTaskFailure implements Action {
readonly type = TaskActionTypes.DELETE_TASK_FAILURE;
constructor(public payload: {
error: any
}) { }
}
export class ChangeTaskStatus implements Action {
readonly type = TaskActionTypes.CHANGE_TASK_STATUS;
constructor(public payload: {
weddingId: string,
taskId: string,
status: string
}) { }
}
export class ChangeTaskStatusSuccess implements Action {
readonly type = TaskActionTypes.CHANGE_TASK_STATUS_SUCCESS;
constructor(public payload: {
weddingId: string,
taskId: string,
status: string
}) { }
}
export class ChangeTaskStatusFailure implements Action {
readonly type = TaskActionTypes.CHANGE_TASK_STATUS_FAILURE;
constructor(public payload: {
error: any
}) { }
}
export class EditTask implements Action {
readonly type = TaskActionTypes.EDIT_TASK;
constructor(public payload: {
weddingId: string,
task: any
}) { }
}
export class EditTaskCancel implements Action {
readonly type = TaskActionTypes.EDIT_TASK_CANCEL;
}
export class EditTaskSuccess implements Action {
readonly type = TaskActionTypes.EDIT_TASK_SUCCESS;
constructor(public payload: {
weddingId: string,
task: any
}) { }
}
export class EditTaskFailure implements Action {
readonly type = TaskActionTypes.EDIT_TASK_FAILURE;
constructor(public payload: {
error: any
}) { }
}
export class GetTaskStats implements Action {
readonly type = TaskActionTypes.GET_TASK_STATS;
constructor(public payload: {
weddingId: string
}) { }
}
export class GetTaskStatsSuccess implements Action {
readonly type = TaskActionTypes.GET_TASK_STATS_SUCCESS;
constructor(public payload: {
stats: any
}) { }
}
export class GetTaskStatsFailure implements Action {
readonly type = TaskActionTypes.GET_TASK_STATS_FAILURE;
constructor(public payload: {
error: any
}) { }
}
export class SetTaskStatus implements Action {
readonly type = TaskActionTypes.SET_TASK_STATUS;
constructor(public payload: {
status: TaskStatusEnum,
weddingId: string,
taskId: string
}) {}
}
export class SetTaskStatusSuccess implements Action {
readonly type = TaskActionTypes.SET_TASK_STATUS_SUCCESS;
constructor(public payload: {
status: TaskStatusEnum,
weddingId: string,
taskId: string
}) {}
}
export type TaskActions =
| NoEffect
| GetTasks
| GetTasksSuccess
| GetTasksFailure
| AddTask
| AddTaskCancel
| AddTaskSuccess
| AddTaskFailure
| GetTaskDetails
| GetTaskDetailsSuccess
| GetTaskDetailsFailure
| ToggleTaskDetails
| DeleteTask
| DeleteTaskSuccess
| DeleteTaskFailure
| ChangeTaskStatus
| ChangeTaskStatusSuccess
| ChangeTaskStatusFailure
| EditTask
| EditTaskCancel
| EditTaskSuccess
| EditTaskFailure
| GetTaskStats
| GetTaskStatsSuccess
| GetTaskStatsFailure
| SetTaskStatus
| SetTaskStatusSuccess
<file_sep>/nativescript-app/app/shared/components/upload-photo/index.ts
export * from './upload-photo.component';<file_sep>/spa/src/app/modules/vendor-form/components/payment/payment.component.ts
import { Component, OnInit, OnDestroy, Output, Input, EventEmitter } from '@angular/core';
import { ISubscription } from 'rxjs/Subscription';
import { Store } from '@ngrx/store';
import * as objectToFormData from 'object-to-formdata';
import { ActivatedRoute } from '@angular/router';
import { VendorService } from '../../../../root-store/services/vendor.service';
import { PaymentService } from '../../../../root-store/services/payment.service';
import { ProfileService } from '../../../../root-store/services/profile.service';
import { environment } from '../../../../../environments/environment';
import { Observable } from "rxjs/Observable"
import {
RootStoreState,
ProfileSelectors,
CommonModels
} from '../../../../root-store';
@Component({
selector: 'vendor-form-payment',
templateUrl: './payment.component.html',
styleUrls: ['./payment.component.sass']
})
export class VendorFormPaymentComponent implements OnInit, OnDestroy {
@Input() mode: string;
@Output() setStep = new EventEmitter<number>();
subActiveProfile: ISubscription;
vendorProfilePrice: number;
vendorInvoiceInfo: any;
paymentUrl: string;
countries: object[] = [];
activeProfile: any;
constructor(
private store: Store<RootStoreState.State>,
private vendorService: VendorService,
private route: ActivatedRoute,
private paymentService: PaymentService,
private profileService: ProfileService
) { }
async ngOnInit() {
this.vendorProfilePrice = environment.vendorProfilePrice;
this.activeProfile = this.route.snapshot.data.activeProfile;
this.subActiveProfile = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(async activeProfile => {
this.activeProfile = activeProfile;
});
this.paymentUrl = environment.apiUrl + '/vendors/' + this.activeProfile.id + '/checkout';
this.vendorInvoiceInfo = {
vendorId: this.activeProfile.id,
companyName: null,
companyAddress: null,
country: {
id: null,
name: null,
code: null
},
vatNumber: null
}
this.countries = await this.vendorService.getCountries().toPromise().then(response => {
return response.result;
});
await this.vendorService.getVendorInvoiceInfo(this.activeProfile.id).toPromise().then(response => {
if(response.result) {
this.vendorInvoiceInfo = response.result;
}
})
}
ngOnDestroy() {
this.subActiveProfile.unsubscribe();
}
createPurchase() {
return (nonce,
chargeAmount,
vendorInvoiceInfo = { ...this.vendorInvoiceInfo },
vendorService = this.vendorService,
paymentService = this.paymentService,
vendorId = this.activeProfile.id
) => {
return new Observable((observer) => {
vendorService.setVendorInvoiceInfo({
vendorId: vendorInvoiceInfo.vendorId,
vendorInvoiceInfo
}).toPromise().then(() => {
return paymentService.checkout({
nonce, chargeAmount, invoiceInfo: vendorInvoiceInfo, vendorId
}).toPromise().then(response => {
observer.next(response)
}).catch(error => {
observer.error(error);
})
}).catch(error => {
observer.error(error);
})
})
}
}
async paymentStatus(status) {
if(status.success && ['authorized', 'submitted_for_settlement', 'settling', 'settled'].indexOf(status.transaction.status) > -1) {
this.setStep.emit(5);
this.profileService.initProfiles();
}
}
}
<file_sep>/spa/src/app/modules/guest-list/guest-list.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { SharedModule } from '../../shared/shared.module';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { NgSelectModule } from '@ng-select/ng-select';
import { MatIconModule } from '@angular/material';
import { InfiniteScrollModule } from 'angular2-infinite-scroll';
import { GuestListComponent } from './guest-list.component';
import { GuestStatsComponent } from './components/guest-stats/guest-stats.component';
import { GuestComponent } from './components/guest/guest.component';
import { GuestFormModalComponent } from './components/guest-form-modal/guest-form-modal.component';
import { routing } from './guest-list.routing';
import { LayoutModule } from '../../core/layout/layout.module';
@NgModule({
imports: [
CommonModule,
RouterModule,
SharedModule,
routing,
LayoutModule,
NgbModule,
NgSelectModule,
MatIconModule,
InfiniteScrollModule
],
declarations: [
GuestComponent,
GuestListComponent,
GuestStatsComponent,
GuestFormModalComponent
],
exports: [
GuestListComponent
],
entryComponents: [
GuestFormModalComponent
]
})
export class GuestListModule { }
<file_sep>/nativescript-app/app/root-store/member-store/selectors.ts
import {
createFeatureSelector,
createSelector,
MemoizedSelector
} from '@ngrx/store';
import { Member } from './models';
import { State } from './state';
const getMembers = (state: State): any => state.members;
export const selectMemberState: MemoizedSelector<object, State> = createFeatureSelector<State>('member');
export const selectMembers: MemoizedSelector<object, Member[] | null> = createSelector(selectMemberState, getMembers);
<file_sep>/nativescript-app/app/shared/components/date-input/date-input.component.ts
import {
ChangeDetectorRef,
Component,
EventEmitter,
Input,
OnInit,
Output
} from '@angular/core';
import * as moment from 'moment';
import { DATE_FORMAT, DATETIME_FORMAT } from '~/shared/configs';
import { DatepickerModal } from '~/shared/modals';
import { ModalService } from '~/shared/services';
@Component({
selector: 'date-input',
templateUrl: 'date-input.component.html',
})
export class DateInputComponent implements OnInit {
@Input() startValue: any;
@Input() useHours: boolean = false;
@Output() dateChanged: EventEmitter<any> = new EventEmitter();
public date: string;
private displayFormat: string;
constructor(
private modalService: ModalService,
private changeDetector: ChangeDetectorRef
) {
}
ngOnInit(): void {
const format = this.useHours ? DATETIME_FORMAT : DATE_FORMAT;
this.date = this.startValue ? moment(this.startValue).format(format) : format;
this.displayFormat = format;
}
public openDatepickerModal(): void {
this.modalService.showModal(DatepickerModal, {fullscreen: true, context: {useHours: this.useHours} }).then((
(value: string) => {
this.date = value;
this.dateChanged.next(new Date(value).toISOString());
this.changeDetector.markForCheck();
}
));
}
}<file_sep>/nativescript-app/app/shared/services/vendor.service.ts
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { API_URL } from '~/shared/configs';
@Injectable()
export class VendorService {
private apiUrl: string = API_URL;
constructor(
private http: HttpClient
) {}
getOwnedVendors(): Observable<any> {
return this.http.get<any[]>(this.apiUrl + '/vendors?isOwner=true');
}
getVendors(options): Observable<any> {
let params = '';
Object.keys(options).map((key, i) => {
let value = options[key];
if(value) {
params += `${params.length == 0 ? '/?' : '&'}${key}=${value}`;
}
});
console.log("get vendors params: ", params);
return this.http.get<any[]>(this.apiUrl + '/vendors' + params);
}
getVendor({ vendorId }): Observable<any> {
return this.http.get<any[]>(this.apiUrl + '/vendors/' + vendorId);
}
getVendorCategories(): Observable<any> {
return this.http.get<any[]>(this.apiUrl + '/vendor-categories');
}
createVendor(formData): Observable<any> {
const headers = new HttpHeaders();
headers.append('Content-Type', 'application/form-data');
return this.http.post(this.apiUrl + '/vendors', formData, {
headers
});
}
updateVendor({ formData, vendorId }): Observable<any> {
const headers = new HttpHeaders();
headers.append('Content-Type', 'application/form-data');
return this.http.patch(this.apiUrl + '/vendors/' + vendorId, formData, {
headers
});
}
getVendorPhotos({ vendorId }): Observable<any> {
return this.http.get<any[]>(this.apiUrl + '/vendors/' + vendorId + '/photos');
}
addVendorPhotos({ formData, vendorId }): Observable<any> {
const headers = new HttpHeaders();
headers.append('Content-Type', 'application/form-data');
return this.http.post(this.apiUrl + '/vendors/' + vendorId + '/photos', formData, {
headers
});
}
getVendorProducts({ vendorId }): Observable<any> {
return this.http.get<any[]>(this.apiUrl + '/vendors/' + vendorId + '/products');
}
getVendorProduct({ vendorId, vendorProductId }): Observable<any> {
return this.http.get<any[]>(this.apiUrl + '/vendors/' + vendorId + '/products/' + vendorProductId);
}
addVendorProduct({ formData, vendorId }): Observable<any> {
const headers = new HttpHeaders();
headers.append('Content-Type', 'application/form-data');
return this.http.post(this.apiUrl + '/vendors/' + vendorId + '/products', formData, {
headers
});
}
updateVendorProduct({ formData, vendorId, vendorProductId }): Observable<any> {
const headers = new HttpHeaders();
headers.append('Content-Type', 'application/form-data');
return this.http.patch(this.apiUrl + '/vendors/' + vendorId + '/products/' + vendorProductId, formData, {
headers
});
}
getVendorInvoiceInfo(vendorId): Observable<any> {
return this.http.get(this.apiUrl + '/vendors/' + vendorId + '/invoice-info');
}
setVendorInvoiceInfo({ vendorId, vendorInvoiceInfo }): Observable<any> {
return this.http.post(this.apiUrl + '/vendors/' + vendorId + '/invoice-info', vendorInvoiceInfo);
}
deleteVendorProduct({ vendorId, vendorProductId }): Observable<any> {
return this.http.delete(this.apiUrl + '/vendors/' + vendorId + '/products/' + vendorProductId);
}
getVendorReviews({ vendorId, page }): Observable<any> {
return this.http.get(this.apiUrl + '/vendors/' + vendorId + '/reviews?page=' + (page || 1));
}
getVendorReview({ vendorId, vendorReviewId }): Observable<any> {
return this.http.get(this.apiUrl + '/vendors/' + vendorId + '/reviews/' + vendorReviewId);
}
addVendorReview({ vendorId, vendorReview }): Observable<any> {
return this.http.post(this.apiUrl + '/vendors/' + vendorId + '/reviews', vendorReview);
}
deleteVendorReview({ vendorId, vendorReviewId }): Observable<any> {
return this.http.delete(this.apiUrl + '/vendors/' + vendorId + '/reviews/' + vendorReviewId);
}
getVendorProductUnits(): Observable<any> {
return this.http.get<any[]>(this.apiUrl + '/vendor-product-units');
}
getCurrencies(): Observable<any> {
return this.http.get<any[]>(this.apiUrl + '/currencies');
}
getCountries(): Observable<any> {
return this.http.get<any[]>(this.apiUrl + '/countries');
}
}
<file_sep>/spa/src/app/modules/wedding-form/components/privacy/privacy.component.ts
import { Component, OnInit, Input } from '@angular/core';
import { Observable } from "rxjs/Observable";
import { ISubscription } from "rxjs/Subscription";
import { Store } from '@ngrx/store';
import { DatepickerOptions, NgDatepickerComponent } from 'ng2-datepicker';
@Component({
selector: 'wedding-form-privacy',
templateUrl: './privacy.component.html',
styleUrls: ['./privacy.component.sass']
})
export class WeddingFormPrivacyComponent implements OnInit {
@Input() model: any;
@Input() parentForm: any;
privacySettings: any;
activeSetting: string;
constructor() { }
ngOnInit() {
this.privacySettings = [{
title: 'Private profile',
name: 'private',
description: 'Integer nec tincidunt ex, non rhoncus sem. Quisque porttitor blandit.',
icon: 'private'
}, {
title: 'Followers only',
name: 'followers',
description: 'Fusce sed lacus diam. Suspendisse nibh sapien, sagittis in nisi sit amet.',
icon: 'followers'
}, {
title: 'Registered users only',
name: 'registered',
description: 'Maecenas imperdiet quam a velit sodales maximus. Suspendisse.',
icon: 'registered'
}, {
title: 'Public profile',
name: 'public',
description: 'Etiam mollis purus non neque luctus pharetra. Orci varius natoque.',
icon: 'users'
}];
}
setPrivacySetting(setting) {
this.model.privacySetting = setting;
}
}
<file_sep>/spa/src/app/root-store/task-store/selectors.ts
import {
createFeatureSelector,
createSelector,
MemoizedSelector
} from '@ngrx/store';
import { Task } from './models';
import { State } from './state';
const getTasks = (state: State): any => state.tasks;
const getTaskStats = (state: State): any => state.stats;
const getUITaskForm = (state: State): any => state.ui.taskForm;
const getUITaskDetails = (state: State): any => state.ui.taskDetails;
export const selectTaskState: MemoizedSelector<object, State> = createFeatureSelector<State>('task');
export const selectTasks: MemoizedSelector<object, Task[] | null> = createSelector(selectTaskState, getTasks);
export const selectTaskStats: MemoizedSelector<object, Task[] | null> = createSelector(selectTaskState, getTaskStats);
export const selectUITaskForm: MemoizedSelector<object, any> = createSelector(selectTaskState, getUITaskForm);
export const selectUITaskDetails: MemoizedSelector<object, any> = createSelector(selectTaskState, getUITaskDetails);
export const selectTaskDetails = (taskId: string) => {
return createSelector(
selectTaskState,
(state: State) => state.taskDetails[taskId]
);
}
<file_sep>/nativescript-app/app/modules/social-feed/social-feed.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { FormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { SharedModule } from '~/modules/shared.module';
import {
CommentComponent,
CommentFormComponent,
PostComponent,
PostFormComponent
} from '~/modules/social-feed/components';
import { SocialFeedComponent } from '~/modules/social-feed/social-feed.component';
@NgModule({
imports: [
CommonModule,
RouterModule,
FormsModule,
BrowserModule,
SharedModule,
],
declarations: [
SocialFeedComponent,
PostComponent,
PostFormComponent,
CommentComponent,
CommentFormComponent
],
exports: [
SocialFeedComponent,
PostComponent,
PostFormComponent,
CommentComponent,
CommentFormComponent
]
})
export class SocialFeedModule { }
<file_sep>/nativescript-app/app/shared/components/create-profile/couple/privacy/index.ts
export * from './create-couple-privacy.component';<file_sep>/spa/src/app/modules/settings/components/wedding/settings-wedding.component.ts
import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Store } from '@ngrx/store';
import { Subscription } from 'rxjs';
import { WeddingService } from '../../../../root-store/services/wedding.service';
import {
RootStoreState,
ProfileSelectors,
CommonModels
} from '../../../../root-store';
@Component({
selector: 'app-settings-wedding',
templateUrl: './settings-wedding.component.html',
styleUrls: ['./settings-wedding.component.sass']
})
export class SettingsWeddingComponent implements OnInit {
public activeProfile: CommonModels.Profile;
public wedding: CommonModels.Wedding;
private activeProfileSubscription: Subscription;
constructor(
private store: Store<RootStoreState.State>,
private changeDetector: ChangeDetectorRef,
private route: ActivatedRoute,
private weddingService: WeddingService
) {
}
async ngOnInit() {
this.activeProfile = this.route.parent.snapshot.data.activeProfile;
await this.weddingService.getWedding({weddingId: this.activeProfile.id}).toPromise().then(response => {
this.wedding = response.result;
});
}
}
<file_sep>/nativescript-app/app/root-store/task-store/state.ts
import { Task, TaskDetails } from './models';
export interface State {
tasks: Task[];
taskDetails: TaskDetails[];
stats: any;
ui: {
taskForm: {
submitted: boolean,
modalOpen: boolean,
error: any | null
},
taskDetails: object[]
}
}
export const initialState: State = {
tasks: [],
taskDetails: [],
stats: null,
ui: {
taskForm: {
submitted: false,
modalOpen: null,
error: null
},
taskDetails: []
}
};
<file_sep>/nativescript-app/app/shared/types/models/dialog.model.ts
import { DialogType } from '../enum/dialog-type.enum';
export class Dialog {
type: DialogType;
message: string;
id?: number;
constructor(dialog: any) {
this.type = dialog.type;
this.message = dialog.message;
this.id = Date.now();
}
}<file_sep>/nativescript-app/app/shared/modals/location/index.ts
export * from './location.modal';<file_sep>/spa/src/app/app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule, HTTP_INTERCEPTORS, HttpClient } from '@angular/common/http';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import { MatIconRegistry, MatIconModule } from '@angular/material';
import { DomSanitizer } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FlashMessagesModule } from 'angular2-flash-messages';
import { GooglePlaceModule } from 'ngx-google-places-autocomplete';
import { NgProgressModule, NgProgressInterceptor } from 'ngx-progressbar';
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { AppComponent } from './app.component';
import { AppLoadModule } from './core/app-load/app-load.module';
import { LayoutModule } from './core/layout/layout.module';
import { AuthModule } from './core/auth/auth.module';
import { WeddingFormModule } from './modules/wedding-form/wedding-form.module';
import { VendorFormModule } from './modules/vendor-form/vendor-form.module';
import { SettingsModule } from './modules/settings/settings.module';
import { SocialFeedModule } from './modules/social-feed/social-feed.module';
import { TasksModule } from './modules/tasks/tasks.module';
import { GuestListModule } from './modules/guest-list/guest-list.module';
import { MarketplaceModule } from './modules/marketplace/marketplace.module';
import { WeddingModule } from './modules/wedding/wedding.module';
import { VendorModule } from './modules/vendor/vendor.module';
import { MessagesManagerModule } from './modules/messages-manager/messages-manager.module';
import { InspirationsModule } from './modules/inspirations/inspirations.module';
import { PostService } from './root-store/services/post.service';
import { WeddingService } from './root-store/services/wedding.service';
import { VendorService } from './root-store/services/vendor.service';
import { ProfileService } from './root-store/services/profile.service';
import { PaymentService } from './root-store/services/payment.service';
import { SioService } from './root-store/services/sio.service';
import { NotificationService } from './root-store/services/notification.service';
import { MessageService } from './root-store/services/message.service';
import { InspirationService } from './root-store/services/inspiration.service';
import { GuestService } from './root-store/services/guest.service';
import { routing } from './app.routing';
import { AuthGuard } from './shared/guards/auth.guard';
import { IsOwnerGuard } from './shared/guards/isOwner.guard';
import { HasWeddingGuard } from './shared/guards/hasWedding.guard';
import { RequestInterceptor } from './interceptors/request.interceptor';
import { CookieService, CookieOptions } from 'angular2-cookie/core';
import { NgxGalleryModule } from 'ngx-gallery';
import { RootStoreModule } from './root-store';
export function HttpLoaderFactory(http: HttpClient) {
return new TranslateHttpLoader(http);
}
@NgModule({
declarations: [
AppComponent
],
imports: [
AppLoadModule,
LayoutModule,
AuthModule,
WeddingFormModule,
VendorFormModule,
RootStoreModule,
SettingsModule,
SocialFeedModule,
TasksModule,
GuestListModule,
MarketplaceModule,
WeddingModule,
VendorModule,
MessagesManagerModule,
InspirationsModule,
HttpClientModule,
BrowserModule,
BrowserAnimationsModule,
MatIconModule,
routing,
FlashMessagesModule.forRoot(),
NgProgressModule,
NgxGalleryModule,
StoreDevtoolsModule.instrument({
name: 'Wedding App SPA'
}),
GooglePlaceModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: HttpLoaderFactory,
deps: [HttpClient]
}
})
],
providers: [
AuthGuard,
IsOwnerGuard,
HasWeddingGuard,
CookieService,
PostService,
WeddingService,
VendorService,
ProfileService,
PaymentService,
SioService,
NotificationService,
MessageService,
InspirationService,
GuestService,
{
provide: CookieOptions,
useValue: {}
},
{
provide: HTTP_INTERCEPTORS,
useClass: RequestInterceptor,
multi: true
},
{
provide: HTTP_INTERCEPTORS,
useClass: NgProgressInterceptor,
multi: true
}
],
bootstrap: [AppComponent]
})
export class AppModule {
constructor(matIconRegistry: MatIconRegistry, domSanitizer: DomSanitizer) {
matIconRegistry.addSvgIconSet(domSanitizer.bypassSecurityTrustResourceUrl('../assets/mdi.svg'));
}
}
<file_sep>/nativescript-app/app/shared/modals/index.ts
export * from './upload';
export * from './datepicker';
export * from './list-select';
export * from './location';
export * from './add-member';<file_sep>/spa/src/app/shared/uploader/uploader.component.ts
import { Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges, SimpleChange } from '@angular/core';
import { environment } from '../../../environments/environment';
import { DomSanitizer } from '@angular/platform-browser';
@Component({
selector: 'uploader',
templateUrl: './uploader.component.html',
styleUrls: ['./uploader.component.sass']
})
export class UploaderComponent implements OnInit {
@Input() limit?: number;
@Input() initImages?: any;
@Input() cdnFolder?: string;
@Input() dropzone?: boolean;
@Input() uploadedImages?: Array<any>;
@Output() getImages = new EventEmitter<object[]>();
@Output() uploadedImageRemoved = new EventEmitter<Object>();
containerClass: string;
images: {
file: any,
url: string
}[];
constructor(
public sanitizer: DomSanitizer
) {
}
ngOnInit() {
this.images = [];
this.uploadedImages = this.uploadedImages ? this.uploadedImages : [];
if (!this.limit) {
this.limit = 6;
}
if (this.initImages) {
this.imageInputChange(this.initImages);
}
}
removeImage(index) {
this.images.splice(index, 1);
}
reset() {
this.images = [];
}
isDuplicate(file) {
let isDuplicate = false;
for (let i = 0; i < this.images.length; i++) {
let image = this.images[i];
if (image.file.name == file.name) {
isDuplicate = true;
break;
}
}
return isDuplicate;
}
imageInputChange(event) {
let fileList: FileList = event.dataTransfer ? event.dataTransfer.files : event.target.files;
if (fileList.length > 0) {
for (let i = 0; i < fileList.length; i++) {
let file = fileList[i];
if (!this.isDuplicate(file) && this.images.length < this.limit) {
this.images.push({
file: file,
url: (window.URL) ? window.URL.createObjectURL(file) : (window as any).webkitURL.createObjectURL(file)
});
}
}
}
this.getImages.emit(this.images);
}
public removeUploadedImage(imageToRemove: any): void {
this.uploadedImageRemoved.next(imageToRemove);
this.uploadedImages = this.uploadedImages.filter((image) => {
return image.id !== imageToRemove.id;
});
}
public handleUploadedImageUrl(filename: string): string {
const cdnUrl = environment.cdnUrl + this.cdnFolder;
return cdnUrl + filename.replace(/(\.[\w\d_-]+)$/i, '_sm$1');
}
}
<file_sep>/nativescript-app/app/shared/components/create-profile/create-profile.routing.ts
import { CreateCoupleComponent } from '~/shared/components/create-profile/couple/create-couple.component';
import { CreateVendorComponent } from '~/shared/components/create-profile/vendor';
export const profileCreateRouting = [
{
path: 'couple',
component: CreateCoupleComponent,
},
{
path: 'vendor',
component: CreateVendorComponent
}
];<file_sep>/spa/src/app/modules/settings/components/account/account.component.ts
import {
Component,
OnInit,
ViewChild,
ElementRef,
OnDestroy,
ChangeDetectorRef
} from '@angular/core';
import { Router } from '@angular/router';
import { Store } from '@ngrx/store';
import { DomSanitizer } from '@angular/platform-browser';
import { FlashMessagesService } from 'angular2-flash-messages';
import { ISubscription } from 'rxjs/Subscription';
import { environment } from '../../../../../environments/environment';
import {
RootStoreState,
AuthSelectors,
AuthActions,
} from '../../../../root-store';
import { AuthInfo } from '../../../../root-store/auth-store/models';
import { AuthService } from '../../../../root-store/services/auth.service';
import { WeddingEditBase } from '../wedding/wedding-edit.base';
@Component({
selector: 'app-settings-account',
templateUrl: './account.component.html',
styleUrls: ['./account.component.sass']
})
export class SettingsAccountComponent extends WeddingEditBase implements OnInit, OnDestroy {
@ViewChild('fileInput') fileInput: ElementRef;
avatar: any;
account: any;
url: string;
cdnUrl: string;
webUrl: string;
formData: FormData;
subAccount: ISubscription;
subAccountForm: ISubscription;
submitted: any;
errors: any;
public prependAvatarUrl: string;
public changePasswordForm: any = {
password: '',
password_new: '',
password_new_repeat: ''
};
public deleteAccountPassword = '';
constructor(
private store: Store<RootStoreState.State>,
public sanitizer: DomSanitizer,
private authService: AuthService,
private _flashMessagesService: FlashMessagesService,
private changeDetector: ChangeDetectorRef,
private router: Router
) {
super();
}
ngOnInit() {
this.submitted = {
avatar: false,
account: false,
changePass: null
};
this.errors = {
avatar: null,
account: null,
changePass: null
};
this.cdnUrl = environment.cdnUrl;
this.webUrl = environment.webUrl;
this.subAccount = this.store.select(
AuthSelectors.selectAuthInfo
).subscribe((state: AuthInfo) => {
this.account = state.account;
this.prependAvatarUrl = `account/${this.account.id}/avatars/`;
});
this.formData = new FormData();
}
ngOnDestroy() {
if (this.subAccount) {
this.subAccount.unsubscribe();
}
if (this.subAccountForm) {
this.subAccountForm.unsubscribe();
}
}
public fileChange(event): void {
const fileList: FileList = event.target.files;
if (fileList.length > 0) {
const file: File = fileList[0];
this.url = (window.URL) ? window.URL.createObjectURL(file) : (window as any).webkitURL.createObjectURL(file);
this.formData.delete('avatar');
this.formData.append('avatar', file, file.name);
}
}
public submitAvatar(): void {
if (this.formData.get('avatar')) {
this.submitted.avatar = true;
this.authService.setAccountAvatar(this.formData).subscribe(
() => {
this.store.dispatch(new AuthActions.GetAuthInfo());
this.submitted.avatar = false;
this._flashMessagesService.show('Account photo updated', { cssClass: 'alert-success', timeout: 3000 });
this.changeDetector.markForCheck();
}, (err) => {
this.errors.avatar = err.error;
this.submitted.avatar = false;
this.changeDetector.markForCheck();
}
);
if (this.submitted.avatar && !this.errors.avatar) {
this.fileInput.nativeElement.value = '';
}
}
}
public submitAccountInfo(): void {
this.submitted.account = true;
this.authService.updateAccount(this.account).subscribe(
() => {
this.store.dispatch(new AuthActions.GetAuthInfo());
this.submitted.account = false;
this._flashMessagesService.show('Account updated', { cssClass: 'alert-success', timeout: 3000 });
this.changeDetector.markForCheck();
}, (err) => {
this.errors.account = err.error;
this.submitted.account = false;
this.changeDetector.markForCheck();
}
);
}
public submitChangePassword(): void {
this.submitted.changePass = true;
this.authService.changePassword(this.changePasswordForm).subscribe(
() => {
this.submitted.changePass = false;
this.changePasswordForm.password = '';
this.changePasswordForm.password_new = '';
this.changePasswordForm.password_new_repeat = '';
this._flashMessagesService.show('Password changed', {cssClass: 'alert-success', timeout: 3000});
},
(err) => {
this.errors.changePass = err.error;
this.submitted.changePass = false;
}
);
}
public submitDeleteAccount(): void {
this.authService.deleteAccount({password: <PASSWORD>}).subscribe(
() => {
this._flashMessagesService.show('Account deleted', {cssClass: 'alert-success', timeout: 3000});
this.authService.clearToken();
this.router.navigate(['settings', 'account']);
}
);
}
}
<file_sep>/website/src/Application.ts
import Server from './Server';
import { ILogger } from 'helpers/logger';
class Application {
server: Server;
logger: ILogger;
constructor({ server, logger}: { server: Server, logger: ILogger }) {
this.server = server;
this.logger = logger;
}
async start() {
await this.server.start();
}
}
export default Application;
<file_sep>/nativescript-app/app/shared/components/star-rating/star-rating.component.ts
import {
Component,
EventEmitter,
Input,
OnInit,
Output,
} from '@angular/core';
@Component({
moduleId: module.id,
selector: 'custome-star',
templateUrl: 'star-rating.component.html',
styleUrls: ['./star-rating.component.scss']
})
export class StarRatingComponent implements OnInit {
@Input() value;
@Input() size = "20%";
@Input() bigstar = false;
@Output() valueChanged: EventEmitter<any> = new EventEmitter();
public radioOptions: Array<any>;
private active: any;
starList = [1,1,1,1,1];
starFill = '~/resources/images/star_fill.png';
starHalf = '~/resources/images/star_half.png';
starEmpty = '~/resources/images/star_empty.png';
constructor() {
}
ngOnInit(): void {
// console.log("start rating ngOnit: ", this.value);
if(this.bigstar) {
this.starFill = '~/resources/images/star_big_fill.png';
this.starHalf = '~/resources/images/star_big_half.png';
this.starEmpty = '~/resources/images/star_big_empty.png';
}
// this.starList = [];
// var i = 0;
// for( var i = 1; i <= this.value; i++ ) {
// this.starList.push('~/resources/images/star_fill.png');
// }
// if( this.value < i && i-1 < this.value) {
// this.starList.push('~/resources/images/star_half.png');
// }
// for( ; i <= 5; i++ ) {
// this.starList.push('~/resources/images/star_empty.png');
// }
}
setRate(value): void {
console.log("set Rate");
console.log(value);
this.valueChanged.next(value+1);
}
getImage(index): String{
if(index+1<=this.value) {
return this.starFill;
}
if(index+1>this.value){
return this.starEmpty;
}
return this.starHalf;
}
}
<file_sep>/spa/src/app/modules/wedding/wedding.routing.ts
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { WeddingInformationComponent } from './components/information';
import { WeddingComponent } from './wedding.component';
import { WeddingTimelineComponent } from './components/timeline/timeline.component';
import { WeddingPhotosComponent } from './components/photos/photos.component';
import { AuthGuard } from '../../shared/guards/auth.guard';
import {
ProfileResolvers,
AuthResolvers
} from '../../root-store';
const routes: Routes = [
{
path: 'wedding/:weddingId', component: WeddingComponent,
canActivate: [AuthGuard],
runGuardsAndResolvers: 'always',
children: [
{
path: '', component: WeddingTimelineComponent, resolve: {
authInfo: AuthResolvers.AuthInfoResolver,
activeProfile: ProfileResolvers.ActiveProfileResolver
}
},
{
path: 'informations',
component: WeddingInformationComponent,
resolve: {
activeProfile: ProfileResolvers.ActiveProfileResolver
}
},
{
path: 'photos', component: WeddingPhotosComponent, resolve: {
authInfo: AuthResolvers.AuthInfoResolver,
activeProfile: ProfileResolvers.ActiveProfileResolver
}
},
{
path: 'post/:postId', component: WeddingTimelineComponent, resolve: {
authInfo: AuthResolvers.AuthInfoResolver,
activeProfile: ProfileResolvers.ActiveProfileResolver
}
}
]
}
];
export const routing: ModuleWithProviders = RouterModule.forChild(routes);
<file_sep>/spa/src/app/core/layout/components/add-member-modal/add-member-modal.component.ts
import { Component, OnInit, TemplateRef, ViewChild, Input, Output, EventEmitter } from '@angular/core';
import { FlashMessagesService } from 'angular2-flash-messages';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ISubscription } from "rxjs/Subscription";
import { Store } from '@ngrx/store';
import { MemberService } from '../../../../root-store/services/member.service';
import {
RootStoreState,
MemberActions,
MemberModels,
MemberSelectors,
ProfileSelectors
} from '../../../../root-store';
@Component({
selector: 'add-member-modal',
templateUrl: './add-member-modal.component.html',
styleUrls: ['./add-member-modal.component.sass']
})
export class AddMemberModalComponent implements OnInit {
@ViewChild("modalContent") private modalContent: TemplateRef<any>;
@Input() buttonType: string;
@Output() memberAdded = new EventEmitter<boolean>();
submitted: boolean;
modalOpen: boolean;
error: any;
isOwner: boolean;
modalRef: NgbModalRef;
activeModal: NgbActiveModal;
member: Pick<MemberModels.Member, 'email' | 'role'>;
initMember: Pick<MemberModels.Member, 'email' | 'role'>;
subActiveProfile: ISubscription;
activeWeddingId: string;
constructor(
private modalService: NgbModal,
private memberService: MemberService,
private store: Store<RootStoreState.State>,
private flashMessagesService: FlashMessagesService
) { }
ngOnInit() {
this.initMember = {
email: '',
role: null
}
this.member = { ...this.initMember };
this.subActiveProfile = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
if(activeProfile && activeProfile.type == 'wedding') {
this.isOwner = activeProfile.isOwner;
this.activeWeddingId = activeProfile.id;
}
});
}
ngOnDestroy() {
this.subActiveProfile.unsubscribe();
}
async onSubmit() {
await this.memberService.addMember({
weddingId: this.activeWeddingId,
member: this.member
}).toPromise().then(response => {
this.memberService.getMembers({
weddingId: this.activeWeddingId
}).toPromise().then(response => {
this.store.dispatch(new MemberActions.SetMembers({
members: response.result
}));
});
this.submitted = false;
this.flashMessagesService.show('Member added successfully', { cssClass: 'alert-success', timeout: 3000 });
this.modalRef.close();
}).catch(error => {
this.submitted = false;
this.error = error;
});
}
open() {
this.modalRef = this.modalService.open(this.modalContent);
this.modalRef.result.then((result) => {
this.member = { ...this.initMember };
}, (reason) => {
this.member = { ...this.initMember };
});
}
}
<file_sep>/nativescript-app/app/root-store/member-store/effects.ts
import { Injectable } from '@angular/core';
import { Actions, Effect, ofType } from '@ngrx/effects';
import {
MemberActionTypes,
} from './actions';
import { MemberService } from '~/shared/services/member.service';
@Injectable()
export class MemberEffects {
constructor(
private actions$: Actions,
private memberService: MemberService,
) { }
}
<file_sep>/nativescript-app/app/modules/marketplace/components/index.ts
export * from './list';
export * from './marketplace';
export * from './filters';
export * from './detail';<file_sep>/spa/src/app/modules/tasks/components/task-details/task-details.component.ts
import { Component, OnInit, Input } from '@angular/core';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ISubscription } from "rxjs/Subscription";
import {
RootStoreState,
TaskModels,
} from '../../../../root-store';
@Component({
selector: 'task-details',
templateUrl: './task-details.component.html',
styleUrls: ['./task-details.component.sass']
})
export class TaskDetailsComponent implements OnInit {
@Input() inputTaskDetails;
details: TaskModels.TaskDetails;
subTaskDetails: ISubscription;
constructor() { }
ngOnInit() {
this.subTaskDetails = this.inputTaskDetails.subscribe((details) => {
this.details = details;
});
}
ngOnDestroy() {
if(this.subTaskDetails) {
this.subTaskDetails.unsubscribe();
}
}
}
<file_sep>/nativescript-app/app/modules/wedding/modals/delete-edit/index.ts
export * from './delete-edit.modal';<file_sep>/nativescript-app/app/root-store/wedding-store/reducers.ts
import { WeddingActions, WeddingActionTypes } from './actions';
import { initialState } from './state';
export function reducer(state = initialState, action: WeddingActions) {
switch (action.type) {
case WeddingActionTypes.GET_WEDDINGS_SUCCESS:
return Object.assign({}, state, {
weddings: action.payload.weddings
});
case WeddingActionTypes.SET_ACTIVE_WEDDING_SUCCESS:
return Object.assign({}, state, {
activeWedding: action.payload.wedding
});
case WeddingActionTypes.GET_WEDDING_MEMBERS_SUCCESS:
return Object.assign({}, state, {
activeWeddingMembers: action.payload.weddingMembers
});
case WeddingActionTypes.UPDATE_WEDDING:
return Object.assign({}, state, {
ui: Object.assign({}, state.ui, {
weddingForm: Object.assign({}, state.ui.weddingForm, {
submitted: true
})
})
});
case WeddingActionTypes.UPDATE_WEDDING_SUCCESS:
return Object.assign({}, state, {
activeWedding: Object.assign({}, state.activeWedding, {
name: action.payload.wedding.name
}),
ui: Object.assign({}, state.ui, {
weddingForm: Object.assign({}, state.ui.weddingForm, {
submitted: false
})
})
});
case WeddingActionTypes.UPDATE_WEDDING_FAILURE:
return Object.assign({}, state, {
ui: Object.assign({}, state.ui, {
weddingForm: Object.assign({}, state.ui.weddingForm, {
submitted: false
})
})
});
default:
return state;
}
}
<file_sep>/nativescript-app/app/shared/services/modal.service.ts
import { Injectable, ViewContainerRef } from '@angular/core';
import { ModalDialogOptions, ModalDialogService } from 'nativescript-angular';
@Injectable()
export class ModalService {
private parentRef: ViewContainerRef;
constructor(
private modal: ModalDialogService
) { }
public setContainerRef(element: ViewContainerRef): void {
this.parentRef = element;
}
public showModal(component: any, options: ModalDialogOptions): Promise<any> {
options.viewContainerRef = this.parentRef;
return this.modal.showModal(component, options);
}
}
<file_sep>/spa/src/app/modules/settings/components/wedding/wedding-info/wedding-info.component.ts
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
import { Router } from '@angular/router';
import { Store } from '@ngrx/store';
import * as objectToFormData from 'object-to-formdata';
import { RootStoreState, CommonModels } from '../../../../../root-store';
import { WeddingService } from '../../../../../root-store/services/wedding.service';
import { ProfileService } from '../../../../../root-store/services/profile.service';
import { WeddingEditBase } from '../wedding-edit.base';
@Component({
selector: 'app-settings-wedding-info',
templateUrl: './wedding-info.component.html',
})
export class SettingsWeddingInfoComponent extends WeddingEditBase implements OnInit {
public PrivacySettingEnum = CommonModels.PrivacySettingEnum;
public prependAvatarUrl: string;
public formData: FormData = new FormData();
public avatarUrl: string;
public isImageValid = false;
public form: any = {
privacySetting: null
};
constructor(
private weddingService: WeddingService,
private changeDetector: ChangeDetectorRef,
private store: Store<RootStoreState.State>,
public sanitizer: DomSanitizer,
private profileService: ProfileService
) {
super();
}
ngOnInit(): void {
this.prependAvatarUrl = `wedding/${this.wedding.id}/avatars/`;
this.form.privacySetting = this.wedding.privacySetting;
}
public handleInput(value: any, input: string): void {
this.form[input] = value;
}
public submit(): void {
const filesFormData = new FormData();
filesFormData.set('avatar', this.formData.get('avatar')); // Hack
const formData = objectToFormData(
this.form,
{indices: true},
filesFormData
);
this.weddingService.editWedding({weddingId: this.wedding.id, weddingEdited: formData}).subscribe(
() => {
this.profileService.initProfiles();
this.editActive[0] = false;
this.changeDetector.markForCheck();
}, (e) => {
// TODO handle err
}
);
}
}
<file_sep>/website/src/helpers/logger.ts
import * as Log4js from 'log4js';
import { IConfig } from 'config';
export interface ILogger {
info?: Function;
error?: Function;
}
export default ({ config }: { config: IConfig }) => {
Log4js.configure(config.logging);
return Log4js.getLogger();
};
<file_sep>/website/src/routes/AuthRoutes.ts
import { Router } from "express";
import { makeClassInvoker } from 'awilix-express';
import AuthController from 'controllers/AuthController';
import RequestService from 'services/RequestService';
import authenticate from 'middlewares/authenticate';
import * as passport from 'passport';
import { Strategy as facebookStrategy } from 'passport-facebook';
import { Strategy as googleStrategy } from 'passport-google-oauth20';
import { check } from 'express-validator/check';
export default class AuthRoutes {
router: Router;
controller: Function;
config: any;
requestService: RequestService;
constructor({ config, requestService }) {
this.router = Router();
this.controller = makeClassInvoker(AuthController);
this.config = config;
this.requestService = requestService;
}
private async _authenticateSocial(data) {
try {
let requestBody = {
foreign_id: data.foreignId,
provider: data.provider,
token: data.token
};
if (data.email) {
await this.requestService.make({
method: 'post',
url: 'auth/register/social'
}, Object.assign(requestBody, {
email: data.email,
first_name: data.firstName,
last_name: data.lastName
}));
}
let jwt = await this.requestService.make({
method: 'post',
url: 'auth/authenticate/social'
}, requestBody);
return jwt.token;
} catch (error) {
throw error;
}
}
private async _setJwtCookie(req, res, next) {
if (req['jwt']) {
res.cookie('jwt', req['jwt'], {
maxAge: 24 * 60 * 60 * 1000,
httpOnly: false,
domain: this.config.cookieDomain
});
let redirect = req.cookies.redirect;
if(redirect) {
return res.redirect(req.cookies.redirect);
} else {
return res.redirect(this.config.spaUrl);
}
}
next();
}
private async _socialLoginCallback(req, token, refreshToken, profile, done, provider) {
try {
req['jwt'] = await this._authenticateSocial({
foreignId: profile.id,
provider: provider,
token: token,
email: null
});
done(null, true);
} catch (error) {
let displayMessage = 'AUTHENTICATION_ERROR';
if (error.statusCode && error.statusCode == 404) { // user not found, try to register
try {
req['jwt'] = await this._authenticateSocial({
foreignId: profile.id,
provider: provider,
token: token,
email: profile.emails[0].value,
firstName: profile.name.givenName || profile.emails[0].value.split('@')[0],
lastName: profile.name.familyName || profile.emails[0].value.split('@')[0]
});
done(null, true);
} catch (error) {
if (error.error) {
displayMessage = JSON.parse(error.error).title;
}
req['flash']('danger', displayMessage);
done(null, null);
}
} else {
req['flash']('danger', displayMessage);
done(null, null);
}
}
}
getRoutes() {
this.router.use(passport.initialize());
this.router.get('/', this.controller('index'));
this.router.get('/login', this.controller('getLogin'));
this.router.get('/signup', this.controller('getSignup'));
this.router.get('/logout', authenticate, this.controller('getLogout'));
this.router.get('/activate/:hash', this.controller('getActivate'));
this.router.get('/remind', this.controller('getRemindPassword'));
this.router.get('/reset/:hash', this.controller('getResetPassword'));
this.router.get('/forget', authenticate, this.controller('getForgetMe'));
this.router.get('/change-password', authenticate, this.controller('getChangePassword'));
this.router.post('/login', [
check('email').not().isEmpty().isEmail(),
check('password').not().isEmpty()
], this.controller('postLogin'));
this.router.post('/signup', [
check('first_name').not().isEmpty(),
check('last_name').not().isEmpty(),
check('email').not().isEmpty().isEmail(),
check('password').not().isEmpty().isLength({ min: 8 }),
check('password_repeat').not().isEmpty().custom((value, { req }) => value == req.body.password),
check('account_type_id').not().isEmpty()
], this.controller('postSignup'));
this.router.post('/remind', [
check('email').not().isEmpty().isEmail(),
], this.controller('postRemindPassword'));
this.router.post('/reset/:hash', [
check('hash').not().isEmpty(),
check('password').not().isEmpty().isLength({ min: 8 }),
check('password_repeat').not().isEmpty().custom((value, { req }) => value == req.body.password)
], this.controller('postResetPassword'));
this.router.post('/forget', [
check('password').not().isEmpty().isLength({ min: 8 }),
], authenticate, this.controller('postForgetMe'));
this.router.post('/change-password', [
check('password').not().isEmpty().isLength({ min: 8 }),
check('password_new').not().isEmpty().isLength({ min: 8 }),
check('password_new_repeat').not().isEmpty().custom((value, { req }) => value == req.body.password_new)
], authenticate, this.controller('postChangePassword'));
// Facebook auth
passport.use(new facebookStrategy({
clientID: this.config.auth.facebook.clientID,
clientSecret: this.config.auth.facebook.clientSecret,
callbackURL: this.config.auth.facebook.callbackURL,
profileFields: ['id', 'email', 'displayName', 'name'],
passReqToCallback: true
},
async (req, token, refreshToken, profile, done) => {
await this._socialLoginCallback(req, token, refreshToken, profile, done, 'facebook');
}
));
this.router.get('/login/facebook',
passport.authenticate('facebook', {
scope: ['public_profile', 'email'],
session: false
})
);
this.router.get('/login/facebook/callback',
passport.authenticate('facebook', {
failureRedirect: '/login',
session: false
}),
(req, res, next) => {
return this._setJwtCookie(req, res, next)
}
);
// Google auth
passport.use(new googleStrategy({
clientID: this.config.auth.google.clientID,
clientSecret: this.config.auth.google.clientSecret,
callbackURL: this.config.auth.google.callbackURL,
passReqToCallback: true
},
async (req, token, refreshToken, profile, done) => {
await this._socialLoginCallback(req, token, refreshToken, profile, done, 'google');
}
));
this.router.get('/login/google',
passport.authenticate('google', {
scope: ['email'],
session: false
})
);
this.router.get('/login/google/callback',
passport.authenticate('google', {
failureRedirect: '/login',
session: false
}),
(req, res, next) => {
return this._setJwtCookie(req, res, next)
}
);
this.router.get('/accept-invitation/:invitationId/:tokenHash', [
check('invitationId').isLength({ min: 32, max: 32 }),
check('tokenHash').isLength({ min: 64, max: 64 })
], this.controller('getAcceptInvitationWithHash'));
this.router.get('/accept-invitation/:invitationId', [
check('invitationId').isLength({ min: 32, max: 32 })
], authenticate, this.controller('getAcceptInvitation'));
return this.router;
}
}
<file_sep>/spa/src/app/modules/wedding-form/components/partner/partner.component.ts
import { Component, OnInit, Input } from '@angular/core';
import * as objectToFormData from 'object-to-formdata';
import { DomSanitizer } from '@angular/platform-browser';
@Component({
selector: 'wedding-form-partner',
templateUrl: './partner.component.html',
styleUrls: ['./partner.component.sass']
})
export class WeddingFormPartnerComponent implements OnInit {
@Input() model: any;
@Input() parentForm: any;
@Input() parentFormData: FormData;
@Input() partnerIndex: number;
avatarUrl: string;
isImageValid: boolean;
constructor(
public sanitizer: DomSanitizer
) { }
ngOnInit() {
let avatar = this.parentFormData.get('partners[' + this.partnerIndex + '][avatar]');
if(avatar) {
this.avatarUrl = (window.URL) ? window.URL.createObjectURL(avatar) : (window as any).webkitURL.createObjectURL(avatar);
}
this.isImageValid = true;
}
}
<file_sep>/spa/src/app/modules/settings/components/wedding/wedding-edit.base.ts
import { Input } from '@angular/core';
import { CommonModels } from '../../../../root-store';
export abstract class WeddingEditBase {
@Input() public wedding: CommonModels.Wedding;
public editActive: Array<boolean> = [false, false];
public editRow(i: number): void {
this.editActive[i] = true;
}
public cancelEdit(i: number): void {
this.editActive[i] = false;
}
}
<file_sep>/spa/src/app/modules/settings/settings.component.ts
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import { Subscription } from 'rxjs';
import { ActivatedRoute } from '@angular/router';
import {
RootStoreState,
CommonModels
} from '../../root-store';
@Component({
selector: 'app-settings',
templateUrl: './settings.component.html',
styleUrls: ['./settings.component.sass'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class SettingsComponent implements OnInit {
public activeProfile: CommonModels.Profile;
public isOwner: boolean;
private weddingSubscription: Subscription;
constructor(
private store: Store<RootStoreState.State>,
private changeDetector: ChangeDetectorRef,
private route: ActivatedRoute
) {}
ngOnInit(): void {
this.activeProfile = this.route.snapshot.data.activeProfile;
}
}
<file_sep>/nativescript-app/app/modules/auth/components/account-settings/index.ts
export * from './account-settings.component';<file_sep>/spa/src/app/modules/vendor/components/vendor-review/vendor-review.component.ts
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { ISubscription } from 'rxjs/Subscription';
import { VendorService } from '../../../../root-store/services/vendor.service';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ConfirmDialogComponent } from "../../../../shared/confirm-dialog/confirm-dialog.component";
import { FlashMessagesService } from 'angular2-flash-messages';
import {
RootStoreState,
AuthModels,
CommonModels
} from '../../../../root-store';
@Component({
selector: 'vendor-review',
templateUrl: './vendor-review.component.html',
styleUrls: ['./vendor-review.component.sass']
})
export class VendorReviewComponent implements OnInit {
@Input() authInfo: AuthModels.AuthInfo;
@Input() activeProfile: CommonModels.Profile;
@Input() vendor: any;
@Input() vendorReview: any;
@Input() index: number;
@Output() vendorReviewDeleted: EventEmitter<any> = new EventEmitter();
resolverSubscription: ISubscription;
constructor (
private route: ActivatedRoute,
private vendorService: VendorService,
private modalService: NgbModal,
private flashMessagesService: FlashMessagesService
) { }
async ngOnInit() {
}
openDeleteVendorReviewModal(vendorReview) {
let modal = this.modalService.open(ConfirmDialogComponent, { backdrop: 'static' });
modal.componentInstance['data'] = {
title: 'Are you sure?',
text: 'Delete review',
confirm: async () => {
await this.vendorService.deleteVendorReview({
vendorId: this.vendorReview.vendorId,
vendorReviewId: vendorReview.id
}).toPromise().then(response => {
this.vendorReviewDeleted.next(this.vendorReview);
this.flashMessagesService.show('Review deleted successfully', { cssClass: 'alert-success', timeout: 3000 });
}).catch(error => {});
}
};
}
}
<file_sep>/nativescript-app/app/shared/components/select-input/select-input.component.ts
import {
Component,
EventEmitter,
Input,
Output,
OnInit
} from '@angular/core';
import { ListSelectModal } from '~/shared/modals';
import { ModalService } from '~/shared/services';
@Component({
moduleId: module.id,
selector: 'select-input',
templateUrl: 'select-input.component.html',
})
export class SelectInputComponent implements OnInit {
@Input() items: Array<any>;
@Input() hint: string = '';
@Input() propertyToShow: string;
@Input() selectedElement: string = '';
@Output() itemSelected: EventEmitter<any> = new EventEmitter();
constructor(
private modalService: ModalService,
) {
}
ngOnInit(): void {
console.log("select-input ngOnInit: ");
console.log("selectedElement: ", this.selectedElement);
}
public openSelectModal(): void {
this.modalService.showModal(ListSelectModal,
{context: {
items: this.items,
propertyToShow: this.propertyToShow
}, fullscreen: true
})
.then(
(result) => {
this.selectedElement = result;
this.itemSelected.next(result);
}
)
}
}
<file_sep>/nativescript-app/app/shared/components/index.ts
export * from './checkbox';
export * from './dialogs/index';
export * from './main';
export * from './top-bar';
export * from './menu';
export * from './upload-photo';
export * from './date-input';
export * from './create-profile';
export * from './select-input';
export * from './location-input';
export * from './notifications';
export * from './conversations';
export * from './avatar';
export * from './member';
export * from './star-rating';
<file_sep>/nativescript-app/app/modules/wedding/components/couple-profile/couple-profile.component.ts
import { AfterContentChecked, Component, ViewChild } from '@angular/core';
import { screen } from 'platform';
import { Store } from '@ngrx/store';
import { State } from '~/root-store';
import { ModalService } from '~/shared/services';
import { Subscription, ISubscription } from 'rxjs/Subscription';
import { Wedding } from '~/root-store/wedding-store/models';
import { selectActiveWedding } from '~/root-store/wedding-store/selectors';
import { Config } from '~/shared/configs';
@Component({
moduleId: module.id,
selector: 'couple-profile',
templateUrl: 'couple-profile.component.html',
styleUrls: ['./couple-profile.component.scss']
})
export class CoupleProfileComponent{
@ViewChild('topElements') topElements;
public activeTab: string = 'timeline';
public scrollHeight: number;
// TODO get from user data
public privateProfile: boolean = false;
private activeWedding: Wedding;
private subActiveWedding: ISubscription;
constructor(
private modalService: ModalService,
private store: Store<State>,
) {
const screenHeight = screen.mainScreen.heightDIPs;
this.scrollHeight = screenHeight - 140;
}
ngOnInit(): void {
Config.previousUrl = "couple-profile";
console.log("couple profile ngOnit");
this.subActiveWedding = this.store.select(
selectActiveWedding
).subscribe(activeWedding => {
if (activeWedding) {
this.activeWedding = activeWedding;
Config.activeWedding = activeWedding;
console.log(activeWedding);
}
else {
console.log("active Wedding is null");
}
});
}
ngOnDestroy() {
// this.subActiveWedding.unsubscribe();
}
public selectTab(selectedTab: string): void {
this.activeTab = selectedTab;
}
}
<file_sep>/spa/src/app/modules/vendor-form/components/basic-info/basic-info.component.ts
import { Component, OnInit, Input } from '@angular/core';
import * as objectToFormData from 'object-to-formdata';
import { DomSanitizer } from '@angular/platform-browser';
import { ActivatedRoute } from '@angular/router';
import { VendorService } from '../../../../root-store/services/vendor.service';
import { environment } from '../../../../../environments/environment';
@Component({
selector: 'vendor-form-basic-info',
templateUrl: './basic-info.component.html',
styleUrls: ['./basic-info.component.sass']
})
export class VendorFormBasicInfoComponent implements OnInit {
@Input() mode: string;
@Input() model: any;
@Input() parentForm: any;
@Input() parentFormData: FormData;
activeProfile: any;
contacts: any;
avatarUrl: string;
isImageValid: boolean;
vendorCategories: any;
constructor(
public sanitizer: DomSanitizer,
private vendorService: VendorService,
private route: ActivatedRoute
) { }
async ngOnInit() {
this.activeProfile = this.route.snapshot.data.activeProfile;
this.contacts = [{
type: 'phone'
}, {
type: 'email'
}];
this.vendorCategories = await this.vendorService.getVendorCategories().toPromise().then(response => {
return response.result;
});
const avatar = this.parentFormData.get('avatar');
if (avatar) {
this.avatarUrl = (window.URL) ? window.URL.createObjectURL(avatar) : (window as any).webkitURL.createObjectURL(avatar);
}
if(this.model.avatar) {
this.avatarUrl = environment.cdnUrl + '/vendor/' + this.activeProfile.id + '/avatars/' + this.model.avatar.replace(/(\.[\w\d_-]+)$/i, '_sq$1')
}
this.isImageValid = true;
}
handleAddressChange(event) {
this.model.address = event.formatted_address;
this.model.lat = event.geometry.location.lat();
this.model.lng = event.geometry.location.lng();
}
}
<file_sep>/nativescript-app/app/modules/tasks/modals/create/index.ts
export * from './create-task.modal';<file_sep>/spa/src/app/modules/guest-list/guest-list.component.ts
import { Component, OnInit, ViewChild } from '@angular/core';
import { ISubscription } from "rxjs/Subscription";
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { Router, ActivatedRoute } from '@angular/router';
import { Observable } from "rxjs/Observable";
import { Store } from '@ngrx/store';
import { GuestFormModalComponent } from './components/guest-form-modal/guest-form-modal.component';
import { GuestService } from '../../root-store/services/guest.service';
import 'rxjs/add/operator/debounceTime';
import 'rxjs/add/operator/distinctUntilChanged';
import 'rxjs/add/operator/startWith';
import {
RootStoreState,
ProfileSelectors,
CommonModels
} from '../../root-store';
@Component({
selector: 'app-guest-list',
templateUrl: './guest-list.component.html',
styleUrls: ['./guest-list.component.sass']
})
export class GuestListComponent implements OnInit {
activeProfile: CommonModels.Profile;
subscriptionActiveProfile: ISubscription;
guests: any[] = [];
page: number = 1;
stats: any;
infiniteScrollDisabled: boolean = false;
term: string = '';
@ViewChild('search') search: any;
constructor(
private modalService: NgbModal,
private guestService: GuestService,
private route: ActivatedRoute,
private store: Store<RootStoreState.State>
) { }
ngOnInit() {
this.subscriptionActiveProfile = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
if (activeProfile) {
this.activeProfile = activeProfile;
this.getGuests();
this.getStats();
}
});
}
ngAfterViewInit() {
this.search.update
.debounceTime(500)
.distinctUntilChanged()
.subscribe(term => this.filterGuests(term));
}
async getGuests() {
await this.guestService.getGuests({
weddingId: this.activeProfile.id,
options: {
page: this.page,
term: this.term
}
}).toPromise().then(response => {
this.guests.push(...response.result);
if (response.result.length < 30) {
this.infiniteScrollDisabled = true;
}
});
}
async getStats() {
await this.guestService.getStats(this.activeProfile.id)
.toPromise().then(response => {
this.stats = response.result;
});
}
loadMoreGuests() {
this.page++;
this.getGuests();
}
resetGuests() {
this.page = 1;
this.guests = [];
this.getGuests();
}
openGuestAddModal() {
let modal;
modal = this.modalService.open(GuestFormModalComponent, { size: 'lg' });
modal.componentInstance.mode = 'add';
modal.componentInstance.onSubmitEvent.subscribe(guest => {
this.resetGuests();
this.getStats();
});
}
filterGuests(term) {
this.resetGuests();
}
}
<file_sep>/spa/src/app/modules/social-feed/components/post-form/post-form.component.ts
import { Component, OnInit, Input, Output, ViewChild, EventEmitter } from '@angular/core';
import { FlashMessagesService } from 'angular2-flash-messages';
import { ISubscription } from 'rxjs/Subscription';
import { ActivatedRoute } from '@angular/router';
import { Store } from '@ngrx/store';
import * as objectToFormData from 'object-to-formdata';
import { environment } from '../../../../../environments/environment';
import { Post } from '../../../../root-store/common-models';
import { PostService } from '../../../../root-store/services/post.service';
import {
RootStoreState,
CommonModels
} from '../../../../root-store';
@Component({
selector: 'post-form',
templateUrl: './post-form.component.html',
styleUrls: ['./post-form.component.sass']
})
export class PostFormComponent implements OnInit {
@ViewChild('postForm') private postForm: any;
@ViewChild('uploader') private uploader: any;
@Input() activeProfile: CommonModels.Profile;
@Input() uploaderImages?: any;
@Input() textPlaceholder?: string;
@Input() post?: Post;
@Output() onSuccess = new EventEmitter<any>();
@Output() onClose = new EventEmitter();
postFormData: any;
images: any;
error: any;
submitted: boolean;
public editForm = false;
public imagesToRemove: Array<string> = [];
constructor(
private store: Store<RootStoreState.State>,
private route: ActivatedRoute,
private postService: PostService,
) {
}
ngOnInit() {
this.resetForm();
if (!this.textPlaceholder) {
this.textPlaceholder = 'What\'s on your mind?';
}
if (this.post) {
this.editForm = true;
this.postFormData = Object.assign({}, this.post);
}
}
async onSubmit() {
if (this.editForm) {
this.submitted = true;
let params: any = {
text: this.postFormData.text,
};
if (this.imagesToRemove.length) {
params.deletedPhotos = this.imagesToRemove;
}
const photos = [];
if (this.images) {
for (let i = 0; i < this.images.length; i++) {
const image = this.images[i];
photos.push(image.file);
}
}
if (photos.length) {
params = Object.assign(params, {photos});
}
const formData = objectToFormData(params);
this.postService.editPost({
weddingId: this.activeProfile.id,
postId: this.post.id,
params: formData
}).subscribe(() => {
this.submitted = false;
this.onSuccess.emit();
}, (error) => {
this.error = error;
this.submitted = false;
});
} else {
let post = {...this.postFormData};
let photos = [];
if (this.images) {
for (let i = 0; i < this.images.length; i++) {
let image = this.images[i];
photos.push(image.file);
}
}
let formData = objectToFormData(
Object.assign(post, {photos})
);
this.submitted = true;
const postId = await this.postService.addPost({
weddingId: this.activeProfile.id,
post: formData
}).toPromise().then(response => {
this.postForm.reset();
this.uploader.reset();
this.submitted = false;
return response.result;
}).catch(error => {
this.error = error;
this.submitted = false;
});
const addedPost = await this.postService.getPost({
weddingId: this.activeProfile.id,
postId: postId
}).toPromise().then(response => {
return {
[postId]: response.result
};
});
this.onSuccess.emit(addedPost);
}
}
resetForm() {
this.postFormData = {
text: null
};
}
public removeImage(removedPhoto: any): void {
this.imagesToRemove.push(removedPhoto.id);
}
public cancel(): void {
this.onClose.next();
}
}
<file_sep>/spa/src/app/core/layout/components/messages-indicator/messages-indicator.component.ts
import { Component, OnInit, OnDestroy } from '@angular/core';
import { ISubscription } from 'rxjs/Subscription';
import { ActivatedRoute } from '@angular/router';
import { SioService } from '../../../../root-store/services/sio.service';
import { MessageService } from '../../../../root-store/services/message.service';
import { Store } from '@ngrx/store';
import { Observable } from "rxjs/Observable";
import { delay } from "rxjs/operators";
import {
RootStoreState,
ProfileActions,
ProfileSelectors,
MessageSelectors,
MessageActions
} from '../../../../root-store';
@Component({
selector: 'messages-indicator',
templateUrl: './messages-indicator.component.html',
styleUrls: ['./messages-indicator.component.sass']
})
export class MessagesIndicatorComponent implements OnInit, OnDestroy {
activeConversationId: string;
activeProfile: any;
activeProfileSubscription: ISubscription;
infiniteScrollSubscription: ISubscription;
unreadMessagesCount: Observable<number>;
conversations: Observable<object[]>;
loading: boolean;
infiniteScroll: object;
constructor(
private route: ActivatedRoute,
private store: Store<RootStoreState.State>,
private messageService: MessageService
) { }
async ngOnInit() {
this.activeProfileSubscription = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
this.activeProfile = activeProfile;
});
this.unreadMessagesCount = this.store.select(
MessageSelectors.selectUnreadMessagesCount
).pipe(delay(0));
this.conversations = this.store.select(
MessageSelectors.selectConversations
)
this.infiniteScrollSubscription = this.store.select(
MessageSelectors.selectInfiniteScroll
).subscribe(infiniteScroll => {
this.infiniteScroll = infiniteScroll;
});
}
ngOnDestroy() {
this.activeProfileSubscription.unsubscribe();
this.infiniteScrollSubscription.unsubscribe();
}
async getConversations(page) {
page++;
this.loading = true;
await this.messageService.getConversations(page)
.toPromise().then(response => {
this.loading = false;
this.store.dispatch(new MessageActions.AppendConversations({
conversations: response.result,
infiniteScroll: {
page: page,
disabled: response.result.length == 0 ? true : false
}
}));
});
}
}
<file_sep>/nativescript-app/app/shared/components/checkbox/checkbox.component.ts
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
EventEmitter,
Input,
Output
} from '@angular/core';
@Component({
moduleId: module.id,
selector: 'checkbox-component',
templateUrl: 'checkbox.component.html',
styleUrls: ['./checkbox.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class CheckboxComponent {
@Input() small: boolean = false;
@Input() checked: boolean;
@Output() valueChanged: EventEmitter<boolean> = new EventEmitter<boolean>();
constructor(
private changeDetector: ChangeDetectorRef
) { }
public toggle(): void {
this.checked = !this.checked;
this.valueChanged.next(this.checked);
this.changeDetector.markForCheck();
}
}
<file_sep>/nativescript-app/app/root-store/auth-store/index.ts
import * as AuthActions from './actions';
import * as AuthState from './state';
import * as AuthSelectors from './selectors';
import * as AuthModels from './models';
export {
AuthStoreModule
} from './module';
export {
AuthActions,
AuthState,
AuthSelectors,
AuthModels
};
<file_sep>/website/src/config/environments/local.ts
import * as path from 'path';
const logPath = path.join(__dirname, '../../logs/local.log');
module.exports = {
web: {
port: 3001
},
salt: '0A040EC34ABBFB7F3030345244A913C9',
apiUrl: 'http://localhost:3000/v1/',
spaUrl: 'http://localhost:4200',
cdnUrl: 'https://storage.googleapis.com/wedding-app-local',
logging: {
appenders: {
console: { type: 'console' },
file: {
type: 'file',
filename: logPath
}
},
categories: {
default: { appenders: ['console'], level: 'info' },
file: { appenders: ['file'], level: 'info' }
}
},
cookieDomain: 'localhost',
redis: {
host: "127.0.0.1",
port: 6379
},
auth: {
facebook: {
clientID: 378220356015289,
clientSecret: '<KEY>',
callbackURL: 'http://localhost:3001/login/facebook/callback'
},
google: {
clientID: '970191593008-bp5isjbadtj5quomivkkmi11vq24g9js.apps.googleusercontent.com',
clientSecret: '<KEY>',
callbackURL: 'http://localhost:3001/login/google/callback'
}
}
};
<file_sep>/website/src/config/environments/staging.ts
import * as path from 'path';
const logPath = path.join(__dirname, '../../../logs/staging.log');
module.exports = {
web: {
port: 4001
},
salt: '072F3A6D30CFA7E8874BEDD846F295AD',
apiUrl: 'https://api.staging-c01.muulabs.pl/v1/',
spaUrl: 'https://app.staging-c01.muulabs.pl',
cdnUrl: 'https://storage.googleapis.com/wedding-app-staging',
logging: {
appenders: {
console: { type: 'console' },
file: {
type: 'file',
filename: logPath
}
},
categories: {
default: { appenders: ['console'], level: 'info' },
file: { appenders: ['file'], level: 'info' }
}
},
cookieDomain: 'staging-c01.muulabs.pl',
redis: {
host: "127.0.0.1",
port: 6379
},
auth: {
facebook: {
clientID: 637239626620497,
clientSecret: '<KEY>',
callbackURL: 'https://staging-c01.muulabs.pl/login/facebook/callback'
},
google: {
clientID: '547095225389-7jb38u9t9d98aiubis2vfcuqjd4uv8na.apps.googleusercontent.com',
clientSecret: <KEY>',
callbackURL: 'https://staging-c01.muulabs.pl/login/google/callback'
}
}
};
<file_sep>/nativescript-app/app/modules/social-feed/components/comment-form/index.ts
export * from './comment-form.component';<file_sep>/nativescript-app/app/modules/wedding/components/guest-list/index.ts
export * from './guest-list.component';<file_sep>/spa/src/app/root-store/profile-store/reducers.ts
import { Action } from '@ngrx/store';
import { ProfileActions, ProfileActionTypes } from './actions';
import { initialState, State } from './state';
export function reducer(state = initialState, action: ProfileActions) {
let index;
switch (action.type) {
case ProfileActionTypes.SET_ACTIVE_PROFILE:
return {
...state,
activeProfile: action.payload.profile
};
case ProfileActionTypes.SET_PROFILES:
return {
...state,
profiles: action.payload.profiles
};
default:
return state;
}
}
<file_sep>/nativescript-app/app/modules/marketplace/components/filters/filters.component.ts
import { Component, OnDestroy, OnInit } from '@angular/core';
import { screen } from 'tns-core-modules/platform';
import { RouterExtensions } from 'nativescript-angular/router'
import { VendorService } from '~/shared/services/vendor.service';
import { Config } from '~/shared/configs';
@Component({
moduleId: module.id,
selector: 'filters',
templateUrl: 'filters.component.html',
styleUrls: ['./filters.component.scss']
})
export class FiltersComponent implements OnInit, OnDestroy {
public containerHeight;
filters: any;
public tasks: Array<any> = [];
filter_location_text;
vendorCategories: any;
public DistanceOption: Array<string> = [
'Any ',
'25 kilimeters',
'5 kilometers ',
'50 kilometers',
'10 kilometers ',
'100 kilometers'
];
DistanceOptionIndex = [
undefined,
25000,
5000,
50000,
10000,
100000,
];
DistanceSelectedIndex = 0;
public Rating_starOption: Array<string> = [
'Any ',
'3 stars ',
'1 stars ',
'4 stars ',
'2 stars ',
'5 stars '
];
RatingStarOptionIndex = [
undefined,
3,
1,
4,
2,
5
];
ReversIndex = [
0,
2,
4,
1,
3,
5,
];
public RatingOption: Array<string> = [
'Any ',
'$$$ - Moderate',
'$ - Inexpensive ',
'$$$$ - Expensive',
'$$ - Affordabe',
];
RatingOptionIndex = [
undefined,
3,
1,
4,
2,
];
filtersOptions: any;
constructor(
private routerExtensions: RouterExtensions,
private vendorService: VendorService
) {
this.containerHeight = screen.mainScreen.heightDIPs - 140; // Topbar height + some margin
}
ngOnInit(): void {
Config.previousUrl = 'filters';
this.vendorService.getVendorCategories().toPromise().then(response => {
console.log("get vendor categories");
// console.log(response.result);
this.vendorCategories = ['All'];
for( var i = 0; i < response.result.length;i++){
this.vendorCategories.push(response.result[i].name);
}
});
this.filters = Config.filters;
this.filter_location_text = Config.filter_location_text;
console.log("filter location text: ", this.filter_location_text);
if( this.filters.rad ) {
for( var i = 0; i < this.DistanceOptionIndex.length; i++){
if( this.DistanceOptionIndex[i] == this.filters.rad) {
this.DistanceSelectedIndex = this.ReversIndex[i];
break;
}
}
}
this.filtersOptions = [
{
name: 'distance',
title: 'Distance',
modelName: 'rad',
withHeader: false,
showInRecommended: false,
options: [{
value: undefined,
title: '5 kilometers'
}, {
value: 10000,
title: '10 kilometers'
}, {
value: 15000,
title: '15 kilometers'
}, {
value: 25000,
title: '25 kilometers'
}, {
value: 50000,
title: '50 kilometers'
}, {
value: 100000,
title: '100 kilometers'
}]
},
{
name: 'rating',
title: 'Rating',
modelName: 'rating',
withHeader: true,
showInRecommended: true,
options: [{
value: undefined,
title: 'any'
}, {
value: 1,
title: '1 star'
}, {
value: 2,
title: '2 stars'
}, {
value: 3,
title: '3 stars'
}, {
value: 4,
title: '4 stars'
}, {
value: 5,
title: '5 stars'
}]
},
{
name: 'rate',
title: 'Rates',
modelName: 'rate',
withHeader: true,
showInRecommended: true,
options: [{
value: undefined,
title: 'any'
}, {
value: 1,
title: '$ - Inexpensive'
}, {
value: 2,
title: '$$ - Affordable'
}, {
value: 3,
title: '$$$ - Moderate'
}, {
value: 4,
title: '$$$$ - Expensive'
}]
}
];
}
ngOnDestroy(): void {
//this.tasksSubscription.unsubscribe();
}
public setEventLocation(location: any): void {
var place_name = location.name;
var address = location.formatted_address;
this.filters.lng = location.geometry.location.lng;
this.filters.lat = location.geometry.location.lat;
}
setCategory(event){
console.log(event);
if( event == 'All') {
this.filters.categoryId = undefined;
return;
}
for( var i = 0; i < this.vendorCategories.length; i++ ) {
if ( this.vendorCategories[i] == event ) {
this.filters.categoryId = i;
}
}
}
location_text(event){
this.filter_location_text = event;
}
cityInputChange(value) {
if (value == '') {
this.filters.lat = undefined;
this.filters.lng = undefined;
}
}
valueChanged(type, event){
console.log(type, event);
switch(type){
case 0://Distance Option
for( var i = 0; i < this.DistanceOption.length; i++) {
if( this.DistanceOption[i] == event.label ){
this.filters.rad = this.DistanceOptionIndex[i];
return;
}
}
this.filters.rad = undefined;
break;
case 1://Rating Star Option
for( var i = 0; i < this.Rating_starOption.length; i++) {
if( this.Rating_starOption[i] == event.label ){
this.filters.rating = this.RatingStarOptionIndex[i];
return;
}
}
this.filters.rating = undefined;
break;
case 2://Rating Option
for( var i = 0; i < this.RatingOption.length; i++) {
if( this.RatingOption[i] == event.label ){
this.filters.rate = this.RatingOptionIndex[i];
return;
}
}
this.filters.rate = undefined;
break;
}
}
close() {
Config.filters = {
categoryId: undefined,
lat: undefined,
lng: undefined,
rad: undefined,
rating: undefined,
rate: undefined
}
Config.filter_location_text = "";
this.routerExtensions.back();
}
nextStep() {
Config.filters = this.filters;
Config.filter_location_text = this.filter_location_text;
this.routerExtensions.back();
}
}
<file_sep>/spa/src/app/modules/wedding-form/wedding-form.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { NgSelectModule } from '@ng-select/ng-select';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { LayoutModule } from '../../core/layout/layout.module';
import { MatIconModule } from '@angular/material';
import { SharedModule } from '../../shared/shared.module';
import { WeddingFormComponent } from './wedding-form.component';
import { WeddingFormBasicInfoComponent } from './components/basic-info/basic-info.component';
import { WeddingFormPartnerComponent } from './components/partner/partner.component';
import { WeddingFormPrivacyComponent } from './components/privacy/privacy.component';
import { AvatarModule } from '../../shared/avatar/avatar.module';
import { ImageInputModule } from '../../shared/image-input/image-input.module';
import { NgDatepickerModule } from 'ng2-datepicker';
import { GooglePlaceModule } from "ngx-google-places-autocomplete";
import { OwlDateTimeModule, OWL_DATE_TIME_FORMATS } from 'ng-pick-datetime';
import { OwlMomentDateTimeModule } from 'ng-pick-datetime-moment';
import { routing } from './wedding-form.routing';
import { StoreModule } from '@ngrx/store';
@NgModule({
imports: [
routing,
CommonModule,
NgbModule.forRoot(),
LayoutModule,
FormsModule,
NgSelectModule,
MatIconModule,
AvatarModule,
NgDatepickerModule,
SharedModule,
],
declarations: [
WeddingFormComponent,
WeddingFormBasicInfoComponent,
WeddingFormPartnerComponent,
WeddingFormPrivacyComponent
],
exports: [
WeddingFormComponent
]
})
export class WeddingFormModule { }
<file_sep>/nativescript-app/app/shared/components/menu/menu.component.ts
import { Component, OnDestroy, OnInit, Output, EventEmitter } from '@angular/core';
import { Store } from '@ngrx/store';
import { Subscription, ISubscription } from 'rxjs/Subscription';
import { State, RootStoreState } from '~/root-store';
import { AuthInfo } from '~/root-store/auth-store/models';
import { selectAuthInfo } from '~/root-store/auth-store/selectors';
import { AddMemberModal } from '~/shared/modals/add-member';
import { ModalService } from '~/shared/services';
import { Wedding } from '~/root-store/wedding-store/models';
import { selectActiveWedding } from '~/root-store/wedding-store/selectors';
import { MemberSelectors, MemberModels } from '~/root-store/member-store';
import { Observable } from "rxjs/Observable";
import { MemberService } from '~/shared/services/member.service';
import { ProfileService } from '~/shared/services/profile.service';
import { ProfileSelectors } from '~/root-store/profile-store';
import { CommonModels } from '~/root-store';
@Component({
moduleId: module.id,
selector: 'menu',
templateUrl: 'menu.component.html',
styleUrls: ['./menu.component.scss']
})
export class MenuComponent implements OnInit, OnDestroy {
@Output() toggleMenuEvent: EventEmitter<any> = new EventEmitter();
public members;
accountInfo;
profiles: any;
activeProfile: CommonModels.Profile;
activeProfileSubscription: ISubscription;
authInfo: any;
imageDir:string;
accountName: string;
private accountSubscription: Subscription;
// private activeWedding: Wedding;
// private subActiveWedding: ISubscription;
constructor( private modalService: ModalService,
private store: Store<RootStoreState.State>,
private memberService: MemberService,
private profileService: ProfileService
) {
}
ngOnInit(): void {
console.log("menu ngOnit");
this.accountSubscription = this.store.select(selectAuthInfo).subscribe(
(authInfo: AuthInfo) => {
if (authInfo) {
// console.log(authInfo);
this.accountInfo = authInfo.account;
this.accountName = this.accountInfo.firstName + ' ' + this.accountInfo.lastName;
this.getProfileData();
}
}
)
this.accountInfo = true //must be deleted after test
}
getProfileData(){
this.activeProfileSubscription = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
console.log("activieProfile: ",activeProfile);
this.activeProfile = activeProfile
if(activeProfile && activeProfile.type == 'wedding') {
this.members = [];
this.memberService.getMembers({
weddingId: activeProfile.id
}).toPromise().then(response => {
// console.log(response);
// this.members = response.result;
for( var i = 0; i < response.result.length;i++){
if(response.result[i].isActive){
this.members.push(response.result[i].account);
}
// console.log(this.members[i]);
}
return response.result;
})
this.imageDir = 'wedding/'+ activeProfile.id + '/avatars';
}
else if( activeProfile && activeProfile.type == 'vendor') {
this.imageDir = 'vendor/'+ activeProfile.id + '/avatars';
}
else {
this.imageDir = 'account/' + this.accountInfo.id + '/avatars'
}
});
}
ngOnDestroy(): void {
this.accountSubscription.unsubscribe();
// this.subActiveWedding.unsubscribe();
this.activeProfileSubscription.unsubscribe();
}
public openAddMemberModal(): void {
this.modalService.showModal(AddMemberModal, {})
.then((response: any) => {
// TODO add guest
console.log(response);
});
}
public toggleMenu(): void {
this.toggleMenuEvent.next();
}
}
<file_sep>/nativescript-app/app/root-store/task-store/reducers.ts
import * as _ from 'lodash';
import { TaskActions, TaskActionTypes } from './actions';
import { initialState } from './state';
import { Task } from './models';
export function reducer(state = initialState, action: TaskActions) {
let task;
let updatedTasks;
let updatedUITaskDetails;
switch (action.type) {
case TaskActionTypes.GET_TASKS_SUCCESS:
return Object.assign({}, state, {
tasks: action.payload.tasks
});
case TaskActionTypes.ADD_TASK:
case TaskActionTypes.EDIT_TASK:
return Object.assign({}, state, {
ui: Object.assign({}, state.ui, {
taskForm: Object.assign({}, state.ui.taskForm, {
submitted: true,
modalOpen: true
})
})
});
case TaskActionTypes.ADD_TASK_CANCEL:
case TaskActionTypes.EDIT_TASK_CANCEL:
return Object.assign({}, state, {
ui: Object.assign({}, state.ui, {
taskForm: Object.assign({}, state.ui.taskForm, {
submitted: false,
modalOpen: false,
error: null
})
})
});
case TaskActionTypes.ADD_TASK_SUCCESS:
return Object.assign({}, state, {
tasks: [
action.payload.task,
...state.tasks
],
ui: Object.assign({}, state.ui, {
taskForm: Object.assign({}, state.ui.taskForm, {
submitted: false,
modalOpen: false
})
})
});
case TaskActionTypes.ADD_TASK_FAILURE:
case TaskActionTypes.EDIT_TASK_FAILURE:
return Object.assign({}, state, {
ui: Object.assign({}, state.ui, {
taskForm: Object.assign({}, state.ui.taskForm, {
submitted: false,
modalOpen: true,
error: action.payload.error
})
})
});
case TaskActionTypes.GET_TASK_DETAILS_SUCCESS:
let updatedTaskDetails = Object.assign({}, state.taskDetails);
task = action.payload.task;
updatedTaskDetails[task.id] = task;
return Object.assign({}, state, {
taskDetails: updatedTaskDetails
});
case TaskActionTypes.TOGGLE_TASK_DETAILS:
updatedUITaskDetails = Object.assign({}, state.ui.taskDetails);
let taskId = action.payload.taskId;
if (updatedUITaskDetails[taskId]) {
updatedUITaskDetails[taskId] = !updatedUITaskDetails[taskId];
} else {
updatedUITaskDetails[taskId] = true
}
return Object.assign({}, state, {
ui: Object.assign({}, state.ui, {
taskDetails: updatedUITaskDetails
})
});
case TaskActionTypes.DELETE_TASK_SUCCESS:
updatedTasks = state.tasks.filter((task) => {
return task.id !== action.payload.taskId;
});
return Object.assign({}, state, {
tasks: updatedTasks
});
case TaskActionTypes.EDIT_TASK_SUCCESS:
task = action.payload.task;
updatedTasks = state.tasks.map((item, index) => {
if (item.id !== action.payload.task.id) {
return item;
}
return Object.assign({}, item, {
name: task.name,
dueDate: task.dueDate,
assignedMemberId: task.assignedMemberId,
ui: Object.assign({}, state.ui, {
taskForm: Object.assign({}, state.ui.taskForm, {
submitted: false,
modalOpen: false,
error: null
})
})
});
});
// updatedUITaskDetails = Object.assign({}, state.ui.taskDetails);
// updatedUITaskDetails[task.id] = false;
return Object.assign({}, state, {
tasks: updatedTasks,
ui: Object.assign({}, state.ui, {
taskForm: Object.assign({}, state.ui.taskForm, {
submitted: false,
modalOpen: false
}),
})
});
// taskDetails: updatedUITaskDetails
case TaskActionTypes.GET_TASK_STATS_SUCCESS:
return Object.assign({}, state, {
stats: action.payload.stats
});
case TaskActionTypes.SET_TASK_STATUS_SUCCESS:
updatedTasks = _.map(state.tasks, (task: Task) => {
if (task.id === action.payload.taskId) {
task.status = action.payload.status;
}
return task;
});
return Object.assign({}, state, {
tasks: updatedTasks
});
default:
return state;
}
}
<file_sep>/spa/src/app/root-store/task-store/models.ts
export interface Task {
id: string;
name: string;
status: string;
overdue: boolean;
dueDate: string | null;
assignedMemberId: string;
}
export interface TaskDetails {
id: string;
name: string;
status: string;
dueDate: string | null;
doneAt: string | null;
createdAt: string;
isAssigned: boolean;
author: {
id: string;
email: string;
account: {
id: string;
firstName: string;
lastName: string;
email: string;
}
},
assigned: {
id: string;
email: string;
account: {
id: string;
firstName: string;
lastName: string;
email: string;
}
} | null
}
<file_sep>/spa/src/app/root-store/services/post.service.ts
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from "rxjs/Observable";
import { environment } from '../../../environments/environment';
import { Post, Photo } from '../common-models';
import { Store } from '@ngrx/store';
import { State } from '../root-store.state';
@Injectable()
export class PostService {
private apiUrl: string = environment.apiUrl;
constructor(
private store: Store<State>,
private http: HttpClient
) {
}
getAllPosts({ page, followed = false }): Observable<any> {
return this.http.get<Post[]>(`${this.apiUrl}/posts?page=${(page || 1)}${followed ? '&followed=true' : ''}`);
}
getPosts({ page, weddingId }): Observable<any> {
return this.http.get<Post[]>(this.apiUrl + '/weddings/' + weddingId + '/posts?page=' + (page || 1));
}
getPost({ postId, weddingId }): Observable<any> {
return this.http.get<Post[]>(this.apiUrl + '/weddings/' + weddingId + '/posts/' + postId);
}
addPost({ weddingId, post }): Observable<any> {
return this.http.post(this.apiUrl + '/weddings/' + weddingId + '/posts', post);
}
getPostComments({ weddingId, postId, page }: { weddingId: string, postId: string, page?: number }): Observable<any> {
return this.http.get(this.apiUrl + '/weddings/' + weddingId + '/posts/' + postId + '/comments?page=' + (page || 1));
}
addPostComment({ weddingId, postId, comment }): Observable<any> {
return this.http.post(this.apiUrl + '/weddings/' + weddingId + '/posts/' + postId + '/comments', comment);
}
getPostComment({ weddingId, postId, commentId }): Observable<any> {
return this.http.get(this.apiUrl + '/weddings/' + weddingId + '/posts/' + postId + '/comments/' + commentId);
}
likePost({ weddingId, postId, like }): Observable<any> {
return this.http.post(this.apiUrl + '/weddings/' + weddingId + '/posts/' + postId + '/likes', like);
}
unlikePost({ weddingId, postId, likeId }): Observable<any> {
return this.http.delete(this.apiUrl + '/weddings/' + weddingId + '/posts/' + postId + '/likes/' + likeId);
}
getLikes({ weddingId, postId }): Observable<any> {
return this.http.get(this.apiUrl + '/weddings/' + weddingId + '/posts/' + postId + '/likes');
}
getPhotos({ page, weddingId }): Observable<any> {
return this.http.get<Photo[]>(this.apiUrl + '/weddings/' + weddingId + '/photos?page=' + (page || 1));
}
public deletePhoto({ weddingId, photoId }): Observable<any> {
return this.http.delete(`${this.apiUrl}/weddings/${weddingId}/photos/${photoId}`);
}
public deletePost({ weddingId, postId }): Observable<any> {
return this.http.delete(`${this.apiUrl}/weddings/${weddingId}/posts/${postId}`);
}
public editPost({ weddingId, postId, params }): Observable<any> {
const headers = new HttpHeaders();
headers.append('Content-Type', 'application/form-data');
return this.http.patch(`${this.apiUrl}/weddings/${weddingId}/posts/${postId}`, params, {
headers
});
}
public editComment({ weddingId, postId, commentId, text }): Observable<any> {
return this.http.patch(`${this.apiUrl}/weddings/${weddingId}/posts/${postId}/comments/${commentId}`,
{
text
}
);
}
public deleteComment({ weddingId, postId, commentId }): Observable<any> {
return this.http.delete(`${this.apiUrl}/weddings/${weddingId}/posts/${postId}/comments/${commentId}`);
}
}
<file_sep>/nativescript-app/app/modules/wedding/components/guest-list/guest-list.component.ts
import { Component } from '@angular/core';
import { screen } from 'tns-core-modules/platform';
import { AddGuestModal } from '~/modules/wedding/modals';
import { ModalService } from '~/shared/services';
import { Wedding } from '~/root-store/wedding-store/models';
import { ISubscription } from 'rxjs/Subscription';
import { selectActiveWedding } from '~/root-store/wedding-store/selectors';
import { Store } from '@ngrx/store';
import { State } from '~/root-store';
import { GuestService } from '~/shared/services/guest.service';
import { Config } from '~/shared/configs';
@Component({
moduleId: module.id,
selector: 'guest-list',
templateUrl: 'guest-list.component.html'
})
export class GuestListComponent {
public containerHeight;
//---using in test----------------------
public guests: Array<any> = [];
/*
{
firstName: 'Norman',
lastName: 'Lane',
role: 'groomsman',
side: 'groom\'s',
ceremony: false,
reception: true,
},
];
*/
page: number = 1;
stats: any;
infiniteScrollDisabled: boolean = false;
term: string = '';
private activeWedding: Wedding;
private subActiveWedding: ISubscription;
//---------------------------------------
constructor(
private modalService: ModalService,
private store: Store<State>,
private guestService: GuestService,
) {
this.containerHeight = screen.mainScreen.heightDIPs - 140; // Topbar height + some margin
}
ngOnInit() {
console.log("---Guest List ngOnInit---");
Config.previousUrl = "guest-list";
this.subActiveWedding = this.store.select(
selectActiveWedding
).subscribe(activeWedding => {
if (activeWedding) {
// console.log("--Guest List ActiveWedding: "+activeWedding);
this.activeWedding = activeWedding;
this.getGuests();
this.getStats();
}
else {
console.log("active wedding is null");
}
});
}
getGuests() {
this.guestService.getGuests({
weddingId: this.activeWedding.id,
options: {
page: this.page,
term: this.term
}
}).toPromise().then(response => {
this.guests.push(...response.result);
if (response.result.length < 30) {
this.infiniteScrollDisabled = true;
}
});
}
getStats() {
this.guestService.getStats(this.activeWedding.id)
.toPromise().then(response => {
this.stats = response.result;
});
}
loadMoreGuests() {
this.page++;
this.getGuests();
}
resetGuests() {
this.page = 1;
this.guests = [];
this.getGuests();
}
ngOnDestroy() {
// this.subActiveWedding.unsubscribe();
}
public openAddGuestModal(): void {
this.modalService.showModal(AddGuestModal, {})
.then((response: any) => {
// TODO add guest
console.log(response);
});
}
}
<file_sep>/nativescript-app/app/modules/auth/components/remind-password/index.ts
export * from './remind-password.component';<file_sep>/spa/src/app/modules/social-feed/social-feed.routing.ts
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { SocialFeedComponent } from './social-feed.component';
import { AuthGuard } from '../../shared/guards/auth.guard';
import {
AuthResolvers,
ProfileResolvers
} from '../../root-store';
const routes: Routes = [
{
path: '', component: SocialFeedComponent, canActivate: [AuthGuard], resolve: {
activeProfile: ProfileResolvers.ActiveProfileResolver,
authInfo: AuthResolvers.AuthInfoResolver
},
runGuardsAndResolvers: 'always'
}
];
export const routing: ModuleWithProviders = RouterModule.forChild(routes);
<file_sep>/nativescript-app/app/modules/auth/components/register/register.component.ts
import { Component } from '@angular/core';
import { TextField } from 'tns-core-modules/ui/text-field';
import { RouterExtensions } from "nativescript-angular/router"; //2018.9.4
import { alert } from "tns-core-modules/ui/dialogs";
import { AuthService } from '~/shared/services';
@Component({
moduleId: module.id,
selector: 'register',
templateUrl: 'register.component.html',
styleUrls: ['./register.component.scss']
})
export class RegisterComponent {
processing = false;
private email: string;
private password: string;
private repeatPassword: string;
private firstName: string;
private lastName: string;
public userType: string = 'couple';
public userTypeId: Number = 2;
constructor(
private authService: AuthService, private routerExtensions: RouterExtensions
) {
console.log("---register---")
}
public setType(userType: string, userTypeId): void {
this.userType = userType;
this.userTypeId = userTypeId;
}
public signUp(): void {
/*
if (this.userType === 'guest') {
this.routerExtensions.navigate(['/app', 'social-feed']);
} else {
this.routerExtensions.navigate(['/app', this.userType]);
}
//2018.9.4 This is deleted after screen test
/**/
if (!this.email || !this.password || !this.repeatPassword || !this.firstName || !this.lastName) {
this.alert("Please provide all required input.");
return;
}
if (this.repeatPassword != this.password) {
this.alert("Please confirm repeat password and password.");
return;
}
this.processing = true
this.authService.register({
email: this.email,
password: <PASSWORD>,
password_repeat: <PASSWORD>,
first_name: this.firstName,
last_name: this.lastName,
account_type_id: this.userTypeId
})
.then(() => {
this.processing = false
if (this.userType === 'guest') {
this.routerExtensions.navigate(['/app', 'social-feed']);
} else {
// this.routerExtensions.navigate(['/app', this.userType]);
this.routerExtensions.navigate(['/login']);
}
})
.catch(() => {
this.processing = false
this.alert("Unfortunately we could not register your account. Please confirm your network connection");
//--delete after test----------------------------------
// if (this.userType === 'guest') {
// this.routerExtensions.navigate(['/app', 'social-feed']);
// } else {
// this.routerExtensions.navigate(['/app', this.userType]);
// }
//-----------------------------------------------------------
})
}
public onFieldChange(args: any, field: string): void {
let textField = <TextField>args.object;
this[field] = textField.text;
}
alert(message: string) {
return alert({
title: "Wedding App",
okButtonText: "OK",
message: message
});
}
}
<file_sep>/nativescript-app/app/shared/components/create-profile/vendor/payment/create-vendor-payment.component.ts
import { Component, EventEmitter, Output } from '@angular/core';
import { RouterExtensions } from 'nativescript-angular/router' //9.4
@Component({
moduleId: module.id,
selector: 'create-vendor-payment',
templateUrl: 'create-vendor-payment.component.html',
styleUrls: ['../../create-profile-base.component.scss']
})
export class CreateVendorPaymentComponent {
@Output() previousStepEvent: EventEmitter<any> = new EventEmitter();
@Output() createProfileEvent: EventEmitter<any> = new EventEmitter();
public paymentMethod: string = 'paypal';
public countries: Array<any> = [
'Poland',
'Great Britain',
'Russia'
];
public values: any = {
company_name:'',
company_address:'',
vat_number:'',
country: ''
};
constructor(private routerExtensions: RouterExtensions
) {
}
public previousStep(): void {
this.previousStepEvent.next();
}
public createProfile(): void {
this.createProfileEvent.next();
// this.routerExtensions.navigate(['/app', 'social-feed'])
}
public setValue(name: string, value: any): void {
this.values[name] = value;
}
public selectOperator(operatorName: string): void {
this.paymentMethod = operatorName;
}
}
<file_sep>/nativescript-app/app/modules/wedding/components/couple-photos/couple-photos.component.ts
import { Component } from '@angular/core';
import { Store } from '@ngrx/store';
import { screen } from 'platform';
import { State } from '~/root-store';
import { ModalService, PostService } from '~/shared/services';
import { Config, CDN_URL } from '~/shared/configs';
import { PostFormComponent } from '~/modules/social-feed/components';
import { Wedding } from '~/root-store/wedding-store/models';
const PhotoViewer = require('nativescript-photoviewer');
@Component({
moduleId: module.id,
selector: 'couple-photos',
templateUrl: 'couple-photos.component.html',
styleUrls: ['./couple-photos.component.scss']
})
export class CouplePhotosComponent {
private activeWedding: Wedding;
public weddingId: string;
public wedding: Wedding;
public photoWidth: number;
photos: any[];
page: number;
private photoViewer = new PhotoViewer();
infiniteScrollDisabled: boolean;
uploaderImages: any;
cdnUrl:string;
constructor(
private modalService: ModalService,
private store: Store<State>,
private postService: PostService,
) {
this.photoWidth = (screen.mainScreen.widthDIPs - 60) / 2;
}
ngOnInit(): void {
console.log("couple profile Information ngOnit");
// console.log(Config.activeWedding);
this.activeWedding = Config.activeWedding;
this.page = 1;
if( Config.activeWedding ) {
this.weddingId = Config.activeWedding.id;
this.cdnUrl = CDN_URL + '/wedding/' + this.weddingId + '/photos/';
this.getPhotos();
}
}
getPhotos() {
this.postService.getPhotos({
weddingId: this.weddingId,
page: this.page
}).toPromise().then(response => {
if (response.result.length === 0) {
this.infiniteScrollDisabled = true;
}
console.log(response);
response.result.map(photo => {
const baseUrl = CDN_URL + '/wedding/' + this.weddingId + '/photos/';
photo.src = baseUrl + photo.filename;
photo.thumb = baseUrl + photo.filename.replace(/(\.[\w\d_-]+)$/i, '_sq$1');
// console.log(photo.filename+", "+photo.filename.replace(/(\.[\w\d_-]+)$/i, '_sq$1'));
return photo;
});
this.photos = [];
this.photos = this.photos.concat(response.result);
});
}
public showGallery(iterator?: number): void {
const photos = this.photos.map((photo) => {
return this.cdnUrl + photo.filename;//.replace(/(\.[\w\d_-]+)$/i, '_lg$1')
});
this.photoViewer.startIndex = iterator || 0;
this.photoViewer.showViewer(photos);
}
uploaderImagesChange(event) {
// this.modalRef = this.modalService.open(PostFormComponent);
// this.modalRef.componentInstance.uploaderImages = event;
// this.modalRef.componentInstance.activeProfile = this.activeProfile;
// this.modalRef.componentInstance.textPlaceholder = 'Write something about this photo...';
// this.modalRef.componentInstance.onSuccess.subscribe(event => {
// this.page = 1;
// this.getPhotos();
// this.modalRef.close();
// });
}
onScroll(direction) {
const currentPage = this.page;
if (direction == 'down') {
this.page++;
} else if (this.page > 1) {
this.page--;
}
if (currentPage != this.page) {
this.getPhotos();
}
}
public deletePhoto(deletedPhoto, event): void {
// event.preventDefault();
// const modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'});
// modal.componentInstance['data'] = {
// title: 'Delete photo',
// text: 'Are you sure?',
// confirm: this.sendDeletePhotoReq.bind(this),
// callbackParam: deletedPhoto
// };
}
public sendDeletePhotoReq(deletedPhoto): void {
this.postService.deletePhoto({weddingId: this.weddingId, photoId: deletedPhoto.id}).subscribe(
() => {
this.photos = this.photos.filter((photo) => {
return photo.id !== deletedPhoto.id;
});
// this._flashMessagesService.show('Photo deleted successfully', {cssClass: 'alert-success', timeout: 3000});
},
() => {
// this._flashMessagesService.show('Photo deletion failed', {cssClass: 'alert-danger', timeout: 3000});
}
);
}
}
<file_sep>/spa/src/app/modules/social-feed/components/comment-form/comment-form.component.ts
import { Component, EventEmitter, OnInit, OnDestroy, Input, Output, ViewChild, AfterViewInit } from '@angular/core';
import { FlashMessagesService } from 'angular2-flash-messages';
import { ISubscription } from 'rxjs/Subscription';
import { ActivatedRoute } from '@angular/router';
import { PostService } from '../../../../root-store/services/post.service';
import {
AuthModels,
CommonModels
} from '../../../../root-store';
@Component({
selector: 'comment-form',
templateUrl: './comment-form.component.html',
styleUrls: ['./comment-form.component.sass']
})
export class CommentFormComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild('commentForm') private commentForm: any;
@ViewChild('text') private text: any;
@Input() asWedding: boolean;
@Input() postId: string;
@Input() weddingId: string;
@Input() comment: any;
@Input() editForm = false;
@Output() onSuccess = new EventEmitter<any>();
@Output() cancelEditEvent = new EventEmitter();
public commentFormData: any;
authInfo: AuthModels.AuthInfo;
activeProfile: CommonModels.Profile;
resolverSubscription: ISubscription;
active: boolean;
constructor(
private route: ActivatedRoute,
private postService: PostService,
private _flashMessagesService: FlashMessagesService
) {
}
ngOnInit() {
this.resolverSubscription = this.route.data.subscribe(
data => {
this.authInfo = data.authInfo;
this.activeProfile = data.activeProfile;
}
);
if (!this.editForm) {
this.commentFormData = {
text: ''
};
} else {
this.commentFormData = Object.assign({}, this.comment);
}
}
ngAfterViewInit() {
if (this.editForm) {
this.text.nativeElement.focus();
}
}
ngOnDestroy() {
this.resolverSubscription.unsubscribe();
}
async onSubmit() {
if (this.editForm) {
this.postService.editComment({
weddingId: this.weddingId,
postId: this.postId,
commentId: this.comment.id,
text: this.commentFormData.text
}).toPromise().then(() => {
this.onSuccess.emit(this.commentFormData.text);
this.cancelEdit();
}).catch(() => {
this._flashMessagesService.show('Comment edit failed', { cssClass: 'alert-danger', timeout: 3000 });
});
} else {
this.commentFormData = {
...this.commentFormData,
authorWeddingId: this.activeProfile && this.activeProfile.type == 'wedding' ? this.activeProfile.id : undefined,
asWedding: this.asWedding
};
const commentId = await this.postService.addPostComment({
weddingId: this.weddingId,
postId: this.postId,
comment: this.commentFormData
}).toPromise().then(response => {
return response.result;
});
this.resetForm();
const comment = await this.postService.getPostComment({
weddingId: this.weddingId,
postId: this.postId,
commentId: commentId
}).toPromise().then(response => {
return response.result;
});
this.onSuccess.emit(comment);
}
}
resetForm() {
this.commentFormData.text = null;
}
public cancelEdit(): void {
this.cancelEditEvent.next();
}
}
<file_sep>/nativescript-app/app/root-store/wedding-store/models.ts
export enum WeddingRoleEnum {
Groom = 'groom',
Bride = 'bride'
}
export enum PrivacySettingEnum {
Private = 'private',
Followers = 'followers',
Registered = 'registered',
Public = 'public'
}
export interface Partner {
firstName: string,
lastName: string,
description?: string,
birthDate?: any;
role: WeddingRoleEnum
avatar?: any;
}
export interface Wedding {
id?: string,
name?: string,
description: string,
avatar?: any,
partners: Array<Partner>,
privacySetting: PrivacySettingEnum
events?: Array<any> // TODO type for wedidngEvent
}
export interface WeddingDetails {
id: string,
name: any,
createdAt: string,
member: {
id: string,
role: string
}
}
export interface Member {
id: string,
email: string,
role: string,
isActive: boolean,
account: {
id: string,
email: string,
firstName: string,
lastName: string
},
invitation: {
id: string,
isAccepted: boolean,
createdAt: string | null,
deletedAd: string | null
}
}
<file_sep>/spa/src/app/modules/inspirations/components/inspiration-actions/inspiration-actions.component.ts
import { Component, OnInit, OnDestroy, Input, Output, EventEmitter } from '@angular/core';
import { FlashMessagesService } from 'angular2-flash-messages';
import { ISubscription } from 'rxjs/Subscription';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { Router, ActivatedRoute } from '@angular/router';
import { Store } from '@ngrx/store';
import { ConfirmDialogComponent } from '../../../../shared/confirm-dialog/confirm-dialog.component';
import { InspirationService } from '../../../../root-store/services/inspiration.service';
import {
RootStoreState,
ProfileSelectors,
CommonModels
} from '../../../../root-store';
@Component({
selector: 'app-inspiration-actions',
templateUrl: './inspiration-actions.component.html'
})
export class InspirationActionsComponent implements OnInit, OnDestroy {
@Input() inspiration: any;
@Output() inspirationDeleted: EventEmitter<boolean> = new EventEmitter();
activeProfile: CommonModels.Profile;
subscriptionActiveProfile: ISubscription;
pinLoading: boolean = false;
constructor(
private route: ActivatedRoute,
private store: Store<RootStoreState.State>,
private inspirationService: InspirationService,
private _flashMessagesService: FlashMessagesService,
private modalService: NgbModal
) { }
async ngOnInit() {
this.subscriptionActiveProfile = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
if (activeProfile) {
this.activeProfile = activeProfile;
}
});
}
ngOnDestroy() {
this.subscriptionActiveProfile.unsubscribe();
}
async togglePin({
inspirationId,
event,
action
}) {
event.stopPropagation();
this.pinLoading = true;
this.inspirationService[action + 'Inspiration']({
inspirationId: inspirationId,
weddingId: this.activeProfile.id
}).toPromise().then(response => {
this.pinLoading = false;
if(action == 'pin') {
this.inspiration.isPinned = true;
} else {
this.inspiration.isPinned = false;
}
}).catch(error => {
this.pinLoading = false;
})
}
async delete() {
const modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'});
modal.componentInstance['data'] = {
title: 'Delete inspiration',
text: 'Are you sure?',
confirm: this.sendDeleteReq.bind(this)
};
}
private sendDeleteReq(): void {
this.inspirationService.deleteInspiration(this.inspiration.id).subscribe(
() => {
this.inspirationDeleted.emit(true);
this._flashMessagesService.show('Inspiration deleted', {cssClass: 'alert-success', timeout: 3000});
},
() => {
this._flashMessagesService.show('Inspiration delete failed', {cssClass: 'alert-danger', timeout: 3000});
}
);
}
}
<file_sep>/website/src/router.ts
import { Router } from "express";
import * as bodyParser from 'body-parser';
import { IConfig } from 'config';
import RequestService from 'services/RequestService';
import AuthRoutes from 'routes/AuthRoutes';
import * as cookieParser from 'cookie-parser';
import { sanitizeBody } from 'express-validator/filter';
import * as flash from 'connect-flash';
import * as session from 'express-session';
import * as connectRedis from 'connect-redis';
import * as redis from 'redis';
import * as express from 'express';
import * as path from 'path';
export default ({ config, scopePerRequest, requestService, authRoutes, profileRoutes, guestRoutes }) => {
const router = Router();
let redisStore = connectRedis(session);
let redisClient = redis.createClient({
host: config.redis.host,
port: config.redis.port
});
router.use(session({
store: new redisStore({
client: redisClient
}),
secret: config.salt,
resave: false,
saveUninitialized: false
}));
router.use(flash());
router.use(sanitizeBody('*').trim().escape());
router.use(bodyParser.json());
router.use(bodyParser.urlencoded({
extended: true
}));
router.use(cookieParser());
router.use(scopePerRequest);
router.use(async (req, res, next) => {
req['user'] = false;
let jwt = req.cookies.jwt;
if (jwt && !req.query.noauth) {
try {
let authInfo = await requestService.make({
method: 'get',
url: 'auth/authenticate',
jwt: jwt
});
if (authInfo && authInfo.account) {
req['user'] = authInfo.account;
res.locals.user = authInfo.account;
res.locals.userString = JSON.stringify(authInfo, null, 1);
}
} catch (error) {
if(error.statusCode !== 401) {
return next(error);
}
}
}
next();
});
router.use('/', authRoutes.getRoutes());
router.use('/', guestRoutes.getRoutes());
router.use('/profiles', profileRoutes.getRoutes());
router.use(function(err, req, res, next) {
res.render('error', {
error: err
});
console.log(err);
});
return router;
};
<file_sep>/spa/src/app/shared/guards/isOwner.guard.ts
import { Injectable } from '@angular/core';
import { CanActivate } from '@angular/router';
import { Store } from '@ngrx/store';
import { catchError, exhaustMap, map } from 'rxjs/operators';
import {
RootStoreState,
ProfileSelectors
} from '../../root-store';
@Injectable()
export class IsOwnerGuard implements CanActivate {
constructor(
private store: Store<RootStoreState.State>
) { }
canActivate() {
return this.store.select(ProfileSelectors.selectActiveProfile).pipe(
map(activeProfile => {
if(activeProfile) {
if(activeProfile.isOwner) {
return true;
} else {
return false;
}
} else {
return true;
}
})
)
}
}
<file_sep>/nativescript-app/app/shared/components/radio-buttons/index.ts
export * from './radio-buttons.component';<file_sep>/nativescript-app/app/app.component.ts
import { ChangeDetectorRef, Component, OnInit, ViewContainerRef } from '@angular/core';
import { RouterExtensions } from 'nativescript-angular';
import { handleOpenURL, AppURL } from 'nativescript-urlhandler';
import { Page } from "tns-core-modules/ui/page"; //for actionbar hidden
import { AuthService, ModalService } from '~/shared/services';
import { DialogsService } from '~/shared/services/dialogs.service';
import { DialogType } from '~/shared/types/enum';
@Component({
selector: 'my-app',
templateUrl: 'app.component.html'
})
export class AppComponent implements OnInit {
private handlingRedirection: boolean = false;
constructor(
private vcRef: ViewContainerRef,
private routerExt: RouterExtensions,
private modalService: ModalService,
private authService: AuthService,
private changeDetector: ChangeDetectorRef,
private dialogsService: DialogsService,
private page: Page,
) {
console.log("---AppComponent---")
this.page.actionBarHidden = true; //hide ationbar
}
ngOnInit(): void {
handleOpenURL((AppURL: string) => {
this.handleRouting(AppURL);
});
this.modalService.setContainerRef(this.vcRef);
console.log("---AppInit---")
}
public handleRouting(url: string) {
console.log("handleRouting")
if (!this.handlingRedirection) {
this.handlingRedirection = true;
let decodedUrl = decodeURIComponent(url);
if (decodedUrl) {
const indexOfActivate = decodedUrl.indexOf('activate/') + 9;
decodedUrl = decodedUrl.slice(indexOfActivate);
const params = decodedUrl.split('?');
const hash = params.shift();
// TODO fix redirecting to couple profile creation to only when these params after another routes are added redirect=%2Fwedding%3Flayout%3Dblank&app=true
params.forEach((param: string) => {
const arr = param.split('=');
if (arr[0] === 'redirect') {
if (arr[1] !== '/wedding') {
this.routerExt.navigate([arr[1]]);
this.handlingRedirection = false;
} else {
if (hash) {
this.authService.activateAccount(hash).subscribe(
(res) => {
this.dialogsService.showDialog({
type: DialogType.Info,
message: 'Account activated successfully'
});
this.routerExt.navigateByUrl(`/app/couple`).then(() => {
this.changeDetector.detectChanges();
});
this.handlingRedirection = false;
},
() => {
this.handlingRedirection = false;
}
)
} else {
this.handlingRedirection = false;
}
}
}
});
}
}
}
}
<file_sep>/nativescript-app/app/modules/auth/auth.routing.ts
import { SetPasswordComponent } from '~/modules/auth/components';
import {
LoginComponent,
RegisterComponent,
RemindPasswordComponent,
WelcomeComponent
} from './components';
export const authRoutes = [
{ path: '', component: WelcomeComponent },
{ path: 'login', component: LoginComponent },
{ path: 'register', component: RegisterComponent },
{ path: 'set-password', component: SetPasswordComponent },
{ path: 'remind-password', component: RemindPasswordComponent}
];<file_sep>/spa/src/app/root-store/member-store/module.ts
import { NgModule } from '@angular/core';
import { EffectsModule } from '@ngrx/effects';
import { MemberEffects } from './effects';
import { NgbModule, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { MemberService } from '../services/member.service';
import { reducer } from './reducers';
import { StoreModule } from '@ngrx/store';
import { ConfirmDialogModule } from "../../shared/confirm-dialog/confirm-dialog.module";
@NgModule({
imports: [
StoreModule.forFeature('member', reducer),
EffectsModule.forFeature([MemberEffects]),
NgbModule.forRoot(),
ConfirmDialogModule
],
declarations: [
],
providers: [
MemberService,
MemberEffects
]
})
export class MemberStoreModule { }
<file_sep>/spa/src/app/modules/inspirations/components/inspiration-thumbnail/inspiration-thumbnail.component.ts
import { Component, OnInit, OnDestroy, Input } from '@angular/core';
import { ISubscription } from 'rxjs/Subscription';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { Router, ActivatedRoute } from '@angular/router';
import { InspirationService } from '../../../../root-store/services/inspiration.service';
import { environment } from '../../../../../environments/environment';
@Component({
selector: 'app-inspiration-thumbnail',
templateUrl: './inspiration-thumbnail.component.html'
})
export class InspirationThumbnailComponent implements OnInit {
@Input() inspiration: any;
constructor(
private route: ActivatedRoute,
private inspirationService: InspirationService
) { }
async ngOnInit() {
}
getUrl(inspiration) {
return environment.cdnUrl + '/inspirations/' + inspiration.id + '/' + inspiration.filename.replace(/(\.[\w\d_-]+)$/i, '_mdw$1');
}
}
<file_sep>/spa/src/app/shared/directives/ngx-scroll-spy.directive.ts
import { Directive, Input, ElementRef, HostListener, Inject, Renderer2 } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { Router } from '@angular/router';
@Directive({
selector: '[appScrollSpy]',
})
export class NgxScrollSpyDirective {
@Input() appScrollSpy: string;
@Input() spyOffset?: string;
constructor(
@Inject(DOCUMENT) private _document: any,
private _router: Router,
private _elem: ElementRef,
private _renderer: Renderer2
) { }
private _getTarget(spTargetName: string[]): any {
const type = spTargetName.shift();
switch (type) {
case '#':
return this._document.getElementById(spTargetName.join(''));
case '.':
return this._document.getElementsByClassName(spTargetName.join(''))[0];
default:
return this._document.getElementsByTagName(this.appScrollSpy)[0];
}
}
@HostListener('window:scroll', ['$event'])
onWindowScroll(event: Event): void {
const offset = this.spyOffset ? this.spyOffset : 0;
const scrollTarget = this._getTarget(this.appScrollSpy.split(''));
const elemDim = scrollTarget ? scrollTarget.getBoundingClientRect() : null;
if (!elemDim) {
console.warn(`There is no element ${this.appScrollSpy}`);
} else if (elemDim && elemDim.top < offset && elemDim.bottom > offset) {
this._renderer.addClass(this._elem.nativeElement, 'active');
} else {
this._renderer.removeClass(this._elem.nativeElement, 'active');
}
}
}
<file_sep>/nativescript-app/app/root-store/auth-store/reducers.ts
import { AuthActions, AuthActionTypes } from './actions';
import { initialState } from './state';
export function reducer(state = initialState, action: AuthActions) {
switch (action.type) {
case AuthActionTypes.GET_AUTH_INFO_SUCCESS:
return Object.assign({}, state, {
isAuthenticated: true,
authInfo: Object.assign({}, state.authInfo, {
account: action.payload.account
})
});
case AuthActionTypes.LOGOUT: {
return initialState;
}
default:
return state;
}
}
<file_sep>/spa/src/app/root-store/profile-store/effects.ts
import { FlashMessagesService } from 'angular2-flash-messages';
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { of } from 'rxjs';
import { catchError, exhaustMap, map, mapTo, withLatestFrom, concatMapTo, tap } from 'rxjs/operators';
import { CookieService } from 'angular2-cookie/core';
import { environment } from '../../../environments/environment';
import { Store } from '@ngrx/store';
import { RootStoreState } from '../../root-store';
import {
ProfileActionTypes,
SetActiveProfile,
SetActiveProfileSuccess,
SetActiveProfileFailure,
} from './actions';
@Injectable()
export class ProfileEffects {
constructor(
private actions$: Actions,
private store: Store<RootStoreState.State>,
private _flashMessagesService: FlashMessagesService,
private router: Router
) { }
@Effect({ dispatch: false })
setActiveProfile$ = this.actions$.pipe(
ofType<SetActiveProfile>(ProfileActionTypes.SET_ACTIVE_PROFILE),
tap(action => {
if(action.payload.profile) {
localStorage.setItem(action.payload.accountId + '-activeProfileId', action.payload.profile.id);
}
})
);
}
<file_sep>/nativescript-app/app/root-store/index.ts
import { RootStoreModule } from './root-store.module';
import * as CommonModels from './common-models';
import * as RootStoreState from './root-store.state';
export * from './root-store.state';
export * from './auth-store';
export * from './task-store';
export * from './member-store';
export * from './profile-store';
export * from './message-store';
//create new repo
export { RootStoreState, RootStoreModule, CommonModels };<file_sep>/spa/src/app/root-store/auth-store/selectors.ts
import {
createFeatureSelector,
createSelector,
MemoizedSelector
} from '@ngrx/store';
import { AuthInfo } from './models';
import { State } from './state';
const getAuthInfo = (state: State): any => state.authInfo;
export const selectAuthState: MemoizedSelector<object,State> = createFeatureSelector<State>('auth');
export const selectAuthInfo: MemoizedSelector<object,AuthInfo> = createSelector(selectAuthState, getAuthInfo);
<file_sep>/spa/src/app/root-store/services/wedding.service.ts
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { Store } from '@ngrx/store';
import { environment } from '../../../environments/environment';
import { Wedding } from '../common-models';
@Injectable()
export class WeddingService {
private apiUrl: string = environment.apiUrl + '/weddings';
constructor(
private http: HttpClient
) { }
getWeddings(): Observable<any> {
return this.http.get<Wedding[]>(this.apiUrl + '?isMember=true');
}
getWedding({ weddingId }): Observable<any> {
return this.http.get<Wedding>(this.apiUrl + '/' + weddingId);
}
getWeddingMembers({ weddingId }): Observable<any> {
return this.http.get(this.apiUrl + '/' + weddingId + '/members?isActive=true');
}
getWeddingPartners({ weddingId }): Observable<any> {
return this.http.get<Wedding[]>(this.apiUrl + '/' + weddingId + '/partners');
}
getWeddingEvents({ weddingId }): Observable<any> {
return this.http.get<Wedding[]>(this.apiUrl + '/' + weddingId + '/events');
}
createWedding({ formData }): Observable<any> {
const headers = new HttpHeaders();
headers.append('Content-Type', 'application/form-data');
return this.http.post(this.apiUrl, formData, {
headers
});
}
public editWedding({ weddingId, weddingEdited }): Observable<any> {
const headers = new HttpHeaders();
headers.append('Content-Type', 'application/form-data');
return this.http.patch(`${this.apiUrl}/${weddingId}`, weddingEdited, {
headers
});
}
public editEvent({ weddingId, eventId, eventEdited }): Observable<any> {
return this.http.patch(`${this.apiUrl}/${weddingId}/events/${eventId}`, eventEdited);
}
public addEvent({ weddingId, event }): Observable<any> {
return this.http.post(`${this.apiUrl}/${weddingId}/events`, event);
}
public editPartner({ weddingId, partnerId, partnerEdited }): Observable<any> {
const headers = new HttpHeaders();
headers.append('Content-Type', 'application/form-data');
return this.http.patch(`${this.apiUrl}/${weddingId}/partners/${partnerId}`, partnerEdited, {
headers
});
}
public follow({ weddingId }): Observable<any> {
return this.http.post(`${this.apiUrl}/${weddingId}/follow`, {});
}
public unfollow({ weddingId }): Observable<any> {
return this.http.delete(`${this.apiUrl}/${weddingId}/follow`);
}
}
<file_sep>/nativescript-app/app/shared/components/create-profile/vendor/add-product/add-product.modal.ts
import { Component } from '@angular/core';
import { ModalDialogParams } from 'nativescript-angular/directives/dialogs';
import { screen } from 'tns-core-modules/platform';
import { TextField } from 'tns-core-modules/ui/text-field';
@Component({
selector: 'add-product',
templateUrl: 'add-product.modal.html',
})
export class AddProductModal {
public width: any;
public currencies = [
'USD',
'PLN',
'AUD',
'GBP',
];
public units = [
'aa',
'bb'
];
private values: any = {
name: '',
price: '',
currency: '',
unit: '',
description: '',
photo: ''
};
constructor(
private params: ModalDialogParams
) {
this.width = screen.mainScreen.widthDIPs;
}
public close(values?: any): void {
this.params.closeCallback(values);
}
public setValue(fieldName: string, value: any): void {
this.values[fieldName] = value;
}
public setTextValue(fieldName: string, args: any): void {
let textField = <TextField>args.object;
this.values[fieldName] = textField.text;
}
public submit(): void {
this.close(this.values);
}
}<file_sep>/nativescript-app/app/modules/wedding/components/couple-informations/couple-informations.component.ts
import { Component, ChangeDetectorRef } from '@angular/core';
import { Store } from '@ngrx/store';
import { State } from '~/root-store';
import { Config } from '~/shared/configs';
import { Wedding } from '~/root-store/wedding-store/models';
import { WeddingService } from '~/shared/services';
import { MomentModule } from 'angular2-moment';
@Component({
moduleId: module.id,
selector: 'couple-informations',
templateUrl: 'couple-informations.component.html',
styleUrls: ['./couple-informations.component.scss']
})
export class CoupleInformationsComponent {
private activeWedding: Wedding;
public weddingId: string;
public wedding: Wedding;
public partners: Array<any>;
public events: Array<any>;
constructor(
private store: Store<State>,
private weddingService: WeddingService,
private changeDetector: ChangeDetectorRef,
) {
}
ngOnInit(): void {
console.log("couple profile Information ngOnit");
// console.log(Config.activeWedding);
this.activeWedding = Config.activeWedding;
if( Config.activeWedding ) {
this.weddingId = Config.activeWedding.id;
this.getWeddingDetails(this.weddingId);
}
}
getWeddingDetails(weddingId) {
this.weddingService.getWedding({
weddingId: weddingId
}).subscribe(response => {
console.log(response);
this.wedding = response.result;
this.weddingService.getWeddingPartners({weddingId}).subscribe(
(res) => {
this.partners = res.result;
this.changeDetector.markForCheck();
}
);
this.weddingService.getWeddingEvents({weddingId}).subscribe(
(res) => {
console.log(res);
this.events = res.result;
this.changeDetector.markForCheck();
}
);
}, error => {
console.log(error);
});
}
}
<file_sep>/nativescript-app/app/shared/types/models/social-feed.ts
export interface Post {
id: string;
text: string;
allowComments: boolean;
commentsCount: number;
likesCount: number;
wedding: {
id: string;
name: string;
avatar: string;
};
photos: object[];
comments?: object[];
createdAt: string;
updatedAt: string;
}
export interface Comment {
id: string;
postId: string;
text: string;
asWedding: boolean;
author: {
id: string;
account: {
id: string;
firstName: string;
lastName: string;
avatar: string;
},
wedding: {
id: string;
name: string;
avatar: string;
};
}
createdAt: string;
updatedAt: string
}
export interface Photo {
id: string;
weddingId: string;
filename: string;
createdAt: string;
}<file_sep>/nativescript-app/app/shared/main.routing.ts
import { AccountsettingsComponent } from '~/modules/auth/components';
import { socialFeedRouting } from '~/modules/social-feed/social-feed.routing';
import { tasksRouting } from '~/modules/tasks/tasks.routing';
import { weddingRouting } from '~/modules/wedding/wedding.routing';
import { profileCreateRouting } from '~/shared/components/create-profile/create-profile.routing';
import { marketplaceRouting } from '~/modules/marketplace/marketplace.routing';
import { ConversationsComponent, LoggedInAppComponent, NotificationsComponent } from '~/shared/components';
export const mainRouting = [
{
path: 'app',
component: LoggedInAppComponent,
children: [
...marketplaceRouting,
...tasksRouting,
...profileCreateRouting,
...weddingRouting,
...socialFeedRouting,
{
path: 'notifications',
component: NotificationsComponent
},
{
path: 'conversations',
component: ConversationsComponent,
},
{
path: 'account-settings',
component: AccountsettingsComponent
},
]
}
];<file_sep>/spa/src/app/root-store/member-store/effects.ts
import { FlashMessagesService } from 'angular2-flash-messages';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { of } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators';
import { environment } from '../../../environments/environment';
import { ConfirmDialogComponent } from "../../shared/confirm-dialog/confirm-dialog.component";
import {
MemberActionTypes,
} from './actions';
import { MemberService } from '../services/member.service';
@Injectable()
export class MemberEffects {
constructor(
private actions$: Actions,
private memberService: MemberService,
private _flashMessagesService: FlashMessagesService,
private modalService: NgbModal
) { }
}
<file_sep>/nativescript-app/app/shared/components/create-profile/vendor/profile/create-vendor-profile.component.ts
import { Component, EventEmitter, Output, OnInit } from '@angular/core';
import { VendorService } from '~/shared/services/vendor.service';
import { Config } from '~/shared/configs';
@Component({
moduleId: module.id,
selector: 'create-vendor-profile',
templateUrl: 'create-vendor-profile.component.html',
styleUrls: ['../../create-profile-base.component.scss']
})
export class CreateVendorProfileComponent implements OnInit {
@Output() nextStepEvent: EventEmitter<any> = new EventEmitter();
public rates: Array<any> = [
'Inexpensive',
'Affordable',
'Moderate',
'Expensive',
];
public values: any = {
avatar:'',
name:'',
description:'',
category: {
id: null
},
rate: '',
address: '',
lng: '',
lat: '',
contacts: {
phone: {
type: 'phone',
value: null,
isPublic: false
},
email: {
type: 'email',
value: null,
isPublic: false
}
}
};
vendorCategories: any = [];
constructor(
private vendorService: VendorService,
) {
}
ngOnInit(): void {
Config.previousUrl = 'vendor';
this.vendorService.getVendorCategories().toPromise().then(response => {
console.log("get vendor categories");
// console.log(response.result);
for( var i = 0; i < response.result.length;i++){
this.vendorCategories.push(response.result[i].name);
}
});
}
public nextStep(): void {
this.nextStepEvent.next(this.values);
console.log(this.values);
}
// public setValue(valueName: string, value: any): void {
// this.values[valueName] = value;
// }
public setValue(valueName: string, element: any, useParam?: string): void {
this.values[valueName] = useParam ? element[useParam] : element;
}
public setContactValue(valueName: string, element: any, useParam?: string): void {
console.log("set value : ", valueName);
this.values.contacts[valueName].value = useParam ? element[useParam] : element;
}
setPublicContacts(valueName:string, event){
this.values.contacts[valueName].isPublic = event;
}
setCategory(event){
console.log(event);
for( var i = 0; i < this.vendorCategories.length; i++ ) {
if ( this.vendorCategories[i] == event ) {
this.values.category.id = i+1;
}
}
}
setRate(event){
console.log(event);
for( var i = 0; i < this.rates.length; i++ ) {
if ( this.rates[i] == event ) {
this.values.rate = i+1;
}
}
}
public setEventLocation(location: any): void {
// const event = this.values.events[eventIterator];
// event.place_name = location.name;
console.log("Location :",location);
if( location != null ) {
this.values.address = location.formatted_address;
if( location.geometry != null ) {
this.values.lng = location.geometry.location.lng;
this.values.lat = location.geometry.location.lat;
}
}
}
}
<file_sep>/nativescript-app/app/shared/components/upload-photo/upload-photo.component.ts
import { Component, EventEmitter, Output, Input } from '@angular/core';
import { ModalService } from '~/shared/services';
import { UploadModal } from '~/shared/modals';
@Component({
moduleId: module.id,
selector: 'upload-photo',
templateUrl: 'upload-photo.component.html',
styleUrls: ['./upload-photo.component.scss']
})
export class UploadPhotoComponent {
@Input() src: string;
@Output() photoSelected: EventEmitter<any> = new EventEmitter();
selectedUrl:string;
constructor(
private modalService: ModalService,
) {
}
ngOnInit() {
this.selectedUrl = this.src;
}
public getPicture(): void {
this.modalService.showModal(UploadModal, {}).then(
(url: string) => {
this.selectedUrl = url;
this.photoSelected.next(url);
}
)
}
}
<file_sep>/nativescript-app/app/shared/modals/add-member/index.ts
export * from './add-member.modal';<file_sep>/spa/src/app/modules/vendor-form/vendor-form.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { NgSelectModule } from '@ng-select/ng-select';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { LayoutModule } from '../../core/layout/layout.module';
import { MatIconModule } from '@angular/material';
import { SharedModule } from '../../shared/shared.module';
import { VendorFormComponent } from './vendor-form.component';
import { VendorFormBasicInfoComponent } from './components/basic-info/basic-info.component';
import { VendorFormPhotosComponent } from './components/photos/photos.component';
import { VendorFormProductsComponent } from './components/products/products.component';
import { VendorFormPaymentComponent } from './components/payment/payment.component';
import { AvatarModule } from '../../shared/avatar/avatar.module';
import { ImageInputModule } from '../../shared/image-input/image-input.module';
import { GooglePlaceModule } from "ngx-google-places-autocomplete";
import { Ng2TelInputModule } from 'ng2-tel-input';
import { NgxBraintreeModule } from 'ngx-braintree';
import { routing } from './vendor-form.routing';
import { StoreModule } from '@ngrx/store';
@NgModule({
imports: [
routing,
CommonModule,
NgbModule.forRoot(),
LayoutModule,
FormsModule,
NgSelectModule,
MatIconModule,
AvatarModule,
SharedModule,
ImageInputModule,
GooglePlaceModule,
Ng2TelInputModule,
NgxBraintreeModule
],
declarations: [
VendorFormComponent,
VendorFormBasicInfoComponent,
VendorFormPhotosComponent,
VendorFormProductsComponent,
VendorFormPaymentComponent
],
exports: [
VendorFormComponent
]
})
export class VendorFormModule { }
<file_sep>/spa/src/app/modules/settings/components/wedding/wedding-info/index.ts
export * from './wedding-info.component';
<file_sep>/spa/src/app/modules/settings/components/wedding/wedding-events/wedding-events.component.html
<div class="position-relative">
<h4 class="strong mt-4">{{ 'Events' | translate }}</h4>
<button class="btn btn-primary"
*ngIf="(addEvent[0] && !editActive[0]) || (addEvent[1] && !editActive[1])"
(click)="showCreateEvent()">
{{ 'Create event' | translate }}
</button>
</div>
<span *ngIf="loading">
{{ 'Loading' | translate }}...
</span>
<div *ngFor="let event of events; let i = index" class="edit-row">
<div class="edit-row__edit-btn"
*ngIf="!editActive[i] && event.type"
(click)="editRow(i)">
<mat-icon svgIcon="pencil"></mat-icon>
{{ 'Edit' | translate }}
</div>
<dl class="row" *ngIf="!editActive[i] && event.type">
<dt class="col-sm-3 text-sm-right">
{{ 'Type' | translate }}
</dt>
<dd class="col-sm-9 text-capitalize">
{{event.type | translate}}
</dd>
<dt class="col-sm-3 text-sm-right">{{ 'Location' | translate }}</dt>
<dd class="col-sm-9">
<strong>{{event.placeName}}</strong><br>
{{event.address}}
</dd>
<dt class="col-sm-3 text-sm-right">
{{ 'Date' | translate }}
</dt>
<dd class="col-sm-9">
{{event.date | amDateFormat:'lll'}}
</dd>
</dl>
<form *ngIf="editActive[i]">
<div class="d-flex flex-row align-items-center wedding-form-row">
<label class="col-sm-3 text-sm-right edit-row__label ">
{{ 'Type' | translate }}
</label>
<select [(ngModel)]="form[i].type"
name="role"
class="form-control">
<option [value]="'reception'">{{ 'Reception' | translate }}</option>
<option [value]="'ceremony'">{{ 'Ceremony' | translate }}</option>
</select>
</div>
<div class="d-flex flex-row align-items-center wedding-form-row">
<label class="col-sm-3 text-sm-right edit-row__label">
{{ 'Location' | translate }}
</label>
<input ngx-google-places-autocomplete
name="event_{{i}}_location"
(onAddressChange)="handleAddressChange($event, i)"
class="form-control" placeholder="{{ 'Enter a location' | translate }}">
</div>
<div class="d-flex flex-row align-items-center wedding-form-row">
<label class="col-sm-3 text-sm-right edit-row__label">
{{ 'Date' | translate }}
</label>
<input class="form-control"
name="date"
[min]="minDate"
[(ngModel)]="form[i]['date']"
[owlDateTime]="dt1"
[owlDateTimeTrigger]="dt1"
placeholder="{{ 'Click to select a date' | translate }}">
<owl-date-time #dt1></owl-date-time>
</div>
<div class="d-flex flex-row align-items-center justify-content-center mt-3">
<button class="btn btn-danger mr-2" *ngIf="!addEvent[i]" (click)="cancelEdit(i)">
{{ 'Cancel' | translate }}
</button>
<button class="btn btn-primary" (click)="submit(i)">
<span *ngIf="!addEvent[i]">{{ 'Submit' | translate }}</span>
<span *ngIf="addEvent[i]">{{ 'Create' | translate }}</span>
</button>
</div>
</form>
<hr *ngIf="i === 0 && ( (!editActive[0] && !editActive[1] && event.type) || (editActive[0] && editActive[1]) )">
</div>
<file_sep>/nativescript-app/app/shared/modals/list-select/index.ts
export * from './list-select.modal';<file_sep>/nativescript-app/app/modules/marketplace/marketplace.routing.ts
import {
MarketplaceListComponent,
FiltersComponent,
DetailComponent,
} from '~/modules/marketplace/components';
export const marketplaceRouting = [
{
path: 'marketplace-list',
component: MarketplaceListComponent,
},
{
path: 'filters',
component: FiltersComponent,
},
{
path: 'detail',
component: DetailComponent,
}
];<file_sep>/nativescript-app/app/root-store/auth-store/effects.ts
import { Injectable } from '@angular/core';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { Store } from '@ngrx/store';
import { RouterExtensions } from 'nativescript-angular';
import { of } from 'rxjs/observable/of';
import { catchError, concatMap, exhaustMap, map, tap } from 'rxjs/operators';
import * as applicationSettings from 'tns-core-modules/application-settings';
import { State, ProfileSelectors } from '~/root-store';
import { GetWeddings } from '~/root-store/wedding-store/actions';
import {
AuthActionTypes,
GetAuthInfo,
GetAuthInfoFailure,
GetAuthInfoSuccess,
Logout,
LogoutSuccess,
LogoutFailure
} from './actions';
import { AuthService } from '~/shared/services/auth.service';
import { selectActiveWedding } from '../wedding-store/selectors';
import { WeddingService } from '../../shared/services/wedding.service';
import { Config } from '~/shared/configs';
import { ISubscription } from 'rxjs/Subscription';
import { ProfileService } from '~/shared/services/profile.service';
@Injectable()
export class AuthEffects {
subActiveProfile: ISubscription;
constructor(
private actions$: Actions,
private authService: AuthService,
private weddingService: WeddingService,
private routerExt: RouterExtensions,
private store: Store<State>,
private profileService: ProfileService,
) { }
@Effect({ dispatch: false })
login = this.actions$.pipe(
ofType<GetAuthInfo>(AuthActionTypes.LOGIN),
tap(() =>
{
this.store.dispatch(new GetAuthInfo());
// this.weddingService.getWeddingsID();
this.routerExt.navigate(['/app', 'social-feed']);
}
)
);
@Effect()
getAuthInfo$ = this.actions$.pipe(
ofType<GetAuthInfo>(AuthActionTypes.GET_AUTH_INFO),
exhaustMap(() =>
this.authService
.getAccountInfo()
.pipe(
concatMap((response) => {
// console.log("Get Auth Info");
// console.log(response);
Config.authInfo = response.result.account;
this.profileService.initProfiles();
this.subActiveProfile = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
Config.activeProfile = activeProfile;
console.log("Active Profile: " + activeProfile);
if (!activeProfile) {
console.log("Config authinfo: ");
console.log(Config.authInfo);
if( Config.authInfo && ( Config.authInfo.accountType.name == 'couple' ||
Config.authInfo.accountType.name == 'vendor') ){
this.routerExt.navigate(['/app', Config.authInfo.accountType.name]);
}
else {
console.log("go to social feed");
// this.routerExt.navigate(['/app', 'social-feed']);
}
}
else {
console.log("go to social feed");
// this.routerExt.navigate(['/app', 'social-feed']);
}
});
return [
new GetAuthInfoSuccess(response.result),
new GetWeddings(),
]
}),
catchError(error => of(new GetAuthInfoFailure(error)))
)
)
);
@Effect()
logout$ = this.actions$.pipe(
ofType<Logout>(AuthActionTypes.LOGOUT),
exhaustMap(() =>
this.authService
.logout()
.pipe(
map(response => new LogoutSuccess()),
catchError(error => of(new LogoutFailure()))
)
)
);
@Effect({ dispatch: false })
logoutSuccess$ = this.actions$.pipe(
ofType<LogoutSuccess>(AuthActionTypes.LOGOUT_SUCCESS),
tap(authed => {
applicationSettings.remove('jwt');
this.routerExt.navigate(['/welcome'])
})
)
}
<file_sep>/nativescript-app/app/modules/auth/components/set-password/index.ts
export * from './set-password.component';<file_sep>/spa/src/app/modules/messages-manager/messages-manager.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { SharedModule } from '../../shared/shared.module';
import { MatIconModule } from '@angular/material';
import { InfiniteScrollModule } from 'angular2-infinite-scroll';
import { TextareaAutosizeModule } from 'ngx-textarea-autosize';
import { MessagesManagerComponent } from './messages-manager.component';
import { MessagesConversationComponent } from './components/conversation/conversation.component';
import { routing } from './messages-manager.routing';
import { LayoutModule } from '../../core/layout/layout.module';
@NgModule({
imports: [
CommonModule,
RouterModule,
routing,
LayoutModule,
SharedModule,
MatIconModule,
InfiniteScrollModule,
TextareaAutosizeModule
],
declarations: [
MessagesManagerComponent,
MessagesConversationComponent
],
exports: [
MessagesManagerComponent
]
})
export class MessagesManagerModule { }
<file_sep>/spa/src/app/modules/messages-manager/messages-manager.component.ts
import { Component, OnInit, OnDestroy } from '@angular/core';
import { ISubscription } from 'rxjs/Subscription';
import { Router, ActivatedRoute } from '@angular/router';
import { SioService } from '../../root-store/services/sio.service';
import { MessageService } from '../../root-store/services/message.service';
import { Store } from '@ngrx/store';
import { Observable } from "rxjs/Observable";
import {
RootStoreState,
ProfileActions,
ProfileSelectors,
MessageActions,
MessageSelectors
} from '../../root-store';
@Component({
selector: 'app-messages-manager',
templateUrl: './messages-manager.component.html',
styleUrls: ['./messages-manager.component.sass']
})
export class MessagesManagerComponent implements OnInit, OnDestroy {
activeProfile: any;
activeProfileSubscription: ISubscription;
routeSubscription: ISubscription;
sioSubscription: ISubscription;
conversationsSubscription: ISubscription;
infiniteScrollSubscription: ISubscription;
conversations: any[] = [];
loading: boolean = false;
infiniteScroll: object;
activeConversationIdSubscription: ISubscription;
activeConversationId: string;
constructor(
private route: ActivatedRoute,
private router: Router,
private store: Store<RootStoreState.State>,
private messageService: MessageService,
private sioService: SioService
) { }
async ngOnInit() {
this.conversations = [];
this.activeProfileSubscription = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
this.activeProfile = activeProfile;
});
this.infiniteScrollSubscription = this.store.select(
MessageSelectors.selectInfiniteScroll
).subscribe(infiniteScroll => {
this.infiniteScroll = infiniteScroll;
});
this.conversationsSubscription = this.store.select(
MessageSelectors.selectConversations
).subscribe(conversations => {
this.conversations = conversations;
if (!this.route.firstChild && this.conversations.length) {
this.router.navigate(['messages', this.conversations[0].id]);
}
});
this.activeConversationIdSubscription = this.store.select(
MessageSelectors.selectActiveConversationId
).subscribe(activeConversationId => {
setTimeout(() => {
this.activeConversationId = activeConversationId;
});
});
}
ngOnDestroy() {
this.activeProfileSubscription.unsubscribe();
this.activeConversationIdSubscription.unsubscribe();
this.infiniteScrollSubscription.unsubscribe();
}
async getConversations(page) {
page++;
this.loading = true;
await this.messageService.getConversations(page)
.toPromise().then(response => {
this.loading = false;
this.store.dispatch(new MessageActions.AppendConversations({
conversations: response.result,
infiniteScroll: {
page: page,
disabled: response.result.length == 0 ? true : false
}
}));
});
}
}
<file_sep>/nativescript-app/app/shared/components/create-profile/vendor/products/index.ts
export * from './create-vendor-products.component';<file_sep>/nativescript-app/app/root-store/profile-store/selectors.ts
import {
createFeatureSelector,
createSelector,
MemoizedSelector
} from '@ngrx/store';
import { Profile } from '../common-models';
import { State } from './state';
const getActiveProfile = (state: State): any => state.activeProfile;
const getProfiles = (state: State): any => state.profiles;
export const selectProfileState: MemoizedSelector<object, State> = createFeatureSelector<State>('profile');
export const selectActiveProfile: MemoizedSelector<object, Profile | null> = createSelector(selectProfileState, getActiveProfile);
export const selectProfiles: MemoizedSelector<object, Profile | null> = createSelector(selectProfileState, getProfiles);
<file_sep>/nativescript-app/app/shared/components/conversations/conversations.component.ts
import { Component, OnDestroy, OnInit } from '@angular/core';
import { screen } from 'tns-core-modules/platform';
import { ISubscription } from 'rxjs/Subscription';
import { Observable } from 'rxjs/Observable';
import { Store } from '@ngrx/store';
import { RootStoreState, ProfileSelectors, MessageSelectors, MessageActions } from '~/root-store';
import { MessageService } from '~/shared/services/message.service';
import { delay } from 'rxjs/operators';
@Component({
moduleId: module.id,
selector: 'conversations',
templateUrl: 'conversations.component.html',
styleUrls: ['./conversations.component.scss']
})
export class ConversationsComponent implements OnInit, OnDestroy{
public containerHeight;
activeConversationId: string;
activeProfile: any;
activeProfileSubscription: ISubscription;
infiniteScrollSubscription: ISubscription;
// unreadMessagesCount: Observable<number>;
conversations = [];
loading: boolean;
infiniteScroll: object;
constructor(
private store: Store<RootStoreState.State>,
private messageService: MessageService) {
this.containerHeight = screen.mainScreen.heightDIPs - 220; // Topbar height + some margin (bottom clear all bar)
}
ngOnInit() {
this.activeProfileSubscription = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
this.activeProfile = activeProfile;
});
// this.unreadMessagesCount = this.store.select(
// MessageSelectors.selectUnreadMessagesCount
// ).pipe(delay(0));
this.store.select(
MessageSelectors.selectConversations
).subscribe(conv => {
this.conversations = conv;
console.log("converations: ");
console.log(conv);
})
this.infiniteScrollSubscription = this.store.select(
MessageSelectors.selectInfiniteScroll
).subscribe(infiniteScroll => {
this.infiniteScroll = infiniteScroll;
});
}
ngOnDestroy() {
this.activeProfileSubscription.unsubscribe();
this.infiniteScrollSubscription.unsubscribe();
}
getConversations(page) {
page++;
this.loading = true;
this.messageService.getConversations(page)
.toPromise().then(response => {
this.loading = false;
this.store.dispatch(new MessageActions.AppendConversations({
conversations: response.result,
infiniteScroll: {
page: page,
disabled: response.result.length == 0 ? true : false
}
}));
});
}
}
<file_sep>/spa/src/app/root-store/root-store.state.ts
import { AuthState } from './auth-store';
import { MemberState } from './member-store';
import { TaskState } from './task-store';
import { ProfileState } from './profile-store';
import { MessageState } from './message-store';
export interface State {
auth: AuthState.State;
member: MemberState.State;
task: TaskState.State;
profile: ProfileState.State;
message: MessageState.State;
}
<file_sep>/spa/src/app/root-store/auth-store/effects.ts
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { of } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators';
import { CookieService } from 'angular2-cookie/core';
import { environment } from '../../../environments/environment';
import {
AuthActionTypes,
GetAuthInfo,
GetAuthInfoFailure,
GetAuthInfoSuccess,
Logout,
LogoutSuccess,
LogoutFailure
} from './actions';
import { AuthService } from '../services/auth.service';
@Injectable()
export class AuthEffects {
constructor(
private actions$: Actions,
private authService: AuthService,
private router: Router,
private cookies: CookieService
) { }
private webUrl: string = environment.webUrl;
@Effect()
getAuthInfo$ = this.actions$.pipe(
ofType<GetAuthInfo>(AuthActionTypes.GET_AUTH_INFO),
exhaustMap(() =>
this.authService
.getAccountInfo()
.pipe(
map(response => new GetAuthInfoSuccess(response.result)),
catchError(error => of(new GetAuthInfoFailure(error)))
)
)
);
@Effect()
logout$ = this.actions$.pipe(
ofType<Logout>(AuthActionTypes.LOGOUT),
exhaustMap(() =>
this.authService
.logout()
.pipe(
map(response => new LogoutSuccess()),
catchError(error => of(new LogoutFailure()))
)
)
);
@Effect({ dispatch: false })
logoutSuccess$ = this.actions$.pipe(
ofType<any>(AuthActionTypes.LOGOUT_SUCCESS, AuthActionTypes.GET_AUTH_INFO_FAILURE),
tap(authed => {
this.cookies.remove('jwt');
window.location.replace(this.webUrl + '/login');
})
);
}
<file_sep>/nativescript-app/app/root-store/task-store/effects.ts
import { Injectable } from '@angular/core';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { of } from 'rxjs/observable/of';
import { catchError, exhaustMap, map, tap, withLatestFrom } from 'rxjs/operators';
import { Store } from '@ngrx/store';
import { DialogType } from '~/shared/types/enum';
import { State } from '../../root-store';
import {
TaskActionTypes,
NoEffect,
GetTasks,
GetTasksSuccess,
AddTask,
AddTaskFailure,
GetTaskDetails,
GetTaskDetailsSuccess,
GetTaskDetailsFailure,
DeleteTask,
DeleteTaskConfirm,
DeleteTaskSuccess,
DeleteTaskFailure,
EditTask,
EditTaskSuccess,
EditTaskFailure,
GetTaskStatsSuccess,
SetTaskStatus,
SetTaskStatusSuccess,
} from './actions';
import { DialogsService, TaskService } from '~/shared/services';
declare const confirm: any;
@Injectable()
export class TaskEffects {
constructor(
private actions$: Actions,
private taskService: TaskService,
private store: Store<State>,
private dialogsService: DialogsService
) { }
private truncate(text: string): string {
if (text.length > 40) {
let limit = text.substr(0, 40).lastIndexOf(' ');
text = text.substr(0, limit) + ' ...';
}
return text;
};
@Effect()
getTasks$ = this.actions$.pipe(
ofType<GetTasks>(TaskActionTypes.GET_TASKS),
exhaustMap(action =>
this.taskService
.getTasks({ weddingId: action.payload.weddingId })
.pipe(
map((response: any) => {
return new GetTasksSuccess({
tasks: response.result
})
})
)
)
);
@Effect()
addTask$ = this.actions$.pipe(
ofType<AddTask>(TaskActionTypes.ADD_TASK),
exhaustMap(action => {
let task = action.payload.task;
return this.taskService
.addTask({
weddingId: action.payload.weddingId,
task: task
})
.pipe(
map((response: any) => {
this.dialogsService.showDialog(
{
type: DialogType.Success,
message: 'Task added successfully'
}
);
return new GetTasks({weddingId: action.payload.weddingId})
}),
catchError(error => of(new AddTaskFailure({ error: error.error })))
)
})
);
@Effect()
getTaskDetails$ = this.actions$.pipe(
ofType<GetTaskDetails>(TaskActionTypes.GET_TASK_DETAILS),
exhaustMap(action =>
this.taskService
.getTask({ weddingId: action.payload.weddingId, taskId: action.payload.taskId })
.pipe(
map((response: any) => new GetTaskDetailsSuccess({
task: response.result
})),
catchError(error => of(new GetTaskDetailsFailure({ error: error.error })))
)
)
);
@Effect({ dispatch: false })
deleteTaskConfirm$ = this.actions$.pipe(
ofType<DeleteTaskConfirm>(TaskActionTypes.DELETE_TASK_CONFIRM),
tap(action => {
const options: any = {
title: action.payload.title,
message: action.payload.text,
okButtonText: 'Ok',
cancelButtonText: 'No',
};
confirm(options).then((result: boolean) => {
if (result) {
this.store.dispatch(action.payload.confirm);
}
});
})
);
@Effect()
deleteTask$ = this.actions$.pipe(
ofType<DeleteTask>(TaskActionTypes.DELETE_TASK),
exhaustMap(action => {
return this.taskService
.deleteTask({
weddingId: action.payload.weddingId,
taskId: action.payload.taskId
})
.pipe(
map(response => {
this.dialogsService.showDialog(
{
type: DialogType.Success,
message: 'Task deleted successfully'
}
);
return new DeleteTaskSuccess({
weddingId: action.payload.weddingId,
taskId: action.payload.taskId
})
}),
catchError(error => of(new DeleteTaskFailure({ error: error.error })))
)
})
);
@Effect()
changeTaskStatusSuccess$ = this.actions$.pipe(
ofType<any>(TaskActionTypes.TOGGLE_TASK_DETAILS, TaskActionTypes.CHANGE_TASK_STATUS_SUCCESS),
withLatestFrom(this.store),
map(([action, store]) => {
let taskId = action.payload.taskId;
if (store.task.ui.taskDetails[taskId]) {
return new GetTaskDetails({
weddingId: action.payload.weddingId,
taskId: taskId
});
} else {
return new NoEffect();
}
})
);
@Effect()
setTaskStatus = this.actions$.pipe(
ofType<SetTaskStatus>(TaskActionTypes.SET_TASK_STATUS),
exhaustMap(action => {
return this.taskService.setTaskStatus(action.payload)
.pipe(
map(response => {
this.dialogsService.showDialog(
{
type: DialogType.Success,
message: 'Task status updated'
}
);
return new SetTaskStatusSuccess({
weddingId: action.payload.weddingId,
taskId: action.payload.taskId,
status: action.payload.status
});
}),
catchError(err => of(new NoEffect()))
)
})
);
@Effect()
editTask$ = this.actions$.pipe(
ofType<EditTask>(TaskActionTypes.EDIT_TASK),
exhaustMap(action => {
let task = action.payload.task;
return this.taskService
.editTask({
weddingId: action.payload.weddingId,
task: task
})
.pipe(
map(response => {
this.dialogsService.showDialog(
{
type: DialogType.Success,
message: 'Task updated successfully'
}
);
return new EditTaskSuccess({
weddingId: action.payload.weddingId,
task: task
})
}),
catchError(error => of(new EditTaskFailure({ error: error.error })))
)
})
);
@Effect()
getTaskStats$ = this.actions$.pipe(
ofType<any>(
TaskActionTypes.GET_TASK_STATS,
TaskActionTypes.ADD_TASK_SUCCESS,
TaskActionTypes.DELETE_TASK_SUCCESS,
TaskActionTypes.CHANGE_TASK_STATUS_SUCCESS,
TaskActionTypes.CHANGE_TASK_STATUS_SUCCESS
),
exhaustMap(action =>
this.taskService
.getTaskStats({ weddingId: action.payload.weddingId })
.pipe(
map((response: any) => new GetTaskStatsSuccess({
stats: response.result
}))
)
)
);
}
<file_sep>/spa/src/app/root-store/member-store/reducers.ts
import { Action } from '@ngrx/store';
import { MemberActions, MemberActionTypes } from './actions';
import { initialState, State } from './state';
export function reducer(state = initialState, action: MemberActions) {
let index;
switch (action.type) {
case MemberActionTypes.SET_MEMBERS:
return {
...state,
members: action.payload.members
};
case MemberActionTypes.CHANGE_MEMBER_ROLE:
let updatedMembers = state.members.map((item, index) => {
if (item.id !== action.payload.memberId) {
return item;
}
return {
...item,
role: action.payload.role
};
});
return {
...state,
members: updatedMembers
};
case MemberActionTypes.DELETE_MEMBER:
updatedMembers = state.members.filter((member) => {
return member.id !== action.payload.memberId;
})
return {
...state,
members: updatedMembers
};
default:
return state;
}
}
<file_sep>/spa/src/environments/environment.staging.ts
export const environment = {
production: true,
apiUrl: 'https://api.staging-c01.muulabs.pl/v1',
webUrl: 'https://staging-c01.muulabs.pl',
cdnUrl: 'https://storage.googleapis.com/wedding-app-staging',
sioUrl: 'https://sio.staging-c01.muulabs.pl',
imageMinWidth: 200,
imageMinHeight: 200,
vendorProfilePrice: 129
};
<file_sep>/nativescript-app/app/shared/components/dialogs/dialogs.component.ts
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
OnDestroy,
OnInit
} from '@angular/core';
import { Subscription } from 'rxjs/Subscription';
import * as _ from 'lodash';
import { Dialog } from '~/shared/types/models';
import { DialogsService } from '~/shared/services/dialogs.service';
@Component({
moduleId: module.id,
selector: 'dialogs-display',
templateUrl: 'dialogs.component.html',
styleUrls: ['./dialogs.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class DialogsComponent implements OnDestroy, OnInit {
public dialogs: Array<Dialog> = [];
private dialogsSubscription: Subscription;
constructor(
private dialogsService: DialogsService,
private changeDetector: ChangeDetectorRef
) { }
ngOnInit(): void {
this.dialogsSubscription = this.dialogsService.dialog$.subscribe((newDialog: Dialog) => {
this.dialogs.push(newDialog);
this.changeDetector.markForCheck();
setTimeout(() => {
this.dialogs = _.filter(this.dialogs, (dialog: Dialog) => {
return dialog.id !== newDialog.id;
});
this.changeDetector.markForCheck();
}, 5000);
})
}
ngOnDestroy(): void {
this.dialogsSubscription.unsubscribe();
}
public removeDialog(id: number): void {
this.dialogs = _.filter(this.dialogs, (dialog: Dialog) => {
return dialog.id !== id;
});
console.log(this.dialogs);
this.changeDetector.markForCheck();
}
}
<file_sep>/spa/src/app/modules/vendor-form/vendor-form.component.html
<app-layout>
<div class="content-box">
<h3 class="text-center">
<span *ngIf="mode == 'create'">{{ 'Create' | translate }}</span>
<span *ngIf="mode == 'edit'">{{ 'Edit' | translate }}</span> {{ 'vendor profile' | translate }}</h3>
<form-progress [steps]="steps" [activeStep]="activeStep"></form-progress>
<div class="row justify-content-md-center">
<div class="col-sm-9">
<div class="alert alert-danger" *ngIf="error">
{{error.title | translate}}
</div>
<form (ngSubmit)="submitBasicInfo()" *ngIf="activeStep == 1" #formStep1="ngForm">
<vendor-form-basic-info [mode]="mode" [model]="vendor" [parentForm]="formStep1" [parentFormData]="basicInfoFormData"></vendor-form-basic-info>
<hr>
<button class="btn btn-lg btn-primary float-right" type="submit" [disabled]="formStep1.invalid || submitted">
<span *ngIf="!submitted">{{ 'Next step' | translate }}</span><span *ngIf="submitted">{{ 'Saving' | translate }}...</span>
</button>
</form>
<vendor-form-photos *ngIf="activeStep == 2" [mode]="mode" (setStep)="setStep($event)"></vendor-form-photos>
<vendor-form-products *ngIf="activeStep == 3" [mode]="mode" (setStep)="setStep($event)"></vendor-form-products>
<vendor-form-payment *ngIf="activeStep == 4" [mode]="mode" (setStep)="setStep($event)"></vendor-form-payment>
<div *ngIf="activeStep == 5" class="my-5 text-center">
<h3 class="text-success">{{ 'Congratulations!' | translate }}</h3>
<p>{{ 'Your vendor profile has been successfully' | translate }} <span *ngIf="mode == 'edit'">{{ 'edited' | translate }}</span><span *ngIf="mode == 'create'">{{ 'created and activated' | translate }}</span></p>
<a [routerLink]="['/vendor', activeProfile.id]" class="btn btn-primary mt-3">{{ 'Go to your vendor profile' | translate }}</a>
</div>
</div>
</div>
</div>
</app-layout>
<file_sep>/nativescript-app/app/shared/components/conversations/index.ts
export * from './conversations.component';<file_sep>/spa/src/app/modules/marketplace/marketplace.component.ts
import { Component, OnInit, AfterViewInit } from '@angular/core';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ProfilingTestComponent } from './components/profiling-test/profiling-test.component';
import { VendorService } from '../../root-store/services/vendor.service';
import * as geolib from 'geolib';
@Component({
selector: 'app-marketplace',
templateUrl: './marketplace.component.html',
styleUrls: ['./marketplace.component.sass']
})
export class MarketplaceComponent implements OnInit, AfterViewInit {
vendors: any;
defaultFilters: any;
filters: any;
filtersOptions: any;
vendorCategories: any;
page: number;
infiniteScrollDisabled: boolean;
showRecommended: boolean = false;
skipProfilingTest: boolean = false;
profilingTest: any;
constructor(
private modalService: NgbModal,
private vendorService: VendorService
) { }
async ngOnInit() {
this.vendors = [];
this.page = 1;
this.defaultFilters = {
categoryId: undefined,
lat: undefined,
lng: undefined,
rad: undefined,
rating: undefined,
rate: undefined
}
this.filters = Object.assign({}, this.defaultFilters);
this.filtersOptions = [
{
name: 'distance',
title: 'Distance',
modelName: 'rad',
withHeader: false,
showInRecommended: false,
options: [{
value: undefined,
title: '5 kilometers'
}, {
value: 10000,
title: '10 kilometers'
}, {
value: 15000,
title: '15 kilometers'
}, {
value: 25000,
title: '25 kilometers'
}, {
value: 50000,
title: '50 kilometers'
}, {
value: 100000,
title: '100 kilometers'
}]
},
{
name: 'rating',
title: 'Rating',
modelName: 'rating',
withHeader: true,
showInRecommended: true,
options: [{
value: undefined,
title: 'any'
}, {
value: 1,
title: '1 star'
}, {
value: 2,
title: '2 stars'
}, {
value: 3,
title: '3 stars'
}, {
value: 4,
title: '4 stars'
}, {
value: 5,
title: '5 stars'
}]
},
{
name: 'rate',
title: 'Rates',
modelName: 'rate',
withHeader: true,
showInRecommended: true,
options: [{
value: undefined,
title: 'any'
}, {
value: 1,
title: '$ - Inexpensive'
}, {
value: 2,
title: '$$ - Affordable'
}, {
value: 3,
title: '$$$ - Moderate'
}, {
value: 4,
title: '$$$$ - Expensive'
}]
}
];
this.profilingTest = localStorage.getItem('profilingTest') ? JSON.parse(localStorage.getItem('profilingTest')) : false;
this.skipProfilingTest = localStorage.getItem('skipProfilingTest') ? JSON.parse(localStorage.getItem('skipProfilingTest')) : false;
this.showRecommended = localStorage.getItem('showRecommended') ? JSON.parse(localStorage.getItem('showRecommended')) : false;
this.toggleRecommended(this.showRecommended);
this.vendorCategories = await this.vendorService.getVendorCategories().toPromise().then(response => {
return response.result;
});
}
ngAfterViewInit() {
setTimeout(() => {
this.initProfilingTest();
}, 0)
}
async getVendors(reset = false) {
if(reset) {
this.vendors = [];
this.page = 1;
this.infiniteScrollDisabled = false;
}
await this.vendorService.getVendors({ ...this.filters, page: this.page }).toPromise().then(response => {
response.result.map(vendor => {
if(this.isRecommended(vendor)){
vendor.isRecommended = true;
}
return vendor;
})
this.vendors = this.vendors.concat(response.result);
if (response.result.length < 20) {
this.infiniteScrollDisabled = true;
}
});
}
loadMoreVendors() {
this.page++;
this.getVendors();
}
setFilterCoordinates(event) {
this.filters.lat = event.geometry.location.lat();
this.filters.lng = event.geometry.location.lng();
this.getVendors(true);
}
cityInputChange(value) {
if (value == '') {
this.filters.lat = undefined;
this.filters.lng = undefined;
this.getVendors(true);
}
}
openProfilingTestModal() {
let modal;
modal = this.modalService.open(ProfilingTestComponent);
modal.componentInstance['onSubmitEvent'].subscribe((profilingTest) => {
this.profilingTest = profilingTest;
this.toggleRecommended(true);
});
}
initProfilingTest() {
if (!this.profilingTest && !this.skipProfilingTest) {
this.openProfilingTestModal();
}
}
toggleRecommended(value) {
this.showRecommended = value;
localStorage.setItem('showRecommended', JSON.stringify(value));
if (value) {
this.filters = {
...this.filters,
...this.profilingTest
}
} else {
this.filters = Object.assign({}, this.defaultFilters);
}
this.getVendors(true);
}
isRecommended(vendor) {
if (!this.profilingTest) {
return false;
}
if (this.profilingTest.categoryId.indexOf(vendor.category.id) > -1) {
let distance = geolib.getDistance(
{ latitude: this.profilingTest.lat, longitude: this.profilingTest.lng },
{ latitude: vendor.lat, longitude: vendor.lng }
);
if(distance < 10000) {
return true;
}
}
}
}
<file_sep>/nativescript-app/app/shared/modals/upload/index.ts
export * from './upload.modal';<file_sep>/spa/src/app/core/layout/components/profile-selector/profile-selector.component.ts
import { Component, OnInit } from '@angular/core';
import { Observable } from "rxjs/Observable";
import { Store } from '@ngrx/store';
import { Router } from "@angular/router";
import { ProfileService } from '../../../../root-store/services/profile.service';
import {
RootStoreState,
ProfileActions,
ProfileSelectors,
MemberActions,
AuthSelectors
} from '../../../../root-store';
@Component({
selector: 'profile-selector',
templateUrl: './profile-selector.component.html',
styleUrls: ['./profile-selector.component.sass']
})
export class ProfileSelectorComponent implements OnInit {
profiles: any;
activeProfile: any;
authInfo: any;
constructor(
private router: Router,
private store: Store<RootStoreState.State>,
private profileService: ProfileService
) { }
ngOnInit() {
this.store.select(
ProfileSelectors.selectProfiles
).subscribe(profiles => {
this.profiles = profiles;
});
this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
this.activeProfile = activeProfile;
});
this.store.select(
AuthSelectors.selectAuthInfo
).subscribe(authInfo => {
this.authInfo = authInfo;
})
}
async selectProfile(profile: any) {
this.store.dispatch(new ProfileActions.SetActiveProfile({ profile, accountId: this.authInfo.account.id }));
this.profileService.initActiveProfileMembers(profile);
this.router.navigate(['']);
}
}
<file_sep>/nativescript-app/app/root-store/message-store/effects.ts
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { catchError, exhaustMap, map, mapTo, withLatestFrom, concatMapTo, tap } from 'rxjs/operators';
import { Store } from '@ngrx/store';
import {
MessageActionTypes,
UpdateConversationLastMessage,
HandleNewMessage,
AppendNewConversation,
} from './actions';
import { RootStoreState } from '~/root-store';
import { MessageService } from '~/shared/services/message.service';
@Injectable()
export class MessageEffects {
constructor(
private actions$: Actions,
private store: Store<RootStoreState.State>,
private router: Router,
private messageService: MessageService
) { }
@Effect()
handleNewMessage$ = this.actions$.pipe(
ofType<HandleNewMessage>(MessageActionTypes.HANDLE_NEW_MESSAGE),
withLatestFrom(this.store),
exhaustMap(async ([action, store]) => {
let message = action.payload.message;
let conversation = store.message.conversations.filter(value => {
if (value.id == message.conversationId) {
return value;
}
});
if (conversation.length == 0) {
let newConversation = await this.messageService
.getConversation(message.conversationId)
.toPromise()
.then(response => {
return response.result;
});
return new AppendNewConversation({
conversation: newConversation,
self: message.self == 'false' ? false : true
})
} else {
return new UpdateConversationLastMessage({
conversationId: message.conversationId,
lastMessage: {
text: message.shortText,
author: message.authorAccount.firstName + ' ' + message.authorAccount.lastName,
asVendor: message.asVendor == 'false' ? false : true,
createdAt: message.createdAt
}
});
}
})
);
}
<file_sep>/spa/src/app/shared/cdnImage/cdnImage.component.ts
import { Component, Input, OnInit, OnChanges, SimpleChanges, SimpleChange } from '@angular/core';
import { environment } from '../../../environments/environment';
@Component({
selector: 'cdn-image',
templateUrl: './cdnImage.component.html',
styleUrls: ['./cdnImage.component.sass']
})
export class CdnImageComponent implements OnInit, OnChanges {
@Input() filename;
@Input() width;
@Input() height;
@Input() src;
@Input() dir;
@Input() format;
@Input() rounded;
imageSrc: string;
cdnUrl: string;
constructor() { }
getUrl() {
if (this.src) {
this.imageSrc = this.src
return;
}
if (this.filename) {
this.imageSrc = environment.cdnUrl + '/' + (this.dir ? this.dir + '/' : '') + this.filename.replace(/(\.[\w\d_-]+)$/i, '_'+(this.format || 'sq')+'$1');
} else {
this.imageSrc = '/assets/images/avatar-placeholder.png';
}
}
ngOnInit() {
this.getUrl();
}
ngOnChanges(changes: SimpleChanges) {
for(let key in changes) {
this[key] = changes[key].currentValue;
}
this.getUrl();
}
}
<file_sep>/spa/src/app/root-store/services/auth.service.ts
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { CookieService } from 'angular2-cookie/core';
import { environment } from '../../../environments/environment';
import { AuthInfo } from '../auth-store/models';
@Injectable()
export class AuthService {
constructor(
private http: HttpClient,
private cookies: CookieService
) {
}
private apiUrl: string = environment.apiUrl + '/auth';
private apiUrlAccount: string = environment.apiUrl + '/account';
public getToken(): string {
return this.cookies.get('jwt');
}
public clearToken(): void {
this.cookies.remove('jwt');
}
public getAccountInfo(): Observable<any> {
const url = this.apiUrl + '/authenticate';
return this.http.get<AuthInfo>(url);
}
public logout(): Observable<any> {
return this.http.post(this.apiUrl + '/logout', {});
}
public changePassword({password_new, password_new_repeat, password}): Observable<any> {
return this.http.post(`${this.apiUrl}/password/change`, {password_new, password_new_repeat, password});
}
public deleteAccount({password}): Observable<any> {
return this.http.post(`${this.apiUrl}/forget`, {password});
}
public updateAccount(account: any): Observable<any> {
return this.http.patch(this.apiUrlAccount, account);
}
public setAccountAvatar(formData): Observable<any> {
const headers = new HttpHeaders();
headers.append('Content-Type', 'application/form-data');
return this.http.patch(this.apiUrlAccount, formData, {
headers
});
}
}
<file_sep>/spa/src/app/modules/inspirations/inspirations.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { SharedModule } from '../../shared/shared.module';
import { MatIconModule } from '@angular/material';
import { NgSelectModule } from '@ng-select/ng-select';
import { InfiniteScrollModule } from 'angular2-infinite-scroll';
import { NgMasonryGridModule } from 'ng-masonry-grid';
import { TextareaAutosizeModule } from 'ngx-textarea-autosize';
import { InspirationsComponent } from './inspirations.component';
import { InspirationThumbnailComponent } from './components/inspiration-thumbnail/inspiration-thumbnail.component';
import { InspirationDetailsComponent } from './components/inspiration-details/inspiration-details.component';
import { AddInspirationModalComponent } from './components/add-inspiration-modal/add-inspiration-modal.component';
import { InspirationActionsComponent } from './components/inspiration-actions/inspiration-actions.component';
import { routing } from './inspirations.routing';
import { LayoutModule } from '../../core/layout/layout.module';
@NgModule({
imports: [
CommonModule,
RouterModule,
routing,
LayoutModule,
SharedModule,
MatIconModule,
NgSelectModule,
InfiniteScrollModule,
NgMasonryGridModule,
TextareaAutosizeModule
],
declarations: [
InspirationsComponent,
InspirationThumbnailComponent,
InspirationDetailsComponent,
AddInspirationModalComponent,
InspirationActionsComponent
],
entryComponents: [
AddInspirationModalComponent
]
})
export class InspirationsModule { }
<file_sep>/spa/src/app/modules/wedding/components/timeline/timeline.component.ts
import { Component, OnInit, OnDestroy, Inject } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { ISubscription } from 'rxjs/Subscription';
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
import { Post } from '../../../../root-store/common-models';
import { PageScrollConfig, PageScrollService, PageScrollInstance } from 'ngx-page-scroll';
import { PostService } from '../../../../root-store/services/post.service';
import {
CommonModels
} from '../../../../root-store';
@Component({
selector: 'app-wedding-timeline',
templateUrl: './timeline.component.html'
})
export class WeddingTimelineComponent implements OnInit, OnDestroy { // TODO: DRY
objectValues: any;
posts: CommonModels.Post[] | {};
postDetails: CommonModels.Post | null;
page: number;
parentRouteSubscription: ISubscription;
routeSubscription: ISubscription;
resolverSubscription: ISubscription;
routeEventsSubscription: ISubscription;
weddingId: string;
postId: string;
activeProfile: CommonModels.Profile;
infiniteScrollDisabled: boolean;
constructor(
private route: ActivatedRoute,
private router: Router,
private postService: PostService,
private pageScrollService: PageScrollService,
@Inject(DOCUMENT) private document: any
) { }
async ngOnInit() {
this.objectValues = Object.values;
this.parentRouteSubscription = await this.route.parent.params.subscribe(async (params) => {
this.weddingId = params.weddingId;
});
this.routeSubscription = await this.route.params.subscribe(async (params) => {
if (params.postId) {
this.postId = params.postId || null;
this.getPostDetails();
}
});
this.resolverSubscription = this.route.data.subscribe(
data => {
this.activeProfile = data.activeProfile;
}
);
this.routeEventsSubscription = this.router.events.subscribe((e: any) => {
if (e instanceof NavigationEnd) {
this.getPosts({
init: true
});
}
});
this.getPosts({
init: true
});
}
async ngOnDestroy() {
this.parentRouteSubscription.unsubscribe();
this.routeSubscription.unsubscribe();
this.resolverSubscription.unsubscribe();
this.routeEventsSubscription.unsubscribe();
}
appendPost(post) {
this.posts = Object.assign(post, this.posts);
}
async getPosts({ init }) {
if (init) {
this.posts = {};
this.page = 1;
this.infiniteScrollDisabled = false;
}
await this.postService.getPosts({
weddingId: this.weddingId,
page: this.page
}).toPromise().then(response => {
let posts = [];
response.result.forEach(post => {
posts[post.id] = post;
});
if (response.result.length == 0) {
this.infiniteScrollDisabled = true;
}
this.posts = Object.assign(this.posts, posts);
});
}
async getPostDetails() {
await this.postService.getPost({
weddingId: this.weddingId,
postId: this.postId
}).toPromise().then(response => {
this.postDetails = response.result;
setTimeout(() => {
let pageScrollInstance: PageScrollInstance = PageScrollInstance.newInstance({
document: this.document,
scrollTarget: '#post-details',
pageScrollOffset: 100,
pageScrollSpeed: 1200
});
this.pageScrollService.start(pageScrollInstance);
}, 500);
});
}
onScroll(direction) {
let currentPage = this.page;
if (direction == 'down') {
this.page++;
} else if (this.page > 1) {
this.page--;
}
if (currentPage != this.page) {
this.getPosts({
init: false
});
}
}
public removePost(deletePost: Post): void {
this.posts = Object.keys(this.posts)
.filter((key) => {
const val = this.posts[key];
return val.id !== deletePost.id;
})
.reduce((obj, key) => {
obj[key] = this.posts[key];
return obj;
}, {});
}
}
<file_sep>/nativescript-app/app/shared/types/enum/task-status.enum.ts
export enum TaskStatusEnum {
Done = 'done',
Todo = 'to-do'
}<file_sep>/nativescript-app/app/modules/marketplace/components/marketplace/marketplace.component.ts
import { Component, Input, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import { screen } from 'tns-core-modules/platform';
import { RouterExtensions } from 'nativescript-angular/router'; //2018.9.4
import { ModalService } from '~/shared/services';
import { CDN_URL, Config } from '~/shared/configs';
@Component({
moduleId: module.id,
selector: 'marketplace',
templateUrl: 'marketplace.component.html',
styleUrls: ['./marketplace.component.scss']
})
export class MarketplaceComponent implements OnInit{
@Input() marketplace: any;
public showActions: boolean = false;
private containerWidth: number;
private imageSrc;
private mrating;
mratingList = ['any','$ - Inexpensive','$$ - Affordable','$$$ - Moderate','$$$$ - Expensive'];
city = 'Moncton, NB';
constructor(
private modalService: ModalService,
private routerExtensions: RouterExtensions
) {
this.containerWidth = screen.mainScreen.widthDIPs;
// console.log("---marketplace---")
}
ngOnInit() {
// console.log(this.marketplace);
if(this.marketplace.avatar==null) this.imageSrc = '';
else {
this.imageSrc = CDN_URL + '/vendor/' + this.marketplace.id+'/avatars/'+this.marketplace.avatar.replace(/(\.[\w\d_-]+)$/i, '_lg$1');
}
}
public detail_info(): void {
//this.passwordInputRef.nativeElement.dismissSoftInput();
//this.authService.login(this.email, this.password);
Config.marketplaceID = this.marketplace.id;
this.routerExtensions.navigate(['/app', 'detail']); //2018.9.4 This is deleted after screen test
}
}
<file_sep>/nativescript-app/app/root-store/member-store/actions.ts
import { Injectable } from '@angular/core';
import { Action } from '@ngrx/store';
import { Member } from './models';
export enum MemberActionTypes {
SET_MEMBERS = '[MEMBER] Set members',
CHANGE_MEMBER_ROLE = '[MEMBER] Change member role',
DELETE_MEMBER = '[MEMBER] Delete member'
}
export class SetMembers implements Action {
readonly type = MemberActionTypes.SET_MEMBERS;
constructor(public payload: {
members: Member[]
}) { }
}
export class ChangeMemberRole implements Action {
readonly type = MemberActionTypes.CHANGE_MEMBER_ROLE;
constructor(public payload: {
memberId: string,
role: string
}) { }
}
export class DeleteMember implements Action {
readonly type = MemberActionTypes.DELETE_MEMBER;
constructor(public payload: {
memberId: string
}) { }
}
export type MemberActions =
| SetMembers
| ChangeMemberRole
| DeleteMember
<file_sep>/nativescript-app/app/root-store/auth-store/actions.ts
import { Action } from '@ngrx/store';
import { AuthInfo } from './models';
export enum AuthActionTypes {
GET_AUTH_INFO = '[AUTH] Get auth info',
LOGOUT = '[AUTH] Logout',
LOGOUT_SUCCESS = '[AUTH] Logout success',
LOGOUT_FAILURE = '[AUTH] Logout failure',
GET_AUTH_INFO_SUCCESS = '[AUTH] Get auth info success',
GET_AUTH_INFO_FAILURE = '[AUTH] Get auth info failure',
LOGIN = '[AUTH] Login',
}
export class Login implements Action {
readonly type = AuthActionTypes.LOGIN;
}
export class GetAuthInfo implements Action {
readonly type = AuthActionTypes.GET_AUTH_INFO;
}
export class Logout implements Action {
readonly type = AuthActionTypes.LOGOUT;
}
export class LogoutSuccess implements Action {
readonly type = AuthActionTypes.LOGOUT_SUCCESS;
}
export class LogoutFailure implements Action {
readonly type = AuthActionTypes.LOGOUT_FAILURE;
}
export class GetAuthInfoSuccess implements Action {
readonly type = AuthActionTypes.GET_AUTH_INFO_SUCCESS;
constructor(public payload: AuthInfo) { }
}
export class GetAuthInfoFailure implements Action {
readonly type = AuthActionTypes.GET_AUTH_INFO_FAILURE;
constructor(public payload: any) { }
}
export type AuthActions = GetAuthInfo
| Login
| Logout
| LogoutSuccess
| LogoutFailure
| GetAuthInfoSuccess
| GetAuthInfoFailure;
<file_sep>/nativescript-app/app/shared/types/enum/index.ts
export * from './task-status.enum';
export * from './dialog-type.enum';<file_sep>/nativescript-app/app/shared/services/dialogs.service.ts
import { Injectable } from '@angular/core';
import { Subject } from 'rxjs/Subject';
import { Dialog } from '~/shared/types/models/dialog.model';
@Injectable()
export class DialogsService {
public dialog$: Subject<Dialog> = new Subject();
constructor() {}
public showDialog(dialog: Dialog): void {
this.dialog$.next(new Dialog(dialog)); // making new Instance of class Dialog to generate id
}
}<file_sep>/website/src/routes/GuestRoutes.ts
import { Router } from "express";
import { makeClassInvoker } from 'awilix-express';
import GuestController from 'controllers/GuestController';
import authenticate from 'middlewares/authenticate';
import { check } from 'express-validator/check';
export default class GuestRoutes {
router: Router;
controller: Function;
config: any;
constructor({ config, requestService }) {
this.router = Router();
this.controller = makeClassInvoker(GuestController);
this.config = config;
}
getRoutes() {
this.router.get('/guest-invitation/:token', this.controller('getGuestInvitation'));
this.router.post('/guest-invitation/:token', this.controller('postGuestInvitation'));
return this.router;
}
}
<file_sep>/spa/src/app/modules/inspirations/components/inspiration-details/inspiration-details.component.ts
import { Component, OnInit, OnDestroy, Renderer2, Output, EventEmitter } from '@angular/core';
import { ISubscription } from 'rxjs/Subscription';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { Router, ActivatedRoute } from '@angular/router';
import { Store } from '@ngrx/store';
import { InspirationService } from '../../../../root-store/services/inspiration.service';
import { environment } from '../../../../../environments/environment';
import {
RootStoreState,
ProfileSelectors,
CommonModels
} from '../../../../root-store';
@Component({
selector: 'app-inspiration-details',
templateUrl: './inspiration-details.component.html'
})
export class InspirationDetailsComponent implements OnInit, OnDestroy {
@Output() onResetInspirations: EventEmitter<any> = new EventEmitter<any>();
inspiration: object;
routeSubscription: ISubscription;
activeProfile: CommonModels.Profile;
subscriptionActiveProfile: ISubscription;
constructor(
private route: ActivatedRoute,
private router: Router,
private inspirationService: InspirationService,
private store: Store<RootStoreState.State>,
private renderer: Renderer2
) { }
async ngOnInit() {
this.subscriptionActiveProfile = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
if (activeProfile) {
this.activeProfile = activeProfile;
}
});
this.renderer.addClass(document.body, 'overflow-hidden');
this.routeSubscription = this.route.params.subscribe(async (params) => {
await this.inspirationService.getInspiration({
inspirationId: params.inspirationId,
pinnedToWeddingId: this.activeProfile.id
}).toPromise().then(response => {
this.inspiration = response.result;
});
});
}
ngOnDestroy() {
this.renderer.removeClass(document.body, 'overflow-hidden');
this.subscriptionActiveProfile.unsubscribe();
}
onInspirationDeleted() {
this.onResetInspirations.emit(true);
this.router.navigateByUrl('/inspirations');
}
}
<file_sep>/nativescript-app/app/app.module.ts
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
import { NativeScriptModule } from 'nativescript-angular/nativescript.module';
import { ModalDialogService, NativeScriptRouterModule, registerElement } from 'nativescript-angular';
import { SharedModule } from '~/modules/shared.module';
import { SocialFeedModule } from '~/modules/social-feed/social-feed.module';
import { TasksModule } from '~/modules/tasks/tasks.module';
import { WeddingModule } from '~/modules/wedding/wedding.module';
import { MarketplaceModule } from '~/modules/marketplace/marketplace.module';
import { RootStoreModule } from '~/root-store/root-store.module';
import {
CreateCoupleComponent,
CreateCouplePartnerComponent,
CreateCouplePrivacyComponent,
CreateCoupleProfileComponent,
CreateVendorComponent,
CreateVendorProfileComponent,
DialogsComponent,
MenuComponent,
LoggedInAppComponent,
TopBarComponent,
CreateVendorPhotosComponent,
CreateVendorProductsComponent,
CreateVendorPaymentComponent,
AddProductModal,
MemberComponent,//9.5
} from '~/shared/components';
import { mainRouting } from '~/shared/main.routing';
import { appServices } from '~/shared/services';
import { RequestInterceptor } from '~/shared/interceptors/http-request.interceptor';
import { AuthModule } from '~/modules/auth/auth.module';
import { AppComponent } from './app.component';
import { AddMemberModal } from '~/shared/modals/add-member';
import { HttpModule } from '@angular/http';
import { MomentModule } from 'angular2-moment';
import { VendorService } from '~/shared/services/vendor.service';
import { ProfileService } from '~/shared/services/profile.service';
import { MessageService } from '~/shared/services/message.service';
import { NotificationService } from '~/shared/services/notification.service';
registerElement('Gradient', () => require('nativescript-gradient').Gradient);
@NgModule({
declarations: [
AppComponent,
DialogsComponent,
MenuComponent,
LoggedInAppComponent,
AddProductModal,
CreateCoupleComponent,
CreateCoupleProfileComponent,
CreateCouplePartnerComponent,
CreateCouplePrivacyComponent,
CreateVendorComponent,
CreateVendorProfileComponent,
CreateVendorPhotosComponent,
CreateVendorProductsComponent,
CreateVendorPaymentComponent,
TopBarComponent,
MemberComponent,//9.5
AddMemberModal
],
entryComponents: [
AddProductModal,
AddMemberModal
],
bootstrap: [ AppComponent ],
imports: [
AuthModule,
RootStoreModule,
TasksModule,
WeddingModule,
MarketplaceModule,
SocialFeedModule,
SharedModule,
NativeScriptModule,
NativeScriptRouterModule,
NativeScriptRouterModule.forRoot(mainRouting),
HttpModule,
MomentModule
],
providers: [
...appServices,
VendorService,
ProfileService,
MessageService,
NotificationService,
ModalDialogService,
{
provide: HTTP_INTERCEPTORS,
useClass: RequestInterceptor,
multi: true
}
],
schemas: [ NO_ERRORS_SCHEMA ],
})
export class AppModule {
}<file_sep>/nativescript-app/app/modules/auth/components/welcome/welcome.component.ts
import { Component } from '@angular/core';
import { AuthService } from '~/shared/services';
@Component({
moduleId: module.id,
selector: 'welcome',
templateUrl: 'welcome.component.html',
styleUrls: ['./welcome.component.scss']
})
export class WelcomeComponent {
constructor(private authService: AuthService,) {
console.log("---Welcome---")
}
}
<file_sep>/nativescript-app/app/modules/marketplace/components/marketplace/index.ts
export * from './marketplace.component';<file_sep>/spa/src/app/core/layout/components/wedding-members/wedding-members.component.ts
import { Component, OnInit, Input } from '@angular/core';
import { Observable } from "rxjs/Observable";
import { Store } from '@ngrx/store';
import { MemberService } from '../../../../root-store/services/member.service';
import {
RootStoreState,
MemberModels,
MemberSelectors
} from '../../../../root-store';
@Component({
selector: 'wedding-members',
templateUrl: './wedding-members.component.html',
styleUrls: ['./wedding-members.component.sass']
})
export class WeddingMembersComponent implements OnInit {
@Input() weddingId: string;
members: Observable<MemberModels.Member[]>
constructor(
private memberService: MemberService,
private store: Store<RootStoreState.State>
) { }
async ngOnInit() {
this.members = this.store.select(
MemberSelectors.selectMembers
);
}
}
<file_sep>/spa/src/app/modules/vendor/vendor.routing.ts
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { VendorComponent } from './vendor.component';
import { AuthGuard } from '../../shared/guards/auth.guard';
import {
ProfileResolvers,
AuthResolvers
} from '../../root-store';
const routes: Routes = [
{
path: 'vendor/:vendorId', component: VendorComponent,
canActivate: [AuthGuard],
resolve: {
activeProfile: ProfileResolvers.ActiveProfileResolver,
authInfo: AuthResolvers.AuthInfoResolver
},
runGuardsAndResolvers: 'always'
},
{
path: 'vendor/:vendorId/review/:vendorReviewId', component: VendorComponent,
canActivate: [AuthGuard],
resolve: {
activeProfile: ProfileResolvers.ActiveProfileResolver,
authInfo: AuthResolvers.AuthInfoResolver
},
runGuardsAndResolvers: 'always'
}
];
export const routing: ModuleWithProviders = RouterModule.forChild(routes);
<file_sep>/nativescript-app/app/shared/services/message.service.ts
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { API_URL } from '../configs/app.config';
@Injectable()
export class MessageService {
private apiUrl: string = API_URL;
constructor(
private http: HttpClient
) { }
countUnreadMessages(): Observable<any> {
return this.http.get<any[]>(this.apiUrl + '/messages/count');
}
getConversations(page): Observable<any> {
return this.http.get<any[]>(this.apiUrl + '/conversations?page=' + page);
}
getConversation(conversationId): Observable<any> {
return this.http.get<any[]>(this.apiUrl + '/conversations/' + conversationId);
}
getUnreadMessagesCount(): Observable<any> {
return this.http.get<any[]>(this.apiUrl + '/messages/count');
}
getMessages({ conversationId, page }): Observable<any> {
return this.http.get<any[]>(this.apiUrl + '/conversations/' + conversationId + '/messages?page=' + page);
}
markAsRead(conversationId): Observable<any> {
return this.http.patch<any[]>(this.apiUrl + '/conversations/' + conversationId, {});
}
sendMessage(data): Observable<any> {
return this.http.post(this.apiUrl + '/messages', data);
}
}
<file_sep>/nativescript-app/app/shared/components/create-profile/couple/privacy/create-couple-privacy.component.ts
import { Component, EventEmitter, Output } from '@angular/core';
import { RouterExtensions } from 'nativescript-angular/router' //9.4
import { PrivacySettingEnum } from '~/root-store/wedding-store/models';
@Component({
moduleId: module.id,
selector: 'create-couple-privacy',
templateUrl: 'create-couple-privacy.component.html',
styleUrls: ['../../create-profile-base.component.scss', './create-couple-privacy.component.scss']
})
export class CreateCouplePrivacyComponent {
@Output() createProfileEvent: EventEmitter<any> = new EventEmitter();
@Output() previousStepEvent: EventEmitter<any> = new EventEmitter();
public privacyType: PrivacySettingEnum = PrivacySettingEnum.Public;
public PrivacySettingsEnum = PrivacySettingEnum;
constructor( private routerExtensions: RouterExtensions
) {
console.log("---create-couple-privacy---")
}
public previousStep(): void {
this.previousStepEvent.next();
}
public createProfile(): void {
this.createProfileEvent.next(this.privacyType);
//this.routerExtensions.navigate(['/app', 'social-feed'])
}
public selectPrivacyType(type: PrivacySettingEnum): void {
this.privacyType = type;
}
}
<file_sep>/nativescript-app/app/shared/services/index.ts
import { PostService } from '~/shared/services/post.service';
import { AuthService } from './auth.service';
import { DialogsService } from './dialogs.service';
import { TaskService } from './task.service';
import { WeddingService } from './wedding.service';
import { ModalService } from './modal.service';
import { GuestService } from '~/shared/services/guest.service';
export {
AuthService,
DialogsService,
ModalService,
PostService,
TaskService,
WeddingService,
GuestService,
}
export const appServices = [
AuthService,
DialogsService,
ModalService,
PostService,
TaskService,
WeddingService,
GuestService,
];<file_sep>/spa/src/app/modules/social-feed/components/post/post.component.ts
import { Component, OnInit, OnDestroy, Input, Output, EventEmitter, ChangeDetectorRef, ViewChild, ElementRef } from '@angular/core';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { FlashMessagesService } from 'angular2-flash-messages';
import { ISubscription } from 'rxjs/Subscription';
import { ActivatedRoute } from '@angular/router';
import { NgxGalleryOptions, NgxGalleryImage, NgxGalleryAnimation } from 'ngx-gallery';
declare var Photostack: any;
import { environment } from '../../../../../environments/environment';
import { Post } from '../../../../root-store/common-models';
import { PostService } from '../../../../root-store/services/post.service';
import {
AuthModels,
CommonModels
} from '../../../../root-store';
import { ConfirmDialogComponent } from '../../../../shared/confirm-dialog/confirm-dialog.component';
import { PostFormComponent } from '../post-form/post-form.component';
@Component({
selector: 'post',
templateUrl: './post.component.html',
styleUrls: ['./post.component.sass']
})
export class PostComponent implements OnInit, OnDestroy {
@ViewChild('photostack') photostack: ElementRef;
@Input() post: any;
@Input() index: number;
@Output() postDeleted: EventEmitter<Post> = new EventEmitter();
authInfo: AuthModels.AuthInfo;
activeProfile: CommonModels.Profile;
resolverSubscription: ISubscription;
galleryOptions: NgxGalleryOptions[];
galleryImages: NgxGalleryImage[];
commentsLoading: boolean;
commentsLoaded: boolean;
commentsLoadMore: boolean;
commentsPage: number;
asWedding: boolean;
likeId: string | boolean;
loading: boolean = false;
weddingPhotos: any[];
song: any;
public commentEditActive: boolean;
constructor(
private route: ActivatedRoute,
private postService: PostService,
private _flashMessagesService: FlashMessagesService,
private modalService: NgbModal,
private changeDetector: ChangeDetectorRef
) {
}
async ngOnInit() {
this.resolverSubscription = this.route.data.subscribe(
data => {
this.authInfo = data.authInfo;
this.activeProfile = data.activeProfile;
this.asWedding = this.activeProfile && this.activeProfile.type == 'wedding' ? true : false;
this.likeId = this.checkLikes();
}
);
this.post.comments = [];
this.commentsLoadMore = false;
this.commentsPage = 1;
this.galleryOptions = [
{
width: '100%',
height: '480px',
thumbnailsColumns: this.post.photos.length < 4 ? this.post.photos.length : 4,
imageAnimation: NgxGalleryAnimation.Slide,
previewAnimation: false,
arrowPrevIcon: 'mdi mdi-chevron-left',
arrowNextIcon: 'mdi mdi-chevron-right',
closeIcon: 'mdi mdi-close',
fullscreenIcon: 'mdi mdi-fullscreen',
previewFullscreen: false,
imageArrows: false,
thumbnailsRemainingCount: this.post.photos.length > 4,
thumbnails: this.post.photos.length > 1,
previewCloseOnClick: true
},
{
breakpoint: 800,
width: '100%',
height: '420px',
imagePercent: 80,
thumbnailsPercent: 20,
thumbnailsMargin: 10,
thumbnailMargin: 10
},
{
breakpoint: 400,
preview: false
}
];
this.initGalleryImages();
}
ngAfterViewInit() {
if (this.post.isWeddingDayPost) {
this.song = new Audio(environment.cdnUrl + '/sounds/polaroid.mp3');
this.loading = true;
this.postService.getPhotos({
weddingId: this.post.wedding.id,
page: 1
}).toPromise().then(response => {
this.weddingPhotos = response.result.map(photo => {
const baseUrl = environment.cdnUrl + '/wedding/' + this.post.wedding.id + '/photos/';
return baseUrl + photo.filename.replace(/(\.[\w\d_-]+)$/i, '_md$1');
});
setTimeout(() => {
if (this.photostack) {
let timeout;
new Photostack(this.photostack.nativeElement, {
showNavigation: false,
afterOpen: ps => {
this.song.play();
},
afterClose: ps => {
this.song.pause();
this.song.currentTime = 0;
clearTimeout(timeout);
},
afterShowPhoto: ps => {
if (ps.allItemsCount > ps.current + 1) {
timeout = setTimeout(function() {
ps._navigate('next');
}, 3000);
} else {
ps._navigate('next');
timeout = setTimeout(function() {
ps._close();
}, 3000);
}
}
});
}
}, 100)
this.loading = false;
});
}
}
ngOnDestroy() {
this.resolverSubscription.unsubscribe();
if(this.song) {
this.song.pause();
this.song.currentTime = 0;
}
}
public initGalleryImages(): void {
this.galleryImages = [];
if (this.post.photos.length > 0) {
const cdnUrl = environment.cdnUrl + '/wedding/' + this.post.wedding.id + '/photos/';
for (let i = 0; i < this.post.photos.length; i++) {
const photo = this.post.photos[i];
this.galleryImages.push({
small: cdnUrl + photo.filename.replace(/(\.[\w\d_-]+)$/i, '_sm$1'),
medium: cdnUrl + photo.filename.replace(/(\.[\w\d_-]+)$/i, '_lg$1'),
big: cdnUrl + photo.filename
});
}
}
}
checkLikes() {
if (this.post.yourLikes.length > 0) {
for (let i = 0; i < this.post.yourLikes.length; i++) {
let like = this.post.yourLikes[i];
if ((this.asWedding && like.asWedding && like.authorWeddingId == this.activeProfile.id)
|| !this.asWedding && !like.asWedding) {
return like.id;
}
}
} else {
return false;
}
}
async like() {
await this.postService.likePost({
weddingId: this.post.wedding.id,
postId: this.post.id,
like: {
authorWeddingId: this.activeProfile.type == 'wedding' ? this.activeProfile.id : null,
asWedding: this.asWedding
}
}).toPromise().then(response => {
this.post.likesCount++;
this.post.yourLikes.push({
id: response.result,
authorWeddingId: this.activeProfile.id,
asWedding: this.asWedding
});
this.likeId = this.checkLikes();
});
}
async unlike() {
await this.postService.unlikePost({
weddingId: this.post.wedding.id,
postId: this.post.id,
likeId: this.likeId
}).toPromise().then(response => {
this.post.likesCount--;
this.post.yourLikes = this.post.yourLikes.filter(like => {
return like.id != this.likeId;
});
this.likeId = this.checkLikes();
});
}
setAsWedding(value) {
this.asWedding = value;
this.likeId = this.checkLikes();
}
async getComments() {
this.commentsLoading = true;
let comments = await this.postService.getPostComments({
weddingId: this.post.wedding.id,
postId: this.post.id,
page: this.commentsPage
}).toPromise()
.then(response => {
return response.result;
});
this.post.comments = comments.reverse().concat(this.post.comments);
if (this.post.comments.length < this.post.commentsCount) {
this.commentsLoadMore = true;
this.commentsPage++;
} else {
this.commentsLoadMore = false;
}
this.commentsLoading = false;
this.commentsLoaded = true;
}
async onPostVisible({ target, visible }, postId) {
if (this.post.commentsCount && !this.commentsLoading && !this.commentsLoaded && visible && this.post.id == postId) {
await this.getComments();
}
}
onCommentAdded(comment) {
if (this.post.commentsCount == 0) {
this.commentsLoaded = true;
}
this.post.commentsCount++;
if (!this.post.comments) {
this.post.comments = [];
}
this.post.comments.push(comment);
}
public editPost(): void {
const modalRef = this.modalService.open(PostFormComponent);
modalRef.componentInstance.activeProfile = this.post.wedding;
modalRef.componentInstance.post = this.post;
modalRef.componentInstance.onSuccess.subscribe(
(event) => {
this.postService.getPost({ postId: this.post.id, weddingId: this.post.wedding.id }).subscribe(
(response: any) => {
this.post = response.result;
this.initGalleryImages();
this.changeDetector.markForCheck();
},
() => {
this._flashMessagesService.show('Getting post data failed', { cssClass: 'alert-danger', timeout: 3000 });
}
);
modalRef.close();
}
);
modalRef.componentInstance.onClose.subscribe(
() => {
modalRef.close();
}
);
}
public deletePost(): void {
const modal = this.modalService.open(ConfirmDialogComponent, { backdrop: 'static' });
modal.componentInstance['data'] = {
title: 'Delete post',
text: 'Are you sure?',
confirm: this.sendDeleteReq.bind(this)
};
}
private sendDeleteReq(): void {
this.postService.deletePost({ weddingId: this.activeProfile.id, postId: this.post.id }).subscribe(
() => {
this.postDeleted.next(this.post);
this._flashMessagesService.show('Post deleted', { cssClass: 'alert-success', timeout: 3000 });
},
() => {
this._flashMessagesService.show('Post delete failed', { cssClass: 'alert-danger', timeout: 3000 });
}
);
}
public removeComment(removedComment: any): void {
this.post.comments = this.post.comments.filter((comment) => {
return removedComment.id !== comment.id;
});
this.post.commentsCount--;
this.changeDetector.markForCheck();
}
}
<file_sep>/nativescript-app/app/modules/tasks/modals/create/create-task.modal.ts
import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import { ModalDialogParams } from 'nativescript-angular/directives/dialogs';
import { Subscription } from 'rxjs/Subscription';
import { screen } from 'tns-core-modules/platform';
import * as _ from 'lodash';
import { State } from '~/root-store';
import { Member } from '~/root-store/wedding-store/models';
import { selectActiveWeddingMembers } from '~/root-store/wedding-store/selectors';
@Component({
selector: 'create-task',
templateUrl: 'create-task.modal.html',
})
export class CreateTaskModal implements OnInit, OnDestroy {
public modalType: string;
public width: any;
public members: Array<Member> = [];
private membersSubscription: Subscription;
public values: any = {
name: '',
assignedMemberId: '',
dueDate: ''
};
public selectedMember: string;
constructor(
private params: ModalDialogParams,
private store: Store<State>,
private changeDetector: ChangeDetectorRef,
) {
this.modalType = this.params.context.modalType;
if (this.modalType === 'edit') {
const task = this.params.context.task;
this.values.name = task.name;
this.values.assignedMemberId = task.assignedMemberId;
this.values.dueDate = task.dueDate;
}
this.width = screen.mainScreen.widthDIPs;
}
ngOnInit(): void {
this.membersSubscription = this.store.select(selectActiveWeddingMembers).subscribe(
(members: Array<Member>) => {
this.members = _.map(members,
(member: Member) => {
return {
name: `${member.account.firstName} ${member.account.lastName}`,
id: member.id,
}
}
);
this.selectedMember = _.find(this.members, (member) => {
return member.id === this.values.assignedMemberId;
});
this.changeDetector.markForCheck();
}
)
}
ngOnDestroy(): void {
this.membersSubscription.unsubscribe();
}
public close(values?: any): void {
this.params.closeCallback(values);
}
public setValue(valueName: string, element: any, useParam?: string): void {
const value = useParam ? element[useParam] : element;
this.values[valueName] = value;
}
public submit(): void {
if (this.modalType === 'create') {
this.close(this.values);
} else {
const res = Object.assign({}, this.params.context.task, this.values);
this.close(res)
}
}
}<file_sep>/nativescript-app/app/shared/components/notifications/notifications.component.ts
import { Component } from '@angular/core';
import { screen } from 'tns-core-modules/platform';
import { ISubscription } from 'rxjs/Subscription';
import { Store } from '@ngrx/store';
import { RootStoreState, ProfileSelectors } from '~/root-store';
import { NotificationService } from '~/shared/services/notification.service';
import { LoadingIndicator } from 'nativescript-loading-indicator';
import { RouterExtensions } from 'nativescript-angular';
import { Config } from '~/shared/configs';
@Component({
moduleId: module.id,
selector: 'notifications',
templateUrl: 'notifications.component.html',
styleUrls: ['./notifications.component.scss']
})
export class NotificationsComponent {
activeProfile: any;
activeProfileSub: ISubscription;
sioSubscription: any;
notificationsCount: number;
notifications = [];
loading: boolean = false;
page: number = 0;
infiniteScrollDisabled: boolean = false;
private indicator: LoadingIndicator;
public containerHeight;
constructor(
private store: Store<RootStoreState.State>,
private notificationService: NotificationService,
private routerExtensions: RouterExtensions ) {
this.containerHeight = screen.mainScreen.heightDIPs - 220; // Topbar height + some margin (bottom clear all bar)
this.indicator = new LoadingIndicator();
}
ngOnInit() {
this.activeProfileSub = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
this.activeProfile = activeProfile;
this.readNotifcations(true);
});
// this.notificationService.countUnreadNotifications()
// .toPromise().then(response => {
// this.notificationsCount = response.result
// });
}
ngOnDestroy() {
this.activeProfileSub.unsubscribe();
}
getNotifications() {
this.page++;
this.notificationService.getNotifications(this.page)
.toPromise().then(response => {
this.loading = false;
if (response.result.length == 0) {
this.infiniteScrollDisabled = true;
} else {
this.notifications = this.notifications.concat(response.result);
}
this.indicator.hide();
console.log("notifications: ");
console.log(this.notifications);
}).catch(error => {
this.indicator.hide();
this.loading = false;
});
}
readNotifcations(opening) {
if (opening) {
this.indicator.show({
message: 'Loading...'
});
this.loading = true;
this.page = 0;
this.infiniteScrollDisabled = false;
this.notifications = [];
this.getNotifications();
console.log("read notification");
this.notificationService.markAsRead()
.subscribe(response=>{
console.log("makred as read notification");
console.log(response);
}, error=>{
console.log("marked as read failed");
console.log(error);
})
// .toPromise().then(response => {
// // this.notificationsCount = 0;
// console.log("makred as read notification");
// console.log(response);
// })
}
}
getRouterLink(notification) {
let link;
switch (notification.type) {
case 'comment_created':
case 'like_created':
Config.notificationData = notification.additionalData;
this.routerExtensions.navigate(['/app', 'social-feed']);
// link = ['/', 'wedding', notification.additionalData.weddingId, 'post', notification.additionalData.postId];
break;
case 'invitation_received':
link = ['/settings/invitations'];
break;
case 'vendor_review_created':
this.routerExtensions.navigate(['/app', 'marketplace-list']);
// link = ['/', 'vendor', notification.additionalData.vendorId, 'review', notification.entityId];
break;
case 'guest_status_changed':
link = ['/', 'guest-list'];
break;
}
return link;
}
}
<file_sep>/spa/src/app/core/layout/components/navbar/navbar.component.ts
import { Component, OnInit, OnDestroy, Input, Output, EventEmitter } from '@angular/core';
import { ISubscription } from 'rxjs/Subscription';
import { Observable } from "rxjs/Observable";
import { Store } from '@ngrx/store';
import {
RootStoreState,
AuthActions,
AuthSelectors
} from '../../../../root-store';
@Component({
selector: 'app-navbar',
templateUrl: './navbar.component.html',
styleUrls: ['./navbar.component.sass']
})
export class NavbarComponent implements OnInit, OnDestroy {
authInfo: any;
authInfoSub: ISubscription;
_collapseNav: boolean
@Input() set collapseNav(value: boolean) {
this._collapseNav = value;
}
@Output() onToggleCollapseNav = new EventEmitter<boolean>();
constructor(
private store: Store<RootStoreState.State>
) {}
ngOnInit() {
this.authInfoSub = this.store.select(
AuthSelectors.selectAuthInfo
).subscribe(authInfo => {
this.authInfo = authInfo;
});
}
ngOnDestroy() {
this.authInfoSub.unsubscribe();
}
logout(event) {
event.stopPropagation();
this.store.dispatch(new AuthActions.Logout());
}
toggleNavCollapse(collapseNav) {
this.onToggleCollapseNav.emit(collapseNav);
}
}
<file_sep>/spa/src/app/modules/inspirations/inspirations.routing.ts
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { InspirationsComponent } from './inspirations.component';
import { InspirationDetailsComponent } from './components/inspiration-details/inspiration-details.component';
import { AuthGuard } from '../../shared/guards/auth.guard';
import { ProfileResolvers } from '../../root-store';
const routes: Routes = [
{
path: 'inspirations/tag/:tags', component: InspirationsComponent, canActivate: [AuthGuard]
},
{
path: 'inspirations/pinned', component: InspirationsComponent, canActivate: [AuthGuard]
},
{
path: 'inspirations/yours', component: InspirationsComponent, canActivate: [AuthGuard]
},
{
path: 'inspirations', component: InspirationsComponent, canActivate: [AuthGuard],
children: [
{
path: ':inspirationId', component: InspirationDetailsComponent
}
]
}
];
export const routing: ModuleWithProviders = RouterModule.forChild(routes);
<file_sep>/nativescript-app/app/shared/components/create-profile/couple/profile/create-couple-profile.component.ts
import { Component, EventEmitter, Output } from '@angular/core';
import * as Toast from 'nativescript-toast';
@Component({
moduleId: module.id,
selector: 'create-couple-profile',
templateUrl: 'create-couple-profile.component.html',
styleUrls: ['../../create-profile-base.component.scss']
})
export class CreateCoupleProfileComponent {
@Output() nextStepEvent: EventEmitter<any> = new EventEmitter();
private values: any = {
avatar: '',
name: '',
description: '',
events: [
{
type: 'reception',
place_name: '',
name: '',
date: '',
address: '',
lng: '',
lat: ''
},
{
type: 'ceremony',
place_name: '',
name: '',
date: '',
address: '',
lng: '',
lat: ''
}
]
};
constructor(
) {
console.log("---create-couple-profile---")
}
public nextStep(): void {
this.nextStepEvent.next(this.values);
console.log(this.values);
}
public setValue(valueName: string, element: any, useParam?: string): void {
this.values[valueName] = useParam ? element[useParam] : element;
}
public setEventDate(eventIterator: number, element: any): void {
this.values.events[eventIterator].date = element;
}
public setEventLocation(eventIterator: number, location: any): void {
console.log("location: ", location);
if(location != null && location.geometry != null ){
const event = this.values.events[eventIterator];
event.place_name = location.name;
event.name = location.name;
event.address = location.formatted_address;
event.lng = location.geometry.location.lng + "";
event.lat = location.geometry.location.lat + "";
}
else {
Toast.makeText("Something wrong! please try again", "long").show();
}
}
}
<file_sep>/spa/src/app/modules/marketplace/marketplace.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { SharedModule } from '../../shared/shared.module';
import { MatIconModule } from '@angular/material';
import { GooglePlaceModule } from "ngx-google-places-autocomplete";
import { NgSelectModule } from '@ng-select/ng-select';
import { InfiniteScrollModule } from 'angular2-infinite-scroll';
import { MarketplaceComponent } from './marketplace.component';
import { ProfilingTestComponent } from './components/profiling-test/profiling-test.component';
import { routing } from './marketplace.routing';
import { LayoutModule } from '../../core/layout/layout.module';
@NgModule({
imports: [
CommonModule,
RouterModule,
routing,
LayoutModule,
SharedModule,
MatIconModule,
GooglePlaceModule,
NgSelectModule,
InfiniteScrollModule
],
declarations: [
MarketplaceComponent,
ProfilingTestComponent
],
entryComponents: [
ProfilingTestComponent
]
})
export class MarketplaceModule { }
<file_sep>/spa/src/app/core/layout/layout.component.ts
import { Component, OnInit, OnDestroy } from '@angular/core';
import { ISubscription } from "rxjs/Subscription";
import { ActivatedRoute } from '@angular/router';
@Component({
selector: 'app-layout',
templateUrl: './layout.component.html',
styleUrls: ['./layout.component.sass']
})
export class LayoutComponent implements OnInit, OnDestroy {
queryParamsSubscription: ISubscription;
hideNav: boolean
collapseNav: boolean = false;
constructor(
private route: ActivatedRoute
) { }
ngOnInit() {
this.queryParamsSubscription = this.route.queryParams.subscribe(
params => {
if (params.layout == 'blank') {
this.hideNav = true;
} else {
this.hideNav = false;
}
}
);
}
ngOnDestroy() {
this.queryParamsSubscription.unsubscribe();
}
}
<file_sep>/spa/src/app/modules/guest-list/guest-list.routing.ts
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { GuestListComponent } from './guest-list.component';
import { AuthGuard } from '../../shared/guards/auth.guard';
import { ProfileResolvers } from '../../root-store';
import { HasWeddingGuard } from '../../shared/guards/hasWedding.guard';
const routes: Routes = [
{
path: 'guest-list', component: GuestListComponent, canActivate: [AuthGuard], resolve: {
activeProfile: ProfileResolvers.ActiveProfileResolver
}
}
];
export const routing: ModuleWithProviders = RouterModule.forChild(routes);
<file_sep>/spa/src/app/root-store/services/sio.service.ts
import { Subject } from 'rxjs/Subject';
import { Observable } from 'rxjs/Observable';
import * as io from 'socket.io-client';
import { environment } from '../../../environments/environment';
export class SioService {
private socket;
init(roomName) {
this.socket = io.connect(environment.sioUrl);
this.socket.emit('join', roomName);
}
getSocket() {
return this.socket;
}
getNotifications() {
let observable = new Observable(observer => {
this.socket.on('notification', (data) => {
observer.next(data);
});
})
return observable;
}
getMessages() {
let observable = new Observable(observer => {
this.socket.on('message', (data) => {
observer.next(data);
});
// return () => {
// this.socket.disconnect();
// };
})
return observable;
}
}
<file_sep>/nativescript-app/app/root-store/message-store/actions.ts
import { Injectable } from '@angular/core';
import { Action } from '@ngrx/store';
export enum MessageActionTypes {
APPEND_CONVERSATIONS = '[MESSAGE] Append conversations',
UPDATE_CONVERSATION_LAST_MESSAGE = '[MESSAGE] Update conversation last message',
SET_UNREAD_MESSAGES_COUNT = '[MESSAGE] Set unread messages count',
SET_ACTIVE_CONVERSATION_ID = '[MESSAGE] Set active conversation id',
HANDLE_NEW_MESSAGE = '[MESSAGE] Handle new message',
APPEND_NEW_CONVERSATION = '[MESSAGE] Append new conversation'
}
export class AppendConversations implements Action {
readonly type = MessageActionTypes.APPEND_CONVERSATIONS;
constructor(public payload: {
conversations: any,
infiniteScroll: {
page: number,
disabled: boolean
}
}) { }
}
export class SetUnreadMessagesCount implements Action {
readonly type = MessageActionTypes.SET_UNREAD_MESSAGES_COUNT;
constructor(public payload: {
unreadMessagesCount: number
}) { }
}
export class SetActiveConversationId implements Action {
readonly type = MessageActionTypes.SET_ACTIVE_CONVERSATION_ID;
constructor(public payload: {
activeConversationId: string
}) { }
}
export class HandleNewMessage implements Action {
readonly type = MessageActionTypes.HANDLE_NEW_MESSAGE;
constructor(public payload: {
message: any
}) { }
}
export class AppendNewConversation implements Action {
readonly type = MessageActionTypes.APPEND_NEW_CONVERSATION;
constructor(public payload: {
conversation: any,
self: boolean
}) { }
}
export class UpdateConversationLastMessage implements Action {
readonly type = MessageActionTypes.UPDATE_CONVERSATION_LAST_MESSAGE;
constructor(public payload: {
conversationId: string,
lastMessage: any
}) { }
}
export type MessageActions = AppendConversations
| SetUnreadMessagesCount
| SetActiveConversationId
| HandleNewMessage
| AppendNewConversation
| UpdateConversationLastMessage;
<file_sep>/nativescript-app/app/modules/wedding/components/couple-timeline/couple-timeline.component.ts
import { Component } from '@angular/core';
import { Store } from '@ngrx/store';
import { State } from '~/root-store';
import { ModalService, PostService } from '~/shared/services';
import { Config } from '~/shared/configs';
import { Post } from '~/shared/types/models/social-feed';
import { Wedding } from '~/root-store/wedding-store/models';
@Component({
moduleId: module.id,
selector: 'couple-timeline',
templateUrl: 'couple-timeline.component.html',
styleUrls: ['./couple-timeline.component.scss']
})
export class CoupleTimelineComponent {
public posts: Post[];
page: number;
weddingId:string;
public showForm: boolean;
private activeWedding: Wedding;
constructor(
private modalService: ModalService,
private store: Store<State>,
private postService: PostService,
) {
}
ngOnInit(): void {
console.log("couple profile timeline ngOnit");
console.log(Config.activeWedding);
this.activeWedding = Config.activeWedding;
this.showForm = true;
if( Config.activeWedding ) {
this.weddingId = Config.activeWedding.id;
}
this.getPosts({
init: true
});
}
getPosts({ init }) {
if (init) {
this.posts = [];
this.page = 1;
}
this.postService.getPosts({
weddingId: this.weddingId,
page: this.page
}).subscribe(response => {
// console.log(response);
let posts = [];
response.result.forEach(post => {
// posts[post.id] = post;
console.log(post);
posts.push(post);
});
if (response.result.length == 0) {
console.log("no posts");
}
this.posts = Object.assign(this.posts, posts);
},error => {
console.log(error);
});
}
ngOnDestroy() {
}
public appendPost(post) {
console.log("append Post");
this.posts.unshift(post);
}
}
<file_sep>/spa/src/app/root-store/profile-store/module.ts
import { NgModule } from '@angular/core';
import { EffectsModule } from '@ngrx/effects';
import { StoreModule } from '@ngrx/store';
import { ProfileEffects } from './effects';
import { reducer } from './reducers';
import { ActiveProfileResolver } from './resolvers';
@NgModule({
imports: [
StoreModule.forFeature('profile', reducer),
EffectsModule.forFeature([ProfileEffects])
],
declarations: [
],
providers: [
ProfileEffects,
ActiveProfileResolver
]
})
export class ProfileStoreModule { }
<file_sep>/spa/src/app/root-store/member-store/index.ts
import * as MemberActions from './actions';
import * as MemberState from './state';
import * as MemberSelectors from './selectors';
import * as MemberModels from './models';
export {
MemberStoreModule
} from './module';
export {
MemberActions,
MemberState,
MemberSelectors,
MemberModels
};
<file_sep>/nativescript-app/app/modules/wedding/components/guest/guest.component.ts
import { Component, Input } from '@angular/core';
import { Store } from '@ngrx/store';
import { State } from '~/root-store';
import { ModalService } from '~/shared/services';
import { DeleteeditModal } from '~/modules/wedding/modals';
@Component({
moduleId: module.id,
selector: 'guest',
templateUrl: 'guest.component.html',
styleUrls: ['./guest.component.scss']
})
export class GuestComponent {
@Input() guest: any;
constructor(
private modalService: ModalService,
private store: Store<State>,
) {
}
ngOnInit() {
console.log("Guest :");
console.log(this.guest);
}
public delete(): void {
// TODO delete
}
public update(guest: any, update): void {
// TODO update
}
public delete_editModal(): void {
this.modalService.showModal(DeleteeditModal, {})
.then((response: any) => {
// TODO add guest
});
}
}
<file_sep>/nativescript-app/app/shared/components/create-profile/vendor/payment/index.ts
export * from './create-vendor-payment.component';<file_sep>/nativescript-app/app/modules/wedding/components/couple-profile/index.ts
export * from './couple-profile.component';<file_sep>/nativescript-app/app/root-store/auth-store/models.ts
export interface AuthInfo {
account: {
id: string;
email: string;
isActive: boolean;
firstName: string;
lastName: string;
activatedAt: string;
createdAt: string;
updatedAt: string;
deletedAt: string | null;
}
}
<file_sep>/spa/src/app/modules/vendor/components/vendor-review-modal/vendor-review-modal.component.ts
import { Component, OnInit, Output, EventEmitter } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { VendorService } from '../../../../root-store/services/vendor.service';
import { FlashMessagesService } from 'angular2-flash-messages';
import {
RootStoreState,
CommonModels
} from '../../../../root-store';
@Component({
selector: 'vendor-review-modal',
templateUrl: './vendor-review-modal.component.html',
styleUrls: ['./vendor-review-modal.component.sass']
})
export class VendorReviewModalComponent implements OnInit {
activeProfile: CommonModels.Profile;
vendorId: string;
vendorReview: any;
modalOptions: any;
submitted: boolean = false;
error: any;
@Output() updateReviews = new EventEmitter<boolean>();
constructor (
private route: ActivatedRoute,
public activeModal: NgbActiveModal,
private vendorService: VendorService,
private flashMessagesService: FlashMessagesService
) { }
async ngOnInit() {
let initVendorReview = {
id: null,
text: null,
rating: null,
authorWeddingId: this.activeProfile.id
}
this.vendorReview = { ...initVendorReview };
}
async submitVendorReviewForm () {
this.submitted = true;
let filesFormData = new FormData();
let vendorReviewToSave = Object.assign({}, this.vendorReview);
let serviceMethod;
if (this.vendorReview.id) {
} else {
serviceMethod = this.vendorService.addVendorReview({
vendorId: this.vendorId,
vendorReview: this.vendorReview
}).toPromise();
}
await serviceMethod.then(response => {
this.submitted = false;
this.flashMessagesService.show(`Review ${this.vendorReview.id ? 'updated' : 'added'} successfully`, { cssClass: 'alert-success', timeout: 3000 });
this.updateReviews.emit(true);
this.activeModal.close();
}).catch(error => {
this.submitted = false;
this.error = error.error;
});
}
public cancel() {
this.activeModal.close();
}
}
<file_sep>/spa/src/app/shared/guards/auth.guard.ts
import { Injectable } from '@angular/core';
import { CanActivate } from '@angular/router';
import { AuthService } from '../../root-store/services/auth.service';
import { environment } from '../../../environments/environment';
@Injectable()
export class AuthGuard implements CanActivate {
constructor(
private authService: AuthService
) { }
webUrl: string = environment.webUrl
canActivate() {
if (this.authService.getToken()) {
return true;
}
let pathname = window.location.pathname;
let redirect = pathname != '/' ? '?redirect=' + pathname + '&app=true' : '';
window.location.replace(this.webUrl + '/login' + redirect);
return false;
}
}
<file_sep>/nativescript-app/app/root-store/message-store/reducers.ts
import { Action } from '@ngrx/store';
import { MessageActions, MessageActionTypes } from './actions';
import { initialState, State } from './state';
import { CDN_URL } from '../../shared/configs/app.config';
export function reducer(state = initialState, action: MessageActions) {
let index;
let updatedConversations = [];
let unreadMessagesCount;
switch (action.type) {
case MessageActionTypes.APPEND_CONVERSATIONS:
let conversationsToAppend = {};
action.payload.conversations.map((item, index) => {
if (item.id !== state.activeConversationId) {
item.unreadMessagesCount = 0
}
conversationsToAppend[item.id] = item;
});
for(let i = 0; i < state.conversations.length; i++) {
let conversation = state.conversations[i];
if(conversationsToAppend[conversation.id]) {
delete conversationsToAppend[conversation.id];
}
}
return {
...state,
conversations: [
...state.conversations,
...(<any>Object).values(conversationsToAppend)
],
infiniteScroll: {
...state.infiniteScroll,
page: action.payload.infiniteScroll.page,
disabled: action.payload.infiniteScroll.disabled
}
};
case MessageActionTypes.UPDATE_CONVERSATION_LAST_MESSAGE:
let conversationToUpdate;
unreadMessagesCount = state.unreadMessagesCount;
for (let i = 0; i < state.conversations.length; i++) {
let conversation = Object.assign({}, state.conversations[i]);
if (conversation.id == action.payload.conversationId) {
conversationToUpdate = conversation;
} else {
updatedConversations.push(conversation);
}
}
if (conversationToUpdate) {
conversationToUpdate.lastMessage = action.payload.lastMessage;
updatedConversations.unshift(conversationToUpdate);
}
if (state.activeConversationId !== conversationToUpdate.id) {
let sound = new Audio(CDN_URL + '/sounds/message.mp3');
sound.play();
conversationToUpdate.unreadMessagesCount++;
unreadMessagesCount++;
}
return {
...state,
conversations: updatedConversations,
unreadMessagesCount: unreadMessagesCount
};
case MessageActionTypes.SET_UNREAD_MESSAGES_COUNT:
return {
...state,
unreadMessagesCount: action.payload.unreadMessagesCount
};
case MessageActionTypes.SET_ACTIVE_CONVERSATION_ID:
if (!action.payload.activeConversationId) {
return {
...state,
activeConversationId: null
}
}
updatedConversations = state.conversations.map((item, index) => {
if (item.id !== action.payload.activeConversationId) {
return item;
}
unreadMessagesCount = state.unreadMessagesCount - parseInt(item.unreadMessagesCount);
return {
...item,
unreadMessagesCount: 0
};
});
return {
...state,
activeConversationId: action.payload.activeConversationId,
conversations: updatedConversations,
unreadMessagesCount: unreadMessagesCount
}
case MessageActionTypes.APPEND_NEW_CONVERSATION:
unreadMessagesCount = state.unreadMessagesCount;
if(!action.payload.self) {
let sound = new Audio(CDN_URL + '/sounds/message.mp3');
sound.play();
unreadMessagesCount++;
}
return {
...state,
conversations: [
action.payload.conversation,
...state.conversations
],
unreadMessagesCount: unreadMessagesCount
};
default:
return state;
}
}
<file_sep>/nativescript-app/app/modules/wedding/wedding.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {
CoupleInformationsComponent,
CouplePhotosComponent,
CoupleProfileComponent,
CoupleTimelineComponent,
GuestComponent,
GuestListComponent
} from '~/modules/wedding/components';
import { AddGuestModal, DeleteeditModal } from '~/modules/wedding/modals';
import { SharedModule } from '../shared.module';
import { PostComponent, PostFormComponent, CommentComponent, CommentFormComponent } from '~/modules/social-feed/components';
import { SocialFeedModule } from '~/modules/social-feed/social-feed.module';
import { MomentModule } from 'angular2-moment';
@NgModule({
declarations: [
AddGuestModal,
CouplePhotosComponent,
CoupleProfileComponent,
CoupleInformationsComponent,
CoupleTimelineComponent,
GuestComponent,
GuestListComponent,
DeleteeditModal
],
entryComponents: [
AddGuestModal,
DeleteeditModal
],
imports: [
CommonModule,
SharedModule,
SocialFeedModule,
MomentModule
],
exports: [
]
})
export class WeddingModule { }<file_sep>/nativescript-app/app/shared/components/create-profile/couple/index.ts
export * from './profile';
export * from './create-couple.component';
export * from './partner';
export * from './privacy';<file_sep>/nativescript-app/app/shared/components/create-profile/vendor/profile/index.ts
export * from './create-vendor-profile.component';<file_sep>/nativescript-app/app/modules/social-feed/components/post-form/post-form.component.ts
import { Component, OnInit, Input, Output, ViewChild, EventEmitter } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Store } from '@ngrx/store';
import * as objectToFormData from 'object-to-formdata';
import { State, CommonModels } from '~/root-store';
import { Wedding } from '~/root-store/wedding-store/models';
import { PostService } from '~/shared/services/post.service';
import { Post } from '~/shared/types/models/social-feed';
import { Config, API_URL } from '~/shared/configs';
import { ModalService, AuthService } from '~/shared/services';
import { UploadModal } from '~/shared/modals';
import { ImageAsset } from 'tns-core-modules/image-asset';
// import {ImageAsset} from 'tns-core-modules/tns-core-modules';
import * as platformModule from 'tns-core-modules/platform';
import { ImageSource, fromFile } from 'tns-core-modules/image-source/image-source';
import * as Toast from 'nativescript-toast';
import * as bghttp from 'nativescript-background-http';
var fs = require("tns-core-modules/file-system");
@Component({
selector: 'post-form',
templateUrl: 'post-form.component.html',
})
export class PostFormComponent implements OnInit {
@ViewChild('postForm') private postForm: any;
@ViewChild('uploader') private uploader: any;
@Input() activeProfile: CommonModels.Profile;
@Input() uploaderImages?: any;
@Input() textPlaceholder?: string;
@Input() post?: Post;
@Output() onSuccess = new EventEmitter<any>();
@Output() onClose = new EventEmitter();
public postFormData: any;
public images = [];
public error: any;
public submitted: boolean;
public editForm = false;
public imagesToRemove: Array<string> = [];
public imageParams = [];
text:string;
shownPhotosLength = 6;
constructor(
private store: Store<State>,
private route: ActivatedRoute,
private postService: PostService,
private modalService: ModalService,
private authService: AuthService,
) {
}
ngOnInit() {
console.log("post-form ngOnInit");
this.resetForm();
if (!this.textPlaceholder) {
this.textPlaceholder = 'What\'s on your mind?';
}
if (this.post) {
this.editForm = true;
this.postFormData = Object.assign({}, this.post);
}
}
public onSubmit() {
this.getImageParams();
}
getImageParams(){
let session = bghttp.session('post');
let params = [];
if (this.images && this.images.length > 0 ) {
for (let i = 0; i < this.images.length; i++) {
const image = this.images[i];
console.log(image);
// var originPathSplited = image.split("/");
// var origFilename = originPathSplited[originPathSplited.length-1];
// var filePath = fs.path.join(fs.knownFolders.documents().path, origFilename);
// var imageSource = fromFile(image);
// var saved = imageSource.saveToFile(filePath, "jpeg");
// console.log("new path: " + filePath);
// console.log(`item saved:${saved}`);
const param = {
name: "photos[]",
mimeType: 'image/jpeg',
fileName: image,
};
params.push(param);
}
}
if(this.postFormData.text){
let param = {
value: this.postFormData.text,
name: "text"
};
params.push(param);
}
var url = API_URL + '/weddings/' + this.activeProfile.id + '/posts';
if (this.editForm) {
url = url + `/${this.post.id}`;
}
let request = {
url: url,
method: 'POST',
headers: {
'Content-Type': 'application/form-data',
'Authorization': 'Bearer ' + this.authService.getToken(),
},
description:"Post Upload"
};
let task: bghttp.Task;
console.log(params);
task = session.multipartUpload(params, request);
task.on('responded', (response) => this.onCompleteUpload(response));
task.on('error', this.onUploadError)
}
public onCompleteUpload(response): void {
// TODO redirect to app and get weddings
console.log("post completed")
Toast.makeText("Your post uploaded", "long").show();
this.submitted = false;
const postId = JSON.parse(response.data).result;
console.log(postId);
this.text = "";
this.images = [];
this.error = null;
// this.refreshPost();
this.postService.getPost({
weddingId: this.activeProfile.id,
postId: postId
}).toPromise().then(response => {
console.log("Post refresh");
this.onSuccess.emit(response.result);
}
);
}
public onUploadError(error): void {
console.log(error);
Toast.makeText("Your post upload failed", "long").show();
}
// submitForm(){
// if (this.editForm) {
// this.submitted = true;
// let params: any = {
// text: this.postFormData.text,
// };
// if (this.imagesToRemove.length) {
// params.deletedPhotos = this.imagesToRemove;
// }
// const photos = [];
// if (this.images) {
// for (let i = 0; i < this.images.length; i++) {
// const image = this.images[i];
// // photos.push(image.file);//TODO: should be implemented with nativescript-http-formdata
// }
// }
// if (photos.length) {
// params = Object.assign(params, {photos});
// }
// const formData = objectToFormData(params);
// this.postService.editPost({
// weddingId: this.activeProfile.id,
// postId: this.post.id,
// params: formData
// }).subscribe(() => {
// this.submitted = false;
// this.onSuccess.emit();
// }, (error) => {
// this.error = error.error;
// this.submitted = false;
// });
// } else {
// // let post = this.postFormData;
// // let photos = [];
// // if (this.images) {
// // for (let i = 0; i < this.images.length; i++) {
// // let image = this.images[i];
// // // photos.push(image.file);//TODO: should be implemented with nativescript-http-formdata
// // }
// // }
// // let formData = objectToFormData(
// // Object.assign(post, {photos})
// // );
// // console.log(formData);
// this.submitted = true;
// this.postService.addPost({
// weddingId: this.activeProfile.id,
// post:
// {
// text:this.postFormData.text,
// photos:this.imageParams
// }
// }).subscribe((response) => {
// console.log("Post Success");
// // this.postForm.reset();
// // this.uploader.reset();
// this.submitted = false;
// const postId = response.result;
// console.log(postId);
// this.text = "";
// this.images = [];
// this.error = null;
// // this.refreshPost();
// this.postService.getPost({
// weddingId: this.activeProfile.id,
// postId: postId
// }).toPromise().then(response => {
// console.log("Post refresh");
// this.onSuccess.emit(response.result);
// }
// );
// }, (error) => {
// this.error = error.error;
// this.submitted = false;
// });
// }
// /// open after test
// console.log("Post submit")
// }
camera_image(){
this.modalService.showModal(UploadModal, {}).then(
(url: string) => {
// this.selectedUrl = url;
// this.photoSelected.next(url);
console.log("image selected");
this.images.push(url)
}
)
}
resetForm() {
this.postFormData = {
text: null
};
}
public removeImage(removedPhoto: any): void {
this.imagesToRemove.push(removedPhoto.id);
}
public cancel(): void {
this.onClose.next();
}
public setValue(valueName: string, element: any, useParam?: string): void {
const value = useParam ? element[useParam] : element;
this.postFormData[valueName] = value;
}
}
<file_sep>/spa/src/app/modules/vendor/components/vendor-message-modal/vendor-message-modal.component.ts
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { MessageService } from '../../../../root-store/services/message.service';
import { FlashMessagesService } from 'angular2-flash-messages';
import {
RootStoreState,
CommonModels
} from '../../../../root-store';
@Component({
selector: 'vendor-message-modal',
templateUrl: './vendor-message-modal.component.html'
})
export class VendorMessageModalComponent implements OnInit {
activeProfile: CommonModels.Profile;
vendorId: string;
vendorMessage: any;
submitted: boolean = false;
error: any;
constructor (
private route: ActivatedRoute,
public activeModal: NgbActiveModal,
private messageService: MessageService,
private flashMessagesService: FlashMessagesService
) { }
async ngOnInit() {
let initVendorMessage = {
text: null
}
this.vendorMessage = { ...initVendorMessage };
}
async submitVendorMessageForm() {
this.submitted = true;
await this.messageService.sendMessage({
weddingId: this.activeProfile.id,
vendorId: this.vendorId,
text: this.vendorMessage.text,
asVendor: false
}).toPromise().then(response => {
this.flashMessagesService.show(`Message sent successfully`, { cssClass: 'alert-success', timeout: 4000 });
this.submitted = false;
this.activeModal.close();
}).catch(error => {
this.submitted = false;
this.error = error.error;
})
}
public cancel() {
this.activeModal.close();
}
}
<file_sep>/spa/src/app/modules/tasks/tasks.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { FormsModule } from '@angular/forms';
import { NgSelectModule } from '@ng-select/ng-select';
import { TextareaAutosizeModule } from 'ngx-textarea-autosize';
import { SharedModule } from '../../shared/shared.module';
import { TasksComponent } from './tasks.component';
import { routing } from './tasks.routing';
import { LayoutModule } from '../../core/layout/layout.module';
import { MatIconModule } from '@angular/material';
import { TaskDetailsComponent } from './components/task-details/task-details.component';
import { TaskFormModalComponent } from './components/task-form-modal/task-form-modal.component';
import { TaskStatsComponent } from './components/task-stats/task-stats.component';
@NgModule({
imports: [
CommonModule,
RouterModule,
NgbModule.forRoot(),
routing,
LayoutModule,
MatIconModule,
FormsModule,
NgSelectModule,
TextareaAutosizeModule,
SharedModule,
],
declarations: [
TasksComponent,
TaskDetailsComponent,
TaskStatsComponent,
TaskFormModalComponent
],
exports: [
TasksComponent
],
entryComponents: [
TaskFormModalComponent
]
})
export class TasksModule { }
<file_sep>/nativescript-app/app/modules/tasks/components/list/tasks-list.component.ts
import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import { Subscription } from 'rxjs/Subscription';
import { screen } from 'tns-core-modules/platform';
import { CreateTaskModal } from '~/modules/tasks/modals';
import { State, Task } from '~/root-store';
import { AddTask, EditTask } from '~/root-store/task-store/actions';
import { selectTasks } from '~/root-store/task-store/selectors';
import { Wedding } from '~/root-store/wedding-store/models';
import { selectActiveWedding } from '~/root-store/wedding-store/selectors';
import { ModalService } from '~/shared/services/modal.service';
import { Config } from '~/shared/configs';
@Component({
moduleId: module.id,
selector: 'tasks-list',
templateUrl: 'tasks-list.component.html',
styleUrls: ['./tasks-list.component.scss']
})
export class TasksListComponent implements OnInit, OnDestroy {
public containerHeight;
public tasks: Array<any> = [];
private activeWeddingId: string;
private tasksSubscription: Subscription;
public activeWeddingSubscription: Subscription;
constructor(
private modalService: ModalService,
private store: Store<State>,
private changeDetector: ChangeDetectorRef,
) {
this.containerHeight = screen.mainScreen.heightDIPs - 140; // Topbar height + some margin
console.log("---tasklist---")
}
ngOnInit(): void {
Config.previousUrl = "tasks-list";
console.log("Task List ngOnInit");
this.tasksSubscription = this.store.select(selectTasks).subscribe((tasks: Array<Task>) => {
this.tasks = tasks;
this.changeDetector.markForCheck();
});
this.activeWeddingSubscription = this.store.select(selectActiveWedding)
.subscribe((activeWedding: Wedding) => {
if (activeWedding) {
this.activeWeddingId = activeWedding.id;
console.log(this.activeWeddingId);
}
})
}
ngOnDestroy(): void {
this.tasksSubscription.unsubscribe();
// this.activeWeddingSubscription.unsubscribe();
}
public openCreateModal(): void {
this.modalService.showModal(CreateTaskModal, {
context: {
modalType: 'create',
weddingId: this.activeWeddingId
}
})
.then((values: any) => {
this.store.dispatch(new AddTask({
weddingId: this.activeWeddingId,
task: values
}))
});
}
}
<file_sep>/nativescript-app/app/shared/configs/app.config.ts
// TODO add API_URL to ENV
export const API_URL = `https://api.dev-c01.muulabs.pl/v1`;
export const WEB_URL = `https://api.dev-c01.muulabs.pl/`;
export const DATE_FORMAT = 'MM/DD/YY';
export const DATETIME_FORMAT = 'MM/DD/YY HH:MM';
export const TOP_BAR_HEIGHT = 70;
export const CDN_URL = 'https://storage.googleapis.com/wedding-app-dev';
export class Config {
static token = "";
static followed;
static activeWedding;
static authInfo;
static activeProfile;
static marketplaceID;
static vendorReview;
static notificationData;
static previousUrl;
static filters;
static filter_location_text;
}
<file_sep>/spa/src/app/modules/vendor-form/components/photos/photos.component.ts
import { Component, OnInit, OnDestroy, Output, Input, EventEmitter } from '@angular/core';
import { ISubscription } from 'rxjs/Subscription';
import { Store } from '@ngrx/store';
import * as objectToFormData from 'object-to-formdata';
import { DomSanitizer } from '@angular/platform-browser';
import { ActivatedRoute } from '@angular/router';
import { VendorService } from '../../../../root-store/services/vendor.service';
import {
RootStoreState,
ProfileSelectors,
CommonModels
} from '../../../../root-store';
@Component({
selector: 'vendor-form-photos',
templateUrl: './photos.component.html',
styleUrls: ['./photos.component.sass']
})
export class VendorFormPhotosComponent implements OnInit, OnDestroy {
@Input() mode: string;
@Output() setStep = new EventEmitter<number>();
subActiveProfile: ISubscription;
activeProfile: any;
uploadedImages: any;
images: any[] = [];
imagesToRemove: string[] = [];
submitted: boolean = false;
error: any;
constructor(
private store: Store<RootStoreState.State>,
public sanitizer: DomSanitizer,
private vendorService: VendorService,
private route: ActivatedRoute,
) { }
async ngOnInit() {
this.activeProfile = this.route.snapshot.data.activeProfile;
this.subActiveProfile = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(async activeProfile => {
this.activeProfile = activeProfile;
});
this.uploadedImages = await this.vendorService.getVendorPhotos({ vendorId: this.activeProfile.id }).toPromise().then(response => {
return response.result;
});
}
ngOnDestroy() {
this.subActiveProfile.unsubscribe();
}
public removeImage(removedPhoto: any): void {
this.imagesToRemove.push(removedPhoto.id);
}
async submitPhotos() {
if (!this.images.length && !this.imagesToRemove.length) {
this.setStep.emit(3);
return;
}
this.submitted = true;
let photos = [];
for (let i = 0; i < this.images.length; i++) {
let image = this.images[i];
photos.push(image.file);
}
let formData = objectToFormData({
photos: photos.length ? photos : undefined,
deletedPhotos: this.imagesToRemove.length ? this.imagesToRemove : undefined
});
await this.vendorService.addVendorPhotos({ formData, vendorId: this.activeProfile.id }).toPromise().then(response => {
this.setStep.emit(3);
this.submitted = false;
this.error = null;
this.imagesToRemove = [];
}).catch(error => {
this.submitted = false;
this.error = error;
});
}
}
<file_sep>/nativescript-app/app/shared/pipes/full-date.pipe.ts
import { Pipe, PipeTransform } from '@angular/core';
import * as moment from 'moment';
import { DATE_FORMAT } from '~/shared/configs';
@Pipe({name: 'fullDate'})
export class FullDatePipe implements PipeTransform {
transform(item): any {
if (item) {
return moment(item).format(DATE_FORMAT);
} else {
return '';
}
}
}
<file_sep>/nativescript-app/app/modules/marketplace/modals/index.ts
export * from './writereview';
<file_sep>/nativescript-app/app/shared/components/create-profile/vendor/add-product/index.ts
export * from './add-product.modal';<file_sep>/nativescript-app/app/modules/auth/components/remind-password/remind-password.component.ts
import { Component } from '@angular/core';
import { RouterExtensions } from 'nativescript-angular/router'
import { AuthService } from '~/shared/services';
@Component({
moduleId: module.id,
selector: 'remind-password',
templateUrl: 'remind-password.component.html',
})
export class RemindPasswordComponent {
public email: string = '';
constructor(
private authService: AuthService, private routerExtensions: RouterExtensions
) {
console.log("---RemindPassword---")
}
public remindPassword(): void {
//this.authService.sendRemindPassword(this.email);
this.routerExtensions.back() //9.4 This is deleted after screen test
}
}
<file_sep>/nativescript-app/app/shared/services/notification.service.ts
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
// import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
import { API_URL } from '../configs/app.config';
@Injectable()
export class NotificationService {
private apiUrl: string = API_URL;
constructor(
private http: HttpClient
) {}
countUnreadNotifications(): Observable<any> {
return this.http.get<any[]>(this.apiUrl + '/notifications/count');
}
getNotifications(page): Observable<any> {
return this.http.get<any[]>(this.apiUrl + '/notifications?page=' + page);
}
markAsRead(): Observable<any> {
return this.http.patch<any[]>(this.apiUrl + '/notifications', {});
}
}
<file_sep>/nativescript-app/app/modules/marketplace/components/list/index.ts
export * from './marketplace-list.component';<file_sep>/nativescript-app/app/modules/marketplace/components/detail/detail.component.ts
import { ChangeDetectorRef, Component, OnDestroy, OnInit,Input, Inject } from '@angular/core';
import { Store } from '@ngrx/store';
import { Subscription, ISubscription } from 'rxjs/Subscription';
import { screen } from 'tns-core-modules/platform';
import { registerElement } from 'nativescript-angular/element-registry'
registerElement('StarRating', () => require('nativescript-star-ratings').StarRating)
import { WritereviewModal } from '~/modules/marketplace/modals';
import { RouterExtensions } from 'nativescript-angular/router'; //2018.9.4
import { State, Task, CommonModels, RootStoreState } from '~/root-store';
import { Wedding } from '~/root-store/wedding-store/models';
import { selectActiveWedding } from '~/root-store/wedding-store/selectors';
import { ModalService } from '~/shared/services/modal.service';
import { ActivatedRoute, Router } from '@angular/router';
import { VendorService } from '~/shared/services/vendor.service';
import { DomSanitizer, DOCUMENT } from '@angular/platform-browser';
import { Config, CDN_URL } from '~/shared/configs';
@Component({
moduleId: module.id,
selector: 'detail',
templateUrl: 'detail.component.html',
styleUrls: ['./detail.component.scss']
})
export class DetailComponent implements OnInit, OnDestroy {
public containerHeight;
activeProfile: CommonModels.Profile;
authInfo: any;
vendorId: string;
vendor: CommonModels.VendorDetails;
vendorProducts: CommonModels.VendorProduct[] = [];
vendorReview: any;
vendorReviews: any = [];
vendorReviewsLoadMore: boolean = false;
vendorReviewsPage: number = 1;
vendorReviewDetails: any;
routeSubscription: ISubscription;
updateReviewsSubscription: ISubscription;
// galleryOptions: NgxGalleryOptions[];
galleryImages = [];
navLinks: object[];
vendorReviewId: string;
conversationSubscription: ISubscription;
constructor(
private modalService: ModalService,
private routerExtensions: RouterExtensions,
private store: Store<RootStoreState.State>,
private route: ActivatedRoute,
private router: Router,
private vendorService: VendorService,
private sanitizer: DomSanitizer,
@Inject(DOCUMENT) private document: any
) {
this.containerHeight = screen.mainScreen.heightDIPs - 140; // Topbar height + some margin
console.log("---marketplace-detail---")
}
ngOnInit(): void {
console.log(Config.marketplaceID);
this.activeProfile = Config.activeProfile;
this.authInfo = Config.authInfo;
this.vendorId = Config.marketplaceID;
this.getVendorDetails();
// if (params.vendorReviewId) {
// this.vendorReviewId = params.vendorReviewId || null;
// this.getVendorReviewDetails();
// }
}
public getVendorReviews() {
this.vendorService.getVendorReviews({
vendorId: this.vendorId,
page: this.vendorReviewsPage
}).toPromise().then(response => {
console.log("vendor reviews: ");
console.log(response.result);
this.vendorReviews = this.vendorReviews.concat(response.result);
this.vendorReviewsLoadMore = response.result.length == 5 ? true : false;
});
}
public loadMoreVendorReviews() {
this.vendorReviewsPage++;
this.getVendorReviews();
}
getVendorReviewDetails() {
this.vendorService.getVendorReview({
vendorId: this.vendorId,
vendorReviewId: this.vendorReviewId
}).toPromise().then(response => {
console.log("get Vendor Review Details");
console.log(response);
this.vendorReviewDetails = response.result;
// setTimeout(() => {
// let pageScrollInstance: PageScrollInstance = PageScrollInstance.newInstance({
// document: this.document,
// scrollTarget: '#vendor-review-details',
// pageScrollOffset: 180,
// pageScrollSpeed: 1200
// });
// this.pageScrollService.start(pageScrollInstance);
// }, 500);
});
}
getVendorDetails() {
this.vendorService.getVendor({
vendorId: this.vendorId
}).toPromise().then(response => {
console.log("vendor details: ");
console.log(response.result);
this.vendor = response.result
this.initVendorDetails();
});
}
private initVendorDetails() {
this.vendorService.getVendorPhotos({
vendorId: this.vendorId
}).toPromise().then(response => {
console.log("Init Vendor Details");
console.log(response);
const cdnUrl = CDN_URL + '/vendor/' + this.vendor.id + '/photos/';
for (let i = 0; i < response.result.length; i++) {
const photo = response.result[i];
this.galleryImages.push({
small: cdnUrl + photo.filename.replace(/(\.[\w\d_-]+)$/i, '_sm$1'),
medium: cdnUrl + photo.filename.replace(/(\.[\w\d_-]+)$/i, '_lg$1'),
big: cdnUrl + photo.filename
});
}
});
this.vendorService.getVendorProducts({
vendorId: this.vendorId
}).toPromise().then(response => {
console.log("get Vendor Products");
console.log(response.result);
this.vendorProducts = response.result;
});
this.getVendorReviews();
this.navLinks = [
{
name: 'Photos',
target: '#vendor-photos',
isVisible: this.galleryImages.length
},
{
name: 'About',
target: '#vendor-description',
isVisible: true
},
{
name: 'Pricing',
target: '#vendor-pricing',
isVisible: this.vendorProducts.length
},
{
name: 'Reviews',
target: '#vendor-reviews',
isVisible: true
},
{
name: 'Contact',
target: '#vendor-contacts',
isVisible: true
}
]
}
async ngOnDestroy() {
// this.routeSubscription.unsubscribe();
if(this.updateReviewsSubscription) {
this.updateReviewsSubscription.unsubscribe();
}
if(this.conversationSubscription) {
this.conversationSubscription.unsubscribe();
}
}
openVendorReviewModal(options) {
// let modal = this.modalService.open(VendorReviewModalComponent);
// modal.componentInstance['modalOptions'] = options;
// modal.componentInstance['activeProfile'] = this.activeProfile;
// modal.componentInstance['vendorId'] = this.vendorId;
// this.updateReviewsSubscription = modal.componentInstance['updateReviews'].subscribe(value => {
// this.vendorReviewsPage = 1;
// this.vendor.isReviewed = true;
// this.getVendorDetails();
// this.getVendorReviews();
// });
}
// messageVendor() {
// this.conversationSubscription = this.store.select(
// MessageSelectors.selectConversation(this.vendorId)
// ).subscribe(conversation => {
// if(conversation.length) {
// this.router.navigate(['messages', conversation[0].id]);
// } else {
// let modal = this.modalService.open(VendorMessageModalComponent);
// modal.componentInstance['activeProfile'] = this.activeProfile;
// modal.componentInstance['vendorId'] = this.vendorId;
// }
// });
// this.conversationSubscription.unsubscribe();
// }
public openWritereviewModal(): void {
this.modalService.showModal(WritereviewModal, {})
.then((response: any) => {
console.log(response)
this.vendorReviewsPage = 1;
this.getVendorDetails();
// this.vendorReviews.unshift(Config.vendorReview);
// this.vendor.vendorReviewsCount = this.vendor.vendorReviewsCount+1;
});
}
selectTab(index){
console.log("tapped: "+index);
}
}
<file_sep>/nativescript-app/app/modules/social-feed/components/post-form/index.ts
export * from './post-form.component';<file_sep>/nativescript-app/app/root-store/profile-store/state.ts
import { Profile } from '../common-models';
export interface State {
activeProfile: Profile | null | boolean;
profiles: Profile[]
}
export const initialState: State = {
activeProfile: null,
profiles: []
};
<file_sep>/spa/src/app/root-store/auth-store/resolvers.ts
import { Store } from '@ngrx/store';
import { Injectable } from '@angular/core';
import { Resolve } from '@angular/router';
import { Observable } from 'rxjs/Observable';
import { map, take, filter, first } from 'rxjs/operators';
import { State } from './state';
import { AuthInfo } from './models';
import { selectAuthInfo } from './selectors'
@Injectable()
export class AuthInfoResolver implements Resolve<AuthInfo> {
constructor(
private store: Store<State>
) { }
resolve(): Observable<AuthInfo> {
return this.store.select(selectAuthInfo).pipe(
filter(authInfo => authInfo != null),
take(1)
);
}
}
<file_sep>/nativescript-app/app/modules/marketplace/components/list/marketplace-list.component.ts
import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import { Subscription } from 'rxjs/Subscription';
import { screen } from 'tns-core-modules/platform';
import { RouterExtensions } from 'nativescript-angular/router'; //2018.9.4
import { CreateTaskModal } from '~/modules/tasks/modals';
import { State, Task } from '~/root-store';
import { selectTasks } from '~/root-store/task-store/selectors';
import { Wedding } from '~/root-store/wedding-store/models';
import { selectActiveWedding } from '~/root-store/wedding-store/selectors';
import { ModalService } from '~/shared/services/modal.service';
import { VendorService } from '~/shared/services/vendor.service';
import * as geolib from 'geolib';
import { Config } from '~/shared/configs';
import * as Toast from 'nativescript-toast';
@Component({
moduleId: module.id,
selector: 'marketplace-list',
templateUrl: 'marketplace-list.component.html',
styleUrls: ['./marketplace-list.component.scss']
})
export class MarketplaceListComponent implements OnInit, OnDestroy {
public containerHeight;
vendors: any;
defaultFilters: any;
page: number;
infiniteScrollDisabled: boolean;
showRecommended: boolean = false;
skipProfilingTest: boolean = false;
profilingTest: any;
constructor(
private modalService: ModalService,
private store: Store<State>,
private changeDetector: ChangeDetectorRef,
private routerExtensions: RouterExtensions,
private vendorService: VendorService
) {
this.containerHeight = screen.mainScreen.heightDIPs - 140; // Topbar height + some margin
console.log("---marketplace-list---")
}
ngOnInit() {
this.vendors = [];
this.page = 1;
this.defaultFilters = {
categoryId: undefined,
lat: undefined,
lng: undefined,
rad: undefined,
rating: undefined,
rate: undefined
}
if( Config.previousUrl != 'filters' ) {
console.log("set default filter");
Config.filters = this.defaultFilters;
Config.filter_location_text = "";
}
console.log("filter options: ");
console.log(Config.filters);
this.profilingTest = localStorage.getItem('profilingTest') ? JSON.parse(localStorage.getItem('profilingTest')) : false;
this.skipProfilingTest = localStorage.getItem('skipProfilingTest') ? JSON.parse(localStorage.getItem('skipProfilingTest')) : false;
this.showRecommended = localStorage.getItem('showRecommended') ? JSON.parse(localStorage.getItem('showRecommended')) : false;
this.toggleRecommended(true);
Config.previousUrl = "marketplace-list";
}
// ngAfterViewInit() {
// setTimeout(() => {
// this.initProfilingTest();
// }, 0)
// }
getVendors(reset = false) {
if(reset) {
this.vendors = [];
this.page = 1;
this.infiniteScrollDisabled = false;
}
console.log(Config.filters);
this.vendorService.getVendors({
categoryId: Config.filters.categoryId,
lat: Config.filters.lat,
lng: Config.filters.lng,
rad: Config.filters.rad,
rating: Config.filters.rating,
rate: Config.filters.rate,
page: this.page
}).toPromise().then(response => {
response.result.map(vendor => {
if(this.isRecommended(vendor)){
vendor.isRecommended = true;
}
return vendor;
})
this.vendors = this.vendors.concat(response.result);
if (response.result.length < 20) {
this.infiniteScrollDisabled = true;
}
if(response.result.length == 0 ) {
Toast.makeText("No Data Found", "long").show();
}
});
}
loadMoreVendors() {
this.page++;
this.getVendors();
}
// setFilterCoordinates(event) {
// this.filters.lat = event.geometry.location.lat();
// this.filters.lng = event.geometry.location.lng();
// this.getVendors(true);
// }
// cityInputChange(value) {
// if (value == '') {
// this.filters.lat = undefined;
// this.filters.lng = undefined;
// this.getVendors(true);
// }
// }
// openProfilingTestModal() {
// let modal;
// modal = this.modalService.open(ProfilingTestComponent);
// modal.componentInstance['onSubmitEvent'].subscribe((profilingTest) => {
// this.profilingTest = profilingTest;
// this.toggleRecommended(true);
// });
// }
// initProfilingTest() {
// if (!this.profilingTest && !this.skipProfilingTest) {
// this.openProfilingTestModal();
// }
// }
toggleRecommended(value) {
this.showRecommended = value;
localStorage.setItem('showRecommended', JSON.stringify(value));
if (value) {
Config.filters = {
...Config.filters,
...this.profilingTest
}
} else {
Config.filters = Object.assign({}, this.defaultFilters);
}
this.getVendors(true);
}
isRecommended(vendor) {
if (!this.profilingTest) {
return false;
}
if (this.profilingTest.categoryId.indexOf(vendor.category.id) > -1) {
let distance = geolib.getDistance(
{ latitude: this.profilingTest.lat, longitude: this.profilingTest.lng },
{ latitude: vendor.lat, longitude: vendor.lng }
);
if(distance < 10000) {
return true;
}
}
}
ngOnDestroy(): void {
//this.tasksSubscription.unsubscribe();
//this.activeWeddingSubscription.unsubscribe();
}
public filter(): void {
//this.passwordInputRef.nativeElement.dismissSoftInput();
//this.authService.login(this.email, this.password);
this.routerExtensions.navigate(['/app', 'filters']); //2018.9.4 This is deleted after screen test
}
}
<file_sep>/nativescript-app/app/shared/types/enum/dialog-type.enum.ts
export enum DialogType {
Alert = <any>'alert',
Info = <any>'info',
Success = <any>'success'
}<file_sep>/nativescript-app/app/root-store/message-store/resolvers.ts
import { Store } from '@ngrx/store';
import { Injectable } from '@angular/core';
import { Resolve } from '@angular/router';
import { Observable } from 'rxjs/Observable';
import { take, filter } from 'rxjs/operators';
import { State } from './state';
//import { Profile } from '../common-models';
<file_sep>/website/src/container.ts
const { Lifetime, createContainer, asValue, asFunction, asClass } = require('awilix')
import Application from './Application';
import Server from './Server';
import router from './router';
import logger from 'helpers/logger';
import config from 'config';
import { scopePerRequest } from 'awilix-express';
const container = createContainer()
container
.register({
app: asClass(Application).singleton(),
server: asClass(Server).singleton(),
router: asFunction(router).singleton(),
logger: asFunction(logger).singleton(),
config: asValue(config),
scopePerRequest: asValue(scopePerRequest(container))
});
// Routes
container.loadModules([
'routes/*.js',
'controllers/*.js',
'services/*.js'
], {
cwd: __dirname,
registrationOptions: {
lifetime: Lifetime.SINGLETON,
register: asClass
},
formatName: 'camelCase'
});
export default container;
<file_sep>/spa/src/app/modules/wedding/components/information/index.ts
export * from './wedding-information.component';
<file_sep>/spa/src/app/modules/vendor-form/vendor-form.routing.ts
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { VendorFormComponent } from './vendor-form.component';
import { AuthGuard } from '../../shared/guards/auth.guard';
import { ProfileResolvers } from '../../root-store';
const routes: Routes = [
{
path: 'vendor', component: VendorFormComponent, canActivate: [AuthGuard]
}
];
export const routing: ModuleWithProviders = RouterModule.forChild(routes);
<file_sep>/nativescript-app/app/shared/interceptors/http-request.interceptor.ts
import { Injectable, Injector } from '@angular/core';
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
// import 'rxjs/add/operator/catch';
// import 'rxjs/add/observable/throw';
import { throwError } from 'rxjs';
import { filter, map, catchError } from 'rxjs/operators';
import { AuthService, DialogsService } from '~/shared/services';
import { DialogType } from '~/shared/types/enum';
@Injectable()
export class RequestInterceptor implements HttpInterceptor {
constructor(private injector: Injector) { }
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
const authService = this.injector.get(AuthService);
const dialogsService = this.injector.get(DialogsService);
const token = authService.getToken();
const authorization = `Bearer ${token}`;
const headers = {
'Content-Type': 'application/json'
// 'Content-Type':'application/x-www-form-urlencoded'
};
// console.log("Authorization: "+authorization);
if (token) {
headers['Authorization'] = authorization
}
req = req.clone({
setHeaders: headers
});
return next.handle(req).catch((response) => {
dialogsService.showDialog({
type: DialogType.Alert,
message: response.message
});
return throwError(response);
// return Observable.throw(response);
});
}
}<file_sep>/nativescript-app/app/root-store/auth-store/selectors.ts
import { createFeatureSelector, createSelector, MemoizedSelector } from '@ngrx/store';
import { AuthInfo } from './models';
import { State } from './state';
const getAuthInfo = (state: State): any => state.authInfo;
export const selectAuthState: MemoizedSelector<object,State> = createFeatureSelector<State>('auth');
export const selectAuthInfo: MemoizedSelector<object,AuthInfo> = createSelector(selectAuthState, getAuthInfo);
<file_sep>/nativescript-app/app/shared/services/profile.service.ts
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { Store } from '@ngrx/store';
import { WeddingService } from './wedding.service';
import { VendorService } from './vendor.service';
import { AuthService } from './auth.service';
import { MemberService } from './member.service';
import { API_URL } from '../configs/app.config';
import { RootStoreState, ProfileActions, MemberActions } from '~/root-store';
let localStorage = require( "nativescript-localstorage" );
@Injectable()
export class ProfileService {
private apiUrl: string = API_URL + '/weddings';
constructor(
private http: HttpClient,
private weddingService: WeddingService,
private vendorService: VendorService,
private authService: AuthService,
private memberService: MemberService,
private store: Store<RootStoreState.State>
) { }
async initProfiles(activeProfileId = null) {
let activeProfile = false;
let profiles = await this.getProfiles();
let authInfo = await this.authService.getAccountInfo().toPromise().then(response => {
return response.result;
});
if (profiles && profiles.length) {
this.store.dispatch(new ProfileActions.SetProfiles({ profiles }));
activeProfile = activeProfileId ? this.getProfile({ profiles, profileId: activeProfileId }) : await this.getActiveProfile({ profiles, authInfo });
if(activeProfile && activeProfile['type'] == 'wedding') {
this.initActiveProfileMembers(activeProfile);
}
}
this.store.dispatch(new ProfileActions.SetActiveProfile({ profile: activeProfile, accountId: authInfo.account.id }));
}
async initActiveProfileMembers(activeProfile) {
if (activeProfile && activeProfile.type == 'wedding') {
let members = await this.memberService.getMembers({
weddingId: activeProfile.id
}).toPromise().then(response => {
return response.result;
})
this.store.dispatch(new MemberActions.SetMembers({
members: members
}));
}
}
async getProfiles() {
console.log("profile.service->get profiles");
let profiles = [];
let weddings = await this.weddingService.getWeddings().toPromise().then(response => {
return response.result;
});
let vendors = await this.vendorService.getOwnedVendors().toPromise().then(response => {
return response.result;
});
weddings.concat(vendors).forEach(profile => {
profiles.push({
id: profile.id,
name: profile.name,
avatar: profile.avatar ? profile.avatar : null,
type: profile.member ? 'wedding' : 'vendor',
isOwner: profile.member ? (profile.member.role == 'owner' ? true : false) : true,
privacySetting: profile.privacySetting ? profile.privacySetting : null,
memberId: profile.member ? profile.member.id : null,
isActive: profile.isActive !== undefined ? profile.isActive : undefined
});
});
return profiles;
}
getProfile({ profiles, profileId }) {
if (profiles) {
for (let i = 0; i < profiles.length; i++) {
let profile = profiles[i];
if (profile.id == profileId) {
return profile;
}
}
}
return null;
}
getActiveProfile({ profiles, authInfo }) {
console.log("profile.service->getActiveProfile");
let activeProfile;
if (profiles) {
let localActiveProfileId = localStorage.getItem(authInfo.account.id + '-activeProfileId');
activeProfile = localActiveProfileId ? this.getProfile({ profiles, profileId: localActiveProfileId }) : profiles[0];
}
return activeProfile;
}
}
<file_sep>/spa/src/app/interceptors/request.interceptor.ts
import { Injectable, Injector } from '@angular/core';
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { AuthService } from '../root-store/services/auth.service';
@Injectable()
export class RequestInterceptor implements HttpInterceptor {
constructor(private injector: Injector) { }
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
const authService = this.injector.get(AuthService);
const token = authService.getToken();
const authorization = `Bearer ${token}`;
const headers = {};
if (token) {
headers['Authorization'] = authorization
}
req = req.clone({
setHeaders: headers
});
return next.handle(req);
}
}
<file_sep>/nativescript-app/app/shared/components/create-profile/vendor/index.ts
export * from './create-vendor.component';
export * from './profile';
export * from './photos';
export * from './products';
export * from './payment';
export * from './add-product';<file_sep>/spa/src/app/core/layout/layout.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { SharedModule } from '../../shared/shared.module';
import { NgbModule, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { NgSelectModule } from '@ng-select/ng-select';
import { MatIconModule } from '@angular/material';
import { LayoutComponent } from './layout.component';
import { NavbarComponent } from './components/navbar/navbar.component';
import { NavComponent } from './components/nav/nav.component';
import { WeddingMembersComponent } from './components/wedding-members/wedding-members.component';
import { ProfileSelectorComponent } from './components/profile-selector/profile-selector.component';
import { AddMemberModalComponent } from './components/add-member-modal/add-member-modal.component';
import { NotificationsIndicatorComponent } from './components/notifications-indicator/notifications-indicator.component';
import { MessagesIndicatorComponent } from './components/messages-indicator/messages-indicator.component';
import { FlashMessagesModule } from 'angular2-flash-messages';
import { AvatarModule } from '../../shared/avatar/avatar.module';
import { NgProgressModule, NgProgressBrowserXhr } from 'ngx-progressbar';
import { InfiniteScrollModule } from 'angular2-infinite-scroll';
@NgModule({
imports: [
CommonModule,
RouterModule,
FormsModule,
SharedModule,
NgSelectModule,
NgbModule.forRoot(),
MatIconModule,
FlashMessagesModule.forRoot(),
AvatarModule,
NgProgressModule,
InfiniteScrollModule
],
declarations: [
LayoutComponent,
NavbarComponent,
NavComponent,
WeddingMembersComponent,
ProfileSelectorComponent,
AddMemberModalComponent,
NotificationsIndicatorComponent,
MessagesIndicatorComponent
],
exports: [
LayoutComponent,
AddMemberModalComponent
],
providers: [
NgbActiveModal
]
})
export class LayoutModule { }
<file_sep>/nativescript-app/app/shared/components/location-input/index.ts
export * from './location-input.component';<file_sep>/spa/src/app/root-store/task-store/effects.ts
import { FlashMessagesService } from 'angular2-flash-messages';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { of } from 'rxjs';
import { catchError, exhaustMap, map, tap, withLatestFrom } from 'rxjs/operators';
import { environment } from '../../../environments/environment';
import { Store } from '@ngrx/store';
import { RootStoreState } from '../../root-store';
import { ConfirmDialogComponent } from "../../shared/confirm-dialog/confirm-dialog.component";
import {
TaskActionTypes,
GetTasks,
GetTasksSuccess,
GetTasksFailure,
AddTask,
AddTaskSuccess,
AddTaskFailure,
GetTaskDetails,
GetTaskDetailsSuccess,
GetTaskDetailsFailure,
ToggleTaskDetails,
DeleteTask,
DeleteTaskConfirm,
DeleteTaskSuccess,
DeleteTaskFailure,
ChangeTaskStatus,
ChangeTaskStatusSuccess,
ChangeTaskStatusFailure,
EditTask,
EditTaskSuccess,
EditTaskFailure,
GetTaskStats,
GetTaskStatsSuccess,
GetTaskStatsFailure
} from './actions';
import { TaskService } from '../services/task.service';
@Injectable()
export class TaskEffects {
constructor(
private actions$: Actions,
private taskService: TaskService,
private store: Store<RootStoreState.State>,
private _flashMessagesService: FlashMessagesService,
private modalService: NgbModal
) { }
truncate = (text) => {
if (text.length > 40) {
let limit = text.name.substr(0, 40).lastIndexOf(' ');
text = text.name.substr(0, limit) + ' ...';
}
return text;
}
@Effect()
getTasks$ = this.actions$.pipe(
ofType<GetTasks>(TaskActionTypes.GET_TASKS),
exhaustMap(action =>
this.taskService
.getTasks({
weddingId: action.payload.weddingId, options: {
lat: action.payload.lat, lng: action.payload.lng
}
})
.pipe(
map(response => new GetTasksSuccess({
tasks: response.result
}))
)
)
);
@Effect()
addTask$ = this.actions$.pipe(
ofType<AddTask>(TaskActionTypes.ADD_TASK),
exhaustMap(action => {
let task = action.payload.task;
return this.taskService
.addTask({
weddingId: action.payload.weddingId,
task: task
})
.pipe(
map(response => {
this._flashMessagesService.show('Task added successfully', { cssClass: 'alert-success', timeout: 3000 });
task.name = this.truncate(task.name);
return new AddTaskSuccess({
weddingId: action.payload.weddingId,
task: Object.assign({}, task, { id: response.result })
})
}),
catchError(error => of(new AddTaskFailure({ error: error.error })))
)
})
);
@Effect()
getTaskDetails$ = this.actions$.pipe(
ofType<GetTaskDetails>(TaskActionTypes.GET_TASK_DETAILS),
exhaustMap(action =>
this.taskService
.getTask({ weddingId: action.payload.weddingId, taskId: action.payload.taskId })
.pipe(
map(response => new GetTaskDetailsSuccess({
task: response.result
})),
catchError(error => of(new GetTaskDetailsFailure({ error: error.error })))
)
)
);
@Effect({ dispatch: false })
deleteTaskConfirm$ = this.actions$.pipe(
ofType<DeleteTaskConfirm>(TaskActionTypes.DELETE_TASK_CONFIRM),
tap(action => {
let modal = this.modalService.open(ConfirmDialogComponent, { backdrop: 'static' });
modal.componentInstance['data'] = {
title: action.payload.title,
text: action.payload.text,
confirm: action.payload.confirm
};
})
);
@Effect()
deleteTask$ = this.actions$.pipe(
ofType<DeleteTask>(TaskActionTypes.DELETE_TASK),
exhaustMap(action => {
return this.taskService
.deleteTask({
weddingId: action.payload.weddingId,
taskId: action.payload.taskId
})
.pipe(
map(response => {
this._flashMessagesService.show('Task deleted successfully', { cssClass: 'alert-success', timeout: 3000 });
return new DeleteTaskSuccess({
weddingId: action.payload.weddingId,
taskId: action.payload.taskId
})
}),
catchError(error => of(new DeleteTaskFailure({ error: error.error })))
)
})
);
@Effect()
changeTaskStatus$ = this.actions$.pipe(
ofType<ChangeTaskStatus>(TaskActionTypes.CHANGE_TASK_STATUS),
exhaustMap(action => {
let taskId = action.payload.taskId;
let status = action.payload.status;
return this.taskService
.changeTaskStatus({
weddingId: action.payload.weddingId,
taskId: taskId,
status: status
})
.pipe(
map(response => {
this._flashMessagesService.show('Updated', { cssClass: 'alert-success', timeout: 3000 });
return new ChangeTaskStatusSuccess({
weddingId: action.payload.weddingId,
taskId: taskId,
status: status
})
}),
catchError(error => of(new ChangeTaskStatusFailure({ error: error.error })))
)
})
);
@Effect()
changeTaskStatusSuccess$ = this.actions$.pipe(
ofType<any>(TaskActionTypes.TOGGLE_TASK_DETAILS, TaskActionTypes.CHANGE_TASK_STATUS_SUCCESS),
withLatestFrom(this.store),
map(([action, store]) => {
let taskId = action.payload.taskId;
return new GetTaskDetails({
weddingId: action.payload.weddingId,
taskId: taskId
});
})
);
@Effect()
editTask$ = this.actions$.pipe(
ofType<EditTask>(TaskActionTypes.EDIT_TASK),
exhaustMap(action => {
let task = action.payload.task;
return this.taskService
.editTask({
weddingId: action.payload.weddingId,
task: task
})
.pipe(
map(response => {
this._flashMessagesService.show('Updated', { cssClass: 'alert-success', timeout: 3000 });
task.name = this.truncate(task.name);
return new EditTaskSuccess({
weddingId: action.payload.weddingId,
task: task
})
}),
catchError(error => of(new EditTaskFailure({ error: error.error })))
)
})
);
@Effect()
getTaskStats$ = this.actions$.pipe(
ofType<any>(
TaskActionTypes.GET_TASK_STATS,
TaskActionTypes.ADD_TASK_SUCCESS,
TaskActionTypes.DELETE_TASK_SUCCESS,
TaskActionTypes.CHANGE_TASK_STATUS_SUCCESS,
TaskActionTypes.CHANGE_TASK_STATUS_SUCCESS
),
exhaustMap(action =>
this.taskService
.getTaskStats({ weddingId: action.payload.weddingId })
.pipe(
map(response => new GetTaskStatsSuccess({
stats: response.result
}))
)
)
);
}
<file_sep>/nativescript-app/app/modules/social-feed/components/comment-form/comment-form.component.ts
import {
Component,
EventEmitter,
OnInit,
Input,
Output,
ChangeDetectorRef
} from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { AuthInfo } from '~/root-store/auth-store/models';
import { Wedding } from '~/root-store/wedding-store/models';
import { DialogsService } from '~/shared/services';
import { PostService } from '~/shared/services/post.service';
import { DialogType } from '~/shared/types/enum';
import { CommonModels } from '~/root-store';
import { Config } from '~/shared/configs';
@Component({
selector: 'comment-form',
templateUrl: 'comment-form.component.html',
styleUrls: ['./comment-form.component.scss']
})
export class CommentFormComponent implements OnInit {
@Input() asWedding: boolean;
@Input() postId: string;
@Input() postWeddingId: string;
@Input() authInfo: AuthInfo;
@Input() comment: any;
@Input() editForm = false;
@Output() onSuccess = new EventEmitter<any>();
@Output() cancelEditEvent = new EventEmitter();
public commentFormData: any;
activeProfile: CommonModels.Profile;
active: boolean;
constructor(
private route: ActivatedRoute,
private postService: PostService,
private dialogsService: DialogsService,
private changeDetector: ChangeDetectorRef
) {
}
ngOnInit() {
if (!this.editForm) {
this.commentFormData = {
text: ''
};
} else {
this.commentFormData = Object.assign({}, this.comment);
this.changeDetector.markForCheck();
}
this.activeProfile = Config.activeProfile;
// console.log("comment-form ngOnInit");
// console.log(this.activeWedding);
}
public onSubmit() {
if (this.editForm) {
this.postService.editComment({
weddingId: this.postWeddingId,
postId: this.postId,
commentId: this.comment.id,
text: this.commentFormData.text
}).toPromise().then(() => {
this.onSuccess.emit(this.commentFormData.text);
this.cancelEdit();
}).catch(() => {
this.dialogsService.showDialog({
message: 'Comment edit failed',
type: DialogType.Alert
});
});
} else {
this.commentFormData = Object.assign(this.commentFormData, {
authorWeddingId: this.activeProfile ? this.activeProfile.id : undefined,
asWedding: this.asWedding
});
console.log(this.commentFormData);
this.postService.addPostComment({
weddingId: this.postWeddingId,
postId: this.postId,
comment: this.commentFormData
/*{
authorWeddingId: this.activeWedding ? this.activeWedding.id : undefined,
asWedding: this.asWedding,
text: this.commentFormData.text
}*/
}).subscribe(response => {
const commentId = response.result;
this.resetForm();
this.postService.getPostComment({
weddingId: this.postWeddingId,
postId: this.postId,
commentId: commentId
}).toPromise().then(response => {
this.onSuccess.emit(response.result);
});
}, (error) => {
console.log(error);
});
}
}
resetForm() {
this.commentFormData.text = null;
}
public cancelEdit(): void {
this.cancelEditEvent.next();
}
public setValue(valueName: string, element: any, useParam?: string): void {
const value = useParam ? element[useParam] : element;
this.commentFormData[valueName] = value;
}
public onTextViewLoaded(args): void {
args.object.focus();
}
}
<file_sep>/spa/src/app/modules/vendor/vendor.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { FormsModule } from '@angular/forms';
import { NgxGalleryModule } from 'ngx-gallery';
import { MatIconModule } from '@angular/material';
import { NguiStickyModule } from '@ngui/sticky';
import { NgxPageScrollModule } from 'ngx-page-scroll';
import { NgxScrollSpyDirective } from '../../shared/directives/ngx-scroll-spy.directive';
import { SharedModule } from '../../shared/shared.module';
import { VendorComponent } from './vendor.component';
import { VendorReviewComponent } from './components/vendor-review/vendor-review.component';
import { VendorReviewModalComponent } from './components/vendor-review-modal/vendor-review-modal.component';
import { VendorMessageModalComponent } from './components/vendor-message-modal/vendor-message-modal.component';
import { routing } from './vendor.routing';
import { LayoutModule } from '../../core/layout/layout.module';
const getWindow = () => window;
@NgModule({
imports: [
CommonModule,
RouterModule,
FormsModule,
routing,
LayoutModule,
SharedModule,
NgxGalleryModule,
MatIconModule,
NguiStickyModule,
NgxPageScrollModule
],
declarations: [
VendorComponent,
VendorReviewComponent,
VendorReviewModalComponent,
VendorMessageModalComponent,
NgxScrollSpyDirective
],
exports: [
VendorComponent
],
entryComponents: [
VendorReviewModalComponent,
VendorMessageModalComponent
]
})
export class VendorModule { }
<file_sep>/spa/src/app/modules/settings/components/invitations/invitations.component.ts
import {
ChangeDetectorRef,
Component,
OnDestroy,
OnInit
} from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { FlashMessagesService } from 'angular2-flash-messages';
import { Subscription } from 'rxjs';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { ISubscription } from 'rxjs/Subscription';
import { Store } from '@ngrx/store';
import {
RootStoreState,
AuthSelectors,
CommonModels
} from '../../../../root-store';
import { Invitation } from '../../../../root-store/member-store/models';
import { MemberService } from '../../../../root-store/services/member.service';
@Component({
selector: 'app-settings-invitations',
templateUrl: './invitations.component.html',
})
export class SettingsWeddingInvitationsComponent implements OnInit, OnDestroy {
private authInfoSubscription: Subscription;
private accountId: string;
public invitations: Array<Invitation>;
private activeProfile: CommonModels.Profile;
constructor(
private modalService: NgbModal,
private store: Store<RootStoreState.State>,
private membersService: MemberService,
private changeDetector: ChangeDetectorRef,
private _flashMessagesService: FlashMessagesService,
private route: ActivatedRoute
) {
}
ngOnInit() {
this.activeProfile = this.route.parent.snapshot.data.activeProfile;
if (this.activeProfile) {
this.getInvitations();
}
this.authInfoSubscription = this.store.select(
AuthSelectors.selectAuthInfo
).subscribe(authInfo => {
this.accountId = authInfo.account.id;
});
}
ngOnDestroy() {
this.authInfoSubscription.unsubscribe();
}
private getInvitations(): void {
this.membersService.getInvitations().subscribe(
(res) => {
this.invitations = res.result;
this.changeDetector.markForCheck();
},
(err) => {
this._flashMessagesService.show(err.error, { cssClass: 'alert-danger', timeout: 3000 });
}
);
}
public rejectInvitation(invitation: Invitation): void {
this.membersService.rejectInvite({ invitationId: invitation.id }).subscribe(
() => {
this.getInvitations();
this._flashMessagesService.show('Invitation rejected', { cssClass: 'alert-success', timeout: 3000 });
},
() => {
this._flashMessagesService.show('Rejecting invitation failed, please contact support if this keeps repeating',
{ cssClass: 'alert-danger', timeout: 3000 }
);
}
);
}
public acceptInvitation(invitation: Invitation): void {
this.membersService.acceptInvite({ weddingId: invitation.wedding.id, invitationId: invitation.id, memberId: invitation.member.id })
.subscribe(() => {
this.getInvitations();
this._flashMessagesService.show('Invitation accepted', { cssClass: 'alert-success', timeout: 3000 });
},
() => {
this._flashMessagesService.show('Accepting invitation failed, please contact support if this keeps repeating',
{ cssClass: 'alert-danger', timeout: 3000 }
);
});
}
}
<file_sep>/nativescript-app/app/shared/components/avatar/avatar.component.ts
import { Component, Input, OnInit, OnChanges, SimpleChanges } from '@angular/core';
import { CDN_URL } from '~/shared/configs';
@Component({
selector: 'avatar',
templateUrl: 'avatar.component.html',
styleUrls: ['./avatar.component.scss']
})
export class AvatarComponent implements OnInit, OnChanges {
@Input() filename;
@Input() size;
@Input() src;
@Input() dir;
@Input() square = false;
imageSrc: string;
constructor() { }
getUrl() {
if (this.src) {
this.imageSrc = this.src;
return;
}
if (this.filename) { // TODO use env for cdn link
this.imageSrc = CDN_URL + '/' + (this.dir ? this.dir + '/' : '') + this.filename.replace(/(\.[\w\d_-]+)$/i, '_sq$1');
} else {
this.imageSrc = '~/resources/images/avatar.png';
}
}
ngOnInit() {
this.getUrl();
}
ngOnChanges(changes: SimpleChanges) {
for(let key in changes) {
this[key] = changes[key].currentValue;
}
this.getUrl();
}
}
<file_sep>/spa/src/app/modules/guest-list/components/guest-form-modal/guest-form-modal.component.ts
import { Component, OnInit, OnDestroy, EventEmitter } from '@angular/core';
import { ISubscription } from 'rxjs/Subscription';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { Router, ActivatedRoute } from '@angular/router';
import { Store } from '@ngrx/store';
import { FlashMessagesService } from 'angular2-flash-messages';
import { GuestService } from '../../../../root-store/services/guest.service';
import { environment } from '../../../../../environments/environment';
import {
RootStoreState,
ProfileSelectors,
CommonModels
} from '../../../../root-store';
@Component({
selector: 'app-guest-form-modal',
templateUrl: './guest-form-modal.component.html',
styleUrls: ['./guest-form-modal.component.sass']
})
export class GuestFormModalComponent implements OnInit, OnDestroy {
mode: string;
onSubmitEvent: EventEmitter<any> = new EventEmitter();
activeProfile: CommonModels.Profile;
subscriptionActiveProfile: ISubscription;
guest: {
id: string,
firstName: string,
lastName: string,
email?: string,
receptionStatusId: number,
ceremonyStatusId: number,
guestRoleId?: number,
guestSideId?: number,
rsvp: boolean
}
guestSides: object[] = [];
guestRoles: object[] = [];
guestStatuses: object[] = [];
submitted: boolean;
error: any;
constructor(
public activeModal: NgbActiveModal,
private store: Store<RootStoreState.State>,
private route: ActivatedRoute,
private guestService: GuestService,
private flashMessagesService: FlashMessagesService
) { }
async ngOnInit() {
this.submitted = false;
if(!this.guest) {
this.guest = {
id: null,
firstName: null,
lastName: null,
email: null,
ceremonyStatusId: 2,
receptionStatusId: 2,
rsvp: false
}
}
this.subscriptionActiveProfile = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
this.activeProfile = activeProfile;
});
this.guestService.getGuestSides().toPromise().then(response => {
this.guestSides = response.result;
});
this.guestService.getGuestRoles().toPromise().then(response => {
this.guestRoles = response.result;
});
this.guestService.getGuestStatuses().toPromise().then(response => {
this.guestStatuses = response.result;
});
}
ngOnDestroy() {
this.subscriptionActiveProfile.unsubscribe();
}
cancel() {
this.activeModal.close();
}
async onSubmit() {
this.submitted = true;
let serviceMethod;
if(this.mode == 'add') {
serviceMethod = this.guestService.addGuest({
guest: this.guest,
weddingId: this.activeProfile.id
});
} else {
serviceMethod = this.guestService.editGuest({
guest: this.guest,
weddingId: this.activeProfile.id,
guestId: this.guest.id
});
}
serviceMethod.toPromise().then(response => {
this.submitted = false;
this.flashMessagesService.show(`Guest ${this.mode == 'add' ? 'added' : 'edited'} successfully`, { cssClass: 'alert-success', timeout: 3000 });
this.activeModal.close();
this.onSubmitEvent.emit(true);
}).catch(response => {
this.submitted = false;
this.error = response.error;
});
}
}
<file_sep>/spa/src/app/modules/tasks/components/task-form-modal/task-form-modal.component.ts
import { Component, OnInit, TemplateRef, ViewChild, Input } from '@angular/core';
import { DatepickerOptions, NgDatepickerComponent } from 'ng2-datepicker';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ActivatedRoute } from '@angular/router';
import { ISubscription } from "rxjs/Subscription";
import { Observable } from "rxjs/Observable";
import { Store } from '@ngrx/store';
import { TranslateService } from '@ngx-translate/core';
import {
RootStoreState,
TaskActions,
TaskModels,
TaskSelectors,
MemberActions,
MemberSelectors,
MemberModels,
CommonModels
} from '../../../../root-store';
@Component({
selector: 'task-form-modal',
templateUrl: './task-form-modal.component.html',
styleUrls: ['./task-form-modal.component.sass']
})
export class TaskFormModalComponent implements OnInit {
@ViewChild('datepicker') private datepicker: NgDatepickerComponent;
@Input() data: {
action: string,
activeProfile: CommonModels.Profile,
task?: any
};
submitted: boolean;
error: any;
modalRef: NgbModalRef;
task: Pick<TaskModels.Task, 'id' | 'name' | 'dueDate' | 'assignedMemberId'>;
initTask: Pick<TaskModels.Task, 'id' | 'name' | 'dueDate' | 'assignedMemberId'>;
subTaskForm: ISubscription;
subTask: ISubscription;
members: Observable<MemberModels.Member[]>
constructor(
private modalService: NgbModal,
private store: Store<RootStoreState.State>,
public activeModal: NgbActiveModal,
private route: ActivatedRoute,
private translate: TranslateService
) { }
dpOptions: DatepickerOptions = {
minDate: new Date(Date.now()),
barTitleFormat: 'MMMM YYYY',
placeholder: 'Click to select a date',
addClass: 'ngx-datepicker-input-custom',
useEmptyBarTitle: false
};
ngOnInit() {
this.initTask = {
id: null,
name: null,
dueDate: null,
assignedMemberId: null
}
this.task = { ...this.initTask };
this.subTaskForm = this.store.select(
TaskSelectors.selectUITaskForm
).subscribe(taskForm => {
this.submitted = taskForm.submitted;
this.error = taskForm.error;
if (taskForm.modalOpen === false && this.activeModal) {
this.activeModal.close();
}
});
if (this.data.activeProfile) {
this.members = this.store.select(
MemberSelectors.selectMembers
);
if (this.data.task) {
this.store.dispatch(new TaskActions.GetTaskDetails({
weddingId: this.data.activeProfile.id,
taskId: this.data.task.id
}));
this.store.select(
TaskSelectors.selectTaskDetails(this.data.task.id)
).subscribe(task => {
this.task = task;
});
}
}
this.translate.get('Click to select a date').subscribe(res => {
this.dpOptions.placeholder = res;
})
}
ngOnDestroy() {
if (this.subTaskForm) {
this.subTaskForm.unsubscribe();
}
if (this.subTask) {
this.subTask.unsubscribe();
}
}
onSubmit() {
if (this.data.action == 'edit') {
this.store.dispatch(new TaskActions.EditTask({
weddingId: this.data.activeProfile.id,
task: this.task
}));
} else if (this.data.action == 'add') {
this.store.dispatch(new TaskActions.AddTask({
weddingId: this.data.activeProfile.id,
task: this.task
}));
}
}
cancel() {
if (this.data.action == 'edit') {
this.store.dispatch(new TaskActions.EditTaskCancel());
} else if (this.data.action == 'add') {
this.store.dispatch(new TaskActions.AddTaskCancel());
}
this.activeModal.close();
}
memberSearchFn(term: string, member: MemberModels.Member) {
term = term.toLocaleLowerCase();
return (member.account && (member.account.firstName.toLocaleLowerCase() + ' ' + member.account.lastName.toLocaleLowerCase()).indexOf(term) > -1)
|| member.email.toLocaleLowerCase().indexOf(term) > -1;
}
clearDueDate(task) {
task.dueDate = null;
this.datepicker.innerValue = null;
this.datepicker.date = null;
this.datepicker.init();
}
}
<file_sep>/nativescript-app/app/shared/components/main/index.ts
export * from './logged-in-app.component';<file_sep>/nativescript-app/app/shared/components/create-profile/couple/profile/index.ts
export * from './create-couple-profile.component';<file_sep>/nativescript-app/app/root-store/task-store/models.ts
export interface Task {
id: string;
name: string;
status: string;
overdue: boolean;
dueDate: string | null;
assignedMemberId: string | null;
}
export interface TaskDetails {
id: string;
name: string;
status: string;
dueDate: string | null;
doneAt: string | null;
createdAt: string;
isAssigned: boolean;
author: {
id: string;
email: string;
account: {
id: string;
firstName: string;
lastName: string;
email: string;
}
},
assigned: {
id: string;
email: string;
account: {
id: string;
firstName: string;
lastName: string;
email: string;
}
} | null
}
<file_sep>/spa/src/app/root-store/member-store/state.ts
import { Member } from './models';
export interface State {
members: Member[];
}
export const initialState: State = {
members: []
};
<file_sep>/nativescript-app/app/modules/marketplace/modals/writereview/writereview.modal.ts
import { Component, OnInit, Output, EventEmitter } from '@angular/core';
import { ModalDialogParams } from 'nativescript-angular/directives/dialogs';
import { screen } from 'tns-core-modules/platform';
import { CommonModels } from '~/root-store';
import { VendorService } from '~/shared/services/vendor.service';
import * as Toast from 'nativescript-toast';
import { Config } from '~/shared/configs';
import { TextField } from 'tns-core-modules/ui/text-field/text-field';
@Component({
selector: 'writereview',
templateUrl: 'writereview.modal.html',
})
export class WritereviewModal implements OnInit{
public width: any;
private values: any = {
firstName: '',
lastName: '',
side: '',
role: '',
email: '',
sendRSVP: ''
};
activeProfile: CommonModels.Profile;
vendorId: string;
vendorReview: any;
modalOptions: any;
submitted: boolean = false;
error: any;
@Output() updateReviews = new EventEmitter<boolean>();
constructor(
private params: ModalDialogParams,
private vendorService: VendorService,
) {
this.width = screen.mainScreen.widthDIPs;
}
ngOnInit() {
this.activeProfile = Config.activeProfile;
this.vendorId = Config.marketplaceID;
let initVendorReview = {
id: null,
text: "",
rating: 0,
authorWeddingId: this.activeProfile.id
}
this.vendorReview = { ...initVendorReview };
console.log("Writereview modal ngOninit");
console.log(this.vendorReview.rating);
}
public close(values?: any): void {
this.params.closeCallback(values);
}
valueChanged(value){
console.log(value);
this.vendorReview.rating = value;
}
public onFieldChange(args: any, field: string): void {
let textField = <TextField>args.object;
this.vendorReview.text = textField.text;
}
public submit(): void {
this.submitted = true;
let filesFormData = new FormData();
let vendorReviewToSave = Object.assign({}, this.vendorReview);
let serviceMethod;
console.log("submit");
console.log(this.vendorReview);
if (this.vendorReview.id) {
} else {
serviceMethod = this.vendorService.addVendorReview({
vendorId: this.vendorId,
vendorReview: this.vendorReview
}).toPromise();
}
serviceMethod.then(response => {
console.log("add review");
console.log(response);
this.submitted = false;
Toast.makeText(`Review ${this.vendorReview.id ? 'updated' : 'added'} successfully`, "long").show();
// this.flashMessagesService.show(`Review ${this.vendorReview.id ? 'updated' : 'added'} successfully`, { cssClass: 'alert-success', timeout: 3000 });
Config.vendorReview = this.vendorReview;
this.updateReviews.emit(true);
this.close(this.values);
}).catch(error => {
console.log("add review error");
console.log(error);
this.submitted = false;
this.error = error.error;
});
this.close(this.values);
}
setValue(){
}
}<file_sep>/spa/src/app/core/layout/components/nav/nav.component.ts
import { Component, OnInit, OnDestroy, Input } from '@angular/core';
import { ISubscription } from "rxjs/Subscription";
import { Store } from '@ngrx/store';
import {
RootStoreState,
CommonModels,
ProfileSelectors
} from '../../../../root-store';
@Component({
selector: 'app-nav',
templateUrl: './nav.component.html',
styleUrls: ['./nav.component.sass']
})
export class NavComponent implements OnInit, OnDestroy {
activeProfile: CommonModels.Profile;
activeProfileSubscription: ISubscription;
_collapseNav: boolean
@Input() set collapseNav(value: boolean) {
this._collapseNav = value;
}
constructor(
private store: Store<RootStoreState.State>
) { }
ngOnInit() {
this.activeProfileSubscription = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
this.activeProfile = activeProfile
});
}
ngOnDestroy() {
this.activeProfileSubscription.unsubscribe();
}
}
<file_sep>/spa/src/app/root-store/profile-store/resolvers.ts
import { Store } from '@ngrx/store';
import { Injectable } from '@angular/core';
import { Resolve } from '@angular/router';
import { Observable } from 'rxjs/Observable';
import { take, filter } from 'rxjs/operators';
import { State } from './state';
import { Profile } from '../common-models';
import { selectActiveProfile } from './selectors';
@Injectable()
export class ActiveProfileResolver implements Resolve<Profile> {
constructor(
private store: Store<State>
) { }
resolve(): Observable<Profile> {
return this.store.select(selectActiveProfile).pipe(
filter(profile => profile != null),
take(1)
);
}
}
<file_sep>/nativescript-app/app/modules/wedding/wedding.routing.ts
import { CoupleProfileComponent, GuestListComponent } from '~/modules/wedding/components';
export const weddingRouting = [
{
path: 'guest-list',
component: GuestListComponent,
},
{
path: 'couple-profile',
component: CoupleProfileComponent
}
];<file_sep>/nativescript-app/app/shared/services/post.service.ts
import {URLSearchParams} from '@angular/http';
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { Store } from '@ngrx/store';
import { State } from '~/root-store';
import { API_URL } from '~/shared/configs';
import { Photo, Post } from '~/shared/types/models/social-feed';
@Injectable()
export class PostService {
private apiUrl: string = API_URL;
constructor(
private store: Store<State>,
private http: HttpClient
) {
}
public getAllPosts({page, followed = false}): Observable<any> {
return this.http.get<Post[]>(`${this.apiUrl }/posts?page=${ (page || 1)}${followed ? '&followed=true' : ''}`);
}
public getPosts({page, weddingId}): Observable<any> {
return this.http.get<Post[]>(this.apiUrl + '/weddings/' + weddingId + '/posts?page=' + (page || 1));
}
public getPost({postId, weddingId}): Observable<any> {
return this.http.get<Post[]>(this.apiUrl + '/weddings/' + weddingId + '/posts/' + postId);
}
public addPost({weddingId, post}): Observable<any> {
console.log(this.apiUrl + '/weddings/' + weddingId + '/posts', post);
// return this.http.post(this.apiUrl + '/weddings/' + weddingId + '/posts', post);
return this.http.post(this.apiUrl + '/weddings/' + weddingId + '/posts', post);
}
public getPostComments({weddingId, postId, page}: { weddingId: string, postId: string, page?: number }): Observable<any> {
return this.http.get(this.apiUrl + '/weddings/' + weddingId + '/posts/' + postId + '/comments?page=' + (page || 1));
}
public addPostComment({weddingId, postId, comment}): Observable<any> {
console.log(this.apiUrl + '/weddings/' + weddingId + '/posts/' + postId + '/comments', comment);
return this.http.post(this.apiUrl + '/weddings/' + weddingId + '/posts/' + postId + '/comments', comment);
}
public getPostComment({weddingId, postId, commentId}): Observable<any> {
return this.http.get(this.apiUrl + '/weddings/' + weddingId + '/posts/' + postId + '/comments/' + commentId);
}
public likePost({weddingId, postId, like}): Observable<any> {
return this.http.post(this.apiUrl + '/weddings/' + weddingId + '/posts/' + postId + '/likes', like);
}
public unlikePost({weddingId, postId, likeId}): Observable<any> {
return this.http.delete(this.apiUrl + '/weddings/' + weddingId + '/posts/' + postId + '/likes/' + likeId);
}
public getLikes({weddingId, postId}): Observable<any> {
return this.http.get(this.apiUrl + '/weddings/' + weddingId + '/posts/' + postId + '/likes');
}
public getPhotos({page, weddingId}): Observable<any> {
return this.http.get<Photo[]>(this.apiUrl + '/weddings/' + weddingId + '/photos?page=' + (page || 1));
}
public deletePhoto({weddingId, photoId}): Observable<any> {
return this.http.delete(`${this.apiUrl}/weddings/${weddingId}/photos/${photoId}`);
}
public deletePost({weddingId, postId}): Observable<any> {
return this.http.delete(`${this.apiUrl}/weddings/${weddingId}/posts/${postId}`);
}
public editPost({weddingId, postId, params}): Observable<any> {
const headers = new HttpHeaders();
headers.append('Content-Type', 'application/form-data');
return this.http.patch(`${this.apiUrl}/weddings/${weddingId}/posts/${postId}`, params, {
headers
});
}
public editComment({weddingId, postId, commentId, text}): Observable<any> {
return this.http.patch(`${this.apiUrl}/weddings/${weddingId}/posts/${postId}/comments/${commentId}`,
{
text
}
);
}
public deleteComment({weddingId, postId, commentId}): Observable<any> {
return this.http.delete(`${this.apiUrl}/weddings/${weddingId}/posts/${postId}/comments/${commentId}`);
}
}
<file_sep>/nativescript-app/app/shared/components/member/member.component.ts
import { Component, Input } from '@angular/core';
import { Store } from '@ngrx/store';
import { State } from '~/root-store';
import { ModalService } from '~/shared/services';
@Component({
moduleId: module.id,
selector: 'member',
templateUrl: 'member.component.html',
styleUrls: ['./member.component.scss']
})
export class MemberComponent {
@Input() member: any;
constructor(
private modalService: ModalService,
private store: Store<State>,
) {
}
public delete(): void {
// TODO delete
}
public update(member: any, update): void {
// TODO update
}
}
<file_sep>/nativescript-app/app/modules/wedding/modals/delete-edit/delete-edit.modal.ts
import { Component } from '@angular/core';
import { ModalDialogParams } from 'nativescript-angular/directives/dialogs';
import { screen } from 'tns-core-modules/platform';
@Component({
selector: 'delete-edit',
templateUrl: 'delete-edit.modal.html',
})
export class DeleteeditModal {
public width: any;
constructor(
private params: ModalDialogParams
) {
this.width = screen.mainScreen.widthDIPs;
}
}<file_sep>/nativescript-app/app/modules/auth/auth.module.ts
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NativeScriptRouterModule } from 'nativescript-angular';
import {
LoginComponent,
RegisterComponent,
RemindPasswordComponent,
SetPasswordComponent,
AccountsettingsComponent,
WelcomeComponent
} from '~/modules/auth/components';
import { SharedModule } from '../shared.module';
import { authRoutes } from './auth.routing';
@NgModule({
declarations: [
LoginComponent,
RegisterComponent,
RemindPasswordComponent,
SetPasswordComponent,
AccountsettingsComponent,
WelcomeComponent,
],
imports: [
CommonModule,
HttpClientModule,
SharedModule,
NativeScriptRouterModule,
NativeScriptRouterModule.forRoot(authRoutes)
],
exports: [
AccountsettingsComponent,
NativeScriptRouterModule
]
})
export class AuthModule { }<file_sep>/nativescript-app/app/shared/components/create-profile/vendor/photos/index.ts
export * from './create-vendor-photos.component';<file_sep>/nativescript-app/app/shared/modals/upload/upload.modal.ts
import { ChangeDetectorRef, Component } from '@angular/core';
import { ModalDialogParams } from 'nativescript-angular/directives/dialogs';
import { requestPermissions, takePicture } from 'nativescript-camera';
import * as imagepickerModule from 'nativescript-imagepicker';
import * as permissions from "nativescript-permissions";
import { ImageAsset } from 'tns-core-modules/image-asset';
import * as platformModule from 'tns-core-modules/platform';
import { DialogsService } from '~/shared/services';
import { DialogType } from '~/shared/types/enum';
import { ImageSource } from 'tns-core-modules/image-source/image-source';
import { knownFolders, path } from 'tns-core-modules/file-system/file-system';
declare const android: any;
@Component({
selector: 'upload-modal',
templateUrl: 'upload.modal.html',
})
export class UploadModal {
private imagePicker;
constructor(
private params: ModalDialogParams,
private changeDetector: ChangeDetectorRef,
private dialogService: DialogsService,
) {
}
public selectPicture(): any {
if (platformModule.device.os === 'Android' && parseInt(platformModule.device.sdkVersion) >= 23) {
const hasPermission = permissions.hasPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE);
if( hasPermission) {
this.startSelection();
} else {
permissions.requestPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE).then(
() => {
this.startSelection();
}, (e) => {
this.dialogService.showDialog({
type: DialogType.Alert,
message: e.message
})
}
)
}
} else {
this.startSelection();
}
}
public close(param?: any): void {
this.params.closeCallback(param);
}
public takePicture(): any {
this.requestPermission().then(() => {
takePicture().then(
(image: ImageAsset) => {
const imageUrl = platformModule.isAndroid ? image.android : image.ios;
const source = new ImageSource();
source.fromAsset(image)
.then((imageSource: ImageSource) => {
const folderPath: string = knownFolders.documents().path;
var originPathSplited = imageUrl.split("/");
var origFilename = originPathSplited[originPathSplited.length-1];
const fileName = origFilename;
const filePath = path.join(folderPath, fileName);
const saved: boolean = imageSource.saveToFile(filePath, "jpeg");
if (saved) {
console.log("Image saved locally!");
this.close(filePath);
}
}, error => {
console.log("image assets to image source error");
console.log(error);
});
// var filePath = fs.path.join(fs.knownFolders.documents().path, origFilename);
// var imageSource = fromFile(image);
// var saved = imageSource.saveToFile(filePath, "jpeg");
// console.log("new path: " + filePath);
// console.log(`item saved:${saved}`);
}
).catch(err => {
this.dialogService.showDialog({
type: DialogType.Alert,
message: err.message
})
})
}, (err) => {
this.dialogService.showDialog({
type: DialogType.Alert,
message: err.message
})
});
}
private startSelection() {
// TODO fix for multiple if multiple is needed
this.imagePicker = imagepickerModule.create({
mode: 'single'
});
this.imagePicker
.authorize()
.then(() => {
return this.imagePicker.present();
})
.then( (selection) => {
// TODO fix for multiple if multiple is needed (close with array of imageUrls)
selection.forEach((selected_item) => {
const imageUrl = platformModule.isAndroid ? selected_item.android : selected_item.ios;
this.close(imageUrl);
});
}).catch((e) => {
this.dialogService.showDialog({
type: DialogType.Alert,
message: e,
})
}
);
}
private requestPermission(): Promise<any> {
return requestPermissions();
}
}<file_sep>/spa/src/app/modules/settings/components/wedding/wedding-partners/index.ts
export * from './wedding-partners.component';
<file_sep>/nativescript-app/app/modules/social-feed/components/post/post.component.ts
import {
Component,
OnInit,
OnDestroy,
Input,
Output,
EventEmitter,
ChangeDetectorRef
} from '@angular/core';
import { Store } from '@ngrx/store';
import { ISubscription } from 'rxjs/Subscription';
import { ActivatedRoute } from '@angular/router';
import * as dialogs from 'ui/dialogs';
const PhotoViewer = require('nativescript-photoviewer');
import { State, CommonModels } from '~/root-store';
import { AuthInfo } from '~/root-store/auth-store/models';
import { selectAuthInfo } from '~/root-store/auth-store/selectors';
import { Wedding, PrivacySettingEnum } from '~/root-store/wedding-store/models';
import { selectActiveWedding } from '~/root-store/wedding-store/selectors';
import { CDN_URL, Config } from '~/shared/configs';
import { ListSelectModal } from '~/shared/modals';
import { DialogsService, ModalService } from '~/shared/services';
import { PostService } from '~/shared/services/post.service';
import { DialogType } from '~/shared/types/enum';
import { Post } from '~/shared/types/models/social-feed';
import * as Toast from 'nativescript-toast';
import { LoadingIndicator } from 'nativescript-loading-indicator';
@Component({
selector: 'post',
templateUrl: 'post.component.html',
styleUrls: ['./post.component.scss']
})
export class PostComponent implements OnInit, OnDestroy {
@Input() post: any;
@Input() index: number;
// @Input() activeProfile: CommonModels.Profile;
@Output() postDeleted: EventEmitter<Post> = new EventEmitter();
authInfo: AuthInfo;
// activeWedding: Wedding;
commentsLoading: boolean;
commentsLoaded: boolean;
commentsLoadMore: boolean;
commentsPage: number;
asWedding: boolean;
likeId: string | boolean;
private indicator: LoadingIndicator;
private photoViewer = new PhotoViewer();
public cdnUrl: string;
public showComments: boolean;
public addCommentActive: boolean = false;
public shownPhotosLength: number = 3;
// private activeWeddingSubscription: ISubscription;
private authInfoSubscription: ISubscription;
resolverSubscription: ISubscription;
activeProfile: CommonModels.Profile;
constructor(
private route: ActivatedRoute,
private postService: PostService,
private dialogsService: DialogsService,
private changeDetector: ChangeDetectorRef,
private store: Store<State>,
private modalService: ModalService
) {
this.indicator = new LoadingIndicator();
}
ngOnInit() {
this.authInfoSubscription = this.store.select(selectAuthInfo).subscribe((authInfo) => {
this.authInfo = authInfo;
});
this.post.comments = [];
this.cdnUrl = CDN_URL + '/wedding/' + this.post.wedding.id + '/photos/';
this.commentsLoadMore = false;
this.commentsPage = 1;
this.activeProfile = Config.activeProfile;
// console.log("active profile:" + this.activeProfile);
this.asWedding = this.activeProfile && this.activeProfile.type == 'wedding' ? true : false;
this.likeId = this.checkLikes();
}
ngOnDestroy() {
// this.activeWeddingSubscription.unsubscribe();
// this.authInfoSubscription.unsubscribe();
}
public showGallery(iterator?: number): void {
const photos = this.post.photos.map((photo) => {
return this.cdnUrl + photo.filename;//.replace(/(\.[\w\d_-]+)$/i, '_lg$1')
});
this.photoViewer.startIndex = iterator || 0;
this.photoViewer.showViewer(photos);
}
checkLikes() {
if (this.post.yourLikes.length > 0) {
for (let i = 0; i < this.post.yourLikes.length; i++) {
let like = this.post.yourLikes[i];
if ((this.asWedding && like.asWedding && like.authorWeddingId == this.activeProfile.id)
|| !this.asWedding && !like.asWedding) {
return like.id;
}
}
} else {
return false;
}
}
public like() {
this.postService.likePost({
weddingId: this.post.wedding.id,
postId: this.post.id,
like: {
authorWeddingId: this.activeProfile.type == 'wedding' ? this.activeProfile.id : null,
asWedding: this.asWedding
}
}).toPromise().then(response => {
this.post.likesCount++;
this.post.yourLikes.push({
id: response.result,
authorWeddingId: this.activeProfile.id,
asWedding: this.asWedding
});
this.likeId = this.checkLikes();
});
}
public unlike() {
this.postService.unlikePost({
weddingId: this.post.wedding.id,
postId: this.post.id,
likeId: this.likeId
}).subscribe((response) => {
this.post.likesCount--;
this.post.yourLikes = this.post.yourLikes.filter(like => {
return like.id != this.likeId;
});
this.likeId = this.checkLikes();
});
}
public getComments() {
console.log("get comments");
this.indicator.show({
message: 'Loading...'
});
this.commentsLoading = true;
this.postService.getPostComments({
weddingId: this.post.wedding.id,
postId: this.post.id,
page: this.commentsPage
}).subscribe((response) => {
const comments = response.result;
this.post.comments = comments.reverse().concat(this.post.comments);
if (this.post.comments.length < this.post.commentsCount) {
this.commentsLoadMore = true;
this.commentsPage++;
} else {
this.commentsLoadMore = false;
}
this.commentsLoading = false;
this.commentsLoaded = true;
this.changeDetector.markForCheck();
this.indicator.hide();
},(error) => {
console.log(error);
this.indicator.hide();
});
}
onCommentAdded(comment) {
if (this.post.commentsCount == 0) {
this.commentsLoaded = true;
}
this.post.commentsCount++;
if (!this.post.comments) {
this.post.comments = [];
}
this.post.comments.push(comment);
}
public editPost(): void {
// TODO
// const modalRef = this.modalService.open(PostFormComponent);
// modalRef.componentInstance.activeWedding = this.post.wedding;
// modalRef.componentInstance.post = this.post;
//
// modalRef.componentInstance.onSuccess.subscribe(
// (event) => {
// this.postService.getPost({postId: this.post.id, weddingId: this.post.wedding.id}).subscribe(
// (response: any) => {
// this.post = response.result;
// this.changeDetector.markForCheck();
// },
// () => {
// // TODO delete
// // this._flashMessagesService.show('Getting post data failed', {cssClass: 'alert-danger', timeout: 3000});
// }
// );
// modalRef.close();
// }
// );
// modalRef.componentInstance.onClose.subscribe(
// () => {
// modalRef.close();
// }
// );
}
public deletePost(): void {
dialogs.confirm({
title: 'Delete post',
message: 'Are you sure ?',
okButtonText: 'Yes',
cancelButtonText: 'No, cancel',
}).then( (result) => {
if (result) {
this.sendDeleteReq();
}
});
}
private sendDeleteReq(): void {
this.postService.deletePost({ weddingId: this.activeProfile.id, postId: this.post.id }).subscribe(
() => {
this.postDeleted.next(this.post);
Toast.makeText("Post deleted", "long").show();
},
() => {
Toast.makeText("Post delete failed", "long").show();
}
);
}
public removeComment(removedComment: any): void {
this.post.comments = this.post.comments.filter((comment) => {
return removedComment.id !== comment.id;
});
this.post.commentsCount--;
this.changeDetector.markForCheck();
}
public cancelEditEvent(event){
this.addCommentActive = false;
}
public toggleAddComment(): void {
console.log("toggle add comment");
this.addCommentActive = !this.addCommentActive;
this.commentsPage = 1;
this.changeDetector.markForCheck();
if(this.addCommentActive && !this.showComments) {
this.toggleShowComments()
}
}
public toggleShowComments(): void {
console.log("toggle show comments");
this.showComments = !this.showComments;
if (this.showComments && !this.post.comments.length) {
this.getComments();
}
}
public openSelectActionModal(): void {
this.modalService.showModal(ListSelectModal,
{context: {
items: ['Edit post', 'Delete post'],
}, fullscreen: true
})
.then(
(result) => {
if (result === 'Edit post') {
// TODO open edit post
this.editPost();
} else {
this.deletePost();
}
}
)
}
public showMorePhotos(): void {
this.shownPhotosLength += 5;
}
showMoreComments(){
this.commentsPage++;
this.getComments();
}
}
<file_sep>/nativescript-app/app/root-store/common-models.ts
export interface Post {
id: string;
text: string;
allowComments: boolean;
commentsCount: number;
likesCount: number;
wedding: {
id: string;
name: string;
avatar: string;
};
photos: object[];
comments?: object[];
createdAt: string;
updatedAt: string;
}
export interface Comment {
id: string;
postId: string;
text: string;
asWedding: boolean;
author: {
id: string;
account: {
id: string;
firstName: string;
lastName: string;
avatar: string;
},
wedding: {
id: string;
name: string;
avatar: string;
};
}
createdAt: string;
updatedAt: string
}
export interface Photo {
id: string;
weddingId: string;
filename: string;
createdAt: string;
}
export interface Vendor {
id: string;
name: string;
avatar: string;
description: string;
category: {
id: number;
name: string;
};
rate: number;
rating: number;
vendoReviewsCount: number;
isActive: boolean;
address: string;
lat: number;
lng: number;
createdAt: string;
}
export interface VendorDetails {
id: string;
name: string;
avatar: string;
description: string;
category: {
id: number;
name: string;
};
rate: number;
rating: number;
vendoReviewsCount: number;
isActive: boolean;
address: string;
lat: number;
lng: number;
createdAt: string;
contacts: {
type: string;
value: string;
isPublic: true;
}[];
isOwner: boolean;
isReviewed: boolean;
}
export interface Profile {
id: string;
name: string;
avatar: string;
type: string;
isOwner: boolean;
privacySetting: string | null;
memberId: string | null;
isActive: boolean;
}
export interface Wedding {
id: string;
avatar: string;
name: string;
description: string;
member: {
id: string,
role: string
};
privacySetting: any;
}
export interface WeddingDetails {
id: string;
name: any;
avatar: string | null;
member: {
id: string;
role: string;
} | null;
follower: {
id: string;
} | null;
description: string;
createdAt: string;
}
export interface VendorProduct {
id: string;
name: string;
description: string;
avatar: string | null;
price: number;
currency: string;
unit: string | null;
createdAt: string;
}
export interface VendorPhoto {
id: string;
vendorId: string;
filename: string;
createdAt: string;
}
export enum WeddingRoleEnum {
Groom = 'groom',
Bride = 'bride'
}
export enum PrivacySettingEnum {
Private = 'private',
Followers = 'followers',
Registered = 'registered',
Public = 'public'
}
<file_sep>/spa/src/app/core/app-load/app-load.module.ts
import { NgModule, APP_INITIALIZER, Injector } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { Store } from '@ngrx/store';
import { Router } from '@angular/router';
import { AuthService } from '../../root-store/services/auth.service';
import { ProfileService } from '../../root-store/services/profile.service';
import { MemberService } from '../../root-store/services/member.service';
import { SioService } from '../../root-store/services/sio.service';
import { MessageService } from '../../root-store/services/message.service';
import {
RootStoreState,
ProfileActions,
MemberActions,
AuthActions,
AuthSelectors,
MessageActions
} from '../../root-store';
export function initApp(
authService: AuthService,
profileService: ProfileService,
memberService: MemberService,
store: Store<RootStoreState.State>,
sioService: SioService,
messageService: MessageService,
injector: Injector
) {
return async () => {
store.dispatch(new AuthActions.GetAuthInfo());
store.select(
AuthSelectors.selectAuthInfo
).subscribe(authInfo => {
if (authInfo) {
sioService.init(authInfo.account.id);
}
});
let { authInfo, activeProfile } = await profileService.initProfiles();
messageService.getUnreadMessagesCount()
.toPromise().then(response => {
store.dispatch(new MessageActions.SetUnreadMessagesCount({
unreadMessagesCount: response.result
}));
});
messageService.getConversations(1)
.toPromise().then(response => {
store.dispatch(new MessageActions.AppendConversations({
conversations: response.result,
infiniteScroll: {
page: 1,
disabled: false
}
}));
});
sioService.getMessages().subscribe((message: any) => {
store.dispatch(new MessageActions.HandleNewMessage({
message: message
}));
});
let router = injector.get(Router);
if (activeProfile) {
if (activeProfile.type == 'vendor' && !activeProfile.isActive && authInfo.accountType == 'vendor') {
router.navigate(['vendor'], { queryParams: { layout: 'blank' } });
}
} else {
if (authInfo.account.accountType.name == 'vendor') {
router.navigate(['vendor'], { queryParams: { layout: 'blank' } });
} else if(authInfo.account.accountType.name == 'couple') {
router.navigate(['wedding'], { queryParams: { layout: 'blank' } });
}
}
}
}
@NgModule({
imports: [HttpClientModule],
providers: [
{ provide: APP_INITIALIZER, useFactory: initApp, deps: [AuthService, ProfileService, MemberService, Store, SioService, MessageService, Injector], multi: true }
]
})
export class AppLoadModule { }
<file_sep>/nativescript-app/app/shared/components/dialogs/index.ts
export * from './dialogs.component';<file_sep>/spa/src/app/shared/directives/registerFormModel.directive.ts
import { Directive, ElementRef, Input, OnInit } from '@angular/core';
import { NgModel, NgForm } from '@angular/forms';
@Directive({
selector: '[registerForm]'
})
export class RegisterFormModelDirective implements OnInit {
private el: HTMLInputElement;
@Input('registerForm') public form: NgForm;
@Input('registerModel') public model: NgModel;
constructor(el: ElementRef) {
this.el = el.nativeElement;
}
ngOnInit() {
if (this.form && this.model) {
this.form.form.registerControl(this.model.name, this.model.control);
this.form.addControl(this.model);
}
}
}
<file_sep>/nativescript-app/app/modules/marketplace/modals/writereview/index.ts
export * from './writereview.modal';<file_sep>/nativescript-app/app/root-store/wedding-store/actions.ts
import { Action } from '@ngrx/store';
import { Wedding, Member } from './models';
export enum WeddingActionTypes {
GET_WEDDINGS = '[WEDDING] Get weddings',
GET_WEDDINGS_SUCCESS = '[WEDDING] Get weddings success',
GET_WEDDINGS_ERROR = '[WEDDING] Get weddings error',
SET_ACTIVE_WEDDING = '[WEDDING] Set active wedding',
SET_ACTIVE_WEDDING_SUCCESS = '[WEDDING] Set active wedding success',
SET_ACTIVE_WEDDING_FAILURE = '[WEDDING] Set active wedding failure',
CREATE_WEDDING = '[WEDDING] Create wedding',
CREATE_WEDDING_SUCCESS = '[WEDDING] Create wedding success',
CREATE_WEDDING_FAILURE = '[WEDDING] Create wedding failure',
GET_WEDDING_MEMBERS = '[WEDDING] Get wedding members',
GET_WEDDING_MEMBERS_SUCCESS = '[WEDDING] Get wedding members success',
UPDATE_WEDDING = '[WEDDING] Update wedding',
UPDATE_WEDDING_SUCCESS = '[WEDDING] Update wedding success',
UPDATE_WEDDING_FAILURE = '[WEDDING] Update wedding failure'
}
export class GetWeddings implements Action {
readonly type = WeddingActionTypes.GET_WEDDINGS;
}
export class GetWeddingsSuccess implements Action {
readonly type = WeddingActionTypes.GET_WEDDINGS_SUCCESS;
constructor(public payload: {
weddings: Wedding[]
}) { }
}
export class GetWeddingsError implements Action {
readonly type = WeddingActionTypes.GET_WEDDINGS_ERROR;
}
export class GetWeddingMembers implements Action {
readonly type = WeddingActionTypes.GET_WEDDING_MEMBERS;
}
export class GetWeddingMembersSuccess implements Action {
readonly type = WeddingActionTypes.GET_WEDDING_MEMBERS_SUCCESS;
constructor(public payload: {
weddingMembers: Member[]
}) { }
}
export class SetActiveWedding implements Action {
readonly type = WeddingActionTypes.SET_ACTIVE_WEDDING;
constructor(public payload?: {
id: string
}) { }
}
export class SetActiveWeddingSuccess implements Action {
readonly type = WeddingActionTypes.SET_ACTIVE_WEDDING_SUCCESS;
constructor(public payload: {
wedding: Wedding
}) { }
}
export class SetActiveWeddingFailure implements Action {
readonly type = WeddingActionTypes.SET_ACTIVE_WEDDING_FAILURE;
}
export class CreateWedding implements Action {
readonly type = WeddingActionTypes.CREATE_WEDDING;
constructor(public payload: Wedding) { }
}
export class CreateWeddingSuccess implements Action {
readonly type = WeddingActionTypes.CREATE_WEDDING_SUCCESS;
}
export class CreateWeddingFailure implements Action {
readonly type = WeddingActionTypes.CREATE_WEDDING_FAILURE;
constructor(public payload: any) { }
}
export class UpdateWedding implements Action {
readonly type = WeddingActionTypes.UPDATE_WEDDING;
constructor(public payload: {
wedding: any
}) { }
}
export class UpdateWeddingSuccess implements Action {
readonly type = WeddingActionTypes.UPDATE_WEDDING_SUCCESS;
constructor(public payload: {
wedding: any
}) { }
}
export class UpdateWeddingFailure implements Action {
readonly type = WeddingActionTypes.UPDATE_WEDDING_FAILURE;
constructor(public payload: {
error: any
}) { }
}
export type WeddingActions = GetWeddings
| GetWeddingsSuccess
| SetActiveWedding
| SetActiveWeddingSuccess
| SetActiveWeddingFailure
| CreateWedding
| CreateWeddingSuccess
| CreateWeddingFailure
| GetWeddingMembers
| GetWeddingMembersSuccess
| UpdateWedding
| UpdateWeddingSuccess
| UpdateWeddingFailure;
<file_sep>/spa/src/app/modules/tasks/tasks.component.ts
import { Component, OnInit } from '@angular/core';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ActivatedRoute } from '@angular/router';
import { TaskFormModalComponent } from './components/task-form-modal/task-form-modal.component';
import { ISubscription } from "rxjs/Subscription";
import { Observable } from "rxjs/Observable";
import { Store } from '@ngrx/store';
import {
RootStoreState,
TaskActions,
TaskSelectors,
TaskModels,
CommonModels
} from '../../root-store';
@Component({
selector: 'app-tasks',
templateUrl: './tasks.component.html',
styleUrls: ['./tasks.component.sass']
})
export class TasksComponent implements OnInit {
activeProfile: CommonModels.Profile;
tasks: Observable<TaskModels.Task[]>;
stats: any;
taskDetails: Observable<TaskModels.TaskDetails[]>[];
taskDetailsToggle: Observable<object[]>;
modalRef: NgbModalRef;
profilingTest: any;
constructor(
private modalService: NgbModal,
private store: Store<RootStoreState.State>,
private route: ActivatedRoute
) { }
ngOnInit() {
this.taskDetails = [];
this.activeProfile = this.route.snapshot.data.activeProfile;
this.profilingTest = localStorage.getItem('profilingTest') ? JSON.parse(localStorage.getItem('profilingTest')) : false;
this.store.dispatch(new TaskActions.GetTasks({
weddingId: this.activeProfile.id,
lat: this.profilingTest ? this.profilingTest.lat : null,
lng: this.profilingTest ? this.profilingTest.lng : null
}));
this.store.dispatch(new TaskActions.GetTaskStats({
weddingId: this.activeProfile.id
}));
this.tasks = this.store.select(
TaskSelectors.selectTasks
);
this.taskDetailsToggle = this.store.select(
TaskSelectors.selectUITaskDetails
);
this.stats = this.store.select(
TaskSelectors.selectTaskStats
);
}
ngOnDestroy() {
}
toggleDetails(taskId) {
this.store.dispatch(new TaskActions.ToggleTaskDetails({
weddingId: this.activeProfile.id,
taskId: taskId
}));
this.taskDetails[taskId] = this.store.select(
TaskSelectors.selectTaskDetails(taskId)
);
}
deleteTask(task) {
this.store.dispatch(new TaskActions.DeleteTaskConfirm({
confirm: new TaskActions.DeleteTask({
weddingId: this.activeProfile.id,
taskId: task.id
}),
text: 'Are you sure?',
title: 'Delete task'
}));
}
toggleDone(task) {
let status = 'done';
if (task.status == 'done') {
status = 'to_do';
}
this.changeTaskStatus(task, status);
}
changeTaskStatus(task, status) {
this.store.dispatch(new TaskActions.ChangeTaskStatus({
weddingId: this.activeProfile.id,
taskId: task.id,
status: status
}));
}
openTaskFormModal(action, task?: any) {
this.modalRef = this.modalService.open(TaskFormModalComponent);
this.modalRef.componentInstance['data'] = { action, activeProfile: this.activeProfile, task };
this.store.dispatch(new TaskActions.OpenTaskFormModal());
}
}
<file_sep>/nativescript-app/app/root-store/profile-store/actions.ts
import { Injectable } from '@angular/core';
import { Action } from '@ngrx/store';
import { Profile } from '../common-models';
export enum ProfileActionTypes {
SET_PROFILES = '[PROFILE] Set profiles',
SET_ACTIVE_PROFILE = '[PROFILE] Set active profile',
SET_ACTIVE_PROFILE_SUCCESS = '[PROFILE] Set active profile success',
SET_ACTIVE_PROFILE_FAILURE = '[PROFILE] Set active profile failure'
}
export class SetProfiles implements Action {
readonly type = ProfileActionTypes.SET_PROFILES;
constructor(public payload?: {
profiles: any
}) { }
}
export class SetActiveProfile implements Action {
readonly type = ProfileActionTypes.SET_ACTIVE_PROFILE;
constructor(public payload?: {
profile: Profile | any,
accountId: string
}) { }
}
export class SetActiveProfileSuccess implements Action {
readonly type = ProfileActionTypes.SET_ACTIVE_PROFILE_SUCCESS;
constructor(public payload: {
profile: Profile
}) { }
}
export class SetActiveProfileFailure implements Action {
readonly type = ProfileActionTypes.SET_ACTIVE_PROFILE_FAILURE;
}
export type ProfileActions = SetProfiles
| SetActiveProfile
| SetActiveProfileSuccess
| SetActiveProfileFailure;
<file_sep>/spa/src/app/root-store/message-store/index.ts
import * as MessageActions from './actions';
import * as MessageState from './state';
import * as MessageSelectors from './selectors';
import * as MessageResolvers from './resolvers';
export {
MessageStoreModule
} from './module';
export {
MessageActions,
MessageState,
MessageSelectors,
MessageResolvers
};
<file_sep>/nativescript-app/app/modules/auth/components/login/login.component.ts
import { Component, ElementRef, ViewChild } from '@angular/core';
import { TextField } from 'tns-core-modules/ui/text-field';
import { RouterExtensions } from 'nativescript-angular/router'; //2018.9.4
import { alert, prompt } from "tns-core-modules/ui/dialogs";
import { AuthService } from '~/shared/services';
@Component({
moduleId: module.id,
selector: 'login',
templateUrl: 'login.component.html',
styleUrls: ['./login.component.scss']
})
export class LoginComponent {
@ViewChild('passwordInput') passwordInputRef: ElementRef
@ViewChild('emailInput') emailInputRef: ElementRef
public email: string;
public password: string;
processing = false;
constructor(
private authService: AuthService, private routerExtensions: RouterExtensions
){
console.log("---SignIn---")
}
public signIn(): void {
this.processing = true
this.passwordInputRef.nativeElement.dismissSoftInput()
console.log(this.email);
console.log(this.password);
if (!this.email || !this.password) {
this.processing = false;
this.alert("Please provide both an email address and password.");
return;
}
this.authService.login(this.email, this.password)
.then(() => {
this.processing = false;
})
.catch((error) => {
console.log(error);
this.processing = false;
if(error.error.status==403){
// this.alert("Unfortunately we could not find your account. Please confirm your email and password");
this.alert(error.error.title);
}
else if(error.status==400) {
this.alert("Invalid email format");
}
else {
this.alert(error.error.title);
}
this.passwordInputRef.nativeElement.text=""
})
}
public onFieldChange(args: any, field: string): void {
let textField = <TextField>args.object;
this[field] = textField.text;
}
alert(message: string) {
return alert({
title: "Wedding App",
okButtonText: "OK",
message: message
});
}
}
<file_sep>/spa/src/app/root-store/profile-store/index.ts
import * as ProfileActions from './actions';
import * as ProfileState from './state';
import * as ProfileSelectors from './selectors';
import * as ProfileResolvers from './resolvers';
export {
ProfileStoreModule
} from './module';
export {
ProfileActions,
ProfileState,
ProfileSelectors,
ProfileResolvers
};
<file_sep>/nativescript-app/app/modules/wedding/components/couple-photos/index.ts
export * from './couple-photos.component';<file_sep>/website/src/config/index.ts
require('dotenv').load();
import * as fs from 'fs';
import * as path from 'path';
const ENV = process.env.NODE_ENV || 'local';
const envConfig = require(path.join(__dirname, 'environments', ENV));
const config = Object.assign({
env: ENV,
}, envConfig);
export default config;
export interface IConfig {
env?: string;
web?: {
port?: number
};
salt: string;
apiUrl: string;
spaUrl: string;
cdnUrl: string;
logging?: {
appenders: {},
categories: {}
},
cookieDomain: string;
redis: {
host: string,
port: number
};
auth: {
facebook: {},
google: {}
}
}
<file_sep>/nativescript-app/app/modules/auth/components/set-password/set-password.component.ts
import { Component } from '@angular/core';
@Component({
moduleId: module.id,
selector: 'set-password',
templateUrl: 'set-password.component.html'
})
export class SetPasswordComponent {
// Your TypeScript logic goes here
}
<file_sep>/spa/src/app/shared/image-input/image-input.component.ts
import { Component, Input, OnInit, Output, EventEmitter, ViewChild, ElementRef } from '@angular/core';
import { environment } from '../../../environments/environment';
@Component({
selector: 'image-input',
templateUrl: './image-input.component.html',
styleUrls: ['./image-input.component.sass']
})
export class ImageInputComponent implements OnInit {
@ViewChild('imageInput') imageInput: ElementRef;
@Input() formData: FormData;
@Input() fieldName: string;
@Input() validate: boolean;
@Output() isValid = new EventEmitter<boolean>();
@Output() previewUrl = new EventEmitter<string>();
constructor() { }
ngOnInit() {
}
getImageUrl(object) {
return (window.URL) ? window.URL.createObjectURL(object) : (window as any).webkitURL.createObjectURL(object);
}
imageInputChange(event, fieldName) {
let fileList: FileList = event.target.files;
if (fileList.length > 0) {
let file: File = fileList[0];
let image = new Image;
let imageUrl = this.getImageUrl(file);
image.src = imageUrl;
image.onload = () => {
if (this.validate && (image.width < environment.imageMinWidth || image.height < environment.imageMinHeight)) {
this.isValid.emit(false);
this.imageInput.nativeElement.value = '';
this.formData.delete(fieldName);
this.previewUrl.emit(null);
return;
} else {
this.formData.set(fieldName, file, file.name);
this.previewUrl.emit(imageUrl);
this.isValid.emit(true);
}
};
}
}
}
<file_sep>/nativescript-app/bash_scripts/slack-webhook.sh
#!/bin/bash
value=$(<output.log)
for file in output.log; do
echo "Touching file: ${file##*/}"
sed -n 's|.*"publicURL":"\([^"]*\)".*|publicURL=\1|p' output.log > output2.log
done
payload=$(<output2.log)
curl -X POST --data-urlencode "payload={\"channel\": \"#builds\", \"username\": \"Android Build Bot for Appetize\", \"text\": \"Android app has been deployed successfully. $payload\", \"icon_emoji\": \":cubimal_chick:\"}" https://<KEY>
<file_sep>/spa/src/app/modules/settings/components/wedding/wedding-info/wedding-info.component.html
<h4 class="strong">{{ 'Basic info' | translate }}</h4>
<div class="edit-row__edit-btn"
*ngIf="!editActive[0]"
(click)="editRow(0)">
<mat-icon svgIcon="pencil"></mat-icon>
{{ 'Edit' | translate }}
</div>
<dl class="row" *ngIf="!editActive[0]">
<dt class="col-sm-3 text-sm-right">
{{ 'Avatar' | translate }}
</dt>
<dd class="col-sm-9">
<avatar [filename]="wedding?.avatar ? prependAvatarUrl + wedding?.avatar : null"
[size]="50">
</avatar>
</dd>
<dt class="col-sm-3 text-sm-right">
{{ 'Description' | translate }}
</dt>
<dd class="col-sm-9">
{{wedding?.description}}
</dd>
<dt class="col-sm-3 text-sm-right">
{{ 'Privacy setting' | translate }}
</dt>
<dd class="col-sm-9">
{{wedding?.privacySetting}}
</dd>
</dl>
<form *ngIf="editActive[0]">
<div class="row wedding-form-row">
<label class="col-sm-3 text-sm-right edit-row__label ">
{{ 'Avatar' | translate }}
</label>
<div class="col-sm-9">
<div class="form-group avatar-preview">
<avatar *ngIf="avatarUrl" [src]="sanitizer.bypassSecurityTrustUrl(avatarUrl)"
[size]="120"
[square]="true">
</avatar>
<avatar *ngIf="!avatarUrl"
[filename]=""
[size]="120"
[square]="true">
</avatar>
</div>
<image-input [formData]="formData"
[fieldName]="'avatar'"
[validate]="true"
(previewUrl)="avatarUrl = $event"
(isValid)="isImageValid = $event">
</image-input>
<div *ngIf="!isImageValid" class="invalid-feedback" style="display: block;">
{{ 'Invalid image size, min. 200 x 200 px' | translate }}
</div>
</div>
</div>
<div class="d-flex flex-row align-items-center wedding-form-row">
<label class="col-sm-3 text-sm-right edit-row__label">
{{ 'Description' | translate }}
</label>
<input type="text"
[value]="wedding?.description"
class="col-sm-9 form-control"
(change)="handleInput($event.target.value, 'description')"/>
</div>
<div class="d-flex flex-row align-items-center wedding-form-row">
<label class="col-sm-3 text-sm-right edit-row__label">
{{ 'Privacy setting' | translate }}
</label>
<select [(ngModel)]="form.privacySetting"
name="privacySetting"
class="form-control">
<option [value]="PrivacySettingEnum.Public">{{ 'Public' | translate }}</option>
<option [value]="PrivacySettingEnum.Registered">{{ 'Registered' | translate }}</option>
<option [value]="PrivacySettingEnum.Followers">{{ 'Followers' | translate }}</option>
<option [value]="PrivacySettingEnum.Private">{{ 'Private' | translate }}</option>
</select>
</div>
<div class="d-flex flex-row align-items-center justify-content-center mt-3">
<button class="btn btn-danger mr-2" (click)="cancelEdit(0)">
{{ 'Cancel' | translate }}
</button>
<button class="btn btn-primary" (click)="submit()">
{{ 'Submit' | translate }}
</button>
</div>
</form>
<file_sep>/nativescript-app/app/shared/components/main/logged-in-app.component.ts
import { Component } from '@angular/core';
import { ProfileService } from '~/shared/services/profile.service';
import { MessageService } from '~/shared/services/message.service';
import { Store } from '@ngrx/store';
import { MessageActions, RootStoreState } from '~/root-store';
@Component({
selector: 'logged-in-app',
templateUrl: 'logged-in-app.component.html',
styleUrls: ['./logged-in-app.component.scss']
})
export class LoggedInAppComponent {
public showMenu: boolean = false;
constructor(
private messageService: MessageService,
private store: Store<RootStoreState.State>
) {
}
ngOnInit(): void {
this.messageService.getUnreadMessagesCount()
.toPromise().then(response => {
this.store.dispatch(new MessageActions.SetUnreadMessagesCount({
unreadMessagesCount: response.result
}));
});
this.messageService.getConversations(1)
.toPromise().then(response => {
this.store.dispatch(new MessageActions.AppendConversations({
conversations: response.result,
infiniteScroll: {
page: 1,
disabled: false
}
}));
});
}
public toggleMenu(): void {
this.showMenu = !this.showMenu;
}
}<file_sep>/nativescript-app/app/modules/wedding/modals/add-guest/add-guest.modal.ts
import { Component } from '@angular/core';
import { ModalDialogParams } from 'nativescript-angular/directives/dialogs';
import { screen } from 'tns-core-modules/platform';
@Component({
selector: 'add-guest',
templateUrl: 'add-guest.modal.html',
})
export class AddGuestModal {
public width: any;
public radioOptions: Array<string> = [
'Not invited',
'Not attending',
'Invited',
'Attending'
];
public roles: Array<string> = [
'Groomsman',
'Bridesmaid'
];
public sides: Array<string> = [
'Groom\'s',
'Bride\'s'
];
private values: any = {
firstName: '',
lastName: '',
side: '',
role: '',
email: '',
sendRSVP: ''
};
constructor(
private params: ModalDialogParams
) {
this.width = screen.mainScreen.widthDIPs;
}
public close(values?: any): void {
this.params.closeCallback(values);
}
public setValue(valueName: string, element: any): void {
this.values[valueName] = element.value;
}
public setChecked(valueName: string, value: boolean): void {
this.values[valueName] = value;
}
public submit(): void {
this.close(this.values);
}
}<file_sep>/spa/src/app/modules/settings/settings.routing.ts
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { SettingsWeddingInvitationsComponent } from './components/invitations';
import { SettingsComponent } from './settings.component';
import { SettingsWeddingComponent } from './components/wedding';
import { SettingsVendorComponent } from './components/vendor/vendor.component';
import { SettingsMembersComponent } from './components/members/members.component';
import { SettingsAccountComponent } from './components/account/account.component';
import { AuthGuard } from '../../shared/guards/auth.guard';
import { IsOwnerGuard } from '../../shared/guards/isOwner.guard';
import { ProfileResolvers, AuthResolvers } from '../../root-store';
const routes: Routes = [
{
path: 'settings',
component: SettingsComponent,
canActivate: [AuthGuard],
resolve: {
authInfo: AuthResolvers.AuthInfoResolver,
activeProfile: ProfileResolvers.ActiveProfileResolver
},
runGuardsAndResolvers: 'always',
children: [
{path: '', redirectTo: 'wedding', pathMatch: 'full'},
{
path: 'wedding',
component: SettingsWeddingComponent,
canActivate: [IsOwnerGuard],
runGuardsAndResolvers: 'always'
},
{
path: 'vendor',
component: SettingsVendorComponent,
canActivate: [IsOwnerGuard],
runGuardsAndResolvers: 'always'
},
{path: 'account', component: SettingsAccountComponent},
{path: 'members', component: SettingsMembersComponent, canActivate: [IsOwnerGuard]},
{path: 'invitations', component: SettingsWeddingInvitationsComponent}
]
}
];
export const routing: ModuleWithProviders = RouterModule.forChild(routes);
<file_sep>/nativescript-app/app/modules/wedding/components/index.ts
export * from './guest-list';
export * from './guest';
export * from './couple-photos';
export * from './couple-profile';
export * from './couple-informations';
export * from './couple-timeline';<file_sep>/spa/src/app/modules/wedding/components/photos/photos.component.ts
import { Component, OnInit, OnDestroy, ViewChild, TemplateRef } from '@angular/core';
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
import { FlashMessagesService } from 'angular2-flash-messages';
import { ISubscription } from 'rxjs/Subscription';
import { ActivatedRoute } from '@angular/router';
import { Lightbox } from 'ngx-lightbox';
import { PostService } from '../../../../root-store/services/post.service';
import { ConfirmDialogComponent } from '../../../../shared/confirm-dialog/confirm-dialog.component';
import { PostFormComponent } from '../../../social-feed/components/post-form/post-form.component';
import { environment } from '../../../../../environments/environment';
@Component({
selector: 'app-wedding-photos',
templateUrl: './photos.component.html',
styleUrls: ['./photos.component.sass']
})
export class WeddingPhotosComponent implements OnInit, OnDestroy {
@ViewChild('modalContent') private modalContent: TemplateRef<any>;
objectValues: any;
photos: any[];
page: number;
routeSubscription: ISubscription;
resolverSubscription: ISubscription;
weddingId: string;
activeProfile: any;
infiniteScrollDisabled: boolean;
uploaderImages: any;
modalRef: NgbModalRef;
constructor(
private route: ActivatedRoute,
private postService: PostService,
private modalService: NgbModal,
private lightbox: Lightbox,
private _flashMessagesService: FlashMessagesService,
) {
}
async ngOnInit() {
this.photos = [];
this.objectValues = Object.values;
this.page = 1;
this.routeSubscription = await this.route.parent.params.subscribe(async (params) => {
this.weddingId = params.weddingId;
});
this.resolverSubscription = this.route.data.subscribe(
data => {
this.activeProfile = data.activeProfile;
}
);
this.infiniteScrollDisabled = false;
this.getPhotos();
}
async ngOnDestroy() {
this.routeSubscription.unsubscribe();
this.resolverSubscription.unsubscribe();
}
async getPhotos() {
await this.postService.getPhotos({
weddingId: this.weddingId,
page: this.page
}).toPromise().then(response => {
if (response.result.length === 0) {
this.infiniteScrollDisabled = true;
}
response.result.map(photo => {
const baseUrl = environment.cdnUrl + '/wedding/' + this.weddingId + '/photos/';
photo.src = baseUrl + photo.filename;
photo.thumb = baseUrl + photo.filename.replace(/(\.[\w\d_-]+)$/i, '_sq$1');
return photo;
});
this.photos = this.photos.concat(response.result);
});
}
uploaderImagesChange(event) {
this.modalRef = this.modalService.open(PostFormComponent);
this.modalRef.componentInstance.uploaderImages = event;
this.modalRef.componentInstance.activeProfile = this.activeProfile;
this.modalRef.componentInstance.textPlaceholder = 'Write something about this photo...';
this.modalRef.componentInstance.onSuccess.subscribe(event => {
this.page = 1;
this.getPhotos();
this.modalRef.close();
});
}
onScroll(direction) {
const currentPage = this.page;
if (direction == 'down') {
this.page++;
} else if (this.page > 1) {
this.page--;
}
if (currentPage != this.page) {
this.getPhotos();
}
}
open(index) {
this.lightbox.open(this.photos, index, {resizeDuration: 0.1, fadeDuration: 0.4, disableScrolling: true});
}
close() {
this.lightbox.close();
}
public deletePhoto(deletedPhoto, event): void {
event.preventDefault();
const modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'});
modal.componentInstance['data'] = {
title: 'Delete photo',
text: 'Are you sure?',
confirm: this.sendDeletePhotoReq.bind(this),
callbackParam: deletedPhoto
};
}
public sendDeletePhotoReq(deletedPhoto): void {
this.postService.deletePhoto({weddingId: this.activeProfile.id, photoId: deletedPhoto.id}).subscribe(
() => {
this.photos = this.photos.filter((photo) => {
return photo.id !== deletedPhoto.id;
});
this._flashMessagesService.show('Photo deleted successfully', {cssClass: 'alert-success', timeout: 3000});
},
() => {
this._flashMessagesService.show('Photo deletion failed', {cssClass: 'alert-danger', timeout: 3000});
}
);
}
}
<file_sep>/nativescript-app/app/shared/modals/datepicker/index.ts
export * from './datepicker.modal';<file_sep>/spa/src/app/modules/tasks/components/task-stats/task-stats.component.ts
import { Component, OnInit, OnDestroy, TemplateRef, ViewChild, Input } from '@angular/core';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ISubscription } from "rxjs/Subscription";
@Component({
selector: 'task-stats',
templateUrl: './task-stats.component.html',
styleUrls: ['./task-stats.component.sass']
})
export class TaskStatsComponent implements OnInit, OnDestroy {
@Input() inputStats;
stats: any;
subStats: ISubscription;
constructor() { }
ngOnInit() {
this.subStats = this.inputStats.subscribe((stats) => {
if (stats) {
this.stats = {
all: stats.all | 0,
done: stats.done | 0,
in_progress: stats.in_progress | 0,
overdue: stats.overdue | 0,
percentage: {
done: stats.done ? stats.done / stats.all * 100 : 0,
in_progress: stats.in_progress ? stats.in_progress / stats.all * 100 : 0,
overdue: stats.overdue ? stats.overdue / stats.all * 100 : 0
}
}
}
});
}
ngOnDestroy() {
if(this.subStats) {
this.subStats.unsubscribe();
}
}
}
<file_sep>/spa/src/app/modules/inspirations/inspirations.component.ts
import { Component, OnInit, OnDestroy } from '@angular/core';
import { ISubscription } from "rxjs/Subscription";
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { Router, ActivatedRoute } from '@angular/router';
import { Masonry, MasonryGridItem } from 'ng-masonry-grid';
import { Store } from '@ngrx/store';
import { InspirationService } from '../../root-store/services/inspiration.service';
import { AddInspirationModalComponent } from './components/add-inspiration-modal/add-inspiration-modal.component';
import { distinctUntilChanged, debounceTime, switchMap, tap, catchError, map } from 'rxjs/operators'
import { Subject, Observable, of, concat } from 'rxjs';
import {
RootStoreState,
ProfileSelectors,
CommonModels
} from '../../root-store';
@Component({
selector: 'app-inspirations',
templateUrl: './inspirations.component.html',
styleUrls: ['./inspirations.component.sass']
})
export class InspirationsComponent implements OnInit, OnDestroy {
activeProfile: CommonModels.Profile;
subscriptionActiveProfile: ISubscription;
inspirations: any[] = [];
page: number = 1;
infiniteScrollDisabled: boolean = false;
masonryOptions: object;
_masonry: Masonry;
subscriptionResetInspiration: ISubscription;
routeSubscription: ISubscription;
onlyPinned: boolean;
onlyYours: boolean;
defaultTags: object[];
tags: Observable<any>;
tagsLoading = false;
tagsInput = new Subject<string>();
selectedTags: string[] = [];
updateMasonry: boolean = false;
constructor(
private modalService: NgbModal,
private inspirationService: InspirationService,
private route: ActivatedRoute,
private store: Store<RootStoreState.State>
) { }
async ngOnInit() {
this.onlyPinned = false;
this.onlyYours = false;
this.subscriptionActiveProfile = this.store.select(
ProfileSelectors.selectActiveProfile
).subscribe(activeProfile => {
if (activeProfile) {
this.activeProfile = activeProfile;
}
});
this.routeSubscription = this.route.params.subscribe(async (params) => {
if (params.tags) {
this.selectedTags = params.tags.replace(/\s/g, '').split(',');
}
});
if(this.route.snapshot.routeConfig.path == 'inspirations/pinned') {
this.onlyPinned = true;
}
if(this.route.snapshot.routeConfig.path == 'inspirations/yours') {
this.onlyYours = true;
}
this.masonryOptions = {
itemSelector: '.masonry-item',
transitionDuration: 1,
horizontalOrder: true
};
this.tags = this.inspirationService.getTags().pipe(
map(response => {
this.defaultTags = response.result;
return response.result
})
);
this.loadTags();
}
ngOnDestroy() {
this.routeSubscription.unsubscribe();
this.subscriptionActiveProfile.unsubscribe();
if(this.subscriptionResetInspiration) {
this.subscriptionResetInspiration.unsubscribe();
}
}
async getInspirations() {
await this.inspirationService.getInspirations({
page: this.page,
tags: this.selectedTags.join(','),
pinnedToWeddingId: this.activeProfile.id,
onlyPinned: this.onlyPinned,
authorWeddingId: this.onlyYours ? this.activeProfile.id : ''
}).toPromise().then(response => {
this._masonry.setAddStatus('append');
this.inspirations.push(...response.result);
if (response.result.length < 10) {
this.infiniteScrollDisabled = true;
}
});
}
onNgMasonryInit($event: Masonry) {
this._masonry = $event;
this.getInspirations();
}
loadMoreInspirations() {
this.page++;
this.getInspirations();
}
async loadTags() {
this.tags = concat(
this.tags,
this.tagsInput.pipe(
debounceTime(200),
distinctUntilChanged(),
tap(() => this.tagsLoading = true),
switchMap(term => this.inspirationService.getTags(term).pipe(
map(response => {
return response.result
}),
catchError(() => of([])),
tap(() => this.tagsLoading = false)
))
)
);
}
onClear() {
this.tags = of([...this.defaultTags]);
}
async resetInspirations() {
this._masonry.items = [];
this.inspirations = [];
this.page = 1;
this.infiniteScrollDisabled = false;
this.getInspirations();
}
openAddInspirationModal() {
let modal;
modal = this.modalService.open(AddInspirationModalComponent, { size: 'lg' });
modal.componentInstance['onSubmitEvent'].subscribe(inspiration => {
if(!this.onlyPinned && !inspiration.isPinned) {
this.selectedTags = [];
this._masonry.setAddStatus('prepend');
this.inspirations.splice(0, 0, inspiration);
}
});
}
childComponentAdded(component) {
this.subscriptionResetInspiration = component.onResetInspirations.subscribe(event => {
this.resetInspirations();
});
}
}
<file_sep>/nativescript-app/app/modules/social-feed/components/comment/comment.component.ts
import {
Component,
OnInit,
Input,
EventEmitter,
Output
} from '@angular/core';
import * as dialogs from 'tns-core-modules/ui/dialogs';
import { Wedding } from '~/root-store/wedding-store/models';
import { ListSelectModal } from '~/shared/modals';
import { DialogsService, ModalService } from '~/shared/services';
import { PostService } from '~/shared/services/post.service';
import { DialogType } from '~/shared/types/enum';
import { AuthModels } from '../../../../root-store';
@Component({
selector: 'comment',
templateUrl: 'comment.component.html',
styleUrls: ['./comment.component.scss']
})
export class CommentComponent implements OnInit {
@Input() comment: any;
@Input() authInfo: AuthModels.AuthInfo;
@Input() postId: string;
@Input() weddingId: string;
@Input() asWedding: boolean;
@Output() commentDeleted: EventEmitter<any> = new EventEmitter();
@Output() commentEditToggled: EventEmitter<boolean> = new EventEmitter();
public editActive = false;
constructor(
private postService: PostService,
private dialogsService: DialogsService,
private modalService: ModalService
) {
}
ngOnInit() {
console.log("comment ngOnInit");
}
public toggleEdit(): void {
this.editActive = !this.editActive;
this.commentEditToggled.next(this.editActive);
}
public deleteComment(): void {
dialogs.confirm({
title: 'Delete comment',
message: 'Are you sure ?',
okButtonText: 'Yes',
cancelButtonText: 'No, cancel',
}).then( (result) => {
if (result) {
this.sendDeleteReq();
}
});
}
public onCommentEditSuccess(editedText: string): void {
this.comment.text = editedText;
}
private sendDeleteReq(): void {
this.postService.deleteComment({weddingId: this.weddingId, postId: this.postId, commentId: this.comment.id}).subscribe(
() => {
this.commentDeleted.next(this.comment);
this.dialogsService.showDialog({
message: 'Comment deleted',
type: DialogType.Success,
});
},
() => {
this.dialogsService.showDialog({
message: 'Comment delete failed',
type: DialogType.Alert
});
}
);
}
public openSelectActionModal(): void {
this.modalService.showModal(ListSelectModal,
{context: {
items: ['Edit comment', 'Delete comment'],
}, fullscreen: true
})
.then(
(result) => {
if (result === 'Edit comment') {
this.toggleEdit();
} else {
this.deleteComment();
}
}
)
}
}
<file_sep>/spa/src/app/modules/guest-list/components/guest-stats/guest-stats.component.ts
import { Component, OnInit, TemplateRef, ViewChild, Input } from '@angular/core';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ChangeDetectionStrategy } from '@angular/core';
@Component({
selector: 'guest-stats',
templateUrl: './guest-stats.component.html',
styleUrls: ['./guest-stats.component.sass'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class GuestStatsComponent implements OnInit {
@Input() inputStats;
stats: object[] = [];
constructor() { }
ngOnInit() {
}
ngOnChanges(changes) {
this.stats = Object.keys(this.inputStats).map(event => {
let stats = <any>{
name: event
};
this.inputStats[event].map(stat => {
stats[stat.name] = stat.count;
});
stats.percentage = {
invited: stats.invited ? stats.invited / stats.all * 100 : 0,
attending: stats.attending ? stats.attending / stats.all * 100 : 0,
not_attending: stats.not_attending ? stats.not_attending / stats.all * 100 : 0
};
return stats;
})
}
}
<file_sep>/nativescript-app/app/root-store/wedding-store/index.ts
import * as WeddingActions from './actions';
import * as WeddingState from './state';
import * as WeddingSelectors from './selectors';
import * as WeddingModels from './models';
export {
WeddingStoreModule
} from './module';
export {
WeddingActions,
WeddingState,
WeddingSelectors,
WeddingModels
};
<file_sep>/nativescript-app/app/root-store/wedding-store/state.ts
import { Wedding, Member } from './models';
export interface State {
weddings: Wedding[] | null;
activeWedding: Wedding | null;
activeWeddingMembers: Member[] | null;
ui: {
weddingForm: {
submitted: boolean
},
memberForm: {
submitted: boolean,
modalOpen: boolean,
error: any | null
},
memberRoleForm: {
submitted: boolean,
modalOpen: boolean,
error: any | null
}
}
}
export const initialState: State = {
weddings: null,
activeWedding: null,
activeWeddingMembers: null,
ui: {
weddingForm: {
submitted: false
},
memberForm: {
submitted: false,
modalOpen: false,
error: null
},
memberRoleForm: {
submitted: false,
modalOpen: false,
error: null
}
}
};
<file_sep>/website/src/Server.ts
import * as express from 'express';
import * as path from 'path';
import * as exphbs from 'express-handlebars';
import { IConfig } from 'config';
import { ILogger } from 'helpers/logger';
import { hbsHelpers } from 'helpers/hbsHelpers';
class Server {
config: IConfig;
router: () => void;
logger: ILogger;
constructor({ config, router, logger }: { config: IConfig, router: () => void, logger: ILogger }) {
this.config = config;
this.logger = logger;
this.router = router;
}
start() {
return new Promise((resolve) => {
let server = express();
server.disable('x-powered-by');
server.set('views', path.join(__dirname, '/views'));
server.engine('.hbs', exphbs({
defaultLayout: 'main',
layoutsDir: path.join(__dirname, '/views/layouts'),
partialsDir: path.join(__dirname, '/views'),
extname: '.hbs',
helpers: hbsHelpers()
}));
server.set('view engine', '.hbs');
server.use((req, res, next) => {
const assets = require('./assets.json');
res.locals.path = req.path;
res.locals.assets = JSON.parse(JSON.stringify(assets));
next();
});
server.use(express.static(path.join(__dirname, 'public')));
server.locals.config = this.config;
server.use('/', this.router);
const http = server.listen(this.config.web.port, () => {
const { port } = http.address();
this.logger.info(`[p ${process.pid}] Listening at port ${port}`);
resolve();
});
});
}
}
export default Server;
<file_sep>/nativescript-app/app/shared/pipes/date-with-hours.pipe.ts
import { Pipe, PipeTransform } from '@angular/core';
import * as moment from 'moment';
import { DATETIME_FORMAT } from '~/shared/configs';
@Pipe({name: 'dateWithHours'})
export class DateWithHoursPipe implements PipeTransform {
transform(item): any {
if (item) {
return moment(item).format(DATETIME_FORMAT);
} else {
return '';
}
}
}
<file_sep>/nativescript-app/app/shared/components/create-profile/index.ts
export * from './couple';
export * from './vendor';<file_sep>/spa/src/app/modules/guest-list/components/guest/guest.component.ts
import { Component, OnInit, Input, Output, OnDestroy, EventEmitter } from '@angular/core';
import { ISubscription } from 'rxjs/Subscription';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { Router, ActivatedRoute } from '@angular/router';
import { FlashMessagesService } from 'angular2-flash-messages';
import { ConfirmDialogComponent } from '../../../../shared/confirm-dialog/confirm-dialog.component';
import { GuestFormModalComponent } from '../guest-form-modal/guest-form-modal.component';
import { GuestService } from '../../../../root-store/services/guest.service';
import { environment } from '../../../../../environments/environment';
@Component({
selector: 'app-guest',
templateUrl: './guest.component.html',
styleUrls: ['./guest.component.sass']
})
export class GuestComponent implements OnInit {
@Input() guest: any;
@Output() onChangeEvent: EventEmitter<any> = new EventEmitter();
hidden: boolean = false;
constructor(
private modalService: NgbModal,
public activeModal: NgbActiveModal,
private route: ActivatedRoute,
private guestService: GuestService,
private flashMessagesService: FlashMessagesService
) { }
async ngOnInit() {
}
edit(guest) {
let modal;
modal = this.modalService.open(GuestFormModalComponent, { size: 'lg' });
modal.componentInstance.mode = 'edit';
if(guest) {
modal.componentInstance.guest = {
id: guest.id,
firstName: guest.firstName,
lastName: guest.lastName,
email: guest.email,
receptionStatusId: guest.receptionGuestStatus.id,
ceremonyStatusId: guest.ceremonyGuestStatus.id,
guestSideId: guest.side ? guest.side.id : null,
guestRoleId: guest.role ? guest.role.id : null,
rsvp: guest.rsvp
};
}
modal.componentInstance.onSubmitEvent.subscribe(guest => {
this.onChangeEvent.next(true);
});
}
async delete() {
const modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'});
modal.componentInstance['data'] = {
title: 'Delete inspiration',
text: 'Are you sure?',
confirm: () => {
this.guestService.deleteGuest({ guestId: this.guest.id, weddingId: this.guest.weddingId }).toPromise().then(response => {
this.hidden = true;
this.flashMessagesService.show('Guest deleted', {cssClass: 'alert-success', timeout: 3000});
})
}
};
}
}
<file_sep>/nativescript-app/app/root-store/task-store/index.ts
import * as TaskActions from './actions';
import * as TaskState from './state';
import * as TaskSelectors from './selectors';
import { Task, TaskDetails } from './models';
export {
TaskStoreModule
} from './module';
export {
TaskActions,
TaskState,
TaskSelectors,
Task,
TaskDetails
};
<file_sep>/nativescript-app/app/shared/pipes/index.ts
export * from './date-with-hours.pipe';
export * from './full-date.pipe';<file_sep>/spa/src/app/modules/wedding-form/components/basic-info/basic-info.component.ts
import { Component, OnInit, Input } from '@angular/core';
import * as objectToFormData from 'object-to-formdata';
import { DomSanitizer } from '@angular/platform-browser';
import { DatepickerOptions, NgDatepickerComponent } from 'ng2-datepicker';
import { TranslateService } from '@ngx-translate/core';
@Component({
selector: 'wedding-form-basic-info',
templateUrl: './basic-info.component.html',
styleUrls: ['./basic-info.component.sass']
})
export class WeddingFormBasicInfoComponent implements OnInit {
@Input() model: any;
@Input() parentForm: any;
@Input() parentFormData: FormData;
events: any;
avatarUrl: string;
isImageValid: boolean;
minDate: Date;
dpOptions: DatepickerOptions = {
minDate: new Date(Date.now()),
barTitleFormat: 'MMMM YYYY',
placeholder: 'Click to select a date',
addClass: 'ngx-datepicker-input-custom',
useEmptyBarTitle: false
};
constructor(
public sanitizer: DomSanitizer,
private translate: TranslateService
) { }
ngOnInit() {
this.events = [{
name: 'Wedding'
}, {
name: 'Reception'
}];
const avatar = this.parentFormData.get('avatar');
if (avatar) {
this.avatarUrl = (window.URL) ? window.URL.createObjectURL(avatar) : (window as any).webkitURL.createObjectURL(avatar);
}
this.isImageValid = true;
this.minDate = new Date();
this.translate.get('Click to select a date').subscribe(res => {
this.dpOptions.placeholder = res;
})
}
handleAddressChange(event, eventIndex) {
this.model.events[eventIndex] = {
...this.model.events[eventIndex],
name: event.name,
website: event.website,
lat: event.geometry.location.lat(),
lng: event.geometry.location.lng(),
address: event.formatted_address
}
}
}
<file_sep>/spa/src/app/shared/confirm-dialog/confirm-dialog.component.ts
import {
ChangeDetectionStrategy,
Component,
Inject,
Optional,
Input
} from '@angular/core';
import { NgbModal, NgbModalRef, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { Action, Store } from '@ngrx/store';
import {
RootStoreState
} from '../../root-store';
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'confirm-dialog',
templateUrl: './confirm-dialog.component.html',
styleUrls: ['./confirm-dialog.component.sass']
})
export class ConfirmDialogComponent {
@Input() data: {
cancel?: any,
confirm: any,
text: string,
title: string,
callbackParam?: any
};
modalRef: NgbModalRef;
constructor(
private store: Store<RootStoreState.State>,
public activeModal: NgbActiveModal
) {
}
public cancel() {
if (this.data.cancel !== undefined) {
this.store.dispatch(this.data.cancel);
}
this.activeModal.close();
}
public confirm() {
if (this.data.confirm.type) {
this.store.dispatch(this.data.confirm);
} else {
if (this.data.callbackParam) {
this.data.confirm(this.data.callbackParam);
} else {
this.data.confirm();
}
}
this.activeModal.close();
}
}
|
754831e23728275b2fba3942838ecc458615bd14
|
[
"TypeScript",
"HTML",
"Shell"
] | 328
|
TypeScript
|
jenyaivanova521/WeddingApp
|
9c25a32d384a76dc2fed11415bfe3b9e3b93b61d
|
11b1785c001123272b68c3b78727fb6576f1ca58
|
refs/heads/master
|
<file_sep>describe("Application main view", () => {
beforeEach(() => {
cy.server();
cy.route({
method: "GET",
url:
"https://cors-anywhere.herokuapp.com/https://api.github.com/search/users?q=Barack",
response: "fixture:search_query.json",
});
cy.visit("/");
});
it("contains titel", () => {
cy.get("section[name='title']").should("contain", "GitHub Search engine");
});
context('user searches for user', () => {
it('', () => {
cy.get("[data-cy='search']").type("Barack");
cy.get("[data-cy='search-button']").click()
cy.get('#search-results').should('contain', 'PresidentObama')
});
});
});
|
67442ad1ecf160e65825ac1306f4709391d74df9
|
[
"JavaScript"
] | 1
|
JavaScript
|
johanperjulius1/gh-api-client-remake
|
8d0b1befe86e228c91aabac7f0fa830020accd3c
|
d7f72f07b6fed469551763efc881123ca16cc1d2
|
refs/heads/master
|
<file_sep># Cart
Simple shopping cart.
This module provides a simple tax computing algorithm and the receipt layout print.
## Installation
To install this module simply clone the repository
```
git clone <EMAIL>:depsir/cart.git
```
## Basic usage
```
# Import the module
import cart
# Build a cart
my_cart = cart.Cart(basic_tax=0.1,
import_tax=0.05,
basic_tax_exclude=['book', 'food', 'medical'])
# Add Items to cart
new_item = cart.Item(name='book',
price=12.49,
category='book',
imported=False)
my_cart.add_item(new_item)
# Print the receipt
my_cart.print_receipt()
```
This will output
```
1 book: 12.49
Sales Taxes: 0.00
Total: 12.49
```
## Test
To run the tests use
```
python -m unittest discover
```
# Exercise notes
This module is meant to solve the sales taxes problem.
The three example inputs provided in the problem explanation, are tested in a unit test.<file_sep>import unittest
from cart import Cart
from item import Item
class TestWithBasicCart(unittest.TestCase):
def get_basic_cart(self):
basic_tax = 0.1
basic_tax_exclude = ['book', 'food', 'medical']
import_tax = 0.05
return Cart(basic_tax, import_tax, basic_tax_exclude)
class TestCartExampleInputs(TestWithBasicCart):
def setUp(self):
self.cart1 = self.get_basic_cart()
self.cart1.add_item(Item('book', 12.49, 'book', False))
self.cart1.add_item(Item('music CD', 14.99, 'stuff', False))
self.cart1.add_item(Item('chocolate bar', 0.85, 'food', False))
self.cart2 = self.get_basic_cart()
self.cart2.add_item(Item('box of chocolates', 10.00, 'food', True))
self.cart2.add_item(Item('bottle of perfume', 47.50, 'stuff', True))
self.cart3 = self.get_basic_cart()
self.cart3.add_item(Item('bottle of perfume', 27.99, 'stuff', True))
self.cart3.add_item(Item('bottle of perfume', 18.99, 'stuff', False))
self.cart3.add_item(Item('packet of headache pills', 9.75, 'medical', False))
self.cart3.add_item(Item('box of chocolates', 11.25, 'food', True))
def test_output_1(self):
expected_result = """1 book: 12.49
1 music CD: 16.49
1 chocolate bar: 0.85
Sales Taxes: 1.50
Total: 29.83"""
self.assertEqual(self.cart1.build_receipt(), expected_result)
def test_output_2(self):
expected_result = """1 imported box of chocolates: 10.50
1 imported bottle of perfume: 54.65
Sales Taxes: 7.65
Total: 65.15"""
self.assertEqual(self.cart2.build_receipt(), expected_result)
def test_output_3(self):
expected_result = """1 imported bottle of perfume: 32.19
1 bottle of perfume: 20.89
1 packet of headache pills: 9.75
1 imported box of chocolates: 11.85
Sales Taxes: 6.70
Total: 74.68"""
self.assertEqual(self.cart3.build_receipt(), expected_result)
class TestRound_up_to_05(TestWithBasicCart):
def setUp(self):
self.cart = self.get_basic_cart()
def test_integer_value(self):
self.assertEqual(self.cart.round_up_to_05(12), 12)
def test_already_rounded_value(self):
self.assertEqual(self.cart.round_up_to_05(7.45), 7.45)
def test_ceil_not_round_value(self):
self.assertEqual(self.cart.round_up_to_05(7.49), 7.50)
def test_ceil_not_floor_not_round_value(self):
self.assertEqual(self.cart.round_up_to_05(7.41), 7.45)
if __name__ == '__main__':
unittest.main()
<file_sep>from cart import Cart
from item import Item<file_sep>import math
class Cart(object):
"""Simple cart object
This module provides a simple tax computing algorithm
and the receipt layout print.
A Cart is configured with two tax values:
- basic_tax: a decimal value that represents tax percent
applied to all goods unles they are exempt.
- import tax: a decimal value that represents tax percent
applied to imported goods
An additional list of categories is used to manage exempt goods.
Taxes are applied one at a time on the base price.
Every tax amount is rounded up to the neares 0.05
The receipt output is formatted in this way:
one line for each cart item showing amount, if it is imported,
the product name and the price after taxes.
Two lines are added at the end of the receipt showing the total tax amount
and the total price after taxes
"""
def __init__(self, basic_tax, import_tax, basic_tax_exclude):
super(Cart, self).__init__()
self.items = []
self.basic_tax = basic_tax
self.basic_tax_exclude = basic_tax_exclude
self.import_tax = import_tax
def add_item(self, item):
"""Add an item to the cart
item must be an object with these attributes:
- name
- price
- category
- imported
"""
self.items.append(item)
def round_up_to_05(self, val):
"""Round a value up to the nearest 0.05
Examples:
round_up_to_05(7.49) -> 7.50
round_up_to_05(7.41) -> 7.45
"""
return math.ceil(val * 100 / 5) * 5 / 100
def calc_tax_for_item(self, item):
"""Compute tax for the given item
Taxes are computed according to the rules
described in the module documentation.
Returns the total tax amount as a decimal value
"""
tax_amount = 0
if item.imported:
tax_amount += self.round_up_to_05(item.price * self.import_tax)
if item.category not in self.basic_tax_exclude:
tax_amount += self.round_up_to_05(item.price * self.basic_tax)
return tax_amount
def build_receipt(self):
"""Build the receipt
Returns a string with the receipt layout.
Lines are separated with newline character.
The receipt follows this layout:
for each item in the cart one line with amount, if it is imported,
the product name and the price after taxes.
Examples:
Output 3:
1 imported bottle of perfume: 32.19
1 bottle of perfume: 20.89
1 packet of headache pills: 9.75
Two lines are added at the end of the receipt
showing the total tax amount
and the total price after taxes
Example:
Sales Taxes: 6.70
Total: 74.68
"""
receipt_lines = []
tax_total = 0
total = 0
for item in self.items:
tax = self.calc_tax_for_item(item)
item_total_price = tax + item.price
receipt_lines.append(
'1 %s%s: %.2f' % ('imported ' if item.imported else '',
item.name,
item_total_price))
tax_total += tax
total += item_total_price
receipt_lines.append('Sales Taxes: %.2f' % tax_total)
receipt_lines.append('Total: %.2f' % total)
return '\n'.join(receipt_lines)
def print_receipt(self):
"""Print receipt to standard output"""
print self.build_receipt()
<file_sep>class Item(object):
"""Represent a sellable item of the catalog
An item is described by:
- name: A string that identifies this item
- price: the shelf price before taxes
- category: a string describing the item category
- imported: a boolean which is true if this item is imported
"""
def __init__(self, name, price, category, imported):
super(Item, self).__init__()
self.imported = imported
self.category = category
self.name = name
self.price = price
|
9b0532027badd5feef5530a1451a9cc5bcd73147
|
[
"Markdown",
"Python"
] | 5
|
Markdown
|
depsir/cart
|
6fd09177d3bc67dd80205bbc763494f6dd55ca0c
|
99c052aeee2a614110440ac4ce005f5eb98eccc2
|
refs/heads/master
|
<repo_name>Mackiovello/PresModels<file_sep>/src/ResultModel.cs
using System;
using Starcounter;
namespace PresModels
{
public enum ResultFlag
{
Pass,
Note,
Error
}
[Database]
public class ResultModel
{
public ResultFlag ResultFlag { get; set; }
public DateTime TransactionDate { get; set; }
public int Account { get; set; }
public string Message { get; set; }
public decimal Amount { get; set; }
}
}<file_sep>/src/BankGiroProcessing.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Starcounter;
namespace PresModels
{
[Database]
public class BankGiroProcessing
{
public string CompanyName { get; set; }
public long OrgNumber { get; set; }
public string BGNumber { get; set; }
public bool IsProcessed => OrgNumber > 0 && !string.IsNullOrEmpty(CompanyName);
}
}
|
e5e37141aac5b68c69f7357bff809ca2e0095ab7
|
[
"C#"
] | 2
|
C#
|
Mackiovello/PresModels
|
30b9f899c71a3308985cae54a41aa07c2fc4f834
|
d335605d28ab48019520c5cd82b946447c568247
|
refs/heads/master
|
<repo_name>aaahmad22/kwk-l1-mothers-day-methods-kwk-students-l1-raleigh-072318<file_sep>/mothers_day.rb
## Define your method, mothers_day, below. Go through the README and update your method as needed!
def mothers_day('mom')
"Happy Mother's Day, #{mothers_day}!"
end
def mothers_day("Beyonce")
"Happy Mother's Day, #{mothers_day}"
end
|
203aa44d85272676bc96bab1d2957686159b9427
|
[
"Ruby"
] | 1
|
Ruby
|
aaahmad22/kwk-l1-mothers-day-methods-kwk-students-l1-raleigh-072318
|
e8b7bbef01325c3e22a1bd6c8425fbda7873d3ba
|
02834e199deeeaa49d18d328942c2a3df3fe915b
|
refs/heads/master
|
<repo_name>arshad2101/dsi-capstone<file_sep>/src/inference.py
from keras.models import load_model
from keras.preprocessing import image
import numpy as np
import os
import matplotlib.pyplot as plt
# dimensions of our images
img_width, img_height = 256, 256
# load the model we saved
model = load_model('../models/DR_Five_Classes_recall_0.6358.h5')
#model.compile(loss='binary_crossentropy',
# optimizer='rmsprop',
# metrics=['accuracy'])
image_path = '../sample/'
# predicting images]
for img_name in os.listdir(image_path): # no need to convert to np.array yet...
img = image.load_img(image_path+img_name, target_size=(img_width, img_height))
x = image.img_to_array(img)
x_new = np.expand_dims(x, axis=0)
images = np.vstack([x_new])
prob = model.predict_on_batch(images)
classes = model.predict_classes(images)
print('\n')
if(classes[0] == 0):
print("No DR")
plt.imshow(img)
plt.show()
print(img_name)
if(classes[0] == 1):
print("Mild")
plt.imshow(img)
plt.show()
print(img_name)
if(classes[0] == 2):
print("Moderate")
plt.imshow(img)
plt.show()
print(img_name)
if(classes[0] == 3):
print("Severe")
plt.imshow(img)
plt.show()
print(img_name)
if(classes[0] == 4):
print("Proliferative DR")
plt.imshow(img)
plt.show()
print(img_name)
print("No DR=",prob[0][0]," ","Mild=",prob[0][1],"Moderate=",prob[0][2],"Severe=",prob[0][3],"Proliferative DR=",prob[0][4])
|
f3eff07b9d6d4d893fcab44ddd9e751e1b19dab9
|
[
"Python"
] | 1
|
Python
|
arshad2101/dsi-capstone
|
a0e78d95b7465197cc60a772af4f2f16967ce546
|
835a74045fe109174e11e27ae06ffd42765ffac3
|
refs/heads/master
|
<file_sep>module.exports = function main() {
let sequence = new Sequence([6, 9, 15, -2, 92, 11]);
console.log(`o) 最小值 = ${sequence.minimum()}
o) 最大值 = ${sequence.maximum()}
o) 元素数量 = ${sequence.Sequence_length()}
o) 平均值 = ${sequence.Sequence_mean()}`);
};
/*Sequence类,用来表示序列,包含最小值arrmin,最大值arrmax,序列长度arrlen,平均值arrave这四个属性
有minimum、maximum、Sequence_length、Sequence_mean四种操作方法,分别用
来求最小值、最大值、序列长度、平均值*/
class Sequence {
constructor(input) {
// Write your code here
this.input = input;
this.arrmin = 0;
this.arrmax = 0;
this.arrlen = 0;
this.arrave = 0;
}
minimum() {
// Write your code here
this.arrmin = this.input[0];
for(var i = 1; i <this.input.length; i++){
if(this.input[i]<this.arrmin){
this.arrmin = this.input[i];
}
}
return this.arrmin;
}
// Write your code here
maximum(){
this.arrmax = this.input[0];
for(var i = 1; i <this.input.length; i++){
if(this.input[i]>this.arrmax){
this.arrmax = this.input[i];
}
}
return this.arrmax;
}
Sequence_length(){
this.arrlen = this.input.length;
return this.arrlen;
}
Sequence_mean(){
var sum=0;
for(var i = 0; i <this.input.length; i++){
sum +=this.input[i];
}
this.arrave = (sum / this.input.length).toFixed(2);
return this.arrave;
}
}
|
08c577f5052cbf053ba1c1f97adc356fb52ea647
|
[
"JavaScript"
] | 1
|
JavaScript
|
zhengwenli/2018-07-30-09-00-49-1532941249
|
33bf855e856308784ccbb3e3822ca98f8e426358
|
53b2ca8ae9ed13b346ed12660017eead2afbd7ec
|
refs/heads/master
|
<file_sep>//@author J-Schuller
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _9_17_inclass
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Please enter your favorite baseball team?");
string answer = Console.ReadLine().ToUpper().Trim(); // Trim takes the spaces out of it
string nextAnswer = "Somethine else";
string answerUppercase = answer.ToUpper();
for (int i = 0; i < answerUppercase.Length; i++)
{
Console.Write(answerUppercase[i] + " ");
}
Console.WriteLine($"Your favorite team has {answer.Length} characters in it");
Console.ReadKey();
}
}
}
|
2ed1ea69864496bc394703a0e4def3046b8a42b3
|
[
"C#"
] | 1
|
C#
|
schu8762/9-17-inclass
|
9274ca930d16936a96e962a55ba2377f1d6297b9
|
14c36c1e91be895dc4c481a88139ac18117d9ffe
|
refs/heads/master
|
<file_sep>$(function() {
$('input[type="button"]').click(function() {
$("#result").text("");
$.ajax({
data: {
noIncludes: $("#noIncludes").is(":checked")
},
dataType: "json",
type: "GET",
url: "/case/" + this.id
}).done(function(data) {
$("#result").text(JSON.stringify(data));
}).fail(function(jqXHR) {
$("#result").text(jqXHR.responseText);
});
});
});<file_sep>package controllers;
import play.*;
import play.mvc.*;
import java.util.*;
import models.*;
public class Application extends Controller {
public static void index() {
render();
}
public static void cases(String id, boolean noIncludes) {
TreeItem test2 = new TreeItem("Parent");
test2.children.add(new TreeItem("Child"));
if(id.equals("A"))
{
TreeItem[] test = new TreeItem[1];
test[0] = test2;
renderTemplate("Application/templateA.json", test, id, noIncludes);
}
else if(id.equals("B"))
{
TreeItem test = test2;
renderTemplate("Application/templateB.json", test, id, noIncludes);
}
else if(id.equals("C"))
{
TreeItem[] test = new TreeItem[1];
test[0] = test2;
renderTemplate("Application/templateA2.json", test, id, noIncludes);
}
else if(id.equals("D"))
{
TreeItem test = test2;
renderTemplate("Application/templateB2.json", test, id, noIncludes);
}
}
}
|
7a84d511416b44c43514a0ccbe21ccadb1a0b618
|
[
"JavaScript",
"Java"
] | 2
|
JavaScript
|
gpgekko/TemplateTest
|
323043e685c1ec8a49c51b49b638c673a3f6f60b
|
a1640ec4f74a7ad4eb218bd0b87515413d506043
|
refs/heads/master
|
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CalculatorNew
{
public partial class FormCalculator : Form
{
public FormCalculator()
{
InitializeComponent();
}
double resultValue = 0;
string operation = "";
bool isOperationPerformed = false;
double memory=0;
private void FormCalculator_Load(object sender, EventArgs e)
{
}
private void buttonNum_Click(object sender, EventArgs e)
{
if (isOperationPerformed || resultTextBox.Text=="0")
{
resultTextBox.Clear();
}
isOperationPerformed = false;
Button btn = (Button)sender;
resultTextBox.Text = resultTextBox.Text + btn.Text;
}
private void btnPoint_Click(object sender, EventArgs e)
{
if (isOperationPerformed)
{
resultTextBox.Text="0";
}
isOperationPerformed = false;
Button btn = (Button)sender;
if(!resultTextBox.Text.Contains(","))
resultTextBox.Text = resultTextBox.Text + btn.Text;
}
private void btnOperation_Click(object sender, EventArgs e)
{
if (isOperationPerformed)
{
resultTextBox.Clear();
}
Button btn = (Button)sender;
if(resultValue != 0)
{
btnResult.PerformClick();
operation = btn.Text;
isOperationPerformed = true;
resultValue = Double.Parse(resultTextBox.Text);
}
else
{
operation = btn.Text;
resultValue = Double.Parse(resultTextBox.Text);
isOperationPerformed = true;
}
}
private void btnSquareRoot_Click(object sender, EventArgs e)
{
resultTextBox.Text = Math.Sqrt(double.Parse(resultTextBox.Text)).ToString();
}
private void btnResult_Click(object sender, EventArgs e)
{
switch (operation)
{
case "+":
resultTextBox.Text = (resultValue + double.Parse(resultTextBox.Text)).ToString();
break;
case "-":
resultTextBox.Text = (resultValue - double.Parse(resultTextBox.Text)).ToString();
break;
case "*":
resultTextBox.Text = (resultValue * double.Parse(resultTextBox.Text)).ToString();
break;
case "/":
resultTextBox.Text = (resultValue / double.Parse(resultTextBox.Text)).ToString();
break;
default:
break;
}
resultValue = 0;
}
private void buttonMPlus_Click(object sender, EventArgs e)
{
memory += double.Parse(resultTextBox.Text);
}
private void buttonMMinus_Click(object sender, EventArgs e)
{
memory -= double.Parse(resultTextBox.Text);
}
private void buttonMR_Click(object sender, EventArgs e)
{
resultTextBox.Text = memory.ToString();
}
private void buttonMC_Click(object sender, EventArgs e)
{
memory = 0;
}
private void buttonMS_Click(object sender, EventArgs e)
{
memory = double.Parse(resultTextBox.Text);
}
private void buttonClear_Click(object sender, EventArgs e)
{
resultTextBox.Clear();
resultValue = 0;
}
}
}
|
1313d379ef66d4c79fa3a3ba349fc95f15a5b813
|
[
"C#"
] | 1
|
C#
|
ChristinaDiann/CalculatorNew
|
40f5ca17d8ddd89ad2584c98e282d91826d78b69
|
446d72c7cae9a3ba54f8b7c49d8822bdea75f7f0
|
refs/heads/master
|
<file_sep># LabML
MLkit face detection API and code uses
FaceContourGraphics.java
---------------------------------------------
This code helps updates the face instance from the detection of the most recent frame and draws the face
annotations for position on the supplied canvas.
GraphicOverlay.java
---------------------------------------------
The code in this file was used from the official site of firebase. This code renders a series of custom graphics to be
overlayed on top of an associated preview (i.e., the camera preview).
The creator can add graphics objects, update the objects, and remove them, triggering the appropriate drawing and
invalidation within the view.
LoadImageHere.java
---------------------------------------------
In this file I am loading the Image taken from the camera to run the face contour and graphic overlay after detecting face. Also, this code calls activities GraphicOverlay.java and LoadImageHere.java.
MainActivity.java
---------------------------------------------
In this file there will be codes for the buttons, and that are responsible for naviagation
into the other activites like LoadImageHere.java.
<file_sep>package com.example.labml;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Path;
import android.media.ExifInterface;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.util.Pair;
import android.util.SparseArray;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.Spinner;
import android.widget.Toast;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.gms.vision.Frame;
import com.google.android.gms.vision.face.Face;
import com.google.android.gms.vision.face.FaceDetector;
import com.google.android.gms.vision.face.Landmark;
import com.google.firebase.ml.vision.FirebaseVision;
import com.google.firebase.ml.vision.common.FirebaseVisionImage;
import com.google.firebase.ml.vision.document.FirebaseVisionDocumentText;
import com.google.firebase.ml.vision.face.FirebaseVisionFace;
import com.google.firebase.ml.vision.face.FirebaseVisionFaceDetector;
import com.google.firebase.ml.vision.face.FirebaseVisionFaceDetectorOptions;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
public class LoadImageHere extends AppCompatActivity{
private static final String TAG = "LoadImageHere";
private ImageView imageView;
private Bitmap mSelectedImage;
private Button mFaceButton;
private GraphicOverlay mGraphicOverlay;
private Integer mImageMaxWidth;
private Integer mImageMaxHeight;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_load_image_here);
//imageView = findViewById(R.id.imageFetched);
Intent intent = getIntent();
imageView = (ImageView) findViewById(R.id.image_view);
final String mCurrentPhotoPath = intent.getStringExtra("mCurrentPhotoPath");
//mSelectedImage = BitmapFactory.decodeFile(mCurrentPhotoPath);
//imageView.setImageBitmap(mSelectedImage);
mFaceButton = findViewById(R.id.button_face);
mGraphicOverlay = findViewById(R.id.graphic_overlay);
//mGraphicOverlay.clear();
mSelectedImage = getBitmapFromPathForImageView(mCurrentPhotoPath, imageView);
imageView.setImageBitmap(mSelectedImage);
//runFaceContourDetection();
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//runFaceContourDetection();
Toast.makeText(getApplicationContext(), "Works here", Toast.LENGTH_SHORT).show();
}
});
}
private Bitmap getBitmapFromPathForImageView(String mCurrentPhotoPath, ImageView imageView) {
Bitmap bitmap;
bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath);
Bitmap rotatedBitmap = bitmap;
// rotate bitmap if needed
try {
ExifInterface ei = new ExifInterface(mCurrentPhotoPath);
int orientation = ei.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_UNDEFINED);
switch (orientation) {
case ExifInterface.ORIENTATION_ROTATE_90:
rotatedBitmap = rotateImage(bitmap, 90);
break;
case ExifInterface.ORIENTATION_ROTATE_180:
rotatedBitmap = rotateImage(bitmap, 180);
break;
case ExifInterface.ORIENTATION_ROTATE_270:
rotatedBitmap = rotateImage(bitmap, 270);
break;
}
} catch (IOException e) {
Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
}
/*/--------------------------------------
Pair<Integer, Integer> targetedSize = getTargetedWidthHeight();
int targetWidth = targetedSize.first;
int maxHeight = targetedSize.second;
// Determine how much to scale down the image
float scaleFactor =
Math.max(
(float) rotatedBitmap.getWidth() / (float) targetWidth,
(float) rotatedBitmap.getHeight() / (float) maxHeight);
Bitmap resizedBitmap =
Bitmap.createScaledBitmap(
rotatedBitmap,
(int) (rotatedBitmap.getWidth() / scaleFactor),
(int) (rotatedBitmap.getHeight() / scaleFactor),
true);
*/ //----------------------------------
//return rotatedBitmap;
return rotatedBitmap;
}
private void runFaceContourDetection() {
// Replace with code from the codelab to run face contour detection.
FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(mSelectedImage);
FirebaseVisionFaceDetectorOptions options =
new FirebaseVisionFaceDetectorOptions.Builder()
.setPerformanceMode(FirebaseVisionFaceDetectorOptions.FAST)
.setContourMode(FirebaseVisionFaceDetectorOptions.ALL_CONTOURS)
.build();
mFaceButton.setEnabled(false);
FirebaseVisionFaceDetector detector = FirebaseVision.getInstance().getVisionFaceDetector(options);
detector.detectInImage(image)
.addOnSuccessListener(
new OnSuccessListener<List<FirebaseVisionFace>>() {
@Override
public void onSuccess(List<FirebaseVisionFace> faces) {
mFaceButton.setEnabled(true);
processFaceContourDetectionResult(faces);
}
})
.addOnFailureListener(
new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
// Task failed with an exception
mFaceButton.setEnabled(true);
e.printStackTrace();
}
});
}
private void processFaceContourDetectionResult(List<FirebaseVisionFace> faces) {
// Replace with code from the codelab to process the face contour detection result.
// Task completed successfully
if (faces.size() == 0) {
showToast("No face found");
return;
}
mGraphicOverlay.clear();
for (int i = 0; i < faces.size(); ++i) {
FirebaseVisionFace face = faces.get(i);
FaceContourGraphic faceGraphic = new FaceContourGraphic(mGraphicOverlay);
mGraphicOverlay.add(faceGraphic);
faceGraphic.updateFace(face);
}
}
private void showToast(String message) {
Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();
}
//helps to rotate the pic.
public static Bitmap rotateImage(Bitmap source, float angle) {
Matrix matrix = new Matrix();
matrix.postRotate(angle);
return Bitmap.createBitmap(source, 0, 0, source.getWidth(), source.getHeight(), matrix, true);
}
private Integer getImageMaxWidth() {
if (mImageMaxWidth == null) {
// Calculate the max width in portrait mode. This is done lazily since we need to
// wait for
// a UI layout pass to get the right values. So delay it to first time image
// rendering time.
mImageMaxWidth = imageView.getWidth();
}
return mImageMaxWidth;
}
private Integer getImageMaxHeight() {
if (mImageMaxHeight == null) {
// Calculate the max width in portrait mode. This is done lazily since we need to
// wait for
// a UI layout pass to get the right values. So delay it to first time image
// rendering time.
mImageMaxHeight =
imageView.getHeight();
}
return mImageMaxHeight;
}
// Gets the targeted width / height.
private Pair<Integer, Integer> getTargetedWidthHeight() {
int targetWidth;
int targetHeight;
int maxWidthForPortraitMode = getImageMaxWidth();
int maxHeightForPortraitMode = getImageMaxHeight();
targetWidth = maxWidthForPortraitMode;
targetHeight = maxHeightForPortraitMode;
return new Pair<>(targetWidth, targetHeight);
}
public static Bitmap getBitmapFromAsset(Context context, String filePath) {
AssetManager assetManager = context.getAssets();
InputStream is;
Bitmap bitmap = null;
try {
is = assetManager.open(filePath);
bitmap = BitmapFactory.decodeStream(is);
} catch (IOException e) {
e.printStackTrace();
}
return bitmap;
}
}
|
a8697551ba1d25f27620f2e483a77499232b37ea
|
[
"Markdown",
"Java"
] | 2
|
Markdown
|
chapagaisa/LabML
|
d7a73cca04b7b2e87ea08403c289011f11769540
|
1c786bdae8404277b8af7ebfd17544443b4bb870
|
refs/heads/master
|
<file_sep>import _ from 'lodash'
import { firebaseMutations } from 'vuexfire'
export default {
updateUserCollections: (state, value) => { state.userCollections = _.unionBy(value, state.userCollections, '.key') },
setCollection: (state, value) => { state.collection = value },
setTitle: (state, value) => { state.title = value },
setInput: (state, value) => { state.input = value },
setPrivacy: (state, value) => { state.privacy = value },
setItems: (state, value) => { state.items = value },
setCombinations: (state, value) => { state.combinations = value },
setAction: (state, { index, action }) => { state.combinations[index].action = action },
setIndex: (state, value) => { state.index = value },
...firebaseMutations
}
<file_sep>import Vue from 'vue'
import Vuex from 'vuex'
import actions from './actions'
import mutations from './mutations'
import getters from './getters'
Vue.use(Vuex)
const debug = process.env.NODE_ENV !== 'production'
export default new Vuex.Store({
state: {
collections: [],
userCollections: [],
collection: {},
title: '',
input: '',
privacy: '',
items: [],
combinations: [],
index: 0
},
actions,
mutations,
getters,
strict: debug
})
<file_sep>import Firebase from 'firebase'
import _ from 'lodash'
import { firebaseAction } from 'vuexfire'
import { firebaseConfig } from '../../firebase'
let db = Firebase.initializeApp(firebaseConfig).database()
let collectionsRef = db.ref('collections')
let itemsRef = db.ref('items')
let accessRef = db.ref('access')
export default {
// add a new collection to the database
addCollection: ({ commit }, { title, input, privacy }) => {
let items = _.compact(input.split('\n'))
// return a promise that resolves when finished creating entries in database
return new Promise((resolve, reject) => {
// fetch uid before adding collection to database
Firebase.auth().onAuthStateChanged((user) => {
// create access entry
let key = accessRef.child(user.uid).push(true, () => {
// create collection entry
collectionsRef.child(key).set(
{
created: Firebase.database.ServerValue.TIMESTAMP,
modified: Firebase.database.ServerValue.TIMESTAMP,
title: title,
privacy: privacy
},
() => {
// add items
let itemsKeyRef = itemsRef.child(key)
for (let i = 0; i < items.length; i++) {
itemsKeyRef.push().set({
name: items[i],
votes: 0
})
}
resolve(key)
}
)
}).key
})
})
},
// update a collection's information
updateCollection: ({ getters, commit }) => {
let items = _.compact(getters.input.split('\n'))
return new Promise((resolve, reject) => {
collectionsRef.child(getters.id).update(
{
modified: Firebase.database.ServerValue.TIMESTAMP,
title: getters.title,
privacy: getters.privacy
},
() => {
let itemsKeyRef = itemsRef.child(getters.id)
itemsKeyRef.remove().then(() => {
let itemsKeyRef = itemsRef.child(getters.id)
for (let i = 0; i < items.length; i++) {
itemsKeyRef.push().set({
name: items[i],
votes: 0
})
}
resolve(getters.id)
})
}
)
})
},
generateCombinations: ({ getters, commit }) => {
let combinations = []
for (let i = 0; i < getters.items.length - 1; i++) {
for (let j = i + 1; j < getters.items.length; j++) {
let heads = _.random()
combinations.push({
a: {
index: heads ? i : j,
name: getters.items[heads ? i : j].name
},
b: {
index: heads ? j : i,
name: getters.items[heads ? j : i].name
},
action: null
})
}
}
commit('setCombinations', _.shuffle(combinations))
commit('setIndex', 0)
},
next: ({ getters, commit }, action) => {
commit('setAction', { index: getters.index, action: action })
commit('setIndex', getters.index + 1)
},
undo: ({ getters, commit }) => {
commit('setIndex', getters.index - 1)
commit('setAction', { index: getters.index, action: null })
},
submitVotes: ({ getters, commit }) => {
return new Promise((resolve, reject) => {
let itemsKeyRef = itemsRef.child(getters.id)
for (let i = 0; i < getters.combinations.length; i++) {
let combination = getters.combinations[i]
let action = combination.action
if (action !== 'skip') {
let item = getters.itemAt(combination[action].index)
itemsKeyRef
.child(item['.key'])
.child('votes')
.set(item.votes + 1)
}
}
resolve(getters.id)
})
},
bindCollections: firebaseAction(({ getters, bindFirebaseRef, commit }) => {
return new Promise((resolve, reject) => {
bindFirebaseRef(
'collections',
collectionsRef.orderByChild('privacy').equalTo('public'),
{
cancelCallback (error) {
console.dir(error)
}
}
)
Firebase.auth().onAuthStateChanged((user) => {
accessRef.child(user.uid).on('value', (snapshot) => {
snapshot.forEach((snapshot) => {
collectionsRef.child(snapshot.key).on('value', (snapshot) => {
let collection = snapshot.val()
if (collection) {
collection['.key'] = snapshot.key
commit('updateUserCollections', [collection])
}
})
})
resolve(getters.id)
})
})
})
}),
bindCollection: firebaseAction(
({ getters, bindFirebaseRef, unbindFirebaseRef, commit }) => {
return new Promise((resolve, reject) => {
if (getters.id) {
let done = false
bindFirebaseRef('collection', collectionsRef.child(getters.id), {
readyCallback () {
commit('setTitle', getters.collection.title)
commit('setPrivacy', getters.collection.privacy)
done ? resolve(getters.id) : (done = true)
},
cancelCallback (error) {
console.dir(error)
done ? resolve(null) : (done = true)
}
})
bindFirebaseRef('items', itemsRef.child(getters.id), {
readyCallback () {
commit('setInput', _.join(_.map(getters.items, 'name'), '\n'))
done ? resolve(getters.id) : (done = true)
},
cancelCallback (error) {
console.dir(error)
done ? resolve(null) : (done = true)
}
})
} else {
unbindFirebaseRef('collection')
commit('setCollection', {})
commit('setTitle', '')
commit('setPrivacy', '')
unbindFirebaseRef('items')
commit('setItems', [])
commit('setInput', '')
resolve(getters.id)
}
})
}
)
}
<file_sep>// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import store from './store'
import router from './router'
import Firebase from 'firebase'
import Vuelidate from 'vuelidate'
import { sync } from 'vuex-router-sync'
// sync router to vuex store
sync(store, router)
// authenticate user anonymously
Firebase.auth().signInAnonymously().catch((error) => {
console.log(`${error.code} - ${error.message}`)
})
// add form validation
Vue.use(Vuelidate)
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',
store,
router,
template: '<App/>',
components: { App }
})
|
8b25c06f19d8aa0661f447238d008480801750fe
|
[
"JavaScript"
] | 4
|
JavaScript
|
han-tyumi/either-or
|
eeed7fe43f78266a7634fd3110feed18fd5bf886
|
a0fbde30d74f5aa4400dc8fcd7072140e9a37308
|
refs/heads/main
|
<repo_name>jonathankohen/viewing_party<file_sep>/client/src/views/Login.jsx
import React from 'react';
import { Link } from '@reach/router';
const Login = () => {
return <Link to="/auth/twitch">Login with Twitch</Link>;
};
export default Login;
<file_sep>/server/controllers/auth.controller.js
const User = require('../models/user.models'),
passport = require('passport');
module.exports = {
to_twitch: (req, res) => {
passport
.authenticate('twitch', { forceVerify: true })
.then(console.log(req, res))
.catch(err => res.status(400).json(err));
},
successCallback: (req, res) => {
passport
.authenticate('twitch')
.then(() => {
console.log(req, res);
redirect('/profile');
})
.catch(err => {
res.status(400).json(err);
redirect('/');
});
},
};
<file_sep>/client/src/views/Main.jsx
import React, { useState, useEffect } from 'react';
import axios from 'axios';
const Profile = () => {
const [profile, setProfile] = useState([]);
useEffect(() => {
axios
.get('http://localhost:8000/api/current_user')
.then(res => {
setProfile(res.data);
console.log(profile);
})
.catch(err => {
console.log(err.response);
});
});
return (
<div>
<h1>Main</h1>
<ul>
<li>Twitch ID:{profile.twitchId}</li>
</ul>
<a href="/api/logout">Logout</a>
</div>
);
};
export default Profile;
|
56105d7246b2d4f8c5dcfff62c9cecd1d04cd24e
|
[
"JavaScript"
] | 3
|
JavaScript
|
jonathankohen/viewing_party
|
674a00cab2242afe6d553025876d1442d599589f
|
7a3fcf2720241ad4c908617bc21e66965ed4bd6b
|
refs/heads/master
|
<repo_name>bombkiml/phpbeech<file_sep>/beech
#!/usr/bin/env php
<?php
if (file_exists(__DIR__ . '.\vendor')) {
require __DIR__ . '.\vendor\bombkiml\beech-cli\src\console.php';
}
<file_sep>/beech-framework/Controller.php
<?php
class Controller {
public function __construct() {
$this->view = new View();
}
public function load_model($model) {
$model = substr($model, 0, -10);
$file = PATH_M . $model . EXT;
if (file_exists($file)) {
require $file;
$model_name = $model;
$this->model = new $model_name();
}
}
public function access_denied() {
$this->view->title = 'Aceess denied !';
$this->view->error('error/access_error');
}
public function pagination($src_link, $row_count) {
// ../limit/offset
$link_exp = explode('/', $src_link);
$offset = end($link_exp);
$limit = prev($link_exp);
#$number_of_page = ROUND($row_count / $limit, PHP_ROUND_HALF_UP);
@$number_of_page = ceil($row_count / $limit);
// link for click
array_pop($link_exp);
$link = '';
foreach($link_exp as $exp) {
$link .= $exp.'/'; // link for click
}
/**
* @limit
* @offset
* @number_of_page
* @link
*
*/
$page_start = 0;
$paging = '';
$paging .= "<div class='pagination clear'>";
$prev = $offset - $limit; // previus
$paging .= ($offset>0) ? (($number_of_page>1) ? "<a href='{$link}{$prev}'>◀</a>" : '') : '';
for ($x=1; $x<=$number_of_page; $x++) {
if ($page_start == $offset) {
$paging .= ($number_of_page>1) ? "<a href='javascript:void(0)' class='pagination-a'>{$x}</a>" : '';
} else {
$paging .= "<a href='{$link}{$page_start}'>{$x}</a>";
}
$page_start+=$limit;
}
$next = $offset + $limit; // next
$paging .= ($next<$row_count) ? (($number_of_page>1) ? "<a href='{$link}{$next}'>▶</a>" : '') : '';
$paging .= "</div>";
return $paging;
}
}<file_sep>/beech-framework/Beech_error.php
<?php
class Beech_error extends Controller {
public function __construct() {
parent::__construct();
}
function beech_error() {
$this->view->title = 'Beech Error !';
$this->view->_error('error/beech_error');
}
function class_error($class) {
$this->view->title = 'Class not found !';
$this->view->class = ucfirst($class);
$this->view->file = $class;
$this->view->_error('error/class_error');
}
function method_error($class, $method, $param) {
$this->view->title = 'Method not found !';
$this->view->class = ucfirst($class);
$this->view->method = $method;
$this->view->param = $param;
$this->view->_error('error/method_error');
}
}
<file_sep>/README.md
# PHP Beech framework (LTS)
[](https://github.com/bombkiml/phpbeech/releases/)
[](https://github.com/bombkiml/beech-api/blob/master/README.md)
##### #Make it by yourself
[](https://github.com/bombkiml/phpbeech)
### # Environment Requirements
PHP >= 7.1.11
#
### # Installing Beech
The Beech use ``` composer ``` to manage its dependencies. So, before using ``` Beech ``` make sure you have [Composer](https://getcomposer.org/) installed on your machine.
$ composer create-project bombkiml/phpbeech hello-world
#
### # Local development server
If you have PHP installed locally and you would like to use PHP's built-in development server to your application,
You may use the `` serve `` command. This command will start a development server at [`` http://localhost:8000 ``](http://localhost:8000)
$ php beech serve
#
### # Defining Controllers
Below is an example of a basic controller class. **Note that** the `` controller `` extends the `` base controller `` class.
The controller are stored in the modules/controllers/ directory. A simple controller ``` modules/controllers/fruits/fruitsController.php ``` might look something like this:
```php
<?php
class FruitsController extends Controller {
/**
* @Rule: consturctor class it's call __construct of parent class
*
* Call parent class
*
*/
public function __construct() {
parent::__construct();
}
}
```
#
### # Passing data to views
You may use the `` $this->view->yourVariable `` and assign data this one for passing the data to ``` views ```. A simple passing the data might look something like this:
```php
<?php
class FruitsController extends Controller {
/**
* @Rule: consturctor class it's call __construct of parent class
*
* Call parent class
*
*/
public function __construct() {
parent::__construct();
}
/**
* Simple passing the data to `views/fruits/fruits.view.php`
*
* @var title
* @var hello
* @var data
*
* @return Response view
*/
public function index() {
// Passing the data to view
$this->view->title = "fruits page";
$this->view->sayHello = "Hello fruits";
$this->view->data = [];
// Return response view
return $this->view->render("fruits/fruits.view");
}
}
```
#
### # Creating Views
Below is an simple of a basic views contain the HTML served, The ``` views ``` are stored in the ``` views/ ``` directory. A simple view ``` views/fruits/fruits.view.php ``` might look something like this:
```html
<html>
<head>
<title>Title Name</title>
</head>
<body>
<h1>Hello world</h1>
</body>
</html>
```
#
### # Accessing the data passed from controller
You may use the `$this` for accessing the data passed to views. A simple accessing the data passed might look something like this:
```html
<html>
<head>
<!-- Accessing the data passed of @var title -->
<title><?php echo $this->title; ?></title>
</head>
<body>
<!-- Accessing the data passed of @var sayHello -->
<h1><?php echo $this->sayHello; ?></h1>
<!-- Accessing the data passed of @var data -->
<?php print_r($this->data); ?>
</body>
</html>
```
#
### # Defining Models
Below is an example of a basic create an ``` model ``` class. **Note that** the `` model `` extends the `` base model `` class.
The ``` model ``` are stored in the `` modules/models/ `` directory. A simple model `` modules/models/Fruits.php `` might look something like this:
```php
<?php
class Fruits extends Model {
/**
* @Rule: consturctor class it's call __construct of parent class
*
* Call parent class
*
*/
public function __construct() {
parent::__construct();
}
/**
* Simple method using MySQL get data
*
*/
public function getFruits() {
// Preparing sql statements
$stmt = $this->db->prepare("SELECT * FROM fruits");
// Execute statements
$stmt->execute();
// Return response rows
return $stmt->fetch_all();
}
}
```
#
### # Database
The Beech database (MySQL supported) using by ``` $this->db ``` it's query builder provides a convenient, fluent interface to creating and running database queries. It can be used to perform most database operations in your application.
#
### # Retrieving Results
You may use the ``` prepare ``` method on the ```php $this->db ``` facade to begin a query. The ``` prepare ``` method returns a object query builder instance for the given table, allowing you to using sql statements for query by the ``` execute ``` method then finally get the results using the ``` fetch ``` method. So, 3 step easy usage you may retrieving results by use the methods like this:
- **One:** Specify statements, First you must specify your sql statements for get something by using ``` prepare() ``` Then prepare function will return new object for call next actions, So following basic for get data something like this:
```php
$stmt = $this->db->prepare("SELECT * FROM fruits");
```
- **Two:** Execute statements, After specify statements you must execute your sql statements by using object ``` $stmt ``` as above:
```php
$stmt->execute();
```
- **Finalize:** Response data, Response data using by object ``` $stmt ``` for return your result data. So, Have a response are available for using:
```php
$stmt->fetch_all();
// result: array
$stmt->fetch_assoc();
// result: array
$stmt->fetch_array();
// result: array
$stmt->fetch_object();
// result: object
$stmt->num_rows();
// result: int
```
:grey_question: Tips: You can show your sql statements before execute: ``` $stmt->show(); ``` |
------------ |
#
### # Database transactions
You may use the transaction method provided by ```$this->model``` facade to run a set of operations within a database transaction. If an exception is thrown within the transaction closure, the transaction will automatically be rolled back. If the closure executes successfully, the transaction will automatically be committed. You don't need to worry about manually rolling back or committing while using the transaction method:
```php
// Init autocommit off
$this->db->transaction();
// update, delete some value
$this->db->update("fruits", array("name" => "Cherry"), array("id" => 1));
$this->db->delete("fruits", array("id" => 1));
// commit transaction
if ($this->db->commit()) {
echo "Commit completed!";
} else {
// Rollback transaction
$this->db->rollback();
}
```
#
### # Controller calling The Database
- The ```model``` automatic connect when you make ```model``` under rules "same file name". So if you make Controller name is "```Fruits```" you must be make Model name is "```Fruits```" same.
- You may use the `$this->model` for calling all the methods in model. A simple calling the method might look something like this:
```php
<?php
class FruitsController extends Controller {
public function __construct() {
parent::__construct();
}
/**
* Simple calling the model `Fruits`
*
*/
public function index() {
// Calling the method in model
$this->view->fruits = $this->model->getFruits(); // <---- Call method in Fruits model
// Return response view
return $this->view->render("fruits/fruits.view");
}
}
```
#
### # Inserts
The query builder also provides an ``` insert ``` method for inserting records into the database table. The insert method accepts an array of column names and values:
```php
$this->db->insert("fruits", array("id" => "1", "name" => "Banana"));
```
#
### # Updates
The query builder can also update existing records using the ``` update ``` method. The ``` update ``` method accepts an array of column and new value pairs containing the columns to be updated. You may constrain the update query using where clauses:
```php
$this->db->update("fruits", array("name" => "Cherry"), array("id" => 1));
```
#
### # Deletes
The query builder may also be used to ``` delete ``` records from the table via the delete method. You may constrain the ``` delete ``` query using where clauses:
```php
$this->db->delete("fruits", array("id" => 1));
```
#
### # Using with ``beech-cli`` command (recommended)
[Document PHP beech command line interface (CLI)](https://github.com/bombkiml/beech-cli)
#
### # Development
Want to contribute or join for Great Job!. You can contact to me via
- GitHub: [bombkiml/phpbeech - issues](https://github.com/bombkiml/phpbeech/issues)
- E-mail: <EMAIL>
- Facebook: [https://www.facebook.com/bombkiml](https://www.facebook.com/bombkiml)
#
### # License
PHP Beech framework is open-sourced software licensed under the [MIT license.](https://opensource.org/licenses/MIT)
<file_sep>/beech-framework/error/access_error.php
<!doctype html>
<html>
<head>
<meta charset='utf-8'/>
<link href='<?php echo $this->asset('images/beech_16.png'); ?>' rel='shortcut icon'/>
<title><?php echo @$this->title; ?></title>
</head>
<body>
<style type='text/css'>
body{font-family: Courier New;font-size: 12pt;}
#content{
box-sizing: border-box;
padding: 0 0 10px 20px;
border: 1px solid #d7d7d7;
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.08);
-webkit-transition: all 0.3s;
transition: all 0.3s;
margin: 0;
}
a{text-decoration:none}
ol{height: 6px;}
#red{color:#D50000}
#green{font-style: italic;color:#148414}
.blue{color:blue;}
.b{font-weight:bold}
h3{height:6px;}
.pointer{cursor: pointer;}
</style>
<div id='content'>
<h1><a href='https://github.com/bombkiml/phpbeech/issues' target='_blank' title='PHP Beech Framework'><img src='<?php echo $this->asset('images/beech_128.png'); ?>' width='64px' /> <label style='position:absolute;top:44px;margin-left:5px;' class="pointer">PHP Beech framework</label></a></h1>
<h2>Access Denied !</h2>
<?php $base = trim(BASE_URL, '/'); $base = explode('/', $base); $my_site = end($base); ?>
</div><file_sep>/views/welcome/welcome.view.php
<div class="flex-center position-ref full-height">
<div class="content">
<div class="title text-muted">
<h1 style="font-weight: bold; padding: 10px; color: #ccc !important">Welcome to PHP <label data-item='beech'>beech</label> framework</h1>
<div>
<i>#Make it by yourself</i>
</div>
<img src='<?php echo $this->asset('images/beech_LTS.png'); ?>' width='390' />
<h3><a href="https://github.com/bombkiml/phpbeech#php-beech-framework-lts" target="_blank">Documentation</a> | <a href="https://github.com/bombkiml/beech-cli#beech-command-line-interface-cli" target="_blank">Using with Beech CLI</a></h3>
</div>
</div>
</div>
<file_sep>/views/layouts/backend/header.php
<!doctype html>
<html>
<head>
<title><?php echo @$this->title; ?></title>
<link rel="shortcut icon" href="public/assets/images/beech_16.png">
<?php
/**
* this load stylesheet
*
*/
if (isset($this->css)) {
foreach ($this->css as $css) {
echo '<link rel="stylesheet" href="views/' . $css . '">';
}
}
/**
* this load javascript
*
*/
if (isset($this->js)) {
foreach ($this->js as $js) {
echo '<script src="views/' . $js . '" type="text/javascript"></script>';
}
}
?>
</head>
<body><file_sep>/beech-framework/System.php
<?php
class System {
private $_url = null;
private $_crl = null;
public function __construct() {
$this->get_url();
if (empty($this->_url[0])) {
$this->default_crl();
} else {
$this->load_file();
$this->call_method();
}
}
private function get_url() {
@$url = (@$_GET['url']) ? $_GET['url'] : $_SERVER['REQUEST_URI'];
$url = ltrim($url, '/');
$url = explode('/', $url);
if (count($url) < 2) {
$url[0] .= ($url[0]) ? 'Controller' : DEFAULT_CRL .'Controller';
} else {
if (!$url[1]) {
array_shift($url);
}
$url[0] .= ($url[0]) ? 'Controller' : DEFAULT_CRL .'Controller';
}
$this->_url = $url;
/**
* @url[0] : class
* @url[1] : method
* @url[2] : params
* @url[3] : params
* ...
*
*/
}
private function load_file() {
$file = PATH_C . $this->_url[0] . EXT;
if (file_exists($file)) {
require $file;
$this->_crl = new $this->_url[0]();
$this->_crl->load_model($this->_url[0]); // load model
} else {
$this->class_error($this->_url[0]);
}
}
private function call_method() {
$url_nums = count($this->_url);
if ($url_nums > 12) {
$this->beech_error();
}
switch ($url_nums) {
case 12 :
method_exists($this->_crl, $this->_url[1])?
$this->_crl->{$this->_url[1]}($this->_url[2], $this->_url[3], $this->_url[4], $this->_url[5], $this->_url[6], $this->_url[7], $this->_url[8], $this->_url[9], $this->_url[10], $this->_url[11]):
$this->method_error($this->_url[0], $this->_url[1], array($this->_url[2], $this->_url[3], $this->_url[4], $this->_url[5], $this->_url[6], $this->_url[7], $this->_url[8], $this->_url[9], $this->_url[10], $this->_url[11]));
break;
case 11 :
method_exists($this->_crl, $this->_url[1])?
$this->_crl->{$this->_url[1]}($this->_url[2], $this->_url[3], $this->_url[4], $this->_url[5], $this->_url[6], $this->_url[7], $this->_url[8], $this->_url[9], $this->_url[10]):
$this->method_error($this->_url[0], $this->_url[1], array($this->_url[2], $this->_url[3], $this->_url[4], $this->_url[5], $this->_url[6], $this->_url[7], $this->_url[8], $this->_url[9], $this->_url[10]));
break;
case 10 :
method_exists($this->_crl, $this->_url[1])?
$this->_crl->{$this->_url[1]}($this->_url[2], $this->_url[3], $this->_url[4], $this->_url[5], $this->_url[6], $this->_url[7], $this->_url[8], $this->_url[9]):
$this->method_error($this->_url[0], $this->_url[1], array($this->_url[2], $this->_url[3], $this->_url[4], $this->_url[5], $this->_url[6], $this->_url[7], $this->_url[8], $this->_url[9]));
break;
case 9 :
method_exists($this->_crl, $this->_url[1])?
$this->_crl->{$this->_url[1]}($this->_url[2], $this->_url[3], $this->_url[4], $this->_url[5], $this->_url[6], $this->_url[7], $this->_url[8]):
$this->method_error($this->_url[0], $this->_url[1], array($this->_url[2], $this->_url[3], $this->_url[4], $this->_url[5], $this->_url[6], $this->_url[7], $this->_url[8]));
break;
case 8 :
method_exists($this->_crl, $this->_url[1])?
$this->_crl->{$this->_url[1]}($this->_url[2], $this->_url[3], $this->_url[4], $this->_url[5], $this->_url[6], $this->_url[7]):
$this->method_error($this->_url[0], $this->_url[1], array($this->_url[2], $this->_url[3], $this->_url[4], $this->_url[5], $this->_url[6], $this->_url[7]));
break;
case 7 :
method_exists($this->_crl, $this->_url[1])?
$this->_crl->{$this->_url[1]}($this->_url[2], $this->_url[3], $this->_url[4], $this->_url[5], $this->_url[6]):
$this->method_error($this->_url[0], $this->_url[1], array($this->_url[2], $this->_url[3], $this->_url[4], $this->_url[5], $this->_url[6]));
break;
case 6 :
method_exists($this->_crl, $this->_url[1])?
$this->_crl->{$this->_url[1]}($this->_url[2], $this->_url[3], $this->_url[4], $this->_url[5]):
$this->method_error($this->_url[0], $this->_url[1], array($this->_url[2], $this->_url[3], $this->_url[4], $this->_url[5]));
break;
case 5 :
method_exists($this->_crl, $this->_url[1])?
$this->_crl->{$this->_url[1]}($this->_url[2], $this->_url[3], $this->_url[4]):
$this->method_error($this->_url[0], $this->_url[1], array($this->_url[2], $this->_url[3], $this->_url[4]));
break;
case 4 :
method_exists($this->_crl, $this->_url[1])?
$this->_crl->{$this->_url[1]}($this->_url[2], $this->_url[3]):
$this->method_error($this->_url[0], $this->_url[1], array($this->_url[2], $this->_url[3]));
break;
case 3 :
method_exists($this->_crl, $this->_url[1])?
$this->_crl->{$this->_url[1]}($this->_url[2]):
$this->method_error($this->_url[0], $this->_url[1], array($this->_url[2]));
break;
case 2 :
// How to use function method_exists(obj_class, mehtod)
method_exists($this->_crl, $this->_url[1])?
$this->_crl->{$this->_url[1]}():
$this->method_error($this->_url[0], $this->_url[1]);
break;
default :
$this->_crl->index();
break;
}
}
private function class_error($class=null) {
require INC.'beech_error'.EXT;
$this->_crl = new Beech_error();
$this->_crl->class_error($class);
exit;
}
private function method_error($class=null, $method=null, $param=array()) {
require INC.'beech_error'.EXT;
$this->_crl = new Beech_error();
$this->_crl->method_error($class, $method, $param);
exit;
}
private function beech_error() {
require INC.'beech_error'.EXT;
$this->_crl = new Beech_error();
$this->_crl->beech_error();
exit;
}
}
<file_sep>/modules/controllers/welcomeController.php
<?php
class WelcomeController extends Controller {
public function __construct() {
parent::__construct();
}
public function index() {
$this->view->title = 'Welcome to Beech Framework';
$this->view->js = ["welcome/js/welcome.js"];
$this->view->css = ["welcome/css/welcome.css"];
// Call view->template function, It'll automatic load view header & footer in `view/layouts/` folder
// Template optional specifies what type of array that should be produced. Can be one of the following values:
// - FRONTNED (this is default)
// - BACKNED
return $this->view->template('welcome/welcome.view', FRONTEND);
}
public function hello() {
// Title page name
$this->view->title = 'Hello';
// Return render to view
return $this->view->render('welcome/hello.view');
}
public function sum($num1 = 0, $num2 = 0) {
// declare num1 & num2 and send to view
$this->view->num1 = $num1;
$this->view->num2 = $num2;
// calculate sum 2 number
$this->view->result = $num1 + $num2;
// Return render to view
return $this->view->render('welcome/sum.view');
}
public function xx() {
$this->model->get();
}
}
<file_sep>/modules/models/Welcome.php
<?php
class Welcome extends Model {
/**
* Rule constructor class it's call __construct of parent class
*
*/
public function __construct() {
parent::__construct();
}
/**
* Get results
*
* @return Response
*
*/
public function get() {
/* // Preparing sql statements
$stmt = $this->db->prepare("SELECT * FROM fruits");
// Execute statements
$stmt->execute();
// Return response rows
return $stmt->fetch_all(); */
/* $this->db->transaction();
$this->db->update('user', ['name' => 'bomb'], ['id' => 1]);
$this->db->update('user', ['name' => 'edd'], ['id' => 2, 'name' => 'xxx']);
// commit transaction
if ($this->db->commit()) {
echo "Commit completed!";
} else {
// Rollback transaction
$this->db->rollback();
} */
$this->db->tansaction(function($query) {
$query->update('user', ['name' => 'bomb'], ['id' => 1]);
$query->update('user', ['name' => 'edd'], ['id' => 2, 'namex' => 'xxx']);
});
}
/**
* Set something in one field
*
* @param Text $table
* @param Array $field
* @param Array $where
*
* @return Response
*
*/
public function set($table, $field, $where) {
}
/**
* Store data new reccord
*
* @param Text $table
* @param Array $fieldsData
*
* @return Response
*
*/
public function store($table, $fieldsData) {
}
/**
* Update multiple fields
*
* @param Text $table
* @param Array $fields
* @param Array $where
*
* @return Response
*
*/
public function update($table, $fields, $where) {
}
/**
* Delete something
*
* @param Text $table
* @param Array $where
*
* @return Response
*
*/
public function delete($table, $where) {
}
}<file_sep>/public/index.php
<?php
/**
* Beech - A PHP Framework For Web beech
*
* @package phpbeech
* @author bombkiml
*
*/
date_default_timezone_set('Asia/Bangkok');
/**
* Index file for start engine
*
*/
require 'config/config.php';
require 'beech-framework/_beech.conf.php';
/**
* Auto-load main class
*
*/
function __autoload($class) {
require INC . $class . EXT;
}
/**
* Engine start
*
*/
new System();
<file_sep>/beech-framework/View.php
<?php
class View {
// for system only. This function pointer view to .\error path.
public function _error($src) {
$this->path = $src;
require $src . EXT;
}
// for class view only
private function _view_error($src, $from = null) {
$this->title = 'View not found !';
$this->path = $src;
$this->from = $from;
require 'error/view_error' . EXT;
exit;
}
public function render($src) {
$file = PATH_V . $src . EXT;
if (!file_exists($file)) {
$this->_view_error($src, 'render');
}
require $file;
}
public function template($src, $layout = null) {
$file = PATH_V . $src . EXT;
if (!file_exists($file)) {
$this->_view_error($src, 'template');
}
require PATH_V . 'layouts/' . (($layout) ? $layout : FRONTEND) . '/header.php';
require $file;
require PATH_V . 'layouts/' . (($layout) ? $layout : FRONTEND) . '/footer.php';
}
// You can make another template method **exam. template1, template2, template3, ...
public function asset($url) {
$url = trim(preg_replace('/\\\\/', '/', $url), '/');
$file_path = BASE_URL . 'public/assets/' . $url;
if(!@getimagesize($file_path)) {
$pathArr = explode('/', $file_path);
$file_path = $pathArr[0] . '//' . $pathArr[2] . '/public/assets/' . $url;
}
$file_path = str_replace("\\", "/", $file_path);
return $file_path;
}
}
<file_sep>/beech-framework/_beech.conf.php
<?php
/**
* Beech file patern config
*
*/
define('INC', 'beech-framework/');
define('PATH_M', 'modules/models/');
define('PATH_V', 'views/');
define('PATH_C', 'modules/controllers/');
/**
* Layouts folder defualt `layouts/frontend|backend`
*
*/
define("FRONTEND", "frontend");
define("BACKEND", "backend");
/**
* Define base url
*
*/
define("BASE_URL", HOST_NAME . "/" . PJ_NAME . "/");
/**
* Other config
*
*/
define('EXT', '.php');
<file_sep>/beech-framework/Error.php
<?php
class Error extends Controller {
public function __construct() {
parent::__construct();
}
function beech_error(){
$this->view->title = 'Beech Error !';
$this->view->error('error/beech_error');
}
function class_error($class) {
$this->view->title = 'Class not found !';
$this->view->class = ucfirst($class);
$this->view->file = $class;
$this->view->error('error/class_error');
}
function method_error($class, $method, $param) {
$this->view->title = 'Method not found !';
$this->view->class = ucfirst($class);
$this->view->method = $method;
$this->view->param = $param;
$this->view->error('error/method_error');
}
}
<file_sep>/beech-framework/error/class_error.php
<!doctype html>
<html>
<head>
<meta charset='utf-8'/>
<link href='<?php echo $this->asset('images/beech_16.png'); ?>' rel='shortcut icon'/>
<title><?php echo @$this->title; ?></title>
</head>
<body>
<style type='text/css'>
body{font-family: Courier New;font-size: 12pt;}
#content{
box-sizing: border-box;
padding: 0 0 10px 20px;
border: 1px solid #d7d7d7;
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.08);
-webkit-transition: all 0.3s;
transition: all 0.3s;
margin: 0;
}
a{text-decoration:none}
ol{height: 6px;}
#red{color:#D50000}
#green{font-style: italic;color:#148414}
.blue{color:blue;}
.b{font-weight:bold}
h3{height:6px;}
.pointer{cursor: pointer;}
</style>
<div id='content'>
<h1><a href='https://github.com/bombkiml/phpbeech/issues' target='_blank' title='PHP Beech Framework'><img src='<?php echo $this->asset('images/beech_128.png'); ?>' width='64px' /> <label style='position:absolute;top:44px;margin-left:5px;' class="pointer">PHP Beech framework</label></a></h1>
<h2 id="red">Fatal error: Class not found !</h2>
<h3 id='red'>*** Notice ***</h3>
<?php $base = trim(BASE_URL, '/'); $base = explode('/', $base); $my_site = end($base); ?>
<h3 id='green'>1. Check path :: <?php echo $my_site; ?>/modules/controllers/<label id='red'><?php echo $this->file.'.php'; ?></label></h3>
<h3 id='green'>2. Check your code :: Do you have the class ? <label id='red'>"<?php echo $this->class; ?>"</label></h3>
<br/><hr/>
<div id='code' >
<h3><label class='blue'>Class</label> <label id='red'><?php echo $this->class; ?></label> <label class='blue'>extends</label> Controller {</h3>
<ol><label class='b blue'>functoin __construct</label>() {</ol>
<ol><ol class='blue'>parent::__construct();</ol></ol>
<ol>}</ol>
<label id='red'>
<ol id='green'>// More method ...</ol>
</label>
<h3>}</h3>
</div>
</div>
<file_sep>/beech-framework/Database.php
<?php
class Database {
private $_query = null;
private $_sql = null;
private $_mysqli = null;
public function __construct(){
$this->_mysqli = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME, DB_PORT) or die('Connect failed.');
$this->_mysqli->query("SET NAMES UTF8");
}
private function sql_command($sql){
$this->_sql = $sql;
}
public function prepare($sql){
$obj = new self;
$obj->sql_command($sql);
return $obj;
}
public function show(){
return $this->_sql;
}
public function execute(){
return $this->_query = $this->_mysqli->query($this->_sql) or die('<strong>SQL statment error ></strong> ' . $this->_sql);
}
public function num_rows(){
return mysqli_num_rows($this->_query);
}
public function fetch_all($resulttype = MYSQLI_NUM) {
return $this->_query->fetch_all($resulttype);
// Optional specifies what type of array that should be produced. Can be one of the following values:
// - MYSQLI_NUM (this is default)
// - MYSQLI_ASSOC
// - MYSQLI_BOTH
}
public function fetch_assoc() {
return $this->_query->fetch_assoc();
}
public function fetch_array() {
return $this->_query->fetch_array();
}
public function fetch_object() {
return $this->_query->fetch_object();
}
public function tansaction(callable $cb) {
$this->_mysqli->autocommit(FALSE);
try {
$res = $cb($this);
//$this->_mysqli->commit();
return $res;
} catch (Throwable $ex) {
$this->_mysqli->rollback();
throw $ex;
}
}
public function transaction() {
return $this->_mysqli->autocommit(FALSE);
}
public function commit() {
return $this->_mysqli->commit();
}
public function rollback($flags = null, $name = null) {
return $this->_mysqli->rollback($flags, $name);
// flags Optional. A constant:
// - MYSQLI_TRANS_COR_AND_CHAIN - Appends "AND CHAIN"
// - MYSQLI_TRANS_COR_AND_NO_CHAIN - Appends "AND NO CHAIN"
// - MYSQLI_TRANS_COR_RELEASE - Appends "RELEASE"
// - MYSQLI_TRANS_COR_NO_RELEASE - Appends "NO RELEASE"
// name Optional. ROLLBACK/*name*/ is executed if this parameter is specified
}
public function insert($table, $data = array()) { // function INSERT
$fields = implode(',', array_keys($data));
$values = implode("','", $data);
$sth = $this->prepare("INSERT INTO $table($fields) VALUES('".$values."')");
if(@$sth->execute())
return true;
else
return false;
}
public function update($table, $rows, $whereArr){ // function UPDATE
$keys = array_keys($rows);
$update = "";
$a = count($keys);
for($i = 0; $i < count($rows); $i++) {
if($rows[$keys[$i]]) {
$update .= $keys[$i].'="'.$rows[$keys[$i]].'"';
} else {
$update .= $keys[$i].'='.$rows[$keys[$i]];
}
if($i != count($rows)-1) {
$update .= ',';
}
}
$where = [];
foreach($whereArr as $key => $value) {
array_push($where, "$key='$value'");
}
$where = implode(' AND ', $where);
$sth = $this->prepare("UPDATE $table SET $update WHERE $where");
if($sth->execute())
return true;
else
return false;
}
public function delete($table, $whereArr){ // function DELETE
$where = [];
foreach($whereArr as $key => $value) {
array_push($where, "$key='$value'");
}
$where = implode(' AND ', $where);
$sth = $this->prepare("DELETE FROM $table WHERE $where");
if($sth->execute())
return true;
else
return false;
}
}<file_sep>/public/js/global.js
/* Golbal custom js */<file_sep>/config/config.php
<?php
/**
* Project name config
*
*/
define("PJ_NAME", "php-beech-dev");
/**
* Host name config ** default "http://localhost"
*
*/
define("HOST_NAME", "http://localhost:8071");
/**
* Default controller config
*
*/
define("DEFAULT_CRL", "welcome");
/**
* MySQSL database config
*
*/
define("DB_HOST", "localhost");
define("DB_USER", "dbuser");
define("DB_PASS", "<PASSWORD>");
define("DB_NAME", "shopping_db");
define("DB_PORT", "3308");
<file_sep>/beech-framework/error/beech_error.php
<!doctype html>
<html>
<head>
<meta charset='utf-8'/>
<link href='<?php echo $this->asset('images/beech_16.png'); ?>' rel='shortcut icon'/>
<title><?php echo @$this->title; ?></title>
</head>
<body>
<style type='text/css'>
body{font-family: Courier New;font-size: 12pt;}
#content{
box-sizing: border-box;
padding: 0 0 20px 20px;
border: 1px solid #d7d7d7;
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.08);
-webkit-transition: all 0.3s;
transition: all 0.3s;
margin: 0;
}
a{text-decoration:none}
ol{height: 6px;}
#red{color:#D50000}
#green{font-style: italic;color:#148414}
.blue{color:blue;}
.b{font-weight:bold}
h3{height:6px;}
.pointer{cursor: pointer;}
</style>
<div id='content'>
<h1><a href='https://github.com/bombkiml/phpbeech/issues' target='_blank' title='PHP Beech Framework'><img src='<?php echo $this->asset('images/beech_128.png'); ?>' width='64px' /> <label style='position:absolute;top:44px;margin-left:5px;' class="pointer">PHP Beech framework</label></a></h1>
<h2 id='red'>Oops! PHP Beech Framework is not supported !</h2>
<h4>Please contact PHP beech framework support via </h4>
<ul>
<li>GitHub issues: <label class='blue'><a href='https://github.com/bombkiml/phpbeech/issues' class='blue' target='_blank'>bombkiml/phpbeech - issues</a></label></li>
<li>E-mail: <EMAIL></li>
<li>Facebook: <label class='blue'><a href='http://www.facebook.com/bombkiml' class='blue' target='_blank'>https://www.facebook.com/bombkiml</a></label></li>
</ul>
</div>
<file_sep>/beech-framework/Session.php
<?php
class Session {
static function init() {
@session_start();
}
static function set($key, $val) {
$_SESSION[$key] = $val;
}
static function get($key) {
if (isset($_SESSION[$key])) {
return $_SESSION[$key];
}
}
static function destroy() {
return session_destroy();
}
}<file_sep>/beech-framework/error/view_error.php
<!doctype html>
<html>
<head>
<meta charset='utf-8'/>
<link href='<?php echo $this->asset('images/beech_16.png'); ?>' rel='shortcut icon'/>
<title><?php echo @$this->title; ?></title>
</head>
<body>
<style type='text/css'>
body{font-family: Courier New;font-size: 12pt;}
#content{
box-sizing: border-box;
padding: 0 0 50px 20px;
border: 1px solid #d7d7d7;
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.08);
-webkit-transition: all 0.3s;
transition: all 0.3s;
margin: 0;
}
a{text-decoration:none}
ol{height: 6px;}
#red{color:#D50000}
#green{font-style: italic;color:#148414}
.blue{color:blue;}
.b{font-weight:bold}
h3{height:6px;}
.pointer{cursor: pointer;}
</style>
<div id='content'>
<h1><a href='https://github.com/bombkiml/phpbeech/issues' target='_blank' title='PHP Beech Framework'><img src='<?php echo $this->asset('images/beech_128.png'); ?>' width='64px' /> <label style='position:absolute;top:44px;margin-left:5px;' class="pointer">PHP Beech framework</label></a></h1>
<h2 id="red">Fatal: View not found !</h2>
<h3 id='red'>*** Notice ***</h3>
<?php $base = trim(BASE_URL, '/'); $base = explode('/', $base); $my_site = end($base); ?>
<h3 id='green'>Check path :: <?php echo $my_site; ?>/views/<lable id='red'><?php echo $this->path.'.php'; ?></label></h3>
<br/><hr/>
<div id='code' >
<div id='green'>// Check your code</div>
<div><label class='b blue'>$this</label>->view-><?php echo $this->from; ?>("<label id='red'><?php echo $this->path; ?></label>");</div>
</div>
</div><file_sep>/views/welcome/sum.view.php
<!-- Styles -->
<style>
.full-height {
height: 90vh;
}
.flex-center {
align-items: center;
display: flex;
justify-content: center;
}
.position-ref {
position: relative;
}
.title {
font-size: 34px;
padding: 20px;
}
</style>
<div class="flex-center position-ref full-height">
<div class="text-center">
<div class="title text-muted">
<h4><?php echo $this->num1 . " + " . $this->num2 . " = " . $this->result; ?></h3>
</div>
</div>
</div>
|
d02559ee87c7c9899d7ba9f348de4c59e1d5f02f
|
[
"Markdown",
"JavaScript",
"PHP"
] | 22
|
PHP
|
bombkiml/phpbeech
|
8eef4919f3da48c82a9c0ece928accd73066404d
|
14467e2abc1e30bf5b6206a35d1c57f76e7343eb
|
refs/heads/master
|
<repo_name>Adalab/project-promo-m-module-3-team-4<file_sep>/web/src/components/App.js
import "../stylesheets/App.scss";
import { CardGenerator } from "./Card/CardGenerator";
import { Landing } from "./Landing";
import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
function App() {
return (
<Router>
<Switch>
<Route path="/" exact children={<Landing />} />
<Route path="/cardgenerator" exact children={<CardGenerator />} />
</Switch>
</Router>
);
}
export default App;
<file_sep>/README.md
# Final team project during the bootcamp at [Adalab](https://adalab.es/)
## Using React, we have refactored the code of a functional website intended to produce digital business cards, that was initially created with JavaScript.
The main idea of this project was to learn to `work with legacy code`, something that often happens in the programming world, developing our ability to modify code created by
others and making us aware of the importance of creating good code.
## Used Technologies:
- Sass for styling.
- ES6 and React for structuring the application JavaScript.
- Git for version control, using branches.
- Publication on the Internet using GitHub Pages.
In addition, we have implemented the following new features:
- Navigation between the different pages of the application using React router.
- Our own server which creates each individual card and offers the link to share it.
## Steps we followed:
#### :mag: Project analysis
- Create a new repo implementing the React project
- Create, inside such repo, a folder with version 0 (legacy code).
- Analyse and test the code to understand its structure in order to adapt it to our needs and knowledge.
- Fix bugs detected in the code.
- Implement improvements in the legacy code, without modifying the functionality.
##### 📋 React Layout
- Define the React component structure of the application.
- Generate the components of the project and communicate information through props.
- Create branches to work on the different components and avoid touching the master branch.
##### ⚛️ React Full version
- Perform interactivity, using React state and events.
- Implement communication with the backend, sharing and offline.
- Implement routing with React router.
##### Backend
-
-
## Scripts to start the project
- You need to have Node.js ![]
- Clone or download this repo and open your code editor.
- To install the dependencies:
`npm install`
- To run the app in the development mode.\
`npm start`
Open [http://localhost:4000](http://localhost:4000) to view it in the browser.
The page will reload if you make edits.\
## Developers:
- 🦁[<NAME> ](https://github.com/AzaharaGV)
- 👩 [<NAME>](https://github.com/parnasos)
- 🏸 [<NAME>](https://github.com/jero10lf)
- 👩💻 [<NAME>](https://github.com/Lcras90)
- 🦁 [<NAME>](https://github.com/Lorellana21)
If you want to collaborate or change anything to improve our project, please, feel free to create a new branch and a pull request.
<file_sep>/web/src/components/Card/Main/Palettes.js
import React from "react";
function Palettes(props) {
const handleClick = (event) => {
props.handleInput(event.target.name, event.target.value);
};
return (
<input
type={props.type}
name={props.name}
id={props.id}
value={props.value}
checked={props.checked}
className="js-palette "
onChange={handleClick}
/>
);
}
export { Palettes };
<file_sep>/web/src/components/Card/Main/Form.js
import { FormDesign } from "./FormDesign";
import { FormShare } from "./FormShare";
import { FormFill } from "./Form-fill";
import "../../../stylesheets/core/_variables.scss";
import "../../../stylesheets/layout/_form.scss";
function Form(props) {
return (
<form action="" method="POST" className="form js-form">
<FormDesign
handleClick={props.handleClick}
handleInput={props.handleInput}
/>
<FormFill
handleInput={props.handleInput}
name={props.name}
job={props.job}
image={props.image}
updateAvatar={props.updateAvatar}
email={props.email}
phone={props.phone}
linkedin={props.linkedin}
github={props.github}
/>
<FormShare data={props.data} />
</form>
);
}
export { Form };
<file_sep>/web/version0/src/js/01-const.js
//COLLAPSE DESIGN//
let selectionDesign = document.querySelector(".js-design");
let selectionDesignButton = document.querySelector(".js-designButton");
//COLLAPSE FILL//
let selectionFill = document.querySelector(".js-fill");
let selectionFillButton = document.querySelector(".js-fillButton");
let messageFill = document.querySelector(".js-tooltipFill");
//COLLAPSE SHARE//
let selectionShare = document.querySelector(".js-share");
let selectionShareButton = document.querySelector(".js-shareButton");
let messageShare = document.querySelector(".js-tooltipShare");
//CARD PROFILE//
const form = document.querySelector(".js-form");
const previewNameElemento = document.querySelector(".js-nameProfile");
const previewRoleElemento = document.querySelector(".js-rolProfile");
const previewPhoneElement = document.querySelector(".js-phone");
const previewMailElement = document.querySelector(".js-mail");
const previewLinkedinElement = document.querySelector(".js-linkedin");
const previewGithubElement = document.querySelector(".js-github");
const generalColors = document.querySelector(".js_generalcolor");
// PALETTE
const circleSocialnetwork = document.querySelectorAll(
".container-profile__containerrrss__rrss"
);
// SHARE
const profileName = document.querySelector(".profile__name");
const createButton = document.querySelector(".js-create-card");
const responseElement = document.querySelector(".js-response");
const cardCreated = document.querySelector(".card--created");
const responseUrl = document.querySelector(".js-url");
//Button
const resetButton = document.querySelector(".js-reset");
// //Form
const namelocal = document.querySelector(".fill__contact-name");
const jobLocal = document.querySelector(".fill__contact-role");
const emailLocal = document.querySelector(".fill__contact-email");
const phoneLocal = document.querySelector(".fill__contact-phone");
const linkedinLocal = document.querySelector(".fill__contact-linkedin");
const githubLocal = document.querySelector(".fill__contact-github");
<file_sep>/web/src/components/Card/Header.js
import logo from "../../images/hi-me-logo.png";
import "../../stylesheets/layout/_header.scss";
function Header() {
return (
<header className="page__header">
<img src={logo} alt="Hi Me! logo" width="120px" />
<h1></h1>
</header>
);
}
export { Header };
<file_sep>/web/version0/src/js/08-twitter.js
let anclaTwitter = document.querySelector(".js-aTwitter");
let shareURLTwitter = "https://twitter.com/intent/tweet?text=";
function createAncla(cardURL) {
let encodedURL = encodeURIComponent(cardURL);
anclaTwitter.setAttribute("href", shareURLTwitter + encodedURL);
}
<file_sep>/web/version0/src/js/00-object.js
"use strict";
let data = {
palette: "1",
name: "",
job: "",
phone: "",
email: "",
linkedin: "",
github: "",
photo: "",
};
<file_sep>/web/src/components/Card/Main/Form-colapsable.js
import React from "react";
import "../../../stylesheets/layout/_collapsable.scss";
import "../../../stylesheets/layout/_form.scss";
class Collapsable extends React.Component {
constructor(props) {
super(props);
this.state = {
isOpen: false,
};
this.handleClick = this.handleClick.bind(this);
}
handleClick() {
this.setState({
isOpen: !this.state.isOpen,
});
}
render() {
const openClassName = this.state.isOpen ? "open" : "none";
return (
<>
<div className="fieldset__button" onClick={this.handleClick}>
<div className="fieldset__button--title">
<i className={this.props.icon}></i>
<h2>{this.props.title}</h2>
</div>
<i className="fas fa-chevron-down fa-chevron-up js-designButton"></i>
</div>
<div className="js-design">
<div className={`design__expand ${openClassName}`}>
{this.props.children}
</div>
</div>
</>
);
}
}
export { Collapsable };
<file_sep>/web/src/components/Card/Main/Profile.js
import React from "react";
import defaultAvatar from "../../../images/img-default.jpg";
function Profile(props) {
const avatar = props.image === "" ? defaultAvatar : props.image;
return (
<div
className="container-profile__containercard__img js__profile-image"
style={{ backgroundImage: `url(${avatar})` }}
></div>
);
}
export default Profile;
<file_sep>/web/src/components/Card/Main/FormDesign.js
import { Collapsable } from "./Form-colapsable";
import { Palettes } from "./Palettes";
//import "../../../stylesheets/layout/_collapsable.scss";
function FormDesign(props) {
return (
<fieldset className="design">
<Collapsable title="Diseña" icon="far fa-object-ungroup">
<h3>Colores</h3>
<div className="colors__wrapper js_generalcolor">
<label className="label" htmlFor="palette1">
<Palettes
type="radio"
name="palette"
id="palette1"
value="1"
checked="checked"
className="js-palette1"
handleInput={props.handleInput}
/>
<ul className="palette__wrapper">
<li className="color palette1__color1"></li>
<li className="color colorList1"></li>
<li className="color palette1__color3"></li>
</ul>
</label>
<label className="label" htmlFor="palette2">
<Palettes
type="radio"
name="palette"
id="palette2"
value="2"
className="js-palette2"
handleInput={props.handleInput}
/>
<ul className="palette__wrapper">
<li className="color palette2__color1"></li>
<li className="color colorList2"></li>
<li className="color palette2__color3"></li>
</ul>
</label>
<label className="label" htmlFor="palette3">
<Palettes
type="radio"
name="palette"
id="palette3"
value="3"
className="js-palette3"
handleInput={props.handleInput}
/>
<ul className="palette__wrapper">
<li className="color palette3__color1"></li>
<li className="color colorList3"></li>
<li className="color palette3__color3"></li>
</ul>
</label>
</div>
</Collapsable>
</fieldset>
);
}
export { FormDesign };
<file_sep>/web/src/components/Card/Main/FormShare.js
import { useState } from "react";
import { Collapsable } from "./Form-colapsable";
import { fetchCard } from "../../../services/fetchCard";
function FormShare(props) {
const [cardError, setCardError] = useState("");
const [cardURL, setCardURL] = useState("");
const handleClick = (ev) => {
ev.preventDefault();
fetchCard(props.data).then((data) => {
if (data.success === false) {
setCardError(data.error);
setCardURL("");
} else {
setCardError("");
setCardURL(data.cardURL);
console.log(data.cardURL);
}
});
};
return (
<fieldset className="share ">
<Collapsable title="Comparte" icon="fas fa-share-alt">
<div className="none js-share">
<div className="share__expand">
<button
className="share__button js-create-card"
onClick={handleClick}
>
<i className="far fa-address-card"> </i>Crear tarjeta
</button>
</div>
{cardError !== "" ? (
<div className="none js-response">{cardError}</div>
) : null}
{cardURL !== "" ? (
<div className="none card--created">
<h3 className="none">La tarjeta ha sido creada:</h3>
<a className="js-url" href={cardURL}>
Aqui tienes tu tarjeta.
</a>
<a className="none share__button--twitter js-aTwitter">
Compartir en Twitter
</a>
</div>
) : null}
</div>
</Collapsable>
</fieldset>
);
}
export { FormShare };
<file_sep>/web/version0/README.md
#APLICACIÓN PARA LA CREACIÓN DE TARJETAS
En este proyecto vamos a realizar una aplicación web que nos permite crear una tarjeta de visita personalizada. En la página web podemos introducir nuestros datos profesionales y obtener una vista maquetada con esta información. Lo bueno de este proyecto es que será una herramienta de la que os podréis beneficiar. Será una aplicación web interactiva creada por vosotras y que podéis usar para crear vuestras propias tarjetas de visita profesionales.
##Especificaciones
En el desarrollo de esta aplicación web usaremos las siguientes tecnologías:
Uso avanzado de formularios HTML
Maquetación usando CSS avanzado, como flex y grid
Uso de mediaqueries para que el diseño sea adaptable al dispositivo usando la estrategia mobile first
Gestión de eventos en el navegador (al hacer click, pasa x, etc.)
Acceso y envío de datos a un servidor
Almacenamiento en local usando LocalStorage
Uso de git para el control de versiones del proyecto
Publicación del resultado en Internet usando GitHub Pages
El proyecto consta de 2 páginas:
Una página landing de bienvenida
Una página con la aplicación de crear tarjetas
La aplicación funciona siguiendo estos pasos:
Permitir al usuario elegir el estilo de la tarjeta, eligiendo paleta de colores
Permitir al usuario que, mediante la introducción de información en un formulario, este texto se muestre maquetado automáticamente en un cuadro similar a una tarjeta de visita, que será la muestra del resultado final
Permitir que el usuario pueda crear una web con su tarjeta y compartirla por Twitter.
Este proyecto incluye un motor de plantillas HTML, el preprocesador SASS y un servidor local y muchas cosas más. El Kit nos ayuda a trabajar más cómodamente, nos automatiza tareas.
Hay 3 tipos de ficheros y carpetas:
- Los ficheros que están sueltos en la raíz del repositorio, como gulpfile.js, package.json... Son la configuración del proyecto y no necesitamos modificarlos.
- La carpeta `src/`: son los ficheros de nuestra página web, como HTML, CSS, JS...
- Las carpetas `public/` y `docs/`, que son generadas automáticamente cuando arrancamos el proyecto. El Kit lee los ficheros que hay dentro de `src/`, los procesa y los genera dentro de `public/` y `docs/`.
## Guía de inicio rápido
> **NOTA:** Necesitas tener instalado [Node JS](https://nodejs.org/)
### Pasos a seguir cada vez que queremos arrancar un proyecto desde cero:
1. **Copia todos los ficheros** en la carpeta raíz de tu repositorio.
- Recuerda que debes copiar **también los ficheros ocultos**.
- Si has decidido clonar este repo, no debes copiar la carpeta `.git`. Si lo haces estarás machacando tu propio repositorio.
1. **Abre una terminal** en la carpeta raíz de tu repositorio.
1. **Instala las dependencias** locales ejecutando en la terminal el comando:
```bash
npm install
```
### Pasos para arrancar el proyecto:
Una vez hemos instalado las dependencias, vamos a arrancar el proyecto.
Para ello ejecuta el comando:
```bash
npm start
```
Este comando:
- **Abre una ventana de Chrome y muestra tu página web**, al igual que hace el plugin de VS Code Live Server (Go live).
- También **observa** todos los ficheros que hay dentro de la carpeta `src/`, para que cada vez que modifiques un fichero **refresca tu página en Chrome**.
- También **procesa los ficheros** HTML, SASS / CSS y JS y los **genera y guarda en la carpeta `public/`**. Por ejemplo:
- Convierte los ficheros SASS en CSS.
- Combina los diferentes ficheros de HTML y los agrupa en uno o varios ficheros HTML.
Después de ejecutar `npm start` ya puedes empezar a editar todos los ficheros que están dentro de la carpeta `src/` y programar cómodamente.
### Pasos para publicar el proyecto en GitHub Pages:
Para generar tu página para producción ejecuta el comando:
```bash
npm run docs
```
Y a continuación:
1. Sube a tu repo la carpeta `docs/` que se te acaba de generar.
1. Entra en la pestaña `settings` de tu repo.
1. Y en el apartado de GitHub Pages activa la opción **master branch /docs folder**.
1. Y ya estaría!!!
Además, los comandos:
```bash
npm run push-docs
```
o
```bash
npm run deploy
```
son un atajo que nos genera la versión de producción y hace push de la carpeta `docs/` del tirón. Te recomendamos ver el fichero `package.json` para aprender cómo funciona.
## Flujo de archivos con Gulp
Estas tareas de Gulp producen el siguiente flujo de archivos:

## `gulpfile.js` y `config.json`
Nuestro **gulpfile.js** usa el fichero `config.json` de configuración con las rutas de los archivos a generar / observar.
De esta manera separarmos las acciones que están en `gulpfile.js` de la configuración de las acciones que están en `config.json`.
## Estructura de carpetas
La estructura de carpetas tiene esta pinta:
```
src
├─ api // los ficheros de esta carpeta se copian en public/api/
| └─ data.json
├─ images
| └─ logo.jpg
├─ js // los ficheros de esta carpeta se concatenan en el fichero main.js y este se guarda en public/main.js
| ├─ main.js
| └─ events.js
├─ scss
| ├─ components
| ├─ core
| ├─ layout
| └─ pages
└─ html
└─ partials
```
> **NOTA:** Los partials de HTML y SASS del proyecto son orientativos. Te recomendamos usar los que quieras, y borrar los que no uses.
## Falta algo?
Echas de menos que el kit haga algo en concreto? Pidelo sin problema a través de las issues o si te animas a mejorarlo mándanos un PR :)
<file_sep>/web/version0/src/js/06-send.js
function handleClickCreate(ev) {
ev.preventDefault();
fetch("https://awesome-profile-cards.herokuapp.com/card", {
method: "POST",
headers: {
"content-type": "application/json",
},
body: JSON.stringify(data),
})
.then((response) => response.json())
.then((data) => {
if (data.success === false) {
responseElement.classList.remove("none");
responseElement.innerHTML = "Tienes que rellenar los campos";
} else {
responseUrl.innerHTML = `<a href='${data.cardURL}' target="_blank">Pincha aquí para ver tu tarjeta</a>`;
// responseElement.classList.remove("none");
createButton.classList.add("none");
createAncla(data.cardURL);
}
cardCreated.classList.remove("none");
anclaTwitter.classList.remove("none");
})
.catch(() => {
responseElement.innerHTML = "Inténtalo más tarde.";
// responseElement.classList.remove("none");
});
localStorage.setItem("profile", JSON.stringify(data));
}
createButton.addEventListener("click", handleClickCreate);
|
201c712fab9eb828265151571461e3824e44f4d0
|
[
"JavaScript",
"Markdown"
] | 14
|
JavaScript
|
Adalab/project-promo-m-module-3-team-4
|
4599973ebd5990223efdafeefe2b94fd39f59759
|
c457405c85fcbba104244ecb8a31f0563f49a408
|
refs/heads/master
|
<repo_name>fishstor/project<file_sep>/test.py
print('hello world')
print('hello world again')
print('haha')
|
2d18896511da32d774fdb9c30b72c57a37378ed2
|
[
"Python"
] | 1
|
Python
|
fishstor/project
|
ea8834c4b7c1633e1be6c5582bbb4d7e78a3ab0c
|
d872b736471b550c5af356ff71994ece1c18ba4b
|
refs/heads/master
|
<repo_name>gdmgent-1718-webdev1/oefening-07-briavers<file_sep>/index.php
<?php
$fibonaci = [0,1];
for($i = 2; $i < 100; ++$i){
$fibonaci[$i] = $fibonaci[$i-1] + $fibonaci[$i-2];
}
foreach ($fibonaci as $j) {
echo "${j}".PHP_EOL;
}
|
3cbaa4e23efb5cf0b06ae1d1e9e0a9dd3d9f3268
|
[
"PHP"
] | 1
|
PHP
|
gdmgent-1718-webdev1/oefening-07-briavers
|
89cf462b5313f2cc090524c5960a0c00860cf1a1
|
2fcb9d01750342905d95d5085153cfaca1dee5ac
|
refs/heads/master
|
<repo_name>ZhangZiLiX/SearchUtils<file_sep>/app/src/main/java/com/bwie/searchview/SearchViewTest.java
package com.bwie.searchview;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.net.http.SslError;
import android.support.annotation.Nullable;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.SearchView;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.webkit.SslErrorHandler;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;
import com.bwie.searchview.adapter.SearchAdapter;
import com.bwie.searchview.bean.SearchContentBean;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
import static com.bwie.searchview.R.id.txt_search_go;
/**
* date:2019/1/16
* author:张自力(DELL)
* function:
*/
public class SearchViewTest extends LinearLayout implements View.OnClickListener {
private String serachContent="";//搜索内容存储
private boolean serachBtn=false;//搜索按钮改变事件标识
private boolean serachWeb=false;//搜索webview网址改变事件标识
private ImageView imgBack;
private SearchView searchview;
private TextView txtSearchGo;
private TextView txtSearchBack;
private RecyclerView rvSearchlog;
private ScrollView scrollviewSearchlog;
private Button btnClear;
private SharedPreferences mSearchSp;
private List<SearchContentBean> mList;
private SearchAdapter mSearchAdapter;
private LinearLayout mLlsearchAndLog;
private WebView mWebviewSearch;
private Pattern mHttpPattern;
//重写三个方法
public SearchViewTest(Context context) {
this(context, null);
}
public SearchViewTest(Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
public SearchViewTest(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
//初始化数据 加载布局
initViews(context, attrs, defStyleAttr);
//初始化SP
initSharedProferences(context, attrs, defStyleAttr);
//初始化搜索历史的list 和 Adapter对象
initSearchListAndAdapter(context);
//对搜索框SearchView进行监听
setSearchViewOnClickListener(context, attrs, defStyleAttr);
}
/**
* 对搜索框SearchView进行监听
*
* */
private void setSearchViewOnClickListener(Context context, AttributeSet attrs, int defStyleAttr) {
searchview.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
//点击右侧搜索按钮时 触发的方法
@Override
public boolean onQueryTextSubmit(String query) {
return false;
}
//输入框内容发生变化时 触发的方法
@Override
public boolean onQueryTextChange(String newText) {
//得到搜索的内容
serachContent = newText;
return true;
}
});
}
/**
* 初始化搜索历史的list 和 Adapter对象
*
* */
private void initSearchListAndAdapter(Context context) {
//搜索
mList = new ArrayList<>();
mSearchAdapter = new SearchAdapter(context, mList);
rvSearchlog.setAdapter(mSearchAdapter);
//刷新事件
getRefreshSearchData();
}
/**
* //刷新事件
* */
private void getRefreshSearchData() {
//从sp中得到数据
String requestSearchContent = mSearchSp.getString("searchContent", "");
//将数据加入集合中
if(!requestSearchContent.equals("")){
//首先展示历史区域
scrollviewSearchlog.setVisibility(VISIBLE);
//加入数据
mList.add(new SearchContentBean(requestSearchContent));
mSearchAdapter.notifyDataSetChanged();
}else{
//为空就隐藏
scrollviewSearchlog.setVisibility(GONE);
}
}
/**
* 初始化SP
*
* */
private void initSharedProferences(Context context, AttributeSet attrs, int defStyleAttr) {
//创建一个sp存储
mSearchSp =getContext().getSharedPreferences("search", Context.MODE_PRIVATE);
}
/**
* 初始化数据 加载布局
*
*/
private void initViews(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
//View view = inflate(context, R.layout.searchview_utils, this);
View view = LayoutInflater.from(context).inflate(R.layout.searchview_utils, this);
//初始化正则
mHttpPattern = Pattern
.compile("^([hH][tT]{2}[pP]://|[hH][tT]{2}[pP][sS]://)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~/])+$");
//找控件
searchview = (SearchView) view.findViewById(R.id.searchview);//搜索框
txtSearchGo = (TextView) view.findViewById(txt_search_go);//搜索按钮
txtSearchBack = (TextView) view.findViewById(R.id.txt_search_back);//返回按钮 默认隐藏
rvSearchlog = (RecyclerView) view.findViewById(R.id.rv_searchlog);//历史记录 rv
scrollviewSearchlog = (ScrollView) view.findViewById(R.id.scrollview_searchlog);//包裹rv历史记录 默认隐藏
btnClear = (Button) view.findViewById(R.id.btn_clear);//清空历史记录
mLlsearchAndLog = view.findViewById(R.id.ll_searchandlog);//包含搜索框和历史的容器
mWebviewSearch = view.findViewById(R.id.webview_search);//网址搜索框
//布局管理器
LinearLayoutManager layoutManagerSearch = new GridLayoutManager(context,3);
rvSearchlog.setLayoutManager(layoutManagerSearch);
//webview设置
setWebView();
//事件监听
txtSearchGo.setOnClickListener(this);
txtSearchBack.setOnClickListener(this);
btnClear.setOnClickListener(this);
}
/**
* webview设置
*
* */
private void setWebView() {
WebSettings webSettings = mWebviewSearch.getSettings();
webSettings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);// 设置缓存
webSettings.setJavaScriptEnabled(true);//设置能够解析Javascript
webSettings.setDomStorageEnabled(true);//设置适应Html5 //重点是这个设置
mWebviewSearch.setWebViewClient(new WebViewClient(){
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
//super.onReceivedSslError(view, handler, error);
//接受证书 忽略ssl证书错误
handler.proceed();
}
});
}
/**
* 点击事件
* */
@Override
public void onClick(View v) {
int i = v.getId();
if (i == txt_search_go) {//作用 点击之后
//1 切换按钮状态(搜索按钮隐藏 返回按钮展示)
if (!serachBtn) {
//按钮切换
txtSearchGo.setVisibility(View.GONE);
txtSearchBack.setVisibility(View.VISIBLE);
//将搜索内容存储
//mSearchSp.getString("searchContent", "");
boolean issearchContent = mSearchSp.edit().putString("searchContent", serachContent).commit();
if (issearchContent) {
//刷新数据
if (serachContent.equals("")) {
Toast.makeText(getContext(), "请输入搜索内容", Toast.LENGTH_SHORT).show();
} else {
//添加数据
//Toast.makeText(getContext(), "存储数据成功!", Toast.LENGTH_SHORT).show();
//加完之后刷新
getRefreshSearchData();
//判断输入的是否是一个网址
//开始判断了
if (mHttpPattern.matcher(serachContent).matches()) {
//这是一个网址链接
Toast.makeText(getContext(), "加载中……", Toast.LENGTH_SHORT).show();
//将隐藏的webview展示 搜索容器隐藏
mWebviewSearch.setVisibility(View.VISIBLE);
mLlsearchAndLog.setVisibility(View.GONE);
mWebviewSearch.loadUrl(serachContent);//加载url
} else {
//这不是一个网址链接
Toast.makeText(getContext(), "这不是一个网址", Toast.LENGTH_SHORT).show();
mWebviewSearch.setVisibility(View.GONE);
mLlsearchAndLog.setVisibility(View.VISIBLE);
}
}
} else {
Toast.makeText(getContext(), "存储数据失败!", Toast.LENGTH_SHORT).show();
;
}
} else {
txtSearchGo.setVisibility(View.VISIBLE);
txtSearchBack.setVisibility(View.GONE);
}
//2 改变按钮标识
serachBtn = true;
// 进行请求接口 进行网络数据请求
} else if (i == R.id.txt_search_back) {//作用 点击之后
//1 切换按钮状态(搜索按钮展示 返回按钮隐藏)
if (!serachBtn) {
txtSearchGo.setVisibility(View.GONE);
txtSearchBack.setVisibility(View.VISIBLE);
} else {
txtSearchGo.setVisibility(View.VISIBLE);
txtSearchBack.setVisibility(View.GONE);
}
//2 改变按钮标识
serachBtn = false;
} else if (i == R.id.btn_clear) {
boolean spclearistrue = mSearchSp.edit().clear().commit();
if (spclearistrue) {
Toast.makeText(getContext(), "清空数据成功!", Toast.LENGTH_SHORT).show();
;
//刷新数据
initSearchListAndAdapter(getContext());
} else {
Toast.makeText(getContext(), "清空数据失败!", Toast.LENGTH_SHORT).show();
;
}
}
}
}
|
f2354a99c3b93e447d7a92534044ec455748dc95
|
[
"Java"
] | 1
|
Java
|
ZhangZiLiX/SearchUtils
|
f766f0f6a13284a8d320f0d3c8f26e1981d751ed
|
cc5827bf00cbab6c8529de6209e46ce7ce9c508a
|
refs/heads/master
|
<file_sep>import tensorflow as tf
class remove_duplicate:
def __init__(self, appearance_feature, geometric_feature, sample_roi, roi_score, roi_cls_loc, is_duplicated=False):
# sess = tf.Session()
# number of relation
self.Nr = 16
# appearance feature dimension
self.appearance_feature = 1024
# geo feature dimension
self.geo_feature = 64
# key feature dimension
self.key_feature = 64
self.num_class = 20 + 1
self.loc_normalize_mean = [0., 0., 0., 0.] * self.num_class
self.loc_normalize_std = [0.1, 0.1, 0.2, 0.2] * self.num_class
# pooling 된 RoI feature 값들
# [-1, 7, 7, 1024]
# N = sample_roi.shape[0]
N = 256
# [-1, 1]
# RoI 갯수만큼 softmax값이 들어 있음
# roi_score
# [-1, 4]
# model이 예측한 좌표에 anchor x,y,w,h를 적용하고 x1,y1,x2,y2로 치환한 값
# roi_cls_loc
# roi = at.totensor(sample_roi)
# zero가 아닌 idx
not_zero = tf.where(tf.not_equal(roi_score, 0))
not_zero_size = tf.shape(not_zero)[0]
# RoI가 모두 0일 경우 제거하기 위해서
not_zero = tf.cond(not_zero_size==0, lambda: None, lambda: not_zero)
if not_zero is not None:
roi_cls_loc = roi_cls_loc[not_zero]
roi_score = roi_score[not_zero]
sample_roi = sample_roi[not_zero]
# score 순으로 정렬 필요
range = tf.range(start=0, limit=N, delta=1)
print(range)
roi_score_argmax = tf.argmax(roi_score, axis=1)
print(roi_score_argmax)
# print(sess.run([roi_score_argmax]))
# self.NMS_rank = tf.layers.dense(appearance_feature, 128, use_bias=True,
# kernel_initializer=tf.random_normal_initializer(mean=0.0, stddev=0.01),
# activation=tf.nn.relu)
# self.NMS_logit = tf.layers.dense(appearance_feature, 1, use_bias=True,
# kernel_initializer=tf.random_normal_initializer(mean=0.0, stddev=0.01),
# activation=tf.nn.relu)
# self.RoI = tf.layers.dense(appearance_feature, 128, use_bias=True,
# kernel_initializer=tf.random_normal_initializer(mean=0.0, stddev=0.01),
# activation=tf.nn.relu)
# result = []
# for num in range(self.Nr):
# result.append(self.relation(appearance_feature, geometric_feature))
#
# result = tf.concat(result, axis=1)
def relation(self, appearance_feature, geometric_feature):
# (number of RoI * 7 * 7 * 1024,, 1024)
num_roi = appearance_feature.shape[0]
Wk = tf.layers.dense(appearance_feature, self.key_feature, use_bias=True,
kernel_initializer=tf.random_normal_initializer(mean=0.0, stddev=0.01),
activation=tf.nn.relu)
Wq = tf.layers.dense(appearance_feature, self.key_feature, use_bias=True,
kernel_initializer=tf.random_normal_initializer(mean=0.0, stddev=0.01),
activation=tf.nn.relu)
Wv = tf.layers.dense(appearance_feature, self.key_feature, use_bias=True,
kernel_initializer=tf.random_normal_initializer(mean=0.0, stddev=0.01),
activation=tf.nn.relu)
Wg = tf.layers.dense(tf.nn.relu(self.PositionalEmbedding(geometric_feature)), 1, use_bias=True,
kernel_initializer=tf.random_normal_initializer(mean=0.0, stddev=0.01),
activation=tf.nn.relu)
Wk = tf.reshape(Wk, [1, num_roi, self.key_feature])
Wq = tf.reshape(Wq, [num_roi, 1, self.key_feature])
print('Wk : ', Wk)
print('Wq : ', Wq)
scaled_dot = tf.reduce_sum([Wk * Wq], axis=-1) / tf.sqrt(tf.to_float(self.key_feature))
# scaled_dot = Wk * Wq / tf.sqrt(tf.to_float(self.key_feature))
print('scaled_dot : ', scaled_dot)
print('Wg : ', Wg)
Wg = tf.reshape(Wg, [num_roi, num_roi])
print('Wg : ', Wg)
Wa = tf.reshape(scaled_dot, [num_roi, num_roi])
Wmn = tf.log(tf.clip_by_value(Wg, clip_value_min=1e-6, clip_value_max=100000000)) + Wa
Wmn = tf.nn.softmax(Wmn, axis=1)
print('Wmn : ', Wmn)
Wmn = tf.reshape(Wmn, [num_roi, num_roi, 1])
print('Wmn : ', Wmn)
print('Wv : ', Wv)
Wv = tf.reshape(Wv, [num_roi, 1, -1])
print('Wv : ', Wv)
return tf.reduce_sum(Wmn * Wv, axis=-2)
def PositionalEmbedding(self, geometric_feature, dim_g=64, wave_len=1000.):
# (number of RoI, coordinate of Roi)
# x_min, y_min, x_max, y_max = torch.chunk(f_g, 4, dim=1)
xmin, ymin, xmax, ymax = tf.split(value=geometric_feature, num_or_size_splits=4, axis=1)
x = (xmin + xmax) * 0.5
y = (ymin + ymax) * 0.5
w = (xmax - xmin) + 1.
h = (ymax - ymin) + 1.
delta_x = x - tf.reshape(x, [1, -1])
print(delta_x)
# delta_x = torch.clamp(tf.abs(delta_x / w), min=1e-3)
# delta_x = torch.log(delta_x)
delta_x = tf.clip_by_value(tf.abs(delta_x / w), clip_value_min=1e-3, clip_value_max=100000000)
delta_x = tf.log(delta_x)
delta_y = y - tf.reshape(y, [1, -1])
delta_y = tf.clip_by_value(tf.abs(delta_y / h), clip_value_min=1e-3, clip_value_max=100000000)
delta_y = tf.log(delta_y)
delta_w = tf.log(w / tf.reshape(w, [1, -1]))
delta_h = tf.log(h / tf.reshape(h, [1, -1]))
shape = delta_h.shape
delta_x = tf.reshape(delta_x, [shape[0], shape[1], 1])
print(delta_x)
delta_y = tf.reshape(delta_y, [shape[0], shape[1], 1])
delta_w = tf.reshape(delta_w, [shape[0], shape[1], 1])
delta_h = tf.reshape(delta_h, [shape[0], shape[1], 1])
position_mat = tf.concat([delta_x, delta_y, delta_w, delta_h], axis=-1)
# feat_range = torch.arange(dim_g / 8).cuda()
feat_range = tf.range(dim_g / 8)
dim_mat = feat_range / (dim_g / 8)
# dim_mat = tf.to_int32(dim_mat)
print(dim_mat)
dim_mat = 1 / (tf.pow(wave_len, dim_mat))
dim_mat = tf.reshape(dim_mat, [1, 1, 1, -1])
position_mat = tf.reshape(position_mat, [shape[0], shape[1], 4, -1])
# dim_mat = dim_mat.view(1, 1, 1, -1)
# position_mat = position_mat.view(shape[0], shape[1], 4, -1)
position_mat = 100. * position_mat
mul_mat = position_mat * dim_mat
mul_mat = tf.reshape(mul_mat, [shape[0], shape[1], -1])
# mul_mat = mul_mat.view(shape[0], shape[1], -1)
sin_mat = tf.sin(mul_mat)
cos_mat = tf.cos(mul_mat)
embedding = tf.concat((sin_mat, cos_mat), -1)
return embedding
def clip_boxes(self, boxes, img_width, img_height):
img_width = tf.cast(img_width, tf.float32)
img_height = tf.cast(img_height, tf.float32)
b0 = tf.maximum(tf.minimum(boxes[:, 0], img_width - 1), 0.0)
b1 = tf.maximum(tf.minimum(boxes[:, 1], img_height - 1), 0.0)
b2 = tf.maximum(tf.minimum(boxes[:, 2], img_width - 1), 0.0)
b3 = tf.maximum(tf.minimum(boxes[:, 3], img_height - 1), 0.0)
return tf.stack([b0, b1, b2, b3], axis=1)
if __name__ == '__main__':
appearance_feature = tf.random_normal(shape=[256, 7, 7, 1024])
geometric_feature = tf.random_normal(shape=[256, 4])
sample_roi = tf.random_normal(shape=[256, 7, 7, 1024])
roi_score = tf.random_normal(shape=[256, 1])
roi_cls_loc = tf.random_normal(shape=[256, 4])
appearance_feature = tf.layers.flatten(appearance_feature)
rm = remove_duplicate( appearance_feature, geometric_feature, sample_roi, roi_score, roi_cls_loc)
<file_sep># Relation-Networks-for-Object-Detection-tensorflow
Relation Networks for Object Detection reproducing project with tensorflow
### 프로젝트를 크게 2개로 분리
1. backbone network인 Faster-RCNN 구현
- https://github.com/kwonsungil/Faster-RCNN
2. 기존 Faster-RCNN model을 이용하여 논문의 핵심인 Relation Module을 구현하고 테스트
- https://github.com/kwonsungil/Relation-Networks-for-Object-Detection-tensorflow
### 일정(https://github.com/rp12-study/rp12-hub/wiki)
1. Paper Review
2. ResNet 구현 및 학습
3. Faster-RCNN 구현 및 학습
<file_sep>import tensorflow as tf
import config as cfg
class RelationModule:
def __init__(self, appearance_feature, geometric_feature, is_duplicated = False):
# number of relation
self.Nr = 16
# appearance feature dimension
self.appearance_feature_dim = 1024
# geo feature dimension
self.geo_feature_dim = 64
# key feature dimension
self.key_feature_dim = 64
result = []
for num in range(self.Nr):
# appearance_feature는 list 형태로 들어가 있음
result.append(self.relation(appearance_feature, geometric_feature))
self.result = tf.concat(result, axis=1)
print(self.result)
def relation(self, appearance_feature, geometric_feature):
# (number of RoI * 7 * 7 * 1024,, 1024)
num_roi = appearance_feature.shape[0]
# num_roi = cfg.anchor_batch
Wk = tf.layers.dense(appearance_feature, self.key_feature_dim, use_bias = True,
kernel_initializer=tf.random_normal_initializer(mean=0.0, stddev=0.01),
activation=tf.nn.relu)
Wq = tf.layers.dense(appearance_feature, self.key_feature_dim, use_bias=True,
kernel_initializer=tf.random_normal_initializer(mean=0.0, stddev=0.01),
activation=tf.nn.relu)
Wg = tf.layers.dense(tf.nn.relu(self.PositionalEmbedding(geometric_feature)), 1, use_bias=True,
kernel_initializer=tf.random_normal_initializer(mean=0.0, stddev=0.01),
activation=tf.nn.relu)
print('Wg : ', Wg)
Wv = tf.layers.dense(appearance_feature, self.key_feature_dim, use_bias=True,
kernel_initializer=tf.random_normal_initializer(mean=0.0, stddev=0.01),
activation=tf.nn.relu)
Wk = tf.reshape(Wk, [1, num_roi, self.key_feature_dim])
Wq = tf.reshape(Wq, [num_roi, 1, self.key_feature_dim])
print('Wk : ', Wk)
print('Wq : ', Wq)
scaled_dot = tf.reduce_sum([Wk * Wq], axis=-1) / tf.sqrt(tf.to_float(self.key_feature_dim))
# scaled_dot = Wk * Wq / tf.sqrt(tf.to_float(self.key_feature_dim))
print('scaled_dot : ', scaled_dot)
print('Wg : ', Wg)
Wg = tf.reshape(Wg, [num_roi, num_roi])
print('Wg : ', Wg)
Wa = tf.reshape(scaled_dot, [num_roi, num_roi])
Wmn = tf.log(tf.clip_by_value(Wg, clip_value_min = 1e-6, clip_value_max=100000000)) + Wa
Wmn = tf.nn.softmax(Wmn, axis=1)
print('Wmn : ', Wmn)
Wmn = tf.reshape(Wmn, [num_roi, num_roi, 1])
print('Wmn : ', Wmn)
print('Wv : ', Wv)
Wv = tf.reshape(Wv, [num_roi, 1, -1])
print('Wv : ', Wv)
return tf.reduce_sum(Wmn * Wv, axis=-2)
def PositionalEmbedding(self, geometric_feature, dim_g=64, wave_len=1000.):
# (number of RoI, coordinate of Roi)
xmin, ymin, xmax, ymax = tf.split(value=geometric_feature, num_or_size_splits=4, axis=1)
x = (xmin + xmax) * 0.5
y = (ymin + ymax) * 0.5
w = (xmax - xmin) + 1.
h = (ymax - ymin) + 1.
delta_x = x - tf.reshape(x, [1, -1])
delta_x = tf.clip_by_value(tf.abs(delta_x / w), clip_value_min=1e-3, clip_value_max=100000000)
delta_x = tf.log(delta_x)
delta_y = y - tf.reshape(y, [1, -1])
delta_y = tf.clip_by_value(tf.abs(delta_y / h), clip_value_min=1e-3, clip_value_max=100000000)
delta_y = tf.log(delta_y)
delta_w = tf.log(w / tf.reshape(w, [1, -1]))
delta_h = tf.log(h / tf.reshape(h, [1, -1]))
shape = tf.shape(delta_h)
print('delta_w : ', delta_w)
print('delta_h : ', delta_h)
delta_x = tf.reshape(delta_x, [shape[0], shape[1], 1])
delta_y = tf.reshape(delta_y, [shape[0], shape[1], 1])
delta_w = tf.reshape(delta_w, [shape[0], shape[1], 1])
delta_h = tf.reshape(delta_h, [shape[0], shape[1], 1])
position_mat = tf.concat([delta_x, delta_y, delta_w, delta_h], axis=-1)
# feat_range = torch.arange(dim_g / 8).cuda()
feat_range = tf.range(dim_g / 8)
dim_mat = feat_range / (dim_g / 8)
# dim_mat = tf.to_int32(dim_mat)
dim_mat = 1 / (tf.pow(wave_len, dim_mat))
dim_mat = tf.reshape(dim_mat, [1, 1, 1, -1])
position_mat = tf.reshape(position_mat, [shape[0], shape[1], 4, -1])
# dim_mat = dim_mat.view(1, 1, 1, -1)
# position_mat = position_mat.view(shape[0], shape[1], 4, -1)
position_mat = 100. * position_mat
mul_mat = position_mat * dim_mat
mul_mat = tf.reshape(mul_mat, [shape[0], shape[1], -1])
# mul_mat = mul_mat.view(shape[0], shape[1], -1)
sin_mat = tf.sin(mul_mat)
cos_mat = tf.cos(mul_mat)
embedding = tf.concat((sin_mat, cos_mat), -1)
print('embedding : ', embedding)
embedding.set_shape([None, None, 64])
return embedding
if __name__ == '__main__':
appearance_feature = tf.random_normal(shape=[256, 7, 7, 1024])
geometric_feature = tf.random_normal(shape=[256, 4])
appearance_feature = tf.layers.flatten(appearance_feature)
print(appearance_feature)
rm = RelationModule(appearance_feature, geometric_feature)
|
79aba18d2ad786210f9c6305570e0c11aeb5b7b3
|
[
"Markdown",
"Python"
] | 3
|
Python
|
rui-qian/Relation-Networks-for-Object-Detection-tensorflow
|
f2e84fe4d37dc5db9de79889f4cfe83ef695f273
|
95911370ab72575b3dd15b265de6368e32e2d70f
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.