LMS 2012
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pru.c File Reference
#include "tistdtypes.h"
#include "csl/cslr.h"
#include "csl/soc_OMAPL138.h"
#include "csl/cslr_prucore.h"
#include "csl/cslr_psc_OMAPL138.h"
#include "pru.h"

Go to the source code of this file.

Functions

Uint32 pru_load (Uint8 pruNum, Uint32 *pruCode, Uint32 codeSizeInWords, arm_pru_iomap *pru_arm_iomap)
 
Uint32 pru_run (Uint8 pruNum, arm_pru_iomap *pru_arm_iomap)
 
Uint32 pru_waitForHalt (Uint8 pruNum, Int32 timeout, arm_pru_iomap *pru_arm_iomap)
 
Uint32 pru_disable (arm_pru_iomap *pru_arm_iomap)
 
Uint32 pru_enable (Uint8 pruNum, arm_pru_iomap *pru_arm_iomap)
 
short pru_ram_write_data (Uint32 u32offset, Uint8 *pu8datatowrite, Uint16 u16bytestowrite, arm_pru_iomap *pru_arm_iomap)
 pru_ram_write_data() Download the data into data RAM of PRU0 or PRU1 of OMAP L138. More...
 
short pru_ram_read_data (Uint32 u32offset, Uint8 *pu8datatoread, Uint16 u16bytestoread, arm_pru_iomap *pru_arm_iomap)
 pru_ram_read_data() Download the data into data RAM of PRU0 or PRU1 of OMAP L138. More...
 
short pru_ram_write_data_4byte (unsigned int u32offset, unsigned int *pu32datatowrite, short u16wordstowrite)
 pru_ram_write_data_4byte() Download the data into data RAM of PRU0 or PRU1 of OMAP L138. More...
 
short pru_ram_read_data_4byte (unsigned int u32offset, unsigned int *pu32datatoread, short u16wordstoread)
 pru_ram_read_data_4byte() Download the data into data RAM of PRU0 or PRU1 of OMAP L138. More...
 

Function Documentation

Uint32 pru_disable ( arm_pru_iomap pru_arm_iomap)

Definition at line 104 of file pru.c.

Uint32 pru_enable ( Uint8  pruNum,
arm_pru_iomap pru_arm_iomap 
)

Definition at line 133 of file pru.c.

Uint32 pru_load ( Uint8  pruNum,
Uint32 *  pruCode,
Uint32  codeSizeInWords,
arm_pru_iomap pru_arm_iomap 
)

Definition at line 34 of file pru.c.

short pru_ram_read_data ( Uint32  u32offset,
Uint8 *  pu8datatoread,
Uint16  u16bytestoread,
arm_pru_iomap pru_arm_iomap 
)

pru_ram_read_data() Download the data into data RAM of PRU0 or PRU1 of OMAP L138.


This API will be called by the Application to read the data from data RAM of PRU0 or PRU1

Parameters
u32offsetOffset of the data RAM where the data has to be read
pu8datatoreadPointer to a buffer that would hold the data to be read from the RAM
u16bytestoreadNumber of bytes to be read from RAM
Returns
SUCCESS or FAILURE

Definition at line 251 of file pru.c.

short pru_ram_read_data_4byte ( unsigned int  u32offset,
unsigned int *  pu32datatoread,
short  u16wordstoread 
)

pru_ram_read_data_4byte() Download the data into data RAM of PRU0 or PRU1 of OMAP L138.


This API will be called by the Application to read the data from data RAM of PRU0 or PRU1

Parameters
u32offsetOffset of the data RAM where the data has to be read
pu32datatoreadPointer to a buffer that would hold the data to be read from the RAM
u16wordstoreadNumber of words to be read from RAM
Returns
SUCCESS or FAILURE

Definition at line 306 of file pru.c.

short pru_ram_write_data ( Uint32  u32offset,
Uint8 *  pu8datatowrite,
Uint16  u16bytestowrite,
arm_pru_iomap pru_arm_iomap 
)

pru_ram_write_data() Download the data into data RAM of PRU0 or PRU1 of OMAP L138.


This API will be called by the Application to download the data into data RAM of PRU0 or PRU1

Parameters
u32offsetOffset of the data RAM where the data has to be written
pu32datatowritePointer to a buffer that holds the data to be written into RAM
u16wordstowriteNumber of bytes to be written into that RAM
Returns
SUCCESS or FAILURE

Definition at line 225 of file pru.c.

short pru_ram_write_data_4byte ( unsigned int  u32offset,
unsigned int *  pu32datatowrite,
short  u16wordstowrite 
)

pru_ram_write_data_4byte() Download the data into data RAM of PRU0 or PRU1 of OMAP L138.


This API will be called by the Application to download the data into data RAM of PRU0 or PRU1

Parameters
u32offsetOffset of the data RAM where the data has to be written
pu32datatowritePointer to a buffer that holds the data to be written into RAM
u16wordstowriteNumber of words to be written into that RAM

//eturn SUCCESS or FAILURE

Definition at line 278 of file pru.c.

Uint32 pru_run ( Uint8  pruNum,
arm_pru_iomap pru_arm_iomap 
)

Definition at line 58 of file pru.c.

Uint32 pru_waitForHalt ( Uint8  pruNum,
Int32  timeout,
arm_pru_iomap pru_arm_iomap 
)

Definition at line 76 of file pru.c.