error FIO2DIR (LPCXPRESSO LPC1769)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

error FIO2DIR (LPCXPRESSO LPC1769)

519 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by iltonoliviera on Fri Oct 07 21:27:20 MST 2011
[B]Please help!
in code i try use FIO2DIR :[/B]

  LPC_GPIO3->FIO2DIR = 0x000000FF; 
  LPC_GPIO2->FIODIR = 0x000000FF;/* P2.xx defined as Outputs */
  LPC_GPIO2->FIOCLR = 0x000000FF;/* turn off all the LEDs */
[B]
When Build give this error :[/B]

**** Build of configuration Debug for project GPIO ****

make all
Building file: ../src/IOtest.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2_LPC17xx -I"C:\Users\ilton\Documents\LPCXpresso_4.1.0_190\workspace\CMSISv2_LPC17xx\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m3 -mthumb -MMD -MP -MF"src/IOtest.d" -MT"src/IOtest.d" -o"src/IOtest.o" "../src/IOtest.c"
../src/IOtest.c: In function 'main':
[COLOR=Red]../src/IOtest.c:38:12: error: 'LPC_GPIO_TypeDef' has no member named 'FIO2DIR'
make: *** [src/IOtest.o] Error 1[/COLOR]
0 Kudos
Reply
2 Replies

479 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by iltonoliviera on Sat Oct 08 11:15:27 MST 2011
OK tanks
0 Kudos
Reply

479 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Oct 08 02:35:34 MST 2011
Look in your LPC17xx.h, there you can find the used structure:

/*------------- General Purpose Input/Output (GPIO) --------------------------*/
typedef struct
{
 [COLOR=Red] union {
    __IO uint32_t FIODIR;
    struct {
      __IO uint16_t FIODIRL;
      __IO uint16_t FIODIRH;
    };
    struct {
      __IO uint8_t  FIODIR0;
      __IO uint8_t  FIODIR1;
      __IO uint8_t  FIODIR2;
      __IO uint8_t  FIODIR3;
    };[/COLOR]
  };
  uint32_t RESERVED0[3];
  union {
    __IO uint32_t FIOMASK;
    struct {
      __IO uint16_t FIOMASKL;
      __IO uint16_t FIOMASKH;
    };
    struct {
      __IO uint8_t  FIOMASK0;
      __IO uint8_t  FIOMASK1;
      __IO uint8_t  FIOMASK2;
      __IO uint8_t  FIOMASK3;
    };
  };
  union {
    __IO uint32_t FIOPIN;
    struct {
      __IO uint16_t FIOPINL;
      __IO uint16_t FIOPINH;
    };
    struct {
      __IO uint8_t  FIOPIN0;
      __IO uint8_t  FIOPIN1;
      __IO uint8_t  FIOPIN2;
      __IO uint8_t  FIOPIN3;
    };
  };
  union {
    __IO uint32_t FIOSET;
    struct {
      __IO uint16_t FIOSETL;
      __IO uint16_t FIOSETH;
    };
    struct {
      __IO uint8_t  FIOSET0;
      __IO uint8_t  FIOSET1;
      __IO uint8_t  FIOSET2;
      __IO uint8_t  FIOSET3;
    };
  };
  union {
    __O  uint32_t FIOCLR;
    struct {
      __O  uint16_t FIOCLRL;
      __O  uint16_t FIOCLRH;
    };
    struct {
      __O  uint8_t  FIOCLR0;
      __O  uint8_t  FIOCLR1;
      __O  uint8_t  FIOCLR2;
      __O  uint8_t  FIOCLR3;
    };
  };
} LPC_GPIO_TypeDef;

typedef struct
{
  __I  uint32_t IntStatus;
  __I  uint32_t IO0IntStatR;
  __I  uint32_t IO0IntStatF;
  __O  uint32_t IO0IntClr;
  __IO uint32_t IO0IntEnR;
  __IO uint32_t IO0IntEnF;
       uint32_t RESERVED0[3];
  __I  uint32_t IO2IntStatR;
  __I  uint32_t IO2IntStatF;
  __O  uint32_t IO2IntClr;
  __IO uint32_t IO2IntEnR;
  __IO uint32_t IO2IntEnF;
} LPC_GPIOINT_TypeDef;

;
0 Kudos
Reply