This is a snippet of C code from a library:
typedef enum
{
/**
* @brief SDIO specific error defines
*/
SD_CMD_CRC_FAIL = (1), /*!< Command response received (but CRC check failed) */
SD_DATA_CRC_FAIL = (2), /*!< Data bock sent/received (CRC check Failed) */
SD_CMD_RSP_TIMEOUT = (3), /*!< Command response timeout */
SD_DATA_TIMEOUT = (4), /*!< Data time out */
I do not understand the meaning of the parens around 1, 2, 3, and 4. Are SD_CMD_CRC_FAIL = 1 and SD_CMD_CRC_FAIL = (1) equivalent?
Yes, they are equivalent.
I don’t know why the author chose to write it like that (although see the comments to this answer for some theories).