I'm trying to write a module that will read a specific address value from a micro controller, the initialization code has compiled on its own but when I try to compile it within a structure it seem to complain. Are there restriction on initializing pointers within a structure?
#include <stdio.h>
#include <esper.h>
#include <stdlib.h>
#include <stdint.h>
#include "lmk04800.h"
#define NUM_MSS_GPIO 32
#define SEL_NIM     3
#define SOURCE_SEL  4
#define SEL_EXT     5
#define CLK0_3_EN   6
#define CLK4_7_EN   7
#define CLK8_11_EN  8
#define CLK12_15_EN 9
#define CLK16_19_EN 10
#define CLK20_23_EN 11
#define LMK_SYNC    12
typedef struct {
  int fd_gpio[NUM_MSS_GPIO];
  uint8_t data_gpio[NUM_MSS_GPIO];
  uint32_t esata_freqCounter;
  uint32_t ext_freqCounter;
  uint32_t esata_trgCounter;
  uint32_t ext_trgCounter;
  tLMK04800 settings;
  volatile uint32_t *freqCounter_addr;
  volatile uint32_t *trgCounter_addr;
  volatile uint32_t *manSync_addr;
  freqCounter_addr = (volatile uint32_t *)0x30000000;
  trgCounter_addr = (volatile uint32_t *)0x30000100;
  manSync_addr = (volatile uint32_t *)0x30000200;
 } tESPERModuleTest;
The compilation error I get is:
test/mod_test.h:32: error: expected specifier-qualifier-list before 'freqCounter_addr'
(uint32_t *).tLMK04800is specified inlmk04800.hfile, right? Andlmk04800.his found by the compiler, right?typedef? You can assign members ofstructs.