OpenBSL  v.0.1.0
Functions
OpenBSL_Comm.c File Reference

Custom/device specific source file of OpenBSL implementation for the communication module. More...

#include <msp430.h>
#include "devtypes.h"
#include "OpenBSL.h"
#include "OpenBSL_Int.h"

Functions

void OpenBSL_CommInit (void)
 device/HW initialization communication module function for OpenBSL More...
 
uint8_t OpenBSL_CommRcvByte (void)
 receive a single byte from communication line - blocking function More...
 
uint8_t OpenBSL_CommRcvByteChksum (void)
 receive a single byte from communication line and update the OpenBSL_InChecksum checksum variable - blocking function More...
 
uint16_t OpenBSL_CommRcvShort (void)
 receive a two bytes data (16 bit) from communication line - blocking function More...
 
uint16_t OpenBSL_CommRcvShortChksum (void)
 receive a two bytes data (16 bit) from communication line and calculate/update the OpenBSL_InChecksum checksum variable - blocking function More...
 
uint32_t OpenBSL_CommRcvLong (void)
 receive a four bytes data (32 bit) from communication line - blocking function More...
 
uint32_t OpenBSL_CommRcvLongChksum (void)
 receive a four bytes data (32 bit) from communication line and calculate/update the OpenBSL_InChecksum checksum variable - blocking function More...
 
void OpenBSL_CommSendByte (uint8_t byte)
 send a single byte to communication line - blocking function More...
 
void OpenBSL_CommSendByteChksum (uint8_t byte)
 send a single byte to communication line and update the OpenBSL_OutChecksum checksum variable - blocking function More...
 
void OpenBSL_CommSendShort (uint16_t val)
 send a two bytes (16 bit) value to communication line in little endian byte order (LSB first) - blocking function More...
 
void OpenBSL_CommSendShortChksum (uint16_t val)
 send a two bytes (16 bit) to communication line and update the OpenBSL_OutChecksum checksum variable - blocking function More...
 
void OpenBSL_CommSendLong (uint32_t val)
 send a four bytes (32 bit) value to communication line in little endian byte order (LSB first) - blocking function More...
 
void OpenBSL_CommSendLongChksum (uint32_t val)
 send a four bytes (32 bit) to communication line and update the OpenBSL_OutChecksum checksum variable - blocking function More...
 

Detailed Description

Custom/device specific source file of OpenBSL implementation for the communication module.

Version
0.1
Remarks
target device: MSP430G2553 on MSP-EXP430G2 Launchpad

Function Documentation

void OpenBSL_CommInit ( void  )

device/HW initialization communication module function for OpenBSL

OpenBSL_CommInit

Parameters
-
Returns
-
uint8_t OpenBSL_CommRcvByte ( void  )

receive a single byte from communication line - blocking function

OpenBSL_CommRcvByte

Parameters
-
Returns
received single byte from communication line
uint8_t OpenBSL_CommRcvByteChksum ( void  )

receive a single byte from communication line and update the OpenBSL_InChecksum checksum variable - blocking function

OpenBSL_CommRcvByteChksum

Parameters
[in]checksumpointer to the checksum buffer to be updated
Returns
received single byte from communication line
uint32_t OpenBSL_CommRcvLong ( void  )

receive a four bytes data (32 bit) from communication line - blocking function

OpenBSL_CommRcvLong

Parameters
-
Returns
received four bytes data from communication line
uint32_t OpenBSL_CommRcvLongChksum ( void  )

receive a four bytes data (32 bit) from communication line and calculate/update the OpenBSL_InChecksum checksum variable - blocking function

OpenBSL_CommRcvLongChksum

Parameters
-
Returns
received four bytes from communication line
uint16_t OpenBSL_CommRcvShort ( void  )

receive a two bytes data (16 bit) from communication line - blocking function

OpenBSL_CommRcvShort

Parameters
-
Returns
received two bytes data from communication line
uint16_t OpenBSL_CommRcvShortChksum ( void  )

receive a two bytes data (16 bit) from communication line and calculate/update the OpenBSL_InChecksum checksum variable - blocking function

OpenBSL_CommRcvShortChksum

Parameters
-
Returns
received two bytes data from communication line
void OpenBSL_CommSendByte ( uint8_t  byte)

send a single byte to communication line - blocking function

OpenBSL_CommSendByte

Parameters
singlebyte to be sent out to communication line
Returns
-
void OpenBSL_CommSendByteChksum ( uint8_t  byte)

send a single byte to communication line and update the OpenBSL_OutChecksum checksum variable - blocking function

OpenBSL_CommSendByteChksum

Parameters
[in]byteinput byte to be sent out
Returns
-
void OpenBSL_CommSendLong ( uint32_t  val)

send a four bytes (32 bit) value to communication line in little endian byte order (LSB first) - blocking function

OpenBSL_CommSendLong

Parameters
[in]val32 bit data to be sent out to communication line
Returns
-
void OpenBSL_CommSendLongChksum ( uint32_t  val)

send a four bytes (32 bit) to communication line and update the OpenBSL_OutChecksum checksum variable - blocking function

OpenBSL_CommSendLongChksum

Parameters
[in]valinput word (32 bit) to be sent out
Returns
-
void OpenBSL_CommSendShort ( uint16_t  val)

send a two bytes (16 bit) value to communication line in little endian byte order (LSB first) - blocking function

OpenBSL_CommSendShort

Parameters
[in]val16 bit data to be sent out to communication line
Returns
-
void OpenBSL_CommSendShortChksum ( uint16_t  val)

send a two bytes (16 bit) to communication line and update the OpenBSL_OutChecksum checksum variable - blocking function

OpenBSL_CommSendShortChksum

Parameters
[in]valinput word (16 bit) to be sent out
Returns
-