Gast
#1013093
Hallo und guten Tag zusammen, ich habe hier ein Problem
Gegeben ist folgender Code:
/**********************************************************************/
typedef struct alt_flash_cfi_dev alt_flash_cfi_dev;
/*
* Function pointers for performing operations on the flash
*/
typedef void (*alt_write_command_fn)(void* base_address, int offset,
alt_u8 value);
typedef alt_u8 (*alt_read_query_fn)(alt_flash_cfi_dev* flash, int
address);
typedef void (*alt_write_native_fn)(void* address, alt_u32 value);
typedef int (*alt_program_word_fn)(alt_flash_cfi_dev* flash, const int
offset,
const alt_u8* src_addr);
/*
* Description of the flash
*/
struct alt_flash_cfi_dev
{
int algorithm;
int mode_width;
int device_width;
int write_timeout;
int erase_timeout;
int primary_address;
/*
* Flash type specific functions to access the flash and perform
various
* operations
*/
alt_write_command_fn write_command;
alt_read_query_fn read_query;
alt_write_native_fn write_native;
};
/***********************************************************************
/
1) Oben werden Pointer auf Funktionen initialisiert ? oder ?
2) Was hat das typedef davor zu sagen ?
3) In der Struktur wird dann
alt_write_command_fn write_command; // Was bedeutet das ?
Meine Vermutung:
write_command ist ein funktionszeiger mit den eigenschaften von
alt_write_command_fn ???
Vielen Dank für eure Hilfe
mfg hans