Mercurial > ecos-v3_0-branch
changeset 1861:4a42c095c4fa
* src/synth.c: Moved cyg_hal_sys_mmap into the HAL.
| author | asl |
|---|---|
| date | Wed, 15 Dec 2004 14:00:37 +0000 |
| parents | 5afec7d92550 |
| children | d27de7fdbf21 |
| files | packages/devs/flash/synth/current/ChangeLog packages/devs/flash/synth/current/src/synth.c |
| diffstat | 2 files changed, 5 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/devs/flash/synth/current/ChangeLog +++ b/packages/devs/flash/synth/current/ChangeLog @@ -1,3 +1,7 @@ +2004-12-15 Andrew Lunn <andrew.lunn@ascom.ch> + + * src/synth.c: Moved cyg_hal_sys_mmap into the HAL. + 2003-11-20 Jani Monoses <jani@iv.ro> tests/flash1.c: Update flash_init() call to reflect
--- a/packages/devs/flash/synth/current/src/synth.c +++ b/packages/devs/flash/synth/current/src/synth.c @@ -68,25 +68,6 @@ int cyg_dev_flash_synth_flashfd; /* Holds the base address of the mmap'd region */ flash_t *cyg_dev_flash_synth_base; -/* Helper function. The Linux system call cannot pass 6 parameters. Instead - a structure is filled in and passed as one parameter */ -static int -cyg_hal_sys_do_mmap(void *addr, unsigned long length, unsigned long prot, - unsigned long flags, unsigned long fd, unsigned long off) -{ - - struct cyg_hal_sys_mmap_args args; - - args.addr = (unsigned long) addr; - args.len = length; - args.prot = prot = prot; - args.flags = flags; - args.fd = fd; - args.offset = off; - - return (cyg_hal_sys_mmap(&args)); -} - int flash_hwr_init(void) { @@ -126,7 +107,7 @@ flash_hwr_init(void) if ( cyg_dev_flash_synth_flashfd <= 0 ) { return FLASH_ERR_HWR; } - cyg_dev_flash_synth_base = (flash_t *)cyg_hal_sys_do_mmap( + cyg_dev_flash_synth_base = (flash_t *)cyg_hal_sys_mmap( #ifdef CYGMEM_FLASH_SYNTH_BASE CYGMEM_FLASH_SYNTH_BASE, #else
