APM:Libraries
Classes | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
AP_RAMTRON Class Reference

#include <AP_RAMTRON.h>

Collaboration diagram for AP_RAMTRON:
[legend]

Classes

struct  ramtron_id
 

Public Member Functions

bool init (void)
 
uint32_t get_size (void) const
 
bool read (uint32_t offset, uint8_t *buf, uint32_t size)
 
bool write (uint32_t offset, const uint8_t *buf, uint32_t size)
 

Private Member Functions

void send_offset (uint8_t cmd, uint32_t offset)
 

Private Attributes

AP_HAL::OwnPtr< AP_HAL::SPIDevicedev
 
uint8_t id
 

Static Private Attributes

static const struct ramtron_id ramtron_ids []
 

Detailed Description

Definition at line 9 of file AP_RAMTRON.h.

Member Function Documentation

◆ get_size()

uint32_t AP_RAMTRON::get_size ( void  ) const
inline

Definition at line 15 of file AP_RAMTRON.h.

Here is the call graph for this function:

◆ init()

bool AP_RAMTRON::init ( void  )

Definition at line 38 of file AP_RAMTRON.cpp.

Here is the call graph for this function:

◆ read()

bool AP_RAMTRON::read ( uint32_t  offset,
uint8_t *  buf,
uint32_t  size 
)

Definition at line 84 of file AP_RAMTRON.cpp.

Referenced by get_size().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_offset()

void AP_RAMTRON::send_offset ( uint8_t  cmd,
uint32_t  offset 
)
private

Definition at line 72 of file AP_RAMTRON.cpp.

Referenced by read(), and write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write()

bool AP_RAMTRON::write ( uint32_t  offset,
const uint8_t *  buf,
uint32_t  size 
)

Definition at line 113 of file AP_RAMTRON.cpp.

Referenced by get_size().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ dev

AP_HAL::OwnPtr<AP_HAL::SPIDevice> AP_RAMTRON::dev
private

Definition at line 24 of file AP_RAMTRON.h.

Referenced by init(), read(), send_offset(), and write().

◆ id

uint8_t AP_RAMTRON::id
private

Definition at line 32 of file AP_RAMTRON.h.

Referenced by get_size().

◆ ramtron_ids

const AP_RAMTRON::ramtron_id AP_RAMTRON::ramtron_ids
staticprivate
Initial value:
= {
{ 0x21, 0x00, 16, 2},
{ 0x21, 0x08, 16, 2},
{ 0x22, 0x00, 32, 2},
{ 0x22, 0x08, 32, 2},
{ 0x22, 0x01, 32, 2},
{ 0x23, 0x00, 64, 2},
{ 0x23, 0x01, 64, 2},
{ 0x24, 0x00, 128, 3},
{ 0x24, 0x01, 128, 3},
{ 0x25, 0x08, 256, 3},
{ 0x26, 0x08, 512, 3},
{ 0x27, 0x03, 128, 3},
{ 0x05, 0x09, 32, 3},
}

Definition at line 31 of file AP_RAMTRON.h.

Referenced by get_size(), init(), and send_offset().


The documentation for this class was generated from the following files: