struct ubrr_values {
uint16_t ubrr;
uint8_t u2x;
};
static const struct ubrr_values PROGMEM baud_to_ubrr[] = {
[ x_PHY_BAUD_9600 ] = UBRR_x(9600),
[ x_PHY_BAUD_19200 ] = UBRR_x(19200),
[ x_PHY_BAUD_45450 ] = UBRR_x(45450),
[ x_PHY_BAUD_93750 ] = UBRR_x(93750),
[ x_PHY_BAUD_187500 ] = UBRR_x(187500),
[ x_PHY_BAUD_500000 ] = UBRR_x(500000),
[ x_PHY_BAUD_1500000 ] = UBRR_x(1500000),
[ x_PHY_BAUD_3000000 ] = UBRR_x(3000000),
[ x_PHY_BAUD_6000000 ] = UBRR_x(6000000),
[ x_PHY_BAUD_12000000 ] = UBRR_x(12000000),
};
이렇게 되어 있는데,
[ x_PHY_BAUD_9600 ] = UBRR_x(9600),
static const struct ubrr_values PROGMEM baud_to_ubrr[]
이 두 문장의 뜻이 뭔지좀 알려 주세요.
designated initializer
별게 다있네;;
별건 아니고.. 내가 선언한 배열의 [3]이라면 3번째 인자에 어떤 값을 넣겠다는 의미
뭐여이건