이 구조체는 linux 커널 파일 include/sound/soc-dapm.h에서 발견되었습니다. 회원 선언에 대해 혼란 스럽습니다. Google에서 찾았지만 유익한 정보를 찾을 수 없었습니다. 아무도 이유가 무엇인지 설명 할 수 있다면 : 1 모든 변수 선언 다음에 큰 도움이 될 것입니다. 다음은 코드의 일부입니다.": 1"을 사용한 구조체 멤버 선언
struct snd_soc_dapm_widget {
unsigned int off_val; /* off state value */
unsigned char power:1; /* block power status */
unsigned char invert:1; /* invert the power bit */
unsigned char active:1; /* active stream on DAC, ADC's */
unsigned char connected:1; /* connected codec pin */
}
감사합니다.
비트 필드라고합니다. –
여기에 자습서가 있습니다. http://www.tutorialspoint.com/cprogramming/c_bit_fields.htm –