main.h 765 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef B43_DASM_MAIN_H_
  2. #define B43_DASM_MAIN_H_
  3. #include <stdio.h>
  4. #include "util.h"
  5. /* The header that fwcutter also puts in to every .fw file */
  6. struct fw_header {
  7. /* Type of the firmware data */
  8. uint8_t type;
  9. /* Version number of the firmware data format */
  10. uint8_t ver;
  11. uint8_t __padding[2];
  12. /* Size of the data. For ucode and PCM this is in bytes.
  13. * For IV this is in number-of-ivs. (big-endian!) */
  14. be32_t size;
  15. } __attribute__ ((__packed__));
  16. /* struct fw_header -> type */
  17. #define FW_TYPE_UCODE 'u'
  18. #define FW_TYPE_PCM 'p'
  19. #define FW_TYPE_IV 'i'
  20. /* struct fw_header -> ver */
  21. #define FW_HDR_VER 0x01
  22. extern FILE *infile;
  23. extern FILE *outfile;
  24. extern const char *infile_name;
  25. extern const char *outfile_name;
  26. #endif /* B43_DASM_MAIN_H_ */