flash_lm3s.c File Reference

LM3S1968 internal flash memory driver. More...

#include "flash_lm3s.h"
#include <cpu/types.h>
#include <kern/kfile.h>
#include "cfg/log.h"
#include <cfg/macros.h>
#include <drv/timer.h>
#include <drv/flash.h>
#include <cpu/power.h>
#include <string.h>

Go to the source code of this file.

Functions

static size_t flash_lm3s_write (struct KFile *_fd, const void *_buf, size_t size)
 Write program memory.
static int flash_lm3s_close (struct KFile *_fd)
 Close file fd.
static void flash_lm3s_open (Flash *fd)
 Open flash file fd.
static kfile_off_t flash_lm3s_seek (struct KFile *_fd, kfile_off_t offset, KSeekMode whence)
 Move fd file seek position of offset bytes from whence.
static struct KFileflash_lm3s_reopen (struct KFile *_fd)
 Reopen file fd.
static size_t flash_lm3s_read (struct KFile *_fd, void *_buf, size_t size)
 Read from file fd size bytes and put it in buffer buf.
void flash_hw_init (Flash *fd)
 Init module to perform write and read operation on internal flash memory.

Detailed Description

LM3S1968 internal flash memory driver.

Author:
Andrea Righi <arighi@develer.com>

Definition in file flash_lm3s.c.


Function Documentation

static size_t flash_lm3s_read ( struct KFile _fd,
void *  _buf,
size_t  size 
) [static]

Read from file fd size bytes and put it in buffer buf.

Returns:
the number of bytes read.

Definition at line 225 of file flash_lm3s.c.

static size_t flash_lm3s_write ( struct KFile _fd,
const void *  _buf,
size_t  size 
) [static]

Write program memory.

Write size bytes from buffer _buf to file fd

Note:
Write operations are not buffered.

Definition at line 118 of file flash_lm3s.c.