Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8587533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:35:32+00:00 2026-06-11T22:35:32+00:00

I develop an embedded application which uses the MindTree Bluetooth SDK. I have the

  • 0

I develop an embedded application which uses the MindTree Bluetooth SDK.

I have the following in a header file:

typedef struct {
    UCHAR outputDir;
    UCHAR reset;
    UCHAR nack;
    UCHAR startCondition;
    UCHAR stopCondition;
    UCHAR busy;
} USCI_ConfigurationFlags;

static USCI_ConfigurationFlags usciConfigFlags = { UCTR, UCSWRST, UCNACKIFG, UCTXSTT, UCTXSTP, UCBBUSY };

Later in two .c files I include the above header and use the usciConfigFlags on different occasions sometimes from within an interrupt.

Is this legal?

I’m trying to understand why(and if it is related to the question) the values of the struct change at runtime, after calling the BT_bluetooth_on method in the SDK.

Thanks,
Adam.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T22:35:33+00:00Added an answer on June 11, 2026 at 10:35 pm

    static here doesn’t mean what you think it means. It means that the declaration and variable will only be visible in one compilation unit. That is, you have two independent instances of usciConfigFlags.

    If you want a global variable, you need to use extern not static and make the actual declaration (without extern) with the initial value in one of your c files.

    Also be weary of changing the values in the struct without proper locking. Read-only concurrent access is usually fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to develop an application in java, which uses a client[embedded server]-server-(-server)-(...) approach.
I have been attempting to develop an embedded webserver within an application that I
I am using linux to develop an embedded application. I have a HOST linux
I have a (custom) embedded jetty launcher which I had been using to develop/test
After years in embedded programming, I have to develop a Windows app. I dug
I develop one book reader application which play audio according to page, but problem
We develop an application in an embedded environment. It is a high level computing
I use play to develop my project and embedded netty3 as my application server
I have a simple Java web application using HSQLDB embedded database. The application is
I am using VSTS 2008 with C# to develop Silverlight application embedded in web

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.