src/mess/machine/tc8521.c
| r3930 | r3931 | |
| 145 | 145 | |
| 146 | 146 | INLINE const tc8521_interface *get_interface(const device_config *device) |
| 147 | 147 | { |
| 148 | | static const tc8521_interface dummy_config = {0, }; |
| 149 | | |
| 150 | 148 | assert(device != NULL); |
| 151 | 149 | assert(device->type == TC8521); |
| 152 | | return (device->static_config != NULL) |
| 153 | | ? (tc8521_interface *) device->static_config |
| 154 | | : &dummy_config; |
| 150 | return (tc8521_interface *) device->static_config; |
| 155 | 151 | } |
| 156 | 152 | |
| 157 | 153 | |
| 158 | 154 | /*************************************************************************** |
| 155 | GLOBAL VARIABLES |
| 156 | ***************************************************************************/ |
| 157 | |
| 158 | const tc8521_interface default_tc8521_interface = {0, }; |
| 159 | |
| 160 | |
| 161 | /*************************************************************************** |
| 159 | 162 | LOCAL VARIABLES |
| 160 | 163 | ***************************************************************************/ |
| 161 | 164 | |
src/mess/machine/tc8521.h
| r3930 | r3931 | |
| 16 | 16 | |
| 17 | 17 | #define TC8521 DEVICE_GET_INFO_NAME(tc8521) |
| 18 | 18 | |
| 19 | #define MDRV_TC8521_ADD(_tag, _intrf) \ |
| 20 | MDRV_DEVICE_ADD(_tag, TC8521) \ |
| 21 | MDRV_DEVICE_CONFIG(_intrf) |
| 19 | 22 | |
| 23 | #define MDRV_TC8521_REMOVE(_tag) \ |
| 24 | MDRV_DEVICE_REMOVE(_tag, TC8521) |
| 20 | 25 | |
| 26 | |
| 27 | |
| 21 | 28 | /*************************************************************************** |
| 22 | 29 | TYPE DEFINITIONS |
| 23 | 30 | ***************************************************************************/ |
| r3930 | r3931 | |
| 35 | 42 | FUNCTION PROTOTYPES |
| 36 | 43 | ***************************************************************************/ |
| 37 | 44 | |
| 45 | extern const tc8521_interface default_tc8521_interface; |
| 46 | |
| 38 | 47 | DEVICE_GET_INFO(tc8521); |
| 39 | 48 | |
| 40 | 49 | READ8_DEVICE_HANDLER(tc8521_r); |
src/mess/drivers/nc.c
| r3930 | r3931 | |
| 1711 | 1711 | MDRV_MSM8251_ADD("uart", nc100_uart_interface) |
| 1712 | 1712 | |
| 1713 | 1713 | /* rtc */ |
| 1714 | | MDRV_DEVICE_ADD("rtc", TC8521) |
| 1715 | | MDRV_DEVICE_CONFIG(nc100_tc8521_interface) |
| 1714 | MDRV_TC8521_ADD("rtc", nc100_tc8521_interface) |
| 1716 | 1715 | MACHINE_DRIVER_END |
| 1717 | 1716 | |
| 1718 | 1717 | |
| r3930 | r3931 | |
| 1737 | 1736 | MDRV_MSM8251_ADD("uart", nc200_uart_interface) |
| 1738 | 1737 | |
| 1739 | 1738 | /* no rtc */ |
| 1740 | | MDRV_DEVICE_REMOVE("rtc", TC8521) |
| 1739 | MDRV_TC8521_REMOVE("rtc") |
| 1741 | 1740 | |
| 1742 | 1741 | MDRV_NEC765A_ADD("nec765", nc200_nec765_interface) |
| 1743 | 1742 | MACHINE_DRIVER_END |