- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm trying to customize the GPIO settings in my project for the custom hardware that I have designed. I see that I need to do this in the main profile.h and bleprofile.h files in the include folder, but I want the change to only apply to the project I am working on and not all projects that use profile.h.
I originally copied both files to my local project directory, but the compiler doesn't appear to check the local directory before looking for them in the default include folder. I can FORCE it to find my file by replacing the include in the source files with ' #include ".\profile.h" '. This doesn't seem ideal as it requires changing it in each project file.
Is there a better way to do what I am attempting -- to customize bleprofile.h and profile.h for a single project? Thank you.
David
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you're mainly looking to change GPIO pin locations it'll probably be easier to modify the BLE_PROFILE_GPIO_CFG data in your app. Refer to the code in the hello_sensor example seen below...
The actual pin definitions (and numbers) can be found in \include\Platforms\BCM920737TAG_Q32\platform.h.
// Following structure defines GPIO configuration used by the application
const BLE_PROFILE_GPIO_CFG hello_sensor_gpio_cfg =
{
/*.gpio_pin =*/
{
GPIO_PIN_WP, // This need to be used to enable/disable NVRAM write protect
GPIO_PIN_BUTTON, // Button GPIO is configured to trigger either direction of interrupt
GPIO_PIN_LED, // LED GPIO, optional to provide visual effects
GPIO_PIN_BATTERY, // Battery monitoring GPIO. When it is lower than particular level, it will give notification to the application
GPIO_PIN_BUZZER, // Buzzer GPIO, optional to provide audio effects
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 // other GPIOs are not used
},
/*.gpio_flag =*/
{
GPIO_SETTINGS_WP,
GPIO_SETTINGS_BUTTON,
GPIO_SETTINGS_LED,
GPIO_SETTINGS_BATTERY,
GPIO_SETTINGS_BUZZER,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}
};
Does this help?
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you're mainly looking to change GPIO pin locations it'll probably be easier to modify the BLE_PROFILE_GPIO_CFG data in your app. Refer to the code in the hello_sensor example seen below...
The actual pin definitions (and numbers) can be found in \include\Platforms\BCM920737TAG_Q32\platform.h.
// Following structure defines GPIO configuration used by the application
const BLE_PROFILE_GPIO_CFG hello_sensor_gpio_cfg =
{
/*.gpio_pin =*/
{
GPIO_PIN_WP, // This need to be used to enable/disable NVRAM write protect
GPIO_PIN_BUTTON, // Button GPIO is configured to trigger either direction of interrupt
GPIO_PIN_LED, // LED GPIO, optional to provide visual effects
GPIO_PIN_BATTERY, // Battery monitoring GPIO. When it is lower than particular level, it will give notification to the application
GPIO_PIN_BUZZER, // Buzzer GPIO, optional to provide audio effects
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 // other GPIOs are not used
},
/*.gpio_flag =*/
{
GPIO_SETTINGS_WP,
GPIO_SETTINGS_BUTTON,
GPIO_SETTINGS_LED,
GPIO_SETTINGS_BATTERY,
GPIO_SETTINGS_BUZZER,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}
};
Does this help?
Andrew