Yeah, I fully understand. Error messages are always hard to get right for C because the location where the error is detected is often far away from the actual cause. If you forget to include an important definition then the compiler has no chance to guess what you mean.
I try to completely avoid macros when programming on a "real computer" in C++. However that's hardly possible when programming in ANSI C on the "bare metal".
What is a "pull request"? (english is not my native language, neither is C)
That's a Git thing... I just started using GitHub. Haven't done a pull request yet myself. But, I think it lets you upload an edited file into the repository.
A friend came up with a totally different and interesting idea. Theoretically it should be possible to configure an IDE like Code::Blocks or Eclipse to use fastspin as compiler. They are fully configurable and offer anything you can think of. Setting up the correct command line arguments also requires learning some scripting language for which I don't have the time and patience right now. But if I find somebody who is already familiar with it I'll give it a try.
As a native English speaker, "pull request" is incorrect grammar. "Suggest change", or "submit change" would be a better description.
Github doesn't care and won't change despite this poor choice of words limiting contributions, per their email response.
"Pull request" is perfectly correct grammar. It is a request to "git pull" a branch from a forked repository (and then potentially merge that branch's commits into some other branch). (GitHub's built-in pull request feature kindof obscures this, but when using standalone git servers, asking someone with write access to the upstream repo to pull your stuff constitutes a "pull request")
As a native English speaker, "pull request" is incorrect grammar. "Suggest change", or "submit change" would be a better description.
Github doesn't care and won't change despite this poor choice of words limiting contributions, per their email response.
"Pull request" is perfectly correct grammar. It is a request to "git pull" a branch from a forked repository (and then potentially merge that branch's commits into some other branch). (GitHub's built-in pull request feature kindof obscures this, but when using standalone git servers, asking someone with write access to the upstream repo to pull your stuff constitutes a "pull request")
As a native English speaker, "pull request" is incorrect grammar. "Suggest change", or "submit change" would be a better description.
Github doesn't care and won't change despite this poor choice of words limiting contributions, per their email response.
"Pull request" is perfectly correct grammar. It is a request to "git pull" a branch from a forked repository (and then potentially merge that branch's commits into some other branch). (GitHub's built-in pull request feature kindof obscures this, but when using standalone git servers, asking someone with write access to the upstream repo to pull your stuff constitutes a "pull request")
I meant, how would a normal person interpret the phrase "pull request"?
{transitive verb} {direct object}
I know I'm not a normal person, as there is no such thing, but I actually had to think for a while as to how you arrived at 'cancelling' for pull, especially in the context of git.
If by a 'normal person', you mean a person with average native understanding of the English language, then probably by the most common meaning for pull. e.g. from Dictionary.com
- 'to draw or haul toward oneself or itself, in a particular direction, or into a particular position'
rather than a much less common meaning for pull e.g. tenth in the list from Dictionary.com
- 'to withdraw or remove' Definition of Pull
If it helps you come to terms with the actual meaning then simply mark it up as jargon and move on.
Caution! Big evil trap: operator precedence is different in C and Spin! (no bug, I just got cought by my own carelessness)
DAT ' adc calibration state machine table
adc_states
long %00_11<<15 + %000000 ' swap channels, switch U1 to GIO
long %00_11<<15 + %001100 ' sample U0, average U1 GIO
long %01_11<<15 + %010000 ' switch U1 to VIO, calib GIO
long %01_11<<15 + %001100 ' sample U0, average U1 VIO
long %11_11<<15 + %110000 ' switch U1 to In, calib VIO
long %11_00<<15 + %000010 ' swap channels, switch U0 to GIO
long %11_00<<15 + %001010 ' sample U1, average U0 GIO
long %11_01<<15 + %010010 ' switch U0 to VIO, calib GIO
long %11_01<<15 + %001010 ' sample U1, average U0 VIO
long %11_11<<15 + %110011 ' switch U0 to In, calib VIO, rewind
... Spin translates to C...
uint32_t adc_states[] = {
(0b00_11<<15) + 0b000000, // swap channels, switch U1 to GIO
(0b00_11<<15) + 0b001100, // sample U0, average U1 GIO
(0b01_11<<15) + 0b010000, // switch U1 to VIO, calib GIO
(0b01_11<<15) + 0b001100, // sample U0, average U1 VIO
(0b11_11<<15) + 0b110000, // switch U1 to In, calib VIO
(0b11_00<<15) + 0b000010, // swap channels, switch U0 to GIO
(0b11_00<<15) + 0b001010, // sample U1, average U0 GIO
(0b11_01<<15) + 0b010010, // switch U0 to VIO, calib GIO
(0b11_01<<15) + 0b001010, // sample U1, average U0 VIO
(0b11_11<<15) + 0b110011};// switch U0 to In, calib VIO, rewind
The parantheses are important. Otherwise the compiler does 0b00_11<<(15 + 0b000000) which is luckily the same for the first case but not for the others. Took me several hours to debug. You don't look at code that you think has already worked before...
Yeah, the operator precedence in Spin has always bugged me. I never understood why it has something different than what every other language in existence (pretty much) uses.
Comments
I try to completely avoid macros when programming on a "real computer" in C++. However that's hardly possible when programming in ANSI C on the "bare metal".
What is a "pull request"? (english is not my native language, neither is C)
Github doesn't care and won't change despite this poor choice of words limiting contributions, per their email response.
"Pull request" is perfectly correct grammar. It is a request to "git pull" a branch from a forked repository (and then potentially merge that branch's commits into some other branch). (GitHub's built-in pull request feature kindof obscures this, but when using standalone git servers, asking someone with write access to the upstream repo to pull your stuff constitutes a "pull request")
Nonsense.
Pull means cancel in this usage.
Er, nope.
https://stackoverflow.com/questions/292357/what-is-the-difference-between-git-pull-and-git-fetch
{transitive verb} {direct object}
makes sense to me.
Mike
I know I'm not a normal person, as there is no such thing, but I actually had to think for a while as to how you arrived at 'cancelling' for pull, especially in the context of git.
If by a 'normal person', you mean a person with average native understanding of the English language, then probably by the most common meaning for pull. e.g. from Dictionary.com
- 'to draw or haul toward oneself or itself, in a particular direction, or into a particular position'
rather than a much less common meaning for pull e.g. tenth in the list from Dictionary.com
- 'to withdraw or remove'
Definition of Pull
If it helps you come to terms with the actual meaning then simply mark it up as jargon and move on.
... Spin translates to C... The parantheses are important. Otherwise the compiler does 0b00_11<<(15 + 0b000000) which is luckily the same for the first case but not for the others. Took me several hours to debug. You don't look at code that you think has already worked before...