19536bae6SJulius Werner /* 29536bae6SJulius Werner * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. 39536bae6SJulius Werner * 49536bae6SJulius Werner * SPDX-License-Identifier: BSD-3-Clause 59536bae6SJulius Werner */ 69536bae6SJulius Werner 7c3cf06f1SAntonio Nino Diaz #ifndef CONSOLE_ASSERTIONS_H 8c3cf06f1SAntonio Nino Diaz #define CONSOLE_ASSERTIONS_H 99536bae6SJulius Werner 10*09d40e0eSAntonio Nino Diaz #include <lib/cassert.h> 119536bae6SJulius Werner 129536bae6SJulius Werner /* 139536bae6SJulius Werner * This file contains some separate assertions about console_t, moved here to 149536bae6SJulius Werner * keep them out of the way. Should only be included from <console.h>. 159536bae6SJulius Werner */ 169536bae6SJulius Werner CASSERT(CONSOLE_T_NEXT == __builtin_offsetof(console_t, next), 179536bae6SJulius Werner assert_console_t_next_offset_mismatch); 189536bae6SJulius Werner CASSERT(CONSOLE_T_FLAGS == __builtin_offsetof(console_t, flags), 199536bae6SJulius Werner assert_console_t_flags_offset_mismatch); 209536bae6SJulius Werner CASSERT(CONSOLE_T_PUTC == __builtin_offsetof(console_t, putc), 219536bae6SJulius Werner assert_console_t_putc_offset_mismatch); 229536bae6SJulius Werner CASSERT(CONSOLE_T_GETC == __builtin_offsetof(console_t, getc), 239536bae6SJulius Werner assert_console_t_getc_offset_mismatch); 249536bae6SJulius Werner CASSERT(CONSOLE_T_FLUSH == __builtin_offsetof(console_t, flush), 259536bae6SJulius Werner assert_console_t_flush_offset_mismatch); 269536bae6SJulius Werner CASSERT(CONSOLE_T_DRVDATA == sizeof(console_t), 279536bae6SJulius Werner assert_console_t_drvdata_offset_mismatch); 289536bae6SJulius Werner 29c3cf06f1SAntonio Nino Diaz #endif /* CONSOLE_ASSERTIONS_H */ 30