ccNOos  v0.0.0
Build Portable Microcontroller Applications!
Macros | Functions
Platform_PSoC4.h File Reference

IMS: ccNOos, Platform Specification, PSoC4 More...

#include <project.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <stdarg.h>
#include "../../executionSystem/execution_system.h"
#include "../../consoleMenu/console_menu.h"
Include dependency graph for Platform_PSoC4.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LIGHT_OFF   (1u)
 
#define uSEC_PER_CLOCK   (1000u)
 
#define MAXLINELENGTH   (80)
 

Functions

void SysTickISRCallback ()
 
void platformSetup ()
 
void platformStart ()
 
void platformLoopDelay ()
 

Detailed Description

IMS: ccNOos, Platform Specification, PSoC4

Copyright 2021 InMechaSol, Inc

Licensed under the Apache License, Version 2.0(the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Notes: (.c includes .h) - for straight C or (.cpp includes .c which includes .h) - for C++ wrapped straight C Always compiled to a single compilation unit, either C or CPP, not both

Definition in file Platform_PSoC4.h.

Macro Definition Documentation

◆ LIGHT_OFF

#define LIGHT_OFF   (1u)

Definition at line 51 of file Platform_PSoC4.h.

◆ MAXLINELENGTH

#define MAXLINELENGTH   (80)

Definition at line 53 of file Platform_PSoC4.h.

◆ uSEC_PER_CLOCK

#define uSEC_PER_CLOCK   (1000u)

Definition at line 52 of file Platform_PSoC4.h.

Function Documentation

◆ platformLoopDelay()

void platformLoopDelay ( )

Definition at line 95 of file Platform_PSoC4.h.

96 {
97  //<platformLoopDelay>
98  //CyDelay(1); // on PSoc, only if desired
99  ; // let it run full throttle, its a machine after all...
100  //</platformLoopDelay>
101 }

◆ platformSetup()

void platformSetup ( )

Definition at line 58 of file Platform_PSoC4.h.

59 {
60  //<platformSetup>
61 #ifdef __USINGCONSOLEMENU
62 #ifdef __USINGFLOATPRINTF
63  asm(".global _printf_float");
64 #endif
65 #endif
66  /* Enable global interrupts. */
67  CyGlobalIntEnable;
68  //</platformSetup>
69 }

◆ platformStart()

void platformStart ( )

Definition at line 71 of file Platform_PSoC4.h.

72 {
73  //<platformStart>
74  /* Configure the SysTick timer to generate interrupt every 1 ms
75  * and start its operation. Call the function before assigning the
76  * callbacks as it calls CySysTickInit() during first run that
77  * re-initializes the callback addresses to the NULL pointers.
78  */
79  CySysTickStart();
80 
81  /* Find unused callback slot and assign the callback. */
82  for (int i = 0u; i < (int)CY_SYS_SYST_NUM_OF_CALLBACKS; ++i)
83  {
84  if (CySysTickGetCallback(i) == NULL)
85  {
86  /* Set callback */
87  CySysTickSetCallback(i, SysTickISRCallback);
88  break;
89  }
90  }
91  UART_Start();
92  //</platformStart>
93 }

◆ SysTickISRCallback()

void SysTickISRCallback ( )
SysTickISRCallback
void SysTickISRCallback()