brazos-trapezoidal
Functions | Variables
API006MemoryRW.c File Reference

Basic API to Read and Write bytes in a defined memory position. More...

#include "API006MemoryRW.h"
#include <string.h>
Include dependency graph for API006MemoryRW.c:

Go to the source code of this file.

Functions

void API006MemoryRW__Initialize (void)
 It Initializes the module API006MemoryRW and its variables. More...
 
void API006MemoryRW__ReceiveParser (TSP_TYPE *message)
 This function Parse the data receive for API006 and change the state of the API, if needed. More...
 
API006_STATE_TYPE API006MemoryRW__GetState (void)
 Get actual state of the API. More...
 
void API006MemoryRW__ResetState (void)
 Reset the state of API for Idle. More...
 

Variables

API006_MEMORYRW_CONTROL_TYPE MemRWCtrl
 

Detailed Description

Basic API to Read and Write bytes in a defined memory position.

Parse received data that will realize a operation in memory

Version
S00_00_01 Aug 25, 2021

Definition in file API006MemoryRW.c.

Function Documentation

◆ API006MemoryRW__GetState()

API006_STATE_TYPE API006MemoryRW__GetState ( void  )

Get actual state of the API.

Definition at line 227 of file API006MemoryRW.c.

◆ API006MemoryRW__Initialize()

void API006MemoryRW__Initialize ( void  )

It Initializes the module API006MemoryRW and its variables.

Definition at line 40 of file API006MemoryRW.c.

◆ API006MemoryRW__ReceiveParser()

void API006MemoryRW__ReceiveParser ( TSP_TYPE *  message)

This function Parse the data receive for API006 and change the state of the API, if needed.

Read/Write Request = 4 bytes (1 bit to indicate the operation (RW) / 31 bits to Address to RW) | 2 bytes (16 bits) to Total Bytes Request | 2 bytes (16 bits) pass phrase

Read State Byte Request = 2 bytes (16 bits) to number of the first byte to read | 2 bytes (16 bits) number of the bytes request in this package

Read State Byte Response = 2 bytes (16 bits) to number of the first byte requested | X bytes requested in this package

Write State Byte Request = 2 bytes (16 bits) to number of the first byte to write in memory | X bytes to write in memory (X is size of data - 2 bytes (16 bits))

Definition at line 63 of file API006MemoryRW.c.

◆ API006MemoryRW__ResetState()

void API006MemoryRW__ResetState ( void  )

Reset the state of API for Idle.

Definition at line 238 of file API006MemoryRW.c.

Variable Documentation

◆ MemRWCtrl


-----------------------------— Theta Power Systems - CONFIDENTIAL --------------------------------------------—

Definition at line 25 of file API006MemoryRW.c.